/* 噗噗製作所 × 蘭陽博物館 合作提案書（獨立 Cloudflare Pages：pupu-proposal-lanyang）
   版型：文件式提案（頂部列＋側欄章節＋手機抽屜）；視覺：沿用 pupuworks.tw/proposal/2026 配色與字型。 */

@font-face {
  font-family: 'huninn';
  src: url('assets/huninn.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #8cc63e;
  --green-deep: #3b7a1e;
  --green-soft: #eef7e1;
  --dark: #204a22;
  --dark-2: #2d6131;
  --cream: #fff3c3;
  --cream-2: #fff9e3;
  --paper: #fffdf6;
  --pink: #ff8db0;
  --pink-soft: #ffe8f0;
  --pink-text: #b03a6a;
  --yellow: #ffd43a;
  --orange: #ff9f45;
  --ink: #2b2420;
  --muted: #6b6258;
  --line: #ece3c6;
  --font: 'huninn', 'jf-openhuninn-2.1', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
  --max: 1180px;
  --r: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-synthesis: none;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.03em;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--green-deep); text-underline-offset: 3px; }
a:hover { color: var(--dark); }
h1, h2, h3, h4 { font-weight: 400; margin: 0; line-height: 1.35; }
p { margin: 0 0 1em; }
.m-br { display: none; }

/* ── 頂部列 ─────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(32, 74, 34, 0.96);
  color: #fff6e2;
  backdrop-filter: blur(8px);
}
.topbar-in {
  max-width: var(--max); margin: 0 auto; padding: 0 28px; height: 60px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: inline-flex; align-items: center; gap: 0.45em; letter-spacing: 0.14em; font-size: 15px; -webkit-text-stroke: 0.02em currentColor; }
.brand-flower { width: 18px; height: 18px; color: var(--pink); }
.brand-sep { width: 1px; height: 16px; background: rgba(255, 246, 226, 0.35); }
.doc-name { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dn-short { display: none; }
.case { margin-left: auto; font-size: 12.5px; opacity: 0.75; letter-spacing: 0.05em; white-space: nowrap; }
.toc-btn {
  display: none; flex: none; width: 40px; height: 40px; margin-left: -8px;
  border: 0; background: none; padding: 10px 8px; cursor: pointer;
  flex-direction: column; justify-content: space-between;
}
.toc-btn span { display: block; height: 2px; border-radius: 2px; background: #fff6e2; }

/* ── 紙張 ─────────────────────────── */
.paper {
  max-width: var(--max); margin: 0 auto; background: var(--paper);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}

/* 封面 */
.cover {
  position: relative;
  padding: 64px 64px 48px;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 8px 32px;
  align-items: end;
  overflow: hidden;
}
.cover::before {
  content: ''; position: absolute; right: -90px; top: -120px; width: 320px; height: 280px;
  border-radius: 50%; background: var(--yellow); opacity: 0.9; z-index: 0;
}
.cover > * { position: relative; z-index: 1; }
.eyebrow { font-size: 12.5px; letter-spacing: 0.18em; color: var(--green-deep); text-transform: uppercase; margin: 0 0 12px; -webkit-text-stroke: 0.02em currentColor; }
.cover h1 { font-size: 40px; letter-spacing: 0.04em; margin: 0 0 18px; -webkit-text-stroke: 0.03em currentColor; }
.cover h1 .bar { display: inline-block; width: 3px; height: 0.85em; border-radius: 2px; background: var(--pink); margin: 0 0.4em; vertical-align: -0.06em; }
.lede { font-size: 17.5px; color: #3f3731; margin: 0 0 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
.chips li { border-radius: 999px; padding: 3px 14px; font-size: 13.5px; background: var(--green-soft); color: var(--green-deep); }
.chips li:nth-child(2n) { background: var(--pink-soft); color: var(--pink-text); }
.cover-art { width: 100%; align-self: center; border-radius: 20px; box-shadow: 8px 8px 0 rgba(32, 74, 34, 0.12); }
.meta {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 28px 0 0; border-top: 1px dashed #d9cf9e; border-bottom: 1px dashed #d9cf9e;
}
.meta div { padding: 14px 18px 14px 0; }
.meta dt { font-size: 12.5px; color: var(--muted); letter-spacing: 0.06em; }
.meta dd { margin: 0; font-size: 15.5px; }

/* ── 版面 ─────────────────────────── */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.side { border-right: 1px solid var(--line); padding: 44px 26px 44px 34px; background: #fffaea; }
.side nav { position: sticky; top: 84px; }
.side-head, .scrim { display: none; }
.side .grp { margin: 0 0 18px; padding: 0 0 16px; border-bottom: 1px dashed #e3d8ad; }
.side .grp:last-child { border-bottom: 0; }
.side .gt { display: block; font-size: 15px; margin: 0 0 6px; color: var(--ink); text-decoration: none; -webkit-text-stroke: 0.015em currentColor; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; position: relative; padding: 3px 0 3px 18px; font-size: 14px; color: var(--muted); text-decoration: none; line-height: 1.7; }
.side li a::before { content: ''; position: absolute; left: 2px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #d9cf9e; }
.side li a:hover { color: var(--ink); }
.side li a.on { color: var(--green-deep); }
.side li a.on::before { background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

main { padding: 16px 64px 72px; min-width: 0; }
.chapter { padding: 44px 0 36px; border-bottom: 1px dashed var(--line); }
.chapter:last-child { border-bottom: 0; }
.kicker { font-size: 12.5px; letter-spacing: 0.18em; color: var(--green-deep); text-transform: uppercase; margin: 0 0 6px; }
.chapter h2 { display: flex; align-items: center; gap: 0.35em; font-size: 30px; letter-spacing: 0.06em; margin: 0 0 18px; -webkit-text-stroke: 0.03em currentColor; }
.h-flower { width: 22px; height: 22px; flex: none; }
.chapter h3 { font-size: 20px; letter-spacing: 0.06em; margin: 34px 0 10px; padding-left: 14px; position: relative; -webkit-text-stroke: 0.02em currentColor; }
.chapter h3::before { content: ''; position: absolute; left: 0; top: 0.3em; bottom: 0.3em; width: 5px; border-radius: 3px; background: var(--green); }
.chapter h4 { font-size: 18px; letter-spacing: 0.06em; margin: 0 0 8px; -webkit-text-stroke: 0.02em currentColor; }
.big {
  font-size: 18.5px; line-height: 1.75; margin: 0 0 8px;
  background: var(--cream-2); border-radius: var(--r); padding: 16px 20px;
  border-left: 6px solid var(--yellow);
}
.caption { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

/* 表格 */
table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 6px 0 4px; font-size: 15px; }
.kv th, .kv td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.kv th { width: 9.5em; background: var(--green-soft); color: var(--green-deep); font-weight: 400; }
.kv tr:first-child th { border-top-left-radius: 12px; }
.kv tr:last-child th { border-bottom-left-radius: 12px; border-bottom: 0; }
.kv tr:last-child td { border-bottom: 0; }
.grid { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.grid th { background: var(--dark); color: #fff6e2; font-weight: 400; text-align: left; padding: 11px 14px; letter-spacing: 0.06em; }
.grid td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.grid tbody tr:nth-child(2n) td { background: #fffaea; }
.grid td:first-child { color: var(--green-deep); white-space: nowrap; }

/* 角色 */
.chars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 8px 0 0; }
.char { margin: 0; background: #fff; border-radius: var(--r); padding: 18px 14px 16px; text-align: center; box-shadow: 6px 6px 0 var(--sh); }
.char img { width: 112px; margin: 0 auto 10px; border-radius: 50%; background: var(--bg); }
.char b { display: block; font-weight: 400; font-size: 17px; -webkit-text-stroke: 0.02em currentColor; }
.char span { display: block; font-size: 13.5px; color: var(--muted); }
.char-pink { --sh: #fe9fc1; --bg: #ffd6e5; }
.char-purple { --sh: #b9a2f0; --bg: #e6dcff; }
.char-orange { --sh: #fece84; --bg: #ffeccc; }

/* 作品 */
.works { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; margin: 8px 0 18px; }
.work { margin: 0; border-radius: 12px; overflow: hidden; background: #000; }
.work img { width: 100%; height: 100%; object-fit: cover; }
.work-tall { grid-row: 1 / 3; }
.facts, .ticks { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.facts li { display: flex; gap: 10px; align-items: flex-start; }
.facts b { font-weight: 400; color: var(--green-deep); -webkit-text-stroke: 0.02em currentColor; }
.bullet { flex: none; width: 18px; height: 18px; margin-top: 0.3em; }
.photo-row { display: grid; grid-template-columns: 1.25fr 1fr; gap: 10px; }
.photo-row img { width: 100%; height: 100%; max-height: 360px; object-fit: cover; border-radius: 12px; }

/* 雙欄盒 */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 14px 0 0; }
.box { border-radius: var(--r); padding: 18px 20px 8px; }
.box-green { background: var(--green-soft); }
.box-pink { background: var(--pink-soft); }
.box-green h4 { color: var(--green-deep); }
.box-pink h4 { color: var(--pink-text); }
.ticks li { position: relative; padding-left: 1.6em; }
.ticks li::before {
  content: ''; position: absolute; left: 0.1em; top: 0.45em; width: 1em; height: 1em; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.3l2.6 2.5L12 5.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 80% no-repeat;
}
.box-pink .ticks li::before { background-color: var(--pink); }

/* 商品 */
.products { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.products li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 10px; display: grid; gap: 2px; }
.products img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; margin-bottom: 6px; background: var(--cream-2); }
.products b { font-weight: 400; font-size: 14px; line-height: 1.5; }
.products span { font-size: 14px; color: var(--pink-text); }

/* 方案選項 */
.option { position: relative; background: #fff; border: 2px solid var(--line); border-radius: var(--r); padding: 20px 20px 14px; }
.option h4 { font-size: 21px; padding-left: 46px; min-height: 34px; display: flex; align-items: center; }
.opt-tag {
  position: absolute; left: 18px; top: 18px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 18px; -webkit-text-stroke: 0.03em currentColor;
}
.tag-green { background: var(--green); }
.tag-pink { background: #ff8fb1; }
.opt-sub { margin: 10px 0 6px; font-size: 14px; color: var(--muted); }
.opt-fit { margin: 10px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--green-deep); }

/* 試算 */
.calc { border: 2px solid var(--green); border-radius: var(--r); background: var(--green-soft); overflow: hidden; }
.calc-in { display: grid; grid-template-columns: 1.5fr 1fr 1.7fr 1fr; gap: 14px; padding: 18px 20px; align-items: end; }
.calc label { display: grid; gap: 6px; font-size: 13.5px; color: var(--green-deep); }
.calc input[type=number], .calc select {
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid #cfe2b4; border-radius: 10px; padding: 9px 12px; width: 100%; min-width: 0;
}
.calc input:focus, .calc select:focus { outline: 3px solid rgba(140, 198, 62, 0.45); outline-offset: 1px; }
.calc-mode { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; gap: 8px; min-width: 0; }
.calc-mode legend { font-size: 13.5px; color: var(--green-deep); margin-bottom: 6px; padding: 0; }
.radio { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 6px !important; background: #fff; border: 1px solid #cfe2b4; border-radius: 999px; padding: 7px 12px; color: var(--ink) !important; font-size: 14.5px !important; cursor: pointer; }
.radio input { accent-color: var(--green-deep); margin: 0; }
.rate-field.off { opacity: 0.45; }
.calc-out { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: #fff; border-top: 2px dashed #cfe2b4; }
.calc-out div { padding: 14px 20px; display: grid; gap: 2px; }
.calc-out div + div { border-left: 1px solid var(--line); }
.calc-out span { font-size: 13px; color: var(--muted); }
.calc-out b { font-weight: 400; font-size: 22px; letter-spacing: 0.02em; -webkit-text-stroke: 0.03em currentColor; }
#o-museum, #o-3m { color: var(--green-deep); }
#o-pupu { color: var(--pink-text); }

/* 方案二 */
.steps-mini { list-style: none; counter-reset: s; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps-mini li { counter-increment: s; background: var(--cream-2); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; }
.steps-mini li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-size: 15px; }
.steps-mini b { font-weight: 400; font-size: 16.5px; -webkit-text-stroke: 0.02em currentColor; }
.steps-mini span { font-size: 14px; color: var(--muted); line-height: 1.65; }
.ideas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 0; }
.idea { border-radius: var(--r); padding: 16px; display: grid; gap: 4px; justify-items: center; text-align: center; }
.idea img { width: 92px; border-radius: 50%; background: #fff; margin-bottom: 6px; }
.idea b { font-weight: 400; font-size: 17px; -webkit-text-stroke: 0.02em currentColor; }
.idea span { font-size: 14px; line-height: 1.65; color: #4a423b; }
.idea-purple { background: #f1ecff; }
.idea-orange { background: #fff0db; }
.idea-pink { background: var(--pink-soft); }
.fees { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.fee { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 14px; display: grid; gap: 4px; }
.fee-no { width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 15px; }
.fee b { font-weight: 400; font-size: 17px; -webkit-text-stroke: 0.02em currentColor; }
.fee > span:last-child { font-size: 14px; color: var(--muted); line-height: 1.65; }
.flow { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 6px; align-items: center; }
.flow li { display: inline-flex; align-items: center; gap: 8px; background: var(--cream-2); border-radius: 999px; padding: 6px 16px 6px 6px; font-size: 15px; }
.flow li span { width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 13.5px; }


/* 流程 */
.timeline { list-style: none; counter-reset: t; margin: 8px 0 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 19px; top: 14px; bottom: 30px; border-left: 3px dotted #d9cf9e; }
.timeline li { counter-increment: t; position: relative; padding: 0 0 18px 58px; display: grid; gap: 2px; }
.timeline li::before {
  content: counter(t); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--green); color: #fff; display: grid; place-items: center; font-size: 18px; box-shadow: 0 0 0 4px var(--paper);
}
.timeline li:nth-child(4)::before { background: #ff8fb1; }
.timeline li.tl-last::before { background: var(--yellow); color: var(--ink); }
.timeline b { font-weight: 400; font-size: 17.5px; padding-top: 6px; -webkit-text-stroke: 0.02em currentColor; }
.timeline span { font-size: 14.5px; color: var(--muted); }

/* 聯絡 */
.contact {
  margin: 28px 0 0; background: var(--dark); color: #fff6e2; border-radius: 22px; padding: 26px 28px;
  display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 20px; align-items: center; scroll-margin-top: 76px;
}
.contact h3 { margin: 0 0 6px; padding: 0; color: var(--pink); font-size: 26px; }
.contact h3::before { display: none; }
.contact p { margin: 0 0 16px; }
.contact-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contact-grid li { background: var(--dark-2); border-radius: 14px; padding: 10px 14px; display: grid; min-width: 0; overflow: hidden; }
.contact-grid span { font-size: 12.5px; color: var(--yellow); letter-spacing: 0.06em; }
.contact-grid a { color: #fff6e2; text-decoration: none; overflow-wrap: anywhere; }
.contact-grid a:hover { text-decoration: underline; }
.contact-art { width: 100%; }

/* ── 平板 ─────────────────────────── */
@media (max-width: 1080px) {
  main { padding: 12px 40px 60px; }
  .cover { padding: 52px 40px 40px; grid-template-columns: minmax(0, 1fr) 260px; }
  .calc-in { grid-template-columns: 1fr 1fr; }
  .calc-out { grid-template-columns: 1fr 1fr; }
  .calc-out div:nth-child(3) { border-left: 0; }
  .calc-out div:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ── 手機與窄平板：側欄改抽屜 ─────── */
@media (max-width: 900px) {
  .toc-btn { display: flex; }
  .case { display: none; }
  .layout { display: block; }
  .side {
    position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; width: min(300px, 84vw);
    padding: 0 22px 30px; overflow-y: auto; border-right: 0;
    transform: translateX(-102%); transition: transform 0.25s ease; box-shadow: 8px 0 30px rgba(0, 0, 0, 0.12);
  }
  .side.open { transform: none; }
  .side nav { position: static; }
  .side-head {
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; background: #fffaea; padding: 18px 0 12px; margin-bottom: 8px;
    border-bottom: 1px dashed #e3d8ad; font-size: 15px; color: var(--green-deep);
  }
  .side-close { border: 0; background: var(--green-soft); color: var(--green-deep); width: 34px; height: 34px; border-radius: 50%; font-size: 15px; cursor: pointer; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(32, 74, 34, 0.35); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
  .scrim.on { opacity: 1; pointer-events: auto; }
}

@media (max-width: 700px) {
  body { font-size: 15.5px; }
  .topbar-in { padding: 0 16px; gap: 10px; }
  .dn-long { display: none; }
  .dn-short { display: inline; }
  .paper { border: 0; }
  .cover { padding: 34px 20px 26px; grid-template-columns: 1fr; }
  .cover::before { right: -120px; top: -150px; }
  .cover h1 { font-size: 28px; }
  .cover h1 .bar { display: none; }
  .m-br { display: inline; }
  .d-br { display: none; }
  .lede { font-size: 16px; }
  .cover-art { max-width: 280px; margin: 10px auto 0; }
  .meta { grid-template-columns: 1fr 1fr; margin-top: 18px; }
  main { padding: 0 20px 44px; }
  .chapter { padding: 34px 0 26px; }
  .chapter h2 { font-size: 25px; }
  .chapter h3 { font-size: 18.5px; margin-top: 28px; }
  .big { font-size: 16.5px; padding: 14px 16px; }
  .chars { gap: 10px; }
  .char { padding: 12px 6px 12px; box-shadow: 4px 4px 0 var(--sh); }
  .char img { width: 76px; }
  .char b { font-size: 14px; }
  .char span { font-size: 12px; }
  .two, .steps-mini, .ideas, .fees { grid-template-columns: 1fr; }
  .ideas .idea { grid-template-columns: 72px 1fr; justify-items: start; text-align: left; column-gap: 14px; align-items: center; }
  .ideas .idea img { grid-row: 1 / 3; width: 72px; margin: 0; }
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .photo-row { grid-template-columns: 1fr 1fr; }
  .photo-row img { max-height: 220px; }
  .calc-in { grid-template-columns: 1fr; padding: 16px; }
  .calc-out div { padding: 12px 16px; }
  .calc-out b { font-size: 19px; }
  .kv th { width: 6.6em; padding: 10px 12px; }
  .kv td { padding: 10px 12px; }
  /* 三欄以上表格改成卡片 */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack { border: 0; border-radius: 0; overflow: visible; }
  table.stack tr { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; overflow: hidden; background: #fff; }
  table.stack td { border-top: 0; padding: 8px 14px; display: grid; grid-template-columns: 7.2em 1fr; gap: 8px; background: #fff !important; }
  table.stack td::before { content: attr(data-label); color: var(--muted); font-size: 13.5px; }
  table.stack td:first-child { background: var(--dark) !important; color: #fff6e2; grid-template-columns: 1fr; }
  table.stack td:first-child::before { display: none; }
  .contact { grid-template-columns: 1fr; padding: 22px 18px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-art { max-width: 200px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .side, .scrim { transition: none; }
}
@media print {
  .topbar, .side { display: none; }
  .layout { display: block; }
  body { background: #fff; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── RWD 補強（2026-10-20 多寬度實測後）──────────── */
/* 封面主標：寬度不足以單行時，固定在「蘭陽博物館」後換行，避免從中間斷開 */
@media (max-width: 1200px) {
  .cover h1 .bar { display: none; }
  .cover h1 .m-br { display: inline; }
}
.cover h1 { font-size: clamp(24px, 3.4vw, 40px); }
.chapter h2 { font-size: clamp(21px, 6.2vw, 30px); }

/* 點擊範圍：聯絡卡整張可點、抽屜項目加高 */
.contact-grid li { padding: 0; }
.contact-grid a { display: block; padding: 22px 14px 10px; margin-top: -22px; min-height: 44px; }
.contact-grid span { position: relative; z-index: 1; padding: 10px 14px 0; pointer-events: none; }
@media (max-width: 900px) {
  .side li a { padding: 8px 0 8px 18px; }
  .side .gt { padding: 6px 0; }
}

@media (max-width: 700px) {
  .cover h1 { font-size: clamp(24px, 7.4vw, 28px); }
  /* 對照表：標題放上方，避免窄欄斷字 */
  .kv, .kv tbody, .kv tr, .kv th, .kv td { display: block; width: auto; }
  .kv tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .kv tr:last-child { border-bottom: 0; }
  .kv th { background: none; padding: 0 0 2px; border: 0; font-size: 13.5px; border-radius: 0 !important; }
  .kv td { padding: 0; border: 0; }
}

@media (max-width: 480px) {
  /* 封面資訊：一行一筆，標籤在左、內容在右 */
  .meta { grid-template-columns: 1fr; }
  .meta div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; }
  .meta div + div { border-top: 1px dashed #ece3c6; }
  .meta dd { text-align: right; }
  /* 角色卡：改成橫向列表 */
  .chars { grid-template-columns: 1fr; gap: 10px; }
  .char { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 14px; text-align: left; padding: 10px 14px; }
  .char img { width: 64px; margin: 0; }
  .char b { font-size: 16px; }
  .char span { font-size: 13.5px; }
  /* 聯絡卡：縮內距，Email 不斷行 */
  .contact { padding: 20px 14px; }
  .contact-grid a { font-size: clamp(13.5px, 4.3vw, 16px); letter-spacing: 0; overflow-wrap: normal; white-space: nowrap; }
  .calc-out span { font-size: 12.5px; }
}

/* 斷行平衡：短標籤與重點句兩行字數平均，段落避免末行孤字（不支援的瀏覽器維持一般斷行） */
h1, h2, h3, h4, .big, .products b, .opt-fit, .calc-out span, .char span, .idea span, .fee > span:last-child, .steps-mini span, .timeline span, .caption { text-wrap: balance; }
p, li, td, dd { text-wrap: pretty; }
.side-close { width: 40px; height: 40px; }
