/* Shared base for both screens: tokens, type, surfaces and the coded components (visual-system 1 to 4). */

@font-face { font-family: 'Alegreya Sans SC'; src: url('/fonts/alegreya-sans-sc-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Oswald'; src: url('/fonts/oswald-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Cinzel'; src: url('/fonts/cinzel.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/fonts/barlow-condensed-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Barlow Condensed'; src: url('/fonts/barlow-condensed-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Crimson Pro'; src: url('/fonts/crimson-pro.woff2') format('woff2'); font-weight: 200 900; font-display: swap; }
@font-face { font-family: 'Crimson Pro'; src: url('/fonts/crimson-pro-italic.woff2') format('woff2'); font-weight: 200 900; font-style: italic; font-display: swap; }

/* 1.2: per-act tokens are registered so the act change can ease. */
@property --velvet { syntax: '<color>'; inherits: true; initial-value: #13382C; }
@property --velvet-deep { syntax: '<color>'; inherits: true; initial-value: #0C2219; }
@property --wood { syntax: '<color>'; inherits: true; initial-value: #3B2314; }
@property --glow { syntax: '<color>'; inherits: true; initial-value: #E59A3C; }
@property --moon { syntax: '<color>'; inherits: true; initial-value: rgba(143, 168, 216, 0); }
@property --alarm { syntax: '<color>'; inherits: true; initial-value: rgba(158, 42, 43, 0); }
@property --grade { syntax: '<color>'; inherits: true; initial-value: rgba(0, 0, 0, 0); }
@property --vignette { syntax: '<number>'; inherits: true; initial-value: 0.25; }

:root {
  /* 1.1 constants */
  --brass: #D4AF37;
  --brass-hi: #F0D77A;
  --brass-lo: #8A6A1E;
  --brass-line: #6B4F14;
  --parchment: #E8D9B5;
  --parchment-edge: #C9B58A;
  --ink: #2B1D12;
  --cream: #F3E7C9;
  --wax: #A3202A;
  --string: #B3262E;
  --walnut: #3B2314;
  --walnut-hi: #5A3B24;
  --portrait-edge: #070908;
  --crimson: #9E2A2B;
  /* type */
  --f-display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --f-plate: 'Alegreya Sans SC', 'Oswald', 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-ui: 'Barlow Condensed', 'Bahnschrift SemiBold Condensed', 'Arial Narrow', sans-serif;
  --f-body: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  /* 3 */
  --shadow-card: 0 6px 14px rgba(20, 8, 0, 0.45);
  --shadow-token: 0 4px 10px rgba(0, 0, 0, 0.5);
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='96'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .45' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .18 0 0 0 0 .1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='512' height='96' filter='url(%23g)'/%3E%3C/svg%3E");
  --velvet: #13382C;
  --velvet-deep: #0C2219;
  --wood: #3B2314;
  --glow: #E59A3C;
  --dark-c: 0;
  transition: --velvet 6s, --velvet-deep 6s, --wood 6s, --glow 6s, --moon 6s, --alarm 6s, --grade 6s, --vignette 6s;
}
/* 1.2 the acts */
[data-act='2'] { --velvet: #14303A; --velvet-deep: #0B1C26; --wood: #2E2230; --glow: rgba(217, 139, 58, 0.55); --moon: #8FA8D8; --grade: rgba(40, 56, 110, 0.14); --vignette: 0.4; --dark-c: 0.2; }
[data-act='3'] { --velvet: #0A0E17; --velvet-deep: #05070D; --wood: #1F1519; --glow: rgba(229, 154, 60, 0.35); --moon: #6C86C4; --alarm: #9E2A2B; --grade: rgba(10, 16, 48, 0.18); --vignette: 0.55; --dark-c: 0.35; }
[data-power='out'] { --dark-c: 1; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: #0A0E17; color: var(--cream); font: 500 1rem/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #FFF4C2; outline-offset: 2px; box-shadow: 0 0 0 5px #000; }
ul, ol { padding-left: 0; list-style: none; margin: 0; }
h1, h2, h3, h4, p { margin: 0; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* 4.2 velvet */
.velvet, .tv, .play {
  background-color: var(--velvet);
  background-image: radial-gradient(ellipse at 50% 45%, transparent 40%, rgb(from var(--velvet-deep) r g b / calc(var(--vignette) + 0.35)) 100%), var(--noise);
  background-blend-mode: normal, overlay;
}
/* 4.3 walnut */
.walnut {
  background-color: var(--wood);
  background-image: var(--grain), repeating-linear-gradient(90deg, var(--wood), var(--walnut-hi) 3px, var(--wood) 7px, var(--wood) 19px);
  background-blend-mode: overlay, normal;
}

/* 4.1 corners and rules */
.brass-corners { position: absolute; inset: 14px; pointer-events: none; z-index: 2; }
.brass-corner { position: absolute; width: 64px; height: 64px; color: var(--brass); overflow: visible; filter: drop-shadow(0 0 5px rgb(240 215 122 / 0.45)); transition: color 3s, opacity 3s; }
/* Lit by the lamps in Acts 1 and 2; dimmed in Act 3 and in Lights Out */
[data-act='3'] .brass-corner, [data-power='out'] .brass-corner { color: var(--brass-lo); opacity: 0.62; filter: none; }
.brass-corner--tl { left: 0; top: 0; }
.brass-corner--tr { right: 0; top: 0; }
.brass-corner--bl { left: 0; bottom: 0; }
.brass-corner--br { right: 0; bottom: 0; }
.brass-rule { display: block; width: 100%; height: 24px; color: var(--brass); stroke: var(--brass); fill: none; stroke-width: 1.5; }
.brass-rule__dot { fill: var(--brass); stroke: none; }

/* 4.4 the clock */
.clock { display: block; overflow: visible; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55)); }
.clock__numeral { font: 700 16px var(--f-display); fill: var(--ink); } /* 16 on the 200 dial: VII and VIII no longer touch */
.clock__hand { transition: transform 1.2s cubic-bezier(0.5, 1.6, 0.4, 1); transform-box: view-box; }

/* 4.8 buttons */
.button {
  min-height: 56px; padding: 0 24px; border-radius: 999px; border: 2px solid var(--brass-line);
  font: 700 1.125rem/1 var(--f-ui); letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--wood); color: var(--cream); box-shadow: inset 0 1px 0 rgba(240, 215, 122, 0.35), 0 4px 10px rgba(0, 0, 0, 0.45);
}
.pill { min-height: 56px; padding: 0 28px; border-radius: 999px; border: 2px solid var(--brass-line); font: 700 1.125rem/1 var(--f-ui); letter-spacing: 0.06em; text-transform: uppercase; background: linear-gradient(180deg, #F0D77A, #D4AF37 45%, #8A6A1E); color: var(--ink); }
.button--primary { background: linear-gradient(180deg, #F0D77A, #D4AF37 45%, #8A6A1E); color: var(--ink); text-shadow: 0 1px 0 rgba(255, 240, 190, 0.5); }
.button:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(240, 215, 122, 0.35), 0 2px 5px rgba(0, 0, 0, 0.45); }
.button:disabled { filter: saturate(0.55) brightness(0.8); cursor: default; }

/* 4.5 parchment */
.parchment { background-color: var(--parchment); color: var(--ink); background-image: radial-gradient(ellipse at 18% 12%, rgb(201 181 138 / 0.45), transparent 45%), radial-gradient(ellipse at 85% 90%, rgb(201 181 138 / 0.5), transparent 50%), var(--noise); background-blend-mode: normal, normal, multiply; }

.evidence-card { position: relative; color: var(--ink); isolation: isolate; }
.evidence-card__paper { position: absolute; inset: 0; z-index: -1; filter: url(#deckle); border-radius: 6px; background-color: var(--parchment); background-image: radial-gradient(ellipse at 18% 12%, rgb(201 181 138 / 0.45), transparent 45%), radial-gradient(ellipse at 85% 90%, rgb(201 181 138 / 0.55), transparent 50%), var(--noise); background-blend-mode: normal, normal, multiply; box-shadow: var(--shadow-card); }
.evidence-card { padding: 22px 26px 22px; }
.evidence-card__title { font: 700 1.25rem/1.1 var(--f-display); text-align: center; letter-spacing: 0.03em; }
.evidence-card__fleuron { display: block; width: 120px; height: 12px; margin: 4px auto 6px; color: #8A6A1E; stroke: #8A6A1E; stroke-width: 1; fill: none; }
/* The printed card (4.5): a double rule inside the paper and a leaf in each corner */
.print-frame { position: absolute; inset: 8px; z-index: 0; pointer-events: none; border: 2px solid #6B4F14; }
.print-frame::before { content: ''; position: absolute; inset: 4px; border: 1px solid #6B4F14; }
.print-frame__leaf { position: absolute; width: 20px; height: 10px; color: #8A6A1E; }
.print-frame__leaf--tl { left: 8px; top: 8px; } .print-frame__leaf--tr { right: 8px; top: 8px; transform: scaleX(-1); }
.print-frame__leaf--bl { left: 8px; bottom: 8px; } .print-frame__leaf--br { right: 8px; bottom: 8px; transform: scaleX(-1); }
.evidence-card--mini .print-frame { inset: 4px; border-width: 1.5px; }
.evidence-card--mini .print-frame::before, .evidence-card--mini .print-frame__leaf { display: none; }
.evidence-card > :not(.evidence-card__paper):not(.print-frame) { position: relative; z-index: 1; }
/* The engraved nameplate (4.10): a straight plaque with a leaf either side, a square brass stud at each corner */
.nameplate { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; padding: 8px 24px; background: #0F2A20; color: var(--cream); border: 2px solid var(--brass); border-radius: 2px; box-shadow: inset 0 0 0 4px #0F2A20, inset 0 0 0 5px var(--brass-lo);
  background-image: linear-gradient(var(--brass), var(--brass)), linear-gradient(var(--brass), var(--brass)), linear-gradient(var(--brass), var(--brass)), linear-gradient(var(--brass), var(--brass)); background-repeat: no-repeat; background-size: 8px 8px; background-position: left -2px top -2px, right -2px top -2px, left -2px bottom -2px, right -2px bottom -2px; }
.nameplate__name { min-width: 0; overflow-wrap: normal; word-break: normal; hyphens: none; text-wrap: balance; text-align: center; }
.nameplate__leaf { flex: none; width: 20px; height: 10px; color: var(--brass); }
/* A ruled panel: the double hairline with a small brass notch at each corner (4.1) */
.banner { background-image: linear-gradient(var(--brass), var(--brass)), linear-gradient(var(--brass), var(--brass)), linear-gradient(var(--brass), var(--brass)), linear-gradient(var(--brass), var(--brass)); background-repeat: no-repeat; background-size: 10px 10px; background-position: left -2px top -2px, right -2px top -2px, left -2px bottom -2px, right -2px bottom -2px; }
.evidence-card__body { font: 500 1.125rem/1.5 var(--f-body); }
.evidence-card__window { display: block; }
.evidence-card__names { display: flex; flex-wrap: wrap; gap: 6px; font: 600 1rem var(--f-ui); }

/* Art slots: the painted file, or the coded stand-in (10) */
.art-slot { position: relative; overflow: hidden; }
.art-slot__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.art-slot__fallback { display: grid; place-items: center; width: 100%; height: 100%; color: var(--brass); font: 700 1.2em var(--f-display); letter-spacing: 0.08em; background: radial-gradient(circle at 50% 40%, rgb(229 154 60 / 0.18), transparent 62%), var(--velvet-deep); }
.art-slot[data-slot^='PRP'] .art-slot__fallback, .art-slot[data-slot='none'].evidence-card__prop .art-slot__fallback, .pin-card__prop .art-slot__fallback { background: radial-gradient(circle, rgb(240 215 122 / 0.35), transparent 70%); color: var(--brass-lo); }

/* 4.10 tokens (HTML) and their four state patterns */
.token-h { display: inline-block; flex: none; }
.token-h__svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(var(--shadow-token)); }
.token-h[data-size='36'] { width: 36px; height: 36px; }
.token-h[data-size='64'] { width: 64px; height: 64px; }
.token-h[data-size='96'] { width: 96px; height: 96px; }
.token__disc { fill: #13382C; }
.token__portrait { mix-blend-mode: lighten; }
.token__glow { fill: url(#g-glow); opacity: 0.35; mix-blend-mode: soft-light; stroke: rgb(240 215 122 / 0.35); stroke-width: 2; }
.token__mono { font: 700 36px var(--f-display); fill: var(--brass); }
.ring { fill: none; }
.ring--brass { stroke: var(--brass); stroke-width: 5; }
.ring--dashed { stroke: #E59A3C; stroke-width: 5; transform-origin: 50px 50px; animation: ring-turn 6s linear infinite; }
.ring--outer { stroke: #C9D0FF; stroke-width: 2.5; }
.ring--guilty { stroke: var(--crimson); stroke-width: 9; }
.ring__notch { fill: #0A0E17; }
.token__badge circle { fill: url(#g-brass); stroke: var(--brass-line); stroke-width: 1; }
.token__badge path { fill: none; stroke: #1B1E3A; stroke-width: 2.2; stroke-linecap: round; }
[data-state='guilty'] .token__badge path { fill: var(--crimson); stroke: var(--crimson); }
.token__mark { stroke: var(--brass); stroke-width: 2; }
.token__mark[data-mark='pale'] { fill: #D98A8F; }
.token__mark[data-mark='deep'] { fill: #6E0F16; }
.token__pip { fill: none; stroke: var(--brass); stroke-width: 3; stroke-linecap: round; }
[data-state='nervous'] > .token-h__svg, .token[data-state='nervous'] { animation: tremble 1.2s steps(8) 1; }
@keyframes ring-turn { to { transform: rotate(360deg); } }
@keyframes tremble { 25% { translate: 1px 0; } 75% { translate: -1px 0; } }

/* 4.11 countdown ring */
.countdown { position: relative; display: inline-grid; place-items: center; width: 56px; height: 56px; }
.countdown svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.countdown__track { fill: rgb(0 0 0 / 0.35); stroke: rgb(212 175 55 / 0.25); stroke-width: 6; }
.countdown__arc { fill: none; stroke: var(--brass); stroke-width: 6; stroke-linecap: round; transition: stroke-dasharray 1s linear; }
.countdown[data-urgent='yes'] .countdown__arc { stroke: var(--crimson); }
.countdown[data-urgent='yes'] { animation: pulse 1s ease-in-out infinite; }
.countdown__n { position: relative; font: 700 1.25rem/1 var(--f-ui); color: var(--cream); }
@keyframes pulse { 50% { transform: scale(1.06); } }

/* 4.7 wax */
.wax { display: block; overflow: visible; filter: drop-shadow(0 6px 8px rgba(40, 0, 0, 0.55)); }
.wax__mono { font: 700 52px var(--f-display); fill: #7E141C; paint-order: stroke; stroke: #C0303A; stroke-width: 1; }
.wax--soft { opacity: 0.75; filter: saturate(0.6) brightness(1.2) drop-shadow(0 4px 6px rgba(40, 0, 0, 0.4)); }

/* Banners, toasts, stamps */
.banner { position: relative; z-index: 3; padding: 12px 20px; border: 1.5px solid var(--brass); outline: 1.5px solid rgb(212 175 55 / 0.5); outline-offset: -7px; background: rgb(10 14 23 / 0.82); font: 500 1.125rem/1.4 var(--f-body); }
.banner strong { font: 700 1em var(--f-display); color: var(--brass-hi); margin-right: 8px; }
.toast { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); padding: 10px 20px; border: 1.5px solid var(--brass); border-radius: 999px; background: var(--walnut); font: 600 1rem var(--f-ui); letter-spacing: 0.04em; z-index: 40; }
.stamp { display: inline-block; padding: 4px 12px; border: 3px double currentColor; font: 700 1rem var(--f-ui); letter-spacing: 0.08em; text-transform: uppercase; color: #8A1A22; transform: rotate(-6deg); }
.stamp--vouched { color: #1F6A4F; font-size: 1.4rem; opacity: 0.85; }
.hint { font: 500 1rem/1.4 var(--f-body); color: rgb(243 231 201 / 0.82); }
.chip { white-space: nowrap; display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border: 1.5px solid var(--brass); border-radius: 999px; background: rgb(10 14 23 / 0.45); font: 700 28px var(--f-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--cream); }

/* The Discovery, What Really Happened, Honours (plain form, styled; the full beat-by-beat takeover is a later pass) */
.discovery, .recap, .scores { position: relative; max-width: 1100px; margin: 0 auto; padding: 48px 32px; text-align: center; }
.discovery__title, .recap__title, .scores h1 { font: 700 clamp(2rem, 6vw, 96px)/1.05 var(--f-display); color: var(--brass-hi); letter-spacing: 0.12em; text-shadow: 0 3px 12px rgba(0, 0, 0, 0.6); }
.discovery__kind { display: inline-block; margin: 20px auto; padding: 8px 40px; font: 700 clamp(1.5rem, 4vw, 72px) var(--f-display); color: var(--ink); background: linear-gradient(var(--parchment), #D9C79D); border: 2px solid var(--brass-lo); border-radius: 3px; box-shadow: inset 0 0 0 4px #D9C79D, inset 0 0 0 5px var(--brass-lo); }
.discovery__headline { font: 700 clamp(1.4rem, 3vw, 56px) var(--f-display); color: var(--cream); margin-bottom: 16px; }
.discovery__telling, .recap__lines { position: relative; text-align: left; padding: 28px 36px; color: var(--ink); background-color: var(--parchment); background-image: radial-gradient(ellipse at 20% 10%, rgb(201 181 138 / 0.5), transparent 50%), var(--noise); background-blend-mode: normal, multiply; box-shadow: var(--shadow-card); font: 500 clamp(1.125rem, 2vw, 36px)/1.45 var(--f-body); border-radius: 4px; }
.discovery__cameo { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; margin: 12px; }
.cameo { width: 140px; aspect-ratio: 3 / 4; border-radius: 50%; border: 4px solid var(--brass); box-shadow: inset 0 0 28px 4px rgb(229 154 60 / 0.22), var(--shadow-card); background: var(--portrait-edge); }
.cameo__name { display: block; font: 700 1.4rem var(--f-display); color: var(--cream); }
.cameo__post { font: 500 1.1rem var(--f-body); color: rgb(243 231 201 / 0.8); }
.discovery__mourning, .discovery__close { margin-top: 18px; font: 600 italic 1.25rem var(--f-body); color: var(--cream); }
.discovery__leads { margin-top: 16px; display: grid; gap: 8px; font: 500 1.1rem var(--f-body); text-align: left; }
.recap__verdict { font: 700 1.6rem var(--f-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--glow); margin: 12px 0 24px; }
.recap__guilty { display: flex; gap: 20px; align-items: center; justify-content: center; margin-bottom: 24px; font: 500 1.3rem var(--f-body); }
.recap__lines { display: grid; gap: 10px; list-style: none; }
.recap h2 { margin: 28px 0 12px; font: 700 1.4rem var(--f-display); color: var(--brass-hi); }
.recap__secrets, .recap__whispers { display: grid; gap: 8px; text-align: left; font: 500 1.1rem var(--f-body); }
.scores__sharpest { font: 700 1.6rem var(--f-display); color: var(--brass-hi); margin: 16px 0; }
.scores__list { display: grid; gap: 8px; text-align: left; font: 600 1.25rem var(--f-ui); }
.scores__parts { display: flex; gap: 12px; flex-wrap: wrap; font-weight: 500; color: rgb(243 231 201 / 0.75); }
.portrait { width: 96px; aspect-ratio: 3 / 4; border: 2px solid var(--brass); background: var(--portrait-edge); box-shadow: inset 0 0 28px 4px rgb(229 154 60 / 0.22); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.2s !important; }
}

/* Windows (7.5): moon by act, rain in Acts 2 and 3, two-flash lightning, spill on the floor. Shared by TV and phone. */
.window__moon { fill: var(--moon); opacity: 0.06; transition: opacity 6s; }
.window__rain { fill: url(#p-rain); opacity: 0; transition: opacity 6s; }
.window__flash { fill: #DCE6FF; opacity: 0; }
.spill { fill: #B7C8F0; opacity: 0; mix-blend-mode: screen; filter: url(#soft-blur); transition: opacity 6s; }
[data-act='2'] .window__moon { opacity: 0.18; }
[data-act='3'] .window__moon { opacity: 0.25; }
[data-act='2'] .window__rain, [data-act='3'] .window__rain { opacity: 0.55; animation: rain 0.9s steps(3) infinite; }
[data-act='2'] .spill { opacity: 0.08; }
[data-act='3'] .spill { opacity: 0.1; }
[data-act='3'] .window__flash { animation: lightning 17s linear infinite; } /* lightning is Act 3 only (7.5, Andrew) */
[data-act='3'] .spill { animation: lightning-spill 17s linear infinite; }
[data-power='out'] .window__moon { opacity: 0.12; }
[data-power='out'] .spill { opacity: 0.05; }
@keyframes rain { 50% { opacity: 0.4; } }
@keyframes lightning { 0%, 3.9% { opacity: 0; } 4% { opacity: 0.9; } 4.4% { opacity: 0; } 5.1% { opacity: 0.5; } 5.5%, 100% { opacity: 0; } }
@keyframes lightning-spill { 0%, 3.9% { opacity: 0.08; } 4% { opacity: 0.55; } 4.4% { opacity: 0.08; } 5.1% { opacity: 0.3; } 5.5%, 100% { opacity: 0.08; } }
@media (prefers-reduced-motion: reduce) { .window__flash, .spill, .window__rain { animation: none !important; } }

/* Evidence glyphs (review 7) */
.prop-glyph { width: 62%; height: 62%; fill: none; stroke: var(--brass-lo); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.prop-glyph[data-kind='light'] path { fill: rgb(229 154 60 / 0.25); }

/* ---------- Surprises, sound, the finale (core-design 9, 10.3) ---------- */
[hidden] { display: none !important; }
.token-h[data-size="44"] { width: 44px; height: 44px; }
.token-h[data-size="56"] { width: 56px; height: 56px; }
.token-h[data-size="72"] { width: 72px; height: 72px; }
.sound-toggle { flex: none; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1.5px solid var(--brass); border-radius: 50%; background: rgb(19 56 44 / 0.8); color: var(--brass-hi); }
.sound-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle[data-muted="yes"] { color: rgb(243 231 201 / 0.55); border-color: rgb(212 175 55 / 0.4); }
.sound-hint { padding: 8px 18px; border: 1.5px solid var(--brass); border-radius: 999px; background: rgb(5 7 13 / 0.7); color: var(--brass-hi); font: 700 18px var(--f-ui); letter-spacing: 0.08em; text-transform: uppercase; }

/* Prop glyphs by kind (review 2, finding 6) */
.prop-glyph[data-kind="music"] path { stroke-width: 2.4; }
.prop-glyph[data-kind="key"] path { stroke: var(--brass); }
.prop-glyph[data-kind="vessel"] path { fill: rgb(143 168 216 / 0.14); }
.prop-glyph[data-kind="textile"] path { fill: rgb(163 32 42 / 0.12); }
.prop-glyph[data-kind="timepiece"] path { stroke: var(--brass-hi); }

/* The finale's pieces shared by the TV beats and the phone page */
.player-card { display: grid; gap: 10px; padding: 18px 22px; border: 2px solid var(--brass); border-radius: 18px; background: linear-gradient(180deg, rgb(11 28 22 / 0.92), rgb(5 7 13 / 0.92)); color: var(--cream); text-align: left; }
.player-card__head { display: grid; grid-template-columns: 72px 1fr; grid-template-areas: "p n" "p r"; gap: 0 14px; align-items: center; }
.player-card__portrait { grid-area: p; width: 72px; border-radius: 50%; overflow: hidden; }
.player-card__name { grid-area: n; font: 700 1.5rem/1.1 var(--f-display); color: var(--brass-hi); }
.player-card__role { grid-area: r; font: 700 0.95rem var(--f-ui); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.8; }
.player-card__facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; font: 500 1.05rem/1.35 var(--f-body); }
.player-card__facts dt { font: 700 0.85rem var(--f-ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brass); padding-top: 4px; }
.player-card__facts dd { margin: 0; }
.player-card__route { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.player-card__route span { padding: 1px 8px; border: 1px solid rgb(212 175 55 / 0.45); border-radius: 999px; font: 600 0.9rem var(--f-ui); letter-spacing: 0.03em; }
.player-card__surprises { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.player-card__surprises [data-result="success"] { color: #A8D8A0; }
.player-card__surprises [data-result="failure"], .player-card__surprises [data-result="timeout"] { color: #E59A3C; }
.player-card__secret em, .player-card__answer em { font: 700 0.9rem var(--f-ui); font-style: normal; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass-hi); }
.player-card__secret[data-exposed="no"] em { color: #A8D8A0; }
.player-card__answer[data-right="yes"] em { color: #A8D8A0; }
.player-card__answer[data-right="no"] em { color: #E59A3C; }
.honours { display: grid; gap: 12px; text-align: left; }
.honour { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; padding: 12px 16px; border: 1.5px solid var(--brass); border-radius: 16px; background: rgb(5 7 13 / 0.55); }
.honour__title { font: 700 1.35rem var(--f-display); color: var(--brass-hi); }
.honour__text { font: 500 1.05rem/1.35 var(--f-body); }
.scoreboard { margin-top: 18px; display: grid; gap: 10px; }
.scores__sharpest { font: 700 1.6rem var(--f-display); color: var(--brass-hi); text-align: center; }
.scores__list { display: grid; gap: 8px; text-align: left; font: 600 1.1rem var(--f-ui); }
.scores__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.scores__list li[data-rank="1"] .scores__name { color: var(--brass-hi); }
.scores__parts { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 12px; font: 500 0.9rem var(--f-body); color: rgb(243 231 201 / 0.75); padding-left: 54px; }
.beat__connection-label { font: 700 1rem var(--f-ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--crimson); margin-bottom: 8px; }
.beat__connection { border-left: 5px solid var(--crimson); padding-left: 16px; color: var(--cream); font-weight: 700; }
.beat__chip { display: block; margin-top: 6px; font: 700 0.95rem var(--f-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--brass-hi); text-align: center; }
.beat__cards li[data-where="house"] .beat__chip { color: #E59A3C; }
.beat__mischief { margin-top: 18px; padding: 14px 20px; border: 2px solid var(--crimson); border-radius: 14px; background: rgb(158 42 43 / 0.15); }

/* Rattled reads from the sofa: a heavy dashed ring, a 26 px badge that stays, and a tremble that keeps going */
.token[data-state="nervous"] .token__badge circle { stroke: #E59A3C; stroke-width: 1.6; }
.token[data-state="nervous"] .token__badge path { stroke-width: 1.6; }
.token[data-state="nervous"], .token-h[data-state="nervous"] > .token-h__svg { animation: tremble 0.9s steps(8) infinite; }
.evidence-card--mini { padding: 8px 10px; }

/* What a missing or ruined object leaves behind (visual-system 7.7): drawn by code where no finished state picture exists. Dimmed with the lights. */
.absence { pointer-events: none; transition: opacity 1.2s; }
.absence__patch { fill: rgb(236 220 184 / 0.34); stroke: rgb(244 232 200 / 0.6); stroke-width: 2.5; stroke-dasharray: 9 7; }
.absence--ruined .absence__patch { fill: rgb(238 232 214 / 0.5); stroke: none; }
.absence__hook circle { fill: rgb(40 28 18 / 0.75); }
.absence__hook path, .absence__drips path { fill: none; stroke: rgb(70 54 40 / 0.7); stroke-width: 3; stroke-linecap: round; }
[data-act='3'] .absence { opacity: 0.75; }
[data-power='out'] .absence { opacity: 0.4; }
