:root {
  color-scheme: light;
  --rosewater: #dc8a78;
  --red: #d20f39;
  --peach: #fe640b;
  --yellow: #df8e1d;
  --green: #40a02b;
  --teal: #179299;
  --blue: #1e66f5;
  --lavender: #7287fd;
  --text: #4c4f69;
  --subtext: #6c6f85;
  --overlay: #8c8fa1;
  --surface-2: #acb0be;
  --surface-1: #bcc0cc;
  --surface-0: #ccd0da;
  --base: #eff1f5;
  --mantle: #e6e9ef;
  --crust: #dce0e8;
  --card: rgba(239, 241, 245, .92);
  --shadow: rgba(76, 79, 105, .14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
[data-theme="macchiato"] {
  color-scheme: dark;
  --rosewater: #f4dbd6;
  --red: #ed8796;
  --peach: #f5a97f;
  --yellow: #eed49f;
  --green: #a6da95;
  --teal: #8bd5ca;
  --blue: #8aadf4;
  --lavender: #b7bdf8;
  --text: #cad3f5;
  --subtext: #a5adcb;
  --overlay: #8087a2;
  --surface-2: #5b6078;
  --surface-1: #494d64;
  --surface-0: #363a4f;
  --base: #24273a;
  --mantle: #1e2030;
  --crust: #181926;
  --card: rgba(36, 39, 58, .92);
  --shadow: rgba(17, 17, 27, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --rosewater: #f4dbd6; --red: #ed8796; --peach: #f5a97f; --yellow: #eed49f;
    --green: #a6da95; --teal: #8bd5ca; --blue: #8aadf4; --lavender: #b7bdf8;
    --text: #cad3f5; --subtext: #a5adcb; --overlay: #8087a2;
    --surface-2: #5b6078; --surface-1: #494d64; --surface-0: #363a4f;
    --base: #24273a; --mantle: #1e2030; --crust: #181926;
    --card: rgba(36, 39, 58, .92); --shadow: rgba(17, 17, 27, .35);
  }
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--mantle); transition: color .2s, background .2s; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 15% 10%, color-mix(in srgb, var(--blue) 18%, transparent) 0, transparent 32%), radial-gradient(circle at 85% 80%, color-mix(in srgb, var(--teal) 16%, transparent) 0, transparent 28%); }
button, input { font: inherit; }
button, .button { border: 0; border-radius: 10px; padding: .75rem 1rem; cursor: pointer; text-decoration: none; font-weight: 700; transition: transform .12s, background .12s; }
button:hover, .button:hover { transform: translateY(-1px); }
button:focus-visible, input:focus-visible { outline: 3px solid var(--lavender); outline-offset: 2px; }
.primary { color: var(--base); background: var(--blue); }
.primary:hover { background: color-mix(in srgb, var(--blue) 84%, var(--text)); }
.secondary { color: var(--text); background: var(--surface-0); }
.danger { color: var(--red); background: color-mix(in srgb, var(--red) 16%, var(--base)); }
.shell { position: relative; width: min(980px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 4rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.brand { font-weight: 850; letter-spacing: -.03em; }
.topbar-actions { display: flex; align-items: center; gap: .7rem; }
.theme-toggle { min-width: 42px; padding: .55rem .7rem; color: var(--text); background: var(--surface-0); border: 1px solid var(--surface-1); }
.round-code { color: var(--subtext); font-size: .9rem; }
.card { background: var(--card); border: 1px solid color-mix(in srgb, var(--surface-1) 65%, transparent); border-radius: 20px; padding: clamp(1.25rem, 4vw, 2.5rem); box-shadow: 0 20px 60px var(--shadow); }
.hero { width: min(620px, calc(100% - 2rem)); margin: 10vh auto; position: relative; }
.hero-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .4rem; }
.hero-head .eyebrow { margin: 0; }
.eyebrow { margin: 0 0 .4rem; color: var(--teal); font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 850; }
h1, h2 { letter-spacing: -.04em; margin: 0; }
h1 { font-size: clamp(2.2rem, 7vw, 4rem); line-height: 1; }
h2 { font-size: 1.35rem; }
.lede { color: var(--subtext); font-size: 1.08rem; line-height: 1.6; margin: 1rem 0 2rem; }
.form-grid { display: grid; gap: 1rem; }
label { display: grid; gap: .4rem; color: var(--text); font-weight: 700; }
input { width: 100%; border: 1px solid var(--surface-1); background: var(--base); border-radius: 10px; padding: .8rem .9rem; color: var(--text); }
input::placeholder { color: var(--overlay); }
.hint { color: var(--subtext); font-size: .83rem; font-weight: 400; }
.error { min-height: 1.3rem; color: var(--red); margin: .65rem 0 0; }
.round-title { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.round-title input { font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; width: min(520px, 100%); }
.copy-link { white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: .4rem; color: var(--subtext); font-size: .9rem; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--overlay); }
.status.connected::before { background: var(--green); }
.section { margin-top: 1.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: .9rem; }
.votes { display: grid; grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); gap: .65rem; }
.vote { min-height: 68px; background: var(--base); border: 2px solid var(--surface-0); color: var(--text); font-size: 1.25rem; }
.vote.selected { color: var(--base); background: var(--blue); border-color: var(--blue); box-shadow: 0 0 0 3px var(--base), 0 0 0 6px var(--lavender), 0 7px 18px color-mix(in srgb, var(--blue) 28%, transparent); transform: translateY(-2px); }
.actions { display: flex; gap: .65rem; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--surface-0); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: var(--base); }
th, td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--surface-0); }
tr:last-child td { border-bottom: 0; }
th { color: var(--subtext); font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; }
.person { display: flex; align-items: center; gap: .65rem; font-weight: 700; }
.presence { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex: none; }
.presence.absent { background: var(--overlay); }
.absent-label { color: var(--subtext); font-weight: 400; font-size: .83rem; }
.guess { font-weight: 850; font-size: 1.1rem; }
.hidden-guess { color: var(--subtext); letter-spacing: .12em; }
.you { color: var(--teal); font-size: .78rem; margin-left: .25rem; }
.modal { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 1rem; background: color-mix(in srgb, var(--crust) 72%, transparent); backdrop-filter: blur(4px); }
.modal .card { width: min(430px, 100%); }
.not-found { position: relative; width: min(580px, calc(100% - 2rem)); margin: 15vh auto; padding: 2rem; background: var(--base); border-radius: 20px; box-shadow: 0 20px 60px var(--shadow); }
.not-found .button { display: inline-block; margin-top: 1rem; }
@media (max-width: 600px) { .shell { padding-top: 1rem; } .topbar { align-items: flex-start; } .card { border-radius: 16px; } th, td { padding: .75rem; } }
