/* 首頁 v2：用捲動說故事。色系沿用標誌：墨黑、亞麻、木頭、窗內琥珀光。 */
.serif { font-family: var(--serif); }

/* 首頁頁首改成夜色，與故事舞台接在一起 */
/* 首頁不放公告跑馬燈；頁首浮在鐵捲門上，讓第一屏剛好是整片鐵捲門 */
.home-v2 .site-header { position: fixed; left: 0; right: 0; top: 0; }
.home-v2 #shelf, .home-v2 #how { scroll-margin-top: 72px; }
.home-v2 .site-header { background: rgba(35, 25, 22, .9); color: var(--paper); border-bottom-color: rgba(255, 255, 255, .08) !important; }
.home-v2 .logo-h { color: var(--paper); }
.home-v2 .logo-h .zh { color: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .25); }
.home-v2 .nav a::after { background: var(--glow); }
.home-v2 .icon-btn:hover { border-color: var(--paper); }
.home-v2 .avatar-dot { background: var(--paper); color: var(--ink); }
@media (max-width: 820px) { .home-v2 .nav { background: var(--ink); border-bottom-color: var(--glow); } .home-v2 .nav a { border-color: rgba(255, 255, 255, .12); } }

[data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .8, .2, 1); }
[data-reveal].in { opacity: 1; transform: none; }

/* ===================== 故事舞台 ===================== */
/* 故事區長度＝幾個畫面高；story.js 會換算成固定像素，避免手機網址列伸縮時整頁上下跳 */
.story { position: relative; --screens: 7.6; height: calc(var(--screens) * 100vh); background: var(--ink); }
.story-stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; color: var(--paper);
  background:
    radial-gradient(ellipse 55% 50% at var(--glow-x, 55%) var(--glow-y, 52%), rgba(224, 145, 58, .32), transparent 70%), /* 手機由 story.js 對準 logo */
    radial-gradient(ellipse 80% 70% at 50% 120%, rgba(185, 139, 94, .25), transparent 70%),
    var(--ink);
}
.story-stage::after { /* 紙紋顆粒 */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .07; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
#storyCanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.story-fallback { display: none; }
.no-3d #storyCanvas { display: none; }
.no-3d .story-fallback { display: grid; place-items: center; position: absolute; inset: 0; color: #fff3e2; }
.no-3d .story-fallback svg { width: min(46vw, 420px); height: auto; filter: drop-shadow(0 0 30px rgba(255, 180, 100, .4)); }

/* 序章：鐵捲門 */
.gate { position: absolute; inset: 0; z-index: 6; --open: 0; }
.gate.opened { pointer-events: none; }
.gate.opened .gate-hint { pointer-events: none; visibility: hidden; } /* 鐵捲門拉開後，提示鈕不能再擋住結尾的按鈕 */
.gate-shutter {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .25), transparent 18%, transparent 82%, rgba(0, 0, 0, .35)),
    repeating-linear-gradient(180deg, #3b302a 0 22px, #2a201c 22px 25px, #54463e 25px 26px);
  transform: translateY(calc(var(--open) * -101%));
  box-shadow: 0 10px 0 #18110e, 0 30px 60px rgba(0, 0, 0, .5);
}
.gate-handle { position: absolute; left: 50%; bottom: 26px; width: 90px; height: 10px; margin-left: -45px; border-radius: 5px; background: #7a6a60; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .3); }
.gate-copy {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  opacity: calc(1 - var(--open) * 2.2); transform: translateY(calc(var(--open) * -80px));
}
.gate-title { display: flex; flex-direction: column; font-size: clamp(64px, 13vw, 190px); font-weight: 700; line-height: .86; letter-spacing: .04em; margin: 18px 0 10px; color: #fff3e2; text-shadow: 0 0 40px rgba(255, 170, 90, .25); }
.gate-title span:last-child { -webkit-text-stroke: 2px #fff3e2; color: transparent; }
.gate-zh { font-family: var(--serif); font-size: clamp(20px, 2.6vw, 30px); letter-spacing: .8em; margin: 0 0 0 .8em; font-weight: 700; }
.gate-hint { position: absolute; bottom: 52px; display: flex; flex-direction: column; align-items: center; gap: 10px; font: inherit; font-size: 13px; letter-spacing: .3em; color: rgba(255, 255, 255, .75); margin: 0; padding: 12px 22px; background: none; border: 0; border-radius: 18px; cursor: pointer; pointer-events: auto; transition: background .2s, color .2s; }
.gate-hint small { font-size: 11px; letter-spacing: .14em; color: var(--glow); opacity: .9; }
.gate-hint:hover, .gate-hint:focus-visible { background: rgba(255, 255, 255, .06); color: var(--paper); }
.gate-hint:hover .mouse { border-color: var(--glow); }
.ch-next { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .45); background: rgba(35, 25, 22, .35); color: #fff3e2; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; transition: background .2s, border-color .2s, transform .2s; }
.ch-next span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.ch-next:hover, .ch-next:focus-visible { background: var(--glow); border-color: var(--glow); color: #241307; }
.chapter.on .ch-next { pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .ch-next span { animation: none; } }
.mouse { width: 24px; height: 38px; border: 2px solid rgba(255, 255, 255, .7); border-radius: 12px; position: relative; }
.mouse i { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: var(--glow); animation: wheel 1.6s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }
/* 點擊導覽按鈕的即時回饋：按下縮一下、亮起來、往外擴一圈光 */
[data-go] { -webkit-tap-highlight-color: transparent; }
[data-go]:active { transform: scale(.95); }
[data-go].is-going { animation: goRing .7s ease-out; }
@keyframes goRing { 0% { box-shadow: 0 0 0 0 rgba(242, 160, 70, .6); } 100% { box-shadow: 0 0 0 22px rgba(242, 160, 70, 0); } }
.gate-hint.is-going { color: var(--paper); background: rgba(255, 255, 255, .08); }
.gate-hint.is-going .mouse { border-color: var(--glow); }
.gate-hint.is-going .mouse i { animation: wheel .45s ease-in 2; }
.ch-next.is-going { background: var(--glow); border-color: var(--glow); color: #241307; }
@media (prefers-reduced-motion: reduce) { [data-go].is-going, .gate-hint.is-going .mouse i { animation: none; } }

/* 進度軌 */
.rail { position: absolute; left: 34px; top: 50%; transform: translateY(-50%); z-index: 5; padding: 0 0 0 28px; font-size: 12px; letter-spacing: .2em; color: rgba(255, 255, 255, .38); font-weight: 700; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 44px; }
.rail button { background: none; border: 0; padding: 4px 0; color: inherit; font: inherit; letter-spacing: inherit; cursor: pointer; transition: color .2s; }
.rail button:hover, .rail button:focus-visible { color: var(--paper); }
.rail li { position: relative; transition: color .3s; }
.rail li::before { content: ""; position: absolute; left: -32px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .45); background: var(--ink); transition: all .3s; }
.rail li.on { color: var(--paper); }
.rail li.on::before { background: var(--glow); border-color: var(--glow); box-shadow: 0 0 0 5px rgba(224, 145, 58, .25); }
.rail-line { position: absolute; left: 0; top: 0; bottom: 0; border-left: 1.5px dashed rgba(255, 255, 255, .25); --t: 0; }
.rail-bike { position: absolute; left: -15px; top: calc(var(--t) * 100% - 12px); width: 30px; color: var(--glow); transition: top .1s linear; }
.rail-bike svg { width: 30px; height: 22px; }

/* 章節文字：右側直排大字＋左下說明 */
.chapter { position: absolute; inset: 0; z-index: 3; pointer-events: none; --v: 0; }
.ch-vert {
  position: absolute; right: 6vw; top: 50%; writing-mode: vertical-rl; white-space: nowrap; font-family: var(--serif); font-weight: 900;
  font-size: clamp(60px, 8.2vw, 128px); line-height: 1; letter-spacing: .12em; color: #fff3e2;
  opacity: var(--v); transform: translateY(calc(-50% + (1 - var(--v)) * 60px));
  text-shadow: 0 0 50px rgba(255, 170, 90, .25);
}
.ch-body { position: absolute; left: 8vw; bottom: 11vh; max-width: 360px; opacity: var(--v); transform: translateY(calc((1 - var(--v)) * 30px)); }
.ch-body h2 { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 36px); margin: 14px 0 12px; color: #fff3e2; }
.ch-body p { margin: 0; color: rgba(255, 255, 255, .72); font-size: 16px; line-height: 1.8; }

/* 終幕 */
.finale { position: absolute; left: 0; right: 0; bottom: 9vh; z-index: 4; text-align: center; opacity: var(--v); transform: translateY(calc((1 - var(--v)) * 40px)); pointer-events: none; --v: 0; }
.finale.on { pointer-events: auto; }
.finale-zh { font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 4vw, 54px); letter-spacing: .6em; margin: 0 0 6px .6em; color: #fff3e2; }
.finale-en { margin: 0 0 24px; font-size: 13px; letter-spacing: .3em; color: rgba(255, 255, 255, .6); text-transform: uppercase; }
.finale .hero-actions { justify-content: center; display: flex; gap: 12px; flex-wrap: wrap; }

.ticker.big .ticker-track { font-size: clamp(18px, 2.2vw, 28px); padding: 18px 0; letter-spacing: .14em; }
.ticker.big .ticker-track svg { width: 40px; height: 18px; }
.ticker.big { background: var(--glow); border-color: var(--ink); }

/* ===================== 第五章：洞洞板貨架 ===================== */
.shelf {
  position: relative;
  background-color: #d8c19d;
  background-image: radial-gradient(circle, rgba(35, 25, 22, .42) 2.4px, transparent 3px);
  background-size: 34px 34px;
  border-bottom: var(--stroke) solid var(--ink);
}
.shelf-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; }
.shelf-track { display: flex; align-items: flex-start; gap: 46px; padding: 40px 7vw 60px; will-change: transform; }
.shelf-intro { flex: none; width: 400px; background: var(--paper); border: var(--stroke) solid var(--ink); border-radius: 20px; padding: 32px 30px; box-shadow: 6px 6px 0 var(--ink); position: relative; }
.shelf-intro .v-title { font-family: var(--serif); font-weight: 900; font-size: 64px; line-height: 1.1; writing-mode: vertical-rl; height: 300px; margin: 18px 0 18px auto; letter-spacing: .1em; }
.shelf-intro p { margin: 0 0 16px; color: var(--ink-soft); }
.shelf-count { font-size: 14px; font-weight: 700; }
.shelf-count b { font-size: 30px; margin-right: 4px; }

.peg-item { flex: none; width: 250px; margin-top: var(--drop); position: relative; padding-top: 34px; transform-origin: 50% 0; transform: rotate(var(--tilt)); transition: transform .5s cubic-bezier(.3, 1.6, .5, 1); }
.peg-item:hover { transform: rotate(0deg) translateY(-4px); }
.peg-item:hover .peg-card { animation: swing 1.4s ease-in-out; }
@keyframes swing { 0% { transform: rotate(0); } 20% { transform: rotate(5deg); } 45% { transform: rotate(-3.5deg); } 70% { transform: rotate(1.6deg); } 100% { transform: rotate(0); } }
.peg-hook { position: absolute; top: 0; left: 50%; width: 22px; height: 40px; margin-left: -11px; border: 3px solid var(--ink); border-bottom: 0; border-radius: 12px 12px 0 0; z-index: 2; }
.peg-hook::before { content: ""; position: absolute; left: 50%; top: -9px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--ink); }
.peg-card { display: block; position: relative; background: var(--card); border: var(--stroke) solid var(--ink); border-radius: 18px; box-shadow: 5px 5px 0 var(--ink); transform-origin: 50% -30px; overflow: hidden; }
.peg-card::before { content: ""; position: absolute; top: 10px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #d8c19d; border: var(--stroke) solid var(--ink); z-index: 2; }
.peg-img { display: block; aspect-ratio: 1; background: #fff; border-bottom: var(--stroke) solid var(--ink); }
.peg-img img { width: 100%; height: 100%; object-fit: contain; padding: 28px 18px 14px; }
.peg-tag { display: grid; gap: 2px; padding: 14px 16px 16px; }
.peg-tag small { font-size: 11px; letter-spacing: .24em; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.peg-tag b { font-size: 15px; line-height: 1.35; }
.peg-price { margin-top: 6px; font-weight: 700; font-size: 18px; }
.peg-price s { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.shelf-end { flex: none; align-self: center; width: 260px; display: grid; justify-items: center; gap: 18px; text-align: center; padding: 30px 0; }
.shelf-end-go { display: grid; justify-items: center; gap: 8px; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; border-radius: 24px; }
.shelf-end-go:hover .shelf-end-circle, .shelf-end-go:focus-visible .shelf-end-circle { transform: translateY(4px) scale(1.05); }
.shelf-end-circle.down svg { transform: rotate(90deg); }
.shelf-end-go.is-going .shelf-end-circle { background: var(--glow); color: #241307; box-shadow: 5px 5px 0 var(--ink); }
/* 貨架可拖曳 */
@media (min-width: 821px) {
  .shelf-stage { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
  .shelf-stage.dragging { cursor: grabbing; }
  .shelf-stage.dragging .peg-item { pointer-events: none; }
  .shelf-stage img, .shelf-stage a { -webkit-user-drag: none; }
}
.shelf-end-all { font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.shelf-skip { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .2s, color .2s; }
.shelf-skip span { display: inline-block; animation: nudge 1.6s ease-in-out infinite; }
.shelf-skip:hover, .shelf-skip:focus-visible, .shelf-skip.is-going { background: var(--ink); color: var(--paper); }
.shelf-end-circle { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); box-shadow: 5px 5px 0 var(--glow); transition: transform .3s; }

.shelf-end-circle svg { width: 40px; height: 40px; }
.shelf-end b { font-size: 20px; }
.shelf-end small { color: var(--ink-soft); }

/* ===================== 第六章：路線 ===================== */
.journey { padding: 120px 0 60px; overflow: hidden; }
.journey-head { max-width: 560px; }
.journey-head .h-section { font-family: var(--serif); font-size: clamp(32px, 4.4vw, 58px); font-weight: 900; margin: 14px 0 16px; line-height: 1.2; }
.route { position: relative; max-width: 1040px; margin: 70px auto 0; padding: 30px 0 90px; }
.route-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.route-bg { fill: none; stroke: var(--linen-2); stroke-width: 22; stroke-linecap: round; }
.route-path { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.route-rider { position: absolute; left: 0; top: 0; width: 76px; z-index: 3; color: var(--ink); pointer-events: none; filter: drop-shadow(3px 3px 0 var(--glow)); }
.route-rider svg { width: 100%; height: auto; display: block; }
.stop { position: relative; width: 42%; margin-bottom: 64px; z-index: 2; }
.stop.left { margin-left: 3%; }
.stop.right { margin-left: 55%; }
.stop.left[data-reveal] { transform: translateX(-50px); }
.stop.right[data-reveal] { transform: translateX(50px); }
.stop[data-reveal].in { transform: none; }
.stop-pin { position: absolute; top: -10px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); z-index: 3; transition: background .3s, box-shadow .3s; }
.stop.left .stop-pin { left: -11px; }
.stop.right .stop-pin { right: -11px; }
.stop.reached .stop-pin { background: var(--glow); box-shadow: 0 0 0 7px rgba(224, 145, 58, .25); }
.stop-card { background: var(--card); border: var(--stroke) solid var(--ink); border-radius: 20px; box-shadow: 5px 5px 0 var(--ink); padding: 24px 26px 26px; position: relative; transition: box-shadow .3s, transform .3s; }
.stop.reached .stop-card { box-shadow: 5px 5px 0 var(--glow); }
.stop-ico { position: absolute; right: 22px; top: 20px; width: 56px; height: 42px; color: var(--ink); opacity: .9; }
.stop-ico svg { width: 100%; height: 100%; }
.stop-no { font-family: var(--serif); font-size: 44px; font-weight: 900; line-height: 1; color: var(--glow-deep); }
.stop-card h3 { font-size: 22px; margin: 10px 0 6px; }
.stop-card p { margin: 0; color: var(--ink-soft); }

/* ===================== 第七章：格線版面 ===================== */
.why { background: var(--linen); border-block: var(--stroke) solid var(--ink); }
.why-grid { display: grid; grid-template-columns: 1fr 1.15fr; max-width: 1280px; margin: 0 auto; border-inline: var(--stroke) solid var(--ink); }
.why-frame { padding: 64px 48px; border-right: var(--stroke) solid var(--ink); position: relative; }
.why-frame .h-section { font-family: var(--serif); font-weight: 900; font-size: clamp(34px, 4vw, 56px); margin-top: 14px; }
.frame-hang { position: relative; width: 300px; margin: 60px auto 0; padding-top: 70px; transform-origin: 50% 0; animation: hang 6s ease-in-out infinite; }
@keyframes hang { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
.frame-hang .nail { position: absolute; left: 50%; top: 0; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--ink); }
.frame-hang::before, .frame-hang::after { content: ""; position: absolute; top: 6px; width: 1.5px; height: 104px; background: var(--ink); }
.frame-hang::before { left: 50%; transform-origin: top; transform: rotate(52deg); }
.frame-hang::after { left: 50%; transform-origin: top; transform: rotate(-52deg); }
.frame { display: block; position: relative; z-index: 1; border: 14px solid var(--wood); outline: var(--stroke) solid var(--ink); box-shadow: 6px 6px 0 var(--ink); background: var(--ink); padding: 26px; }
.frame-inner { display: block; color: #fff3e2; }
.frame-inner svg { width: 100%; height: auto; display: block; }
.why-list { list-style: none; margin: 0; padding: 0; }
.why-list li { display: grid; grid-template-columns: 96px 1fr; gap: 22px; align-items: center; padding: 34px 44px; border-bottom: var(--stroke) solid var(--ink); }
.why-list li:last-child { border-bottom: 0; }
.why-list li:nth-child(odd) { background: var(--paper); }
.why-ico { width: 96px; height: 70px; color: var(--ink); }
.why-ico svg { width: 100%; height: 100%; }
.why-list h3 { font-family: var(--serif); font-size: 26px; font-weight: 900; }
.why-list p { margin: 6px 0 0; color: var(--ink-soft); }
.draw svg * { stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); transition: stroke-dashoffset 1.8s cubic-bezier(.6, 0, .2, 1) .2s; }
.in .draw svg *, .draw.in svg * { stroke-dashoffset: 0; }

/* ===================== 終章：明信片 ===================== */
.postcard {
  display: grid; grid-template-columns: 1fr 1fr; background: #fffaf1; border: var(--stroke) solid var(--ink); border-radius: 8px;
  box-shadow: 10px 10px 0 var(--ink); max-width: 1040px; margin: 30px auto; position: relative;
}
.postcard[data-reveal] { transform: translateY(40px) rotate(-2.5deg); }
.postcard[data-reveal].in { transform: rotate(-1deg); }
.postcard[data-reveal].in:hover { transform: rotate(0deg); transition-duration: .4s; }
.postcard-left { padding: 52px 46px; }
.postcard-left h2 { font-family: var(--serif); font-weight: 900; font-size: clamp(28px, 3vw, 40px); margin: 16px 0 14px; line-height: 1.3; }
.postcard-left p { color: var(--ink-soft); margin: 0; }
.postcard-right { padding: 52px 46px 46px; border-left: 2px dashed var(--line); position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; min-height: 340px; }
.stamp { position: absolute; top: 26px; right: 30px; width: 96px; height: 116px; background: var(--paper); padding: 10px 8px 6px; color: var(--ink); text-align: center; display: grid; align-content: center; gap: 6px;
  -webkit-mask: radial-gradient(circle 4px at 4px 4px, transparent 98%, #000) -4px -4px / 12px 12px; mask: radial-gradient(circle 4px at 4px 4px, transparent 98%, #000) -4px -4px / 12px 12px;
  outline: 0; box-shadow: inset 0 0 0 5px var(--paper), inset 0 0 0 6.5px var(--ink); transform: rotate(4deg); }
.stamp svg { width: 70px; height: auto; margin: 0 auto; }
.stamp small { font-size: 8px; letter-spacing: .16em; font-weight: 700; }
.postmark { position: absolute; top: 58px; right: 96px; width: 92px; height: 92px; border-radius: 50%; border: 2px solid rgba(184, 106, 29, .55); color: rgba(184, 106, 29, .7); display: grid; place-items: center; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .2em; line-height: 1.5; transform: rotate(-14deg); }
.pc-line { display: grid; grid-template-columns: 54px 1fr; align-items: end; gap: 10px; border-bottom: 1.5px dashed var(--ink); padding-bottom: 8px; }
.pc-line span { font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--muted); }
.pc-line input { border: 0; background: transparent; outline: 0; padding: 4px 0; min-width: 0; }
.postcard-right .btn { align-self: flex-start; margin-top: 6px; }

/* ===================== 手機 ===================== */
@media (max-width: 820px) {
  .story { --screens: 6.8; }
  .rail { left: 14px; font-size: 0; padding-left: 14px; }
  .rail ol { gap: 30px; }
  .rail button { width: 20px; height: 20px; margin-left: -24px; padding: 0; }
  .rail li::before { left: -18px; }
  .rail-bike { display: none; }
  .ch-vert { right: 5vw; top: 22%; transform: translateY(calc((1 - var(--v)) * 40px)); font-size: clamp(46px, 13vw, 64px); }
  .ch-body { left: 16px; right: 16px; bottom: 6vh; max-width: none; padding: 18px; background: rgba(35, 25, 22, .72); border: 1px solid rgba(255, 255, 255, .15); border-radius: 16px; backdrop-filter: blur(6px); }
  .ch-body p { font-size: 15px; }
  .gate-zh { letter-spacing: .5em; }
  .gate-hint { bottom: 36px; }
  .finale { bottom: 7vh; padding: 0 16px; }
  .finale-zh { letter-spacing: .3em; margin-left: .3em; }

  .shelf-stage { position: static; height: auto; overflow-x: auto; display: block; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
  .shelf-track { padding: 34px 16px 44px; gap: 22px; transform: none !important; width: max-content; }
  .shelf-intro { width: 280px; padding: 24px 22px; scroll-snap-align: start; }
  .shelf-intro .v-title { font-size: 44px; height: 210px; }
  .peg-item { width: 210px; scroll-snap-align: center; }
  .shelf-end { width: 180px; }

  .journey { padding: 80px 0 30px; }
  .route { margin-top: 40px; padding-left: 0; }
  .stop, .stop.left, .stop.right { width: auto; margin-left: 42px; margin-bottom: 40px; }
  .stop.left .stop-pin, .stop.right .stop-pin { left: -33px; right: auto; top: 22px; }
  .route-rider { width: 52px; }
  .stop-ico { width: 44px; height: 34px; }

  .why-grid { grid-template-columns: 1fr; border-inline: 0; }
  .why-frame { border-right: 0; border-bottom: var(--stroke) solid var(--ink); padding: 48px 20px; }
  .frame-hang { width: 230px; }
  .why-list li { grid-template-columns: 64px 1fr; padding: 26px 20px; gap: 16px; }
  .why-ico { width: 64px; height: 48px; }

  .postcard { grid-template-columns: 1fr; box-shadow: 6px 6px 0 var(--ink); }
  .postcard-left { padding: 34px 24px 10px; }
  .postcard-right { border-left: 0; border-top: 2px dashed var(--line); padding: 150px 24px 30px; min-height: 0; }
  .stamp { top: 24px; right: 22px; }
  .postmark { top: 40px; right: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  .announce-track, .ticker-track, .frame-hang, .mouse i { animation: none; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ===================== 非直排語言（英／韓／泰／西）=====================
   不用直排大字，改把章節標題句放大，避開中央的 logo */
.horiz .ch-vert { display: none; }
.horiz .ch-body { max-width: 380px; bottom: 9vh; }
.horiz .ch-body h2 { font-size: clamp(30px, 3vw, 44px); line-height: 1.12; font-weight: 900; text-shadow: 0 0 40px rgba(255, 170, 90, .25); }
.horiz .shelf-intro .v-title { writing-mode: horizontal-tb; height: auto; margin: 16px 0; font-size: 46px; line-height: 1.08; letter-spacing: 0; }
.horiz .gate-zh, .horiz .finale-zh { font-family: "Noto Serif TC", serif; }
.lang-th .ch-body h2, .lang-th .why-list h3, .lang-th .journey-head .h-section { letter-spacing: 0; line-height: 1.3; }
@media (max-width: 820px) {
  .horiz .ch-body h2 { font-size: clamp(26px, 7.6vw, 34px); }
  .horiz .shelf-intro .v-title { font-size: 34px; }
}
.shelf-intro .shelf-skip { display: flex; width: fit-content; }
.shelf-head { display: none; }

/* 手機版進度軌：圓點維持小小的，但點擊範圍放大到 36px */
@media (max-width: 820px) {
  .rail ol { gap: 16px; }
  .rail button { width: 36px; height: 36px; margin-left: -32px; }
}

/* 結尾標語：手機上英文與在地語言各一行，不會剩一個字掉到下一行 */
@media (max-width: 820px) {
  .finale-en { letter-spacing: .2em; line-height: 1.9; }
  .finale-en span { display: block; }
  .finale-en .sep { display: none; }
}

/* ===================== 手機留白統一 =====================
   左右一律 20px 邊界（和頁首一致），卡片陰影收在邊界內；字級、圖示、陰影都比桌機收一級，
   區塊上下留白統一，畫面不再被大字和粗框塞滿 */
@media (max-width: 820px) {
  .ch-body { left: 20px; right: 20px; padding: 16px 18px 18px; }
  .ch-body h2 { font-size: 24px; margin: 10px 0 8px; }
  .ch-body p { font-size: 14.5px; line-height: 1.75; }
  .ch-vert { font-size: clamp(42px, 12vw, 58px); letter-spacing: .08em; transform: translateY(calc((1 - var(--v)) * 30px)); }

  /* 第五章：說明在上、貨架在下 */
  .shelf-head-title { font-family: var(--serif); font-weight: 900; font-size: 30px; line-height: 1.2; margin: 12px 0 10px; }
  .shelf-head p { margin: 0; font-size: 15px; line-height: 1.75; color: var(--ink-soft); }
  .shelf-head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
  .shelf-head .shelf-skip { margin-top: 0; height: auto; min-height: 38px; padding: 8px 16px; font-size: 12.5px; line-height: 1.35; text-align: left; }
  .shelf-head { display: block; padding: 22px 20px 20px; margin: 0 20px; background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); }
  .shelf { padding-top: 32px; } /* 用 padding 而不是卡片的 margin，避免邊界重疊後卡片貼齊頁首 */
  .shelf-intro { display: none; }
  .shelf-stage { scroll-padding-inline: 20px; }
  .shelf-track { padding: 18px 20px 40px; gap: 18px; }
  .peg-item { width: min(62vw, 240px); scroll-snap-align: start; padding-top: 30px; }
  .peg-item:nth-child(n) { margin-top: calc(var(--drop) * .5); }
  .peg-card { border-width: 2px; border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); }
  .peg-img img { padding: 26px 14px 10px; }
  .peg-tag { padding: 12px 14px 14px; }
  .peg-tag b { font-size: 14px; }
  .peg-price { font-size: 16px; margin-top: 4px; }
  .shelf-end { width: 170px; padding: 20px 0; }
  .shelf-end-circle { width: 88px; height: 88px; box-shadow: 4px 4px 0 var(--glow); }
  .shelf-end-circle svg { width: 30px; height: 30px; }
  .shelf-end b { font-size: 17px; }

  /* 第六章：路線 */
  .journey { padding: 64px 0 16px; }
  .journey-head .h-section { font-size: 28px; margin: 12px 0 12px; }
  .journey-head .lead { font-size: 15px; line-height: 1.75; }
  .route { margin-top: 28px; padding: 16px 0 40px; }
  .route-bg { stroke-width: 12; }
  .route-path { stroke-width: 2.5; }
  .route-rider { width: 44px; }
  .stop, .stop.left, .stop.right { margin-left: 40px; margin-bottom: 22px; }
  .stop.left .stop-pin, .stop.right .stop-pin { left: -30px; width: 18px; height: 18px; top: 20px; border-width: 2.5px; }
  .stop-card { border-width: 2px; border-radius: 16px; box-shadow: 4px 4px 0 var(--ink); padding: 16px 18px 18px; margin-right: 4px; }
  .stop.reached .stop-card { box-shadow: 4px 4px 0 var(--glow); }
  .stop-no { font-size: 30px; }
  .stop-ico { width: 36px; height: 28px; right: 16px; top: 16px; }
  .stop-card h3 { font-size: 18px; margin: 6px 0 4px; }
  .stop-card p { font-size: 14.5px; line-height: 1.7; }

  /* 第七章 */
  .why-frame { padding: 56px 20px 48px; }
  .why-frame .h-section { font-size: 28px; }
  .frame-hang { width: 180px; margin-top: 28px; padding-top: 54px; }
  .frame-hang::before, .frame-hang::after { height: 80px; }
  .frame { border-width: 10px; padding: 16px; box-shadow: 4px 4px 0 var(--ink); }
  .why-list li { grid-template-columns: 48px 1fr; gap: 16px; padding: 22px 20px; }
  .why-ico { width: 48px; height: 38px; }
  .why-list h3 { font-size: 19px; }
  .why-list p { font-size: 14.5px; line-height: 1.7; margin-top: 4px; }

  /* 終章：明信片 */
  .section.tight { padding: 48px 0 56px; }
  .postcard { margin: 0 4px 0 0; box-shadow: 4px 4px 0 var(--ink); }
  .postcard[data-reveal] { transform: translateY(30px) rotate(-1deg); }
  .postcard[data-reveal].in, .postcard[data-reveal].in:hover { transform: rotate(-.5deg); }
  .postcard-left { padding: 26px 20px 6px; }
  .postcard-left h2 { font-size: 23px; margin: 12px 0 10px; }
  .postcard-left p { font-size: 14.5px; line-height: 1.75; }
  .postcard-right { padding: 118px 20px 22px; gap: 14px; }
  .stamp { top: 20px; right: 18px; width: 74px; height: 90px; }
  .stamp svg { width: 52px; }
  .postmark { top: 30px; right: 86px; width: 70px; height: 70px; font-size: 9px; }
  .pc-line { grid-template-columns: 44px 1fr; }
}
