:root {
  --ink: #f9f5ec;
  --muted: #c9c0b2;
  --night: #11091a;
  --plum: #34213f;
  --red: #ee5b4d;
  --lime: #b6da58;
  --theme-accent: #b6da58;
  --theme-accent-strong: #ee5b4d;
  --theme-surface: #281c2c;
  --theme-background-top: #11091a;
  --theme-background-bottom: #19302d;
  --line: rgba(249, 245, 236, 0.16);
}

html, body { min-height: 100%; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; min-height: 100vh; min-height: 100dvh; margin: 0; color: var(--ink); font-family: Manrope, sans-serif; background: linear-gradient(150deg, var(--theme-background-top), var(--theme-surface) 55%, var(--theme-background-bottom)); transition: background .3s ease; }
button { font: inherit; }
.game-shell { width: min(100%, 680px); min-height: 100vh; margin: auto; padding: 18px 18px 30px; }
.game-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; font-weight: 800; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.round-meta { text-align: center; font-family: "DM Mono", monospace; font-size: 0.7rem; letter-spacing: .08em; color: var(--muted); }
.round-meta strong { display: block; color: var(--ink); font-size: .82rem; }
.header-menu { display: inline-flex; justify-self: end; align-items: center; gap: 8px; }
.active-mode-label { color: var(--theme-accent); font: 700 .62rem "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase; }
.icon-button { justify-self: end; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: rgba(255,255,255,.06); color: var(--ink); cursor: pointer; font-size: 1.25rem; }
.scoreboard { display: flex; justify-content: space-between; margin: 0 4px 14px; color: var(--muted); font-family: "DM Mono", monospace; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.scoreboard strong { color: var(--ink); }
.game-card { position: relative; isolation: isolate; width: min(100%, 55vh); aspect-ratio: 4 / 5; height: auto; margin-inline: auto; overflow: hidden; border: 1px solid var(--theme-accent); border-radius: 8px; background: var(--theme-surface); box-shadow: 0 24px 60px rgba(0,0,0,.38); touch-action: none; user-select: none; }
.person-image { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.game-card::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(0,0,0,.08), rgba(5,4,7,.03) 36%, rgba(5,4,7,.9)); pointer-events: none; }
.image-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: #281c2c; }
.image-fallback[hidden] { display: none; }
.reveal-overlay { position: absolute; z-index: 4; inset: 0; display: grid; align-content: end; gap: 10px; padding: 28px 22px; background: linear-gradient(180deg, rgba(4,3,7,.12), rgba(4,3,7,.92)); }
.reveal-overlay[hidden] { display: none; }
.reveal-overlay h2 { margin: 0; font-family: Fraunces, Georgia, serif; font-size: clamp(2.4rem, 9vw, 4.4rem); line-height: .94; }
.reveal-overlay p:not(.phase-label) { margin: 0; max-width: 42ch; color: var(--ink); font-weight: 700; }
.reveal-progress { height: 5px; margin-top: 10px; overflow: hidden; background: rgba(255,255,255,.22); }
.reveal-progress span { display: block; width: 100%; height: 100%; transform-origin: left; background: var(--theme-accent); }
.reveal-progress span.running { animation: reveal-countdown 3s linear forwards; }
@keyframes reveal-countdown { to { transform: scaleX(0); } }
.card-copy { position: absolute; z-index: 2; inset: auto 22px 20px; }
.phase-label, .eyebrow { margin: 0 0 8px; color: var(--theme-accent); font-family: "DM Mono", monospace; font-size: .72rem; letter-spacing: .12em; }
.identified-name { margin: 0 0 8px; color: var(--ink); font-family: Fraunces, Georgia, serif; font-size: clamp(1.45rem, 5vw, 2.15rem); font-weight: 700; line-height: 1; }
.card-copy h1, .message-view h1, .panel-heading h2 { margin: 0; font-family: Fraunces, Georgia, serif; line-height: 1; letter-spacing: 0; }
.card-copy h1 { max-width: 12ch; font-size: clamp(2rem, 8vw, 3.6rem); }
.card-copy p:not(.phase-label) { margin: 12px 0 0; color: var(--muted); font-size: .92rem; line-height: 1.35; }
.choice-stamp { position: absolute; z-index: 3; top: 28px; left: 24px; display: none; max-width: calc(100% - 48px); padding: 7px 10px; border: 3px solid currentColor; color: var(--theme-accent); font: 800 1.3rem/1 Manrope, sans-serif; text-transform: uppercase; transform: rotate(-10deg); }
.choice-stamp.visible { display: block; }
.status-watermark { position: absolute; z-index: 3; top: 28px; display: none; padding: 7px 10px; border: 3px solid currentColor; font: 800 1.3rem/1 Manrope, sans-serif; line-height: 1; opacity: .24; text-transform: uppercase; transition: opacity .14s ease, transform .14s ease; }
.status-mode .status-watermark { display: block; }
.status-watermark-dead { left: 24px; color: #f0525e; transform: rotate(-14deg); }
.status-watermark-alive { right: 24px; color: #52d278; transform: rotate(14deg); }
.status-mode.status-preview-dead .status-watermark-dead, .status-mode.status-preview-alive .status-watermark-alive { opacity: 1; transform: rotate(0); }
.status-mode.status-preview-dead .status-watermark-alive, .status-mode.status-preview-alive .status-watermark-dead { opacity: .1; }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.choice { min-height: 64px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: rgba(255,255,255,.07); cursor: pointer; font-size: .78rem; font-weight: 700; line-height: 1.2; }
.choice:hover, .choice:focus-visible { outline: 2px solid var(--theme-accent); outline-offset: 2px; }
.choice-status-dead { border-color: rgba(240,82,94,.58); color: #ffdce0; background: rgba(171,29,45,.26); text-align: center; }
.choice-status-alive { border-color: rgba(82,210,120,.58); color: #ddffea; background: rgba(19,123,62,.25); text-align: center; }
.choices:has(.choice-status-dead) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.choices:has(.choice-status-dead) .choice-status-dead { justify-self: center; width: min(100%, 210px); }
.choices:has(.choice-status-dead) .choice-status-alive { justify-self: center; width: min(100%, 210px); }
.choice-status-dead:hover, .choice-status-dead:focus-visible { outline-color: #f0525e; background: rgba(171,29,45,.44); }
.choice-status-alive:hover, .choice-status-alive:focus-visible { outline-color: #52d278; background: rgba(19,123,62,.43); }
.gesture-hint { margin: 13px 0 0; color: var(--muted); font-size: .78rem; text-align: center; }
.message-view { display: grid; min-height: 68vh; align-content: center; text-align: center; }
.loading-spinner { width: 54px; height: 54px; margin: 0 auto 24px; border: 4px solid rgba(249,245,236,.15); border-top-color: var(--theme-accent); border-right-color: var(--theme-accent-strong); border-radius: 50%; animation: loading-spin .75s linear infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
.message-view h1 { font-size: clamp(2.7rem, 11vw, 4.8rem); }
.message-view > p:not(.eyebrow) { max-width: 38ch; margin: 20px auto 0; color: var(--muted); }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 28px auto 0; max-width: 500px; }
.result-stats div { padding: 14px 8px; border: 1px solid var(--line); background: rgba(255,255,255,.06); }
.result-stats span { display: block; color: var(--muted); font: .66rem "DM Mono", monospace; text-transform: uppercase; letter-spacing: .08em; }
.result-stats strong { display: block; margin-top: 4px; font-family: Fraunces, Georgia, serif; font-size: 1.55rem; }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.share-status { min-height: 1.5em; font-size: .8rem; }
.person-shell { width: min(100% - 32px, 760px); min-height: 100dvh; margin: 0 auto; padding: 26px 0; }
.person-back { display: inline-flex; margin-bottom: 22px; letter-spacing: 0; }
.person-card, .theme-landing { overflow: hidden; border: 1px solid var(--line); background: var(--theme-surface); box-shadow: 0 24px 60px rgba(0,0,0,.38); }
.person-card { display: grid; grid-template-columns: minmax(240px, .9fr) 1.1fr; }
.person-portrait { width: 100%; height: 100%; min-height: 430px; object-fit: cover; }
.person-copy, .theme-landing { padding: 32px; }
.person-copy h1, .theme-landing h1 { margin: 0; font-family: Fraunces, Georgia, serif; font-size: clamp(2.3rem, 6vw, 4rem); line-height: .95; }
.person-copy > p:not(.eyebrow), .theme-landing > p { color: var(--muted); }
.person-prompt { margin-top: 32px; color: var(--ink) !important; font-weight: 800; }
.person-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.person-answer { min-height: 58px; border: 1px solid; color: var(--ink); font: 800 1rem Manrope, sans-serif; cursor: pointer; }
.person-dead { border-color: #f0525e; background: rgba(171,29,45,.35); }
.person-alive { border-color: #52d278; background: rgba(19,123,62,.35); }
.person-result { min-height: 1.5em; color: var(--ink) !important; font-weight: 800; }
.theme-landing { max-width: 600px; margin: 10vh auto 0; }
.action-button, .secondary-button { min-height: 48px; padding: 0 18px; border-radius: 4px; font-weight: 800; cursor: pointer; }
.action-button { border: 0; color: #16120d; background: linear-gradient(135deg, var(--theme-accent), var(--theme-accent-strong)); }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.themes-panel { position: fixed; z-index: 5; top: 0; right: 0; width: min(100%, 380px); height: 100vh; padding: 26px 20px; overflow-y: auto; background: #171020; box-shadow: -20px 0 60px rgba(0,0,0,.45); transform: translateX(104%); transition: transform .22s ease; }
.themes-panel.open { transform: translateX(0); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; margin-bottom: 22px; }.panel-heading h2 { font-size: 2.4rem; }
.theme-list { display: grid; gap: 8px; margin-top: 8px; }
.theme-option { display: flex; justify-content: space-between; width: 100%; padding: 16px 14px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: rgba(255,255,255,.04); text-align: left; cursor: pointer; font-weight: 800; }.theme-option span { color: var(--muted); font: .7rem "DM Mono", monospace; }.theme-option.active { border-color: var(--theme-accent); background: rgba(255,255,255,.1); }
.panel-scrim { position: fixed; z-index: 4; inset: 0; background: rgba(0,0,0,.52); }
@media (max-width: 700px) {
  .game-shell { display: flex; flex-direction: column; width: 100%; min-height: 100dvh; padding: 0; }
  .game-header { flex: 0 0 auto; margin: 0; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; }
  .game-view { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
  .scoreboard { flex: 0 0 auto; margin: 0; padding: 10px 16px 12px; }
  .game-card { flex: 1 1 auto; width: 100%; aspect-ratio: auto; height: auto; min-height: 0; border-right: 0; border-left: 0; border-radius: 0; }
  .choices { flex: 0 0 auto; padding: 0 12px; }
  .gesture-hint { flex: 0 0 auto; margin: 10px 12px calc(12px + env(safe-area-inset-bottom)); }
  .message-view { flex: 1 1 auto; min-height: 0; padding: 28px 18px calc(28px + env(safe-area-inset-bottom)); }
}
@media (max-width: 440px) { .choices { grid-template-columns: 1fr; }.choice { min-height: 42px; }.game-header { grid-template-columns: 1fr auto 1fr; }.brand span { font-size: .82rem; }.result-stats { gap: 6px; }.result-stats strong { font-size: 1.3rem; } }
@media (max-width: 600px) { .person-shell { width: 100%; padding: 0; }.person-back { padding: 18px 16px; margin: 0; }.person-card { grid-template-columns: 1fr; border-right: 0; border-left: 0; }.person-portrait { min-height: 340px; max-height: 52vh; }.person-copy, .theme-landing { padding: 24px 18px calc(24px + env(safe-area-inset-bottom)); }.theme-landing { margin-top: 0; } }