:root {
  color-scheme: dark;
  --bg: #101214;
  --panel: #181d22;
  --panel-2: #222930;
  --line: #39444f;
  --text: #f5f1e8;
  --muted: #aeb8c2;
  --gold: #e0b24a;
  --go: #62c987;
  --stop: #d94f4f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
}

button:focus-visible,
button:hover {
  border-color: var(--gold);
  outline: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(14px, 3vw, 32px);
  border-bottom: 1px solid var(--line);
  background: #0d0f11;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  letter-spacing: 0;
}

.panic {
  min-width: 150px;
  min-height: 58px;
  border-color: #ff9c9c;
  background: var(--stop);
  color: white;
  font-weight: 900;
}

.page {
  width: min(1040px, calc(100% - 28px));
  margin: 20px auto 48px;
}

.now-next {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
}

.now-next article,
.simple-controls,
.cue-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.now-next article {
  min-height: 118px;
  padding: 18px;
}

.now-next span,
.simple-controls span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.now-next strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 4vw, 2.35rem);
  line-height: 1.12;
}

.next-card {
  border-color: color-mix(in srgb, var(--gold) 60%, var(--line)) !important;
}

#standbyMoment {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.35;
}

.go-zone {
  display: grid;
  grid-template-columns: 120px 1fr 120px;
  gap: 14px;
  margin: 14px 0;
}

.go-button,
.step-button {
  min-height: 148px;
  font-weight: 900;
}

.go-button {
  border-color: #9ee0b7;
  background: var(--go);
  color: #07140c;
  font-size: clamp(4.4rem, 14vw, 8rem);
}

.step-button {
  font-size: 1.2rem;
}

.simple-controls {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.simple-controls button {
  min-height: 48px;
  font-weight: 800;
}

.simple-controls label {
  display: grid;
  grid-template-columns: 120px 1fr 52px;
  align-items: center;
  gap: 12px;
}

.simple-controls span {
  margin: 0;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
}

output {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.cue-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 14px;
}

.cue-list h2 {
  margin: 18px 0 2px;
  color: var(--gold);
  font-size: 1rem;
  letter-spacing: 0;
}

.cue-list h2:first-child {
  margin-top: 0;
}

.cue-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 12px;
  text-align: left;
}

.cue-row.is-next {
  border-color: var(--gold);
  background: #2b271a;
}

.cue-row.is-playing {
  border-color: var(--go);
  background: #143021;
}

.cue-id {
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.cue-title {
  display: block;
  margin-bottom: 5px;
  font-size: 1.08rem;
}

.cue-moment {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.35;
}

@media (max-width: 720px) {
  .topbar,
  .now-next,
  .simple-controls,
  .simple-controls label {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .panic {
    width: 100%;
  }

  .go-zone {
    grid-template-columns: 1fr 1fr;
  }

  .go-button {
    grid-column: 1 / -1;
    min-height: 132px;
  }

  .step-button {
    min-height: 64px;
  }
}
