﻿:root {
  color-scheme: dark;
  --bg: #07132b;
  --panel: #101f3f;
  --text: #fffdf5;
  --muted: #d7deee;
  --accent: #f33c4a;
  --accent-2: #74b9ff;
  --white: #fffdf5;
  --navy: #07132b;
  --line: rgba(255, 253, 245, 0.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    repeating-linear-gradient(180deg, rgba(243,60,74,.78) 0 7.69vh, rgba(243,60,74,.78) 7.69vh 15.38vh, rgba(255,253,245,.82) 15.38vh 23.07vh, rgba(255,253,245,.82) 23.07vh 30.76vh),
    linear-gradient(180deg, rgba(7,19,43,.56), rgba(7,19,43,.88));
  background-attachment: fixed;
  color: var(--text);
  overflow-x: hidden;
  isolation: isolate;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0 auto auto 0;
  width: min(42vw, 640px);
  height: min(53vh, 430px);
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewBox%3d%220%200%20500%20350%22%20preserveAspectRatio%3d%22none%22%3e%3cdefs%3e%3cpolygon%20id%3d%22s%22%20fill%3d%22%23fffdf5%22%20points%3d%220%2c-7%201.9%2c-2.2%207%2c-2.2%202.9%2c1%204.4%2c6%200%2c3%20-4.4%2c6%20-2.9%2c1%20-7%2c-2.2%20-1.9%2c-2.2%22%2f%3e%3c%2fdefs%3e%3cg%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(54%2038)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(132%2038)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(210%2038)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(288%2038)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(366%2038)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(444%2038)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(94%2072)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(172%2072)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(250%2072)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(328%2072)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(406%2072)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(54%20106)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(132%20106)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(210%20106)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(288%20106)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(366%20106)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(444%20106)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(94%20140)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(172%20140)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(250%20140)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(328%20140)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(406%20140)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(54%20174)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(132%20174)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(210%20174)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(288%20174)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(366%20174)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(444%20174)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(94%20208)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(172%20208)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(250%20208)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(328%20208)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(406%20208)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(54%20242)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(132%20242)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(210%20242)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(288%20242)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(366%20242)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(444%20242)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(94%20276)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(172%20276)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(250%20276)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(328%20276)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(406%20276)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(54%20310)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(132%20310)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(210%20310)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(288%20310)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(366%20310)%27%2f%3e%3cuse%20href%3d%27%23s%27%20transform%3d%27translate(444%20310)%27%2f%3e%3c%2fg%3e%3c%2fsvg%3e") center / 100% 100% no-repeat,
    #102f6f;
  box-shadow: 0 0 80px rgba(7,19,43,.55);
  z-index: -1;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: rgba(7, 19, 43, .58);
  z-index: -1;
}
#app { position: relative; z-index: 1; }
button, input, textarea { font: inherit; }
button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #122957;
  color: var(--text);
  padding: 0 18px;
  cursor: pointer;
}
button:disabled { cursor: not-allowed; opacity: .45; }
.primary { border-color: rgba(255,253,245,.45); background: linear-gradient(135deg, #fffdf5 0 34%, #f33c4a 34% 67%, #2e73d8 67%); color: #07132b; font-weight: 900; }
input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0,0,0,.25);
  color: var(--text);
  padding: 14px;
}
textarea { min-height: 122px; resize: vertical; }
.shell, .phone-shell { width: min(1180px, calc(100vw - 48px)); margin: 0 auto; padding: 30px 0 48px; }
.phone-shell { width: min(620px, calc(100vw - 28px)); min-height: 100vh; display: grid; align-content: center; gap: 18px; }
.hero, .topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.hero { display: block; }
.eyebrow, .panel-label { margin: 0 0 8px; color: var(--accent); font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(2.4rem, 6vw, 6rem); line-height: .95; }
.game-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.game-card, .panel, .roster, .answer-card, .winner-hero, .result-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255,253,245,.08), transparent 38%),
    rgba(16,31,63,.92);
  padding: 20px;
  box-shadow: inset 0 4px 0 var(--accent);
}
.game-card:nth-child(2) { box-shadow: inset 0 4px 0 var(--white); }
.game-card:nth-child(3) { box-shadow: inset 0 4px 0 #2e73d8; }
.muted-card { opacity: .62; }
.join-room, .stack { display: grid; gap: 12px; margin-top: 18px; }
.join-url { overflow-wrap: anywhere; border-radius: 8px; background: #040b19; padding: 16px; color: var(--white); font-size: clamp(1.05rem, 2.2vw, 2rem); font-weight: 900; }
.number-label, .prompt-field { display: grid; gap: 8px; color: var(--muted); font-weight: 800; }
.player-list { display: flex; flex-wrap: wrap; gap: 10px; }
.player-list span { border-radius: 999px; background: #122957; padding: 9px 14px; font-weight: 800; }
.reader-strip { display: grid; grid-template-columns: 1fr auto; gap: 18px; color: var(--muted); }
.reader-strip strong { color: var(--accent-2); font-size: clamp(1.8rem, 4vw, 3.6rem); }
.answer-card { display: grid; gap: 18px; margin-bottom: 14px; }
.answer-card section { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.answer-card h2 { margin: 0; color: var(--accent-2); font-size: clamp(1.3rem, 3vw, 3rem); line-height: 1.05; }
.author-reveal { border: 2px solid rgba(255,253,245,.55); border-radius: 8px; background: rgba(243,60,74,.16); color: var(--white); padding: 18px; text-align: center; font-size: clamp(1.8rem, 4vw, 4rem); font-weight: 900; }
.guess-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
.guess-grid .selected { border-color: var(--accent); background: rgba(117,224,195,.18); }
.timer-note { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,247,237,.06); color: var(--muted); padding: 12px 14px; text-align: center; font-weight: 900; }
.winner-hero { min-height: 30vh; display: grid; place-items: center; text-align: center; }
.winner-hero h2 { margin: 0; color: var(--accent-2); font-size: clamp(3rem, 10vw, 9rem); line-height: .9; }
.results { display: grid; gap: 10px; margin-bottom: 14px; }
.result-row { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px; padding: 16px 18px; }
.result-row span { color: var(--accent-2); font-size: 1.6rem; font-weight: 900; }
.result-row em, .muted { color: var(--muted); font-style: normal; }
.error { border: 1px solid rgba(255,107,107,.5); border-radius: 8px; background: rgba(255,107,107,.12); color: #ffd1d1; padding: 12px; }
.patriot-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-top: 22px;
  border: 1px solid rgba(255,253,245,.32);
  border-radius: 8px;
  background: linear-gradient(90deg, #f33c4a 0 30%, #fffdf5 30% 42%, #2e73d8 42% 100%);
  color: #07132b;
  padding: 14px 18px;
  font-weight: 900;
}
.patriot-banner span { color: #07132b; font-weight: 800; }
@media (max-width: 760px) {
  html {
    background:
      repeating-linear-gradient(180deg, rgba(243,60,74,.76) 0 38px, rgba(243,60,74,.76) 38px 76px, rgba(255,253,245,.78) 76px 114px, rgba(255,253,245,.78) 114px 152px),
      #07132b;
  }

  body {
    background:
      repeating-linear-gradient(180deg, rgba(243,60,74,.76) 0 38px, rgba(243,60,74,.76) 38px 76px, rgba(255,253,245,.78) 76px 114px, rgba(255,253,245,.78) 114px 152px),
      #07132b;
    background-attachment: scroll;
  }

  body::before {
    width: min(68vw, 300px);
    height: min(32vh, 230px);
    background-size: 100% 100%;
    box-shadow: 0 18px 48px rgba(7,19,43,.45);
    z-index: 0;
  }

  body::after {
    background: linear-gradient(180deg, rgba(7,19,43,.76), rgba(7,19,43,.66));
    z-index: 0;
  }

  .shell { width: min(100vw - 24px, 1180px); }
  .topbar { display: grid; }
  h1 { font-size: clamp(2.35rem, 14vw, 4.5rem); }
  .game-grid { grid-template-columns: 1fr; }
  .patriot-banner { padding: 12px 14px; }
}

