/* The Picture — a dark, editorial site around a Victorian object.
   Modern type and hairlines for the interface; gilt, ivory and satin only for the portrait itself. */
:root {
  --bg: #070605;
  --bg-2: #100d0b;
  --ink: #efe7da;
  --ink-2: rgba(239, 231, 218, .66);
  --ink-3: rgba(239, 231, 218, .4);
  --line: rgba(239, 231, 218, .13);
  --line-2: rgba(239, 231, 218, .24);
  --gold: #d2b06a;
  --gold-2: #ecd9a4;
  --blood: #b3242e;
  --blood-2: #e0525b;
  --satin-1: #7a4674;
  --satin-2: #4a2447;
  --satin-3: #2a1128;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --bar: 64px;
  --tarnish: 0;
  --sin: 0;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 4px; border-radius: 4px; }

/* film grain over everything */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0) } 20% { transform: translate(-4%, 3%) } 40% { transform: translate(3%, -2%) } 60% { transform: translate(-2%, -4%) } 80% { transform: translate(4%, 2%) } 100% { transform: translate(0, 0) } }

/* ---------- type ---------- */
.display { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; line-height: .98; margin: 0; }
.kicker {
  margin: 0; font: 500 11px/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
}
.kicker i { font-family: var(--serif); font-size: 14px; letter-spacing: .02em; text-transform: none; color: var(--ink-2); }
.lead { margin: 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 46ch; }
.fine { margin: 0; font-size: 12.5px; color: var(--ink-3); letter-spacing: .01em; }
.error { margin: 0; font-size: 14px; color: var(--blood-2); min-height: 1.4em; }
.error:empty { display: none; }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 15px 26px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent;
  font: 500 12px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink);
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .2s var(--ease);
}
.btn .arrow { display: inline-block; transition: transform .35s var(--ease); font-family: var(--sans); letter-spacing: 0; }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn-primary { border-color: var(--gold); color: var(--gold-2); }
.btn-primary:hover { background: var(--gold); color: #1a1208; }
.btn-ghost:hover { border-color: var(--ink-2); background: rgba(239, 231, 218, .05); }
.btn-blood { border-color: rgba(224, 82, 91, .55); color: #f3c9c6; }
.btn-blood:hover { background: var(--blood); border-color: var(--blood); color: #fff; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-link {
  background: none; border: 0; padding: 6px 0; cursor: pointer; color: var(--ink-2);
  font: 400 14px/1.2 var(--sans); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 5px;
  transition: color .25s, text-decoration-color .25s;
}
.btn-link:hover { color: var(--ink); text-decoration-color: var(--ink-2); }

/* ---------- the top bar ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--bar);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: 0 clamp(16px, 3vw, 36px); padding-top: env(safe-area-inset-top, 0px);
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.mark {
  justify-self: start; background: none; border: 0; padding: 4px 0; cursor: pointer;
  font: italic 400 21px/1 var(--serif); letter-spacing: .01em; color: var(--ink);
  opacity: 0; transition: opacity .6s;
}
body:not([data-scene="gate"]) .mark { opacity: .9; }
.bar-mid { display: flex; align-items: center; gap: 14px; font: 500 11px/1 var(--sans); letter-spacing: .2em; color: var(--ink-3); opacity: 0; transition: opacity .5s; }
.bar-mid.on { opacity: 1; }
.qline { position: relative; width: clamp(80px, 14vw, 180px); height: 1px; background: var(--line); overflow: hidden; }
.qline i { position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(0); transition: transform .8s var(--ease); }
.bar-end { justify-self: end; display: flex; gap: 8px; }
.chip {
  cursor: pointer; background: rgba(7, 6, 5, .35); border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px;
  font: 500 10.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: color .25s, border-color .25s;
}
.chip:hover { color: var(--ink); border-color: var(--line-2); }
#skipBtn { display: none; }
body[data-scene="opening"] #skipBtn { display: inline-block; }
body[data-scene="gate"] #soundBtn { display: none; }

/* ---------- scenes ---------- */
.scene {
  position: fixed; inset: 0; opacity: 0; visibility: hidden; overflow: hidden;
  transition: opacity 1s var(--ease), visibility 0s linear 1s;
}
body[data-scene="gate"] #gate, body[data-scene="opening"] #opening, body[data-scene="sit"] #sit, body[data-scene="studio"] #studio {
  opacity: 1; visibility: visible; transition: opacity 1.1s var(--ease) .15s, visibility 0s;
}

/* ---------- 1 · gate ---------- */
#gate {
  display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 42%, rgba(210, 176, 106, .09), transparent 70%),
    radial-gradient(ellipse 50% 60% at 12% 100%, rgba(255, 170, 90, .1), transparent 70%),
    var(--bg);
}
.gate { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.gate-title {
  font-size: clamp(76px, 15.5vw, 236px); line-height: .86; letter-spacing: -.03em;
  background: linear-gradient(180deg, #f6eedf 30%, #c9a45f 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding: 0 .06em .06em;
}
.gate-sub { margin: 0; font: italic 400 clamp(20px, 2.2vw, 27px)/1.3 var(--serif); color: var(--ink-2); }
.gate-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 8px; }
.rise { opacity: 0; transform: translateY(18px); }
body[data-scene="gate"] .rise { animation: rise 1.3s var(--ease) var(--d, 0s) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- 2 · opening ---------- */
#opening { background: #070605; }
#stage { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#stage.shake { animation: shake .55s cubic-bezier(.36, .07, .19, .97); }
.captions {
  position: absolute; left: 0; right: 0; bottom: max(9vh, 64px); height: 34vh; pointer-events: none;
  display: grid; place-items: end center; padding: 0 20px;
}
.cue {
  grid-area: 1 / 1; margin: 0; max-width: min(20em, 92vw); text-align: center;
  font: 400 clamp(25px, 3.3vw, 46px)/1.14 var(--serif); letter-spacing: -.005em; color: var(--ink);
  text-shadow: 0 2px 30px rgba(0, 0, 0, .8);
  opacity: 0; transform: translateY(10px); filter: blur(6px);
  transition: opacity .7s var(--ease), transform .9s var(--ease), filter .8s var(--ease);
}
.cue.on { opacity: 1; transform: none; filter: none; }
.cue .w { opacity: .16; transition: opacity .45s var(--ease), color .45s; }
.cue .w.lit { opacity: 1; }
.cue-l { font-size: clamp(32px, 4.6vw, 64px); font-style: italic; }   /* the emphasised lines: the only other style */
.silent-note { position: absolute; left: 0; right: 0; top: calc(var(--bar) + 8px); margin: 0; text-align: center; font-size: 13px; color: var(--ink-3); }
.progress { position: absolute; left: clamp(16px, 3vw, 36px); right: clamp(16px, 3vw, 36px); bottom: max(28px, env(safe-area-inset-bottom, 0px)); height: 1px; background: var(--line); }
.progress i { position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(0); }
.endcard {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  text-align: center; padding: 24px 16px; animation: fadein 1.6s var(--ease) both;
}
.endcard-title { font-size: clamp(56px, 9vw, 130px); font-style: italic; }
@keyframes fadein { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 3 · sitter ---------- */
#sit { display: grid; place-items: center; padding: calc(var(--bar) + 16px) 16px 32px; overflow-y: auto; }
.sit { width: min(980px, 100%); display: flex; flex-direction: column; gap: 22px; }
.sit-title { font-size: clamp(46px, 6.4vw, 92px); }
.sit-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0 4px; }
.option {
  position: relative; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-height: 176px;
  padding: 22px 22px 20px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(239, 231, 218, .035), rgba(239, 231, 218, .01));
  transition: border-color .35s var(--ease), transform .35s var(--ease), background .35s var(--ease);
}
.option:hover { border-color: rgba(210, 176, 106, .6); transform: translateY(-3px); background: linear-gradient(180deg, rgba(210, 176, 106, .08), rgba(210, 176, 106, .01)); }
.option-n { font: 500 11px/1 var(--sans); letter-spacing: .2em; color: var(--gold); }
.option-img {
  position: absolute; top: 18px; right: 18px; width: 60px; height: 80px; object-fit: cover; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(210, 176, 106, .55), 0 0 0 4px rgba(7, 6, 5, .9), 0 0 0 5px rgba(210, 176, 106, .35), 0 10px 24px rgba(0, 0, 0, .5);
  filter: saturate(.9) brightness(.92); transition: filter .35s var(--ease), transform .35s var(--ease);
}
.option:hover .option-img { filter: none; transform: translateY(-2px); }
@media (max-width: 980px) { .option-img { top: 50%; width: 48px; height: 64px; transform: translateY(-50%); } .option:hover .option-img { transform: translateY(-50%); } }
.option-t { margin-top: auto; font: 400 30px/1.05 var(--serif); }
.option-d { font-size: 14px; color: var(--ink-3); }
.option:disabled { opacity: .5; }

/* ---------- 4 · studio ---------- */
#studio { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(239, 231, 218, .18) transparent; }
#studio::before { /* lamp light from the left and a dark room */
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 70% at 26% 50%, rgba(255, 190, 120, .075), transparent 70%),
    radial-gradient(ellipse 40% 50% at 8% 100%, rgba(255, 170, 90, .08), transparent 70%);
}
.studio {
  position: relative; min-height: 100%;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center; gap: clamp(24px, 4vw, 72px);
  padding: calc(var(--bar) + 12px) clamp(20px, 4vw, 64px) 36px;
}
.art { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.panel { position: relative; max-width: 560px; width: 100%; }
.pane { display: flex; flex-direction: column; gap: 20px; }
.pane.swap { animation: paneIn .7s var(--ease) both; }
.pane.leaving { opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .3s; }
@keyframes paneIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pane-title { font-size: clamp(40px, 4.4vw, 64px); }
.pane > .btn { align-self: flex-start; }

/* the art: a hand-mirror laid against a gilt frame */
.stage {
  --fw: clamp(220px, min(calc((50vw - 150px) / 1.25), calc((100dvh - var(--bar) - 150px) * .64)), 470px);
  --fp: calc(var(--fw) * .1);
  position: relative; display: flex; align-items: flex-end;
  padding-left: calc(var(--fw) * .24);
}
.mirror {
  position: absolute; z-index: 5; left: calc(var(--fw) * -.05); bottom: calc(var(--fw) * .5); margin: 0;
  width: calc(var(--fw) * .44); aspect-ratio: 3 / 4;
  transform: rotate(-7deg); transform-origin: 50% 100%;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .55));
}
.mirror-art { position: absolute; left: 0; top: 0; width: 100%; height: 162%; display: block; z-index: 1; pointer-events: none; }
.mirror-glass { position: absolute; left: 8.4%; right: 8.4%; top: 8.4%; bottom: 8.4%; border-radius: 50%; overflow: hidden; background: #3b4146; z-index: 0; }
.mirror-glass canvas { display: block; width: 100%; height: 100%; }
.mirror-glass::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(128deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, .04) 32%, transparent 45%), radial-gradient(closest-side, transparent 72%, rgba(20, 24, 28, .45) 100%);
}
.mirror-glass .silver { position: absolute; inset: 0; background: radial-gradient(ellipse at 35% 30%, #d9dde0, #8d9398 60%, #4d5358); transition: opacity .9s; }
.has-sitter .mirror-glass .silver { opacity: 0; }
.mirror-cap {
  position: absolute; left: 0; right: 0; bottom: calc(100% + 12px); text-align: center; transform: rotate(7deg);
  font: 500 10px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--ink-3);
}

.frame-wrap { margin: 0; display: flex; flex-direction: column; align-items: center; }
.frame { position: relative; padding: var(--fp); box-shadow: 0 30px 70px rgba(0, 0, 0, .6), 0 8px 18px rgba(0, 0, 0, .4); }
.frame-art { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.frame::before { /* the glow of a sin */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  box-shadow: 0 0 90px 30px rgba(175, 20, 32, .7); opacity: 0; transition: opacity 1.6s ease;
}
.frame.sin::before { opacity: var(--sin); transition: opacity .15s; }
.frame::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; background: rgba(38, 44, 18, var(--tarnish)); mix-blend-mode: multiply; }
.canvas-wrap {
  position: relative; z-index: 2; display: block; width: var(--fw); aspect-ratio: 3 / 4;
  padding: 0; border: 0; margin: 0; background: #140d09; overflow: hidden; cursor: default;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, .5);
}
.canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.canvas-wrap::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 4; box-shadow: inset 7px 9px 12px rgba(0, 0, 0, .45), inset -2px -2px 6px rgba(0, 0, 0, .25); }
.armed .canvas-wrap { cursor: none; }
.satin {
  position: absolute; inset: -2px; z-index: 3;
  background:
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0) 0 22px, rgba(255, 255, 255, .08) 30px, rgba(0, 0, 0, .18) 44px, rgba(255, 255, 255, 0) 56px),
    linear-gradient(170deg, var(--satin-1), var(--satin-2) 45%, var(--satin-3));
  clip-path: polygon(0 0, 100% 0, 100% 97%, 88% 100%, 72% 97.5%, 55% 100%, 38% 98%, 20% 100%, 0 98%);
  transition: transform 1.6s cubic-bezier(.6, .05, .3, 1), opacity 1.2s ease .5s;
}
.satin::after { /* gold embroidery at the hem */
  content: ""; position: absolute; left: 0; right: 0; bottom: 4.5%; height: 7px;
  border-top: 1px solid rgba(214, 178, 98, .5); border-bottom: 1px solid rgba(214, 178, 98, .35);
}
.frame.breathe .satin { animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-1.2%); } }
.uncovered .satin { transform: translateY(115%) rotate(4deg); opacity: 0; animation: none; }

.plaque {
  margin-top: 18px; padding: 7px 34px 8px; text-align: center; line-height: 1.25; position: relative;
  background: linear-gradient(180deg, #e2c67c, #b08b3c 55%, #8e6d2a); color: #3b2a0c; text-shadow: 0 1px 0 rgba(255, 238, 190, .55);
  box-shadow: inset 0 0 0 1px rgba(60, 40, 10, .55), inset 0 1px 0 rgba(255, 245, 210, .6), 0 3px 8px rgba(0, 0, 0, .35);
  border-radius: 2px; font: 400 15px/1.25 var(--serif);
}
.plaque::before, .plaque::after {
  content: ""; position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f6e3a6, #8a6a2a 70%); box-shadow: inset 0 0 0 1px rgba(50, 35, 8, .6), 0 1px 0 rgba(255, 240, 200, .4);
}
.plaque::before { left: 12px; } .plaque::after { right: 12px; }
.plaque span { display: block; }
.plaque span + span { font-size: 13px; font-style: italic; }
.track { margin: 0; min-height: 1.4em; font-size: 12.5px; color: var(--ink-3); text-align: center; }

/* ---------- the questions ---------- */
.epigraph { margin: 0; padding-left: 16px; border-left: 1px solid rgba(210, 176, 106, .5); }
.epigraph p { margin: 0; font: italic 400 19px/1.4 var(--serif); color: var(--ink-2); }
.epigraph p::before { content: "“"; } .epigraph p::after { content: "”"; }
.epigraph cite { display: block; margin-top: 6px; font: 500 10.5px/1.3 var(--sans); font-style: normal; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.question { margin: 4px 0 0; font: 400 clamp(29px, 2.9vw, 42px)/1.12 var(--serif); letter-spacing: -.01em; text-wrap: balance; }
.answers { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.answers li { border-top: 1px solid var(--line); }
.answers li:last-child { border-bottom: 1px solid var(--line); }
.answers button {
  width: 100%; display: flex; align-items: center; gap: 16px; text-align: left; cursor: pointer;
  padding: 15px 8px 15px 2px; background: none; border: 0; font: 400 16.5px/1.4 var(--sans); color: var(--ink);
  transition: padding .3s var(--ease), color .3s, opacity .4s;
}
.answers .key {
  flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-2); font: 500 11px/1 var(--sans); color: var(--ink-3); transition: all .3s var(--ease);
}
.answers button:hover { padding-left: 10px; }
.answers button:hover .key, .answers button:focus-visible .key { border-color: var(--gold); color: var(--gold-2); }
.answers.locked button { pointer-events: none; opacity: .28; }
.answers.locked button.picked { opacity: 1; }
.answers button.picked .key { background: var(--gold); border-color: var(--gold); color: #1a1208; }
.answers button.picked.sinful .key { background: var(--blood); border-color: var(--blood); color: #fff; }
.reply { margin: 0; min-height: 1.6em; font: italic 400 22px/1.3 var(--serif); color: var(--gold-2); opacity: 0; transform: translateY(6px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.reply.on { opacity: 1; transform: none; }
.hint { margin: 0; font-size: 12px; color: var(--ink-3); }
@media (hover: none) { .hint { display: none; } }

/* ---------- the reveal ---------- */
.reveal-lines { display: flex; flex-direction: column; gap: 26px; }
.reveal-lines .line { opacity: 0; transform: translateY(10px); filter: blur(4px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease), filter 1.2s var(--ease); }
.reveal-lines .line.on { opacity: 1; transform: none; filter: none; }
.reveal-lines p { margin: 0; font: italic 400 clamp(22px, 2.2vw, 30px)/1.3 var(--serif); }
.reveal-lines cite { display: block; margin-top: 8px; font: 500 10.5px/1.3 var(--sans); font-style: normal; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- the verdict ---------- */
.verdict-name { font-size: clamp(48px, 5.4vw, 80px); font-style: italic; }
.verdict-sub { margin: -6px 0 0; font: italic 400 22px/1.3 var(--serif); color: var(--gold-2); }
.scores { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.meters { display: flex; flex-direction: column; gap: 18px; }
.meter-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.meter-head span { font: 500 11px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-2); }
.meter-head b { font: 400 32px/1 var(--serif); }
.meter-track { position: relative; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.meter-track i { position: absolute; inset: 0; background: linear-gradient(90deg, #8e6d2a, var(--gold-2)); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 1.6s var(--ease) .2s; border-radius: 3px; }
.meter-h .meter-track i { background: linear-gradient(90deg, #6d1219, var(--blood-2)); }
.map { width: 150px; height: 150px; overflow: visible; }
.map-box { fill: rgba(239, 231, 218, .02); stroke: var(--line-2); stroke-width: .6; }
.map-axis { stroke: var(--line); stroke-width: .5; stroke-dasharray: 1.5 2; }
.map-l { font: italic 400 7.4px var(--serif); fill: var(--ink-3); }
.map-ax { font: 500 4.6px var(--sans); letter-spacing: .12em; fill: var(--ink-3); text-transform: uppercase; }
.map-dot { fill: var(--gold-2); transition: cx 1.6s var(--ease) .3s, cy 1.6s var(--ease) .3s; }
.map-ring { fill: none; stroke: var(--gold-2); stroke-width: .8; transition: cx 1.6s var(--ease) .3s, cy 1.6s var(--ease) .3s; transform-box: fill-box; transform-origin: center; animation: ping 2.4s ease-out infinite; }
@keyframes ping { from { transform: scale(1); opacity: .9; } to { transform: scale(3.2); opacity: 0; } }
.verdict-body { margin: 0; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }
.remembers ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.remembers li { font: italic 400 19px/1.35 var(--serif); color: var(--ink); }
.remembers li span { display: inline-block; margin-right: 10px; font: 500 10px/1 var(--sans); font-style: normal; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 6px; }
.whisper { margin: 0; min-height: 1.4em; font: italic 400 19px/1.35 var(--serif); color: var(--ink-2); }
.whisper:empty { display: none; }
.ending-text { margin: 0; font: 400 clamp(21px, 1.9vw, 26px)/1.45 var(--serif); }

/* ---------- the knife and the crash ---------- */
.knife, .knife-shadow {
  position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; transform-origin: 50% 100%;
  opacity: 0; will-change: transform;
}
.knife canvas, .knife-shadow canvas { display: block; width: 100%; height: 100%; }
.knife { filter: drop-shadow(-2px 4px 3px rgba(0, 0, 0, .55)) drop-shadow(-8px 16px 18px rgba(0, 0, 0, .35)); transition: opacity .35s var(--ease); }
.knife.on { opacity: 1; }
.knife-shadow { z-index: 69; filter: brightness(0) blur(var(--kb, 5px)); transition: opacity .25s; }
.knife.tremble canvas { transform-origin: 50% 100%; animation: tremble .55s cubic-bezier(.3, .6, .4, 1); }
@keyframes tremble { 0%, 100% { transform: rotate(0) } 14% { transform: rotate(.9deg) } 32% { transform: rotate(-.7deg) } 52% { transform: rotate(.4deg) } 74% { transform: rotate(-.2deg) } }
/* taking up the knife: the room darkens around the picture and the rest of the page steps back */
#studio::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity .9s var(--ease);
  background: radial-gradient(ellipse 38% 55% at var(--vx, 30%) var(--vy, 50%), rgba(0, 0, 0, 0) 40%, rgba(3, 2, 2, .78) 100%);
}
body.knife-mode #studio::after { opacity: 1; }
body.knife-mode .art { position: relative; z-index: 2; }
body.knife-mode #knifeBtn, body.knife-mode #knifeHint { position: relative; z-index: 2; }
body.knife-mode #verdict > :not(.actions):not(#knifeHint), body.knife-mode .actions > :not(#knifeBtn) { opacity: .16; pointer-events: none; transition: opacity .6s var(--ease); }
body.knife-mode .bar { opacity: .3; transition: opacity .6s; }
.jolt { animation: jolt .5s cubic-bezier(.2, .7, .2, 1); }
@keyframes jolt { 0% { transform: none } 9% { transform: translate(-2px, 4px) scale(1.006) } 30% { transform: translate(1px, -1px) } 100% { transform: none } }
.pulse {
  position: fixed; inset: 0; z-index: 72; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0) 45%, rgba(92, 6, 14, .55) 100%);
}
.pulse.on { animation: pulse 1.1s ease-out; }
@keyframes pulse { 0% { opacity: 0 } 8% { opacity: 1 } 100% { opacity: 0 } }
@keyframes shake { 0%, 100% { transform: translate(0, 0) } 10% { transform: translate(-10px, 5px) } 25% { transform: translate(9px, -6px) } 40% { transform: translate(-7px, -3px) } 55% { transform: translate(5px, 4px) } 75% { transform: translate(-3px, 1px) } }
.blackout { position: fixed; inset: 0; z-index: 75; background: #000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .7s; }
.blackout.on { opacity: 1; pointer-events: auto; }
.blackout p { margin: 0; padding: 0 24px; text-align: center; font: italic 400 clamp(28px, 4vw, 44px)/1.2 var(--serif); color: #d8c9ab; opacity: 0; transition: opacity .9s .5s; }
.blackout.on p { opacity: 1; }

/* ---------- the card ---------- */
.sheet { position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 4, 3, .86); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadein .4s var(--ease) both; }
.sheet-inner { display: flex; align-items: center; gap: 36px; max-width: 980px; }
.sheet img { display: block; height: min(80dvh, 740px); width: auto; max-width: 100%; aspect-ratio: 4 / 5; border-radius: 6px; box-shadow: 0 30px 70px rgba(0, 0, 0, .6); background: #120e0b; }
.sheet-side { width: 260px; display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.sheet-note { margin: 0; font-size: 14px; color: var(--ink-2); }

/* ---------- smaller screens ---------- */
@media (max-width: 980px) {
  body { overflow: auto; }
  .studio { grid-template-columns: 1fr; align-items: start; gap: 28px; padding-top: calc(var(--bar) + 4px); }
  .stage { --fw: clamp(200px, min(58vw, calc((62dvh - 110px) * .64)), 400px); }
  .panel { margin: 0 auto; }
  .sit-options { grid-template-columns: 1fr; }
  .option { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 18px 20px; }
  .option-t { margin: 0; font-size: 26px; }
  .option-d { width: 100%; }
  .scores { grid-template-columns: 1fr; }
  .map { width: 170px; height: 170px; justify-self: center; }
  .sheet-inner { flex-direction: column; gap: 18px; }
  .sheet img { height: auto; width: min(100%, 60dvh * .8); }
  .sheet-side { width: min(100%, 420px); }
}
@media (max-width: 980px) {
  /* while the questions run the picture is covered anyway, so keep it small and the answers in view */
  .studio.compact { gap: 18px; }
  .studio.compact .stage { --fw: clamp(120px, min(34vw, calc((100dvh - 540px) * .6)), 260px); }
  .studio.compact .plaque, .studio.compact .track { display: none; }
  .studio.compact .mirror-cap { display: none; }
  .stage { transition: none; }
}
@media (max-width: 560px) {
  :root { --bar: 56px; }
  .bar { grid-template-columns: auto 1fr auto; }
  .bar-mid { justify-self: center; gap: 8px; }
  .qline { width: 52px; }
  .mark { font-size: 18px; }
  .studio { padding-left: 16px; padding-right: 16px; }
  .stage { --fw: min(56vw, 300px); }
  .mirror-cap { display: none; }
  .question { font-size: 28px; }
  .answers button { font-size: 15.5px; padding: 13px 4px 13px 0; gap: 12px; }
  .captions { bottom: max(7vh, 56px); }
}
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .rise { animation-duration: .01s !important; }
  .satin { transition: opacity .4s; }
  .uncovered .satin { transform: none; }
  .frame.breathe .satin { animation: none; }
  .shake, #stage.shake, .knife.tremble canvas, .map-ring, .jolt { animation: none; }
  .pulse.on { animation-duration: .3s; }
  .cue { transition: opacity .3s; filter: none; transform: none; }
}
