/* 扛扛 KangKang — 運費試算頁（quote.html）
   只放這一頁的樣式；共用元件在 components.css。 */

/* =========================================================
   開頭：朱紅色塊
   ========================================================= */
.q-hero {
  overflow: hidden;
  padding-top: clamp(28px, 6vw, 88px);
  /* 下面的試算區塊用 .section--lip 疊上來，要留出圓角的高度 */
  padding-bottom: calc(var(--radius-lg) + clamp(48px, 8vw, 104px));
}
.q-hero__sp1 { --x: 5%; --y: 84%; }
.q-hero__sp2 { --x: 46%; --y: 8%; }
.q-hero__sp3 { --x: 90%; --y: 70%; }
@media (min-width: 900px) {
  .q-hero__sp1 { --x: 40%; --y: 78%; }
}

.q-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "eyebrow burst"
    "title   title"
    "lead    lead"
    "keys    keys";
  align-items: center;
  column-gap: var(--space-4);
}
.q-hero__eyebrow { grid-area: eyebrow; align-self: center; }
.q-hero__burst {
  grid-area: burst;
  justify-self: end;
  font-size: 0.75rem;            /* 手機：小一點的爆炸框 */
  min-width: 0;
  margin-right: -6px;
}
.q-hero__burst .burst__big { font-size: 1.5rem; }
.q-hero__burst .burst__jp { font-size: 0.9375rem; }
.q-hero__title { grid-area: title; margin-top: var(--space-3); }
.q-hero__lead { grid-area: lead; max-width: 30em; margin-top: var(--space-5); }
.q-hero__keys { grid-area: keys; margin-top: var(--space-6); }
.q-hero__mascot { display: none; }

@media (min-width: 900px) {
  .q-hero__grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas:
      "eyebrow art"
      "title   art"
      "lead    art"
      "keys    art";
    column-gap: clamp(32px, 5vw, 80px);
    align-items: start;
  }
  .q-hero__burst {
    grid-area: art;
    justify-self: start;
    align-self: start;
    z-index: 2;
    font-size: 1rem;
    margin: 0 0 0 -4%;
  }
  .q-hero__burst .burst__big { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
  .q-hero__burst .burst__jp { font-size: 1.0625rem; }
  .q-hero__mascot {
    display: block;
    grid-area: art;
    align-self: end;
    justify-self: end;
    width: 100%;
    max-width: 440px;
    margin-bottom: -12px;
  }
  /* 蹲姿扛仔放進燕麥色圓形貼紙（朱紅底上才看得清楚） */
  .q-hero__mascot {
    max-width: 300px;
    aspect-ratio: 1;
    margin-bottom: 0;
    padding: 10% 12% 8%;
    background: var(--oat);
    border: 2.5px solid var(--ink);
    border-radius: 50%;
    box-shadow: 10px 10px 0 var(--ink);
    display: grid;
    place-items: end center;
  }
  .q-hero__mascot img { width: auto; max-width: 100%; max-height: 100%; }
  .section--red .q-hero__mascot img { filter: none; }
}

/* =========================================================
   試算：表單＋估價單
   ========================================================= */
.q-calc { padding-top: clamp(40px, 6vw, 80px); }
.q-layout { display: grid; gap: var(--space-7); }
.q-main { display: flex; flex-direction: column; gap: var(--space-7); min-width: 0; }
.q-form { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.q-form > .notice { margin-bottom: var(--space-2); }

@media (min-width: 1024px) {
  .q-layout {
    grid-template-columns: minmax(0, 1fr) clamp(340px, 34vw, 420px);
    column-gap: clamp(32px, 4vw, 64px);
    align-items: start;
  }
  /* 桌機：估價單黏在右邊。總價和複製按鈕放在最上面，卡片比畫面高也看得到 */
  .q-receipt { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* 步驟標題 */
.q-step { display: grid; gap: var(--space-2); }
.q-step:not(:first-child) { margin-top: var(--space-6); }
.q-step__title { display: flex; align-items: center; gap: 14px; font-size: var(--fs-h2); line-height: 1.15; }
.q-step__no {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.45em;
  height: 1.45em;
  font-size: 0.82em;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  background: var(--red);
  border: var(--border-w) solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 4px 0 var(--ink);
  rotate: -6deg;
}
.q-step__lead { color: var(--fg-muted); max-width: 36em; }

/* ---------- 每一件家具 ---------- */
.q-items { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-6); }
.q-item { gap: var(--space-5); container-type: inline-size; }
.q-item__head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.q-item__title { font-size: var(--fs-h3); font-weight: var(--fw-black); line-height: 1.3; }
.q-item__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; padding-bottom: 5px; }
.q-item__type .segmented__opts label > span { text-wrap: balance; text-align: center; }
.q-item__type .field__hint { margin-top: 2px; }
/* 選「代運」時的提醒：建議還沒下單的人改成代買 */
.q-nudge { display: grid; gap: 10px; justify-items: start; margin-top: var(--space-3); }
.q-nudge[hidden] { display: none; }
.q-nudge p { margin: 0; }

.q-item__grid {
  display: grid;
  gap: var(--space-4) var(--space-3);
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.q-span-all { grid-column: 1 / -1; }
.q-span-2 { grid-column: span 2; }
/* 卡片夠寬（不是看螢幕寬）才排四欄，1024px 左右兩欄並排時欄位才不會太窄 */
@container (min-width: 540px) {
  .q-item__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
}
.q-opt { font-weight: var(--fw-regular); color: var(--fg-muted); font-size: 0.875em; }
.q-affix-nt .input { padding-left: 3.4em; }
.q-item .field__error { margin-top: 2px; }

/* 包裝後尺寸那一行（quote.js 改 [data-size] 的字），右邊是「材積重是什麼？」 */
.q-item__size {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 8px 8px 14px;
  background: var(--paper);
  border: var(--border-w) dashed var(--ink);
  border-radius: var(--radius-field);
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  line-height: 1.55;
}
.q-item__size-txt { display: flex; align-items: flex-start; gap: 8px; flex: 1 1 14em; min-width: 0; margin: 0; }
.q-item__size .icon { width: 1.35em; height: 1.35em; margin-top: 0.05em; }
.q-item.is-blank .q-item__size-txt { font-weight: var(--fw-medium); color: var(--muted); }

/* 「材積重是什麼？」：小小的貼紙按鈕，打開材積重圖解（沒有 JS 時是跳到常見問題的連結） */
.q-vol-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  min-height: 44px;
  padding: 4px 14px 4px 6px;
  background: var(--cream);
  color: var(--ink);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 var(--ink);
  font-size: var(--fs-small);
  font-weight: var(--fw-black);
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out), background-color var(--dur-1);
}
.q-vol-link:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); background: var(--oat-soft); }
.q-vol-link:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.q-vol-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.q-vol-link__q {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  background: var(--red);
  border: var(--border-w) solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-latin);
  font-size: 1.1875rem;   /* 朱紅底上的字：粗體 19px 以上才夠對比 */
  font-weight: 800;
  line-height: 1;
}

@media (prefers-reduced-motion: no-preference) {
  .q-item.is-new { animation: q-pop-in var(--dur-3) var(--ease-spring); }
}
@keyframes q-pop-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.q-add { margin-top: calc(var(--space-2) * -1); }

/* ---------- 送到哪裡 ---------- */
.q-options { gap: var(--space-5); container-type: inline-size; }
.q-options .segmented label > span { padding-inline: 10px; white-space: nowrap; }
.q-options__home { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-4) var(--space-6); }
.q-floor { width: 9.5rem; }
.q-elev { min-height: 48px; }
.q-mode-note { display: grid; gap: var(--space-2); font-size: 0.9375rem; line-height: 1.7; }
.q-tiers {
  list-style: none;
  padding: 0;
  margin: 2px 0 4px;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@container (min-width: 540px) { .q-tiers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.q-tiers li {
  display: grid;
  gap: 0;
  padding: 8px 12px;
  background: var(--cream);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-field);
}
.q-tiers__kg { font-size: var(--fs-tiny); font-weight: var(--fw-bold); color: var(--muted); }
.q-tiers__nt { font-weight: 800; font-size: 1.0625rem; line-height: 1.35; }
.q-rule { border-top-style: dashed; }
.q-ins { display: grid; gap: var(--space-2); }
.q-ins__title { font-size: 1.0625rem; font-weight: var(--fw-black); }

.q-honest { gap: var(--space-2); }
.q-honest__title { font-size: var(--fs-h3); font-weight: var(--fw-black); }

/* =========================================================
   估價單
   ========================================================= */
.q-receipt { padding: 0; gap: 0; container-type: inline-size; }
.q-receipt__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px clamp(20px, 2.4vw, 28px) 16px;
  background: var(--red);
  border-bottom: var(--border-w) solid var(--ink);
  border-radius: calc(var(--radius-card) - var(--border-w)) calc(var(--radius-card) - var(--border-w)) 0 0;
}
.q-receipt__title { font-size: clamp(1.6rem, 2.4vw, 1.9rem); line-height: 1.1; letter-spacing: 0.02em; }
.q-receipt__sp { margin-left: auto; }
.q-receipt__body { display: flex; flex-direction: column; gap: var(--space-4); padding: clamp(20px, 2.4vw, 28px); }

.q-total { display: grid; gap: 2px; }
.q-total__label { font-weight: var(--fw-black); font-size: 1.0625rem; }
.q-total__num {
  font-size: clamp(2.6rem, 17cqi, 4.4rem);
  line-height: 1;
  margin: 4px 0 6px;
  transform-origin: 0 70%;
  white-space: nowrap;
}
.q-total__note {
  justify-self: start;
  padding: 4px 10px;
  background: var(--oat-soft);
  border: var(--border-w) solid var(--ink);
  border-radius: 10px;
  font-size: var(--fs-small);
  font-weight: var(--fw-bold);
  line-height: 1.5;
}

/* 匯率（quote.js showRate）：第一行數字粗體，第二行說明小字 */
.q-rate { margin-top: 8px; font-size: var(--fs-small); line-height: 1.55; }
.q-rate__lead { display: block; font-weight: var(--fw-bold); }
.q-rate__lead .num { font-weight: 800; white-space: nowrap; }
.q-rate__sub { display: block; font-size: var(--fs-tiny); color: var(--muted); text-wrap: pretty; }

.q-pay { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.q-pay__part {
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 10px 12px;
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-field);
}
.q-pay__k { font-size: var(--fs-tiny); font-weight: var(--fw-bold); line-height: 1.4; color: var(--muted); }
.q-pay__v { font-size: 1.3125rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
/* 窄的估價單（手機 360 以下、平板直放的右欄），或金額到六位數（quote.js 加 .is-long）：兩期改成上下一欄，數字才不會超出框 */
@container (max-width: 359.98px) { .q-pay { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 439.98px) { .q-pay.is-long { grid-template-columns: minmax(0, 1fr); } }
.q-note { font-size: var(--fs-small); line-height: 1.65; color: var(--muted); }
.q-warn { display: grid; gap: 6px; }

.q-copy { display: grid; gap: var(--space-2); padding-top: var(--space-2); }
.q-copy__btn { text-wrap: balance; }
@container (max-width: 400px) {
  .key.q-copy__btn { font-size: var(--fs-on-red-min); padding-inline: 14px; gap: 0.45em; }
}
.q-copy__btn.is-done { --key-bg: var(--ink); }
.q-copy__msg { font-size: var(--fs-small); font-weight: var(--fw-bold); line-height: 1.6; }
.q-copy__msg:empty { display: none; }
.q-out .textarea { font-size: 0.875rem; min-height: 180px; }

.q-empty { display: grid; gap: var(--space-3); padding: 16px; border: var(--border-w) dashed var(--ink); border-radius: var(--radius-field); font-weight: var(--fw-medium); }

/* 明細：兩期 */
.q-lines { display: grid; gap: var(--space-5); padding-top: var(--space-2); }
.q-phase__title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: var(--fw-black);
  line-height: 1.5;
}
.q-phase__title .num { font-weight: 800; font-size: 1.0625rem; }
.q-rows { margin: 4px 0 0; }
.q-rows .receipt__row { align-items: baseline; padding: 10px 2px; }
.q-rows .receipt__row:last-child { border-bottom: 0; }
.q-rows dt { font-weight: var(--fw-bold); line-height: 1.45; min-width: 0; }
.q-rows dt .badge { font-size: 0.6875rem; min-height: 1.5em; padding: 0 7px; vertical-align: 0.1em; }
.q-rows dt small { display: block; margin-top: 3px; font-size: var(--fs-tiny); font-weight: var(--fw-regular); line-height: 1.55; color: var(--muted); }
.q-rows dd { margin: 0; font-size: 1.0625rem; }

.q-notes { display: grid; gap: var(--space-3); padding-top: var(--space-4); border-top: var(--border-w) solid var(--ink); }
.q-save {
  padding: 12px 14px;
  background: var(--oat-soft);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-field);
  font-size: 0.9375rem;
  line-height: 1.65;
}
.q-save b { color: var(--ink); background: linear-gradient(transparent 58%, var(--oat) 58%); padding: 0 2px; }

@media (prefers-reduced-motion: no-preference) {
  .q-total__num.is-bump, .q-bar__num.is-bump { animation: q-bump 420ms var(--ease-spring); }
}
@keyframes q-bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* =========================================================
   手機、平板：底部總價列（桌機不用，估價單黏在右邊）
   ========================================================= */
.q-bar {
  --fg: var(--paper);
  --focus: var(--red);
  --key-shadow: var(--oat);
  position: fixed;
  left: 50%;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 40;                         /* 比頁首（50）低，手機選單打開時蓋得住 */
  width: min(560px, calc(100% - 20px));
  translate: -50% 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px 12px 18px;
  background: var(--ink);
  color: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: 18px;
  /* 暖白細框：在炭黑頁尾上也看得出邊 */
  box-shadow: 0 0 0 2px var(--paper), 0 6px 0 0 var(--red);
  transition: transform var(--dur-2) var(--ease-out), visibility 0s;
}
.q-bar.is-away {
  transform: translateY(calc(100% + 24px + env(safe-area-inset-bottom, 0px)));
  visibility: hidden;
  transition: transform var(--dur-2) var(--ease-out), visibility 0s linear var(--dur-2);
}
.q-bar__sum { display: grid; gap: 0; min-width: 0; }
.q-bar__label { font-size: var(--fs-tiny); font-weight: var(--fw-bold); color: var(--oat); line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-bar__num { font-weight: 800; font-size: 1.5rem; line-height: 1.15; color: var(--paper); transform-origin: 0 60%; white-space: nowrap; }
.q-bar__go { flex: none; margin-top: 4px; }

@media (max-width: 1023.98px) {
  /* 總價列不要蓋住內容：頁尾最後一行、focus 的欄位都留出它的高度 */
  .page-quote .site-footer { padding-bottom: calc(28px + 88px + env(safe-area-inset-bottom, 0px)); }
  html:has(body.page-quote) { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
@media (min-width: 1024px) {
  .q-bar { display: none !important; }
}

/* =========================================================
   常見問題（燕麥底）
   ========================================================= */
.q-faq__grid { display: grid; gap: var(--space-7); }
.q-faq__head { position: relative; display: grid; gap: var(--space-4); align-content: start; }
.q-faq__title { font-size: clamp(2.4rem, 6vw, 4.5rem); }
.q-faq__lead { max-width: 24em; font-weight: var(--fw-medium); }
.q-faq__sp { position: absolute; right: 6%; top: 0; }
@media (min-width: 900px) {
  .q-faq__grid { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); align-items: start; column-gap: clamp(40px, 6vw, 96px); }
  .q-faq__head { position: sticky; top: calc(var(--header-h) + 32px); }
}

.q-faq__list { display: grid; gap: 14px; }
.q-faq__item {
  background: var(--cream);
  border: var(--border-w) solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  --fg-muted: var(--muted);
  --focus: var(--red);
}
.q-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 14px 12px 20px;
  font-size: 1.0625rem;
  font-weight: var(--fw-black);
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
  border-radius: 14px;
}
.q-faq__item summary::-webkit-details-marker { display: none; }
.q-faq__item summary::marker { content: ""; }
.q-faq__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: 11px;
  box-shadow: 0 3px 0 var(--ink);
  transition: rotate var(--dur-2) var(--ease-spring), background-color var(--dur-2);
}
.q-faq__icon .icon { width: 20px; height: 20px; }
.q-faq__item summary:hover .q-faq__icon { background: var(--oat-soft); }
.q-faq__item[open] .q-faq__icon { rotate: 45deg; background: var(--red); }
.q-faq__body { display: grid; gap: 10px; padding: 0 20px 20px; font-size: 0.9875rem; line-height: 1.75; }
.q-faq__steps { display: grid; gap: 4px; padding-left: 1.4em; }
.q-faq__steps li::marker { font-family: var(--font-latin); font-weight: 800; }
.q-faq__list-plain { display: grid; gap: 6px; padding-left: 1.2em; }
.q-faq__ex {
  padding: 10px 14px;
  background: var(--oat-soft);
  border: var(--border-w) dashed var(--ink);
  border-radius: var(--radius-field);
  font-weight: var(--fw-medium);
}
.q-faq__rules { display: grid; gap: 10px; margin: 0; }
.q-faq__rules > div { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: var(--border-w) dashed var(--ink); }
.q-faq__rules > div:last-child { border-bottom: 0; padding-bottom: 0; }
.q-faq__rules dt { font-weight: var(--fw-black); }
.q-faq__rules dd { margin: 0; }

/* =========================================================
   材積重圖解（.vol）：常見問題 #vol 裡一張，卡片上的「材積重是什麼？」打開的對話框裡一張（複製的）
   只有字和 SVG，顏色只用品牌色。動畫只動 transform、opacity；減少動態時不動。
   ========================================================= */
.vol {
  margin: 0;
  display: grid;
  gap: 16px;
  container-type: inline-size;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink);
}
.vol .num { font-family: var(--font-latin); font-variant-numeric: tabular-nums; }

/* 一句話：朱紅底貼紙。炭黑字在朱紅上對比只有 3.95:1，所以紅底只放粗體大字（19px 以上），說明放在下面的米白底 */
.vol__idea {
  padding: 13px 18px 14px;
  background: var(--red);
  border: var(--border-w) solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
  font-size: clamp(1.1875rem, 5.2cqi, 1.5rem);
  font-weight: var(--fw-black);
  line-height: 1.4;
  text-wrap: balance;
}
/* 一句說明＋一個馬上看得懂的例子（沙發：磅秤 45 公斤，照 285 公斤算） */
.vol__intro { display: grid; gap: 10px; }
.vol__lede { font-size: 1.0625rem; font-weight: var(--fw-bold); line-height: 1.6; }
.vol__eg {
  display: grid;
  gap: 2px;
  padding: 10px 14px 12px;
  background: var(--oat-soft);
  border: var(--border-w) solid var(--ink);
  border-radius: 14px;
  font-size: 1rem;
  font-weight: var(--fw-bold);
  line-height: 1.7;
  text-wrap: pretty;
}
.vol__eg-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; font-weight: var(--fw-black); }
.vol__eg-tag {
  display: grid;
  place-items: center;
  flex: none;
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  font-size: 0.9375rem;
  font-weight: var(--fw-black);
  line-height: 1;
}
.vol__eg b { font-size: 1.0625rem; font-weight: var(--fw-black); white-space: nowrap; }
.vol__eg .num { font-weight: 800; }
.vol__eg-bill { background: linear-gradient(transparent 58%, var(--oat) 58%); padding: 0 2px; }
.vol__eg-l { display: block; }
/* 寬的時候（桌機、對話框）接成一句話 */
@container (min-width: 620px) {
  .vol__eg { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; }
  .vol__eg-go { margin-left: 6px; }
  .vol__eg-head { margin: 0; }
  .vol__eg-l { white-space: nowrap; }   /* 換行只換在兩段之間，不會把「一樣」拆開 */
}

/* 1 量箱子、2 和磅秤比 */
.vol__how { display: grid; gap: 14px; }
@container (min-width: 620px) {
  .vol__how { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}
.vol__panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px 16px 16px;
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: 16px;
}
.vol__panel-title { display: flex; align-items: center; gap: 10px; font-size: 1.0625rem; font-weight: var(--fw-black); line-height: 1.35; }
.vol__no {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  background: var(--red);
  border: var(--border-w) solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--ink);
  font-size: 1.1875rem;   /* 朱紅底上的字要粗體 19px 以上才夠對比 */
  font-weight: 800;
  line-height: 1;
  rotate: -6deg;
}
.vol__box { display: block; width: 100%; max-width: 340px; height: auto; justify-self: center; }

.vol__formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  font-size: clamp(1.1875rem, 5.6cqi, 1.4375rem);
  font-weight: var(--fw-black);
  line-height: 1.2;
}
.vol__f { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.vol__f small { font-size: 0.6em; font-weight: var(--fw-bold); color: var(--ink); }
.vol__f .num { font-weight: 800; }
.vol__res {
  display: inline-flex;
  align-items: baseline;
  padding: 5px 14px 6px;
  background: var(--red);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 0 var(--ink);
}
.vol__hint { font-size: var(--fs-small); line-height: 1.65; color: var(--muted); }
.vol__hint b { color: var(--ink); }

.vol__panel--pick { grid-template-rows: auto 1fr; }
.vol__pickwrap { display: grid; justify-items: center; align-content: start; gap: 8px; }
/* 磅秤：只有兩欄並排（第 2 步的格子被第 1 步撐高）時才畫，補滿空間；手機不畫，圖短一點 */
.vol__scale { display: none; width: 100%; max-width: 200px; height: auto; }
@container (min-width: 620px) {
  .vol__pickwrap { padding-top: 6px; gap: 10px; }
  .vol__scale { display: block; }
}
.vol__pick { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.vol__chip {
  display: grid;
  justify-items: center;
  flex: 1 1 0;
  min-width: 0;
  max-width: 11em;
  padding: 8px 6px 9px;
  background: var(--cream);
  border: var(--border-w) solid var(--ink);
  border-radius: 14px;
  font-size: 1.1875rem;
  font-weight: var(--fw-black);
  line-height: 1.3;
  text-align: center;
}
.vol__chip small { font-size: 0.75rem; font-weight: var(--fw-bold); color: var(--muted); white-space: nowrap; }
.vol__chip--box { background: var(--oat-soft); }
.vol__vs {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 50%;
  font-size: 0.9375rem;
  font-weight: var(--fw-black);
}
.vol__down { width: 26px; height: 26px; }
.vol__rule {
  padding: 8px 16px 10px;
  background: var(--cream);
  border: var(--border-w) dashed var(--ink);
  border-radius: 14px;
  text-align: center;
  font-size: 1.0625rem;
  font-weight: var(--fw-bold);
  line-height: 1.7;
}
.vol__rule b { font-weight: var(--fw-black); background: linear-gradient(transparent 60%, var(--oat) 60%); padding: 0 2px; }
.vol__rule .num { font-size: 1.2em; font-weight: 800; }
.vol__rule .badge { vertical-align: 0.2em; }
.vol__rule-note { display: block; font-size: var(--fs-tiny); font-weight: var(--fw-bold); line-height: 1.5; color: var(--muted); }

/* 比一比：兩個例子 */
.vol__ex-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  font-size: 1.125rem;
  font-weight: var(--fw-black);
  line-height: 1.35;
}
.vol__ex-title .badge { vertical-align: 0.15em; }
.vol__ex-title::after { content: ""; flex: 1 1 auto; border-top: var(--border-w) dashed var(--ink); }
.vol__ex { display: grid; gap: 16px; }
@container (min-width: 560px) {
  .vol__ex { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.vol-ex {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px 16px 16px;
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow-pop);
}
.vol-ex__name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 1.1875rem; font-weight: var(--fw-black); line-height: 1.3; }
.vol-ex__art { display: block; width: 100%; max-width: 300px; height: auto; justify-self: center; }
.vol-ex__size { font-size: 0.9375rem; font-weight: var(--fw-bold); line-height: 1.5; }
.vol-ex__size b { font-size: 1.0625rem; font-weight: 800; }
.vol-ex__size small { display: block; font-size: var(--fs-tiny); font-weight: var(--fw-medium); color: var(--muted); }

/* 長條：大的那個是朱紅＋「用這個算」 */
.vol-ex__bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.vol-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 10px; }
.vol-bar__k { display: flex; align-items: center; gap: 0 8px; font-size: 0.9375rem; font-weight: var(--fw-black); line-height: 1.4; min-width: 0; }
.vol-bar__use { display: none; }
.vol-bar.is-win .vol-bar__use {
  display: inline-flex;
  padding: 0 8px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: var(--fw-bold);
  line-height: 1.6;
  white-space: nowrap;
}
.vol-bar__v { font-size: 1.375rem; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.vol-bar:not(.is-win) .vol-bar__v { color: var(--muted); font-size: 1.125rem; }
.vol-bar__track {
  grid-column: 1 / -1;
  display: block;
  height: 18px;
  background: var(--cream);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.vol-bar__fill {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  min-width: 8px;
  background: var(--oat);
  box-shadow: 2px 0 0 var(--ink);
  transform-origin: 0 50%;
}
.vol-bar.is-win .vol-bar__fill { background: var(--red); }
/* 長條下面：這個數字怎麼來的（材積重的算式、實重是磅秤上秤的） */
.vol-bar__f { grid-column: 1 / -1; font-size: 0.875rem; font-weight: var(--fw-bold); line-height: 1.45; color: var(--ink); }
.vol .vol-bar__f.num { font-weight: 700; }

.vol-ex__out {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 10px;
  padding-top: 10px;
  border-top: var(--border-w) dashed var(--ink);
}
.vol-ex__calc { font-size: 0.9375rem; font-weight: var(--fw-bold); line-height: 1.5; }
.vol-ex__calc b { font-weight: 800; }
.vol-ex__sum { display: inline-flex; align-items: baseline; gap: 6px; }
.vol-ex__price {
  font-size: clamp(1.625rem, 7.5cqi, 2.125rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--red);
  -webkit-text-stroke: 1.25px var(--ink);
  paint-order: stroke fill;
}
.vol-ex__why { font-size: var(--fs-small); font-weight: var(--fw-medium); line-height: 1.65; }
.vol__cap { display: grid; gap: 4px; }
.vol__take { font-size: 1rem; font-weight: var(--fw-black); line-height: 1.6; color: var(--ink); }
.vol__fine { font-size: var(--fs-small); line-height: 1.65; color: var(--muted); }

/* 圖（SVG）：箱子、虛線是家具本身、尺寸箭頭、磅秤 */
.vol-art__line { stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.vol-art__oat { fill: var(--oat); }
.vol-art__soft { fill: var(--oat-soft); }
.vol-art__shade { fill: var(--ink); fill-opacity: 0.14; }
.vol-art__red { fill: var(--red); }
.vol-art__paper { fill: var(--paper); }
.vol-art__ink { fill: var(--ink); }
.vol-art__top { fill-opacity: 0.72; }
.vol-art__dash { fill: var(--cream); fill-opacity: 0.6; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; stroke-linecap: round; }
.vol-art__dim { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vol-art__pill rect { fill: var(--cream); stroke: var(--ink); stroke-width: 2; }
.vol-art__pill text { fill: var(--ink); font-family: var(--font-sans); font-size: 16px; font-weight: 900; text-anchor: middle; }
.vol-art__lcd { fill: var(--paper); font-family: var(--font-latin); font-size: 13px; font-weight: 800; text-anchor: middle; letter-spacing: 0.02em; }
.vol-art__heavy { fill: var(--paper); font-family: var(--font-sans); font-size: 17px; font-weight: 900; text-anchor: middle; }
.vol-art__light { fill: var(--ink); font-family: var(--font-sans); font-size: 17px; font-weight: 900; text-anchor: middle; }
.vol-art__ghost { fill: none; stroke: var(--muted); stroke-width: 2; stroke-dasharray: 0.1 6; stroke-linecap: round; stroke-linejoin: round; }
.vol-art__ghost-t { fill: var(--muted); font-family: var(--font-sans); font-size: 13px; font-weight: 700; text-anchor: middle; }
.vol-art__hit { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }

/* 打開時長條從左邊長出來 */
@media (prefers-reduced-motion: no-preference) {
  .q-vol-dlg[open] .vol-bar__fill,
  .q-faq__item[open] .vol-bar__fill { animation: vol-grow 700ms var(--ease-out) 120ms both; }
}
@keyframes vol-grow { from { transform: scaleX(0); } }

/* 常見問題裡：手機上讓圖寬一點 */
.q-faq__item--vol .q-faq__body { gap: 14px; }
@media (max-width: 479.98px) {
  .q-faq__item--vol .q-faq__body { padding-inline: 12px; }
}

/* ---------- 對話框 ---------- */
.q-vol-dlg {
  --fg: var(--ink);
  --fg-muted: var(--muted);
  --focus: var(--red);
  --key-shadow: var(--ink);
  width: min(900px, calc(100% - 20px));
  max-width: none;
  max-height: calc(100vh - 20px);
  max-height: calc(100dvh - 20px);
  margin: auto;
  padding: 0;
  color: var(--ink);
  background: var(--cream);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-card);
  box-shadow: 8px 8px 0 var(--ink);
  overflow: hidden;
}
.q-vol-dlg[open] { display: flex; flex-direction: column; }
.q-vol-dlg::backdrop { background: rgba(32, 30, 29, 0.62); }
.q-vol-dlg__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px 12px clamp(16px, 3vw, 28px);
  background: var(--ink);
  color: var(--paper);
}
.q-vol-dlg__title { font-size: clamp(1.5rem, 4vw, 2rem); line-height: 1.15; }
.q-vol-dlg__x { --key-shadow: var(--red); margin-bottom: 4px; }
.q-vol-dlg__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: clamp(14px, 3vw, 28px); }
.q-vol-dlg__foot {
  flex: none;
  display: flex;
  justify-content: flex-end;
  padding: 12px clamp(14px, 3vw, 28px) 17px;
  background: var(--paper);
  border-top: var(--border-w) solid var(--ink);
}
@media (min-width: 640px) {
  .q-vol-dlg__foot .key--block { width: auto; }
}
/* 對話框開著：後面的頁面不要捲 */
html.q-vol-open { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .q-vol-dlg[open] { animation: q-pop-in var(--dur-3) var(--ease-spring); }
  .q-vol-dlg[open]::backdrop { animation: q-fade var(--dur-2) var(--ease-out); }
}
@keyframes q-fade { from { opacity: 0; } }
