:root {
  --red: #d71920;
  --orange: #ff9500;
  --ink: #000000;
  --panel: #0a0a0a;
  --line: #1a1a1a;
  --muted: #888888;
  --text: #e5e5e5;
  --green: #22c55e;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--text);
  background: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #000;
}
.topbar {
  height: 73px;
  border-bottom: 1px solid #242630;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 5vw, 72px);
  background: #090a0dcc;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 3;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.brand img {
  height: 26px;
  width: auto;
  max-width: 116px;
  object-fit: contain;
}
.account {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  align-items: center;
}
.app-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}
.hero {
  min-height: 440px;
  display: grid;
  align-content: center;
  gap: 19px;
  max-width: 790px;
}
.eyebrow {
  color: var(--orange);
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 11px;
}
.hero h1,
.page-title {
  font-size: clamp(36px, 6vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  margin: 0;
}
.hero p,
.intro {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 630px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.button,
button {
  appearance: none;
  border: 0;
  background: var(--red);
  color: white;
  text-decoration: none;
  font: inherit;
  font-weight: 750;
  padding: 12px 18px;
  border-radius: 7px;
  cursor: pointer;
  min-height: 44px;
}
.button:hover,
button:hover {
  filter: brightness(1.12);
}
.button.secondary,
button.secondary {
  background: #232630;
}
.button.ghost,
button.ghost {
  background: transparent;
  border: 1px solid #444854;
}
.button.warn,
button.warn {
  background: #792225;
}
.button.small,
button.small {
  padding: 7px 10px;
  min-height: 32px;
  font-size: 12px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
}
.card {
  background: #0a0a0a;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 25px 50px #0008;
}
.card h2,
.card h3 {
  margin: 0 0 1rem;
  color: var(--red);
  font-size: .9rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.card p {
  color: var(--muted);
  margin: 0 0 16px;
  line-height: 1.5;
}
.event-card {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 13px;
  min-height: 205px;
}
.event-card .actions {
  margin-top: auto;
}
.event-meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
}
.page-title {
  font-size: clamp(32px, 5vw, 52px);
}
.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 17px;
  margin-bottom: 24px;
}
.nav-tabs a {
  color: var(--muted);
  text-decoration: none;
  padding: 8px 11px;
  font-size: 13px;
  border-radius: 5px;
}
.nav-tabs a.active {
  background: #262933;
  color: #fff;
}
.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 18px;
}
.field {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
}
.field label {
  font-weight: 700;
  font-size: 13px;
}
.field small {
  color: var(--muted);
}
input,
select,
textarea {
  border: 1px solid #333333;
  background: #111111;
  color: white;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
}
textarea {
  min-height: 105px;
  resize: vertical;
}
input[type="color"] {
  padding: 3px;
  height: 42px;
}
input[type="checkbox"] {
  width: auto;
  accent-color: var(--red);
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 15px;
}
.span-2 {
  grid-column: span 2;
}
.notice {
  padding: 12px 14px;
  background: #261c10;
  color: #ffd58c;
  border-left: 3px solid var(--orange);
  border-radius: 5px;
  font-size: 14px;
  margin: 14px 0;
}
.error {
  padding: 12px 14px;
  background: #351419;
  color: #ffb4b4;
  border-left: 3px solid var(--red);
  border-radius: 5px;
}
.muted {
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table th,
.table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.status {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #fbd69f;
}
.status.live {
  color: var(--green);
}
.status.closed {
  color: #f29e9e;
}
.notification {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 14px;
}
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 13px 16px;
  background: #20242d;
  border: 1px solid #4b505c;
  border-radius: 7px;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: none;
}
.control {
  max-width: 560px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(1.25rem, env(safe-area-inset-top)) max(1.25rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  text-align: left;
}
.control .spin {
  width: 100%;
  min-height: 76px;
  border-radius: 16px;
  margin-top: auto;
  font-size: 1.05rem;
  letter-spacing: .08em;
  background: linear-gradient(135deg, var(--red), var(--orange));
}
.winner {
  font-size: 32px;
  font-weight: 800;
  margin: 25px 0;
}
.field-row {
  display: grid;
  grid-template-columns: 120px 1fr 110px 70px minmax(130px, 1fr) 32px 32px 38px;
  gap: 8px;
  margin: 8px 0;
}
.empty {
  border: 1px dashed #3a3e48;
  border-radius: 10px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}
.modal {
  position: fixed;
  inset: 0;
  background: #000a;
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 5;
}
.modal > .card {
  max-width: 520px;
  width: 100%;
}
@media (max-width: 720px) {
  .topbar {
    height: 64px;
  }
  body:has(.control) .topbar { display: none; }
  body:has(.control) .app-main { padding: 0; max-width: none; }
  .brand span {
    display: none;
  }
  .event-card {
    grid-column: span 12;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .page-head {
    display: block;
  }
  .page-head .actions {
    margin-top: 15px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .field-row {
    grid-template-columns: 100px 1fr 95px 58px 32px 32px 32px;
  }
  .table {
    min-width: 560px;
  }
}

.page-title, .hero h1 { background: linear-gradient(135deg, var(--red), var(--orange)); -webkit-background-clip: text; background-clip: text; color: transparent; text-transform: uppercase; letter-spacing: .06em; font-size:1.4rem; }
.page-head { margin-bottom: 2rem; }
.topbar { height: 56px; padding: 0 2rem; background: #000; border-color: var(--line); }
.button, button { border-radius: 10px; background: linear-gradient(135deg, var(--red), var(--orange)); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.button.secondary, button.secondary, .button.ghost, button.ghost { background: transparent; border: 1px solid #333; color: var(--muted); }
.appearance-form > .card { margin-bottom: 1.5rem; }
.console-stack > div > .card, .console-stack > .card { margin-bottom:1.5rem; }
.staff-field label, .appearance-form .field label, .console-stack .field label { display:block; font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); }
.staff-field input, .appearance-form input, .appearance-form select, .console-stack input, .console-stack select { font-size:14px; }
.appearance-wheel { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:1rem; align-items:end; }
.appearance-wheel .winner-field { grid-column:1/-1; }
.appearance-wheel .qr-field { grid-column:1; }
.appearance-wheel .qr-options { grid-column:2; display:flex; gap:1rem; align-items:center; }
.access-row { display:flex; align-items:center; gap:12px; padding:12px 14px; border:1px solid var(--line); border-radius:10px; margin-top:8px; }
.access-row .access-detail { flex:1; min-width:0; font-size:12px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; }
.access-row .access-status { color:var(--muted); font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.staged-save { display:flex; align-items:center; gap:12px; margin:1rem 0; flex-wrap:wrap; }
.control { min-height:100vh; min-height:100dvh; padding:1.25rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom)); gap:1rem; }
.remote-head { display:flex; justify-content:space-between; align-items:baseline; gap:.75rem; margin:0; }
.remote-head .page-title { font-size:1rem; font-weight:700; line-height:normal; }
.remote-head .muted { font-size:.8rem; white-space:nowrap; }
.remote-stage { flex:1; min-height:180px; padding:1.5rem 1.25rem; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0; border:1px solid var(--line); border-radius:16px; background:#0a0a0a; color:var(--muted); text-align:center; }
.remote-stage-label { font-size:.7rem; font-weight:700; letter-spacing:.18em; text-transform:uppercase; margin-bottom:.6rem; }
.remote-stage-name { font-size:2rem; font-weight:700; line-height:1.15; color:var(--text); }
.remote-stage.waiting .remote-stage-name { color:var(--orange); }
.stage-idle { font-size:1.1rem; color:var(--muted); font-weight:600; }
.remote-stage-sub { font-size:.85rem; color:var(--muted); margin-top:.5rem; }
.remote-actions { display:grid; gap:.75rem; margin:0; }
.remote-actions button { width:100%; min-height:76px; border-radius:16px; font-size:1.05rem; font-weight:700; letter-spacing:.08em; }
.remote-actions button:disabled { opacity:.35; }
.remote-actions .remote-forfeit { min-height:32px; font-size:.75rem; letter-spacing:.06em; }
.remote-actions .confirm { background:linear-gradient(135deg,#1a7f37,#22c55e); }
.remote-status { min-height:1.2rem; color:var(--muted); font-size:.8rem; text-align:center; margin:0; }
.remote-footer { margin:0; display:flex; justify-content:center; align-items:center; gap:1.25rem; }
.remote-link { color:var(--muted); text-decoration:none; font-size:.75rem; }
.remote-stage.waiting { border-color:var(--orange); color:var(--orange); }
.remote-switch { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin:0; padding:.9rem 1.1rem; border:1px solid var(--line); border-radius:14px; background:var(--panel); }
.remote-switch strong { font-size:.9rem; font-weight:600; }
.remote-switch small { display:block; color:var(--muted); font-size:.75rem; margin-top:3px; }
.remote-switch input { position:absolute; opacity:0; }
.switch-track { width:52px; height:30px; border-radius:999px; background:var(--panel); border:1px solid #333; position:relative; flex:none; }
.switch-track::after { content:""; width:22px; height:22px; border-radius:50%; background:#888; position:absolute; top:3px; left:3px; transition:.15s; }
.remote-switch input:checked + .switch-track { background:rgba(215,25,32,.25); border-color:var(--red); }
.remote-switch input:checked + .switch-track::after { transform:translateX(22px); background:var(--red); }
.remote-switch input:disabled + .switch-track { opacity:.45; }
@media (max-width:768px) { .app-main { padding:1rem .75rem; } body:has(.control) .app-main { padding:0; } body:has(.control) .page-head, body:has(.control) .nav-tabs { display:none; } .card { padding:1.25rem; } }
