:root {
  --ink: #171717;
  --paper: #f6f2ea;
  --surface: #fffdf8;
  --accent: #9b3c2f;
  --accent-dark: #68231a;
  --muted: #6e6a64;
  --line: #d7d0c5;
  --success: #275b4d;
  --danger: #9b3c2f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input, select { font: inherit; }
button, input, select { min-height: 48px; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.app-shell { width: min(100%, 42rem); min-height: 100dvh; margin: 0 auto; padding: 1.5rem; }
.brand { margin: 0 0 2.75rem; font-size: 1.125rem; font-weight: 800; letter-spacing: -0.04em; }
.eyebrow { margin: 0 0 .5rem; color: var(--muted); font-size: .8rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 14ch; margin-bottom: 1rem; font-size: clamp(2.25rem, 9vw, 4.5rem); line-height: .96; letter-spacing: -.06em; }
h2 { margin-bottom: .75rem; font-size: 1.25rem; letter-spacing: -.03em; }
.lead { max-width: 34rem; color: var(--muted); font-size: 1.05rem; line-height: 1.55; }
.stack { display: grid; gap: 1rem; }
.card { padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.player-row { display: grid; grid-template-columns: 1fr auto; gap: .75rem; align-items: end; }
label { display: grid; gap: .45rem; color: var(--muted); font-size: .9rem; font-weight: 700; }
input, select { width: 100%; border: 1px solid var(--line); border-radius: .7rem; background: #fff; color: var(--ink); padding: .7rem .8rem; }
.button { width: 100%; border: 0; border-radius: .75rem; background: var(--ink); color: #fff; padding: .75rem 1rem; font-weight: 800; text-align: center; }
.button:hover { background: #353535; }
.button--accent { background: var(--accent); }
.button--accent:hover { background: var(--accent-dark); }
.button--quiet { width: auto; background: transparent; color: var(--ink); border: 1px solid var(--line); }
.button--quiet:hover { background: #eee8de; }
.button--danger { color: var(--danger); }
.error { margin: 0; border-left: 4px solid var(--danger); background: #fae8e5; padding: .8rem 1rem; color: #632019; }
.notice { margin: 0; border-left: 4px solid var(--success); background: #e6f0eb; padding: .8rem 1rem; color: #194438; }
.role-card { min-height: 17rem; display: grid; align-content: center; gap: 1rem; margin-bottom: 1rem; border-radius: 1.25rem; padding: 1.5rem; background: var(--ink); color: var(--paper); text-align: center; }
.role-card > p { margin: 0; }
.role-card--citizen { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.role-word { margin: 0; font-size: clamp(2.1rem, 10vw, 4.5rem); line-height: 1; letter-spacing: -.05em; overflow-wrap: anywhere; }
.role-label { margin: 0; color: var(--muted); font-size: .9rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.role-card:not(.role-card--citizen) .role-label { color: #d7d0c5; }
.vote-result { margin: 0; font-size: clamp(2.1rem, 10vw, 4.5rem); font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.vote-result--imposter { color: var(--accent); }
.player-choice { display: grid; gap: .65rem; }
.player-choice .button { background: var(--surface); color: var(--ink); border: 1px solid var(--line); text-align: left; }
.player-choice .button:hover { border-color: var(--ink); background: #fff; }
.result-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.result-list li { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding: .7rem 0; }
.status { color: var(--muted); }
.status--imposter { color: var(--accent); font-weight: 800; }
.divider { height: 1px; background: var(--line); margin: .5rem 0; }
@media (min-width: 42rem) { .app-shell { padding: 2.5rem; } .card { padding: 1.25rem; } }
