:root {
  color-scheme: dark;
  --ink: #0a111c;
  --panel: #131e2a;
  --line: #31434a;
  --gold: #e7bd77;
  --muted: #aebac2;
  --text: #f4ede0;
  --green: #223a34;
  --display: Georgia, 'Times New Roman', serif;
  font-family: system-ui, sans-serif;
  background: var(--ink);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.topbar { min-height: 70px; display: flex; justify-content: space-between; align-items: center; padding: 10px max(18px, calc((100% - 1120px)/2)); background: #0d1621; border-bottom: 1px solid #26323b; }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--gold); font-family: var(--display); font-weight: 700; letter-spacing: .11em; font-size: .91rem; }
.brand small { display: block; font: 600 .57rem system-ui; color: var(--muted); letter-spacing: .19em; margin-top: 4px; }
.sigil { width: 37px; height: 37px; display: grid; place-items: center; font-size: 1.45rem; border: 1px solid #816841; border-radius: 50%; }
.quiet, .text-button { color: var(--gold); background: transparent; border: 1px solid var(--line); min-height: 44px; padding: 8px 14px; border-radius: 8px; }
.audio { font-size: .8rem; color: var(--text); }
.audio span { color: var(--gold); margin-right: 4px; }
main { flex: 1; }
.hero { min-height: clamp(320px, 49vw, 460px); display: grid; place-items: center; position: relative; text-align: center; isolation: isolate; overflow: hidden; background: radial-gradient(ellipse at 50% 30%, #3a4851, #13202b 48%, var(--ink) 90%); }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--ink) 0%, #0a111c30 47%, #0a111c30 100%), url('./assets/village.webp') center 47% / cover; }
.hero-copy { padding: 38px 16px 28px; text-shadow: 0 3px 16px #050810, 0 1px 4px #050810; }
.ornament { color: var(--gold); font-size: 1.5rem; }
h1, h2, h3, .subtitle { font-family: var(--display); }
h1 { margin: 5px 0 0; font-size: clamp(3.8rem, 10vw, 7.5rem); font-weight: 500; line-height: 1; letter-spacing: -.045em; }
.subtitle { color: var(--gold); font-size: clamp(1rem, 3vw, 1.55rem); text-transform: uppercase; letter-spacing: .24em; margin: 12px 0 0; }
.tagline { color: #f1e8d7; margin: 21px 0 0; font-size: .95rem; }
.content { width: min(100% - 32px, 710px); margin: 0 auto; padding: 0 0 22px; }
.section-title { display: flex; align-items: center; gap: 16px; justify-content: center; margin: 1px 0 18px; }
.section-title span { height: 1px; background: #756241; flex: 1; }
.section-title h2 { margin: 0; font-size: clamp(1.35rem, 4vw, 1.85rem); font-weight: 500; }
.modes { display: grid; gap: 10px; }
.mode { display: grid; grid-template-columns: 42px 1fr 18px; align-items: center; gap: 13px; min-height: 74px; padding: 12px 16px; text-align: left; color: var(--text); border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.mode.feature { background: linear-gradient(100deg, #29423a, #1c2e2d); border-color: #566d52; }
.mode:hover, .quiet:hover { border-color: var(--gold); }
.mode-icon { display: grid; place-items: center; height: 40px; border: 1px solid #7f6947; border-radius: 8px; color: var(--gold); font-size: 1.2rem; }
.mode strong, .mode small { display: block; }
.mode strong { font: 600 1.18rem var(--display); }
.mode small { margin-top: 4px; color: var(--muted); font-size: .8rem; }
.arrow { font-size: 1.6rem; color: var(--gold); text-align: right; }
.details { display: flex; align-items: center; justify-content: center; gap: 15px; color: var(--muted); font-size: .83rem; margin: 11px 0 0; }
.details span:nth-child(2) { color: #a78954; }
.text-button { border-color: transparent; }
.resume { display: block; margin: 7px auto; }
footer { display: flex; gap: 13px; justify-content: center; align-items: center; min-height: 60px; border-top: 1px solid #26323b; color: var(--muted); font-size: .76rem; letter-spacing: .09em; }
footer a { text-decoration: none; color: var(--gold); }
footer span:nth-child(2) { color: #a78954; }
.compact .hero { min-height: 185px; }
.compact h1 { font-size: clamp(2.6rem, 8vw, 4.4rem); }
.compact .subtitle { font-size: .82rem; }
.compact .tagline { display: none; }
.compact .hero-copy { padding: 20px 12px; }
.card { background: var(--panel); border: 1px solid var(--line); padding: clamp(16px, 4vw, 28px); border-radius: 12px; }
.card h2 { margin: 0 0 12px; font-weight: 500; font-size: 1.9rem; }
.card h3 { margin: 12px 0 8px; color: var(--gold); }
.card p { color: var(--muted); line-height: 1.5; }
form, .stack { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: .92rem; }
label.check { display: flex; align-items: center; min-height: 44px; gap: 9px; }
input, select, textarea { background: #0c1721; border: 1px solid #50626b; border-radius: 7px; color: var(--text); padding: 10px 12px; min-height: 44px; width: 100%; }
input[type=checkbox] { width: 20px; min-height: 20px; accent-color: var(--gold); }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: grid; gap: 11px; margin: 0; min-width: 0; }
legend { color: var(--gold); padding: 0 6px; }
.primary { background: var(--gold); color: #19160f; font-weight: 700; border: 1px solid transparent; border-radius: 8px; min-height: 46px; padding: 10px 16px; }
.primary:hover { background: #f6d59a; }
.row { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.row > button { flex: 1 1 auto; }
.notice { width: min(100% - 32px, 710px); margin: 0 auto 14px; color: #ffd3a0; overflow-wrap: anywhere; }
.notice:empty { display: none; }
.room-code { color: var(--gold); font-size: 1.55rem; letter-spacing: .16em; }
.roster { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 7px; }
.roster li { padding: 9px; border: 1px solid var(--line); border-radius: 6px; overflow-wrap: anywhere; }
.roster .out { color: var(--muted); text-decoration: line-through; }
.role { padding: 12px; background: #1d302e; border: 1px solid #4c6254; border-radius: 8px; margin: 12px 0; }
.role h3, .role p { margin: 0; }
.role p { margin-top: 5px; }
.timer { font-size: 1.65rem; font-variant-numeric: tabular-nums; color: var(--gold); }
body[data-phase="discussion"] .hero, body[data-phase="vote"] .hero, body[data-phase="runoff"] .hero { background-color: #4b3c29; }
body[data-phase="discussion"] .hero::before, body[data-phase="vote"] .hero::before, body[data-phase="runoff"] .hero::before { filter: sepia(.38) brightness(1.2); }
@media (min-width: 760px) {
  #screen:not(.game) { padding-bottom: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero::before { transition: filter .6s; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
