/* Phong cách D: "Phim tài liệu Phục Hưng" (giấy da + cảnh tối điện ảnh).
   Khung thiết kế 1920x1080: 1rem = 10px thiết kế, tự co giãn theo mọi màn hình. */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: calc(min(100vw, 177.7778vh) / 192); -webkit-text-size-adjust: 100%; }
html, body { margin: 0; height: 100%; }
body { overflow: hidden; background: #120C06; color: #2A1A0C; font-family: 'Ysabeau Office', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img, svg, iframe, canvas { display: block; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { text-wrap: balance; font-weight: inherit; }
p, li, figcaption, blockquote { text-wrap: pretty; }

:root {
  --parch: #EADDC2; --ink: #2A1A0C; --ink-2: #4E3820; --ink-3: rgba(42, 26, 12, .66);
  --rust: #8E3B1C; --sepia: #7A5230; --gold: #B8862E; --gold-hi: #E7C982; --gold-lo: #7E5A1C;
  --dark: #1A1109; --cream: #F4EAD5; --cream-2: rgba(244, 234, 213, .82);
  --blue: #2B4F9E; --c1: #8E2A3A; --c2: #2F55B0; --c3: #B07F22; --c4: #2E6E58;
}
.tw { font-family: 'Xanh Mono', ui-monospace, monospace; font-weight: 400; }
.pf { font-family: 'Playfair Display', Georgia, serif; }

/* ---------- slides ---------- */
#deck { position: fixed; inset: 0; overflow: hidden; background: #120C06; }
.slide { position: absolute; inset: 0; overflow: hidden; visibility: hidden; }
.slide.is-on, .slide.is-warm { visibility: visible; }
.slide.is-on { z-index: 1; }
.slide.is-prewarm { visibility: visible; opacity: .01; z-index: 0; pointer-events: none; }
.slide.is-warm { opacity: 0 !important; }
.bgw { position: absolute; inset: -2%; will-change: transform; }
.bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ink { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg-codex { background-image: url(../img/bg-codex-base.jpg); }
.bg-engrave { background-image: url(../img/bg-engrave-base.jpg); }
.bg-plain { background-image: url(../img/bg-plain-base.jpg); }
.bg-dark { background-image: url(../img/bg-dark-base.jpg); }
.frame { position: absolute; left: 50%; top: 50%; width: 192rem; height: 108rem; transform: translate(-50%, -50%); }
.dark { color: var(--cream); }

/* ---------- shared pieces ---------- */
.hd { position: absolute; left: 9.6rem; top: 6.4rem; right: 9.6rem; }
.hd .chap { font-size: 2.8rem; color: var(--rust); letter-spacing: .02em; }
.dark .hd .chap { color: var(--gold-hi); }
.hd h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 8.4rem; line-height: 1.06; margin-top: .8rem; color: var(--ink); }
.dark .hd h2 { color: var(--cream); }
.hd .yrs { display: block; margin-top: 1rem; font-family: 'Xanh Mono', monospace; font-weight: 400; font-size: 5.2rem; line-height: 1; color: var(--rust); white-space: nowrap; }
.flow { position: absolute; left: 9.6rem; top: 6.4rem; width: 92rem; display: flex; flex-direction: column; gap: 4.4rem; }
.flow .hd { position: static; }
.L-map .flow { width: 80rem; left: 5.6rem; } .L-portrait .flow { width: 90rem; } .L-split .flow { width: 92rem; }
.L-fullphoto .flow { width: 88rem; left: 5.6rem; } .L-aerial .flow { width: 72rem; left: 5.6rem; } .L-model3d .flow { width: 70rem; left: 5.6rem; }
.L-model3d .frame { z-index: 3; }
.dark .hd .yrs { color: var(--gold-hi); }
.pts { display: grid; gap: 2.6rem; }
.pts li { position: relative; padding-left: 5.2rem; font-size: 4.2rem; line-height: 1.28; font-weight: 600; color: var(--ink); }
.pts li::before { content: ''; position: absolute; left: .6rem; top: 1.9rem; width: 1.8rem; height: 1.8rem; background: var(--rust); transform: rotate(45deg); }
.dark .pts li { color: var(--cream); }
.dark .pts li::before { background: var(--gold-hi); }
.src { display: none; }
.dark .src { color: rgba(244, 234, 213, .6); }

/* pinned photo, like a print taped onto the parchment */
.ph { position: absolute; padding: 1.4rem 1.4rem 5.2rem; background: #F7F0E1; box-shadow: 0 2.4rem 4.8rem rgba(35, 20, 6, .38), 0 .4rem 1rem rgba(35, 20, 6, .22); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph figcaption { position: absolute; left: 1.6rem; right: 1.6rem; bottom: 1.4rem; font-size: 2.2rem; line-height: 1.15; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph::before { content: ''; position: absolute; left: 50%; top: -1.8rem; width: 14rem; height: 4rem; margin-left: -7rem; background: rgba(226, 210, 170, .72); box-shadow: 0 .2rem .6rem rgba(0, 0, 0, .12); transform: rotate(-3deg); }
.ph.fig { padding-bottom: 4.6rem; }
.ph.fig img { object-fit: contain; background: #fff; }

/* ---------- title ---------- */
.L-title .photo { position: absolute; inset: -3%; background: url(../img/chambord-facade.jpg) center 44% / cover; filter: brightness(.42) saturate(.7) sepia(.35) contrast(1.08); }
.L-title .shade { position: absolute; inset: 0; background: radial-gradient(70% 40% at 50% 42%, rgba(26, 17, 9, .55), rgba(26, 17, 9, 0) 100%), radial-gradient(120% 95% at 50% 40%, rgba(26, 17, 9, 0) 40%, rgba(26, 17, 9, .9) 100%); }
.L-title .dust { position: absolute; inset: 0; width: 100%; height: 100%; }
.L-title .kick { position: absolute; left: 0; right: 0; top: 22rem; text-align: center; font-size: 4rem; letter-spacing: .14em; color: var(--gold-hi); }
.L-title h1 { position: absolute; left: 0; right: 0; top: 28.4rem; text-align: center; font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 14.4rem; line-height: 1.12; color: var(--gold-hi); filter: drop-shadow(0 .6rem 1.8rem rgba(0, 0, 0, .6)); }
.L-title h1 .w { display: inline-block; padding: 0 .04em; background: linear-gradient(100deg, #C9A04A 0%, #EBD08A 30%, #C9A04A 44%, #FFF6DA 50%, #C9A04A 56%, #EBD08A 70%, #C9A04A 100%); background-size: 300% 100%; background-position: 100% 0; -webkit-background-clip: text; background-clip: text; color: transparent; }
.L-title .rule { position: absolute; left: 50%; top: 61rem; width: 100rem; height: 2px; margin-left: -50rem; background: linear-gradient(90deg, rgba(231, 201, 130, 0), var(--gold-hi), rgba(231, 201, 130, 0)); }
.L-title .sub { position: absolute; left: 0; right: 0; top: 64.4rem; text-align: center; font-size: 4.6rem; font-weight: 600; color: var(--cream); }
.L-title .people { position: absolute; left: 50%; bottom: 7.2rem; transform: translateX(-50%); display: grid; grid-template-columns: repeat(2, auto); gap: 2.4rem 12rem; }
.L-title .people div { text-align: center; }
.L-title .people span { display: block; font-size: 2.4rem; color: var(--gold-hi); }
.L-title .people b { display: block; margin-top: .6rem; font-size: 3.4rem; font-weight: 700; color: var(--cream); white-space: nowrap; }

/* ---------- agenda ---------- */
.L-agenda .hd h2 { font-size: 9.6rem; }
.L-agenda ol { position: absolute; left: 9.6rem; top: 25rem; width: 150rem; display: grid; gap: 2.2rem; counter-reset: a; }
.L-agenda li { display: grid; grid-template-columns: 10rem 1fr; align-items: baseline; font-size: 5rem; font-weight: 700; color: var(--ink); line-height: 1.2; padding-bottom: 2rem; border-bottom: 2px solid rgba(42, 26, 12, .14); }
.L-agenda li .n { font-family: 'Xanh Mono', monospace; font-weight: 400; font-size: 5.2rem; color: var(--rust); }
.L-agenda li:last-child { color: var(--rust); border-bottom: 0; }

/* ---------- chapter card ---------- */
.L-chapter .center { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; }
.L-chapter .num { font-size: 8rem; color: var(--rust); line-height: 1; }
.L-chapter h2 { margin-top: 2.4rem; font-family: 'Xanh Mono', monospace; font-weight: 400; font-size: 12.8rem; line-height: 1.1; color: var(--ink); text-shadow: 0 0 .2rem rgba(42, 26, 12, .35); }
.L-chapter .sub { margin-top: 3.2rem; font-size: 4.4rem; font-weight: 600; color: var(--ink-2); }
.L-chapter .caret { display: inline-block; width: .55em; height: .9em; margin-left: .08em; vertical-align: -0.1em; background: var(--ink); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- map ---------- */
.L-map .stage3d { position: absolute; inset: 0; perspective: 160rem; perspective-origin: 60% 30%; overflow: hidden; }
.L-map .plane { position: absolute; left: 76%; top: 46%; width: 150rem; height: 111.3rem; margin: -55.6rem 0 0 -75rem; transform-origin: 36% 60%; box-shadow: 0 6rem 12rem rgba(0, 0, 0, .6); }
.L-map .plane { transform-style: preserve-3d; }
.L-map .plane img { width: 100%; height: 100%; filter: sepia(.45) saturate(.85) contrast(1.05) brightness(.95); }
.L-map .ship { position: absolute; width: 11rem; height: 11rem; margin: -10.4rem 0 0 -5.5rem; transform-origin: 50% 95%; }
.L-map .ship .sv { width: 100%; height: 100%; } .L-map .ship svg { width: 100%; height: 100%; } .L-map .sv.flip svg { transform: scaleX(-1); }
.L-map .shd { position: absolute; width: 10rem; height: 2.4rem; margin: -1.2rem 0 0 -5rem; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 25, 10, .5), rgba(40, 25, 10, 0)); }
.L-map .spark { fill: #FFE9B0; filter: drop-shadow(0 0 14px rgba(255, 170, 80, 1)); }
.L-map .plane svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.L-map .route { fill: none; stroke: #C2401E; stroke-width: 14; stroke-linecap: round; filter: drop-shadow(0 0 10px rgba(255, 120, 60, .7)); }
.L-map .city { fill: #C2401E; stroke: #FFF2D8; stroke-width: 6; }
.L-map .ring { fill: none; stroke: #C2401E; stroke-width: 5; }
.L-map .lab { font: 400 92px 'Xanh Mono', monospace; fill: #2A1A0C; paint-order: stroke; stroke: #F4EAD5; stroke-width: 14px; stroke-linejoin: round; }
.L-map .tilt-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(26, 17, 9, .92) 0%, rgba(26, 17, 9, 0) 34%, rgba(26, 17, 9, 0) 70%, rgba(26, 17, 9, .85) 100%), linear-gradient(90deg, rgba(26, 17, 9, .96) 0%, rgba(26, 17, 9, .82) 30%, rgba(26, 17, 9, 0) 52%); }
.L-map .txt { position: absolute; left: 9.6rem; top: 24rem; width: 76rem; }
.L-map .txt .pts li { font-size: 4rem; }

/* ---------- two periods ---------- */
.L-periods2 .cols { position: absolute; left: 9.6rem; right: 9.6rem; top: 25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 6.4rem; }
.L-periods2 .card { position: relative; padding: 4rem 4.4rem 4.4rem; background: rgba(247, 240, 225, .7); border: 2px solid rgba(42, 26, 12, .28); box-shadow: 0 2rem 4rem rgba(35, 20, 6, .16); }
.L-periods2 .card.on { border-color: var(--rust); box-shadow: 0 0 0 .4rem rgba(142, 59, 28, .18), 0 2rem 4rem rgba(35, 20, 6, .2); }
.L-periods2 .card .y { font-size: 3.6rem; color: var(--rust); }
.L-periods2 .card h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 6rem; line-height: 1.08; margin: .8rem 0 3.2rem; }
.L-periods2 .card .pts { gap: 2rem; }
.L-periods2 .card .pts li { font-size: 3.6rem; }
.L-periods2 .tag { position: absolute; right: 3.2rem; top: 3.2rem; font-size: 2.4rem; color: #F7F0E1; background: var(--rust); padding: .4rem 1.4rem; }

/* ---------- portrait / split ---------- */
.L-portrait .txt, .L-split .txt { position: absolute; left: 9.6rem; top: 25.6rem; width: 92rem; }
.L-portrait .hd h2 { font-size: 7.6rem; max-width: 110rem; }
.L-portrait .main { left: 118rem; top: 12rem; width: 52rem; height: 70rem; transform: rotate(2deg); }
.L-portrait .mini { width: 28rem; height: 32rem; }
.L-portrait .mini.m1 { left: 104rem; top: 66rem; transform: rotate(-6deg); }
.L-portrait .mini.m2 { left: 158rem; top: 70rem; transform: rotate(5deg); }
.L-split .main { left: 116rem; top: 8.8rem; width: 60rem; height: 80rem; transform: rotate(1.6deg); }
.L-split .fig { left: 102rem; top: 70rem; width: 38rem; height: 30rem; transform: rotate(-4deg); }

/* ---------- timeline ---------- */
.L-timeline3 .lead { position: absolute; left: 9.6rem; top: 19rem; font-size: 3.8rem; font-weight: 600; color: var(--ink-2); }
.L-timeline3 svg.line { position: absolute; left: 0; top: 42rem; width: 192rem; height: 8rem; overflow: visible; }
.L-timeline3 svg.line path { stroke: var(--ink); stroke-width: 3; fill: none; }
.L-timeline3 .node { position: absolute; top: 46rem; width: 54rem; transform: translateX(-50%); text-align: center; }
.L-timeline3 .node.n1 { left: 33rem; } .L-timeline3 .node.n2 { left: 96rem; } .L-timeline3 .node.n3 { left: 159rem; }
.L-timeline3 .dot { display: block; width: 3.6rem; height: 3.6rem; margin: -1.8rem auto 0; background: var(--parch); border: .5rem solid var(--rust); transform: rotate(45deg); }
.L-timeline3 .y { margin-top: 3.2rem; font-size: 7.2rem; color: var(--rust); line-height: 1; }
.L-timeline3 h3 { margin-top: 2rem; font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 5rem; line-height: 1.1; }
.L-timeline3 .d { margin-top: 1.6rem; font-size: 3.6rem; line-height: 1.3; font-weight: 600; color: var(--ink-2); }
.L-timeline3 .node { transition: opacity .45s cubic-bezier(.22, 1, .36, 1); }
.L-timeline3 .node.dim { opacity: .42; }
.L-timeline3 svg.loops { position: absolute; left: 0; top: 0; width: 192rem; height: 108rem; overflow: visible; pointer-events: none; }
.L-timeline3 .loop { fill: none; stroke: var(--rust); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- formula ---------- */
.L-formula .sub { position: absolute; left: 9.6rem; top: 18.6rem; font-size: 4rem; font-weight: 700; color: var(--rust); }
.L-formula .engr { position: absolute; left: 50%; top: 24.4rem; width: 168rem; height: 43.7rem; margin-left: -84rem; overflow: visible; }
.L-formula .engr .al { fill: none; stroke: var(--rust); stroke-width: 5; }
.L-formula .engr .ad { fill: var(--rust); }
.L-formula .engr .at { font: 700 70px 'Ysabeau Office', sans-serif; fill: var(--rust); }
.L-formula .cols { position: absolute; left: 9.6rem; right: 9.6rem; top: 70rem; display: grid; grid-template-columns: 1fr auto 1fr; gap: 4rem; align-items: start; }
.L-formula .col h3 { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 4.8rem; margin-bottom: 2rem; }
.L-formula .col .pts { gap: 1.4rem; }
.L-formula .col .pts li { font-size: 3.6rem; }
.L-formula .plus { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 12rem; line-height: .9; color: var(--rust); }
.L-formula .cap { position: absolute; right: 9.6rem; top: 66rem; font-size: 2.2rem; color: var(--ink-3); }

/* ---------- compare ---------- */
.L-compare .sub { position: absolute; left: 9.6rem; top: 18.6rem; font-size: 3.6rem; font-weight: 700; color: var(--rust); }
.L-compare .cmp { position: absolute; left: 6.4rem; right: 6.4rem; top: 25rem; bottom: 4.8rem; display: grid; grid-template-columns: 22rem 1fr 1fr; grid-template-rows: 33rem repeat(5, 1fr); column-gap: 2.4rem; }
.L-compare .cimg { position: relative; margin-bottom: 1.6rem; padding: 1rem; background: #F7F0E1; box-shadow: 0 2rem 4rem rgba(35, 20, 6, .35); }
.L-compare .cimg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.L-compare .cimg figcaption { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; padding: 4rem 2.4rem 1.6rem; background: linear-gradient(180deg, rgba(26, 17, 9, 0), rgba(26, 17, 9, .85)); color: var(--cream); }
.L-compare .cimg figcaption b { display: block; font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 5rem; line-height: 1.05; }
.L-compare .cimg figcaption span { display: block; margin-top: .6rem; font-size: 2.4rem; color: var(--gold-hi); }
.L-compare .k, .L-compare .v { display: flex; align-items: center; border-bottom: 2px solid rgba(42, 26, 12, .16); }
.L-compare .k { font-size: 3.6rem; color: var(--rust); }
.L-compare .v { padding: 0 1.2rem; font-size: 3.8rem; font-weight: 700; line-height: 1.22; color: var(--ink); }
.L-compare .v.it { color: var(--ink-2); }

/* ---------- full photo (dark) ---------- */
.L-fullphoto .photo { position: absolute; inset: -2%; background-size: cover; background-position: 60% 55%; }
.L-fullphoto .shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(26, 17, 9, .95) 0%, rgba(26, 17, 9, .86) 34%, rgba(26, 17, 9, .25) 60%, rgba(26, 17, 9, 0) 75%), linear-gradient(180deg, rgba(26, 17, 9, .4), rgba(26, 17, 9, 0) 30%, rgba(26, 17, 9, 0) 80%, rgba(26, 17, 9, .5)); }
.L-fullphoto .txt { position: absolute; left: 9.6rem; top: 25.6rem; width: 84rem; }
.L-fullphoto .fig { right: 6.4rem; bottom: 6.4rem; width: 40rem; height: 27rem; transform: rotate(3deg); }

/* ---------- aerial (Chambord) ---------- */
.L-aerial .aer { position: absolute; top: 0; right: 0; width: 60%; height: 100%; }
.L-aerial .fade { position: absolute; top: 0; bottom: 0; left: 39.5%; width: 9%; background: linear-gradient(90deg, var(--dark), rgba(26, 17, 9, 0)); }
.L-aerial .ov { fill: none; stroke-width: 9; stroke-linejoin: round; filter: drop-shadow(0 0 6px rgba(0, 0, 0, .7)); }
.L-aerial .o1 { stroke: #A9C1FF; } .L-aerial .o2 { stroke: var(--gold-hi); }
.L-aerial .bd circle { fill: rgba(26, 17, 9, .85); stroke-width: 5; }
.L-aerial .b1 circle { stroke: #A9C1FF; } .L-aerial .b2 circle { stroke: var(--gold-hi); }
.L-aerial .bd text { font: 700 54px 'Playfair Display', serif; text-anchor: middle; }
.L-aerial .b1 text { fill: #A9C1FF; } .L-aerial .b2 text { fill: var(--gold-hi); }
.L-aerial .txt { position: absolute; left: 9.6rem; top: 25.6rem; width: 70rem; }
.L-aerial .pts li { font-size: 3.9rem; }
.L-aerial .fig { right: 5.6rem; bottom: 5.6rem; width: 34rem; height: 25rem; transform: rotate(3deg); }

/* ---------- plan ---------- */
.L-plan .plan { position: absolute; left: 6.4rem; top: 8rem; width: 104rem; }
.L-plan .plan svg { width: 100%; height: auto; overflow: visible; }
.L-plan .o { fill: none; stroke-linejoin: round; }
.L-plan .o1 { stroke: var(--blue); stroke-width: 12; } .L-plan .o1t { stroke: var(--blue); stroke-width: 7; }
.L-plan .o2 { stroke: var(--gold); stroke-width: 12; fill: rgba(184, 134, 46, .16); fill-opacity: 0; } .L-plan .o2t { stroke: var(--gold); stroke-width: 7; }
.L-plan .o3 { stroke: var(--rust); stroke-width: 10; fill: rgba(142, 59, 28, .2); }
.L-plan .ox { stroke: var(--gold); stroke-width: 6; }
.L-plan .bd circle { fill: var(--parch); stroke-width: 7; }
.L-plan .bd text { font: 800 60px 'Playfair Display', serif; text-anchor: middle; }
.L-plan .bd.k1 circle { stroke: var(--blue); } .L-plan .bd.k1 text { fill: var(--blue); }
.L-plan .bd.k2 circle { stroke: var(--gold); } .L-plan .bd.k2 text { fill: var(--gold); }
.L-plan .bd.k3 circle { stroke: var(--rust); } .L-plan .bd.k3 text { fill: var(--rust); }
.L-plan .cap { margin-top: 1rem; font-size: 2.2rem; color: var(--ink-3); }
.L-plan .col { position: absolute; left: 116rem; top: 7.2rem; width: 68rem; }
.L-plan .col .chap { font-size: 2.8rem; color: var(--rust); }
.L-plan .col h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 7.6rem; line-height: 1.06; margin-top: .8rem; }
.L-plan blockquote { margin-top: 3.2rem; padding-left: 2.8rem; border-left: .6rem solid var(--gold); font-size: 4rem; font-weight: 700; line-height: 1.25; }
.L-plan cite { display: block; margin-top: 1rem; font-size: 2.4rem; font-style: normal; color: var(--ink-3); }
.L-plan .nl { margin-top: 4rem; display: grid; gap: 2.4rem; }
.L-plan .nl li { display: grid; grid-template-columns: 6rem 1fr; gap: 2rem; align-items: start; font-size: 3.6rem; font-weight: 600; line-height: 1.26; }
.L-plan .nl .n { width: 6rem; height: 6rem; border-radius: 50%; border: .45rem solid currentColor; display: grid; place-items: center; font-family: 'Playfair Display', serif; font-weight: 800; font-size: 3.2rem; }
.L-plan .nl li:nth-child(1) .n { color: var(--blue); } .L-plan .nl li:nth-child(2) .n { color: var(--gold); } .L-plan .nl li:nth-child(3) .n { color: var(--rust); }

/* ---------- 3D ---------- */
.L-model3d .m3d, .L-model3d .poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.L-model3d .poster { background: url(../img/chambord-aerial.jpg) 60% 50% / cover; filter: brightness(.75) sepia(.2); opacity: 0; }
.L-model3d.use-poster .poster { opacity: 1; }
.L-model3d.use-poster .m3d { visibility: hidden; }
.L-model3d .shield { position: absolute; inset: 0; z-index: 2; }
.L-model3d .vig { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(26, 17, 9, .9) 0%, rgba(26, 17, 9, .55) 30%, rgba(26, 17, 9, 0) 50%), radial-gradient(100% 90% at 60% 50%, rgba(26, 17, 9, 0) 55%, rgba(26, 17, 9, .8) 100%); }
.L-model3d .hd, .L-model3d .txt, .L-model3d .credit, .L-model3d .loading { z-index: 3; }
.L-model3d .txt { position: absolute; left: 9.6rem; top: 34rem; width: 66rem; }
.L-model3d .credit { position: absolute; right: 6.4rem; bottom: 4.4rem; font-size: 2.2rem; color: rgba(244, 234, 213, .6); }
.L-model3d .loading { position: absolute; left: 60%; top: 50%; transform: translate(-50%, -50%); font-size: 2.8rem; color: rgba(244, 234, 213, .6); }

/* ---------- 1946 document ---------- */
.L-date .doc { position: absolute; left: 9.6rem; top: 10rem; width: 100rem; padding: 5.6rem 6.4rem 6.4rem; background: rgba(247, 240, 225, .82); box-shadow: 0 2.4rem 4.8rem rgba(35, 20, 6, .25); transform: rotate(-.8deg); }
.L-date .doc .chap { font-size: 2.6rem; color: var(--rust); }
.L-date .doc .dt { font-size: 13rem; line-height: 1; color: var(--rust); margin-top: 1.6rem; letter-spacing: -.02em; }
.L-date .doc h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 6.4rem; line-height: 1.1; margin-top: 2rem; }
.L-date .doc .pts { margin-top: 3.2rem; gap: 2rem; }
.L-date .doc .pts li { font-size: 3.6rem; }
.L-date .main { left: 116rem; top: 22rem; width: 68rem; height: 44rem; transform: rotate(3deg); }
.L-date .stamp { position: absolute; left: 134rem; top: 74rem; padding: 1.6rem 3.2rem; border: .7rem double var(--rust); color: var(--rust); font-size: 5.2rem; transform: rotate(-9deg); mix-blend-mode: multiply; opacity: .85; }

/* ---------- Lescot ---------- */
.L-lescot .pic { position: absolute; left: 0; top: 0; width: 62%; height: 100%; background-size: cover; background-position: 50% 40%; }
.L-lescot .pic::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(26, 17, 9, 0) 70%, var(--dark) 100%); }
.L-lescot .labels { position: absolute; left: 0; top: 0; width: 62%; height: 100%; }
.L-lescot .lab { position: absolute; right: 3.2rem; display: flex; align-items: center; gap: 1.2rem; transform: translateY(-50%); }
.L-lescot .lab i { width: 18rem; height: 3px; background: var(--gold-hi); box-shadow: 0 0 1rem rgba(0, 0, 0, .6); }
.L-lescot .lab b { padding: .8rem 1.8rem; background: rgba(26, 17, 9, .86); border: 2px solid var(--gold-hi); color: var(--cream); font-size: 2.8rem; font-weight: 700; white-space: nowrap; }
.L-lescot .hd { left: 124rem; top: 10rem; right: 6.4rem; }
.L-lescot .hd h2 { font-size: 6.8rem; }
.L-lescot .hd .yrs { display: block; margin: 1.2rem 0 0; font-size: 4.4rem; }
.L-lescot .txt { position: absolute; left: 124rem; top: 44rem; width: 62rem; }
.L-lescot .pts { gap: 2rem; }
.L-lescot .pts li { font-size: 3.4rem; }
.L-lescot .src { left: 124rem; }

/* ---------- decline ---------- */
.L-decline .big { position: absolute; left: 9.6rem; top: 31rem; font-size: 15rem; line-height: 1; color: var(--rust); }
.L-decline .big small { display: block; margin-top: 2.4rem; font-family: 'Ysabeau Office', sans-serif; font-weight: 700; font-size: 4rem; color: var(--ink-2); }
.L-decline .txt { position: absolute; left: 92rem; top: 27rem; width: 90rem; }
.L-decline .pts li { font-size: 3.9rem; }

/* ---------- summary ---------- */
.L-summary ol { position: absolute; left: 9.6rem; top: 23rem; width: 172rem; display: grid; gap: 2.2rem; }
.L-summary li { display: grid; grid-template-columns: 8rem 1fr; align-items: center; font-size: 4rem; font-weight: 700; line-height: 1.22; }
.L-summary li .n { font-family: 'Xanh Mono', monospace; font-weight: 400; font-size: 5rem; color: var(--rust); }
.L-summary .tag { position: absolute; left: 9.6rem; right: 9.6rem; top: 82rem; padding-top: 3.2rem; border-top: 3px solid var(--ink); font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 5.2rem; line-height: 1.2; color: var(--rust); }
.L-summary .tag .w { display: inline-block; }

/* ---------- thanks ---------- */
.L-thanks .photo { position: absolute; inset: -3%; background: url(../img/chambord-facade.jpg) center 46% / cover; filter: brightness(.36) saturate(.6) sepia(.4); }
.L-thanks .shade { position: absolute; inset: 0; background: radial-gradient(120% 95% at 50% 45%, rgba(26, 17, 9, .1) 30%, rgba(26, 17, 9, .9) 100%); }
.L-thanks h2 { position: absolute; left: 0; right: 0; top: 30rem; text-align: center; font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 10.4rem; line-height: 1.12; color: var(--gold-hi); text-shadow: 0 .6rem 2.4rem rgba(0, 0, 0, .55); padding: 0 12rem; }
.L-thanks .sub { position: absolute; left: 0; right: 0; top: 60rem; text-align: center; font-size: 5.6rem; color: var(--cream); }
.L-thanks .credits { position: absolute; left: 14rem; right: 14rem; bottom: 6.4rem; display: grid; gap: .8rem; font-size: 2.1rem; color: rgba(244, 234, 213, .62); text-align: center; }

/* ---------- quiz (host screen) ---------- */
.L-quiz .qz > section { position: absolute; inset: 0; display: none; }
.L-quiz .qz > section.on { display: block; }
.L-quiz .gt { position: absolute; left: 9.6rem; top: 5.6rem; font-size: 3rem; color: var(--gold-hi); }
.qz-lobby .lt { position: absolute; left: 9.6rem; top: 11rem; width: 92rem; }
.qz-lobby h2 { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 8.8rem; line-height: 1.06; color: var(--cream); }
.qz-lobby .how { margin-top: 3.6rem; display: grid; gap: 1.8rem; }
.qz-lobby .how li { font-size: 3.6rem; font-weight: 600; color: var(--cream); padding-left: 5.2rem; position: relative; line-height: 1.25; }
.qz-lobby .how li::before { content: attr(data-n); position: absolute; left: 0; top: 0; font-family: 'Xanh Mono', monospace; color: var(--gold-hi); }
.qz-lobby .warn { margin-top: 3.6rem; padding: 2rem 2.8rem; border: 2px solid #E07A85; background: rgba(110, 31, 43, .55); color: #FBE9EA; font-size: 3rem; font-weight: 600; line-height: 1.3; }
.qz-lobby .qr { position: absolute; left: 112rem; top: 9.6rem; width: 66rem; padding: 3.2rem; background: #F7F0E1; box-shadow: 0 3rem 6rem rgba(0, 0, 0, .5); text-align: center; }
.qz-lobby .qr .code svg { width: 100%; height: auto; }
.qz-lobby .qr .scan { margin-bottom: 1.6rem; font-size: 3.6rem; color: var(--rust); }
.qz-lobby .qr .url { margin-top: 2rem; font-size: 3.4rem; color: var(--ink); word-break: break-all; }
.qz-lobby .count { position: absolute; left: 9.6rem; bottom: 20rem; font-size: 4rem; color: var(--gold-hi); }
.qz-lobby .count b { font-family: 'Playfair Display', serif; font-size: 8rem; color: var(--cream); margin-right: 1.6rem; }
.qz-lobby .names { position: absolute; left: 9.6rem; right: 9.6rem; bottom: 5rem; height: 13rem; display: flex; flex-wrap: wrap; align-content: flex-end; gap: 1.2rem; overflow: hidden; }
.qz-lobby .names span { padding: .6rem 1.8rem; background: rgba(244, 234, 213, .12); border: 1px solid rgba(231, 201, 130, .5); color: var(--cream); font-size: 2.8rem; font-weight: 700; border-radius: 99rem; }

.qz-q .top { position: absolute; left: 9.6rem; right: 9.6rem; top: 5.6rem; display: flex; justify-content: space-between; align-items: center; font-size: 3.4rem; color: var(--gold-hi); }
.qz-q .text { position: absolute; left: 9.6rem; top: 13rem; width: 116rem; font-family: 'Playfair Display', Georgia, serif; font-weight: 800; font-size: 6.2rem; line-height: 1.12; color: var(--cream); }
.qz-q .img { position: absolute; left: 9.6rem; top: 34rem; width: 116rem; height: 39rem; padding: 1rem; background: #F7F0E1; box-shadow: 0 2.4rem 4.8rem rgba(0, 0, 0, .45); }
.qz-q .img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 55%; }
.qz-q .img.contain img { object-fit: contain; background: #EADDC2; }
.qz-q.noimg .img { display: none; }
.qz-q.noimg .ans { top: 40rem; }
.qz-q .ans { position: absolute; left: 9.6rem; top: 76rem; width: 116rem; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.qz-q .ans li { position: relative; overflow: hidden; height: 12rem; display: flex; align-items: center; gap: 2.4rem; padding-right: 2.8rem; background: rgba(244, 234, 213, .08); border: 2px solid rgba(244, 234, 213, .2); }
.qz-q .ans .sw { width: 12rem; height: 100%; display: grid; place-items: center; flex: none; }
.qz-q .ans li:nth-child(1) .sw { background: var(--c1); } .qz-q .ans li:nth-child(2) .sw { background: var(--c2); }
.qz-q .ans li:nth-child(3) .sw { background: var(--c3); } .qz-q .ans li:nth-child(4) .sw { background: var(--c4); }
.shape { width: 5rem; height: 5rem; background: #F7F0E1; }
.s0 { clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); } .s1 { border-radius: 50%; }
.s2 { clip-path: polygon(50% 4%, 100% 96%, 0 96%); } .s3 { width: 4.4rem; height: 4.4rem; }
.qz-q .ans .lb { position: relative; z-index: 1; font-size: 4rem; font-weight: 700; color: var(--cream); line-height: 1.12; }
.qz-q .ans .pc { position: relative; z-index: 1; margin-left: auto; font-family: 'Xanh Mono', monospace; font-size: 3.6rem; color: var(--gold-hi); }
.qz-q .ans .bar { position: absolute; left: 12rem; top: 0; bottom: 0; right: 0; transform-origin: 0 50%; transform: scaleX(0); background: rgba(231, 201, 130, .2); }
.qz-q .ans li.ok { border-color: var(--gold-hi); box-shadow: 0 0 0 .3rem var(--gold-hi), 0 0 5rem rgba(231, 201, 130, .4); }
.qz-q .ans li.no { opacity: .38; }
.qz-q .side { position: absolute; left: 132rem; top: 13rem; width: 50rem; display: flex; flex-direction: column; align-items: center; }
.qz-q .timer { position: relative; width: 26rem; height: 26rem; }
.qz-q .timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.qz-q .timer .tk { fill: none; stroke: rgba(244, 234, 213, .14); stroke-width: 12; }
.qz-q .timer .rg { fill: none; stroke: var(--gold-hi); stroke-width: 12; stroke-linecap: round; }
.qz-q .timer .num { position: absolute; inset: 0; display: grid; place-items: center; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 11rem; color: var(--cream); }
.qz-q .timer.low .rg { stroke: #E0604F; }
.qz-q .answered { margin-top: 3.2rem; text-align: center; font-size: 3.4rem; color: var(--cream-2); }
.qz-q .answered b { display: block; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 9rem; color: var(--cream); line-height: 1.1; }
.qz-q .hint { margin-top: 3.2rem; text-align: center; font-size: 2.8rem; color: rgba(244, 234, 213, .6); }

.qz-board h2, .qz-final h2 { position: absolute; left: 0; right: 0; top: 8rem; text-align: center; font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 8rem; color: var(--gold-hi); }
.qz-board ol { position: absolute; left: 36rem; right: 36rem; top: 26rem; display: grid; gap: 2rem; }
.qz-board li { display: grid; grid-template-columns: 8rem 1fr auto; align-items: center; height: 12rem; padding: 0 3.6rem; background: rgba(244, 234, 213, .1); border: 2px solid rgba(231, 201, 130, .4); font-size: 4.4rem; font-weight: 700; color: var(--cream); }
.qz-board li:first-child { background: rgba(231, 201, 130, .22); border-color: var(--gold-hi); }
.qz-board li .r { font-family: 'Xanh Mono', monospace; color: var(--gold-hi); }
.qz-board li .s { font-family: 'Playfair Display', serif; font-weight: 900; }
.qz-board .empty { position: absolute; left: 0; right: 0; top: 50%; text-align: center; font-size: 4rem; color: var(--cream-2); }
.qz-final .pod { position: absolute; left: 50%; bottom: 10rem; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 3.2rem; }
.qz-final .pod > div { width: 44rem; text-align: center; }
.qz-final .pod .nm { font-size: 4.6rem; font-weight: 800; color: var(--cream); line-height: 1.15; padding: 0 1rem; }
.qz-final .pod .tt { margin-top: .8rem; font-size: 2.8rem; color: var(--gold-hi); }
.qz-final .pod .sc { margin-top: .4rem; font-family: 'Xanh Mono', monospace; font-size: 3.2rem; color: var(--cream-2); }
.qz-final .pod .blk { margin-top: 2.4rem; display: grid; place-items: start center; padding-top: 2.4rem; font-family: 'Playfair Display', serif; font-weight: 900; font-size: 10rem; color: var(--dark); background: linear-gradient(180deg, #F2D48A, #B8862E); box-shadow: 0 2rem 4rem rgba(0, 0, 0, .5); }
.qz-final .pod .p1 .blk { height: 36rem; } .qz-final .pod .p2 .blk { height: 26rem; background: linear-gradient(180deg, #E8E2D6, #A9A196); } .qz-final .pod .p3 .blk { height: 20rem; background: linear-gradient(180deg, #E1B48A, #9A6638); }
.qz-final canvas.conf { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.toasts { position: absolute; right: 6.4rem; top: 5rem; z-index: 6; display: grid; gap: 1.2rem; justify-items: end; }
.toast { display: flex; align-items: center; gap: 1.6rem; max-width: 76rem; padding: 1.6rem 2.8rem; background: rgba(110, 31, 43, .95); border: 2px solid #E07A85; color: #FBE9EA; font-size: 2.8rem; font-weight: 600; line-height: 1.25; box-shadow: 0 1.6rem 3.2rem rgba(0, 0, 0, .45); }
.toast b { color: #fff; }

/* ---------- chrome ---------- */
.loader { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: #1A1109 url(../img/bg-dark.jpg) center / cover; color: var(--cream); text-align: center; transition: opacity .6s ease; }
.loader.hide { opacity: 0; pointer-events: none; }
.loader h1 { font-family: 'Playfair Display', Georgia, serif; font-weight: 900; font-size: 7.2rem; color: var(--gold-hi); }
.loader p { margin-top: 2rem; font-size: 3rem; }
.loader .bar { width: 80rem; height: 1rem; margin: 3.2rem auto 0; background: rgba(244, 234, 213, .15); }
.loader .bar i { display: block; height: 100%; width: 0; background: var(--gold-hi); transition: width .2s; }
.loader .tip { margin-top: 2.4rem; font-size: 2.4rem; color: rgba(244, 234, 213, .6); }
.black { position: fixed; inset: 0; z-index: 80; background: #000; opacity: 0; pointer-events: none; transition: opacity .4s; }
.black.on { opacity: 1; }
.status { position: fixed; right: 1.6rem; bottom: 1.6rem; z-index: 85; display: flex; align-items: center; gap: .8rem; padding: .6rem 1.4rem; border-radius: 99rem; background: rgba(0, 0, 0, .55); color: #fff; font: 600 1.6rem 'Ysabeau Office', sans-serif; opacity: 0; transition: opacity .5s; pointer-events: none; }
.status.show { opacity: 1; }
.status i { width: 1.2rem; height: 1.2rem; border-radius: 50%; background: #E0604F; }
.status.ok i { background: #5BC97E; }
body.shot .status, body.shot .loader { display: none; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
