/* =====================================================================
   layouts.css — L1..L14 + components. Mobile-first.
   Animations are driven by JS (GSAP); CSS here = static layout + CSS-only fx.
   ===================================================================== */

/* ---------- L1 cover ---------- */
.L1 { min-height: 100svh; display: grid; align-items: end; padding: 0 !important; overflow: hidden; color: #fff; isolation: isolate; perspective: 1600px; }
.L1-media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.L1-media .pic img { transform: scale(1.08); }
.L1-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.72) 100%); }
.L1-inner { padding: 0 var(--gutter) calc(110px + env(safe-area-inset-bottom)); max-width: 1200px; }
.L1-kicker { font-family: var(--f-data); font-size: 12px; letter-spacing: .24em; margin-bottom: 14px; }
.L1-title { font-family: var(--f-en); font-size: clamp(40px, calc((100vw - 2 * var(--gutter)) / (var(--len, 9) * 1)), 220px); line-height: .86; letter-spacing: -.035em; font-weight: 900; overflow-wrap: anywhere; }
.L1-sub { font-size: clamp(18px, 4.6vw, 30px); margin-top: 18px; font-weight: 700; min-height: 1.5em; }
.L1-meta { font-family: var(--f-data); font-size: 13px; opacity: .8; }
.scroll-cue { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; color: #fff; text-decoration: none; font-size: 13px; letter-spacing: .1em; }
.scroll-cue i { width: 22px; height: 36px; border: 2px solid #fff; border-radius: 12px; position: relative; }
.scroll-cue i::after { content: ""; position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cue 1.6s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(10px); opacity: .3; } }
.L1-shards i { position: absolute; z-index: -1; mix-blend-mode: multiply; opacity: .9; }
.L1-shards i:nth-child(1) { left: 0; top: 0; width: 46vw; height: 30vh; background: var(--accent); clip-path: polygon(0 0, 100% 0, 0 100%); }
.L1-shards i:nth-child(2) { right: 0; bottom: 18vh; width: 30vw; height: 30vw; background: #B8442E; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.L1-shards i:nth-child(3) { right: 12vw; top: 14vh; width: 14vw; height: 14vw; background: var(--play); clip-path: polygon(50% 0, 100% 100%, 0 100%); mix-blend-mode: screen; }
.book-cover { display: none; }
.js .book-cover { display: block; position: absolute; inset: 0; z-index: 5; transform-origin: 0 50%; transform-style: preserve-3d; pointer-events: none; }
html.quiet .book-cover, html.reduced .book-cover { display: none !important; }
.bc-face { position: absolute; inset: 0; display: grid; align-content: center; justify-items: start; gap: 12px; padding: 0 var(--gutter); backface-visibility: hidden; box-shadow: inset -30px 0 60px rgba(0,0,0,.25); }
.bc-spine { position: absolute; left: 0; top: 0; bottom: 0; width: 18px; background: linear-gradient(90deg, rgba(0,0,0,.35), transparent); }

/* ---------- C-open (chapter opener) ---------- */
.C-open { min-height: 92svh; padding: calc(var(--topbar-h) + 48px) var(--gutter) 64px; display: grid; align-content: center; overflow: hidden; isolation: isolate; }
.open-no { font-family: var(--f-data); font-weight: 700; display: flex; align-items: baseline; gap: 6px; margin: 0; }
.open-no span { font-size: 22px; } .open-no b { font-size: clamp(64px, 18vw, 150px); line-height: .9; letter-spacing: -.04em; } .open-no small { font-size: 18px; opacity: .5; }
.open-date { font-family: var(--f-data); letter-spacing: .12em; font-size: 13px; margin: 6px 0 22px; }
.open-big { white-space: nowrap; font-family: var(--f-en); font-weight: 900; font-size: clamp(28px, calc((100vw - 2 * var(--gutter)) / (var(--len, 6) * 1)), 230px); line-height: .88; letter-spacing: -.04em; color: var(--accent); overflow-wrap: anywhere; word-break: break-word; }
.open-big span { display: inline-block; }
.open-bigm { font-family: var(--f-cs); font-style: italic; font-size: 20px; margin: 8px 0 0; opacity: .7; }
.open-title { font-size: clamp(30px, 7.5vw, 76px); margin-top: 24px; max-width: 14em; }
.open-kicker { margin-top: 18px; font-size: 18px; max-width: 34em; color: var(--ink-2); }
.open-items { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.open-items li { display: inline-flex; gap: 8px; align-items: baseline; border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.open-items i { font-family: var(--f-cs); font-size: 16px; }
.caron { position: absolute; right: -4vw; top: 8vh; font-family: var(--f-serif); font-size: 46vw; line-height: 1; color: var(--accent); opacity: .16; z-index: -1; pointer-events: none; }
.open-shards { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.open-shards i { position: absolute; display: block; }

/* ---------- C-act (act interlude, 3D page) ---------- */
.C-act { padding: 0 !important; min-height: 100svh; perspective: 1800px; }
.act-stage { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; background: var(--act); color: #fff; }
.act-under { padding: 0 var(--gutter); text-align: center; z-index: 1; }
.act-roman { font-family: var(--f-data); letter-spacing: .4em; font-size: 14px; margin-bottom: 10px; }
.act-title { font-size: clamp(34px, 9vw, 100px); }
.act-en { font-family: var(--f-cs); font-style: italic; font-size: clamp(20px, 4vw, 34px); margin-top: 10px; }
.act-line { margin-top: 18px; font-size: 18px; opacity: .9; }
.act-page { display: none; }
.js .act-page { display: block; position: absolute; inset: 0; z-index: 2; transform-origin: 0 50%; transform-style: preserve-3d; }
html.quiet .act-page, html.reduced .act-page { display: none !important; }
.act-front, .act-back { position: absolute; inset: 0; backface-visibility: hidden; }
.act-front { background: var(--bg); color: var(--ink); display: grid; place-content: center; justify-items: center; box-shadow: inset -40px 0 80px rgba(0,0,0,.18); }
.act-front span { font-size: 22px; letter-spacing: .3em; }
.act-front b { font-family: var(--f-en); font-size: clamp(120px, 40vw, 360px); line-height: .9; color: var(--act); }
.act-back { transform: rotateY(180deg); background: var(--act-2); }

/* ---------- L3 full bleed ---------- */
.L3 { min-height: 110svh; padding: 0 !important; display: grid; align-items: center; overflow: hidden; color: #fff; isolation: isolate; }
.L3-media { position: absolute; inset: -8% 0; z-index: -2; }
.L3::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.45) 70%, rgba(0,0,0,.65)); }
.L3-deco { position: absolute; left: -2vw; bottom: 4vh; font-family: var(--f-en); font-weight: 900; font-size: 28vw; line-height: .8; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.55); z-index: -1; white-space: nowrap; pointer-events: none; letter-spacing: -.04em; }
.L3-text { padding: 20vh var(--gutter); max-width: 1100px; }
.L3-eyebrow { font-family: var(--f-data); letter-spacing: .24em; font-size: 12px; }
.L3-head { font-size: clamp(40px, 11vw, 140px); line-height: .98; letter-spacing: -.02em; mix-blend-mode: difference; color: #fff; }
.L3-sub { margin-top: 22px; font-size: clamp(16px, 2.2vw, 20px); max-width: 34em; text-shadow: 0 1px 12px rgba(0,0,0,.5); }

/* ---------- L4 spread ---------- */
.L4 { display: grid; padding-inline: 0 !important; }
.L4-img { position: sticky; top: 0; height: 78svh; overflow: hidden; z-index: 0; }
.L4-spine { display: none; }
.L4-text { position: relative; z-index: 1; margin: -18svh var(--gutter) 0; padding: 28px 22px; background: var(--bg); border-radius: 6px; box-shadow: 0 30px 60px -30px rgba(0,0,0,.4); }
.L4-head { font-size: clamp(30px, 6vw, 60px); margin-bottom: 14px; }
.L4-cs { font-family: var(--f-cs); font-style: italic; font-size: clamp(24px, 4vw, 40px); color: var(--accent-2); margin: 0 0 18px; }
.L4-so { font-weight: 700; border-left: 4px solid var(--accent); padding-left: 14px; }
@media (min-width: 900px) {
  .L4 { grid-template-columns: 1fr 1fr; align-items: stretch; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--gutter) !important; }
  .L4-img { position: relative; height: auto; min-height: 80vh; border-radius: 6px 0 0 6px; }
  .L4-spine { display: block; position: absolute; left: 50%; top: clamp(64px, 12vw, 140px); bottom: clamp(64px, 12vw, 140px); width: 60px; margin-left: -30px; z-index: 2; background: linear-gradient(90deg, transparent, rgba(0,0,0,.22) 48%, rgba(255,255,255,.18) 52%, transparent); pointer-events: none; }
  .L4-text { margin: 0; padding: 64px 56px; border-radius: 0 6px 6px 0; display: grid; align-content: center; box-shadow: none; background: var(--paper); }
  .L4.flip .L4-img { order: 2; border-radius: 0 6px 6px 0; }
  .L4.flip .L4-text { border-radius: 6px 0 0 6px; }
}

/* ---------- L5 collage ---------- */
.L5-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 22vw; gap: 8px; padding: 0 var(--gutter); max-width: var(--maxw); margin: 0 auto; }
.L5-cell { display: block; padding: 0; border: 0; background: none; position: relative; grid-column: span 2; grid-row: span 2; border-radius: 4px; overflow: hidden; }
.L5-cell .pic { position: absolute; inset: 0; border-radius: 4px; }
.L5-cell:hover .pic img { transform: scale(1.05); }
.L5-cell .pic img { transition: transform .6s var(--ease); }
.L5-cell.c0 { grid-column: span 4; grid-row: span 3; }
.L5-cell.c3 { grid-row: span 3; }
.L5-cell.c5 { grid-column: span 4; }
@media (min-width: 900px) {
  .L5-grid { grid-template-columns: repeat(12, 1fr); grid-auto-rows: 7vw; gap: 14px; }
  .L5-cell { grid-column: span 4; grid-row: span 3; }
  .L5-cell.c0 { grid-column: span 7; grid-row: span 5; }
  .L5-cell.c1 { grid-column: span 5; grid-row: span 3; }
  .L5-cell.c2 { grid-column: span 5; grid-row: span 2; }
  .L5-cell.c3 { grid-column: span 3; grid-row: span 4; }
  .L5-cell.c4 { grid-column: span 5; grid-row: span 4; }
  .L5-cell.c5 { grid-column: span 4; grid-row: span 4; }
  .L5-cell.c6, .L5-cell.c7, .L5-cell.c8 { grid-column: span 4; grid-row: span 3; }
  .L5.n3 .L5-cell.c1, .L5.n3 .L5-cell.c2 { grid-column: span 5; grid-row: span 5; }
  .L5.n3 .L5-cell.c0 { grid-column: span 7; grid-row: span 10; }
  .L5.n3 .L5-cell.c2 { grid-row: span 5; }
}
.L5.n3 .L5-cell.c0 { grid-column: span 4; grid-row: span 3; }
.filmstrip { margin-top: 36px; overflow: hidden; background: #0d0b0a; padding: 14px 0; position: relative; }
.filmstrip::before, .filmstrip::after { content: ""; position: absolute; left: 0; right: 0; height: 8px; background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(243,235,221,.55) 10px 18px); }
.filmstrip::before { top: 3px; } .filmstrip::after { bottom: 3px; }
.film-track { display: flex; gap: 8px; width: max-content; animation: film 40s linear infinite; }
.film-track img { width: 160px; height: 107px; object-fit: cover; filter: sepia(.3) contrast(1.05); }
.filmstrip:hover .film-track, .filmstrip:active .film-track { animation-play-state: paused; }
@keyframes film { to { transform: translateX(-50%); } }

/* ---------- L6 road ---------- */
.L6 { padding-inline: 0 !important; }
.L6-pin { position: relative; }
.L6-hud { padding: 0 var(--gutter); }
.L6-title { font-size: clamp(28px, 6vw, 56px); }
.L6-km { font-family: var(--f-data); display: flex; align-items: baseline; gap: 8px; margin: 10px 0 0; }
.L6-km b { font-size: clamp(56px, 14vw, 120px); line-height: 1; letter-spacing: -.04em; color: var(--accent); }
.L6-km small { opacity: .5; }
.L6-viewport { min-width: 0; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 24px 0 18px; scrollbar-width: thin; }
.L6-track { position: relative; display: inline-flex; flex-direction: column; min-width: 100%; }
.L6-road { position: absolute; left: 0; right: 0; top: 50%; height: 120px; width: 100%; transform: translateY(-50%); z-index: 0; overflow: visible; }
.road-base { fill: none; stroke: var(--ink); stroke-width: 22; opacity: .12; stroke-linecap: round; }
.road-line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-dasharray: 14 12; }
.L6-stops { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0 var(--gutter); display: flex; gap: 16px; }
.L6-stop { scroll-snap-align: center; flex: 0 0 auto; }
.stop-card { width: min(72vw, 320px); background: var(--paper); color: var(--ink); border-radius: 8px; overflow: hidden; box-shadow: 0 20px 40px -24px rgba(0,0,0,.45); padding-bottom: 16px; }
.stop-card .pic { aspect-ratio: 4 / 3; border-radius: 0; }
.stop-km, .stop-name, .stop-zh, .stop-card-t { padding: 0 16px; }
.stop-km { font-family: var(--f-data); margin: 12px 0 0; font-size: 14px; } .stop-km b { font-size: 26px; color: var(--accent-2); }
.stop-name { font-family: var(--f-cs); font-weight: 400; font-size: 28px; }
.stop-zh { font-size: 13px; color: var(--ink-2); margin: 0 0 8px; }
.stop-card-t { font-size: 15px; margin: 0; }
.L6-car { position: absolute; left: var(--gutter); bottom: 8px; width: 46px; z-index: 3; display: none; }
.L6-car svg { fill: var(--accent-2); }
.L6-note { padding: 18px var(--gutter) 0; font-size: 13px; color: var(--ink-2); }
@media (min-width: 900px) {
  .js:not(.quiet):not(.reduced) .L6.pinned .L6-viewport { overflow: hidden; scroll-snap-type: none; min-width: 0; width: 100%; }
  .js:not(.quiet):not(.reduced) .L6.pinned .L6-pin { height: 100svh; display: grid; grid-template-rows: auto 1fr; padding-top: calc(var(--topbar-h) + 24px); overflow: hidden; }
  .js:not(.quiet):not(.reduced) .L6.pinned .L6-car { display: block; }
  .L6-stops { gap: 40px; padding-right: 30vw; }
  .L6-stop:nth-child(even) { margin-top: 90px; }
}

/* ---------- L7 quote ---------- */
.L7 { min-height: 90svh; display: grid; place-items: center; overflow: hidden; isolation: isolate; }
.L7-bg { position: absolute; inset: 0; z-index: -1; opacity: .16; filter: grayscale(1); }
.L7-quote { margin: 0; padding: 0 var(--gutter); max-width: 1100px; text-align: center; }
.L7-quote p { font-family: var(--f-serif); font-weight: 700; font-size: clamp(30px, 7vw, 82px); line-height: 1.3; }
.L7-quote footer { font-size: 14px; color: var(--ink-2); }

/* ---------- L8 timeline ---------- */
.L8-wrap { position: relative; max-width: 860px; margin: 0 auto; }
.L8-line { list-style: none; margin: 0; padding: 0 var(--gutter) 0 calc(var(--gutter) + 34px); position: relative; }
.L8-wrap::before { content: ""; position: absolute; left: calc(var(--gutter) + 10px); top: 0; bottom: 0; width: 4px; background: var(--line); border-radius: 2px; }
.L8-fill { position: absolute; z-index: 1; left: calc(var(--gutter) + 10px); top: 0; bottom: 0; width: 4px; background: var(--line); border-radius: 2px; }
.L8-fill { background: var(--accent); transform-origin: 50% 0; transform: scaleY(var(--fill, 1)); }
.L8-node { position: relative; padding-bottom: 46px; }
.L8-dot { position: absolute; left: -32px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 4px solid var(--accent); }
.L8-time { font-family: var(--f-data); font-weight: 700; font-size: 22px; }
.L8-body h3 { font-size: 22px; margin: 4px 0 6px; }
.L8-body .pic { margin-top: 12px; aspect-ratio: 16 / 9; max-width: 420px; }

/* ---------- L9 fact cards ---------- */
.L9-deck { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px var(--gutter) 28px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.fcard { flex: 0 0 auto; width: min(80vw, 340px); scroll-snap-align: center; perspective: 1200px; }
.fcard-inner { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.fcard-front, .fcard-back { display: grid; border-radius: 16px; padding: 22px; min-height: 420px; }
.fcard-front { container-type: inline-size; background: var(--card, var(--accent)); color: var(--on-card, #111); align-content: space-between; position: relative; overflow: hidden; }
.fcard-no { font-family: var(--f-data); font-size: 12px; letter-spacing: .2em; }
.fcard-cs { font-family: var(--f-en); font-weight: 900; font-size: 38px; font-size: clamp(26px, calc(100cqi / (var(--len, 5) * 1.02)), 64px); line-height: .9; letter-spacing: -.03em; overflow-wrap: anywhere; }
.fcard-csm { font-family: var(--f-cs); font-style: italic; font-size: 18px; }
.fcard-q { font-size: 26px; font-weight: 900; line-height: 1.25; }
.fcard-hint { font-family: var(--f-data); font-size: 11px; letter-spacing: .2em; justify-self: end; background: var(--play); color: #fff; padding: 6px 10px; border-radius: 999px; }
.fcard-back { background: var(--ink); color: var(--bg); font-family: var(--f-serif); font-size: 17px; line-height: 1.8; align-content: center; position: relative; overflow: hidden; margin-top: 10px; }
.fcard-back-cs { position: absolute; right: -10px; bottom: -14px; font-family: var(--f-en); font-weight: 900; font-size: 80px; opacity: .08; line-height: 1; }
.js .fcard-back { position: absolute; inset: 0; margin: 0; transform: rotateY(180deg); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.js .fcard-front { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.js .fcard.flipped .fcard-inner { transform: rotateY(180deg); }
.js.quiet .fcard-inner, .js.reduced .fcard-inner { transform: none !important; }
.js.quiet .fcard-back, .js.reduced .fcard-back { position: relative; transform: none; display: none; margin-top: 10px; }
.js.quiet .fcard.flipped .fcard-back, .js.reduced .fcard.flipped .fcard-back { display: grid; }
.fcard-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 4px; font-size: 13px; font-family: var(--f-data); }
.fcard-foot .save { border: 1.5px solid var(--play); color: var(--play); background: none; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.orloj { display: block; position: absolute; right: 14px; top: 14px; width: 64px; height: 64px; border-radius: 50%; border: 3px solid #111; background: radial-gradient(circle, #1F5A7A 0 38%, #D99A2B 39% 62%, #B8442E 63%); }
.o-ring { position: absolute; inset: 8px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.7); animation: spin 60s linear infinite; }
.o-hand { position: absolute; left: 50%; bottom: 50%; width: 3px; margin-left: -1.5px; background: #111; transform-origin: 50% 100%; border-radius: 2px; }
.o-hand.h { height: 15px; animation: spin 43200s linear infinite; transform: rotate(var(--h0, 0deg)); }
.o-hand.m { height: 23px; animation: spin 3600s linear infinite; }
.o-sun { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #F5D76E; left: 50%; top: 8px; margin-left: -6px; box-shadow: 0 0 10px #F5D76E; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- L10 stats ---------- */
.L10-grid { list-style: none; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; max-width: var(--maxw); }
.stat { border: 2px solid var(--ink); border-radius: 14px; padding: 18px 16px; background: var(--paper); }
.stat-ico svg { width: 30px; height: 30px; fill: none; stroke: var(--accent-2); stroke-width: 1.7; stroke-linejoin: round; }
.stat-num { font-family: var(--f-data); margin: 10px 0 0; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.stat-num b { font-size: clamp(38px, 10vw, 72px); line-height: 1; letter-spacing: -.03em; }
.stat-unit { font-size: 16px; }
.stat-label { font-size: 14px; margin: 6px 0 0; color: var(--ink-2); }
.stat-more summary, .rc-more summary { cursor: pointer; font-size: 12px; font-family: var(--f-data); color: var(--play); margin-top: 6px; }
.stat-more p, .rc-more p { font-size: 13px; margin: 6px 0 0; }
@media (min-width: 900px) { .L10-grid { grid-template-columns: repeat(4, 1fr); } }
.heat { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; padding: 0 var(--gutter); max-width: 960px; margin: 28px auto 0; }
.heat-cell { aspect-ratio: 1 / 2; border-radius: 4px; background: color-mix(in srgb, var(--accent) calc(var(--v) * 100%), var(--bg-2)); display: grid; align-items: end; justify-items: center; font: 10px/1 var(--f-data); padding-bottom: 4px; }
.heat-cell.future { background: repeating-linear-gradient(45deg, var(--bg-2) 0 4px, transparent 4px 8px); outline: 1px dashed var(--line); }
.heat-cap { text-align: center; font-size: 12px; color: var(--ink-2); margin-top: 8px; padding: 0 var(--gutter); }

/* ---------- L11 polaroids ---------- */
.L11-table { position: relative; margin: 0 auto; max-width: 1100px; min-height: 120vw; padding: 0 var(--gutter); }
.polaroid { position: absolute; width: min(56vw, 280px); margin: 0; background: #fbf8f1; padding: 10px 10px 46px; box-shadow: 0 18px 30px -12px rgba(0,0,0,.6); transform: rotate(var(--r)); touch-action: pan-y; cursor: grab; }
.polaroid .pic { aspect-ratio: 1 / 1; border-radius: 0; }
.polaroid figcaption { position: absolute; left: 12px; right: 12px; bottom: 10px; color: #2a2a2a; font-size: 15px; line-height: 1.3; text-align: center; }
.polaroid:nth-child(1) { left: 4%; top: 0; } .polaroid:nth-child(2) { right: 4%; top: 12%; } .polaroid:nth-child(3) { left: 10%; top: 34%; }
.polaroid:nth-child(4) { right: 8%; top: 50%; } .polaroid:nth-child(5) { left: 22%; top: 64%; } .polaroid:nth-child(6) { right: 18%; top: 76%; } .polaroid:nth-child(7) { left: 2%; top: 82%; }
.polaroid.top { z-index: 10; }
@media (min-width: 900px) { .L11-table { min-height: 760px; } .polaroid { width: 280px; } .polaroid:nth-child(2) { top: 6%; } .polaroid:nth-child(3) { left: 36%; top: 2%; } .polaroid:nth-child(4) { right: 4%; top: 42%; } .polaroid:nth-child(5) { left: 30%; top: 46%; } }

/* ---------- L12 compare ---------- */
.cmp { position: relative; width: min(100% - 2 * var(--gutter), 1200px); margin: 0 auto; aspect-ratio: var(--ratio, 3/2); border-radius: 6px; overflow: hidden; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.cmp-a, .cmp-b { position: absolute; inset: 0; }
.cmp-b { clip-path: inset(0 0 0 var(--pos)); }
.cmp-label { position: absolute; top: 12px; z-index: 3; font: 700 12px/1 var(--f-data); letter-spacing: .14em; background: rgba(17,17,17,.75); color: #fff; padding: 7px 10px; border-radius: 999px; }
.cmp-label.la { left: 12px; } .cmp-label.lb { right: 12px; }
.cmp-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; z-index: 3; pointer-events: none; box-shadow: 0 0 12px rgba(0,0,0,.4); }
.cmp-handle i { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: var(--play); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 20px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.cmp-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; z-index: 4; cursor: ew-resize; touch-action: pan-y; }
.cmp-range:focus-visible + .cmp-handle, .cmp:focus-within .cmp-handle i { outline: 3px solid #fff; outline-offset: 2px; }
.cmp-cap { padding: 14px var(--gutter) 0; text-align: center; font-size: 14px; color: var(--ink-2); max-width: 760px; margin: 0 auto; }
.cmp .pic-credit { display: none; } .cmp-b .pic-credit { display: block; } .cmp .pic-tag { display: none; }

/* ---------- L14 playbill ---------- */
.L14 { display: grid; place-items: center; }
.pb-paper { width: min(100% - 2 * var(--gutter), 620px); background: #F3EAD3; color: #2a1d12; padding: 36px 26px; text-align: center; border: 1px solid #b9a37a; box-shadow: 0 0 0 8px #F3EAD3, 0 0 0 9px #b9a37a, 0 30px 60px -20px rgba(0,0,0,.5); font-family: "Fraunces", var(--f-serif); }
.pb-top { font-size: 12px; letter-spacing: .3em; }
.pb-rule { letter-spacing: .3em; opacity: .6; }
.pb-pre { font-style: italic; letter-spacing: .1em; }
.pb-title span { display: block; font-size: clamp(36px, 9vw, 64px); font-style: italic; font-weight: 400; line-height: 1; }
.pb-title small { display: block; font-family: var(--f-serif); font-size: 20px; margin-top: 10px; }
.pb-by { font-variant: small-caps; letter-spacing: .1em; margin-top: 12px; }
.pb-dl { display: grid; gap: 8px; margin: 18px 0; text-align: left; }
.pb-dl div { display: grid; grid-template-columns: 4.5em 1fr; gap: 10px; border-bottom: 1px dotted #b9a37a; padding-bottom: 6px; }
.pb-dl dt { font-weight: 700; } .pb-dl dd { margin: 0; font-size: 15px; }
.pb-note { font-size: 14px; text-align: left; font-family: var(--f-serif); }
.pb-date { font-size: 18px; letter-spacing: .2em; margin-top: 18px; }
.pb-src { font-size: 12px; }
.pb-private { border: 1.5px dashed #b9a37a; padding: 12px; margin: 12px 0; }
.pb-empty { opacity: .6; }

/* ---------- interactions ---------- */
.C-guess .guess-box, .C-truths .truths, .C-route .routes, .C-bars .bars { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter); }
.guess-crop { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; border: 3px solid var(--play); }
.guess-crop .pic img { transform-origin: var(--gx) var(--gy); transform: scale(var(--gz)); transition: transform 1.2s var(--ease), filter 1s; }
.js .guess-crop:not(.solved) .pic img { filter: saturate(.4) contrast(1.2); }
.guess-crop.solved .pic img { transform: scale(1); }
.guess-opts { display: grid; gap: 10px; margin-top: 16px; }
.guess-opt { border: 2px solid var(--ink); background: var(--paper); border-radius: 999px; padding: 14px 18px; font-weight: 700; text-align: left; transition: transform .2s; }
.guess-opt:hover { transform: translateX(4px); }
.guess-opt.right { background: var(--play); color: #fff; border-color: var(--play); }
.guess-opt.wrong { opacity: .45; text-decoration: line-through; }
.guess-result { min-height: 1.8em; margin-top: 14px; font-weight: 700; }
.js .guess-nojs { display: none; }
@media (min-width: 900px) { .guess-box { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; } .guess-result { grid-column: 2; } }

.truths { list-style: none; display: grid; gap: 12px; }
.truth { width: 100%; text-align: left; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; border: 2px solid var(--ink); background: var(--paper); border-radius: 14px; padding: 16px; transition: transform .2s, background .3s; }
.truth-n { font-family: var(--f-en); font-weight: 900; font-size: 28px; color: var(--play); }
.truth-r { grid-column: 2; font-weight: 700; }
.truth.is-true { background: color-mix(in srgb, var(--accent) 25%, var(--paper)); }
.truth.is-lie { background: var(--play); color: #fff; } .truth.is-lie .truth-n { color: #fff; }
.truth-reveal, .truth-src { margin: 6px 4px 0; font-size: 14px; display: block; }
.truth-src[hidden], .truth-reveal[hidden] { display: none; }
.no-js .truth-reveal[hidden] { display: block; }

.routes { display: grid; gap: 12px; }
.route { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; text-align: left; border: 2px solid var(--ink); border-radius: 14px; padding: 16px; background: var(--paper); position: relative; overflow: hidden; }
.route-prof { grid-column: 1 / -1; height: 50px; width: 100%; }
.route-prof path { fill: color-mix(in srgb, var(--accent) 35%, transparent); stroke: var(--accent); stroke-width: 2; }
.route-km { font-family: var(--f-data); font-size: 40px; line-height: 1; } .route-km small { font-size: 14px; margin-left: 4px; }
.route-elev { font-family: var(--f-data); align-self: end; }
.route-name { grid-column: 1 / -1; font-family: var(--f-cs); font-style: italic; font-size: 18px; }
.route-desc { grid-column: 1 / -1; font-size: 14px; color: var(--ink-2); }
.route.picked { border-color: var(--play); box-shadow: 0 0 0 3px var(--play); }
.route-out { max-width: 960px; margin: 16px auto 0; padding: 0 var(--gutter); font-weight: 700; min-height: 1.6em; }
.route-them { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter); font-size: 14px; color: var(--ink-2); }
@media (min-width: 900px) { .routes { grid-template-columns: repeat(3, 1fr); } }

.bars { display: grid; gap: 22px; }
.bar-l { font-weight: 700; margin: 0 0 6px; }
.bar-track { height: 26px; background: var(--bg-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: var(--w); background: linear-gradient(90deg, var(--accent), var(--accent-2)); border-radius: 999px; transform-origin: 0 50%; }
.bar-v { font-family: var(--f-data); margin: 6px 0 0; } .bar-v b { font-size: 34px; } .bar-v small { margin-left: 8px; color: var(--ink-2); }
.bars-cap { max-width: 960px; margin: 22px auto 0; padding: 0 var(--gutter); font-size: 18px; font-weight: 700; }

/* ---------- Ještěd hyperboloid ---------- */
.hyper-stage { display: grid; gap: 24px; padding: 0 var(--gutter); max-width: var(--maxw); margin: 0 auto; align-items: center; }
.hyper { width: min(100%, 460px); margin: 0 auto; overflow: visible; }
.hyper line { stroke-width: 1.4; }
.hyper .fr { stroke: var(--accent); } .hyper .bk { stroke: var(--ink); opacity: .28; }
.hyper-mtn { fill: color-mix(in srgb, var(--ink) 10%, transparent); }
.hyper-mast { stroke: var(--ink); stroke-width: 3; }
.hyper-read { font-family: var(--f-data); color: var(--ink-2); }
@media (min-width: 900px) { .hyper-stage { grid-template-columns: 1fr 1fr; } }

/* ---------- home: howto / map TOC ---------- */
.howto-list { list-style: none; padding: 0 var(--gutter); margin: 0 auto; max-width: 960px; display: grid; gap: 12px; }
.howto-list li { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 14px; border: 2px solid var(--ink); border-radius: 14px; background: var(--paper); }
.howto-k { font-size: 34px; width: 64px; height: 64px; display: grid; place-items: center; background: var(--play); color: #fff; border-radius: 12px; font-weight: 900; }
.howto-list h3 { font-size: 20px; margin-bottom: 4px; } .howto-list p { margin: 0; font-size: 15px; color: var(--ink-2); }
@media (min-width: 900px) { .howto-list { grid-template-columns: repeat(2, 1fr); } }

.L2-map { padding: 0 var(--gutter); max-width: 1200px; margin: 0 auto; }
.map-svg { width: 100%; height: auto; overflow: visible; }
.map-land { fill: var(--paper); stroke: var(--ink); stroke-width: 2.4; stroke-linejoin: round; }
.map-river { fill: none; stroke: #2E6E9A; stroke-width: 3; opacity: .55; stroke-linecap: round; }
.map-river-label { font-family: var(--f-cs); font-style: italic; font-size: 20px; fill: #2E6E9A; opacity: .8; }
.map-route-bg { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 2 8; opacity: .3; }
.map-route { fill: none; stroke: var(--play); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.map-route.jested { stroke-dasharray: 10 10; stroke-width: 3; }
.map-dot { cursor: pointer; }
.map-dot .core { fill: var(--accent-2); stroke: var(--bg); stroke-width: 3; }
.map-dot .pulse { fill: var(--accent-2); opacity: .25; transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-out infinite; }
.map-dot text { font-size: 19px; fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 5px; stroke-linejoin: round; }
.map-dot .cs { font-family: var(--f-cs); font-style: italic; font-size: 24px; }
.map-dot .days { font-family: var(--f-data); font-size: 14px; font-weight: 700; }
.map-dot:hover .core, .map-dot:focus .core { fill: var(--play); }
@keyframes pulse { from { transform: scale(.6); opacity: .55; } to { transform: scale(2.4); opacity: 0; } }
.map-home path, .map-home rect { fill: var(--accent); stroke: var(--ink); stroke-width: 1.5; }
.map-home text { font: 700 13px var(--f-data); fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; }
.map-car rect { fill: var(--accent-2); } .map-car .win { fill: var(--bg); } .map-car circle { fill: var(--ink); }
.map-compass circle { fill: none; stroke: var(--ink); stroke-width: 1.5; } .map-compass path { fill: var(--ink); } .map-compass text { font: 700 14px var(--f-data); fill: var(--ink); }
.toc-list { list-style: none; padding: 0 var(--gutter); margin: 40px auto 0; max-width: 1200px; display: grid; gap: 28px; }
.toc-act-name { font-weight: 900; font-size: 20px; border-bottom: 4px solid var(--act); padding-bottom: 6px; }
.toc-act-name b { font-family: var(--f-en); color: var(--act); margin-right: 6px; }
.toc-act ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.toc-ch a { display: grid; grid-template-columns: 52px 54px 1fr; gap: 4px 12px; align-items: baseline; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background .2s, padding .2s; }
.toc-ch a:hover { background: color-mix(in srgb, var(--act) 18%, transparent); padding-left: 12px; }
.toc-no { font-family: var(--f-data); font-size: 28px; font-weight: 700; }
.toc-date { font-family: var(--f-data); font-size: 13px; color: var(--ink-2); }
.toc-t { font-weight: 700; }
.toc-ch i { grid-column: 3; font-family: var(--f-cs); font-size: 15px; opacity: .55; }
.toc-ch.future .toc-t::after, .toc-ch.today .toc-t::after { content: "旅途中"; font: 700 10px/1 var(--f-data); letter-spacing: .1em; margin-left: 8px; padding: 3px 6px; border-radius: 4px; border: 1px solid currentColor; color: var(--accent-2); vertical-align: middle; }
.toc-ch.today .toc-t::after { content: "今天"; background: var(--accent-2); color: var(--bg); }
.toc-fin { padding: 24px var(--gutter) 0; max-width: 1200px; margin: 0 auto; font-weight: 700; }
@media (min-width: 900px) { .toc-list { grid-template-columns: repeat(3, 1fr); } }

/* ---------- private components ---------- */
.C-ded { display: grid; place-items: center; }
.ded-paper { width: min(100% - 2 * var(--gutter), 620px); padding: 48px 32px; text-align: center; }
.ded-empty { font-size: clamp(28px, 7vw, 46px); line-height: 1.5; }
.ded-hint, .notes-hint { font-size: 12px; opacity: .55; font-family: var(--f-type); }
.ded-sign { width: min(320px, 80%); margin: 18px auto 0; overflow: visible; }
.ded-sign text { font-family: "Caveat", cursive; font-size: 56px; fill: currentColor; stroke: currentColor; stroke-width: .6; }
.narr-pair { display: grid; gap: 18px; padding: 0 var(--gutter); max-width: 1100px; margin: 0 auto; }
.narr { padding: 26px 22px; border-radius: 4px; min-height: 220px; position: relative; background: repeating-linear-gradient(180deg, transparent 0 33px, var(--rule, rgba(243,235,221,.12)) 33px 34px); }
.narr::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--who); }
.narr.yr { --who: #C9A227; } .narr.ruth { --who: #7A1E2B; }
.narr-who { font-family: "Caveat", cursive; font-size: 30px; color: var(--who); margin: 0 0 6px; }
.narr-empty { font-size: 24px; line-height: 1.6; opacity: .65; }
@media (min-width: 900px) { .narr-pair { grid-template-columns: 1fr 1fr; } .narr.ruth { margin-top: 70px; } }
.C-moment .moment { width: min(100% - 2 * var(--gutter), 560px); margin: 0 auto; background: #fbf8f1; color: #222; padding: 14px 14px 22px; transform: rotate(-1.5deg); box-shadow: 0 30px 50px -24px rgba(0,0,0,.7); }
.moment .pic, .moment-ph { aspect-ratio: 4 / 3; }
.moment-ph { display: grid; place-items: center; background: repeating-linear-gradient(45deg, #e9e2d3 0 12px, #f2ecdf 12px 24px); font-family: var(--f-type); font-size: 28px; color: #7A1E2B; }
.moment-why { font-family: var(--f-type); font-size: 15px; margin: 14px 4px 0; min-height: 3em; }
.C-stories .story { max-width: 720px; margin: 0 auto 36px; padding: 0 var(--gutter); }
.story-t { font-size: clamp(24px, 5vw, 34px); margin-bottom: 12px; }
.story-b p { font-size: 18px; line-height: 1.95; }
.story-src { font-size: 13px; opacity: .7; }
.notes-paper { width: min(100% - 2 * var(--gutter), 720px); margin: 0 auto; padding: 36px 26px; border-radius: 4px; background: repeating-linear-gradient(180deg, transparent 0 35px, rgba(122,30,43,.18) 35px 36px), var(--note-bg, #efe5cf); color: #2a2018; min-height: 260px; }
.notes-empty { font-size: 26px; }
.note { font-size: 20px; } .note-by { text-align: right; font-family: "Caveat", cursive; font-size: 24px; }
.C-tickets .tk-stack { position: relative; height: 220px; max-width: 360px; margin: 0 auto; }
.tk-stack i { position: absolute; left: 50%; top: 50%; width: 240px; height: 110px; margin: -55px -120px; background: #efe5cf; border-radius: 6px; -webkit-mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; mask: radial-gradient(circle 9px at 0 50%, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 9px at 100% 50%, transparent 98%, #000) right / 51% 100% no-repeat; box-shadow: 0 10px 20px rgba(0,0,0,.4); }
.tk-stack i:nth-child(1) { transform: rotate(-8deg); background: #d9c9a8; } .tk-stack i:nth-child(2) { transform: rotate(5deg) translate(10px, 10px); background: #e8dcc4; } .tk-stack i:nth-child(3) { transform: rotate(-2deg) translate(-6px, 22px); }
.fail-list { list-style: none; max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: 18px; }
.fail-list li { display: grid; gap: 4px; }
.fail-list s { font-size: clamp(22px, 5vw, 32px); font-weight: 700; text-decoration-thickness: 3px; text-decoration-color: #7A1E2B; }
.fail-list span { font-size: 15px; opacity: .75; }
.fail-empty { font-size: 22px; opacity: .6; }
.C-sealed { text-align: center; }
.envelope { position: relative; width: min(84vw, 420px); aspect-ratio: 3 / 2; margin: 0 auto; background: #e8dcc4; border-radius: 6px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); overflow: hidden; }
.env-flap { position: absolute; inset: 0 0 auto 0; height: 60%; background: #d6c6a4; clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; transition: transform 1s var(--ease); }
.env-body { position: absolute; inset: 0; display: grid; place-items: center; }
.env-to { position: absolute; bottom: 18%; color: #2a2018; font-size: 22px; }
.env-seal { position: absolute; top: 48%; left: 50%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #a33445, #7A1E2B 60%, #4d111b); color: #f3dcc4; display: grid; place-items: center; font-family: "Fraunces", serif; font-weight: 700; box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.sealed-count { font-family: var(--f-type); font-size: 18px; margin-top: 26px; }
.sealed-count b { font-size: 34px; color: var(--accent); margin: 0 4px; }
.sealed-hint { font-size: 13px; opacity: .6; padding: 0 var(--gutter); }
.C-sealed.open .env-flap { transform: rotateX(180deg); }

/* ---------- fin: colors & credits ---------- */
.col-list { list-style: none; padding: 0 var(--gutter); margin: 0 auto; max-width: 1100px; display: grid; gap: 16px; }
.col-list li { display: grid; grid-template-columns: 72px 1fr; gap: 4px 16px; align-items: start; }
.col-chip { grid-row: span 4; width: 72px; height: 72px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 3px rgba(0,0,0,.08); }
.col-list h3 { font-size: 20px; } .col-list code { font-family: var(--f-data); font-size: 13px; } .col-list p { margin: 0; font-size: 15px; } .col-list a { font-size: 13px; }
@media (min-width: 900px) { .col-list { grid-template-columns: 1fr 1fr; } }
.cr-people { max-width: 960px; margin: 0 auto 28px; padding: 0 var(--gutter); display: grid; gap: 8px; }
.cr-people div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; }
.cr-people dt { font-weight: 700; } .cr-people dd { margin: 0; }
.cr-list { max-width: 960px; margin: 0 auto; padding: 0 var(--gutter) 0 calc(var(--gutter) + 22px); font-size: 13px; display: grid; gap: 6px; }
.cr-list li span { margin-left: 8px; color: var(--ink-2); }
.cr-list a { overflow-wrap: anywhere; }
.C-open.fin { min-height: 70svh; }

/* ---------- share card (offscreen render target) ---------- */
.sharecard-stage { position: fixed; left: -99999px; top: 0; width: 1080px; height: 1920px; }
.sharecard { width: 1080px; height: 1920px; display: grid; align-content: space-between; padding: 110px 90px; background: #F5F1E8; color: #111; font-family: "Noto Sans TC", sans-serif; position: relative; overflow: hidden; }
.sharecard .sc-top { font-family: "Unbounded", sans-serif; font-weight: 900; font-size: 44px; letter-spacing: .08em; }
.sharecard .sc-cs { font-family: "Unbounded", sans-serif; font-weight: 900; font-size: 190px; line-height: .9; letter-spacing: -.04em; color: var(--accent, #D99A2B); overflow-wrap: anywhere; }
.sharecard .sc-q { font-size: 76px; font-weight: 900; line-height: 1.2; margin-top: 30px; }
.sharecard .sc-back { font-family: "Noto Serif TC", serif; font-size: 46px; line-height: 1.7; }
.sharecard .sc-foot { font-family: "Space Grotesk", sans-serif; font-size: 30px; display: flex; justify-content: space-between; }
.sharecard .sc-tri { position: absolute; right: 0; top: 0; width: 520px; height: 520px; background: var(--accent-2, #B8442E); clip-path: polygon(100% 0, 100% 100%, 0 0); opacity: .9; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 500; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }

/* ---------- lightbox ---------- */
.lbx { position: fixed; inset: 0; z-index: 250; background: rgba(10,10,10,.94); display: grid; }
.lbx .swiper { width: 100%; height: 100%; }
.lbx .swiper-slide { display: grid; place-items: center; }
.lbx img { max-width: 100%; max-height: 100svh; object-fit: contain; }
.lbx-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 48px; height: 48px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.4); color: #fff; font-size: 26px; }
.lbx-cap { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 5; text-align: center; color: #fff; font-size: 14px; padding: 0 60px; }
.C-open > * { min-width: 0; max-width: 100%; }
