/* ═══════════════════════════════════════════════════════════════════════
   BENCH 9 — one title screen, one bench. Print palette, screen rules.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --ink: #171310;
  --ink-soft: #4b3f33;
  --paper: #f4e9d3;
  --paper-2: #e7d6b8;
  --paper-3: #d9c4a0;
  --red: #a3231c;
  --red-deep: #74140f;
  --teal: #2c5b5f;
  --amber: #d98f3f;
  --gold: #ecb75c;
  --shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.75), 0 2px 0 rgba(0, 0, 0, 0.25);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100dvh;
  max-width: 100%;
  background: #0d0b09;
  color: var(--paper);
  font-family: var(--sans);
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

button { font: inherit; color: inherit; }

/* ─────────────────────────────────────────────────────────── texture ── */

.grain {
  position: fixed;
  inset: -20%;
  z-index: 70;
  pointer-events: none;
  opacity: 0.19;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  animation: grain-shift 6s steps(5) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1%, -2%); }
  60% { transform: translate(-1%, 2%); }
  80% { transform: translate(2%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ═══════════════════════════════════════════════════════════ TITLE ═══ */

.title-screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #07090c;
  transition: opacity 0.5s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.title-screen.is-leaving {
  opacity: 0;
  transform: scale(1.04);
  pointer-events: none;
}

.title-art,
.title-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.title-art img {
  object-fit: cover;
  object-position: 50% 55%;
  animation: drift 46s ease-in-out infinite alternate;
  filter: saturate(1.05) contrast(1.03);
}

@keyframes drift {
  from { transform: scale(1.04) translate3d(-0.6%, 0, 0); }
  to { transform: scale(1.13) translate3d(1.4%, -1.2%, 0); }
}

.title-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 62% 42%, transparent 28%, rgba(4, 6, 9, 0.72) 100%),
    linear-gradient(90deg, rgba(4, 6, 9, 0.92) 0%, rgba(4, 6, 9, 0.55) 42%, rgba(4, 6, 9, 0.08) 72%),
    linear-gradient(0deg, rgba(4, 6, 9, 0.9) 0%, transparent 38%);
}

.dust {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.dust i {
  position: absolute;
  bottom: -8px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 226, 173, 0.8);
  box-shadow: 0 0 8px rgba(255, 205, 130, 0.7);
  animation: float-up linear infinite;
}

@keyframes float-up {
  from { transform: translate3d(0, 0, 0); opacity: 0; }
  12% { opacity: 0.9; }
  85% { opacity: 0.5; }
  to { transform: translate3d(34px, -102vh, 0); opacity: 0; }
}

.title-top {
  position: absolute;
  top: clamp(16px, 3.4vh, 36px);
  left: clamp(18px, 5vw, 76px);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 3;
}

.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(244, 233, 211, 0.55);
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 18px;
  color: var(--gold);
  animation: fade-down 0.9s 0.15s both;
}

.title-top-line {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.28em;
  color: rgba(244, 233, 211, 0.62);
  animation: fade-down 0.9s 0.25s both;
}

.title-block {
  position: absolute;
  left: clamp(18px, 5vw, 76px);
  bottom: clamp(200px, 33vh, 340px);
  z-index: 3;
  max-width: min(680px, 80vw);
}

.title-kicker {
  margin: 0 0 0.9rem;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(236, 183, 92, 0.9);
  animation: fade-up 0.9s 0.35s both;
}

.title-logo {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(66px, 12.5vw, 190px);
  line-height: 0.78;
  letter-spacing: -0.035em;
  color: #f8eed9;
  text-shadow:
    0 3px 0 rgba(0, 0, 0, 0.28),
    0 22px 60px rgba(0, 0, 0, 0.65);
  animation: logo-in 1.2s 0.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.title-nine {
  display: inline-block;
  color: var(--red);
  transform: translateY(-0.04em) rotate(-3deg);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  margin-left: 0.04em;
}

@keyframes logo-in {
  from { opacity: 0; transform: translateY(26px) scale(0.985); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

.title-tag {
  margin: 1.1rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(15px, 1.5vw, 21px);
  color: rgba(244, 233, 211, 0.82);
  animation: fade-up 1s 0.6s both;
}

.stamp {
  position: absolute;
  right: clamp(-190px, -14vw, -60px);
  bottom: 6px;
  padding: 8px 12px 6px;
  border: 2px solid rgba(163, 35, 28, 0.85);
  border-radius: 3px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.16em;
  text-align: center;
  color: rgba(210, 74, 62, 0.92);
  transform: rotate(-8deg);
  opacity: 0;
  animation: stamp-in 0.5s 1.05s cubic-bezier(0.2, 1.4, 0.4, 1) forwards;
}

@keyframes stamp-in {
  0% { opacity: 0; transform: rotate(-14deg) scale(1.5); }
  70% { opacity: 1; transform: rotate(-7deg) scale(0.96); }
  100% { opacity: 1; transform: rotate(-8deg) scale(1); }
}

/* ──────────────────────────────────────────────────────────── menu ── */

.menu {
  position: absolute;
  left: clamp(18px, 5vw, 76px);
  bottom: clamp(90px, 14vh, 150px);
  z-index: 4;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: min(470px, 82vw);
}

.menu-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 11px 14px 11px 12px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: rgba(244, 233, 211, 0.72);
  transition: color 0.18s, background 0.2s, border-color 0.2s, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  animation: fade-up 0.7s both;
}

.menu-item:nth-child(1) { animation-delay: 0.72s; }
.menu-item:nth-child(2) { animation-delay: 0.8s; }
.menu-item:nth-child(3) { animation-delay: 0.88s; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

.menu-no {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(236, 183, 92, 0.55);
  transition: color 0.18s;
}

.menu-label {
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 27px);
  letter-spacing: 0.005em;
  color: #f2e6cf;
}

.menu-hint {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 233, 211, 0.34);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
}

.menu-item:hover,
.menu-item:focus-visible {
  outline: none;
  color: #fff8ea;
  background: linear-gradient(90deg, rgba(163, 35, 28, 0.28), rgba(163, 35, 28, 0) 78%);
  border-left-color: var(--red);
  transform: translateX(6px);
}

.menu-item:hover .menu-hint,
.menu-item:focus-visible .menu-hint { opacity: 1; transform: none; }
.menu-item:hover .menu-no,
.menu-item:focus-visible .menu-no { color: var(--gold); }

.press {
  position: absolute;
  right: clamp(18px, 5vw, 76px);
  bottom: clamp(52px, 7vh, 76px);
  margin: 0;
  z-index: 4;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.34em;
  color: rgba(244, 233, 211, 0.55);
  animation: blink 2.6s 1.4s infinite;
}

@keyframes blink {
  0%, 55%, 100% { opacity: 0.25; }
  65%, 80% { opacity: 0.95; }
}

.title-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 12px clamp(18px, 5vw, 76px);
  border-top: 1px solid rgba(244, 233, 211, 0.12);
  background: linear-gradient(180deg, rgba(6, 8, 11, 0), rgba(6, 8, 11, 0.75));
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 233, 211, 0.42);
}

/* ─────────────────────────────────────────────────────── how to play ── */

/* The parchment never clips on a short screen: the card scrolls, like credits. */
.how {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(3px);
  animation: fade-in 0.25s both;
}

.how-card {
  position: relative;
  width: min(520px, 88vw);
  max-height: 90dvh;
  margin: auto;
  padding: 34px 34px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  color: var(--ink-soft);
  box-shadow: var(--shadow);
  transform: rotate(-0.7deg);
}

.how-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(23, 19, 16, 0.16);
  pointer-events: none;
}

.how-kicker {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--red);
}

.how-card ol { margin: 0; padding-left: 20px; }
.how-card li { margin: 0 0 11px; font-size: 15px; line-height: 1.5; }
.how-card b { color: var(--ink); }

.how-foot {
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px dashed rgba(23, 19, 16, 0.25);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
}

.how-close {
  position: absolute;
  top: 6px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ════════════════════════════════════════════════════════════ GAME ═══ */

.wipe {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--paper);
  transform: scaleY(0);
  transform-origin: top;
  pointer-events: none;
}

.wipe.is-on { animation: wipe 0.75s cubic-bezier(0.65, 0, 0.35, 1) forwards; }

@keyframes wipe {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.game-screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  overflow-x: hidden;
  background: #0b0907;
  animation: fade-in 0.45s both;
  /* A held stopcock is a gesture, not a text selection or an image save. */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.game-screen img { -webkit-user-drag: none; }

.hold-pad,
.read-scale {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.game-screen.is-hit { animation: hit 0.42s ease; }

@keyframes hit {
  0%, 100% { transform: none; }
  20% { transform: translate(-3px, 1px); }
  45% { transform: translate(3px, -1px); }
  70% { transform: translate(-2px, 0); }
}

.bench-art,
.bench-art img { position: absolute; inset: 0; width: 100%; height: 100%; }

.bench-art img {
  object-fit: cover;
  object-position: 50% 38%;
  filter: saturate(1.02);
  animation: drift 60s ease-in-out infinite alternate;
}

.bench-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(130% 100% at 50% 20%, transparent 30%, rgba(6, 8, 10, 0.55) 100%),
    linear-gradient(0deg, rgba(8, 7, 6, 0.97) 0%, rgba(8, 7, 6, 0.72) 26%, rgba(8, 7, 6, 0.08) 58%);
}

.lamp {
  position: absolute;
  width: 44vmin;
  height: 44vmin;
  left: var(--lx, 50%);
  top: var(--ly, 34%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 142, 0.16), transparent 62%);
  pointer-events: none;
  transition: left 0.9s ease-out, top 0.9s ease-out;
}

/* ───────────────────────────────────────────────────────────── hud ── */

.hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding: clamp(14px, 2.6vh, 26px) clamp(16px, 3vw, 40px);
  background: linear-gradient(180deg, rgba(6, 7, 9, 0.86), rgba(6, 7, 9, 0));
}

.hud-tag {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  color: rgba(236, 183, 92, 0.75);
}

.hud-title {
  margin: 5px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(22px, 2.5vw, 34px);
  letter-spacing: -0.01em;
  color: #f6ecd6;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.hud-right { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 22px); }

.hud-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 12px;
  border: 1px solid rgba(244, 233, 211, 0.18);
  background: rgba(10, 9, 8, 0.55);
  backdrop-filter: blur(4px);
}

.hud-cell span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  color: rgba(244, 233, 211, 0.5);
}

.hud-cell b {
  font-family: var(--mono);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  color: #f6ecd6;
}

.hud-cell-stake b { color: var(--gold); }

.examiner {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 3px 12px 3px 3px;
  border: 1px solid rgba(244, 233, 211, 0.2);
  background: rgba(10, 9, 8, 0.62);
  backdrop-filter: blur(4px);
  transition: box-shadow 0.35s, border-color 0.35s;
}

.examiner img {
  width: 40px;
  height: 50px;
  object-fit: cover;
  object-position: 50% 16%;
  filter: grayscale(0.7) contrast(1.08) brightness(0.92);
  transition: filter 0.4s, box-shadow 0.4s;
}

.examiner-body { display: flex; flex-direction: column; gap: 5px; }

.examiner-name {
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.18em;
  color: rgba(244, 233, 211, 0.55);
  white-space: nowrap;
}

.examiner:has(.eyes[data-notice="2"]) { border-color: rgba(163, 35, 28, 0.7); }
.examiner:has(.eyes[data-notice="3"]) { border-color: var(--red); box-shadow: 0 0 22px rgba(163, 35, 28, 0.45); }
.examiner:has(.eyes[data-notice="3"]) img { filter: none; }

.eyes { display: flex; gap: 4px; }

.eyes i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(244, 233, 211, 0.18);
  transition: background 0.3s, box-shadow 0.3s;
}

.eyes[data-notice="1"] i:nth-child(1),
.eyes[data-notice="2"] i:nth-child(-n + 2),
.eyes[data-notice="3"] i {
  background: var(--red);
  box-shadow: 0 0 10px rgba(190, 50, 40, 0.9);
}

.hud-exit {
  padding: 7px 12px;
  border: 1px solid rgba(244, 233, 211, 0.28);
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: rgba(244, 233, 211, 0.7);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.hud-exit:hover { background: rgba(244, 233, 211, 0.12); color: #fff; }

.room-line {
  position: absolute;
  top: clamp(84px, 13vh, 122px);
  left: clamp(16px, 3vw, 40px);
  z-index: 4;
  margin: 0;
  max-width: 44ch;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  text-align: left;
  color: rgba(246, 236, 214, 0.58);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
  transition: color 0.3s;
  pointer-events: none;
}

.room-line[data-alarm="1"] { color: #f0a79e; }

/* ────────────────────────────────────────────────────────── panel ── */

.bench-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 46px clamp(14px, 3vw, 40px) clamp(14px, 2.6vh, 26px);
  background: linear-gradient(180deg, rgba(8, 7, 6, 0) 0%, rgba(8, 7, 6, 0.72) 34%, rgba(8, 7, 6, 0.94) 100%);
}

.speech {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) minmax(240px, 34%);
  gap: clamp(12px, 1.6vw, 22px);
  align-items: center;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 12px 16px 12px 12px;
  background: linear-gradient(180deg, #f6ecd8, #ead9bd);
  color: var(--ink);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(23, 19, 16, 0.08);
  border-left: 3px solid var(--red);
}

.speech-face {
  width: 78px;
  height: 78px;
  object-fit: cover;
  object-position: 50% 22%;
  filter: grayscale(0.15) contrast(1.05);
  box-shadow: 0 2px 0 rgba(23, 19, 16, 0.25);
}

.speech-name {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--red-deep);
}

.speech-name span {
  color: rgba(23, 19, 16, 0.42);
  letter-spacing: 0.08em;
  text-transform: none;
}

.speech-line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(14px, 1.35vw, 18px);
  line-height: 1.35;
  color: #2b231c;
  min-height: 1.35em;
}

.task {
  padding-left: clamp(10px, 1.4vw, 18px);
  border-left: 1px dashed rgba(23, 19, 16, 0.28);
}

.task-label {
  margin: 0 0 3px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.2em;
  color: rgba(23, 19, 16, 0.45);
}

.task-label b { color: var(--red); letter-spacing: 0.1em; }

.task-text {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.5vw, 20px);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}

.dots {
  display: flex;
  gap: 3px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.dots li {
  flex: 1;
  height: 3px;
  background: rgba(23, 19, 16, 0.16);
  transition: background 0.3s;
}

.dots li.is-done { background: var(--teal); }
.dots li.is-now { background: var(--red); animation: pulse-now 1.6s infinite; }

@keyframes pulse-now {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ────────────────────────────────────────────────────────── choices ── */

.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: min(1180px, 100%);
  margin: 0 auto;
}

.choice {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 12px 14px;
  border: 0;
  background: linear-gradient(180deg, #f7eddb, #e9d8ba);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 26px -12px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(23, 19, 16, 0.07);
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s, background 0.2s;
  animation: card-in 0.32s both;
}

.choice:nth-child(1) { animation-delay: 0.02s; }
.choice:nth-child(2) { animation-delay: 0.07s; }
.choice:nth-child(3) { animation-delay: 0.12s; }

@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.choice:hover:not(:disabled),
.choice:focus-visible:not(:disabled) {
  outline: none;
  transform: translateY(-3px) rotate(-0.35deg);
  background: linear-gradient(180deg, #fff7e7, #f0dfc1);
  box-shadow: 0 18px 34px -14px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(163, 35, 28, 0.35);
}

.choice:active:not(:disabled) { transform: translateY(1px); }

.choice:disabled { cursor: default; opacity: 0.55; }

.choice-no {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(23, 19, 16, 0.3);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(23, 19, 16, 0.65);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.choice:hover .choice-no {
  border-color: var(--red);
  background: var(--red);
  color: #fff3e2;
}

.choice-text {
  font-family: var(--serif);
  font-size: clamp(13.5px, 1.3vw, 16.5px);
  line-height: 1.25;
}

.choice.is-picked { background: #f3dfb9; box-shadow: inset 0 0 0 2px var(--red); }

#mark-btn { grid-column: 1 / -1; background: linear-gradient(180deg, #f2e2c4, #ddc49b); }
#mark-btn .choice-no { border-color: var(--red); color: var(--red); }

/* ─────────────────────────────────────────────────────── stopcock ── */

.cock-wrap {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #f7eddb, #e7d5b5);
  color: var(--ink);
  box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.95);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.cock-wrap:active { cursor: grabbing; }

.cock-body { min-width: 0; }

.cock-title {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--red-deep);
}

.cock-title b { color: var(--ink); letter-spacing: 0.06em; }

.cock-rail {
  position: relative;
  height: 16px;
  background: rgba(23, 19, 16, 0.12);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.cock-zone {
  position: absolute;
  left: 38%;
  width: 48%;
  top: 0;
  bottom: 0;
  background: repeating-linear-gradient(115deg, rgba(163, 35, 28, 0.14) 0 5px, rgba(163, 35, 28, 0) 5px 10px);
  border-left: 1px solid rgba(163, 35, 28, 0.55);
  border-right: 1px solid rgba(163, 35, 28, 0.55);
}

.cock-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--pour, 0) * 100%);
  background: linear-gradient(90deg, #2a1030, #7b2360 70%, #d7548f);
  box-shadow: 0 0 14px rgba(180, 60, 130, 0.5);
}

.cock-zone-label {
  position: absolute;
  left: 62%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  color: rgba(23, 19, 16, 0.7);
  pointer-events: none;
}

.cock-legend {
  margin: 7px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 12.5px;
  color: rgba(23, 19, 16, 0.62);
}

.cock-hold {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-align: right;
  color: rgba(23, 19, 16, 0.55);
  white-space: nowrap;
}

.cock-wrap.is-pouring .cock-hold { color: var(--red); }
.cock-wrap.is-bloom .cock-zone-label { color: #fff3e6; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }

/* ─────────────────────────────────────────────────────────── errors ── */

.game-error {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 9px 12px;
  background: #f7dcd6;
  border-left: 3px solid var(--red);
  color: var(--red-deep);
  font-family: var(--mono);
  font-size: 11px;
}

/* ═════════════════════════════════════════════════════════ VERDICT ═══ */

.verdict {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 5, 6, 0.78);
  backdrop-filter: blur(5px);
  overflow: auto;
  animation: fade-in 0.3s both;
}

.vcard {
  position: relative;
  width: min(760px, 94vw);
  max-height: 92dvh;
  overflow: auto;
  padding: clamp(22px, 3vw, 38px);
  background: linear-gradient(180deg, #f8eeda, #ecdcbe);
  color: var(--ink);
  box-shadow: 0 40px 90px -30px #000;
  transform: rotate(-0.8deg);
  animation: vcard-in 0.5s cubic-bezier(0.18, 1.2, 0.3, 1) both;
}

@keyframes vcard-in {
  from { opacity: 0; transform: rotate(-0.8deg) translateY(28px) scale(0.97); }
  to { opacity: 1; transform: rotate(-0.8deg); }
}

.vcard::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(23, 19, 16, 0.14);
  pointer-events: none;
}

.v-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 2px solid rgba(23, 19, 16, 0.85);
}

.v-kicker {
  margin: 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(23, 19, 16, 0.55);
}

.v-title {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.v-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 0;
  font-family: var(--serif);
  color: var(--red);
  line-height: 0.9;
}

.v-score b { font-size: clamp(48px, 7vw, 72px); font-weight: 500; }
.v-score span { font-size: 24px; opacity: 0.7; }

.v-mark {
  position: absolute;
  top: 18px;
  right: 20px;
  padding: 6px 10px;
  border: 3px solid var(--red);
  border-radius: 4px;
  transform: rotate(9deg);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-align: center;
  color: var(--red);
  opacity: 0.85;
  animation: stamp-in 0.45s 0.25s both;
}

.v-rank {
  margin: 14px 0 4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--teal);
}

.v-symptom {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.55;
  color: #3a3027;
}

.v-marks { display: grid; gap: 7px; margin: 0 0 16px; }

.v-markrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 52px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.v-markrow span:first-child { color: #3a3027; }

.v-bar {
  height: 7px;
  background: rgba(23, 19, 16, 0.14);
  overflow: hidden;
}

.v-bar i {
  display: block;
  height: 100%;
  background: var(--teal);
  transform-origin: left;
  animation: bar-grow 0.6s 0.3s both;
}

@keyframes bar-grow { from { transform: scaleX(0); } }

.v-markrow b {
  font-family: var(--mono);
  font-size: 12px;
  text-align: right;
  font-weight: 600;
}

.v-lost {
  margin: 0 0 14px;
  padding: 14px 16px;
  background: rgba(163, 35, 28, 0.07);
  border-left: 3px solid var(--red);
}

.v-lost h4 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
}

.v-lost ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }

.v-lost li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  font-size: 13px;
}

.lost-title { font-weight: 600; color: var(--ink); }
.lost-cost { font-family: var(--mono); font-size: 10px; color: var(--red); white-space: nowrap; }
.lost-why { grid-column: 1 / -1; color: #4a3f34; line-height: 1.45; }
.lost-none { color: var(--teal); font-weight: 600; }

.v-arithmetic {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 13.5px;
  color: #4a3f34;
}

.v-viva {
  margin: 0 0 16px;
  padding-top: 10px;
  border-top: 1px dashed rgba(23, 19, 16, 0.3);
}

.v-viva summary {
  cursor: pointer;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-deep);
}

.v-viva p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; }
.v-viva .viva-q { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--ink); }
.v-viva .viva-a { color: #4a3f34; }

.v-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.btn {
  padding: 11px 18px;
  border: 1px solid var(--ink);
  background: transparent;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.18s;
}

.btn-primary { background: var(--ink); color: var(--paper); }
.btn:hover { transform: translateY(-1px); }
.btn-primary:hover { background: var(--red-deep); border-color: var(--red-deep); }
.btn-ghost:hover { background: rgba(23, 19, 16, 0.08); }

.v-foot {
  margin: 16px 0 0;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(23, 19, 16, 0.55);
}

/* ════════════════════════════════════════════════════════════ FILE ═══ */

.file-view {
  position: absolute;
  inset: 0;
  z-index: 40;
  overflow: auto;
  padding: 26px 16px 60px;
  background: rgba(8, 7, 6, 0.9);
  backdrop-filter: blur(4px);
  animation: fade-in 0.3s both;
}

.file-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(860px, 100%);
  margin: 0 auto 16px;
}

.file-bar p {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 233, 211, 0.55);
}

.file-page {
  width: min(860px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 46px);
  background: #f7eeda;
  color: var(--ink);
  box-shadow: 0 30px 70px -24px #000;
}

.rec-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}

.rec-kicker {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: rgba(23, 19, 16, 0.5);
}

.rec-title {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 34px);
}

.rec-aim { margin: 0; font-size: 13.5px; line-height: 1.5; max-width: 54ch; }

.rec-score { text-align: right; font-family: var(--serif); color: var(--red); line-height: 0.95; }
.rec-score span:first-child { font-size: 42px; }
.rec-score-of { font-size: 18px; opacity: 0.7; }
.rec-score p {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(23, 19, 16, 0.5);
}

.rec-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 26px; margin-top: 22px; }

.rec-block h3 {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red-deep);
}

.rec-block { margin-top: 22px; }
.rec-grid .rec-block { margin-top: 0; }

.rec-apparatus, .rec-procedure, .rec-precaution { margin: 0; padding-left: 17px; font-size: 12.5px; line-height: 1.6; }
.rec-procedure li, .rec-precaution li { margin-bottom: 3px; }

.rec-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.rec-table th, .rec-table td { border: 1px solid rgba(23, 19, 16, 0.28); padding: 6px 8px; text-align: left; }
.rec-table thead th { background: rgba(23, 19, 16, 0.07); font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; }
.rec-table tr.struck td, .rec-table tr.struck th { text-decoration: line-through; color: rgba(23, 19, 16, 0.42); }
.rec-table tr.odd td { color: var(--red); }
.rec-empty { font-family: var(--serif); font-style: italic; font-size: 13px; color: rgba(23, 19, 16, 0.6); }

.rec-calc { margin: 0 0 4px; font-family: var(--mono); font-size: 11.5px; }
.rec-result { margin: 0 0 14px; font-size: 13.5px; font-weight: 600; }
.rec-precaution-head { margin-top: 14px !important; }

.rec-foot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-top: 26px;
  padding-top: 12px;
  border-top: 1px dashed rgba(23, 19, 16, 0.3);
  font-size: 10.5px;
  color: rgba(23, 19, 16, 0.55);
}

.rec-sign { display: flex; gap: 26px; }
.rec-sign span {
  padding-top: 22px;
  border-top: 1px solid rgba(23, 19, 16, 0.5);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─────────────────────────────────────────────────────────── responsive ── */

@media (max-width: 860px) {
  .speech { grid-template-columns: 58px minmax(0, 1fr); }
  .speech-face { width: 58px; height: 58px; }
  .task { grid-column: 1 / -1; border-left: 0; border-top: 1px dashed rgba(23, 19, 16, 0.25); padding: 10px 0 0; }
  .choices { grid-template-columns: 1fr; gap: 8px; }
  .choice { min-height: 52px; }
  .room-line { display: none; }
  .hud-cell-stake { display: none; }
  .title-foot span:last-child { display: none; }
  .stamp { display: none; }
  .rec-grid { grid-template-columns: 1fr; }
  .v-markrow { grid-template-columns: 1fr 60px 44px; }
}

@media (max-height: 720px) {
  .title-block { bottom: 210px; }
  .menu { bottom: 64px; }
  .menu-item { padding: 7px 12px; }
  .press { bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* ────────────────────────────────────────────────────────────── print ── */

@media print {
  body { background: #fff; overflow: visible; }
  .grain, .game-screen > *:not(.file-view), .file-bar { display: none !important; }
  .file-view { position: static; background: #fff; padding: 0; backdrop-filter: none; }
  .file-page { box-shadow: none; width: 100%; padding: 0; }
  .title-screen { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   BENCH 2 — the room does the talking. Glass, shelf, hands, Mr. Nair.
   ═══════════════════════════════════════════════════════════════════════ */

.game-screen { background: #08070a; }

.stage { position: absolute; inset: 0; overflow: hidden; }

.stage-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 0.9s ease, transform 1.6s ease;
  filter: saturate(0.94) contrast(1.04);
}
.stage-bg img.is-on { opacity: 1; transform: scale(1); }

.stage-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 95% at 44% 28%, transparent 26%, rgba(5, 6, 9, 0.62) 100%),
    linear-gradient(0deg, rgba(5, 5, 7, 0.96) 0%, rgba(5, 5, 7, 0.74) 22%, rgba(5, 5, 7, 0.1) 56%),
    linear-gradient(90deg, rgba(5, 5, 7, 0.7) 0%, transparent 38%);
  pointer-events: none;
}

.lamp {
  position: absolute;
  width: 52vmin;
  height: 52vmin;
  left: var(--lx, 42%);
  top: var(--ly, 34%);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 142, 0.17), transparent 64%);
  pointer-events: none;
  transition: left 0.9s ease-out, top 0.9s ease-out;
  z-index: 1;
}

/* ─────────────────────────────────────────────────────────── cabinet ── */

.cabinet {
  position: absolute;
  left: 50%;
  top: clamp(150px, 24vh, 270px);
  transform: translateX(-50%);
  width: min(1060px, 92vw);
  z-index: 3;
  animation: fade-in 0.4s both;
}

.cabinet-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 0 4px 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 233, 211, 0.45);
  border-bottom: 1px solid rgba(244, 233, 211, 0.16);
}
.cabinet-head span:last-child { color: rgba(236, 183, 92, 0.55); }

.cabinet-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 6px 0;
}

.app {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(96px, 17vmin, 150px);
  border: 1px solid rgba(244, 233, 211, 0.1);
  background:
    linear-gradient(180deg, rgba(244, 233, 211, 0.035), rgba(0, 0, 0, 0.35)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5));
  color: rgba(240, 228, 206, 0.78);
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s, color 0.2s, background 0.2s;
  overflow: hidden;
}

.app::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(236, 183, 92, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.app-glass { display: block; width: 58%; max-width: 74px; }
.app-glass svg { width: 100%; height: auto; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6)); }

.app-no {
  position: absolute;
  left: 7px;
  top: 5px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: rgba(244, 233, 211, 0.32);
}

.app:hover,
.app:focus-visible {
  outline: none;
  color: #fff6e2;
  border-color: rgba(236, 183, 92, 0.5);
  background: linear-gradient(180deg, rgba(236, 183, 92, 0.12), rgba(0, 0, 0, 0.45));
  transform: translateY(-4px);
}
.app:hover::after,
.app:focus-visible::after { opacity: 1; }

.app.is-taken { transform: translateY(-10px) scale(1.04); border-color: var(--gold); }

/* ─────────────────────────────────────────────────────────────── rig ── */

.rig {
  position: absolute;
  left: 8vw;
  bottom: 22vh;
  width: clamp(280px, 46vmin, 620px);
  height: clamp(330px, 60vmin, 800px);
  z-index: 2;
  pointer-events: none;
}
.rig[hidden] { display: none; }

.stand { position: absolute; left: 0; bottom: 0; width: 42%; height: 100%; }
.stand-base {
  position: absolute;
  left: -8%;
  bottom: 0;
  width: 112%;
  height: 2.2vmin;
  border-radius: 3px;
  background: linear-gradient(180deg, #352a20, #0f0c09);
  box-shadow: 0 1.2vmin 2.4vmin rgba(0, 0, 0, 0.75);
}
.stand-rod {
  position: absolute;
  left: 20%;
  bottom: 1.8vmin;
  width: 1.1vmin;
  height: 97%;
  background: linear-gradient(90deg, #473d34, #9c8f80 42%, #2b241e);
}
.stand-clamp {
  position: absolute;
  left: 18%;
  top: 9%;
  width: 62%;
  height: 2vmin;
  border-radius: 2px;
  background: linear-gradient(180deg, #6d6153, #2a231d);
  box-shadow: 0 0.4vmin 0.9vmin rgba(0, 0, 0, 0.65);
}

.burette { position: absolute; left: 23%; top: 4%; width: 5.2vmin; height: 58%; }
.burette-body {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 0.9vmin 0.9vmin 0.5vmin 0.5vmin;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.3) 16%, rgba(255, 255, 255, 0.04) 38%, rgba(255, 255, 255, 0.16) 78%, rgba(255, 255, 255, 0.03));
  box-shadow:
    inset 0 0 0 0.16vmin rgba(235, 250, 255, 0.5),
    0 0 3vmin rgba(150, 200, 230, 0.16);
}
.burette-body::after {
  content: "";
  position: absolute;
  left: 18%;
  top: 0;
  bottom: 0;
  width: 0.22vmin;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.18));
  opacity: 0.55;
}

.burette-liquid {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--level, 0) * 100%);
  background: linear-gradient(180deg, #4a0f34, #7d1c50 45%, #35091f);
  transition: height 0.35s ease;
}
.burette-meniscus {
  position: absolute;
  left: -4%;
  right: -4%;
  height: 1.1vmin;
  bottom: calc(var(--level, 0) * 100% - 0.55vmin);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, #ffd9ee, #8a2a5c 55%, #35091f 100%);
  opacity: calc(var(--level, 0) * 6);
  transition: bottom 0.35s ease;
}
.burette-ticks {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 48%;
  background-image: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.62) 0 0.1vmin, transparent 0.1vmin 1.5vmin);
  opacity: 0.5;
}
.burette-ticks::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.1vmin;
  background: rgba(255, 255, 255, 0.28);
}
.burette-bubble {
  position: absolute;
  left: 50%;
  bottom: 3%;
  width: 1.1vmin;
  height: 1.1vmin;
  border-radius: 50%;
  transform: translateX(-50%);
  background: rgba(255, 245, 250, 0.85);
  box-shadow: 0 0 0.8vmin rgba(255, 255, 255, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
}
#stage[data-bubble="1"] .burette-bubble { opacity: 1; }

.burette-tip {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1.9vmin;
  height: 5%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.08));
  clip-path: polygon(0 0, 100% 0, 62% 100%, 38% 100%);
}
.burette-tip span {
  position: absolute;
  left: 50%;
  top: 100%;
  width: 0.7vmin;
  height: 0.7vmin;
  margin-left: -0.35vmin;
  border-radius: 50%;
  background: #9b2a63;
  opacity: 0;
}
.stage.is-pouring .burette-tip span { animation: drip 0.62s linear infinite; opacity: 1; }
.stage.is-pouring .burette-tip span:nth-child(2) { animation-delay: 0.22s; }
.stage.is-pouring .burette-tip span:nth-child(3) { animation-delay: 0.44s; }

@keyframes drip {
  0% { transform: translateY(0) scale(0.7); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(9vmin) scale(1.05); opacity: 0; }
}

.cock {
  position: absolute;
  left: 50%;
  top: 86%;
  width: 3.4vmin;
  height: 3.4vmin;
  margin-left: -1.7vmin;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #e8ddc8, #9b8d78 55%, #4a4136);
  box-shadow: 0 0.4vmin 0.8vmin rgba(0, 0, 0, 0.7), inset 0 0 0 0.15vmin rgba(255, 255, 255, 0.35);
  transition: transform 0.25s ease;
}
.cock i {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  height: 0.5vmin;
  margin-top: -0.25vmin;
  border-radius: 1px;
  background: linear-gradient(180deg, #f4ecd9, #8c8172);
}
.cock.is-open { transform: rotate(90deg); }

.flask-wrap { position: absolute; left: 9%; bottom: 0; width: 46%; height: 37%; }
.flask { position: relative; width: 100%; height: 100%; }
.flask svg { width: 100%; height: 100%; overflow: visible; }
.flask .glass {
  fill: rgba(200, 230, 240, 0.05);
  stroke: rgba(226, 244, 250, 0.55);
  stroke-width: 2.2;
  stroke-linejoin: round;
}
.flask .glass-line { stroke: rgba(226, 244, 250, 0.4); stroke-width: 1.6; fill: none; }
.flask .liquid {
  fill: var(--flask, rgba(220, 240, 250, 0.09));
  transform-box: fill-box;
  transform-origin: bottom;
  transform: scaleY(var(--flask-fill, 0.62));
  transition: fill 0.7s ease, transform 0.5s ease;
}
.flask .meniscus { fill: rgba(255, 255, 255, 0.22); opacity: 0.5; }

.flask[data-colour="empty"] { --flask: rgba(214, 236, 244, 0.14); }
.flask[data-colour="acid"] { --flask: rgba(214, 226, 196, 0.28); }
.flask[data-colour="pink"] { --flask: #d4789e; }
.flask[data-colour="flash"] { --flask: #e08cb0; animation: flash 0.55s ease-in-out infinite; }
.flask[data-colour="deep"] { --flask: #8b1f4d; }
.flask[data-colour="brown"] { --flask: #6b4423; }

@keyframes flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.flask .swirl {
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 6%;
  height: 26%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.16), transparent 65%);
  opacity: 0;
  transition: opacity 0.3s;
}
.stage.is-pouring .flask .swirl { opacity: 1; animation: swirl 1.4s linear infinite; }
@keyframes swirl { 0% { transform: rotate(0); } 100% { transform: rotate(360deg); } }

.flask .steam {
  position: absolute;
  left: 42%;
  top: -18%;
  width: 16%;
  height: 24%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.4), transparent 70%);
  opacity: 0;
  filter: blur(4px);
}
.stage[data-scene="bath"] .flask .steam,
#stage:has(.flask[data-colour="pink"]) .flask .steam { opacity: 0.5; animation: steam 3s ease-in-out infinite; }
@keyframes steam {
  0% { transform: translateY(10%) scale(0.8); opacity: 0; }
  40% { opacity: 0.5; }
  100% { transform: translateY(-60%) scale(1.5); opacity: 0; }
}

.tile {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -1.6vmin;
  height: 1.6vmin;
  border-radius: 2px;
  background: linear-gradient(180deg, #efe7d6, #b9ae9a);
  box-shadow: 0 1.2vmin 2vmin rgba(0, 0, 0, 0.6);
  opacity: 0.9;
}

.pipette { display: none; position: absolute; left: 22%; bottom: 30%; width: 6vmin; height: 36%; }
.rig[data-act="pipette"] .pipette { display: block; }
.pipette-bulb {
  position: absolute;
  left: 50%;
  top: 0;
  width: 4.4vmin;
  height: 5.4vmin;
  margin-left: -2.2vmin;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 190, 160, 0.5), rgba(190, 90, 70, 0.4));
  box-shadow: inset 0 0 0 0.18vmin rgba(255, 255, 255, 0.35);
  transform: scaleY(calc(1 - var(--pipette, 0) * 0.18));
}
.pipette-stem {
  position: absolute;
  left: 50%;
  top: 5vmin;
  width: 0.7vmin;
  height: 22vmin;
  margin-left: -0.35vmin;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1));
  box-shadow: inset 0 0 0 0.12vmin rgba(255, 255, 255, 0.2);
}
.pipette-mark {
  position: absolute;
  left: 50%;
  top: calc(5vmin + 22vmin * 0.72);
  width: 2vmin;
  margin-left: -1vmin;
  height: 0.18vmin;
  background: rgba(255, 255, 255, 0.75);
}
.rig[data-act="pipette"] .burette { opacity: 0.35; }

.bath { display: none; position: absolute; left: 18%; bottom: 4%; width: 62%; height: 54%; }
#stage[data-scene="bath"] .bath { display: block; }
#stage[data-scene="bath"] .burette,
#stage[data-scene="bath"] .flask-wrap,
#stage[data-scene="bath"] .stand,
#stage[data-scene="bath"] .pipette { display: none; }

.bath-glass {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 16%;
  height: 62%;
  border-radius: 0 0 1.4vmin 1.4vmin;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 0 0 0.2vmin rgba(226, 244, 250, 0.4), 0 1vmin 2vmin rgba(0, 0, 0, 0.5);
}
.bath-water {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 18%;
  height: calc(20% + var(--temp, 0) * 26%);
  border-radius: 0 0 1vmin 1vmin;
  background: linear-gradient(180deg, rgba(190, 225, 235, 0.34), rgba(120, 170, 185, 0.42));
  box-shadow: inset 0 0.4vmin 0.8vmin rgba(255, 255, 255, 0.25);
  transition: height 0.3s, background 0.4s;
}
.thermo {
  position: absolute;
  left: 24%;
  bottom: 22%;
  width: 1.6vmin;
  height: 54%;
  border-radius: 1vmin;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 0.15vmin rgba(255, 255, 255, 0.45);
  overflow: hidden;
}
.thermo i {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--temp, 0) * 100%);
  background: linear-gradient(180deg, #e0533f, #ffb27a);
  transition: height 0.2s;
}
.bath-flame {
  position: absolute;
  left: 50%;
  bottom: 4%;
  width: 4vmin;
  height: 7vmin;
  margin-left: -2vmin;
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(ellipse at 50% 70%, #ffd48a, #e07a2a 55%, rgba(120, 40, 10, 0.1) 78%);
  filter: blur(1px);
  animation: flame 1.1s ease-in-out infinite alternate;
}
@keyframes flame {
  from { transform: scaleY(0.9) scaleX(1.02); opacity: 0.86; }
  to { transform: scaleY(1.12) scaleX(0.94); opacity: 1; }
}
.bath-tripod {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 10%;
  height: 0.7vmin;
  background: linear-gradient(180deg, #6b6154, #2a231d);
  box-shadow: 0 2vmin 0 -1.2vmin #2a231d, 0 4vmin 0 -1.2vmin #2a231d;
}

.burette-read {
  position: absolute;
  left: 47%;
  bottom: 64%;
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: rgba(244, 233, 211, 0.5);
  text-shadow: 0 2px 8px #000;
}

.scene-note {
  position: absolute;
  left: 50%;
  bottom: 18vh;
  transform: translateX(-50%);
  z-index: 4;
  max-width: min(620px, 60vw);
  margin: 0;
  padding: 10px 14px;
  background: rgba(10, 8, 7, 0.78);
  border-left: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.4;
  color: rgba(246, 236, 214, 0.85);
  box-shadow: 0 18px 40px -20px #000;
  animation: fade-up 0.35s both;
}

/* ────────────────────────────────────────────────────────────── nair ── */

.nair {
  position: absolute;
  right: clamp(2px, 1.4vw, 26px);
  bottom: 0;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
  max-width: 44vw;
}

.nair-art {
  height: clamp(240px, 52vh, 560px);
  width: auto;
  filter: drop-shadow(0 1.6vmin 3vmin rgba(0, 0, 0, 0.8));
  transform-origin: bottom center;
  animation: nair-in 0.55s cubic-bezier(0.2, 1.1, 0.35, 1) both;
}

@keyframes nair-in {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.nair-bubble {
  position: relative;
  align-self: flex-start;
  margin-top: 18vh;
  margin-right: -3vmin;
  width: clamp(190px, 20vw, 268px);
  padding: 13px 15px 12px;
  background: linear-gradient(180deg, #f7edd9, #e8d5b6);
  color: var(--ink);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(23, 19, 16, 0.08);
  border-left: 3px solid var(--red);
  transform: rotate(-1.4deg);
  pointer-events: auto;
}

.nair-bubble::after {
  content: "";
  position: absolute;
  right: -11px;
  bottom: 18px;
  width: 0;
  height: 0;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  border-left: 12px solid #e8d5b6;
}

.nair-bubble.is-new { animation: bubble-pop 0.35s cubic-bezier(0.2, 1.3, 0.4, 1) both; }
@keyframes bubble-pop {
  from { opacity: 0; transform: rotate(-1.4deg) translateY(8px); }
  to { opacity: 1; transform: rotate(-1.4deg); }
}

.nair-bubble[data-wrong="1"] { border-left-color: #7d130d; background: linear-gradient(180deg, #f6e2d9, #e7c6b9); }

.nair-name {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  color: var(--red-deep);
}
.nair-name span { color: rgba(23, 19, 16, 0.42); letter-spacing: 0.06em; text-transform: none; }

.nair-line {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(13.5px, 1.2vw, 16px);
  line-height: 1.36;
  color: #2b231c;
  min-height: 2.7em;
}

/* ───────────────────────────────────────────────────────── task strip ── */

.task-strip {
  position: absolute;
  top: clamp(74px, 11vh, 112px);
  left: clamp(16px, 3vw, 40px);
  z-index: 5;
  width: min(440px, 40vw);
  padding: 10px 14px 11px;
  background: linear-gradient(180deg, rgba(10, 9, 8, 0.86), rgba(10, 9, 8, 0.42));
  border-left: 2px solid var(--red);
  backdrop-filter: blur(4px);
}

.task-label { margin: 0 0 3px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.2em; color: rgba(244, 233, 211, 0.45); }
.task-label b { color: var(--gold); letter-spacing: 0.1em; }
.task-text {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(15px, 1.45vw, 20px);
  line-height: 1.22;
  color: #f6ecd6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}
.dots { display: flex; gap: 3px; margin: 9px 0 0; padding: 0; list-style: none; }
.dots li { flex: 1; height: 2px; background: rgba(244, 233, 211, 0.16); transition: background 0.3s; }
.dots li.is-done { background: var(--gold); }
.dots li.is-now { background: var(--red); animation: pulse-now 1.6s infinite; }

.room-line {
  top: clamp(80px, 10vh, 104px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  max-width: 44ch;
  text-align: center;
  font-size: 13px;
}

/* ─────────────────────────────────────────────────────────────── tray ── */

.tray {
  position: absolute;
  left: clamp(16px, 3vw, 40px);
  bottom: calc(clamp(14px, 2.4vh, 26px) + env(safe-area-inset-bottom, 0px));
  z-index: 8;
  width: min(760px, calc(100% - 330px));
  max-height: 58vh;
  overflow: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  transition: opacity 0.2s;
}
.tray.is-busy { pointer-events: none; opacity: 0.72; }

.tray-hint {
  margin: 0;
  padding: 10px 14px;
  background: rgba(10, 8, 7, 0.78);
  border-left: 2px solid rgba(236, 183, 92, 0.6);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: rgba(246, 236, 214, 0.76);
}

.go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  background: linear-gradient(180deg, #f6ecd8, #ddc79d);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(23, 19, 16, 0.14);
  transition: transform 0.16s, background 0.2s;
  white-space: nowrap;
}
.go:hover { transform: translateY(-2px); background: linear-gradient(180deg, #fff8e8, #ecd9b4); }
.go-wide { width: 100%; padding: 16px; font-size: 11px; }

/* type */

.type-pad {
  padding: 16px 18px 14px;
  background: linear-gradient(180deg, #f7eddb, #e6d3b2);
  color: var(--ink);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.95);
}
.type-label { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.22em; color: rgba(23, 19, 16, 0.5); }
.type-row { display: flex; gap: 10px; align-items: stretch; margin: 7px 0 0; }
.type-input {
  flex: 1;
  min-width: 0;
  padding: 6px 2px;
  border: 0;
  border-bottom: 2px solid rgba(23, 19, 16, 0.55);
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 32px);
  letter-spacing: 0.12em;
  color: var(--ink);
  outline: none;
  text-transform: uppercase;
}
.type-input:focus { border-bottom-color: var(--red); }
.type-input::placeholder { color: rgba(23, 19, 16, 0.24); letter-spacing: 0.14em; }

.letters { display: flex; gap: 5px; margin-top: 12px; min-height: 34px; }
.letter {
  display: grid;
  place-items: center;
  width: 30px;
  height: 34px;
  border-bottom: 2px solid rgba(23, 19, 16, 0.35);
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: 0;
  text-transform: uppercase;
  color: rgba(23, 19, 16, 0.55);
}
.letter.is-ok { color: #1f5c3a; border-bottom-color: #1f5c3a; background: rgba(31, 92, 58, 0.09); animation: letter-pop 0.3s both; }
.letter.is-bad { color: #a3231c; border-bottom-color: #a3231c; background: rgba(163, 35, 28, 0.12); animation: letter-shake 0.42s both; }
.letters-note { margin: 10px 0 0; font-family: var(--serif); font-size: 13.5px; color: #4a3f34; }
.letters-note b { letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }

@keyframes letter-pop {
  from { opacity: 0; transform: translateY(-6px) scale(0.9); }
  to { opacity: 1; transform: none; }
}
@keyframes letter-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-3px); }
  60% { transform: translateX(3px); }
}

/* bottles */

.pour-pad { display: grid; gap: 10px; }
.pour-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

.bottle {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 8px 10px;
  border: 1px solid rgba(244, 233, 211, 0.16);
  background: linear-gradient(180deg, rgba(16, 13, 11, 0.86), rgba(9, 8, 7, 0.92));
  color: rgba(246, 236, 214, 0.82);
  cursor: pointer;
  transition: transform 0.18s, border-color 0.2s, background 0.2s;
}
.bottle:hover, .bottle:focus-visible {
  outline: none;
  transform: translateY(-4px);
  border-color: rgba(236, 183, 92, 0.55);
  background: linear-gradient(180deg, rgba(30, 24, 18, 0.92), rgba(12, 10, 9, 0.95));
}
.bottle.is-poured { border-color: var(--gold); transform: translateY(-8px); }

.bottle-body {
  position: relative;
  display: block;
  width: 40px;
  height: 62px;
  border-radius: 5px 5px 4px 4px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
  overflow: hidden;
}
.bottle-body i { position: absolute; left: 0; right: 0; bottom: 0; height: 66%; display: block; }
.bottle-cap {
  position: absolute;
  left: 32%;
  top: -8px;
  width: 36%;
  height: 9px;
  border-radius: 2px;
  background: rgba(240, 228, 206, 0.5);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}
.bottle-label {
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
  color: rgba(246, 236, 214, 0.75);
  max-width: 16ch;
}

/* hold */

.hold-pad {
  padding: 14px 18px 13px;
  background: linear-gradient(180deg, #f7eddb, #e6d3b2);
  color: var(--ink);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.95);
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.hold-pad:active { cursor: grabbing; }
.hold-head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--red-deep); }
.hold-head b { color: var(--ink); }
.hold-key { color: rgba(23, 19, 16, 0.45); white-space: nowrap; }
.hold-pad.is-live .hold-key { color: var(--red); }

.hold-rail { position: relative; height: 18px; margin: 10px 0 0; background: rgba(23, 19, 16, 0.12); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28); overflow: hidden; }
.hold-band { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(115deg, rgba(163, 35, 28, 0.16) 0 5px, rgba(163, 35, 28, 0) 5px 10px); border-left: 1px solid rgba(163, 35, 28, 0.6); border-right: 1px solid rgba(163, 35, 28, 0.6); }
.hold-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, #2a1030, #7b2360 70%, #d7548f); box-shadow: 0 0 14px rgba(180, 60, 130, 0.5); }
.hold-edge { position: absolute; top: -3px; bottom: -3px; left: 0; width: 2px; background: var(--ink); opacity: 0.55; }
.hold-scale { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--mono); font-size: 8px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(23, 19, 16, 0.45); }
.hold-legend { margin: 7px 0 0; font-family: var(--serif); font-style: italic; font-size: 12.5px; color: rgba(23, 19, 16, 0.62); }

/* read */

.read-pad {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #f7eddb, #e6d3b2);
  color: var(--ink);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.95);
}

.read-scale {
  position: relative;
  height: 250px;
  border-left: 2px solid rgba(23, 19, 16, 0.75);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.12));
  cursor: ns-resize;
  touch-action: none;
}
.read-tick { position: absolute; left: 0; right: 0; height: 0; }
.read-tick i { position: absolute; left: 0; width: 9px; height: 1px; background: rgba(23, 19, 16, 0.5); }
.read-tick.is-major i { width: 18px; background: rgba(23, 19, 16, 0.8); }
.read-tick b { position: absolute; left: 22px; top: -6px; font-family: var(--mono); font-size: 8px; font-weight: 400; color: rgba(23, 19, 16, 0.55); }
.read-meniscus {
  position: absolute;
  left: 0;
  right: 0;
  top: 22.5%;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 50%, #7d1c50, rgba(125, 28, 80, 0.15) 70%, transparent);
}
.read-sight { position: absolute; left: -8px; right: 0; height: 0; border-top: 1px dashed var(--red); }
.read-sight::before { content: ""; position: absolute; left: -1px; top: -4px; width: 9px; height: 8px; background: var(--red); clip-path: polygon(0 0, 100% 50%, 0 100%); }

.read-side { display: flex; flex-direction: column; gap: 9px; }
.read-title { margin: 0; font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; color: var(--red-deep); }
.read-hint { margin: 0; font-family: var(--serif); font-size: 13px; line-height: 1.4; color: rgba(23, 19, 16, 0.6); }

.eye-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.eye-toggle button {
  padding: 8px 6px;
  border: 1px solid rgba(23, 19, 16, 0.3);
  background: transparent;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(23, 19, 16, 0.65);
  cursor: pointer;
}
.eye-toggle button.is-on { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* multi */

.multi-pad { padding: 14px 16px; background: linear-gradient(180deg, #f7eddb, #e6d3b2); color: var(--ink); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.95); }
.multi-count { margin: 0 0 9px; font-family: var(--serif); font-size: 14px; color: #3a3027; }
.multi-count b { color: var(--red); }
.multi-list { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; margin-bottom: 11px; }
.multi-item { display: grid; grid-template-columns: 16px 1fr; gap: 7px; align-items: start; padding: 4px 0; cursor: pointer; }
.multi-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.multi-box { width: 14px; height: 14px; margin-top: 2px; border: 1px solid rgba(23, 19, 16, 0.45); background: rgba(255, 255, 255, 0.4); transition: background 0.15s, border-color 0.15s; }
.multi-item input:checked + .multi-box { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 2px #f0e2c8; }
.multi-item input:focus-visible + .multi-box { outline: 2px solid var(--red); outline-offset: 2px; }
.multi-text { font-size: 12.5px; line-height: 1.35; color: #332a22; }

/* route decisions */

.plan-pad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-card {
  display: grid;
  gap: 7px;
  justify-items: start;
  padding: 14px 16px 12px;
  border: 1px solid rgba(244, 233, 211, 0.22);
  border-left: 2px solid var(--gold);
  background: linear-gradient(180deg, rgba(20, 15, 12, 0.92), rgba(10, 8, 7, 0.95));
  color: rgba(246, 236, 214, 0.9);
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s, border-color 0.2s, background 0.2s;
}
.plan-card:hover, .plan-card:focus-visible {
  outline: none;
  transform: translateY(-3px);
  border-color: rgba(236, 183, 92, 0.85);
  background: linear-gradient(180deg, rgba(34, 25, 18, 0.95), rgba(12, 10, 9, 0.96));
}
.plan-card.is-taken { border-color: var(--gold); transform: translateY(-5px); }
.plan-k { font-family: var(--serif); font-size: clamp(15px, 1.5vw, 19px); line-height: 1.2; color: #f8eedb; }
.plan-d { font-family: var(--serif); font-size: 12.5px; line-height: 1.4; color: rgba(246, 236, 214, 0.66); }
.plan-go { margin-top: 2px; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }

@media (max-width: 880px) {
  .plan-pad { grid-template-columns: 1fr; }
}

/* record */

.record-pad { padding: 14px 16px; background: linear-gradient(180deg, #f7eddb, #e6d3b2); color: var(--ink); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.95); }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.mini-table th, .mini-table td { border: 1px solid rgba(23, 19, 16, 0.25); padding: 4px 7px; text-align: left; }
.mini-table thead th { font-family: var(--mono); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; background: rgba(23, 19, 16, 0.06); }
.mini-table tr.is-odd td, .mini-table tr.is-odd th { color: var(--red); }
.record-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 10px; }
.mini-choice {
  padding: 8px 9px;
  border: 1px solid rgba(23, 19, 16, 0.28);
  background: rgba(255, 255, 255, 0.28);
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.25;
  text-align: left;
  color: #332a22;
  cursor: pointer;
}
.mini-choice.is-on { border-color: var(--red); background: rgba(163, 35, 28, 0.1); box-shadow: inset 0 0 0 1px var(--red); }
.mean-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.mean-row label { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(23, 19, 16, 0.55); }
.mean-row input {
  width: 96px;
  padding: 7px 9px;
  border: 1px solid rgba(23, 19, 16, 0.4);
  background: rgba(255, 255, 255, 0.5);
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink);
}

/* ─────────────────────────────────────────────────────────── verdict ── */

.v-who { display: flex; align-items: center; gap: 12px; }
.v-face {
  width: 58px;
  height: 74px;
  object-fit: contain;
  object-position: bottom;
  filter: grayscale(0.35) contrast(1.06);
  opacity: 0.9;
}

@media (max-width: 1020px) {
  .tray { width: calc(100% - 32px); }
  .nair { opacity: 0; pointer-events: none; }
  .task-strip { width: min(420px, 62vw); }
  .rig { left: 6vw; bottom: 30vh; }
  .room-line { display: none; }
}

@media (max-height: 760px) {
  .nair-art { height: 42vh; }
  .nair-bubble { margin-top: 10vh; }
  .rig { height: 48vmin; bottom: 30vh; }
  .cabinet { top: 15vh; }
  .app { height: 84px; }
}

/* the cabinet needs the room to fall back behind it */
#stage[data-scene="shelf"] .stage-bg img.is-on { filter: saturate(0.72) brightness(0.62) contrast(1.06) blur(1.5px); }
#stage[data-scene="shelf"] .stage-shade {
  background:
    radial-gradient(80% 70% at 50% 30%, rgba(6, 5, 8, 0.5), rgba(6, 5, 8, 0.92) 100%),
    linear-gradient(0deg, rgba(5, 5, 7, 0.98), rgba(5, 5, 7, 0.55) 45%, rgba(5, 5, 7, 0.8));
}
.app { background: linear-gradient(180deg, rgba(14, 11, 9, 0.86), rgba(6, 5, 4, 0.94)); }
.app:hover, .app:focus-visible { background: linear-gradient(180deg, rgba(44, 32, 18, 0.9), rgba(10, 8, 6, 0.95)); }

/* the tap reads as brass, not as a pearl */
.cock {
  width: 2.6vmin;
  height: 2.6vmin;
  margin-left: -1.3vmin;
  background: radial-gradient(circle at 36% 26%, #d9cbb4, #8a7b66 48%, #2f281f 100%);
  box-shadow: 0 0.3vmin 0.7vmin rgba(0, 0, 0, 0.85), inset 0 0 0 0.12vmin rgba(255, 246, 226, 0.35);
}
.cock i {
  left: -14%;
  right: -14%;
  height: 0.55vmin;
  margin-top: -0.27vmin;
  background: linear-gradient(180deg, #f6eedb, #7c7060);
  box-shadow: 0 0.1vmin 0.3vmin rgba(0, 0, 0, 0.5);
}

.flask[data-colour="empty"] { --flask: rgba(206, 232, 242, 0.07); }

/* the bath scene: the room falls back, the glass in front does the talking */
#stage[data-scene="bath"] .stage-bg img.is-on { filter: saturate(0.68) brightness(0.46) contrast(1.1) blur(2px); }
#stage[data-scene="bath"] .stage-shade {
  background:
    radial-gradient(70% 62% at 40% 42%, rgba(6, 5, 8, 0.42), rgba(6, 5, 8, 0.94) 100%),
    linear-gradient(0deg, rgba(5, 5, 7, 0.98), rgba(5, 5, 7, 0.5) 52%, rgba(5, 5, 7, 0.86));
}
.bath { left: 22%; bottom: 4%; width: 58%; height: 54%; }
.bath-glass { background: linear-gradient(90deg, rgba(220, 244, 252, 0.16), rgba(220, 244, 252, 0.05)); box-shadow: inset 0 0 0 0.24vmin rgba(226, 244, 250, 0.55), 0 1.4vmin 2.6vmin rgba(0, 0, 0, 0.7); }

/* verdict: the stamp must not sit on the score, and the record reads top to bottom */
.v-top { padding-right: 92px; }
.record-actions { grid-template-columns: 1fr; gap: 5px; }
.mini-choice { display: flex; align-items: center; gap: 8px; }
.mini-choice.is-on::before { content: "✓"; color: var(--red); font-family: var(--mono); font-size: 11px; }
.mini-choice:not(.is-on)::before { content: "·"; color: rgba(23, 19, 16, 0.35); font-family: var(--mono); font-size: 11px; }

/* Mr. Nair belongs on tablets too: the pad gives him the right-hand column */
@media (max-width: 1100px) {
  .nair { opacity: 1; pointer-events: auto; display: flex; }
  .nair-art { height: 36vh; }
  .nair-bubble { margin-top: 12vh; width: 190px; padding: 10px 12px; }
  .nair-line { font-size: 12.5px; min-height: 2.2em; }
  .tray { width: calc(100% - 300px); }
  .task-strip { width: min(380px, 50vw); }
}
@media (max-width: 880px) {
  .nair { display: none; }
  .tray { width: calc(100% - 28px); }
}

/* the cabinet room: dark, but the glass on the shelves should still read */
#stage[data-scene="shelf"] .stage-bg img.is-on { filter: saturate(0.78) brightness(0.82) contrast(1.05) blur(1.2px); }
#stage[data-scene="shelf"] .stage-shade {
  background:
    radial-gradient(85% 72% at 50% 32%, rgba(6, 5, 8, 0.34), rgba(6, 5, 8, 0.9) 100%),
    linear-gradient(0deg, rgba(5, 5, 7, 0.97), rgba(5, 5, 7, 0.42) 48%, rgba(5, 5, 7, 0.72));
}

/* ═══════════════════════════════════════════════════════════════════════
   BENCH 3 — cut art, a clock that actually moves, asides, credits.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── the room drifts against the lamp, so the bench has depth ── */
.stage-bg img {
  transform: translate3d(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px), 0) scale(1.07);
  transition: opacity 0.9s ease, transform 0.55s ease-out;
}
.stage-bg img.is-on {
  transform: translate3d(calc(var(--px, 0) * 1px), calc(var(--py, 0) * 1px), 0) scale(1.03);
}

/* ── anything on the bench can be asked a question ── */
[data-aside] { pointer-events: auto; cursor: help; }
[data-aside]:hover { filter: brightness(1.06); }

/* ── cabinet: the instruments are photographs of glass now ── */
.app { padding: 5px; }
.app-glass {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.app-glass img {
  max-width: 76%;
  max-height: 86%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.65));
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.app:hover .app-glass img,
.app:focus-visible .app-glass img { transform: translateY(-3px) scale(1.04); }
.app.is-taken .app-glass img { transform: translateY(-6px) scale(1.06); }
.app-blank {
  display: block;
  width: 54%;
  height: 62%;
  border: 1px dashed rgba(244, 233, 211, 0.28);
  border-radius: 4px;
}

/* ── flask: three pieces of art, crossfaded ── */
.flask img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
  opacity: 0;
  transition: opacity 0.42s ease;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
}
.flask img.is-on { opacity: 1; }
.flask[data-colour="brown"] img.is-on {
  filter: sepia(0.85) hue-rotate(305deg) saturate(1.5) brightness(0.78) drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
}
.flask[data-colour="flash"] img.is-on,
.flask[data-colour="pale"] img.is-on { animation: flask-blink 0.7s ease-in-out infinite; }
@keyframes flask-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ── Nair: speaking lifts him, listening sets him down ── */
.nair-art {
  transition: filter 0.35s ease, opacity 0.35s ease, transform 0.35s ease;
}
.nair-art[data-speaking="0"] {
  filter: drop-shadow(0 1.6vmin 3vmin rgba(0, 0, 0, 0.8)) brightness(0.86) saturate(0.94);
  opacity: 0.94;
  transform: scale(0.988);
}
.nair-art[data-speaking="1"] { animation: nair-talk 1.1s ease-in-out infinite; }
@keyframes nair-talk {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-4px) scale(1.005); }
  60% { transform: translateY(-1px) scale(1.002); }
}
.nair-art.is-swap { animation: nair-swap 0.32s cubic-bezier(0.2, 1.2, 0.4, 1) both; }
@keyframes nair-swap {
  from { opacity: 0.4; transform: translateY(7px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* ── the examiner is a button, and he answers when pressed ── */
.examiner {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
}
.examiner:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }

/* ── the clock ── */
.hud-cell b#clock { font-variant-numeric: tabular-nums; }
#clock[data-low="1"] {
  color: #ff9d7a;
  animation: clock-pulse 1s steps(2, end) infinite;
}
@keyframes clock-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

/* ── the ending, and the projection, on the verdict card ── */
.v-ending {
  margin: 14px 0 0;
  padding: 12px 14px 13px;
  border-left: 2px solid var(--red);
  background: linear-gradient(180deg, rgba(163, 35, 28, 0.07), rgba(163, 35, 28, 0.02));
}
.v-ending-k {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red-deep);
}
.v-ending-t {
  margin: 3px 0 4px;
  font-family: var(--serif);
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.12;
  color: var(--ink);
}
.v-ending-l { margin: 0; font-family: var(--serif); font-size: 13px; line-height: 1.45; color: rgba(23, 19, 16, 0.72); }

.v-project {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 2px 14px;
  margin: 14px 0 0;
  padding: 10px 13px;
  background: rgba(23, 19, 16, 0.05);
  border-left: 2px solid rgba(23, 19, 16, 0.28);
}
.v-project.is-clean {
  background: rgba(44, 91, 95, 0.09);
  border-left-color: var(--teal);
}
.v-project-k {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(23, 19, 16, 0.55);
}
.v-project-v {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
}
.v-project-v b { font-size: 30px; }
.v-project-n {
  grid-column: 1 / -1;
  font-family: var(--serif);
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(23, 19, 16, 0.6);
}

/* ── time up ── */
.timeup {
  display: grid;
  gap: 10px;
  justify-items: start;
  padding: 20px 22px;
  border: 1px solid rgba(236, 183, 92, 0.35);
  background: linear-gradient(180deg, rgba(20, 12, 10, 0.86), rgba(12, 8, 7, 0.92));
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.9);
}
.timeup-k {
  margin: 0;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: #ff9d7a;
}
.timeup-l {
  margin: 0;
  max-width: 46ch;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.45;
  color: rgba(244, 233, 211, 0.82);
}

/* ── credits ── */
.credits-card {
  width: min(660px, 92vw);
  max-height: 84dvh;
  overflow-y: auto;
  padding-right: 26px;
}
.credits-title {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 27px;
  line-height: 1.1;
  color: var(--ink);
}
.credits-head {
  margin: 18px 0 6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}
.credits-line {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.credits-line b { color: var(--ink); }
.credits-list {
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.credits-list li { margin: 0 0 7px; }
.credits-list b { color: var(--ink); }
.credits-card .how-foot { font-size: 13px; }

@media (max-width: 880px) {
  .nair { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Narrow rooms: the preview panel is its own laptop. Mr. Nair moves to a
   dialogue bar at the foot of the bench instead of disappearing off it.
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 880px) {
  .cabinet { top: clamp(196px, 30vh, 300px); }
  .app { height: clamp(78px, 14vmin, 112px); }

  .nair {
    display: flex;
    left: 0;
    right: 0;
    bottom: 0;
    max-width: none;
    justify-content: flex-end;
    align-items: flex-end;
    padding: 8px 6px 6px 14px;
    background: linear-gradient(90deg, rgba(6, 5, 7, 0.95) 0%, rgba(6, 5, 7, 0.88) 58%, rgba(6, 5, 7, 0.12) 100%);
    border-top: 1px solid rgba(236, 183, 92, 0.16);
    opacity: 1;
    pointer-events: none;
  }
  .nair-art { height: clamp(104px, 19vh, 150px); opacity: 1; }
  .nair-bubble {
    margin: 0 0 6px auto;
    width: calc(100% - 130px);
    max-width: none;
    padding: 9px 12px 10px;
    transform: none;
  }
  .nair-bubble.is-new { animation: bubble-pop-flat 0.3s ease both; }
  .nair-line { font-size: 12px; line-height: 1.34; min-height: 2.9em; }
  .nair-name { font-size: 7.5px; }
  .tray { bottom: 172px; width: calc(100% - 24px); max-height: 34dvh; }
}

@keyframes bubble-pop-flat {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ══════════════════════════════════════════════════════ VERDICT ROOMS ════ */

/* The three endings get three rooms: a lit bench, a stalled flask, a collapse. */
.v-card-room {
  position: relative;
  height: clamp(148px, 25vw, 208px);
  margin: 0 0 20px;
  overflow: hidden;
  background: #0b0908;
  border: 1px solid rgba(23, 19, 16, 0.55);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.85), 0 10px 24px -16px rgba(0, 0, 0, 0.7);
  isolation: isolate;
}

.v-card-room__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
  filter: brightness(0.8) saturate(0.9);
}

.v-card-room__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 5, 5, 0.2), rgba(6, 5, 5, 0.55) 62%, rgba(6, 5, 5, 0.88));
}

.v-card-room__lamp {
  position: absolute;
  left: 50%;
  top: -22%;
  width: 78%;
  height: 130%;
  transform: translateX(-50%);
  background: radial-gradient(50% 58% at 50% 0%, rgba(255, 198, 122, 0.26), transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.v-card-room__rig {
  position: absolute;
  right: 15%;
  top: 7%;
  width: 2px;
  height: 58%;
  background: linear-gradient(180deg, rgba(240, 232, 215, 0.12), rgba(240, 232, 215, 0.42) 72%, rgba(240, 232, 215, 0.18));
}

.v-card-room__rig::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: -6px;
  width: 8px;
  height: 6px;
  background: rgba(240, 232, 215, 0.35);
  border-radius: 0 0 2px 2px;
}

/* The examiner's mark, written across the photograph. */
.v-card-room__stamp {
  position: absolute;
  left: 16px;
  bottom: 14px;
  min-width: 104px;
  padding: 7px 12px 8px;
  transform: rotate(-6deg);
  border: 2px solid rgba(236, 183, 92, 0.8);
  background: rgba(9, 8, 7, 0.34);
  color: var(--gold);
  line-height: 1;
  animation: stamp-in 0.5s 0.35s both;
}

.v-card-room__stamp::after {
  content: "EXAMINER · CLEAN";
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.18em;
  white-space: nowrap;
}

.v-card-room__stamp .an-line { height: 2px; margin-bottom: 4px; background: currentColor; opacity: 0.5; }
.v-card-room__stamp .an-line.l1 { width: 76px; }
.v-card-room__stamp .an-line.l2 { width: 54px; }
.v-card-room__stamp .an-mark,
.v-card-room__stamp .an-r,
.v-card-room__stamp .an-1,
.v-card-room__stamp .an-2,
.v-card-room__stamp .an-3 { display: none; }
.v-card-room__stamp .an-done { display: block; width: 36px; height: 2px; margin-top: 5px; background: currentColor; opacity: 0.45; }

/* Triumph: the bench is still standing and the flask is clean. */
.v-card-room__bench { position: absolute; left: 0; right: 0; bottom: 0; height: 54%; }
.v-card-room__bench__shadow {
  position: absolute;
  left: 50%;
  bottom: 22%;
  width: 46%;
  height: 12%;
  transform: translateX(-50%);
  background: radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0.7), transparent 72%);
}
.v-card-room__bench__table {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 26%;
  background: linear-gradient(180deg, #2d2319, #130f0b);
  border-top: 1px solid rgba(236, 183, 92, 0.28);
}
.v-card-room__bench__stand {
  position: absolute;
  left: 50%;
  bottom: 25%;
  width: 34px;
  height: 17%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #3b2d21, #201811);
  clip-path: polygon(32% 0, 68% 0, 100% 100%, 0 100%);
}
.v-card-room__bench__flask { position: absolute; left: 50%; bottom: 40%; width: 54px; height: 70px; transform: translateX(-50%); }
.v-card-room__bench__flask .flask-body {
  position: absolute;
  inset: 12px 0 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(197, 108, 114, 0.4) 62%, rgba(160, 74, 80, 0.55));
  clip-path: polygon(38% 0, 62% 0, 74% 36%, 100% 100%, 0 100%, 26% 36%);
}
.v-card-room__bench__flask .flask-lid {
  position: absolute;
  top: 0;
  left: 50%;
  width: 15px;
  height: 12px;
  transform: translateX(-50%);
  border: 1px solid rgba(240, 232, 215, 0.4);
  border-bottom: none;
  border-radius: 3px 3px 0 0;
}
.v-card-room__bench__flask .flask-min {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 28px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
}
.v-card-room__bench__flask .flask-marks {
  position: absolute;
  right: 9px;
  bottom: 34px;
  width: 7px;
  height: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

/* Pass: one flask left standing, gone stale. */
.v-card-room__flask { position: absolute; right: 24%; bottom: 11%; width: 44px; height: 58px; }
.v-card-room__flask .b {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(143, 92, 74, 0.45));
  border: 1px solid rgba(240, 232, 215, 0.16);
  border-top: none;
  clip-path: polygon(36% 0, 64% 0, 76% 34%, 100% 100%, 0 100%, 24% 34%);
}
.v-card-room__flask .s { position: absolute; left: 50%; bottom: 26%; width: 5px; height: 24px; transform: translateX(-50%); background: rgba(255, 255, 255, 0.16); }
.v-card-room__flask.is-staled .b { background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(112, 46, 36, 0.62) 58%, rgba(74, 26, 22, 0.8)); }
.v-card-room__flask.is-clean .b { background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(206, 130, 134, 0.5) 62%, rgba(176, 96, 100, 0.62)); }

/* Ruined: the run is on the floor. */
.v-card-room__person { position: absolute; right: 8%; bottom: 0; width: 190px; height: 108px; }
.v-card-room__person .legs { position: absolute; left: 0; bottom: 0; width: 112px; height: 26px; }
.v-card-room__person .legs .t { position: absolute; left: 0; bottom: 7px; width: 88px; height: 15px; border-radius: 8px; background: linear-gradient(180deg, #2d251d, #15110d); transform: rotate(6deg); }
.v-card-room__person .legs .l { position: absolute; left: 62px; bottom: 0; width: 46px; height: 11px; border-radius: 6px; background: #1c1712; transform: rotate(-4deg); }
.v-card-room__person .legs .r { position: absolute; left: 66px; bottom: 7px; width: 44px; height: 10px; border-radius: 6px; background: #221b15; transform: rotate(9deg); }
.v-card-room__person .body { position: absolute; left: 64px; bottom: 18px; width: 80px; height: 46px; }
.v-card-room__person .body .h { position: absolute; left: 4px; bottom: 0; width: 42px; height: 38px; border-radius: 13px; background: #2b231b; transform: rotate(-9deg); }
.v-card-room__person .body .c { position: absolute; left: 22px; bottom: 2px; width: 44px; height: 34px; border-radius: 12px; background: #241d16; transform: rotate(-14deg); }
.v-card-room__person .body .s { position: absolute; left: 40px; bottom: 10px; width: 34px; height: 16px; border-radius: 9px; background: #2f261e; transform: rotate(6deg); }
.v-card-room__person .head { position: absolute; left: 128px; bottom: 22px; width: 46px; height: 46px; overflow: hidden; border-radius: 50%; border: 2px solid #2b241d; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.65); }
.v-card-room__person .head .f { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.45) brightness(0.78) sepia(0.22); }

.v-card-room__attentive {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid rgba(236, 183, 92, 0.4);
  box-shadow: 0 0 0 3px rgba(9, 8, 7, 0.45);
  opacity: 0.85;
}
.v-card-room__attentive .examiner-face { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.75) contrast(1.05); }

.v-card-room[data-outcome="triumph"] .v-card-room__bg { filter: brightness(0.98) saturate(1.04) contrast(1.02); }
.v-card-room[data-outcome="triumph"] .v-card-room__attentive { display: none; }
.v-card-room[data-outcome="pass"] .v-card-room__bg { filter: brightness(0.66) saturate(0.82) sepia(0.12); }
.v-card-room[data-outcome="pass"] .v-card-room__lamp { background: radial-gradient(50% 58% at 50% 0%, rgba(224, 128, 96, 0.18), transparent 70%); }
.v-card-room[data-outcome="pass"] .v-card-room__stamp { border-color: rgba(190, 52, 42, 0.85); color: #e8a8a2; transform: rotate(4deg); }
.v-card-room[data-outcome="pass"] .v-card-room__stamp::after { content: "MARKS LOST · ANNOTATED"; }
.v-card-room[data-outcome="ruined"] .v-card-room__bg { filter: brightness(0.42) saturate(0.45) contrast(1.1) sepia(0.22); }
.v-card-room[data-outcome="ruined"] .v-card-room__lamp { opacity: 0.32; }
.v-card-room[data-outcome="ruined"] .v-card-room__stamp { border-color: rgba(122, 70, 44, 0.9); color: #c9957a; transform: rotate(-9deg); }
.v-card-room[data-outcome="ruined"] .v-card-room__stamp::after { content: "RUN COLLAPSED"; }

@media (max-width: 560px) {
  .v-card-room { height: 132px; margin-bottom: 16px; }
  .v-card-room__stamp { left: 10px; bottom: 10px; padding: 6px 9px; }
  .v-card-room__attentive { display: none; }
  .v-card-room__person { right: 0; transform: scale(0.86); transform-origin: bottom right; }
}

.vcard[data-outcome="triumph"] .v-mark { border-color: #234049; color: #234049; }
.vcard[data-outcome="triumph"] .v-mark::after { content: " Mr. Nair"; position: absolute; left: -16px; top: 3px; font-size: 8px; letter-spacing: 0.1em; color: #cfe9e6; opacity: 0.55; }
.vcard[data-outcome="pass"] .v-mark { border-color: var(--red); color: var(--red); }
.vcard[data-outcome="ruined"] .v-mark { border-color: #6a3b2a; color: #6a3b2a; }
