:root {
  --bg: #0b0d12;
  --navy: #10141c;
  --char: #1c212b;
  --char-2: #262c38;
  --line: #3a414e;
  --yellow: #f0b429;
  --orange: #e8891a;
  --ink: #12151c;
  --paper: #f3efe6;
  --mute: #9aa3b2;
  --green: #76b900;
  --face: "Nunito", "Segoe UI", sans-serif;
  --display: "Anton", "Arial Narrow", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--face);
  color: var(--paper);
  min-height: 100dvh;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(900px 380px at 50% -20%, rgba(232, 137, 26, 0.07), transparent 58%),
    var(--bg);
}

.mast {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 28px 12px;
}
.brand { display: flex; align-items: center; gap: 16px; }
.brand .wordmark {
  height: 96px;
  width: auto;
  display: block;
}
.brand-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.brand span {
  display: block;
  font-weight: 800;
  font-size: 13px;
  color: var(--mute);
}
.project-chrome {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.project-x,
.project-ca {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  background: var(--char);
  border: 2px solid var(--line);
  border-radius: 8px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.15;
}
.project-x.is-empty { color: var(--mute); pointer-events: none; }
.x-logo { width: 14px; height: 14px; flex: 0 0 auto; }
.project-ca {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 132px;
}
.ca-kicker {
  font-family: var(--display);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mute);
}
#token-ca {
  font-size: 12px;
  color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
.steal {
  margin: 0;
  font-weight: 600;
  color: var(--paper);
  font-size: 16px;
}
.meters { display: flex; gap: 10px; margin-left: auto; }
.meter {
  min-width: 96px;
  padding: 7px 12px 8px;
  background: var(--char);
  border: 3px solid var(--yellow);
  border-radius: 8px;
  text-align: center;
}
.meter label {
  display: block;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mute);
}
.meter b {
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  color: var(--yellow);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}
.meter[data-tone="live"] { border-color: var(--orange); }
.meter[data-tone="live"] b { color: var(--orange); }
.meter[data-tone="ok"] { border-color: var(--green); }
.meter[data-tone="ok"] b { color: var(--green); }

.play {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 4px 12px 14px;
}
.cabinet {
  position: relative;
  width: min(98vw, calc(70dvh * 8 / 3), 1920px);
  aspect-ratio: 8 / 3;
  height: auto;
  border-radius: 14px;
  overflow: hidden;
  background: #07090d;
  border: 4px solid var(--orange);
  box-shadow: inset 0 0 0 2px var(--navy);
  outline: 2px solid var(--char-2);
  outline-offset: 3px;
}
.cabinet::after {
  content: "";
  position: absolute;
  pointer-events: none;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--green);
  opacity: 0.35;
}
.cabinet iframe {
  position: absolute;
  inset: 0;
  border: 0;
  width: 100%;
  height: 100%;
  background: #07090d;
}

.composer {
  display: grid;
  grid-template-columns: 120px 1.3fr auto;
  gap: 8px;
  align-items: stretch;
  min-width: min(420px, 36vw);
}
.composer input, .composer button { font: inherit; width: 100%; }
.composer input {
  border: 2px solid var(--line);
  background: var(--char);
  color: var(--paper);
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 14px;
}
.composer input::placeholder { color: var(--mute); }
.composer input:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 0;
  border-color: var(--yellow);
}
.composer button {
  font-family: var(--display);
  font-size: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--yellow);
  color: var(--ink);
  border: 3px solid var(--orange);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.composer button:hover:not(:disabled) { background: var(--orange); }
.composer button:disabled {
  background: var(--char-2);
  color: var(--mute);
  border-color: var(--line);
  cursor: not-allowed;
}

.ticket { display: none; }
body.is-debug .ticket { display: block; }
#claim-status {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--orange);
}
.debug {
  position: fixed;
  left: 12px;
  bottom: 8px;
  font-size: 11px;
  color: var(--mute);
}

@media (max-width: 1100px) {
  .mast { flex-wrap: wrap; }
  .steal { width: 100%; }
  .composer { width: 100%; min-width: 0; }
  .meters { width: 100%; margin-left: 0; }
  .meter { flex: 1; }
  .brand .wordmark { height: 72px; }
}

@media (max-width: 800px) {
  html, body {
    height: 100dvh;
    overflow: hidden;
  }
  body {
    grid-template-rows: auto minmax(0, 1fr);
  }
  .mast {
    gap: 8px;
    padding: 8px 10px 6px;
  }
  .brand { gap: 8px; }
  .brand .wordmark { height: 40px; }
  .brand-meta { gap: 4px; }
  .brand span { font-size: 11px; }
  .steal { display: none; }
  .project-x, .project-ca { padding: 4px 8px; font-size: 12px; }
  .composer {
    width: 100%;
    min-width: 0;
    grid-template-columns: 1fr 1.2fr auto;
    gap: 6px;
  }
  .composer input, .composer button { padding: 8px 10px; font-size: 13px; }
  .composer button { font-size: 16px; }
  .meters { width: 100%; margin-left: 0; gap: 6px; }
  .meter { flex: 1; min-width: 0; padding: 4px 6px 5px; }
  .meter label { font-size: 10px; }
  .meter b { font-size: 18px; }
  .play {
    padding: 0 6px 8px;
    height: 100%;
    min-height: 0;
    place-items: stretch;
  }
  .cabinet {
    width: 100%;
    max-width: none;
    aspect-ratio: auto;
    height: 100%;
    min-height: 0;
    border-width: 3px;
    border-radius: 10px;
    outline-offset: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
