@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;600;700&display=swap');

/* =========================
   CSS Variables
   ========================= */
:root {
  /* Colors */
  --c-cyan: hsl(188, 78%, 50%);
  --c-cyan-600: hsl(188, 82%, 42%);
  --c-cyan-700: hsl(188, 86%, 36%);
  --c-bg: #fafbfc;
  --c-surface: #ffffff;
  --c-surface-elevated: #ffffff;
  --c-text: #1a202c;
  --c-text-muted: #64748b;
  --c-border: #e2e8f0;
  --c-border-light: #f1f5f9;
  --c-white: #ffffff;

  /* Layout */
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,.05), 0 10px 15px rgba(0,0,0,.08);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.08), 0 20px 25px rgba(0,0,0,.12);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.1), 0 25px 50px rgba(0,0,0,.15);
  --container-width: 1200px;
  --section-padding: 4rem 0;

  /* Typography */
  --font-system: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
}

/* =========================
   Reset & Base
   ========================= */
* { margin:0; padding:0; box-sizing:border-box; }
html, body { height:100%; }
body {
  font-family:var(--font-system);
  background-color:var(--c-bg);
  color:var(--c-text);
  line-height:1.6;
  font-size:var(--text-base);
}
.container { max-width:var(--container-width); margin:0 auto; padding:0 1rem; }
.section { padding:var(--section-padding); }
.section-title {
  font-size:var(--text-3xl); font-weight:700; text-align:center; margin-bottom:3rem; color:var(--c-text);
}
a { color:inherit; }

/* Focus */
:where(a,button,input,select,summary).focus-visible,
:where(a,button,input,select,summary):focus-visible {
  outline:3px solid rgba(34,139,230,.3); outline-offset:2px; border-radius:8px;
}

/* =========================
   Header
   ========================= */
.header {
  background:rgba(255,255,255,.95);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--c-border-light);
  position:sticky; top:0; z-index:100;
}
.header .container { display:flex; justify-content:space-between; align-items:center; padding:1rem; }
.header-brand h1 { font-size:var(--text-2xl); font-weight:700; color:var(--c-cyan); margin:0; }
.brand-sub { font-size:var(--text-sm); color:var(--c-text-muted); }
.header-nav { display:flex; gap:2rem; }
.nav-link { color:var(--c-text); text-decoration:none; font-weight:500; transition:color .3s; }
.nav-link:hover { color:var(--c-cyan); }
.mobile-menu-btn { display:none; flex-direction:column; background:none; border:0; cursor:pointer; padding:.5rem; }
.mobile-menu-btn span { width:25px; height:3px; background-color:var(--c-text); margin:2px 0; transition:.3s; }
.mobile-menu { display:none; flex-direction:column; background:var(--c-white); border-top:1px solid var(--c-border); padding:1rem; }
.mobile-nav-link { color:var(--c-text); text-decoration:none; padding:.75rem 0; border-bottom:1px solid var(--c-border-light); font-weight:500; }
.mobile-nav-link:hover { color:var(--c-cyan); }

/* ===== Header horizontal layout (PC) ===== */
.header-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2rem;
  padding:1rem;
}
/* ブランド（左） */
.brand-link { display:flex; flex-direction:column; text-decoration:none; }
.brand-title { margin:0; line-height:1.1; color:var(--c-cyan); }
.brand-sub { margin-top:.25rem; font-size:var(--text-sm); color:var(--c-text-muted); }
/* ナビ（右） */
.header-nav { margin-left:auto; }
.nav-list {
  display:flex;
  align-items:center;
  gap:2rem;
  list-style:none;
  margin:0;
  padding:0;
}
.nav-link { text-decoration:none; color:var(--c-text); font-weight:600; }
.nav-link:hover { color:var(--c-cyan); }
/* 768px未満ではモバイルメニュー */
@media (max-width:768px){
  .header-nav{ display:none; }
}

/* =========================
   Buttons
   ========================= */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:.75rem 1.5rem; border:none; border-radius:var(--radius);
  font-size:var(--text-base); font-weight:600; text-decoration:none; cursor:pointer;
  transition:all .3s; white-space:nowrap;
}
.btn-primary{ background:var(--c-cyan); color:var(--c-white); box-shadow:var(--shadow-md); border:1px solid transparent; }
.btn-primary:hover{ background:var(--c-cyan-600); transform:translateY(-1px); box-shadow:var(--shadow-lg); }
.btn-ghost{ background:var(--c-white); color:var(--c-cyan); border:1px solid var(--c-border); box-shadow:var(--shadow); }
.btn-ghost:hover{ background:var(--c-cyan); color:var(--c-white); border-color:var(--c-cyan); transform:translateY(-1px); box-shadow:var(--shadow-md); }

/* =========================
   Hero
   ========================= */
 .hero{ background:linear-gradient(135deg,#f8fafc 0%,#e2e8f0 100%); padding:5rem 0; }
.key-points{ display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:2rem; margin-bottom:4rem; }
.key-point{ background:var(--c-white); border:1px solid var(--c-border-light); border-radius:var(--radius-lg); padding:2rem; text-align:center; box-shadow:var(--shadow); transition:all .3s; }
.key-point:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }
.key-point-icon{ font-size:60px;); margin-bottom:1rem; }
.key-point h3{ font-size:var(--text-xl); margin-bottom:.5rem; color:var(--c-cyan); }
.hero-content{ display:grid; grid-template-columns:1fr 1fr; gap:4rem; align-items:center; }
.hero-title{
  font-size:var(--text-4xl); font-weight:800; margin-bottom:1rem;
  background:linear-gradient(135deg,var(--c-text),var(--c-cyan));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text;
}
.hero-subtitle{ font-size:var(--text-xl); color:var(--c-cyan); font-weight:600; margin-bottom:1.5rem; }
.hero-description{ font-size:var(--text-lg); color:var(--c-text-muted); margin-bottom:2rem; line-height:1.7; }
.hero-actions{ display:flex; gap:1rem; flex-wrap:wrap; }
.hero-mockup{
  width:100%;  
  border-radius:var(--radius-lg); display:flex; align-items:center; justify-content:center;
}
.hero-penlight {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto 16px; /* 中央寄せ＋下に余白 */
  border-radius: 8px;  /* 角丸にしたければ */
}

.mockup-content{text-align:center}
.mockup-icon{font-size:4rem;margin-bottom:1rem}
.mockup-content p{font-size:var(--text-lg);font-weight:600;color:var(--c-cyan);margin-bottom:.5rem}
.mockup-content span{font-size:var(--text-sm);color:var(--c-text-muted)}

/* =========================
   Features
   ========================= */
.features{ background:var(--c-bg); }
.features-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:2rem; }
.feature-card{ background:var(--c-white); border:1px solid var(--c-border-light); border-radius:var(--radius-lg); padding:2rem; box-shadow:var(--shadow); transition:all .3s; }
.feature-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); border-color:var(--c-border); }
.feature-icon{ font-size:var(--text-3xl); margin-bottom:1rem; }
.feature-card h3{ font-size:var(--text-xl); margin-bottom:1rem; color:var(--c-cyan); }

.feature-image img {
  width: 100%;
  height: auto;
  margin: 0 auto 16px; /* 中央寄せ＋下に余白 */
  border-radius: 8px;  /* 角丸にしたければ */
}

/* =========================
   Products
   ========================= */
.products{ background:var(--c-white); }
.products-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(400px,1fr)); gap:2rem; }
.product-card{ background:var(--c-white); border:1px solid var(--c-border-light); border-radius:var(--radius-lg); box-shadow:var(--shadow); overflow:hidden; transition:all .3s; }
.product-card:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }
.product-image img{ height:100%; width:100%; object-fit:contain; }
.product-image-content{text-align:center}
.product-image-icon{ font-size:3rem; margin-bottom:.5rem; }
.product-image-text{ font-size:var(--text-sm); font-weight:500; color:var(--c-cyan); }
.product-content{ padding:1.5rem; }
.product-header{ display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:1rem; }
.product-name{ font-size:var(--text-2xl); font-weight:700; color:var(--c-cyan); }
.product-badge{ background:var(--c-bg); color:var(--c-text-muted); padding:.25rem .75rem; border-radius:var(--radius); font-size:var(--text-sm); }
.product-description{ color:var(--c-text-muted); margin-bottom:1.5rem; }
.product-specs{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; margin-bottom:1.5rem; }
.product-spec{ display:flex; align-items:center; gap:.5rem; font-size:var(--text-sm); }
.product-spec-icon{ color:var(--c-cyan); }
.product-footer{ display:flex; justify-content:space-between; align-items:center; }
.product-price{text-align:right}
.product-price-amount{ font-size:var(--text-2xl); font-weight:700; color:var(--c-cyan); }
.product-price-unit{ font-size:var(--text-sm); color:var(--c-text-muted); }

/* =========================
   Pricing Calculator
   ========================= */
.pricing{ background:var(--c-bg); }
.pricing-calculator{
  background:var(--c-white); border-radius:var(--radius-lg); box-shadow:var(--shadow-md);
  overflow:hidden; border:1px solid var(--c-border-light); max-width:1000px; margin:0 auto;
}
.calculator-section{ padding:2rem; border-bottom:1px solid var(--c-border); }
.calculator-section:last-child{ border-bottom:none; }
.calculator-section h3{ font-size:var(--text-xl); margin-bottom:1.5rem; color:var(--c-cyan); }
.product-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:1rem; }
.product-selection-card{
  background:var(--c-bg); border:2px solid var(--c-border); border-radius:var(--radius);
  padding:1.5rem; cursor:pointer; transition:all .3s ease; text-align:left;
}
.product-selection-card:hover{ border-color:var(--c-cyan); box-shadow:var(--shadow-md); transform:translateY(-1px); }
.product-selection-card.selected{ border-color:var(--c-cyan); box-shadow:0 0 0 2px rgba(34,139,230,.1); background:rgba(34,139,230,.02); }
.product-selection-card h4{ color:var(--c-cyan); margin-bottom:.5rem; }
.product-selection-price{ font-size:var(--text-2xl); font-weight:700; color:var(--c-text); margin-bottom:1rem; }
.product-selection-specs{ font-size:var(--text-sm); color:var(--c-text-muted); line-height:1.4; }
.product-selection-specs div{ margin-bottom:.25rem; }

.calculator-inputs{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:1rem; }
.input-group{ display:flex; flex-direction:column; gap:.5rem; position:relative; }
.input-group label{ font-weight:600; color:var(--c-text); }
.input-group input, .input-group select{
  padding:.75rem; border:1px solid var(--c-border); border-radius:var(--radius);
  background:var(--c-white); color:var(--c-text); font-size:var(--text-base); transition:all .2s ease;
}
.input-group input:focus, .input-group select:focus{ outline:none; border-color:var(--c-cyan); box-shadow:0 0 0 3px rgba(34,139,230,.1); transform:translateY(-1px); }
.input-unit{ position:absolute; right:.75rem; top:50%; transform:translateY(-50%); color:var(--c-text-muted); pointer-events:none; }
.checkbox-group{ flex-direction:row; align-items:center; gap:.75rem; }
.checkbox-group input[type="checkbox"]{ width:auto; margin:0; }

/* =========================
   Quote Summary
   ========================= */
.quote-summary{ background:var(--c-bg);padding: 2rem; }
.quote-details{ margin-bottom:2rem; }
.quote-row{ display:flex; justify-content:space-between; align-items:center; padding:.75rem 0; border-bottom:1px solid var(--c-border); }
.quote-row.total{
  font-size:var(--text-xl); font-weight:700; color:var(--c-cyan);
  border-bottom:2px solid var(--c-cyan); background:rgba(34,139,230,.02);
  padding:1rem 0;  margin-top:.5rem;
}
.quote-actions{ display:flex; gap:1rem; flex-wrap:wrap; }

/* =========================
   Timeline / FAQ / Contact / Footer
   ========================= */
.timeline{ background:var(--c-white); }
.timeline-container{ display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:2rem; }
.timeline-item{ display:flex; flex-direction:column; align-items:center; text-align:center; background:var(--c-white); border:1px solid var(--c-border-light); border-radius:var(--radius-lg); padding:2rem; box-shadow:var(--shadow); transition:all .3s; }
.timeline-item:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }
.timeline-icon{ background:var(--c-cyan); color:var(--c-white); width:4rem; height:4rem; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:var(--text-xl); font-weight:700; margin-bottom:1rem; box-shadow:var(--shadow-lg); }
.timeline-item h3{ font-size:var(--text-lg); font-weight:600; margin-bottom:.5rem; }
.timeline-item p{ color:var(--c-text-muted); font-size:var(--text-sm); margin-bottom:1rem; }
.timeline-duration{ background:rgba(34,139,230,.1); color:var(--c-cyan); padding:.5rem 1rem; border-radius:var(--radius); font-size:var(--text-sm); font-weight:500; }

.faq{ background:var(--c-bg); }
.faq-list{ max-width:800px; margin:0 auto; }
.faq-item{ background:var(--c-white); border:1px solid var(--c-border); border-radius:var(--radius); margin-bottom:1rem; box-shadow:var(--shadow); }
.faq-item summary{ padding:1.5rem; cursor:pointer; font-weight:600; list-style:none; position:relative; }
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{ content:'+'; position:absolute; right:1.5rem; top:50%; transform:translateY(-50%); font-size:var(--text-xl); color:var(--c-cyan); }
.faq-item[open] summary::after{ content:'-'; }
.faq-item p{ padding:0 1.5rem 1.5rem; color:var(--c-text-muted); line-height:1.6; }

.contact{ background:var(--c-white); }
.contact-content{ max-width:600px; margin:0 auto; text-align:center; }
.contact-description{ font-size:var(--text-lg); color:var(--c-text-muted); margin-bottom:2rem; line-height:1.6; }
.contact-methods{ display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:2rem; }
.contact-method{ background:var(--c-bg); border:1px solid var(--c-border); border-radius:var(--radius); padding:2rem; text-align:center; }
.contact-icon{ font-size:2rem; margin-bottom:1rem; }
.contact-method h3{ font-weight:600; margin-bottom:.5rem; }
.contact-method p{ color:var(--c-text-muted); }

.footer{ background:var(--c-text); color:var(--c-white); padding:3rem 0 1rem; }
.footer-content{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:2rem; margin-bottom:2rem; }
.footer-section h3{ color:var(--c-cyan); margin-bottom:1rem; }
.footer-section h4{ margin-bottom:1rem; }
.footer-section ul{ list-style:none; }
.footer-section ul li{ margin-bottom:.5rem; opacity:.8; }
.footer-section p{ opacity:.8; }
.footer-bottom{ border-top:1px solid rgba(255,255,255,.2); padding-top:1rem; text-align:center; opacity:.6; }

/* =========================
   Modal
   ========================= */
.modal{
  display:none; position:fixed; inset:0; z-index:1000;
  background-color:rgba(0,0,0,.5);
  align-items:center; justify-content:center;
}
.modal.show{ display:flex; } /* 中央寄せのため flex 表示 */
.modal-content{
  background:var(--c-white); padding:0; border-radius:var(--radius-lg);
  width:90%; max-width:800px; max-height:80vh; overflow:auto; box-shadow:var(--shadow-xl);
}
.modal-header{
  background:var(--c-bg); padding:1.5rem; border-bottom:1px solid var(--c-border);
  display:flex; justify-content:space-between; align-items:center; position:sticky; top:0; z-index:1;
}
.modal-header h3{ margin:0; color:var(--c-cyan); }
.close{ color:var(--c-text-muted); font-size:28px; font-weight:bold; cursor:pointer; }
.close:hover{ color:var(--c-text); }
.modal-body{ padding:2rem; }
body.modal-open{ overflow:hidden; }

/* =========================
   Quote Document (in modal)
   ========================= */
.quote-document{ background:#fff; }
.quote-header{ display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--c-border); padding-bottom:1rem; margin-bottom:2rem; }
.quote-header h2{ margin:0; }
.quote-meta{ font-size:var(--text-sm); color:var(--c-text-muted); text-align:right; }
.quote-parties{ display:grid; grid-template-columns:1fr 1fr; gap:2rem; margin-bottom:2rem; }
.quote-client .client-info p,
.quote-issuer .issuer-info p{ margin:.1rem 0; }
.summary-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:1rem; font-size:var(--text-sm); }
.quote-table{ width:100%; border-collapse:collapse; border:1px solid var(--c-border); border-radius:var(--radius); overflow:hidden; }
.quote-table thead{ background:var(--c-bg); }
.quote-table th, .quote-table td{ padding:1rem; border-top:1px solid var(--c-border); }
.quote-table .ta-r{ text-align:right; }
.quote-table .strong{ font-weight:700; }
.quote-table .small{ font-size:var(--text-sm); color:var(--c-text-muted); }
.quote-total{ font-size:var(--text-2xl); font-weight:700; color:var(--c-cyan); text-align:right; margin:1.25rem 0 2rem; }
.quote-notes{ background:var(--c-bg); padding:1rem; border-radius:var(--radius); margin-bottom:2rem; }
.quote-actions{ display:flex; gap:.75rem; justify-content:flex-end; }

/* Quote form utilities */
.grid{ display:grid; gap:1rem; }
.grid-2{ grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); }
.col-span-2{ grid-column:1 / -1; }
.form-label{ display:block; margin-bottom:.5rem; font-weight:600; }
.form-input{
  width:100%; padding:.75rem; border:1px solid var(--c-border); border-radius:var(--radius);
}
.form-input:focus{ outline:none; border-color:var(--c-cyan); box-shadow:0 0 0 3px rgba(34,139,230,.1); }
.align-right{ text-align:right; }

/* =========================
   Fixed CTA (旧: .fixed-cta) ※使っている場合の互換用
   ========================= */
.fixed-cta{
  position:fixed; left:0; right:0; bottom:0; z-index:900;
  background:#fff; box-shadow:0 -8px 24px rgba(0,0,0,.08);
  transition:transform .35s ease, opacity .35s ease;
}
.fixed-cta.hidden{ display:none; }
.fixed-cta.fade{ opacity:.25; transform:translateY(40%); }
.fixed-cta .cta-content{ max-width:var(--container-width); margin:0 auto; padding:1rem; display:flex; gap:1rem; align-items:center; justify-content:space-between; }
.cta-text{ display:flex; gap:1.5rem; align-items:baseline; flex-wrap:wrap; }
.cta-text .label{ color:var(--c-text-muted); font-size:var(--text-sm); }
.cta-text .value{ font-weight:700; }
.cta-button{ min-width:220px; }

/* =========================
   Fixed CTA (新: .pen-fixed-cta)
   ========================= */
.pen-fixed-cta {
  position:fixed;        /* 画面下に常時固定 */
  bottom:0; left:0; right:0;
  z-index:900;
  background:var(--c-white);
  border-top:1px solid var(--c-border);
  box-shadow:0 -6px 20px rgba(0,0,0,.06);
}
.pen-fixed-cta__inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1rem .75rem;
  max-width:var(--container-width);
  margin:0 auto;
}
.pen-fixed-cta__metrics {
  display:grid;
  grid-auto-flow:column;
  gap:2.25rem;
  align-items:end;
}
.pen-metric { display:grid; gap:.25rem; }
.pen-metric__label { font-size:var(--text-sm); color:var(--c-text-muted); letter-spacing:.02em; }
.pen-metric__value {
  font-weight:800;
  font-size:clamp(1rem, 1.4vw + .6rem, 1.7rem);
  color:var(--c-text);
  white-space:nowrap;
}
.pen-metric__value--accent { color:var(--c-cyan); }
.pen-fixed-cta__button {
  min-width:220px;
  padding:.9rem 1.5rem;
  font-size:var(--text-lg);
  border-radius:var(--radius-lg);
}

/* responsive */
@media (max-width: 768px) {
  .pen-fixed-cta__inner { padding:.75rem .5rem; gap:.5rem; }
  .pen-fixed-cta__metrics { gap:1rem; }
  .pen-fixed-cta__button { min-width:180px; font-size:var(--text-base); padding:.8rem 1.1rem; }
}
@media (max-width: 420px) {
  .pen-metric__label { font-size:12px; }
  .pen-metric__value { font-size:1.05rem; }
  .pen-fixed-cta__button { min-width:160px; }
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 900px){
  .header-brand h1{ font-size:1.25rem; }
}
@media (max-width: 768px){
  .header-nav{ display:none; }
  .mobile-menu-btn{ display:flex; }
  .mobile-menu.active{ display:flex; }

  .hero-content{ grid-template-columns:1fr; gap:2rem; }
  .hero-title{ font-size:var(--text-3xl); }
  .hero-actions{ justify-content:center; }
  .key-points{ grid-template-columns:1fr; }
  .features-grid{ grid-template-columns:1fr; }
  .products-grid{ grid-template-columns:1fr; }
  .calculator-inputs{ grid-template-columns:1fr; }
  .timeline-container{ grid-template-columns:1fr; }
  .contact-methods{ grid-template-columns:1fr; }
  .footer-content{ grid-template-columns:1fr; text-align:center; }
  .modal-content{ width:95%; margin:2% auto; }

  /* 旧CTA */
  .fixed-cta .cta-content{ flex-wrap:wrap; gap:.75rem; }
  .fixed-cta .cta-text{ gap:.75rem; font-size:var(--text-sm); }
  .cta-button{ width:100%; }
}
@media (max-width: 480px){
  .container{ padding:0 .5rem; }
  .section{ padding:2rem 0; }
  .hero{ padding:3rem 0; }
  .key-points{ margin-bottom:2rem; }
  .key-point{ padding:1.5rem; }
  .calculator-section{ padding:1.5rem; }
  .timeline-item{ padding:1.5rem; }
  .contact-method{ padding:1.5rem; }
}

/* =========================
   Print — モーダルの見積書だけを印刷
   ========================= */
@media print{
  body{ background:#fff; }
  .header,.hero,.features,.products,.pricing,.timeline,.faq,.contact,.footer,.fixed-cta,.pen-fixed-cta{ display:none !important; }
  .modal{ position:static; inset:auto; display:block; background:none; }
  .modal-content{ box-shadow:none; max-width:100%; width:100%; max-height:none; }
  .modal-header,.close{ display:none; }
  .modal-body{ padding:0; }

  .quote-actions,
  .modal-footer,
  .close,
  #closeModal,
  .align-right { display: none !important;}
}

  /* 配色を印刷でもそのままに（対応ブラウザでは有効） */
  .quote-document {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* A4想定の余白（任意） */
  @page { size: A4; margin: 12mm; }

  /* 表は改ページで崩れないように */
  .quote-table tr, .quote-table td, .quote-table th { 
    page-break-inside: avoid;
  }

/* --- TeeOEM Pro: layout fixes --- */
.nowrap{ white-space:nowrap; }

/* 価格表をきれいに2列グリッドに（→1列ブレークポイントも） */
.pricing-tables{
  display:grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap:24px;
  align-items:start;
  margin-bottom: 24px;
}
@media (max-width: 820px){
  .pricing-tables{ grid-template-columns: 1fr; }
}

/* 価格表の見栄えと折返し抑止 */
.price-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
  border-radius:14px;
  box-shadow:0 4px 16px rgba(0,0,0,.06);
  overflow:hidden;
}
.price-table caption{
  text-align:left;
  padding:14px 16px 0;
  font-weight:700;
  font-size:1.05rem;
  line-height:1.3;
  letter-spacing:.01em;
}
.price-table th,
.price-table td{
  padding:12px 16px;
  border-bottom:1px solid #eef1f4;
}
.price-table thead th{
  color:#6b7585;
  font-weight:600;
}
.price-table tbody tr:last-child td{ border-bottom:none; }

/* プラン選択（ラジオカード）の崩れ対策 */
.product-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(240px,1fr));
  gap:16px;
}
@media (max-width: 820px){
  .product-grid{ grid-template-columns:1fr; }
}
.card-radio{
  display:flex;
  align-items:flex-start;
  gap:12px;
  width:100%;
  text-align:left;
  padding:16px;
  background:#fff;
  border:1.5px solid #e6ecf3;
  border-radius:12px;
  box-shadow:0 2px 10px rgba(0,0,0,.04);
  transition:border-color .2s, box-shadow .2s, background .2s;
}
.card-radio:hover{ border-color:#bcd7ff; box-shadow:0 4px 12px rgba(0,0,0,.06); }
.card-radio input[type="radio"]{
  margin-top:4px;
  accent-color:#1aa7ff; /* 好みで */
}
.card-radio.selected,
.product-selection-card.selected{
  border-color:#1aa7ff;
  box-shadow:0 6px 16px rgba(26,167,255,.15);
}

/* タイトルの上下余白を調整（上に空白が出る崩れ対策） */
.section.pricing .section-title{ margin-bottom:18px; }
.section.features .section-title,
.section.timeline .section-title,
.section.faq .section-title{ margin-bottom:18px; }

/* 価格の単位（/枚）を段落中で折り返さない */
.pen-metric__value, .quote-details .total, .price-table td,
.product-selection-price, .product-price-amount, .product-price-unit{
  white-space:nowrap;
}

/* 日本語の不自然な途中改行を抑止 */
.price-table caption,
.card-radio span strong{
  word-break: keep-all;
  line-break: strict;
}


/* ===== Lineup cards ===== */
.nowrap{ white-space:nowrap; }

.lineup-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap:24px;
}
@media (max-width: 900px){
  .lineup-grid{ grid-template-columns: 1fr; }
}

.lineup-card{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius:16px;
  box-shadow:0 6px 18px rgba(0,0,0,.05);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.lineup-mock{
  position:relative;
  background:#f7fafc;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:220px;
}
.lineup-mock img{
  max-width:88%;
  height:auto;
  object-fit:contain;
  display:block;
}
.lineup-badge{
  position:absolute;
  top:12px; left:12px;
  background:#111827; color:#fff;
  font-size:.85rem; line-height:1;
  padding:8px 10px;
  border-radius:999px;
  letter-spacing:.02em;
}

.lineup-body{ padding:18px 18px 16px; }
.lineup-title{ font-size:1.15rem; font-weight:800; margin:0 0 6px; }
.lineup-desc{ color:#4b5563; margin:0 0 10px; }
.lineup-specs{ margin:0 0 14px; padding-left:18px; color:#6b7280; }
.lineup-specs li{ margin:4px 0; }

.lineup-actions{ margin-top:auto; }
.lineup-actions .btn{ width:auto; }


/* ===== Pricing Plan ===== */
.plan-tabs{display:flex;gap:.5rem;margin:.75rem 0 1rem;background:#f6f8fb;padding:.375rem;border-radius:.75rem}
.plan-tab{flex:1;padding:.75rem 1rem;border:0;border-radius:.6rem;background:transparent;font-weight:700;color:#6b7a90;cursor:pointer}
.plan-tab.is-active{background:#fff;color:#00bcd4;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.price-table.is-hidden{display:none}



/* ===== Pricing tables tidy ===== */
.pricing-tables{
  display:grid;
  grid-template-columns: repeat(2, minmax(260px,1fr));
  gap:24px;
  align-items:start;
  margin-top:18px;
}
@media (max-width: 900px){
  .pricing-tables{ grid-template-columns:1fr; }
}
.price-table{
  width:100%;
  border-collapse:separate; border-spacing:0;
  background:#fff; border-radius:16px;
  box-shadow:0 6px 18px rgba(0,0,0,.05);
  overflow:hidden;
}
.price-table caption{
  text-align:left; padding:16px 16px 0;
  font-weight:800; font-size:1.05rem; letter-spacing:.01em;
}
.price-table th, .price-table td{ padding:14px 16px; border-bottom:1px solid #eef2f6; }
.price-table thead th{ color:#6b7280; font-weight:700; }
.price-table tbody tr:last-child td{ border-bottom:none; }
.price-table td:nth-child(2), .price-table th:nth-child(2){ text-align:right; white-space:nowrap; }

/* よけいな途中改行防止 */
.price-table caption, .lineup-title{ word-break:keep-all; line-break:strict; }


/* ===== Colors: card style ===== */
.colors .section-note{ color:#6b7280; margin-top:-6px; margin-bottom:12px; }

.color-cards{
  display:grid;
  grid-template-columns:repeat(6,minmax(120px,1fr));
  gap:14px;
  list-style:none; padding:0; margin:0;
}
@media (max-width:1100px){ .color-cards{ grid-template-columns:repeat(4,1fr); } }
@media (max-width:700px){  .color-cards{ grid-template-columns:repeat(2,1fr); } }

.color-card{
  background:#fff;
  border:1px solid #e9eef5;
  border-radius:14px;
  box-shadow:0 4px 14px rgba(0,0,0,.05);
  overflow:hidden;
  display:flex; flex-direction:column;
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.color-card:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 18px rgba(0,0,0,.08);
  border-color:#cfe5ff;
}
.color-chip-top{
  height:78px;
  border-bottom:1px solid rgba(0,0,0,.06);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.04);
}
.color-chip-name{
  text-align:center;
  font-weight:800;
  padding:10px 8px;
  color:#111827;
}

/* ボタン：中央配置＋上に余白 */
.colors-actions{
  display:flex;
  justify-content:center;
  margin-top:24px;   /* ← 上に余白 */
}
.colors .btn{ padding:12px 18px; }

/* モーダル（Colors専用・自前） */
.cm-modal{
  position:fixed; inset:0;
  background:rgba(17,24,39,.55);
  display:none; align-items:center; justify-content:center;
  z-index:9999;
}
.cm-modal.show{ display:flex; }
.cm-content{
  width:min(1040px,92vw);
  max-height:88vh; overflow:auto;
  background:#fff; border-radius:16px;
  box-shadow:0 20px 40px rgba(0,0,0,.25);
}
.cm-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-bottom:1px solid #eef2f6;
}
.cm-title{ margin:0; font-size:1.1rem; font-weight:800; }
.cm-close{
  font-size:20px; line-height:1; border:none; background:transparent;
  cursor:pointer; padding:6px 10px;
}
.cm-body{ padding:16px; }
.color-cards--modal{ grid-template-columns:repeat(6,minmax(120px,1fr)); gap:12px; }
@media (max-width:1200px){ .color-cards--modal{ grid-template-columns:repeat(4,1fr); } }
@media (max-width:700px){  .color-cards--modal{ grid-template-columns:repeat(2,1fr); } }
.color-note{ margin-top:12px; color:#6b7280; font-size:.9rem; }


/* === size qty grid === */
.qty-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;
  margin-bottom:8px;
}
@media (max-width: 640px){
  .qty-grid{ grid-template-columns: 1fr; }
}
.total-pill{ align-self:end; }
.qty-total{
  background:#0ea5e9; color:#fff; font-weight:800;
  padding:10px 12px; border-radius:999px; display:inline-block;
  min-width:120px; text-align:center;
}
.qty-total.qty-badge--warn{
  background:#ef4444; /* red-500 */
}

.hint{ font-size:.85rem; color:#6b7280; margin-top:6px; }

/* 見積りブロックの最大幅をやや狭める（任意） */
.section.pricing .pricing-calculator .container,
.section.pricing .pricing-calculator {
  max-width: 1100px; /* 好みで 960〜1120px */
  margin-left:auto; margin-right:auto;
}

/* Sizes section */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  background: #fff;
}
.sizes-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px; /* モバイルで横スクロール可 */
}
.sizes-table thead th {
  text-align: center;
  font-weight: 700;
  color: #0f172a;
  padding: 14px 12px;
  background: #f8fafc;
  border-bottom: 2px solid #e5e7eb;
}
.sizes-table tbody th {
  text-align: left;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
  padding: 12px;
  white-space: nowrap;
  border-bottom: 1px solid #e5e7eb;
}
.sizes-table td {
  text-align: center;
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #0f172a;
}
.sizes-note {
  margin-top: 10px;
  font-size: 0.93rem;
  color: #64748b;
}
.nowrap { white-space: nowrap; }
/* スクリーンリーダ向けにキャプションを隠す */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  white-space: nowrap; border: 0; padding: 0; margin: -1px;
}


/* Mini Bonfilet Upsell */
.mini-upsell {
  display: none;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #e6e8ee;
  border-radius: 12px;
  background: #f9fbff;
  display: flex;
  align-items: center;
  gap: 16px;
}

.mini-upsell__thumb {
  width: 96px;   /* ←大きめに変更 */
  height: 96px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.mini-upsell__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-upsell__text {
  flex: 1;
}
.mini-upsell__text p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.6;
}

/* 詳しくボタン */
.mini-upsell__btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: 14px;
  color: #fff;
  background: #2dacf6; /* サイトのメインカラーに合わせる */
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease;
}
.mini-upsell__btn:hover {
  background: #7cadf7;
}


/* ===== Quote Modal basic ===== */
.qm-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);display:none;z-index:1000;}
.qm-overlay.is-open{display:block;}
.qm-dialog{position:relative;max-width:980px;margin:4rem auto;background:#fff;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.15);padding:24px;}
.qm-close{position:absolute;right:12px;top:10px;font-size:22px;line-height:1;width:36px;height:36px;border-radius:10px;border:0;background:#f3f4f6;cursor:pointer;}
.qm-title{margin:0 0 12px;font-size:20px;}
.qm-step.is-hidden{display:none;}
.qm-form .qm-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.qm-form .qm-field input{width:100%;height:44px;border:1px solid #e5e7eb;border-radius:10px;padding:0 12px;}
.qm-form .qm-field .req{color:#e11d48;}
.qm-form .qm-col2{grid-column:1 / -1;}
.qm-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:16px;}
.qm-actions.end{margin-top:24px;}

.qm-addr{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:12px 0 16px;}
.qm-addr-block{border:1px solid #eef2f7;border-radius:12px;padding:12px;}
.qm-meta{display:flex;gap:16px;color:#6b7280;font-size:14px;margin-bottom:8px;}

.qm-summary{display:flex;gap:18px;flex-wrap:wrap;margin:14px 0;}
.qm-table-wrap{overflow-x:auto;border:1px solid #eef2f7;border-radius:12px;}
.qm-table{width:100%;border-collapse:collapse;font-size:14px;}
.qm-table th,.qm-table td{padding:10px 12px;border-bottom:1px solid #eef2f7;text-align:left;}
.qm-table th:last-child,.qm-table td:last-child{text-align:right;}
.qm-total{font-size:20px;font-weight:700;text-align:right;margin:16px 0;}
.qm-notes ul{margin:8px 0 0 1em;color:#6b7280;font-size:13px}
@media print{
  .header,.footer,.pen-fixed-cta,#mobileMenu,.plan-tabs,.pricing-tables,.calculator-section,.quote-summary .quote-actions{display:none !important;}
  .qm-overlay{position:static;display:block;background:#fff;}
  .qm-dialog{box-shadow:none;padding:0;margin:0;border:0;}
  .qm-close,.qm-actions{display:none !important;}
}

/* 商品選択カード */
.plan-select{
  display:grid;
  grid-template-columns: repeat(2, minmax(260px,1fr));
  gap:16px;
  margin:16px 0 24px;
}
.plan-card{
  display:flex; flex-direction:column; justify-content:center;
  gap:6px;
  padding:18px 20px;
  border-radius:14px;
  border:2px solid rgba(0,0,0,0.06);
  background:#fbfeff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  cursor:pointer;
  outline:none;
  transition: box-shadow .15s, border-color .15s, background .15s;
}
.plan-card:hover{ box-shadow: 0 3px 16px rgba(0,0,0,0.06); background:#ffffff; }
.plan-card:focus-visible{ border-color:#00bcd4; box-shadow: 0 0 0 4px rgba(0,188,212,.15); }
.plan-card.is-active{
  border-color:#1dd3f8;
  box-shadow: 0 0 0 3px rgba(29,211,248,.25), 0 6px 20px rgba(0,0,0,.06);
  background:#ffffff;
}
.plan-card__title{ font-weight:700; font-size:1.05rem; color:#0b6b7a; }
.plan-card__meta{ display:flex; gap:10px; color:#6b7a89; font-size:.9rem; }

/* 価格表：2枚並び + 選択中を強調 */
.pricing-tables--dual{
  display:grid;
  grid-template-columns: repeat(2, minmax(280px,1fr));
  gap:16px;
  align-items:start;
}
.price-table{ border-radius:14px; border:2px solid rgba(0,0,0,0.06); }
.price-table.is-active{ border-color:#1dd3f8; box-shadow: 0 0 0 3px rgba(29,211,248,.25); }

@media (max-width: 840px){
  .plan-select, .pricing-tables--dual{ grid-template-columns: 1fr; }
}

/* ===== Print only the quote modal, 1 page fit ===== */
@media print {
  /* まず全部消す */
  body.printing-quote * { display: none !important; }

  /* 印刷用クローンだけ表示 */
  body.printing-quote #quotePrint,
  body.printing-quote #quotePrint * {
    display: revert !important;           /* UA既定に戻す（最近のブラウザ対応） */
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* 用紙と版面 */
  @page { size: A4; margin: 12mm; }       /* 余白は好みに応じて調整 */
  #quotePrint {
    background: #fff !important;
    width: 186mm;                          /* = 210 - 余白(左右合計24mm) の目安 */
    margin: 0 auto !important;
    box-shadow: none !important;
    border: none !important;
    transform: none !important;
  }

  /* テーブルが途中で切れにくいように */
  #quotePrint table, 
  #quotePrint tr { page-break-inside: avoid; }
  #quotePrint .qm-actions,
  #quotePrint #qmEdit,
  #quotePrint #qmPrint { display: none !important; } /* 操作用ボタンは隠す */
}

#quotePrint .qm-addr{
  display:grid !important;
  grid-template-columns: 1fr 1fr !important; /* 2カラム */
  gap: 8mm !important;
  align-items:start;
  margin: 12px 0 16px;
}
#quotePrint .qm-addr-block{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:12px 14px;
  page-break-inside:avoid !important;
}
#quotePrint .qm-addr-block h4{ margin:0 0 6px; font-size:12.5px; }
#quotePrint .qm-addr-block p{ margin:0; line-height:1.55; white-space:pre-line; }

/* スマホ画面表示だけ1カラム、印刷は常に2カラム */
@media (max-width: 768px){
  .qm-addr{ grid-template-columns:1fr; }
}
@media print{
  body.printing-quote #quotePrint .qm-addr{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
    gap:8mm !important;
  }
}
