:root {
  color-scheme: dark;
  --bg: #090a0d;
  --surface: #14161b;
  --surface-2: #1b1e25;
  --ink: #f6f4ef;
  --muted: #9ba0aa;
  --line: #30343d;
  --red: #e33838;
  --red-dark: #9d1d24;
  --yellow: #f3c94d;
  --green: #35c979;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); }
body {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(227,56,56,.10), transparent 30rem),
    linear-gradient(135deg, rgba(255,255,255,.018) 25%, transparent 25%) 0 0 / 18px 18px,
    var(--bg);
}
button { font: inherit; -webkit-tap-highlight-color: transparent; }
.app-shell { width: min(100%, 520px); min-height: 100svh; margin: auto; position: relative; }
.screen { min-height: 100svh; display: none; flex-direction: column; padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(1.5rem, env(safe-area-inset-bottom)); }
.screen.active { display: flex; animation: enter .28s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.brand-lockup { text-align: center; padding-top: clamp(2rem, 8vh, 5rem); }
.eyebrow { color: var(--yellow); font-size: .76rem; font-weight: 800; letter-spacing: .2em; }
h1 { font-size: clamp(2.75rem, 12vw, 4.75rem); line-height: .83; letter-spacing: -.065em; margin: 1.1rem 0 .75rem; font-weight: 950; }
h1 span { display: block; color: transparent; -webkit-text-stroke: 1.5px var(--ink); font-size: .57em; letter-spacing: .18em; margin-left: .18em; }
.title-rule { display: flex; align-items: center; gap: .65rem; color: var(--red); width: 62%; margin: auto; }
.title-rule span { height: 1px; background: var(--line); flex: 1; }
.title-rule b { font-size: 1.25rem; }
.brand-lockup h2 { margin: .6rem 0 .15rem; font-size: 1.4rem; letter-spacing: .24em; }
.subtitle { color: var(--muted); font-weight: 700; font-size: .67rem; letter-spacing: .14em; }
.start-panel { margin-top: auto; background: rgba(20,22,27,.88); border: 1px solid var(--line); border-radius: 1.45rem; padding: 1rem; box-shadow: 0 18px 70px rgba(0,0,0,.35); }
.panel-label { margin: 0 0 .7rem; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-align: center; }
.language-switch { display: grid; grid-template-columns: 1fr 1fr; background: #0d0f13; padding: .3rem; border-radius: .85rem; gap: .3rem; }
.language { color: var(--muted); background: transparent; border: 0; border-radius: .65rem; padding: .78rem .3rem; font-weight: 750; cursor: pointer; min-height: 48px; }
.language span { display: inline-grid; place-items: center; margin-right: .35rem; width: 1.75rem; height: 1.3rem; font-size: .62rem; color: var(--ink); border: 1px solid var(--line); border-radius: .2rem; }
.language.active { color: var(--ink); background: var(--surface-2); box-shadow: 0 2px 10px #000; }
.language.active span { border-color: var(--yellow); color: var(--yellow); }
.primary-action, .secondary-action { width: 100%; border-radius: .85rem; min-height: 56px; font-weight: 900; letter-spacing: .08em; cursor: pointer; }
.primary-action { margin-top: .8rem; border: 0; color: white; background: linear-gradient(180deg, #ef4545, #c72931); box-shadow: inset 0 1px rgba(255,255,255,.25), 0 8px 24px rgba(227,56,56,.2); }
.primary-action:active { transform: translateY(2px); box-shadow: inset 0 1px rgba(255,255,255,.2); }
.play-triangle { display: inline-block; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid white; margin-right: .6rem; }
.record-strip { display: flex; justify-content: center; gap: .55rem; align-items: baseline; color: var(--muted); font-size: .73rem; font-weight: 800; letter-spacing: .12em; margin-top: .8rem; }
.record-strip strong { color: var(--yellow); font-size: 1.05rem; }
.microcopy { text-align: center; color: #696e78; font-size: .75rem; margin: .85rem 0 0; }
.game-topline, .game-footer { display: flex; justify-content: space-between; align-items: center; }
.game-topline > div, .game-footer > div { display: flex; flex-direction: column; }
.game-topline span, .game-footer span, .result-grid span { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .14em; }
.game-topline strong, .game-footer strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.align-right { text-align: right; align-items: flex-end; }
.mini-brand { font-size: .72rem; font-weight: 900; letter-spacing: .08em; flex-direction: row !important; }
.mini-brand span { color: var(--red); font-size: inherit; letter-spacing: inherit; }
.timer-track { height: 3px; background: var(--line); margin: .75rem 0 clamp(1.1rem, 5vh, 2.6rem); overflow: hidden; }
.timer-track span { height: 100%; width: 100%; background: var(--yellow); display: block; transform-origin: left; }
.timer-track.urgent span { background: var(--red); }
.task-card { position: relative; min-height: 160px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(29,32,39,.96), rgba(17,19,24,.96)); border-radius: 1.2rem; padding: 1.3rem; box-shadow: 0 15px 50px rgba(0,0,0,.25); }
.task-card::before { content: ""; position: absolute; left: 1rem; right: 1rem; top: 0; height: 2px; background: var(--yellow); }
.task-card.red-rule::before { background: var(--red); height: 4px; }
.task-card.narrator { border-color: #66614e; background: linear-gradient(145deg, #28251d, #171714); }
#task-kicker { color: var(--yellow); font-size: .66rem; font-weight: 850; letter-spacing: .16em; }
#task-text { margin: .7rem 0 0; font-size: clamp(1.3rem, 5.5vw, 1.72rem); line-height: 1.2; font-weight: 800; text-wrap: balance; }
.task-note { color: var(--muted); font-size: .8rem; margin: .5rem 0 0; min-height: 1em; }
.signal { height: 18px; width: 18px; border-radius: 50%; margin: .9rem auto 0; background: transparent; transition: .16s; box-shadow: 0 0 0 5px transparent; }
.signal.red { background: var(--red); box-shadow: 0 0 0 5px rgba(227,56,56,.12), 0 0 24px rgba(227,56,56,.7); }
.signal.green { background: var(--green); box-shadow: 0 0 0 5px rgba(53,201,121,.12), 0 0 24px rgba(53,201,121,.7); }
.button-stage { position: relative; display: grid; place-items: center; flex: 1; min-height: 210px; }
.button-shadow { position: absolute; width: min(57vw, 250px); aspect-ratio: 1; border-radius: 50%; background: #08090b; box-shadow: 0 16px 0 #020203, 0 20px 38px #000, 0 0 0 10px #252830, 0 0 0 12px #08090c; }
.press-button { position: relative; width: min(50vw, 220px); aspect-ratio: 1; border: 0; border-radius: 50%; cursor: pointer; color: white; background: radial-gradient(circle at 48% 35%, #f65b58, var(--red) 48%, var(--red-dark) 82%); box-shadow: inset 0 8px 10px rgba(255,255,255,.17), inset 0 -12px 18px rgba(71,0,3,.35), 0 10px 0 #74131a; font-weight: 950; letter-spacing: .08em; font-size: clamp(1rem, 4vw, 1.25rem); touch-action: manipulation; user-select: none; }
.press-button::after { content: ""; position: absolute; inset: 11%; border-radius: 50%; border: 1px solid rgba(255,255,255,.16); }
.press-button small { display: block; font-size: .7rem; opacity: .65; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.press-button:active, .press-button.pressed { transform: translateY(7px) scale(.985); box-shadow: inset 0 8px 10px rgba(255,255,255,.12), inset 0 -8px 18px rgba(71,0,3,.38), 0 3px 0 #74131a; }
.icon-button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); color: var(--muted); background: var(--surface); cursor: pointer; }
.icon-button.muted { text-decoration: line-through; opacity: .55; }
#gameover-screen { justify-content: center; text-align: center; }
.result-mark { margin: 0 auto 1.3rem; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--red); color: var(--red); font-size: 3rem; font-weight: 250; }
#gameover-title { font-size: clamp(2.7rem, 13vw, 4.5rem); letter-spacing: -.05em; margin: .5rem 0; }
.result-message { color: var(--muted); min-height: 2.8em; margin: 0 auto 1.6rem; max-width: 25rem; line-height: 1.5; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; margin-bottom: .3rem; }
.result-grid div { background: var(--surface); padding: 1rem; display: flex; flex-direction: column; gap: .2rem; }
.result-grid strong { font-size: 2rem; }
.secondary-action { margin-top: .65rem; color: var(--ink); background: transparent; border: 1px solid var(--line); }
.retry-icon { font-size: 1.2rem; margin-right: .35rem; }
.feedback { position: fixed; inset: 0; pointer-events: none; z-index: 10; display: grid; place-items: center; opacity: 0; font-weight: 950; font-size: clamp(2rem, 12vw, 4rem); letter-spacing: -.04em; }
.feedback.show { animation: feedback .55s ease-out; }
.feedback.good { color: var(--green); background: rgba(9,10,13,.6); }
.feedback.bad { color: var(--red); background: rgba(9,10,13,.72); }
@keyframes feedback { 0% { opacity: 0; transform: scale(.84); } 25%,65% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.06); } }
.shake { animation: shake .28s linear; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
@media (min-width: 700px) {
  body { padding: 1.5rem; }
  .app-shell { min-height: calc(100svh - 3rem); border: 1px solid #242730; border-radius: 2rem; overflow: hidden; box-shadow: 0 30px 100px #000; }
  .screen { min-height: calc(100svh - 3rem); padding-left: 2rem; padding-right: 2rem; }
}
@media (max-height: 700px) {
  .brand-lockup { padding-top: .7rem; }
  .task-card { min-height: 125px; }
  .button-stage { min-height: 180px; }
  .button-shadow { width: 175px; }
  .press-button { width: 155px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
