:root {
  color-scheme: dark;
  --bg: #0c0e14;
  --card: #171a24;
  --muted: #aeb4c5;
  --line: #2c3040;
  --red: #ff5c67;
  --gold: #ffd166;
  --green: #58d68d;
  --text: #f6f7fb;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background: radial-gradient(circle at top, #242033 0, var(--bg) 48%);
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.shell {
  width: min(100%, 540px);
  min-height: 100dvh;
  margin: auto;
  padding: max(22px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand { text-align: center; margin-bottom: 28px; }
.brand .mascot { font-size: 64px; filter: drop-shadow(0 8px 18px #0008); }
h1 { font-size: clamp(36px, 12vw, 54px); line-height: 1; margin: 8px 0 14px; letter-spacing: -2px; }
h2 { margin: 0 0 12px; font-size: 26px; }
p { color: var(--muted); line-height: 1.5; }
.card {
  background: color-mix(in srgb, var(--card) 94%, transparent);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 18px 60px #0005;
}
.stack { display: grid; gap: 12px; }
.btn {
  width: 100%; border: 0; border-radius: 16px; padding: 17px 18px;
  background: #2b3041; color: var(--text); font-weight: 750; cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}
.btn:active { transform: scale(.975); }
.btn.primary { background: linear-gradient(135deg, #ff5c67, #f43f5e); }
.btn.gold { background: linear-gradient(135deg, #ffd166, #f5a623); color: #1d1720; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }
.btn:disabled { opacity: .55; cursor: default; }
.language { text-align: center; }
.language .choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.field { width: 100%; padding: 15px 16px; border-radius: 14px; color: var(--text); background: #0f1119; border: 1px solid var(--line); outline: none; }
.field:focus { border-color: var(--gold); }
.code { color: var(--gold); font: 800 30px ui-monospace, monospace; letter-spacing: 5px; text-align: center; margin: 18px 0; }
.pulse { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); display: inline-block; animation: pulse 1.2s infinite; }
.round-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: var(--muted); }
.choice { min-height: 84px; font-size: 20px; }
.choice.silent { background: linear-gradient(135deg, #1f8f65, #14664b); }
.choice.betray { background: linear-gradient(135deg, #b92d42, #741c2b); }
.locked { text-align: center; padding: 28px 4px; }
.locked .icon { font-size: 56px; animation: bob 1.6s ease-in-out infinite; }
.reveal { animation: reveal .42s cubic-bezier(.2,.8,.2,1); }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.person { background: #10121a; border-radius: 16px; padding: 14px 8px; text-align: center; }
.person .move { font-size: 32px; }
.person strong, .person small { display: block; }
.person small { color: var(--muted); margin: 7px 0; }
.years { color: var(--gold); font-size: 20px; font-weight: 800; }
.score { font-size: 30px; color: var(--gold); font-weight: 900; }
.title { font-size: 19px; color: var(--green); font-weight: 750; }
.history { margin: 12px 0 20px; }
.history-row { display: grid; grid-template-columns: 38px 1fr 1fr; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.history-row span:not(:first-child) { text-align: center; }
.top-action { position: absolute; top: max(15px, env(safe-area-inset-top)); right: 15px; width: auto; padding: 9px 12px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: #fff; color: #111; padding: 10px 16px; border-radius: 20px; opacity: 0; pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.error { color: #ff8b93; text-align: center; min-height: 24px; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
@keyframes bob { 50% { transform: translateY(-7px); } }
@keyframes reveal { from { opacity: 0; transform: rotateX(70deg) scale(.92); } to { opacity: 1; transform: none; } }
@media (min-width: 480px) { .shell { padding-left: 30px; padding-right: 30px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

