:root {
  --booth: #12100c;
  --ink: #efe6d4;
  --muted: #b5a78d;
  --line: #3a3328;
  --amber: #e08a2e;
  --amber-ink: #1a1208;
  color: var(--ink);
  background: var(--booth);
  font-family: "Red Hat Text", sans-serif;
  font-size: 18px;
  line-height: 1.45;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
}

::selection {
  background: var(--amber);
  color: var(--amber-ink);
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

button { font: inherit; color: inherit; }

header, .source, main {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
}

header { padding: 40px 0 20px; }

h1, h2, p { margin: 0; }

h1 {
  font-size: clamp(1.8rem, 5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  max-width: 16ch;
}

header p {
  margin-top: 14px;
  max-width: 56ch;
  color: var(--muted);
}

.source {
  padding: 20px 0 8px;
  border-top: 1px solid var(--line);
}

.source h2 { font-size: 1.05rem; }
.source p {
  color: var(--muted);
  margin: 6px 0 14px;
}

audio { display: none; }

.player {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.play {
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.play:hover {
  border-color: var(--amber);
  color: var(--amber);
}

.play.on {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--amber-ink);
}

.seek {
  width: 100%;
  accent-color: var(--amber);
  cursor: pointer;
}

main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(15rem, 0.65fr);
  gap: 48px;
  padding: 24px 0 96px;
}

.voices {
  list-style: none;
  margin: 0;
  padding: 0;
}

.voice {
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  cursor: grab;
}

.voice.dragging { opacity: 0.45; }
.voices.locked .voice { cursor: default; }

.rank {
  font-family: "Red Hat Mono", ui-monospace, monospace;
  font-size: 1.05rem;
  padding-top: 4px;
  color: var(--amber);
}

.voice-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.voice h2 {
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  letter-spacing: -0.02em;
}

.score {
  font-family: "Red Hat Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.voice p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 4px 0 10px;
}

.move {
  display: grid;
  gap: 6px;
}

.move button {
  min-width: 52px;
  height: 36px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.move button:hover:not(:disabled) {
  border-color: var(--amber);
  color: var(--amber);
}

.move button:disabled {
  opacity: 0.35;
  cursor: default;
}

.submit-bar {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 10px;
  padding: 14px 0 18px;
  background: linear-gradient(180deg, transparent, var(--booth) 28%);
}

.name-field {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

#voter-name {
  height: 48px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #1a1712;
  color: var(--ink);
}

#voter-name:disabled {
  opacity: 0.55;
}

#submit {
  height: 48px;
  border: 0;
  background: var(--amber);
  color: var(--amber-ink);
  cursor: pointer;
  font-weight: 600;
}

#submit:disabled {
  background: #3a3328;
  color: #8a7d68;
  cursor: default;
}

#vote-status {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 46ch;
}

aside h2 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.script.hi {
  line-height: 1.65;
  max-width: 36ch;
}

@media (max-width: 760px) {
  header { padding-top: 24px; }
  main {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 48px;
  }
  .voice {
    grid-template-columns: 1.6rem minmax(0, 1fr);
  }
  .move {
    grid-column: 2;
    grid-template-columns: 1fr 1fr;
  }
  .move button { width: 100%; }
}
