/* RUSSIAN TEATIME · The Art of · v3 · a landscape art book on screen
   ink #14100d · paper #ece3cf · gold #b08d4a · wine #7a2634 */
@font-face { font-family: "Cormorant Garamond"; font-weight: 300; font-style: normal; src: url(fonts/CormorantGaramond-Light.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: normal; src: url(fonts/CormorantGaramond-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; src: url(fonts/CormorantGaramond-Medium.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 400; font-style: italic; src: url(fonts/CormorantGaramond-Italic.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; src: url(fonts/CormorantGaramond-MediumItalic.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: normal; src: url(fonts/EBGaramond-Regular.ttf) format("truetype"); font-display: swap; }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: normal; src: url(fonts/EBGaramond-Medium.ttf) format("truetype"); font-display: swap; }
@property --c1 { syntax: '<color>'; inherits: true; initial-value: #1F3B57; }
@property --c2 { syntax: '<color>'; inherits: true; initial-value: #C98A2B; }
@property --c3 { syntax: '<color>'; inherits: true; initial-value: #2B1D14; }

:root {
  --ink: #14100d; --paper: #ece3cf; --paper2: #e0d4b8; --gold: #b08d4a; --gold2: #d6b878; --wine: #7a2634;
  --disp: "Cormorant Garamond", "Cormorant", Georgia, serif;
  --text: "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --regc: #b08d4a;
}
body[data-reg="M"] { --regc: #d89a3c; } body[data-reg="D"] { --regc: #8e7bd1; } body[data-reg="H"] { --regc: #8a6a45; } body[data-reg="A"] { --regc: #c9402c; }
.ink, body { --bg: var(--ink); --fg: var(--paper); --muted: #a89e88; --accent: #c9a766; --accent2: #ecdcb2; --line: rgba(176,141,74,.38); --hair: rgba(236,227,207,.14); --nae: #e4a594; --card: rgba(236,227,207,.035); --rev: var(--paper); --revfg: var(--ink); }
.paper { --bg: var(--paper); --fg: var(--ink); --muted: #6b5e49; --accent: var(--wine); --accent2: #14100d; --line: rgba(20,16,13,.3); --hair: rgba(20,16,13,.16); --nae: var(--wine); --card: rgba(20,16,13,.035); --rev: var(--ink); --revfg: var(--paper); }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html[lang="en"] .ro, html[lang="ro"] .en { display: none !important; }
body { background: var(--ink); color: var(--paper); font-family: var(--text); font-size: 18px; line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
body.noscroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
h1, h2, h3, h4 { font-family: var(--disp); font-weight: 400; line-height: 1.08; }
::selection { background: var(--gold); color: var(--ink); }
img { max-width: 100%; }
.muted, .card small { color: var(--muted); }
.ink, .paper { background: var(--bg); color: var(--fg); }

#grain { position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .7  0 0 0 0 .6  0 0 0 0 .45  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
#progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 130; background: linear-gradient(90deg, var(--gold), var(--gold2)); }

/* header ------------------------------------------------------------------ */
header.top { position: fixed; z-index: 120; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: clamp(14px, 3vw, 40px); padding: 16px clamp(16px, 3.4vw, 52px); color: var(--paper); transition: background .5s, padding .5s; background: linear-gradient(180deg, rgba(14,10,8,.55), transparent); }
header.top.solid { background: rgba(20,16,13,.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--hair); }
.brand { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.brand .b1 { font-size: 12px; letter-spacing: .42em; text-transform: uppercase; font-weight: 500; }
.brand .b2 { font-family: var(--disp); font-style: italic; font-size: 27px; line-height: 1; color: var(--gold2); }
#here { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: baseline; justify-content: center; opacity: 0; transition: opacity .5s; overflow: hidden; white-space: nowrap; }
#here.on { opacity: 1; }
#here .hk { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold2); }
#here .ht { font-family: var(--disp); font-style: italic; font-size: 19px; overflow: hidden; text-overflow: ellipsis; }
#here .ht span, #here .hk span { display: inline; }
nav.main { display: flex; gap: clamp(12px, 2vw, 28px); align-items: center; margin-left: auto; }
nav.main a, nav.main button { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; opacity: .85; position: relative; padding: 4px 0; }
nav.main a::after, nav.main button::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px; background: var(--gold2); transition: right .4s var(--ease); }
nav.main a:hover, nav.main button:hover { opacity: 1; } nav.main a:hover::after, nav.main button:hover::after { right: 0; }
.tools { display: flex; gap: 10px; align-items: center; }
.pill { display: inline-flex; border: 1px solid rgba(236,227,207,.3); }
.pill button { padding: 4px 10px; font-size: 12px; letter-spacing: .14em; opacity: .65; transition: .25s; }
.pill button.on, .pill button:hover { background: var(--paper); color: var(--ink); opacity: 1; }
#regPill button.on { background: var(--regc); color: var(--ink); }
@media (max-width: 1100px) { #here { display: none; } nav.main { margin-left: auto; } }
@media (max-width: 760px) { #regPill, nav.main a { display: none; } .brand .b1 { display: none; } header.top { gap: 10px; padding: 12px 14px; } nav.main { margin-left: auto; } }

#index { position: fixed; inset: 0; z-index: 140; background: rgba(14,10,8,.97); visibility: hidden; opacity: 0; transition: opacity .5s, visibility .5s; overflow-y: auto; padding: 90px clamp(18px, 6vw, 100px) 60px; }
#index.on { visibility: visible; opacity: 1; }
#index .x { position: fixed; right: 22px; top: 14px; font-size: 40px; line-height: 1; color: var(--gold2); z-index: 2; }
.idx-in { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 6vw, 100px); max-width: 1300px; margin: 0 auto; }
.ix-col h3 { font-size: 12px; letter-spacing: .34em; text-transform: uppercase; color: var(--gold2); font-family: var(--text); font-weight: 400; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ix-col a { display: grid; grid-template-columns: 54px 1fr 92px; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--hair); transition: padding .4s var(--ease), color .3s; }
.ix-col a:hover { padding-left: 14px; color: var(--gold2); }
.ix-n { font-family: var(--disp); font-style: italic; font-size: 34px; color: var(--gold); line-height: 1; }
.ix-t { font-family: var(--disp); font-size: 22px; line-height: 1.12; }
.ix-col img { width: 92px; height: 52px; object-fit: cover; opacity: .85; }
@media (max-width: 760px) { .idx-in { grid-template-columns: 1fr; } .ix-col a { grid-template-columns: 40px 1fr 64px; } .ix-col img { width: 64px; height: 38px; } .ix-t { font-size: 18px; } }

/* hero ---------------------------------------------------------------------- */
#hero { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; background: var(--ink); color: var(--paper); }
.hero-slides, .hs { position: absolute; inset: 0; }
.hs { opacity: 0; transition: opacity 2.6s ease; }
.hs.on { opacity: 1; }
.hs img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); transform-origin: 50% 50%; }
.hs.on img { animation: kb 14s cubic-bezier(.3, 0, .6, 1) forwards; }
.hs:nth-child(1) img { --kx: -2.2%; --ky: -1.2%; transform-origin: 30% 55%; }
.hs:nth-child(2) img { --kx: 2%; --ky: 1%; transform-origin: 60% 40%; }
.hs:nth-child(3) img { --kx: -1.6%; --ky: 1.6%; transform-origin: 40% 50%; }
.hs:nth-child(4) img { --kx: 1.8%; --ky: -1.4%; transform-origin: 55% 60%; }
@keyframes kb { from { transform: scale(1.03) translate(0, 0); } to { transform: scale(1.17) translate(var(--kx), var(--ky)); } }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14,10,8,.88) 0%, rgba(14,10,8,.35) 38%, transparent 62%), linear-gradient(90deg, rgba(14,10,8,.6), transparent 58%), linear-gradient(180deg, rgba(14,10,8,.5), transparent 20%); }
.hero-top { position: absolute; left: clamp(18px, 5vw, 80px); top: 22vh; font-size: 12px; letter-spacing: .5em; text-transform: uppercase; color: var(--gold2); display: flex; align-items: center; gap: 18px; }
.hero-top::before { content: ""; width: 60px; height: 1px; background: var(--gold2); }
.hero-title { position: absolute; left: clamp(18px, 5vw, 80px); bottom: clamp(70px, 14vh, 150px); max-width: 92vw; }
.ht-a { font-size: clamp(15px, 2.4vw, 34px); letter-spacing: .62em; font-weight: 500; text-indent: .3em; margin-bottom: clamp(-6px, -.4vw, 0px); text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.ht-b { font-size: clamp(84px, 21vw, 360px); font-style: italic; font-weight: 400; line-height: .78; letter-spacing: -.025em; color: var(--paper); text-shadow: 0 6px 60px rgba(0,0,0,.55); padding-bottom: .08em; }
.hero-sub { font-family: var(--disp); font-style: italic; font-size: clamp(20px, 2.3vw, 34px); margin-top: 18px; color: var(--paper); opacity: .92; max-width: 640px; line-height: 1.15; text-shadow: 0 2px 18px rgba(0,0,0,.7); }
.hero-foot { position: absolute; right: clamp(18px, 4vw, 70px); bottom: clamp(26px, 6vh, 56px); text-align: right; display: grid; gap: 12px; justify-items: end; }
.hero-book { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; line-height: 1.8; color: var(--paper); }
.hero-book i { font-family: var(--disp); text-transform: none; letter-spacing: .02em; font-size: 17px; color: var(--gold2); }
.hero-cap { font-family: var(--disp); font-style: italic; font-size: 19px; color: var(--paper); opacity: .85; min-height: 26px; }
.hc-n { font-style: normal; font-size: 11px; letter-spacing: .3em; margin-right: 12px; color: var(--gold2); }
.hero-ticks { display: flex; gap: 8px; }
.hero-ticks button { width: 44px; height: 22px; display: grid; align-items: center; }
.hero-ticks i { display: block; height: 1px; background: rgba(236,227,207,.4); position: relative; overflow: hidden; }
.hero-ticks i::after { content: ""; position: absolute; inset: 0; background: var(--gold2); transform: scaleX(0); transform-origin: 0 50%; }
.hero-ticks button.on i { height: 2px; } .hero-ticks button.on i::after { animation: tick 8s linear forwards; }
@keyframes tick { to { transform: scaleX(1); } }
.scrollcue { position: absolute; left: clamp(18px, 5vw, 80px); bottom: 28px; font-size: 11px; letter-spacing: .4em; text-transform: uppercase; color: var(--paper); opacity: .75; display: flex; gap: 14px; align-items: center; }
.scrollcue::before { content: ""; width: 1px; height: 40px; background: linear-gradient(var(--gold2), transparent); animation: drip 2.4s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 760px) {
  .hero-top { top: 15vh; letter-spacing: .3em; font-size: 10px; } .hero-top::before { width: 26px; }
  .hero-foot { left: 18px; right: 18px; justify-items: start; text-align: left; bottom: 74px; }
  .hero-book { display: none; } .hero-cap { font-size: 16px; }
  .hero-title { bottom: 150px; } .scrollcue { bottom: 22px; }
  .hero-sub { font-size: 19px; }
}

/* prologue ---------------------------------------------------------------- */
#prologue { padding: clamp(80px, 12vw, 190px) clamp(18px, 6vw, 100px) clamp(60px, 8vw, 120px); position: relative; }
.pro-in { max-width: 1400px; margin: 0 auto; }
.pro-mark, .part-title .pt-k { font-size: 12px; letter-spacing: .5em; text-transform: uppercase; color: var(--accent); display: flex; align-items: center; gap: 18px; margin-bottom: 36px; }
.pro-mark::after { content: ""; width: 120px; height: 1px; background: var(--accent); opacity: .6; }
.pro-quote { font-family: var(--disp); font-style: italic; font-size: clamp(28px, 4.4vw, 70px); line-height: 1.07; max-width: 1150px; margin-left: clamp(0px, 9vw, 160px); text-wrap: balance; }
.pro-quote em { color: var(--wine); }
.pro-meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: clamp(50px, 8vw, 120px); border-top: 1px solid var(--line); }
.pro-meta div { padding: 22px 18px 0 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pro-meta b { font-family: var(--disp); font-style: italic; font-weight: 400; font-size: clamp(38px, 5vw, 76px); letter-spacing: 0; text-transform: none; color: var(--fg); line-height: 1; }
@media (max-width: 760px) { .pro-meta { grid-template-columns: 1fr 1fr; } .pro-meta div { padding-bottom: 14px; } }

/* reveal ------------------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* chapter openers ----------------------------------------------------------- */
.opener { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: var(--ink); color: var(--paper); }
.op-bg { position: absolute; left: 0; right: 0; top: -16%; height: 132%; will-change: transform; }
.op-bg img { width: 100%; height: 100%; object-fit: cover; will-change: transform; transform: scale(1.06); }
.op-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(14,10,8,.92) 0%, rgba(14,10,8,.45) 40%, rgba(14,10,8,.15) 70%, rgba(14,10,8,.55) 100%), linear-gradient(90deg, rgba(14,10,8,.5), transparent 60%); }
.op-num { position: absolute; left: clamp(10px, 3vw, 50px); bottom: -.14em; font-family: var(--disp); font-style: italic; font-weight: 300; font-size: clamp(190px, 38vw, 640px); line-height: .78; color: transparent; -webkit-text-stroke: 1.2px rgba(236,227,207,.6); letter-spacing: -.03em; pointer-events: none; will-change: transform; }
.op-txt { position: absolute; right: clamp(18px, 6vw, 100px); bottom: clamp(60px, 13vh, 150px); width: min(660px, 84vw); will-change: transform; }
.op-k { display: flex; align-items: center; gap: 16px; font-size: 12px; letter-spacing: .38em; text-transform: uppercase; color: var(--gold2); margin-bottom: 20px; }
.op-k::after { content: ""; width: 70px; height: 1px; background: var(--gold2); }
.op-txt h2 { font-style: italic; font-size: clamp(36px, 5.4vw, 88px); line-height: 1; text-shadow: 0 4px 40px rgba(0,0,0,.6); text-wrap: balance; }
.op-p { font-size: clamp(17px, 1.5vw, 21px); margin-top: 20px; max-width: 520px; opacity: .92; text-shadow: 0 2px 16px rgba(0,0,0,.8); }
.op-c { display: inline-block; margin-top: 18px; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold2); border-top: 1px solid var(--line); padding-top: 10px; }
@media (max-width: 760px) { .op-num { font-size: 52vw; left: 0; bottom: auto; top: 16vh; -webkit-text-stroke-width: 1px; } .op-txt { left: 18px; right: 18px; width: auto; bottom: 48px; } .op-txt h2 { font-size: 38px; } .opener { min-height: 520px; } }

.part-title { min-height: 80vh; display: grid; align-items: center; padding: clamp(70px, 10vw, 150px) clamp(18px, 6vw, 100px); border-top: 1px solid var(--hair); background: radial-gradient(ellipse 70% 80% at 85% 20%, rgba(122,38,52,.28), transparent 70%), var(--ink); }
.pt-in { max-width: 1400px; margin: 0 auto; width: 100%; }
.part-title h2 { font-style: italic; font-weight: 300; font-size: clamp(76px, 18vw, 300px); line-height: .85; color: var(--paper); margin: -10px 0 30px -.03em; }
.part-title p { font-family: var(--disp); font-size: clamp(20px, 2.3vw, 32px); max-width: 700px; margin-left: clamp(0px, 14vw, 240px); color: var(--paper); opacity: .85; line-height: 1.2; }

/* art book spreads -------------------------------------------------------- */
.spread { position: relative; padding: clamp(46px, 7vw, 120px) 0; overflow: hidden; }
.spread.paper + .spread.paper, .spread.ink + .spread.ink { border-top: 1px solid var(--hair); }
.spread .art { position: relative; margin: 0; overflow: hidden; }
.spread .art img { display: block; width: 100%; height: auto; cursor: zoom-in; transition: transform 1.6s var(--ease); }
.spread .art:hover img { transform: scale(1.018); }
.spread .art.reveal { transform: scale(1.025); opacity: 0; transition: opacity 1.5s ease, transform 2.2s var(--ease); }
.spread .art.reveal.in { transform: none; opacity: 1; }
.vmark { position: absolute; left: 16px; top: 16px; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--paper); background: rgba(14,10,8,.62); padding: 5px 11px; backdrop-filter: blur(4px); }
.zoomhint { position: absolute; right: 16px; bottom: 16px; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--paper); background: rgba(14,10,8,.62); padding: 5px 11px; opacity: 0; transition: opacity .4s; pointer-events: none; }
.spread .art:hover .zoomhint { opacity: 1; }
.cap { position: relative; z-index: 2; padding: clamp(22px, 2.6vw, 40px); max-width: 560px; transform: translate3d(0, var(--py, 0vh), 0); }
.cap.reveal { transform: translate3d(0, calc(var(--py, 0vh) + 34px), 0); transition: opacity 1.1s var(--ease), transform .9s var(--ease); }
.cap.reveal.in { transform: translate3d(0, var(--py, 0vh), 0); }
.cap-n { font-family: var(--disp); font-style: italic; font-weight: 300; font-size: clamp(80px, 9vw, 150px); line-height: 1.12; color: transparent; -webkit-text-stroke: 1px var(--accent); opacity: .85; margin-bottom: 2px; padding-bottom: .16em; letter-spacing: -.02em; }
.cap-k { display: block; font-size: 11px; letter-spacing: .34em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.cap h3 { font-style: italic; font-size: clamp(32px, 3.6vw, 56px); line-height: 1; margin-bottom: 16px; }
.cap h3::first-letter { text-transform: uppercase; }
.cap-note { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; color: var(--fg); opacity: .92; }
.cap-rules { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.cap-l { font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); }
.cap-rules ul { list-style: none; margin-top: 6px; }
.cap-rules li { font-size: 15px; line-height: 1.4; padding-left: 16px; position: relative; margin-top: 4px; color: var(--muted); }
.cap-rules li::before { content: "—"; position: absolute; left: 0; color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 18px; }
.chips i { display: block; width: 26px; height: 26px; box-shadow: 0 0 0 1px var(--hair); transition: transform .3s var(--ease); }
.chips i:hover { transform: translateY(-4px) scale(1.1); }
.cap-btns { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 22px; }
.cap-model { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-left: auto; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--accent); color: var(--accent2); padding: 9px 20px; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; font-weight: 500; transition: background .35s, color .35s, border-color .35s; position: relative; }
.paper .btn { color: var(--wine); }
.btn:hover { background: var(--accent); color: var(--bg); }
.btn.ghost { border-color: transparent; border-bottom-color: var(--line); padding-left: 6px; padding-right: 6px; }
.btn.ghost:hover { background: transparent; color: var(--accent); border-bottom-color: var(--accent); }
.btn.s { padding: 6px 13px; font-size: 11px; letter-spacing: .18em; }
.btn.done, .btn.done:hover { background: #3c6a4a; border-color: #3c6a4a; color: #fff; }
.btn.done::after { content: " ✓"; }

/* v0: full-bleed painting, caption laid over its lower edge */
.spread.v0 { padding-top: 0; }
.v0 .cap { margin: clamp(-120px, -9vw, -40px) 0 0 clamp(18px, 6vw, 100px); background: var(--rev); color: var(--revfg); --accent: var(--wine); --fg: var(--revfg); --muted: #6b5e49; --line: rgba(20,16,13,.3); width: min(560px, calc(100% - 36px)); box-shadow: 0 30px 80px rgba(0,0,0,.45); }
.v0.paper .cap { --accent: #c9a766; --muted: #a89e88; --line: rgba(176,141,74,.4); --revfg: var(--paper); --rev: var(--ink); }
.v0 .cap .btn { color: var(--wine); } .v0.paper .cap .btn { color: var(--gold2); }
.v0 .cap-n { -webkit-text-stroke-color: var(--accent); }
/* v1 / v2: asymmetric grid, painting bleeds off one edge */
.v1, .v2 { display: grid; align-items: center; gap: 0 clamp(20px, 4vw, 70px); }
.v1 { grid-template-columns: minmax(300px, 4.2fr) 8fr; padding-left: clamp(18px, 6vw, 100px); }
.v2 { grid-template-columns: 8fr minmax(300px, 4.2fr); padding-right: clamp(18px, 6vw, 100px); }
.v1 .cap { grid-column: 1; grid-row: 1; padding-left: 0; } .v1 .art { grid-column: 2; grid-row: 1; }
.v2 .art { grid-column: 1; grid-row: 1; } .v2 .cap { grid-column: 2; grid-row: 1; padding-right: 0; }
/* v3: inset painting, three-column caption beneath */
.v3 .art { margin: 0 clamp(18px, 6vw, 100px); }
.v3 .cap { max-width: none; margin: 12px clamp(18px, 6vw, 100px) 0; padding: 30px 0 0; display: grid; grid-template-columns: minmax(240px, 1fr) 1.3fr; gap: 0 clamp(24px, 5vw, 90px); align-items: start; border-top: 1px solid var(--line); }
.v3 .cap-n { margin-top: -.1em; }
@media (max-width: 900px) {
  .v1, .v2 { display: block; padding: 0; }
  .v1 .cap, .v2 .cap { padding: 24px 18px 0; max-width: none; } .v2 .cap { padding-right: 18px; }
  .v1 .art, .v2 .art { margin-top: 0; }
  .v1 .cap { order: 2; } .v1 .art { order: 1; }
  .v1, .v2 { display: flex; flex-direction: column; }
  .v3 .art { margin: 0; } .v3 .cap { display: block; margin: 0 18px; }
  .v0 .cap { margin: -50px 12px 0; padding: 22px 20px; }
  .cap-n { font-size: 84px; } .cap-model { margin-left: 0; width: 100%; }
}

/* dossier chapters -------------------------------------------------------- */
section.chapter { position: relative; padding: clamp(70px, 9vw, 150px) clamp(18px, 6vw, 100px); }
section.chapter > * { max-width: 1360px; margin-left: auto; margin-right: auto; }
.lede { max-width: 820px !important; margin-left: 0 !important; font-size: clamp(19px, 1.55vw, 23px); line-height: 1.55; margin-bottom: 40px; margin-top: 4px; }
section.chapter > .lede { margin-left: max(0px, calc((100% - 1360px) / 2)) !important; }
.lede em, .lede b { color: var(--accent); font-style: italic; font-weight: 500; }
.sub { font-size: clamp(30px, 3.6vw, 56px); font-style: italic; color: var(--fg); margin: clamp(60px, 8vw, 110px) auto 14px; padding-top: 22px; border-top: 1px solid var(--line); position: relative; }
.sub::before { content: ""; position: absolute; top: -1px; left: 0; width: 70px; height: 3px; background: var(--accent); }
.sub:first-of-type { margin-top: 20px; }
.card { position: relative; border-top: 1px solid var(--line); padding: 18px 4px 6px; transition: border-color .4s, transform .6s var(--ease), background .4s; }
.card:hover { border-top-color: var(--accent); }
.card h3 { font-size: 26px; margin-bottom: 8px; font-style: italic; color: var(--fg); }
.tag { display: inline-block; font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; padding: 3px 0; margin: 2px 14px 2px 0; color: var(--accent); border-bottom: 1px solid var(--line); }
.divider { display: none; }
.skin { fill: #f1d9c8; } .hairM { fill: #6b4a30; } .hairF { fill: #8a6a50; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 18px 0 24px; }
.toolbar input[type=search] { flex: 1 1 220px; min-width: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 10px 2px; color: var(--fg); font: inherit; font-size: 18px; outline: none; font-family: var(--disp); font-style: italic; }
.toolbar input::placeholder { color: var(--muted); }
.tabs { display: flex; gap: 6px 22px; flex-wrap: wrap; margin: 18px 0 28px; }
.fbtn, .seqs button { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; padding: 8px 0; border-bottom: 1px solid transparent; color: var(--muted); transition: .3s; }
.fbtn:hover, .seqs button:hover { color: var(--fg); }
.fbtn.on, .seqs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.seqs { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 18px 0 30px; }
.grid { display: grid; gap: 26px; }

/* register showcase */
.regs { display: grid; grid-template-columns: minmax(240px, 330px) 1fr; gap: clamp(24px, 4vw, 70px); align-items: start; }
.regs > * { min-width: 0; }
@media (max-width: 900px) { .regs { grid-template-columns: 1fr; } }
.reg-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.reg-btn { text-align: left; border-bottom: 1px solid var(--line); padding: 14px 4px; display: grid; grid-template-columns: 50px 1fr; gap: 12px; align-items: center; transition: .4s var(--ease); }
.reg-btn .L { font-family: var(--disp); font-size: 44px; font-style: italic; color: var(--accent); line-height: 1; }
.reg-btn b { font-family: var(--disp); font-weight: 500; font-size: 20px; line-height: 1.1; display: block; }
.reg-btn small { display: block; color: var(--muted); font-size: 14px; line-height: 1.3; margin-top: 3px; }
.reg-btn.on, .reg-btn:hover { padding-left: 16px; background: var(--card); }
.reg-btn.on .L { color: var(--regc); }
.reg-stage { position: relative; aspect-ratio: 2.39/1; overflow: hidden; background: #0b1624; box-shadow: 0 30px 70px rgba(20,16,13,.35); }
.reg-stage svg.scene { width: 100%; height: 100%; display: block; transition: filter .8s, transform .8s; }
.reg-stage .ov { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .8s; }
.reg-stage[data-r="M"] svg.scene { filter: sepia(.55) saturate(1.3) brightness(1.05) blur(.6px); }
.reg-stage[data-r="M"] .ov.m { opacity: 1; background: radial-gradient(ellipse at 50% 50%, rgba(255,170,60,.25), rgba(60,25,0,.75)); mix-blend-mode: soft-light; }
.reg-stage[data-r="D"] svg.scene { filter: hue-rotate(250deg) saturate(1.8) contrast(1.1) url(#wobble); }
.reg-stage[data-r="D"] .ov.d { opacity: 1; background: linear-gradient(120deg, rgba(120,40,200,.35), rgba(217,201,74,.25)); mix-blend-mode: color; }
.reg-stage[data-r="H"] svg.scene { filter: grayscale(1) contrast(1.4) sepia(.6); }
.reg-stage[data-r="H"] .ov.h { opacity: 1; background: repeating-linear-gradient(45deg, rgba(40,25,10,.35) 0 1px, transparent 1px 4px), #e9dcc0; mix-blend-mode: multiply; }
.reg-stage[data-r="A"] svg.scene { filter: contrast(1.25) saturate(1.5); transform: scale(1.08) rotate(-1.2deg); }
.reg-stage[data-r="A"] .ov.a { opacity: 1; background: repeating-linear-gradient(-12deg, rgba(255,255,255,0) 0 18px, rgba(255,255,255,.16) 18px 20px); mix-blend-mode: overlay; animation: speed .5s linear infinite; }
@keyframes speed { to { background-position: 120px 0; } }
.reg-cap { margin-top: 16px; display: flex; gap: 6px 18px; flex-wrap: wrap; align-items: baseline; }
.reg-cap h3 { font-size: 34px; font-style: italic; color: var(--accent); }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: clamp(20px, 3vw, 50px); margin: 40px 0; }
.pillar .sw { display: flex; height: 6px; margin: 14px 0 12px; }
.pillar .sw i { flex: 1; }
.pillar p { font-size: 17px; line-height: 1.5; }
.north { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin-top: 18px; border-left: 1px solid var(--line); }
.north .nn { padding: 20px 20px 24px; border-right: 1px solid var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 170px; position: relative; overflow: hidden; }
.north .nn::before { content: ""; position: absolute; inset: 0; opacity: .3; background: var(--bgi); transition: opacity .6s; }
.north .nn:hover::before { opacity: .55; }
.north .nn > * { position: relative; }
.north .nn b { display: block; font-family: var(--disp); font-size: 26px; font-style: italic; font-weight: 500; margin-bottom: 8px; }
.north .nn span { font-size: 16px; line-height: 1.4; }

/* metaphors */
.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px 34px; margin-top: 30px; }
.metacard { padding: 0; border-top: 0; display: flex; flex-direction: column; }
.metacard .demo { min-height: 190px; position: relative; display: grid; place-items: center; overflow: hidden; background: #14100d; border: 1px solid var(--line); color: var(--paper); }
.metacard .txt { padding: 16px 2px 0; }
.metacard .txt h3 { font-size: 28px; } .metacard .txt p { font-size: 16px; line-height: 1.45; color: var(--muted); }
.metacard .code { position: absolute; top: 8px; right: 14px; font-family: var(--disp); font-size: 38px; font-style: italic; color: var(--gold); z-index: 2; }
.fig { width: 84px; height: 140px; }
.mm .face-f { opacity: 0; transition: opacity .8s; } .mm:hover .face-f { opacity: 1; } .mm:hover .face-m { opacity: 0; } .mm .face-m { transition: opacity .8s; }
.wave { width: 100%; height: 80px; } .wave path { fill: none; stroke-width: 2.2; }

/* chapter II */
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 8px 40px; margin: 30px auto; }
.rule { cursor: pointer; padding-top: 20px; min-height: 150px; }
.rule .n { position: absolute; top: 8px; right: 6px; font-family: var(--disp); font-style: italic; font-size: 78px; color: transparent; -webkit-text-stroke: 1px var(--accent); opacity: .5; line-height: 1; }
.rule h3 { padding-right: 70px; font-size: 24px; } .rule p { color: var(--muted); font-size: 16.5px !important; padding-right: 56px; }
.rule.pin { border-top: 3px solid var(--accent); background: var(--card); }
.rule.pin p { color: var(--fg); }
.compare { position: relative; width: 100%; aspect-ratio: 16/6.4; overflow: hidden; user-select: none; touch-action: none; cursor: ew-resize; background: #14100d; }
.compare > div { position: absolute; inset: 0; display: grid; align-content: end; padding: clamp(18px, 3vw, 44px); color: var(--paper); }
.compare .a { background: linear-gradient(180deg, #1f3347, #6b4a28 150%); }
.compare .b { background: linear-gradient(180deg, #3b4248, #1e1e1a); clip-path: inset(0 0 0 var(--cp, 50%)); }
.compare h4 { font-size: clamp(22px, 3vw, 44px); font-style: italic; margin-bottom: 8px; }
.compare ul { list-style: none; font-size: 16px; opacity: .92; columns: 2; column-gap: 24px; }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--cp, 50%); width: 1px; background: var(--gold2); }
.compare .handle::after { content: "⇄"; position: absolute; top: 50%; left: -19px; width: 38px; height: 38px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; transform: translateY(-50%); font-size: 17px; }
.qc { width: 100%; border-collapse: collapse; font-size: 16px; margin-top: 12px; }
.qc th, .qc td { border-bottom: 1px solid var(--hair); padding: 12px 12px 12px 0; text-align: left; vertical-align: top; }
.qc th { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); font-weight: 500; border-bottom-color: var(--line); }
.qc td.no { color: #e4907e; } .qc td.yes { color: #a9d19a; }
.seasonbar { position: relative; height: 96px; margin: 50px 0 10px; background: linear-gradient(90deg, #b9a7d6 0%, #e9b7a0 28%, #c98a2b 56%, #3b4e68 68%, #dce8f2 100%); }
.seasonbar::before { content: ""; position: absolute; left: 66.7%; top: -14px; bottom: -14px; width: 1px; background: var(--accent2); }
.seasonbar > span { position: absolute; bottom: 8px; font-size: 11px; letter-spacing: .2em; color: #0b1624; text-transform: uppercase; }
.seasonbar .cut { position: absolute; left: 66.7%; top: -40px; transform: translateX(-50%); font-size: 11px; color: var(--accent2); white-space: nowrap; letter-spacing: .2em; text-transform: uppercase; bottom: auto; }
.seasonbar .cut span { color: inherit; position: static; }
.nae { list-style: none; color: var(--nae); }
.nae li { margin-left: 0; padding-left: 16px; position: relative; font-size: 15.5px; line-height: 1.4; margin-top: 4px; }
.nae li::before { content: "—"; position: absolute; left: 0; }

/* chapter III */
.duality { display: grid; grid-template-columns: minmax(280px, 480px) 1fr; gap: clamp(26px, 5vw, 80px); align-items: center; }
.duality > div { min-width: 0; }
@media (max-width: 900px) { .duality { grid-template-columns: 1fr; } }
.dstage { position: relative; aspect-ratio: 3/4; max-height: 74vh; background: radial-gradient(ellipse at 50% 85%, rgba(255,189,89,.25), transparent 60%), linear-gradient(180deg, #14283d, #0a1420); overflow: hidden; box-shadow: 0 30px 70px rgba(20,16,13,.35); color: var(--paper); }
.dstage svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dstage .lbl { position: absolute; top: 18px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold2); z-index: 2; }
.dstage .lbl.l { left: 16px; } .dstage .lbl.r { right: 16px; }
.sl { width: 100%; margin: 24px 0 8px; appearance: none; -webkit-appearance: none; height: 2px; background: linear-gradient(90deg, #8aa8c8, var(--gold), #e8c4c4); outline: none; cursor: ew-resize; }
.sl::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 2px solid var(--gold); box-shadow: 0 0 0 6px rgba(176,141,74,.2); cursor: ew-resize; }
.tl { display: flex; gap: 0; overflow-x: auto; padding: 0 0 14px; scrollbar-width: thin; border-bottom: 1px solid var(--line); }
.tl button { flex: none; width: 150px; text-align: left; padding: 10px 14px 12px 0; position: relative; border-top: 2px solid transparent; transition: .3s; }
.tl button b { display: block; font-family: var(--disp); font-style: italic; font-size: 24px; color: var(--accent); font-weight: 500; }
.tl button small { display: block; font-size: 13.5px; line-height: 1.25; color: var(--muted); padding-right: 6px; }
.tl button.on { border-top-color: var(--accent); } .tl button:hover small { color: var(--fg); }
.tl button::after { content: attr(data-sc); position: absolute; top: 14px; right: 12px; font-size: 10px; color: var(--muted); letter-spacing: .12em; }
.dinfo { min-height: 120px; padding-top: 18px; }
.dinfo h3 { font-size: 34px; font-style: italic; color: var(--fg); }
.lineup { position: relative; margin: 24px 0 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--card); padding: 14px 10px 0; overflow-x: auto; }
.lineup svg { min-width: 980px; width: 100%; display: block; }
.lineup .s { fill: var(--accent); opacity: .72; transition: .3s; cursor: pointer; }
.lineup g:hover .s { opacity: 1; fill: var(--fg); }
.lineup text { font-family: var(--text); font-size: 10.5px; fill: var(--fg); text-anchor: middle; opacity: .8; }
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px 28px; margin-top: 28px; }
.chcard { padding: 0; cursor: pointer; }
.chcard .sil { height: 130px; display: grid; place-items: end center; background: var(--card); border-bottom: 1px solid var(--line); }
.chcard .sil svg { height: 120px; width: auto; }
.chcard .sil svg * { fill: var(--accent); }
.chcard .body { padding: 14px 2px 8px; }
.chcard h3 { font-size: 24px; margin-bottom: 2px; }
.chcard p { font-size: 15.5px; line-height: 1.45; color: var(--muted); }
.chcard .meta2 { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 4px 0 8px; }
.net { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 50% 50%, var(--card), transparent 70%); }
.net svg { width: 100%; height: auto; display: block; }
.net .hull { fill-opacity: .1; stroke-opacity: .5; stroke-width: 1.2; stroke-dasharray: 5 6; }
.net .edge { stroke: var(--accent); stroke-width: 1.2; opacity: .55; fill: none; transition: .3s; }
.net .edge.mail { stroke-dasharray: 3 6; animation: dash 3s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -36; } }
.net .node circle { fill: var(--bg); stroke: var(--accent); stroke-width: 1.5; transition: .3s; }
.net .node text { font-family: var(--text); font-size: 12px; fill: var(--fg); text-anchor: middle; pointer-events: none; }
.net .node { cursor: pointer; }
.net .node:hover circle, .net .node.hl circle { fill: var(--accent); }
.net .dim { opacity: .12 !important; }
.net .clabel { font-family: var(--text); font-size: 13px; letter-spacing: .3em; text-transform: uppercase; }
#netInfo { padding: 14px 4px; border-top: 1px solid var(--hair); min-height: 64px; font-size: 17px; }
#netInfo b { color: var(--accent); font-weight: 500; }

/* chapter IV / V */
.wcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px 36px; }
.wcard { display: flex; flex-direction: column; gap: 8px; cursor: pointer; }
.wcard .swatches { display: flex; height: 6px; margin-bottom: 4px; }
.wcard .swatches i { flex: 1; }
.wcard .sc { font-size: 11px; letter-spacing: .24em; color: var(--accent); }
.wcard p { font-size: 16.5px; line-height: 1.5; }
.wcard .spec { font-size: 14px; color: var(--muted); font-style: italic; max-height: 6.2em; overflow: hidden; }
.wcard.open .spec { max-height: none; }
.masq { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0; margin-top: 16px; border-left: 1px solid var(--line); }
.mq { padding: 20px 16px 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); transition: background .4s; }
.mq:hover { background: var(--card); }
.mq .ic { font-size: 34px; display: block; margin-bottom: 6px; }
.mq b { font-family: var(--disp); font-style: italic; font-size: 22px; font-weight: 500; display: block; }
.mq small { color: var(--muted); font-size: 15px; line-height: 1.35; display: block; }
.locs { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 40px 34px; }
.loc { padding: 0; border-top: 0; display: flex; flex-direction: column; }
.loc .mp { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #0c1826; }
.loc .mp svg { width: 100%; height: 100%; display: block; }
.loc .mp .layer { transition: transform .5s var(--ease); }
.loc .body { padding: 16px 2px 4px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.loc .body h3 { font-size: 28px; }
.loc .kv { font-size: 11.5px; color: var(--accent); letter-spacing: .16em; text-transform: uppercase; }
.loc .body p { font-size: 16px; line-height: 1.45; }
.loc .body .btns { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; padding-top: 10px; }

/* chapter VI: scrolly color script ---------------------------------------- */
#cs { position: relative; }
#cs-intro { padding: clamp(60px, 8vw, 120px) clamp(18px, 6vw, 100px) 40px; max-width: 1460px; margin: 0 auto; }
#cs-scroll { position: relative; height: 3400vh; }
#cs-stage { position: sticky; top: 0; height: 100vh; overflow: hidden; --c1: #1F3B57; --c2: #C98A2B; --c3: #2B1D14; transition: --c1 1s, --c2 1s, --c3 1s; background: radial-gradient(ellipse 70% 80% at 22% 70%, var(--c2), transparent 62%), radial-gradient(ellipse 60% 70% at 85% 22%, var(--c1), transparent 70%), linear-gradient(180deg, var(--c3), #05080d 120%); color: var(--paper); }
#cs-stage .vig { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.6), transparent 58%), radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,.65)); }
#cs-stage .win { position: absolute; right: 12%; top: 16%; width: 20vw; max-width: 300px; height: 38vh; border: 1px solid rgba(255,255,255,.2); background: linear-gradient(180deg, var(--c1), transparent 120%); box-shadow: 0 0 80px 10px var(--c1), inset 0 0 40px rgba(0,0,0,.4); transition: .8s; border-radius: 120px 120px 2px 2px; }
#cs-stage .lampo { position: absolute; left: 14%; bottom: 20%; width: 18vw; height: 18vw; border-radius: 50%; background: radial-gradient(circle, rgba(255,235,180,.85), var(--c2) 35%, transparent 70%); filter: blur(10px); animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .55; transform: scale(1.08); } }
#cs-stage .figs { position: absolute; left: 42%; bottom: 8%; width: 24vw; height: 44vh; }
#cs-stage .figs svg { width: 100%; height: 100%; } #cs-stage .figs path, #cs-stage .figs circle, #cs-stage .figs ellipse { fill: rgba(0,0,0,.72); }
#cs-stage .floor { position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: linear-gradient(180deg, transparent, rgba(0,0,0,.6)); }
body[data-season="winter"] #cs-stage::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background-image: radial-gradient(circle, rgba(240,246,255,.9) 0 1.5px, transparent 2.5px), radial-gradient(circle, rgba(240,246,255,.7) 0 1px, transparent 2px); background-size: 140px 170px, 90px 110px; animation: snow 9s linear infinite; opacity: .7; }
@keyframes snow { to { background-position: 30px 170px, -20px 110px; } }
.cs-hud { position: absolute; left: clamp(18px, 4vw, 60px); top: 96px; z-index: 6; max-width: min(560px, 54vw); }
.season { display: inline-block; font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--gold2); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-bottom: 16px; }
.cs-n { font-family: var(--disp); font-style: italic; font-weight: 300; font-size: clamp(100px, 17vw, 260px); line-height: .8; color: rgba(255,255,255,.9); text-shadow: 0 0 60px var(--c2); margin-bottom: .2em; }
.cs-mov { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold2); margin-bottom: 10px; }
.cs-slug { font-size: clamp(14px, 1.4vw, 19px); letter-spacing: .1em; color: #fff; margin-top: 10px; text-transform: uppercase; }
.cs-beat { font-family: var(--disp); font-style: italic; font-size: clamp(20px, 2vw, 30px); line-height: 1.15; margin-top: 12px; color: #f4ead6; max-width: 520px; text-shadow: 0 2px 14px rgba(0,0,0,.7); }
.cs-badges { margin-top: 16px; display: flex; gap: 4px; flex-wrap: wrap; }
.cs-badges .tag { color: var(--gold2); border-bottom-color: rgba(214,184,120,.4); }
.cs-gauge { position: absolute; right: clamp(14px, 3vw, 46px); top: 96px; bottom: 150px; width: 56px; z-index: 6; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cs-gauge .therm { flex: 1; width: 8px; background: linear-gradient(180deg, #9fb8d8, #fff2cf 40%, #ffb35c 70%, #d27a1e); position: relative; }
.cs-gauge .mark { position: absolute; left: -12px; width: 32px; height: 2px; background: #fff; box-shadow: 0 0 12px #fff; transition: bottom .6s var(--ease); }
.cs-gauge .kv { font-size: 13px; color: #fff; letter-spacing: .1em; }
.cs-gauge .tens { height: 90px; width: 4px; background: rgba(255,255,255,.18); position: relative; overflow: hidden; }
.cs-gauge .tens i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(0deg, #ffb347, #e0452e); transition: height .6s var(--ease); }
.cs-bottom { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; padding: 10px clamp(14px, 3vw, 40px) 16px; background: linear-gradient(0deg, rgba(0,0,0,.78), transparent); }
.cs-strip { display: grid; height: 26px; }
.cs-strip i { display: block; cursor: pointer; position: relative; }
.cs-strip i.on { outline: 1px solid #fff; z-index: 2; transform: scaleY(1.6); }
.cs-curve { width: 100%; height: 54px; display: block; margin-top: 4px; }
.cs-curve path { fill: none; stroke-width: 1.6; } .cs-curve .dot { fill: #fff; }
.cs-play { position: absolute; z-index: 6; left: 50%; bottom: 128px; transform: translateX(-50%); letter-spacing: .3em; font-size: 11px; color: rgba(255,255,255,.7); text-transform: uppercase; white-space: nowrap; }
.fx { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.fx > * { display: none; }
#cs-stage[data-fx="sword"] .fx .sword, #cs-stage[data-fx="aria"] .fx .aria, #cs-stage[data-fx="death"] .fx .death, #cs-stage[data-fx="burn"] .fx .burn, #cs-stage[data-fx="ball"] .fx .ball, #cs-stage[data-fx="dream"] .fx .dream, #cs-stage[data-fx="quartz"] .fx .qz, #cs-stage[data-fx="cucumber"] .fx .cuc { display: block; }
.fx .sword .slash { position: absolute; left: 10%; right: 10%; top: 52%; height: 3px; background: linear-gradient(90deg, transparent, #fff, transparent); transform: rotate(-18deg); box-shadow: 0 0 30px #fff, 0 0 80px #8fd; animation: slash 1.8s ease-in-out infinite; opacity: 0; }
@keyframes slash { 0%, 60%, 100% { opacity: 0; transform: rotate(-18deg) scaleX(.2); } 70% { opacity: 1; transform: rotate(-18deg) scaleX(1); } }
.fx .sword .mam { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); font-family: var(--disp); font-style: italic; font-size: clamp(50px, 11vw, 190px); color: #fff; text-shadow: 0 0 40px #e0452e, 0 0 90px #e0452e; letter-spacing: .02em; animation: shout 1.8s ease-in-out infinite; white-space: nowrap; }
@keyframes shout { 0%, 55% { opacity: 0; transform: translateX(-50%) scale(.6); } 70% { opacity: 1; transform: translateX(-50%) scale(1.06); } 100% { opacity: .4; transform: translateX(-50%) scale(1); } }
.fx .aria i { position: absolute; bottom: 10%; font-style: normal; font-size: 34px; color: var(--gold2); text-shadow: 0 0 20px var(--gold); animation: note 5s linear infinite; opacity: 0; }
@keyframes note { 0% { transform: translateY(0) rotate(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-75vh) rotate(25deg); opacity: 0; } }
.fx .aria .ring { position: absolute; left: 42%; bottom: 30%; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--gold2); animation: ringp 3s ease-out infinite; }
@keyframes ringp { to { transform: scale(30); opacity: 0; } }
.fx .death .rip { position: absolute; left: 0; right: 0; bottom: 0; height: 26%; background: repeating-linear-gradient(180deg, rgba(180,200,230,.18) 0 2px, transparent 2px 9px); animation: ripple 3s linear infinite; }
@keyframes ripple { to { background-position: 0 18px; } }
.fx .death .mist { position: absolute; inset: 40% 0 0; background: linear-gradient(0deg, rgba(200,215,235,.35), transparent); filter: blur(10px); animation: breathe 6s ease-in-out infinite; }
.fx .death .cuc { position: absolute; left: 50%; top: 24%; transform: translateX(-50%); font-family: var(--disp); font-style: italic; font-size: clamp(28px, 5vw, 70px); color: #fff; opacity: .9; text-shadow: 0 0 30px #000; animation: faint 4s ease-in-out infinite; }
@keyframes faint { 0%, 40% { opacity: 0; transform: translateX(-50%) translateY(0) rotate(0); } 55% { opacity: 1; } 100% { opacity: 0; transform: translateX(-50%) translateY(60px) rotate(-70deg); } }
.fx .burn .letter { position: absolute; left: 50%; top: 30%; width: 160px; height: 210px; transform: translateX(-50%) rotate(-6deg); background: linear-gradient(#f3e6c8, #d8c18f); box-shadow: 0 10px 40px rgba(0,0,0,.6); animation: burnl 7s ease-in infinite; }
@keyframes burnl { 0%, 15% { clip-path: inset(0 0 0 0); filter: none; } 80% { clip-path: inset(100% 0 0 0); filter: brightness(1.8) sepia(1) saturate(4); } 100% { clip-path: inset(100% 0 0 0); } }
.fx .burn .flame { position: absolute; left: 50%; top: 56%; width: 30px; height: 60px; margin-left: -15px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff7c2, #ffb347 55%, transparent 70%); filter: blur(1px) drop-shadow(0 0 24px #ffb347); animation: flick .18s infinite alternate; }
@keyframes flick { from { transform: scale(1, 1) rotate(-3deg); } to { transform: scale(.88, 1.12) rotate(3deg); } }
.fx .ball .sp { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--gold2); box-shadow: 0 0 12px var(--gold2); animation: twinkle 2.5s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(2.4); opacity: .2; } }
.fx .dream { position: absolute; inset: 0; background: repeating-radial-gradient(circle at 70% 40%, rgba(217,201,74,.14) 0 8px, rgba(91,44,131,.2) 8px 22px); mix-blend-mode: color-dodge; animation: dreamspin 9s linear infinite; }
@keyframes dreamspin { to { transform: rotate(360deg) scale(1.4); } }
.fx .qz { position: absolute; left: 50%; top: 40%; width: 110px; height: 150px; margin-left: -55px; background: linear-gradient(135deg, rgba(255,230,230,.7), rgba(217,166,160,.35)); clip-path: polygon(50% 0, 100% 24%, 100% 76%, 50% 100%, 0 76%, 0 24%); filter: drop-shadow(0 0 40px #ffb7a0); animation: spin2 9s linear infinite; }
@keyframes spin2 { to { transform: rotateY(360deg); } }
.fx .cuc .ac { position: absolute; left: 50%; top: 42%; transform: translateX(-50%); font-family: var(--disp); font-style: italic; font-size: clamp(40px, 8vw, 120px); color: #e9f5c9; text-shadow: 0 0 40px #6ab04c; animation: shout 3s ease-in-out infinite; }
.cs-movs { display: flex; gap: 4px 20px; flex-wrap: wrap; margin-top: 18px; }
.cs-movs button { padding: 6px 0; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--hair); transition: .3s; }
.cs-movs button:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* chapter VII + VIII ------------------------------------------------------ */
.panels { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 22px; }
.pnl { position: relative; aspect-ratio: 2.39/1; overflow: hidden; background: var(--g); padding: 12px 14px; font-size: 15px; line-height: 1.3; color: #fff7e6; text-shadow: 0 1px 8px rgba(0,0,0,.9); display: flex; align-items: flex-end; transition: transform .5s var(--ease); }
.pnl:hover { transform: scale(1.03); z-index: 3; }
.pnl .pn { position: absolute; top: 4px; left: 12px; font-family: var(--disp); font-style: italic; font-size: 32px; opacity: .9; }
.pnl::before { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,.72), transparent 72%); }
.pnl span { position: relative; }
#seqView > div { padding: 8px 0; }
#seqView h3 { font-size: clamp(30px, 3.4vw, 52px); font-style: italic; }
.keyframe { margin-top: 28px; padding: 24px 0 0; border-top: 1px solid var(--line); }
.keyframe h4 { font-style: italic; font-size: 26px; color: var(--accent); margin-bottom: 6px; }
.promptbox { margin-top: 12px; border-left: 2px solid var(--accent); background: var(--card); padding: 12px 16px; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--fg); max-height: 130px; overflow: auto; white-space: pre-wrap; }
.sys { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px 36px; margin: 28px 0; }
.sys pre { white-space: pre-wrap; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: var(--fg); background: var(--card); padding: 14px; border-left: 2px solid var(--accent); max-height: 260px; overflow: auto; margin: 8px 0 10px; }
#plib { gap: 4px 30px !important; }
#plib .card { padding-bottom: 14px; }

/* modal + toast ----------------------------------------------------------- */
#modal { position: fixed; inset: 0; z-index: 150; display: none; background: rgba(8,6,5,.88); backdrop-filter: blur(6px); overflow-y: auto; padding: 5vh 4vw; }
#modal.on { display: block; }
#modal .box { max-width: 980px; margin: 0 auto; background: var(--ink); border: 1px solid var(--line); padding: clamp(20px, 3.4vw, 50px); position: relative; color: var(--paper); }
#modal .x { position: absolute; right: 16px; top: 8px; font-size: 36px; color: var(--gold2); }
#modal h2 { font-size: 44px; font-style: italic; }
#modal .kicker { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold2); margin-bottom: 8px; }
#modal .row { display: grid; grid-template-columns: 220px 1fr; gap: 28px; margin-top: 14px; }
@media (max-width: 700px) { #modal .row { grid-template-columns: 1fr; } }
#modal .lock { font-family: var(--mono); font-size: 12.5px; line-height: 1.5; background: rgba(236,227,207,.05); border-left: 2px solid var(--gold); padding: 10px 12px; margin: 10px 0; }
#modal .nae { color: #e4a594; }
#modal .promptbox { color: var(--paper); }
#toast { position: fixed; z-index: 220; bottom: 28px; left: 50%; transform: translate(-50%, 90px); background: var(--paper); color: var(--ink); padding: 11px 26px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; transition: transform .5s var(--ease); box-shadow: 0 8px 30px rgba(0,0,0,.5); border-bottom: 2px solid var(--gold); }
#toast.on { transform: translate(-50%, 0); }
footer { position: relative; padding: clamp(70px, 9vw, 130px) 20px 110px; border-top: 1px solid var(--hair); background: var(--ink); color: var(--paper); text-align: left; }
footer > * { max-width: 1360px; margin-left: auto; margin-right: auto; padding: 0 clamp(0px, 4vw, 70px); }
footer h3 { font-style: italic; font-weight: 300; font-size: clamp(60px, 11vw, 170px); line-height: .9; color: var(--gold2); margin-bottom: 22px; }
footer p { color: var(--muted); max-width: 720px; margin-left: max(0px, calc((100% - 1360px) / 2)); font-size: 16px; }
footer code { font-family: var(--mono); font-size: 12.5px; }

/* lightbox ----------------------------------------------------------------- */
#lb { position: fixed; inset: 0; z-index: 200; display: none; background: #0a0807; flex-direction: column; color: var(--paper); }
#lb.on { display: flex; }
#lb .lb-top { display: flex; align-items: center; gap: 14px; padding: 12px clamp(14px, 3vw, 36px); border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
#lb .lb-cap { flex: 1; min-width: 200px; font-family: var(--disp); font-style: italic; font-size: 24px; }
#lb .lb-cap b { font-family: var(--text); font-style: normal; font-weight: 500; letter-spacing: .2em; font-size: 12px; color: var(--gold2); margin-right: 8px; }
#lb .lb-cap small { opacity: .55; margin-left: 12px; font-family: var(--text); font-size: 13px; font-style: normal; letter-spacing: .1em; }
#lb button { color: var(--paper); border: 1px solid var(--hair); padding: 6px 13px; font-size: 14px; letter-spacing: .1em; }
#lb button:hover { background: var(--paper); color: var(--ink); }
#lb .lb-ctl { display: flex; gap: 6px; align-items: center; }
#lb #lbZ { min-width: 52px; text-align: center; color: var(--gold2); font-size: 14px; }
#lb .lb-stage { flex: 1; position: relative; overflow: hidden; display: grid; place-items: center; cursor: grab; touch-action: none; min-height: 0; }
#lb .lb-stage.drag { cursor: grabbing; }
#lb .lb-stage img { max-width: 96%; max-height: 96%; user-select: none; will-change: transform; transform-origin: center; box-shadow: 0 20px 80px rgba(0,0,0,.6); }
#lb .lb-nav { position: absolute; top: 46%; transform: translateY(-50%); font-size: 40px; line-height: 1; padding: 8px 16px; z-index: 3; background: rgba(10,8,7,.5); }
#lb .lb-nav.prev { left: 10px; } #lb .lb-nav.next { right: 10px; }
#lb .lb-foot { padding: 12px clamp(14px, 3vw, 36px) 16px; border-top: 1px solid var(--hair); display: flex; gap: 18px 40px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
#lb .lbf-t { flex: 1 1 380px; font-size: 16px; line-height: 1.45; opacity: .9; max-height: 4.4em; overflow: auto; }
#lb .lbf-r { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
#lb .lbf-r .chips { margin: 0; } #lb .lbf-r .chips i { width: 20px; height: 20px; }
#lb .lbf-s { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold2); max-width: 220px; }
#lb .btn { border-color: var(--gold); color: var(--gold2); padding: 7px 16px; }
#lb .btn:hover { background: var(--gold); color: var(--ink); }
@media (max-width: 700px) { #lb .lb-nav { font-size: 30px; padding: 6px 10px; top: 40%; } #lb .lb-cap { font-size: 19px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .reveal, .cap.reveal, .spread .art.reveal { opacity: 1 !important; transform: none !important; }
  .hs img { animation: none !important; transform: none; }
  .op-bg img { transform: none !important; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  section.chapter { padding-left: 18px; padding-right: 18px; }
  .sub { font-size: 30px; }
  .compare { aspect-ratio: 4/5; } .compare ul { columns: 1; font-size: 14px; }
  .qc { font-size: 14px; } .qc th, .qc td { padding-right: 8px; }
  .tabs { gap: 4px 16px; }
  .cs-hud { top: 74px; max-width: 80vw; } .cs-gauge { display: none; } .cs-play { bottom: 112px; }
  .cs-n { font-size: 34vw; }
  footer > * { padding: 0; }
}

/* Frame Film logo (white on dark chrome) */
header.top .ff { display:block; flex:0 0 auto; line-height:0; opacity:.92 }
header.top .ff img { width:124px; height:auto; display:block }
footer .ff-foot { width:124px; height:auto; display:block; margin-bottom:22px; opacity:.92 }
@media (max-width: 760px) { header.top .ff img { width:92px } }
