:root {
  --indigo-950: #0a0d22;
  --indigo-900: #10153a;
  --indigo-800: #182052;
  --indigo-700: #253074;
  --gold: #d9a441;
  --gold-soft: #e9c97f;
  --terracotta: #c0623a;
  --clay: #8a3b20;
  --cream: #f4e8cf;
  --cream-dim: #cfc2a6;
  --ash: #8f887e;
  --leaf: #6f8f4a;

  --font-display: 'Zodiak', 'Georgia', serif;
  --font-story: 'Source Serif 4', 'Georgia', serif;
  --font-ui: 'Satoshi', 'Inter', system-ui, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-story: clamp(1.05rem, 0.95rem + 0.45vw, 1.3rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem);
  --text-hero: clamp(3.2rem, 1.5rem + 7vw, 7.5rem);

  --radius: 6px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --hud-h: 60px;

  /* bark-cloth fiber texture */
  --bark: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9 0.035' numOctaves='3' seed='7'/><feColorMatrix values='0 0 0 0 0.85  0 0 0 0 0.6  0 0 0 0 0.3  0 0 0 0.22 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--indigo-950);
  color: var(--cream);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }

.eyebrow { font-family: var(--font-ui); font-size: var(--text-xs); letter-spacing: .22em; text-transform: uppercase; color: var(--gold); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-ui); font-weight: 500; font-size: var(--text-sm); letter-spacing: .04em;
  padding: .85rem 1.4rem; border-radius: 999px; transition: all .25s var(--ease);
}
.btn-primary { background: var(--gold); color: var(--indigo-950); box-shadow: 0 0 0 1px rgba(255,255,255,.15) inset, 0 10px 30px -10px rgba(217,164,65,.6); }
.btn-primary:hover { background: var(--gold-soft); transform: translateY(-1px); }
.btn-ghost { border: 1px solid rgba(233,201,127,.45); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold); background: rgba(217,164,65,.1); }
.linkish { color: var(--cream-dim); font-size: var(--text-sm); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(233,201,127,.4); }
.linkish:hover { color: var(--cream); text-decoration-color: var(--gold); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--cream-dim); transition: .2s; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { color: var(--gold); background: rgba(217,164,65,.12); }
.icon-btn:disabled { opacity: .3; pointer-events: none; }

.tag {
  display: inline-flex; align-items: center; gap: .4em;
  font-size: var(--text-xs); font-weight: 500; letter-spacing: .06em;
  padding: .2rem .6rem; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag[data-k="tradition"] { color: var(--gold-soft); }
.tag[data-k="variant"] { color: #9cc6ff; }
.tag[data-k="reimagined"] { color: #e0835a; }

/* ---------- Title ---------- */
.screen { position: fixed; inset: 0; }
.title-screen { display: grid; place-items: center; overflow: hidden; }
.title-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: drift 40s ease-in-out infinite alternate; }
.title-veil { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 50% 55%, rgba(10,13,34,.55) 0%, rgba(10,13,34,.85) 55%, rgba(10,13,34,.97) 100%), var(--bark); background-blend-mode: normal, overlay; }
.title-card { position: relative; text-align: center; padding: 2rem 1.5rem; max-width: 46rem; animation: rise 1.2s var(--ease) both; }
.title-card h1 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-hero); line-height: .92; letter-spacing: -.01em; margin: 1rem 0 .4rem; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .3em; color: var(--cream); text-shadow: 0 4px 40px rgba(0,0,0,.5); }
.title-card h1 em { font-style: italic; color: var(--gold); font-size: .6em; }
.subtitle { font-family: var(--font-display); font-style: italic; font-size: var(--text-lg); color: var(--gold-soft); }
.motif-line { width: 120px; height: 14px; color: var(--gold); margin: 1.6rem auto; display: block; opacity: .8; }
.lede { font-family: var(--font-story); font-size: var(--text-lg); line-height: 1.6; color: var(--cream-dim); max-width: 36rem; margin: 0 auto; }
.title-actions { display: flex; gap: .8rem; justify-content: center; margin-top: 2.2rem; flex-wrap: wrap; }
.title-links { margin-top: 1.4rem; display: flex; gap: .7rem; justify-content: center; align-items: center; color: var(--cream-dim); flex-wrap: wrap; }
@keyframes drift { from { transform: scale(1.05) translate(0,0); } to { transform: scale(1.12) translate(-1.5%, 1%); } }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- HUD ---------- */
.game-screen { display: flex; flex-direction: column; }
.hud {
  height: var(--hud-h); flex: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0 .8rem; background: linear-gradient(var(--indigo-900), var(--indigo-950)); border-bottom: 1px solid rgba(217,164,65,.25);
  position: relative; z-index: 5;
}
.hud::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background:
  repeating-linear-gradient(90deg, var(--gold) 0 6px, transparent 6px 10px, var(--terracotta) 10px 14px, transparent 14px 20px); opacity: .45; }
.hud-left, .hud-right { display: flex; align-items: center; gap: .25rem; min-width: 0; }
.chapter { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.chapter-name { font-family: var(--font-display); font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meters { display: flex; align-items: center; gap: 1.2rem; }
.meter { display: flex; align-items: center; gap: .5rem; font-size: var(--text-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--cream-dim); }
.pips { display: inline-flex; gap: 3px; }
.pip { width: 8px; height: 8px; transform: rotate(45deg); border: 1px solid var(--gold); transition: .3s; }
.pip.on { background: var(--gold); box-shadow: 0 0 8px rgba(217,164,65,.7); }
.pip.neg { border-color: var(--terracotta); background: var(--terracotta); }
.bar { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6d6870, #b8b0a6); transition: width .6s var(--ease); }
.shadow-meter.warn .bar-fill { background: linear-gradient(90deg, #8a3b20, #e0835a); }
.shadow-meter.warn .m-label { color: #e0835a; }
.meter.bump { animation: bump .6s var(--ease); }
@keyframes bump { 40% { transform: scale(1.12); } }

/* ---------- Stage ---------- */
.stage { position: relative; flex: 1; overflow: hidden; background: var(--indigo-950); }
.art { position: absolute; inset: 0 0 clamp(56px, 9vh, 84px) 0; overflow: hidden; }
.art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; opacity: 0; transition: opacity 1.1s var(--ease), transform 14s linear; transform: scale(1.04); }
.art-img.is-on { opacity: 1; transform: scale(1); }
.art-grade { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(to top, rgba(10,13,34,1) 0%, rgba(10,13,34,.35) 14%, rgba(10,13,34,0) 30%),
  linear-gradient(to bottom, rgba(10,13,34,.45), rgba(10,13,34,0) 14%); transition: opacity .4s; }

.test-banner { position: absolute; top: 1.2rem; left: 50%; transform: translateX(-50%); font-family: var(--font-display); font-style: italic; font-size: var(--text-lg); color: var(--gold-soft); padding: .4rem 1.4rem; border-top: 1px solid rgba(217,164,65,.5); border-bottom: 1px solid rgba(217,164,65,.5); background: rgba(10,13,34,.55); backdrop-filter: blur(4px); opacity: 0; transition: opacity .6s; pointer-events: none; white-space: nowrap; }
.test-banner.show { opacity: 1; }

/* Dialogue */
.dialogue { position: absolute; left: 50%; bottom: clamp(.8rem, 2.5vh, 2rem); transform: translateX(-50%); width: min(980px, calc(100% - 2rem)); z-index: 3; transition: opacity .35s, transform .35s var(--ease); }
.stage.ui-hidden .dialogue, .stage.ui-hidden .test-banner { opacity: 0; transform: translateX(-50%) translateY(20px); pointer-events: none; }
.stage.ui-hidden .art-grade { opacity: 0; }
.nameplate { display: inline-flex; align-items: baseline; gap: .7rem; margin-left: 1.4rem; padding: .45rem 1.1rem .5rem; background: var(--indigo-900); border: 1px solid rgba(217,164,65,.4); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; position: relative; top: 1px; --c: var(--gold); }
.np-name { font-family: var(--font-display); font-size: 1.25rem; color: var(--c); font-weight: 500; }
.np-title { font-size: var(--text-xs); color: var(--cream-dim); letter-spacing: .08em; }
.panel {
  position: relative; padding: 1rem 1.5rem .85rem; min-height: 0;
  background: linear-gradient(180deg, rgba(16,21,58,.94), rgba(10,13,34,.96)), var(--bark);
  background-blend-mode: normal, overlay;
  border: 1px solid rgba(217,164,65,.4); border-radius: var(--radius);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.7), inset 0 0 0 4px rgba(10,13,34,.6), inset 0 0 0 5px rgba(217,164,65,.14);
}
.panel::before, .panel::after { content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--gold); opacity: .8; }
.panel::before { top: -2px; right: -2px; border-left: 0; border-bottom: 0; }
.panel::after { bottom: -2px; left: -2px; border-right: 0; border-top: 0; }
.line { font-family: var(--font-story); font-size: var(--text-story); line-height: 1.62; color: var(--cream); max-width: 68ch; min-height: 3.2em; padding-right: 7rem; }
.line.narr { font-style: italic; color: #e8dcc2; }
.line .caret { display: inline-block; width: .5em; height: .5em; margin-left: .3em; transform: rotate(45deg); background: var(--gold); animation: blink 1.1s infinite; vertical-align: middle; }
@keyframes blink { 50% { opacity: .2; } }
.advance { position: absolute; right: 1rem; bottom: .7rem; display: flex; align-items: center; gap: .5rem; font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); padding: .4rem .6rem; border-radius: 4px; }
.advance:hover { background: rgba(217,164,65,.1); }
.kbd { font-size: 10px; letter-spacing: .05em; border: 1px solid rgba(233,201,127,.4); border-radius: 3px; padding: 1px 5px; color: var(--cream-dim); }

.choices { display: grid; gap: .55rem; margin-top: .9rem; }
.choice {
  display: flex; align-items: center; gap: .9rem; text-align: left; width: 100%;
  padding: .8rem 1rem; border-radius: var(--radius); border: 1px solid rgba(233,201,127,.28); background: rgba(24,32,82,.55);
  font-family: var(--font-ui); font-size: var(--text-base); line-height: 1.4; color: var(--cream);
  transition: background .2s, border-color .2s, transform .2s var(--ease); animation: rise .45s var(--ease) both;
}
.choice:hover, .choice:focus-visible { background: rgba(217,164,65,.16); border-color: var(--gold); transform: translateX(4px); }
.choice .n { flex: none; width: 26px; height: 26px; display: grid; place-items: center; font-size: var(--text-xs); font-weight: 700; color: var(--indigo-950); background: var(--gold); transform: rotate(45deg); border-radius: 3px; }
.choice .n b { transform: rotate(-45deg); }
.choice .ct { flex: 1; }
.choice .hint { font-size: var(--text-xs); color: var(--cream-dim); letter-spacing: .04em; white-space: nowrap; }
.choice .hint .tag { font-size: 11px; }
.choice.used { opacity: .4; pointer-events: none; text-decoration: line-through; text-decoration-color: rgba(233,201,127,.5); }

/* Hush minigame */
.hush, .ending { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 1rem; background: rgba(10,13,34,.72); backdrop-filter: blur(2px); animation: fade .5s both; }
@keyframes fade { from { opacity: 0; } }
.hush-card, .ending-card { width: min(640px, 100%); max-height: 100%; overflow: auto; text-align: center; padding: 2rem 1.6rem; background: linear-gradient(180deg, rgba(16,21,58,.97), rgba(10,13,34,.98)), var(--bark); background-blend-mode: normal, overlay; border: 1px solid rgba(217,164,65,.45); border-radius: var(--radius); box-shadow: 0 40px 80px -30px #000; }
.hush-card h2, .ending-card h2 { font-family: var(--font-display); font-weight: 500; font-size: var(--text-xl); margin: .5rem 0 .8rem; line-height: 1.1; }
.hush-help { color: var(--cream-dim); line-height: 1.55; max-width: 34rem; margin: 0 auto; }
.hush-days { display: flex; align-items: center; justify-content: center; gap: .8rem; margin: 1.2rem 0 .6rem; font-size: var(--text-sm); color: var(--gold-soft); }
.hush-days .bar { width: 200px; }
.hush-days .bar-fill { background: linear-gradient(90deg, var(--gold), var(--gold-soft)); }
.hush-field { position: relative; height: 150px; border-radius: var(--radius); border: 1px dashed rgba(233,201,127,.25); margin: .4rem 0 1rem; overflow: hidden; background: radial-gradient(ellipse at 50% 120%, rgba(192,98,58,.25), transparent 60%); }
.noise { position: absolute; padding: .45rem .8rem; border-radius: 999px; background: rgba(224,131,90,.15); border: 1px solid #e0835a; color: #f3c3a8; font-size: var(--text-sm); white-space: nowrap; animation: pop .25s var(--ease) both; }
.noise .fuse { position: absolute; left: 10%; right: 10%; bottom: -1px; height: 2px; background: #e0835a; transform-origin: left; animation: fuse var(--t) linear both; }
.noise.hushed { border-color: var(--leaf); background: rgba(111,143,74,.18); color: #cfe0b6; animation: out .6s both; }
.noise.hushed .fuse, .noise.escaped .fuse { display: none; }
.noise.escaped { border-color: #e04a3a; background: rgba(224,74,58,.25); color: #ffd5cc; animation: shake .4s, out .6s .4s both; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes fuse { to { transform: scaleX(0); } }
@keyframes out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.hush-row { display: flex; justify-content: center; gap: .8rem; }
.btn-hush { min-width: 200px; padding: 1.1rem 2rem; font-size: var(--text-lg); font-family: var(--font-display); background: var(--indigo-700); border: 1px solid var(--gold); color: var(--cream); border-radius: 999px; }
.btn-hush:active, .btn-hush.press { background: var(--gold); color: var(--indigo-950); transform: scale(.97); }
.hush-score { margin-top: .9rem; min-height: 1.4em; font-size: var(--text-sm); color: var(--cream-dim); }

/* Ending */
.ending { background: rgba(10,13,34,.55); }
.ending-card { text-align: left; }
.ending-card #ending-text { font-family: var(--font-story); font-size: var(--text-story); line-height: 1.65; color: var(--cream); margin: 1rem 0 1.2rem; }
.ending-stats { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font-size: var(--text-sm); color: var(--cream-dim); padding: .9rem 0; border-top: 1px solid rgba(217,164,65,.2); border-bottom: 1px solid rgba(217,164,65,.2); }
.ending-stats b { color: var(--gold-soft); font-weight: 500; }
.ending-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.3rem; }

/* ---------- Drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(5,7,20,.6); z-index: 20; animation: fade .3s both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100%); z-index: 21; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--indigo-900), var(--indigo-950)), var(--bark); background-blend-mode: normal, overlay; border-left: 1px solid rgba(217,164,65,.35); animation: slide .35s var(--ease) both; }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.2rem 1rem 1.5rem; border-bottom: 1px solid rgba(217,164,65,.2); }
.drawer-head h2 { font-family: var(--font-display); font-weight: 500; font-size: 1.6rem; }
.drawer-body { overflow: auto; padding: 1.2rem 1.5rem 2.5rem; line-height: 1.6; color: var(--cream-dim); }
.drawer-body h3 { font-family: var(--font-ui); font-size: var(--text-xs); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 1.6rem 0 .7rem; font-weight: 500; }
.drawer-body h3:first-child { margin-top: 0; }
.drawer-body p { margin-bottom: .8rem; }
.drawer-body a { color: var(--gold-soft); text-underline-offset: 3px; }
.drawer-body ul { padding-left: 1.1rem; margin-bottom: .8rem; }
.drawer-body li { margin-bottom: .35rem; }

/* journey */
.timeline { list-style: none; padding: 0 !important; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 1px; background: rgba(217,164,65,.35); }
.timeline li { position: relative; padding-left: 1.8rem; margin-bottom: 1rem !important; }
.timeline li::before { content: ""; position: absolute; left: 3px; top: .45em; width: 9px; height: 9px; transform: rotate(45deg); background: var(--indigo-900); border: 1px solid var(--gold); }
.timeline li.ch::before { background: var(--gold); }
.timeline .tl-ch { font-family: var(--font-display); color: var(--cream); font-size: 1.05rem; }
.timeline .tl-choice { color: var(--cream); }
.timeline .tl-fx { font-size: var(--text-xs); color: var(--cream-dim); letter-spacing: .04em; }
.chapters-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-bottom: .4rem; }
.chapters-strip span { height: 6px; border-radius: 2px; background: rgba(255,255,255,.1); }
.chapters-strip span.on { background: var(--gold); }

/* endings gallery */
.end-grid { display: grid; gap: .8rem; }
.end-card { display: grid; grid-template-columns: 96px 1fr; gap: .9rem; align-items: center; padding: .6rem; border-radius: var(--radius); border: 1px solid rgba(217,164,65,.22); background: rgba(24,32,82,.35); }
.end-card img { width: 96px; height: 60px; object-fit: cover; border-radius: 4px; }
.end-card.locked img { filter: grayscale(1) brightness(.3); }
.end-card .et { font-family: var(--font-display); color: var(--cream); font-size: 1.05rem; line-height: 1.2; margin-bottom: .3rem; }
.end-card.locked .et { color: var(--ash); }
.end-hint { font-size: var(--text-xs); color: var(--cream-dim); }

/* log */
.log-entry { margin-bottom: .9rem; font-family: var(--font-story); }
.log-entry .who { display: block; font-family: var(--font-ui); font-size: var(--text-xs); letter-spacing: .12em; text-transform: uppercase; margin-bottom: .1rem; }
.log-entry.narr { font-style: italic; }
.log-entry.pick { color: var(--gold-soft); font-family: var(--font-ui); font-size: var(--text-sm); border-left: 2px solid var(--gold); padding-left: .7rem; }

/* settings */
.setting { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid rgba(217,164,65,.15); color: var(--cream); }
.seg { display: inline-flex; border: 1px solid rgba(217,164,65,.4); border-radius: 999px; overflow: hidden; }
.seg button { padding: .4rem .8rem; font-size: var(--text-sm); color: var(--cream-dim); }
.seg button[aria-pressed="true"] { background: var(--gold); color: var(--indigo-950); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .meters { gap: .8rem; }
  .bar { width: 64px; }
  .chapter .tag { display: none; }
}
@media (max-width: 760px) {
  :root { --hud-h: 52px; }
  .hud { height: auto; flex-wrap: wrap; padding: .3rem .4rem .45rem; gap: .1rem .3rem; }
  .chapter-name { font-size: 1rem; }
  .meters { order: 3; width: 100%; justify-content: space-between; gap: .4rem; padding: .25rem .3rem 0; border-top: 1px solid rgba(217,164,65,.15); }
  .meter .m-label { font-size: 10px; letter-spacing: .06em; }
  .pip { width: 6px; height: 6px; }
  .bar { width: 70px; }
  .icon-btn { width: 32px; height: 32px; }
  .icon-btn svg { width: 18px; height: 18px; }
  #btn-hide, .hud-right [data-open="notes"] { display: none; }

  .stage { display: flex; flex-direction: column; overflow-y: auto; }
  .art { position: relative; inset: auto; aspect-ratio: 16 / 9; flex: none; }
  .art-grade { background: linear-gradient(to top, rgba(10,13,34,.9), rgba(10,13,34,0) 30%); }
  .dialogue { position: relative; left: auto; bottom: auto; transform: none; width: auto; margin: -1.2rem .6rem .8rem; }
  .panel { padding: 1.1rem 1.1rem 2.6rem; min-height: 0; }
  .line { padding-right: 0; }
  .nameplate { margin-left: .8rem; }
  .test-banner { top: .6rem; font-size: var(--text-base); }
  .choice { padding: .75rem .8rem; font-size: var(--text-sm); }
  .choice .hint { display: none; }
  .hush, .ending { position: fixed; inset: 0; z-index: 10; }
  .hush-card, .ending-card { padding: 1.5rem 1.1rem; }
  .hush-field { height: 130px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Sound ---------- */
.icon-btn[aria-pressed="true"].toggle { color: var(--gold); background: rgba(217,164,65,.14); }
#btn-sound[aria-pressed="false"] { color: var(--ash); }
.sound-note { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.3rem; font-size: var(--text-sm); color: var(--gold-soft); }
.sound-note svg { width: 18px; height: 18px; }
.replay { position: absolute; right: 10.2rem; bottom: .7rem; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--cream-dim); }
.replay svg { width: 16px; height: 16px; }
.replay:hover { color: var(--gold); background: rgba(217,164,65,.1); }
.nameplate.speaking .np-name::after { content: ""; display: inline-block; width: 14px; height: 10px; margin-left: .55rem; vertical-align: middle;
  background: linear-gradient(currentColor,currentColor) 0 100%/2px 40% no-repeat, linear-gradient(currentColor,currentColor) 6px 100%/2px 100% no-repeat, linear-gradient(currentColor,currentColor) 12px 100%/2px 60% no-repeat;
  animation: eq .8s ease-in-out infinite alternate; opacity: .8; }
@keyframes eq { 0% { background-size: 2px 30%, 2px 90%, 2px 50%; } 50% { background-size: 2px 100%, 2px 40%, 2px 80%; } 100% { background-size: 2px 50%, 2px 70%, 2px 100%; } }
.panel.speaking-narr::before { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
input[type=range] { accent-color: var(--gold); width: 140px; }
@media (max-width: 760px) { .replay { right: auto; left: .8rem; bottom: .6rem; } }

@media (max-width: 440px) { .chapter-name { display: none; } .hud-left { flex: none; } .hud-right { margin-left: auto; } }

.replay.in-choice { top: .9rem; bottom: auto; right: .9rem; left: auto; }
.art-img[src*="assets/s01_plains"] { object-position: 50% 62%; }
.art-img { object-position: 50% 30%; }
@media (max-width: 760px) { .replay.in-choice { top: auto; bottom: .6rem; left: .8rem; right: auto; } }

/* Very wide, short windows: show the whole extended picture, fill the rest with a soft blur of it */
.art-fill { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) brightness(.55) saturate(1.1); opacity: 0; transition: opacity .6s; }
.art.xwide .art-fill { opacity: 1; }
.art.xwide .art-img { object-position: 50% 50%; width: var(--iw); right: auto; left: calc(50% - var(--iw) / 2);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent); }
