:root {
  --bg: #f5f2eb;
  --ink: #111111;
  --muted: #696761;
  --line: #d8d0c1;
  --card: #fffdf8;
  --gold: #a68952;
  --gold-soft: #ece2cf;
  --danger: #8f1d1d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 28px;
}

.hero,
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 20px 70px rgba(17, 17, 17, 0.08);
}

.hero {
  padding: 24px 28px 30px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand img:first-child {
  width: 42px;
  height: 42px;
  object-fit: contain;
  background: #111;
}

.brand img:last-child {
  width: 150px;
  height: auto;
  object-fit: contain;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: end;
  padding-top: 58px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 850px;
  margin-bottom: 18px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: .95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 30px;
  line-height: 1.05;
}

h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.45;
}

.metrics {
  display: grid;
  gap: 10px;
}

.metrics div,
.status {
  border-left: 4px solid var(--gold);
  background: var(--gold-soft);
  padding: 14px 16px;
}

.metrics strong {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.metrics span {
  color: var(--muted);
  font-size: 13px;
}

.control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: 18px;
}

.live-data {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .9fr);
  gap: 18px;
  margin-top: 18px;
}

.engagement {
  margin-top: 18px;
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.time {
  display: grid;
  justify-items: end;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

#clock {
  font-size: 28px;
  font-weight: 700;
}

#branchState {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

canvas {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 780;
  background: #151515;
  border: 1px solid #272727;
}

.console {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.buttons {
  display: grid;
  gap: 10px;
}

.safety-control,
.broadcast-control {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 14px;
}

.safety-control > span,
.seat-config > span,
.broadcast-control > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.seat-config {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 14px;
}

.regia-key-control {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 14px;
}

.regia-key-control > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.regia-key-control label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.regia-key-control input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 9px;
}

.regia-key-control p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.seat-config label,
.broadcast-control label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.seat-config select,
.broadcast-control select,
.seat-config input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 9px;
}

.seat-config a {
  display: grid;
  place-items: center;
  min-height: 42px;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.broadcast-control p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.seat-config p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

button {
  min-height: 46px;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--gold);
  border-color: var(--gold);
}

button.danger {
  background: var(--danger);
  border-color: var(--danger);
}

button[data-active="true"] {
  border-color: var(--gold);
  background: var(--gold);
  color: #111;
}

.secondary {
  background: transparent;
  color: var(--ink);
}

.secondary:hover {
  color: #fff;
}

.status p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

@media (max-width: 980px) {
  .hero-grid,
  .control {
    grid-template-columns: 1fr;
  }

  .shell {
    padding: 14px;
  }
}
