/* Presentation engine v3: fixed 1920×1080 canvas, layouts driven by theme variables.
   Themes (public/themes/*.css) set fonts, colours per tone (light / dark / accent) and ornaments. */

.deck {
  --f-display: 'Literata', Georgia, serif; --f-body: 'Golos Text', 'Segoe UI', Arial, sans-serif; --f-hand: var(--f-display); --f-mono: ui-monospace, Consolas, monospace;
  --pad-x: 140px; --pad-top: 104px; --pad-bottom: 118px;
  --radius: 6px; --title-size: 70px; --title-weight: 700; --title-case: none; --title-track: -0.01em;
  --kicker-size: 24px; --kicker-track: .16em; --kicker-case: uppercase; --kicker-weight: 700;
  position: fixed; inset: 0; z-index: 100; background: var(--letterbox, #0b1220); overflow: hidden; user-select: none; -webkit-user-select: none;
}
.deck-loading { background: #0b1220; }
.deck-viewport { position: absolute; inset: 0; overflow: hidden; }
.deck-canvas { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; }

/* default palette (theme "default": Yasawi tiles) */
.deck .tone-dark { --bg: #0e1a2b; --bg2: #14243a; --fg: #eef2f6; --muted: #a9b8c9; --accent: #d9bd8c; --accent2: #5cc3c8; --line: rgba(217, 189, 140, .28); --card: rgba(255, 255, 255, .05); --card-fg: var(--fg); --hi: rgba(217, 189, 140, .35); }
.deck .tone-light { --bg: #f4efe4; --bg2: #ebe3d2; --fg: #1d2633; --muted: #5d6877; --accent: #24438f; --accent2: #b8742f; --line: rgba(36, 67, 143, .22); --card: #fffaf0; --card-fg: var(--fg); --hi: rgba(217, 189, 140, .55); }
.deck .tone-accent { --bg: #24438f; --bg2: #1c3573; --fg: #ffffff; --muted: #c9d5ee; --accent: #f1d9a8; --accent2: #7fd3d6; --line: rgba(255, 255, 255, .25); --card: rgba(255, 255, 255, .08); --card-fg: var(--fg); --hi: rgba(241, 217, 168, .4); }

.sl { position: absolute; inset: 0; overflow: hidden; background: var(--bg); color: var(--fg); font-family: var(--f-body); font-size: 34px; line-height: 1.38; font-variant-numeric: lining-nums; }
.sl.enter > *:not(.orn) { animation: sl-in .55s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes sl-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sl > div { position: absolute; inset: 0; }
.sl .orn { position: absolute; pointer-events: none; display: block; }
.sl h1, .sl h2, .sl h3 { margin: 0; font-family: var(--f-display); font-weight: var(--title-weight); }
.sl p { margin: 0; }
.sl .kicker { font-family: var(--f-kicker, var(--f-body)); font-size: var(--kicker-size); letter-spacing: var(--kicker-track); text-transform: var(--kicker-case); font-weight: var(--kicker-weight); color: var(--kicker, var(--accent)); margin-bottom: 18px; line-height: 1.25; }
.sl .ttl { font-size: var(--title-size); line-height: 1.06; letter-spacing: var(--title-track); text-transform: var(--title-case); color: var(--title, var(--fg)); margin-bottom: 34px; max-width: 1500px; text-wrap: balance; }
.sl .lead { font-size: 36px; color: var(--muted); line-height: 1.4; max-width: 1200px; }
.sl .ptext { font-size: 38px; line-height: 1.5; font-family: var(--f-text, var(--f-display)); max-width: 1320px; }
.sl .txt { position: relative; z-index: 2; }
.sl .bul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.sl .bul li { position: relative; padding-left: 46px; font-size: 1em; line-height: 1.36; }
.sl .bul li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 16px; height: 16px; background: var(--bullet, var(--accent)); transform: rotate(45deg); }
.fit { font-size: inherit; }

/* frames */
.sl .fr { margin: 0; position: relative; overflow: hidden; background: var(--mat, rgba(0, 0, 0, .18)); }
.sl .fr img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.sl .fr figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 28px 18px; font-size: 21px; line-height: 1.3; color: #f3efe6; background: linear-gradient(transparent, rgba(0, 0, 0, .72)); text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.sl .no-photo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; color: var(--muted); font-size: 24px; background: var(--card); border: 1px solid var(--line); }
.sl .no-photo .orn { position: static; width: 160px; height: 160px; opacity: .6; }

/* ===== cover ===== */
.lay-cover .bgimg, .lay-question .bgimg, .lay-timeline .bgimg { position: absolute; inset: 0; }
.lay-cover .bgimg img, .lay-question .bgimg img, .lay-timeline .bgimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lay-cover .veil { position: absolute; inset: 0; background: var(--cover-veil, linear-gradient(90deg, color-mix(in srgb, var(--bg) 96%, transparent) 0%, color-mix(in srgb, var(--bg) 80%, transparent) 40%, color-mix(in srgb, var(--bg) 10%, transparent) 78%)); }
.lay-cover .txt { position: absolute; left: var(--pad-x); bottom: 150px; top: 70px; width: 1060px; display: flex; flex-direction: column; }
/* the text sits at the bottom; a very long title shrinks (fitText) instead of pushing the emblem off the slide */
.lay-cover .txt > :first-child { margin-top: auto; }
.lay-cover h1, .lay-cover-split h1 { font-size: var(--cover-size, 118px); line-height: .98; letter-spacing: var(--title-track); text-transform: var(--cover-case, var(--title-case)); color: var(--title, var(--fg)); text-wrap: balance; }
.lay-cover .sub, .lay-cover-split .sub { font-size: 38px; line-height: 1.35; color: var(--fg); opacity: .9; margin-top: 34px; max-width: 900px; }
.lay-cover .meta, .lay-cover-split .meta { margin-top: 40px; font-size: 24px; color: var(--muted); letter-spacing: .04em; }
.lay-cover .bgcap { position: absolute; right: 48px; bottom: 34px; max-width: 620px; text-align: right; font-size: 19px; color: rgba(255, 255, 255, .72); text-shadow: 0 1px 3px rgba(0, 0, 0, .7); z-index: 2; }
.sl .orn-emblem { display: none; }
.lay-cover .orn-emblem, .lay-cover-split .orn-emblem { position: relative; margin-bottom: 34px; }
.lay-cover-split { display: grid; grid-template-columns: 980px 940px; }
.lay-cover-split .txt { padding: 0 70px 0 var(--pad-x); display: flex; flex-direction: column; justify-content: center; }
.lay-cover-split .fr { height: 1080px; }

/* ===== section ===== */
.lay-section .txt { position: absolute; left: var(--pad-x); top: 0; bottom: 0; width: 1300px; display: flex; flex-direction: column; justify-content: center; }
.lay-section.has-img .txt { width: 860px; }
.lay-section.has-img .fr { position: absolute; right: 0; top: 0; width: 860px; height: 1080px; }
.lay-section .numeral { font-family: var(--f-display); font-size: 260px; line-height: .9; color: var(--numeral, var(--accent)); font-weight: var(--title-weight); margin-bottom: 30px; }
.lay-section .ttl { font-size: 92px; }
.lay-section .lead { color: var(--fg); opacity: .85; }
.lay-section.has-img .orn-corner { display: none; }

/* ===== question ===== */
.lay-question .veil { position: absolute; inset: 0; background: color-mix(in srgb, var(--bg) 82%, transparent); }
.lay-question .txt { position: absolute; left: var(--pad-x); right: var(--pad-x); top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; }
.lay-question .qt { font-family: var(--f-display); font-size: 40px; color: var(--accent); margin-bottom: 26px; }
.lay-question .big { font-family: var(--f-display); font-size: 74px; line-height: 1.12; max-width: 1500px; text-wrap: balance; }
.sl .p-reveal { margin-top: 50px; align-self: flex-start; display: inline-flex; align-items: center; gap: 14px; font: 600 28px var(--f-body); color: var(--accent); background: transparent; border: 2px solid var(--accent); border-radius: 999px; padding: 14px 30px; cursor: pointer; }
.sl .p-reveal svg { width: 28px; height: 28px; }
.sl .p-hint { margin-top: 44px; font-size: 34px; max-width: 1300px; padding: 26px 34px; border-left: 6px solid var(--accent); background: var(--card); }
.sl .hidden { display: none !important; }

/* ===== goals / summary ===== */
.lay-goals .txt, .lay-summary .txt, .lay-stats .txt { position: absolute; left: var(--pad-x); right: var(--pad-x); top: var(--pad-top); bottom: var(--pad-bottom); display: flex; flex-direction: column; justify-content: center; }
.lay-goals.has-img .txt, .lay-summary.has-img .txt, .lay-stats.has-img .txt { right: 820px; }
.lay-goals.has-img .fr, .lay-summary.has-img .fr, .lay-stats.has-img .fr { position: absolute; right: 0; top: 0; width: 720px; height: 1080px; }
.sl .goals, .sl .takeaways { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 30px; }
.sl .goals li, .sl .takeaways li { display: grid; grid-template-columns: 110px 1fr; align-items: baseline; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.sl .goals li:last-child, .sl .takeaways li:last-child { border-bottom: 0; }
.sl .goals b, .sl .takeaways b { font-family: var(--f-display); font-size: 58px; line-height: 1; color: var(--accent); font-weight: var(--title-weight); }
.sl .goals span, .sl .takeaways span { font-size: 36px; line-height: 1.35; }

/* ===== text / split ===== */
.lay-text .txt { position: absolute; left: var(--pad-x); right: var(--pad-x); top: var(--pad-top); bottom: var(--pad-bottom); display: flex; flex-direction: column; justify-content: center; }
.lay-text .bul li { font-size: 38px; }
.lay-split { display: grid; grid-template-columns: 900px 1020px; }
.lay-split.img-right { grid-template-columns: 1020px 900px; }
.lay-split.img-right .fr { order: 2; }
.lay-split .fr { height: 1080px; }
.lay-split.contain .fr { background: var(--mat, var(--bg2)); }
.lay-split .txt { padding: var(--pad-top) 110px var(--pad-bottom) 90px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.lay-split.img-right .txt { padding: var(--pad-top) 80px var(--pad-bottom) var(--pad-x); }
.lay-split .ttl { font-size: 62px; }

/* ===== image (source work) ===== */
.lay-image { display: grid; grid-template-columns: 1180px 740px; }
.lay-image .fr { height: 1080px; background: var(--mat, var(--bg2)); }
.lay-image .fr img { object-fit: contain; padding: 56px; }
.lay-image .txt { padding: var(--pad-top) 110px var(--pad-bottom) 80px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.lay-image .ttl { font-size: 56px; margin-bottom: 18px; }
.sl .src-name { font-size: 24px; color: var(--muted); line-height: 1.35; margin-bottom: 30px; font-style: italic; }
.sl .cap { font-size: 32px; line-height: 1.45; }
.sl .ask { margin-top: 36px; display: grid; grid-template-columns: 44px 1fr; gap: 16px; font-size: 31px; line-height: 1.38; padding: 26px 30px; background: var(--card); border-left: 6px solid var(--accent2, var(--accent)); color: var(--card-fg); font-weight: 500; }
.sl .ask svg { width: 36px; height: 36px; color: var(--accent2, var(--accent)); }

/* ===== gallery ===== */
.lay-gallery { padding: var(--pad-top) var(--pad-x) var(--pad-bottom); display: flex !important; flex-direction: column; }
.lay-gallery .ttl { font-size: 60px; margin-bottom: 18px; }
.lay-gallery .lead { margin-bottom: 26px; font-size: 30px; }
.lay-gallery .grid { flex: 1; display: grid; gap: 34px; min-height: 0; }
.lay-gallery.n2 .grid { grid-template-columns: 1fr 1fr; }
.lay-gallery.n3 .grid { grid-template-columns: 1fr 1fr 1fr; }
.lay-gallery.n4 .grid { grid-template-columns: repeat(4, 1fr); }
.lay-gallery .cell { display: flex; flex-direction: column; min-height: 0; }
.lay-gallery .fr { flex: 1; min-height: 0; }
.lay-gallery .gcap { font-size: 25px; line-height: 1.35; margin-top: 18px; color: var(--fg); min-height: 2.7em; }

/* ===== map ===== */
.lay-map { display: grid; grid-template-columns: 1320px 600px; background: var(--map-sea, var(--bg2)); }
.lay-map.panel-left { grid-template-columns: 600px 1320px; }
.lay-map.panel-left .map-area { order: 2; }
.lay-map .map-area { height: 1080px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lay-map .map-area svg { width: 100%; height: 100%; display: block; }
.lay-map .txt { background: var(--bg); padding: var(--pad-top) 64px var(--pad-bottom) 64px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; border-left: 1px solid var(--line); }
.lay-map .ttl { font-size: 50px; margin-bottom: 26px; }
.lay-map .cap { font-size: 29px; }
.lay-map .ask { font-size: 27px; }

/* ===== figure ===== */
.lay-figure { display: grid; grid-template-columns: 760px 1fr; }
.lay-figure .fr-portrait { height: 1080px; }
.lay-figure .fr-portrait img { object-position: 50% 20%; }
.lay-figure .txt { padding: var(--pad-top) var(--pad-x) var(--pad-bottom) 100px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.lay-figure .ttl { font-size: 84px; margin-bottom: 14px; }
.lay-figure .years { font-size: 32px; color: var(--accent); margin-bottom: 40px; font-family: var(--f-display); }
.sl .fq { margin: 40px 0 0; padding: 0 0 0 34px; border-left: 4px solid var(--accent); font-family: var(--f-display); font-style: italic; font-size: 34px; line-height: 1.4; color: var(--fg); }

/* ===== figures (row of portraits) ===== */
.lay-figures { padding: var(--pad-top) var(--pad-x) var(--pad-bottom); display: flex !important; flex-direction: column; }
.lay-figures .ttl { font-size: 60px; }
.lay-figures .row { flex: 1; display: grid; gap: 40px; min-height: 0; align-items: stretch; }
.lay-figures.n2 .row { grid-template-columns: repeat(2, 460px); justify-content: center; }
.lay-figures.n3 .row { grid-template-columns: repeat(3, 1fr); }
.lay-figures.n4 .row { grid-template-columns: repeat(4, 1fr); }
.lay-figures.n5 .row { grid-template-columns: repeat(5, 1fr); gap: 30px; }
.lay-figures.n6 .row { grid-template-columns: repeat(6, 1fr); gap: 26px; }
.lay-figures .person { display: flex; flex-direction: column; min-height: 0; }
.lay-figures .person .fr { flex: 1; min-height: 0; }
.lay-figures .person .fr img { object-position: 50% 18%; }
.lay-figures .person b { font-family: var(--f-display); font-size: 33px; line-height: 1.15; margin-top: 22px; font-weight: var(--title-weight); }
.lay-figures .person span { font-size: 24px; color: var(--muted); margin-top: 8px; line-height: 1.3; }
.lay-figures.n5 .person b, .lay-figures.n6 .person b { font-size: 28px; }
.lay-figures.n5 .person span, .lay-figures.n6 .person span { font-size: 21px; }

/* ===== timeline ===== */
.lay-timeline { padding: var(--pad-top) var(--pad-x) var(--pad-bottom); display: flex !important; flex-direction: column; }
.lay-timeline .bgimg.faint { opacity: .14; }
.lay-timeline > .kicker, .lay-timeline > .ttl { position: relative; z-index: 2; }
.lay-timeline .p-tl { position: relative; z-index: 2; flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 26px; }
.lay-timeline .p-tl::before { content: ""; position: absolute; left: -40px; right: -40px; top: 50%; height: var(--tl-line-w, 4px); margin-top: calc(var(--tl-line-w, 4px) / -2); background: var(--tl-line, var(--accent)); }
.lay-timeline .node { position: relative; display: grid; grid-template-rows: 1fr 60px 1fr; }
.lay-timeline .node .dot { grid-row: 2; align-self: center; justify-self: start; width: 30px; height: 30px; margin-left: 4px; background: var(--bg); border: 6px solid var(--accent); border-radius: var(--tl-dot-radius, 50%); transform: var(--tl-dot-transform, none); position: relative; z-index: 1; }
.lay-timeline .node.up .yr, .lay-timeline .node.down .ev { grid-row: 1; align-self: end; padding-bottom: 18px; }
.lay-timeline .node.up .ev, .lay-timeline .node.down .yr { grid-row: 3; align-self: start; padding-top: 18px; }
.lay-timeline .yr { font-family: var(--f-display); font-size: 52px; line-height: 1.04; color: var(--accent); font-weight: var(--title-weight); text-wrap: balance; overflow-wrap: normal; }
.lay-timeline .ev { font-size: 27px; line-height: 1.32; }
.lay-timeline.n6 .yr, .lay-timeline.n7 .yr { font-size: 42px; }
.lay-timeline.n6 .ev, .lay-timeline.n7 .ev { font-size: 24px; }

/* ===== stats ===== */
.sl .nums { display: grid; gap: 50px; margin: 10px 0 40px; }
.sl .nums.n1 { grid-template-columns: 1fr; }
.sl .nums.n2 { grid-template-columns: 1fr 1fr; }
.sl .nums.n3 { grid-template-columns: repeat(3, 1fr); }
.sl .nums.n4 { grid-template-columns: repeat(4, 1fr); }
.sl .stat { border-top: var(--stat-rule, 3px solid var(--accent)); padding-top: 26px; }
.sl .stat b { white-space: nowrap; display: block; font-family: var(--f-display); font-size: 120px; line-height: .95; color: var(--stat, var(--accent)); font-weight: var(--title-weight); letter-spacing: -.02em; }
.sl .stat span { display: block; margin-top: 18px; font-size: 29px; line-height: 1.3; color: var(--fg); }
.lay-stats.has-img .stat b { font-size: 100px; }

/* ===== quote ===== */
.lay-quote .txt { position: absolute; left: 220px; right: 220px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; }
.lay-quote.has-img { display: grid; grid-template-columns: 700px 1fr; }
.lay-quote.has-img .fr { height: 1080px; }
.lay-quote.has-img .txt { position: relative; left: auto; right: auto; padding: 0 var(--pad-x) 0 110px; }
.lay-quote .qmark { font-style: normal; font-family: var(--f-display); font-size: 300px; line-height: .6; height: 120px; color: var(--accent); opacity: .85; }
.lay-quote blockquote { margin: 0; font-family: var(--f-quote, var(--f-display)); font-style: var(--quote-style, italic); font-size: 58px; line-height: 1.3; text-wrap: balance; }
.lay-quote cite { display: block; margin-top: 44px; font-style: normal; font-size: 28px; color: var(--accent); letter-spacing: .03em; }
.lay-quote cite::before { content: "— "; }

/* ===== document ===== */
.lay-document { display: grid; grid-template-columns: 720px 1fr; }
.lay-document .txt { padding: var(--pad-top) 50px var(--pad-bottom) var(--pad-x); display: flex; flex-direction: column; justify-content: center; }
.lay-document .ttl { font-size: 56px; margin-bottom: 18px; }
.lay-document .sheet { position: relative; margin: 110px var(--pad-x) 130px 40px; padding: 70px 80px; background: var(--paper, #f6efdd); color: var(--paper-ink, #2b2418); box-shadow: 0 30px 70px rgba(0, 0, 0, .28), 0 2px 6px rgba(0, 0, 0, .15); transform: rotate(var(--sheet-rot, -.6deg)); display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.lay-document .doc-text { font-family: var(--f-doc, var(--f-display)); font-size: 36px; line-height: 1.55; white-space: pre-line; }
.lay-document mark { background: linear-gradient(transparent 12%, var(--hi) 12%, var(--hi) 88%, transparent 88%); color: inherit; padding: 0 .08em; }
.lay-document .fr-doc { height: 420px; margin-bottom: 30px; background: transparent; }
.lay-document .orn-stamp { right: 60px; bottom: 50px; }

/* ===== compare ===== */
.lay-compare { padding: var(--pad-top) var(--pad-x) var(--pad-bottom); display: flex !important; flex-direction: column; justify-content: center; }
.lay-compare .cols { display: grid; grid-template-columns: 1fr 70px 1fr; align-items: stretch; }
.lay-compare .col { background: var(--card); color: var(--card-fg); padding: 44px 50px; border-top: 8px solid var(--accent); }
.lay-compare .col.c1 { border-top-color: var(--accent2, var(--accent)); }
.lay-compare .col h3 { font-size: 42px; line-height: 1.15; margin-bottom: 28px; }
.lay-compare .col .bul li { font-size: 30px; }
.lay-compare .col.c1 .bul li::before { background: var(--accent2, var(--accent)); }
.lay-compare .vs { display: block; }
.lay-compare .verdict { margin-top: 40px; font-size: 32px; font-family: var(--f-display); padding-left: 30px; border-left: 6px solid var(--accent); }

/* ===== cards ===== */
.lay-cards { padding: var(--pad-top) var(--pad-x) var(--pad-bottom); display: flex !important; flex-direction: column; justify-content: center; }
.lay-cards .grid { display: grid; gap: 30px; }
.lay-cards.n2 .grid { grid-template-columns: 1fr 1fr; }
.lay-cards.n3 .grid { grid-template-columns: repeat(3, 1fr); }
.lay-cards.n4 .grid { grid-template-columns: 1fr 1fr; }
.lay-cards.n5 .grid, .lay-cards.n6 .grid { grid-template-columns: repeat(3, 1fr); }
.lay-cards .pc { background: var(--card); color: var(--card-fg); padding: 38px 40px 40px; border: 1px solid var(--line); position: relative; }
.lay-cards .cn { font-style: normal; font-family: var(--f-display); font-size: 30px; color: var(--accent); display: block; margin-bottom: 14px; }
.lay-cards .pc h3 { font-size: 40px; line-height: 1.12; margin-bottom: 16px; color: var(--card-title, var(--card-fg)); }
.lay-cards .pc p { font-size: 27px; line-height: 1.38; color: var(--card-fg); opacity: .9; }
.lay-cards.n5 .pc h3, .lay-cards.n6 .pc h3 { font-size: 34px; }
.lay-cards.n5 .pc p, .lay-cards.n6 .pc p { font-size: 24px; }

/* ===== steps ===== */
.lay-steps { padding: var(--pad-top) var(--pad-x) var(--pad-bottom); display: flex !important; flex-direction: column; justify-content: center; }
.lay-steps .chain { display: flex; align-items: stretch; gap: 0; }
.lay-steps .step { flex: 1; background: var(--card); color: var(--card-fg); padding: 40px 36px; border-top: 8px solid var(--accent); }
.lay-steps .sn { font-style: normal; display: block; font-family: var(--f-display); font-size: 64px; line-height: 1; color: var(--accent); margin-bottom: 22px; }
.lay-steps .step h3 { font-size: 36px; line-height: 1.15; margin-bottom: 16px; }
.lay-steps .step p { font-size: 26px; line-height: 1.38; }
.lay-steps .arrow { flex: 0 0 64px; align-self: center; height: 40px; background: var(--accent); clip-path: polygon(10% 30%, 60% 30%, 60% 0, 100% 50%, 60% 100%, 60% 70%, 10% 70%); opacity: .8; }

/* ===== quiz ===== */
.lay-quiz .txt { position: absolute; left: var(--pad-x); right: var(--pad-x); top: var(--pad-top); bottom: var(--pad-bottom); display: flex; flex-direction: column; justify-content: center; }
.lay-quiz.has-img .fr { position: absolute; left: 0; top: 0; width: 640px; height: 1080px; }
.lay-quiz.has-img .txt { left: 740px; }
.lay-quiz .p-q { font-family: var(--f-display); font-size: 56px; line-height: 1.16; margin-bottom: 46px; text-wrap: balance; }
.lay-quiz .p-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.lay-quiz .p-opt { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 20px; text-align: left; font: 500 30px/1.3 var(--f-body); color: var(--card-fg); background: var(--card); border: 2px solid var(--line); padding: 24px 28px; cursor: pointer; border-radius: var(--radius); min-height: 120px; }
.lay-quiz .p-opt .p-lt { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--bg); font-weight: 700; font-size: 30px; font-family: var(--f-display); }
.lay-quiz .p-opt.ok { border-color: #3f9b6a; background: rgba(63, 155, 106, .22); }
.lay-quiz .p-opt.ok .p-lt { background: #3f9b6a; color: #fff; }
.lay-quiz .p-opt.bad { border-color: #c4524a; background: rgba(196, 82, 74, .2); }
.lay-quiz .p-opt.bad .p-lt { background: #c4524a; color: #fff; }
.lay-quiz .p-opt:disabled { cursor: default; }
.lay-quiz .p-explain { margin-top: 30px; font-size: 29px; line-height: 1.4; padding: 22px 30px; background: var(--card); border-left: 6px solid #3f9b6a; }

/* ===== reflection ===== */
.lay-reflection { padding: var(--pad-top) var(--pad-x) var(--pad-bottom); display: flex !important; flex-direction: column; justify-content: center; }
.lay-reflection .prompts { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.lay-reflection .prompts.n3 { grid-template-columns: 1fr; }
.lay-reflection .prompt { background: var(--card); color: var(--card-fg); padding: 34px 40px; border: 1px solid var(--line); font-family: var(--f-display); font-size: 40px; line-height: 1.25; display: flex; flex-direction: column; gap: 22px; }
.lay-reflection .prompt .dots { display: block; height: 4px; border-bottom: 3px dotted var(--line); opacity: .9; }

/* ===== UI around the canvas ===== */
.deck-ui { position: absolute; z-index: 10; transition: opacity .35s ease; }
.deck.idle .deck-ui { opacity: 0; }
.deck.idle .deck-ui:hover, .deck.idle .deck-ui:focus-within { opacity: 1; }
.deck-top { top: 12px; right: 14px; display: flex; align-items: center; gap: 8px; padding: 6px; background: rgba(12, 14, 18, .62); backdrop-filter: blur(8px); border-radius: 999px; font: 500 14px 'Golos Text', 'Segoe UI', sans-serif; color: #e8e6e1; max-width: calc(100vw - 28px); }
.deck-title { padding: 0 10px 0 12px; max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .8; }
.deck-top .lang { display: flex; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; overflow: hidden; }
.deck-top .lang button { border: 0; background: transparent; color: #cfccc4; font: 600 13px 'Golos Text', sans-serif; padding: 8px 12px; cursor: pointer; }
.deck-top .lang button[aria-pressed="true"] { background: #f1ede4; color: #15171c; }
.dbtn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: #ece9e2; font: 500 14px 'Golos Text', sans-serif; padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.dbtn:hover, .dbtn[aria-pressed="true"] { background: rgba(255, 255, 255, .14); }
.dbtn svg { width: 18px; height: 18px; }
.deck-nav { bottom: 18px; width: 58px; height: 58px; border-radius: 50%; border: 0; background: rgba(12, 14, 18, .55); backdrop-filter: blur(6px); color: #f1ede4; display: grid; place-items: center; cursor: pointer; }
.deck-nav svg { width: 26px; height: 26px; }
.deck-nav.prev { left: 18px; }
.deck-nav.next { right: 18px; }
.deck-nav:disabled { opacity: .25; cursor: default; }
.deck-count { bottom: 30px; left: 50%; transform: translateX(-50%); font: 600 14px 'Golos Text', sans-serif; color: #f1ede4; background: rgba(12, 14, 18, .5); padding: 6px 14px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.deck-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .08); z-index: 10; }
.deck-progress i { display: block; height: 100%; background: rgba(255, 255, 255, .55); transition: width .4s ease; }
.deck-notes { position: absolute; left: 50%; transform: translateX(-50%); bottom: 90px; width: min(980px, calc(100vw - 40px)); max-height: 38vh; overflow: auto; z-index: 11; background: #fbf7ee; color: #2b2414; border-radius: 12px; padding: 16px 20px; font: 400 16px/1.5 'Golos Text', sans-serif; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
.deck-notes b { display: block; font-size: 13px; color: #8a6a2c; margin-bottom: 4px; letter-spacing: .04em; text-transform: uppercase; }
.deck-notes.hidden, .deck-lightbox.hidden { display: none; }
.deck-lightbox { position: absolute; inset: 0; z-index: 20; background: rgba(6, 7, 9, .94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; cursor: zoom-out; }
.deck-lightbox img { max-width: 100%; max-height: calc(100% - 60px); object-fit: contain; }
.deck-lightbox p { margin: 0; color: #e9e4d8; font: 400 17px/1.4 'Golos Text', sans-serif; text-align: center; max-width: 1100px; }
.deck .sl .lay-reflection .orn-corner { top: 70px; bottom: auto; margin-top: 0; width: 230px; height: 230px; }
