﻿:root {
  --bg: #0a0c10;
  --ink: #d8dde6;
  --mute: #7a8494;
  --line: #1c2430;
  --up: #2bb673;
  --dn: #e85d5d;
  --amber: #e6a23c;
  --pink: #f3b6c4;
  --pink-deep: #e895a8;
  --pink-ink: #1a1216;
  --font: "Bebas Neue", Impact, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --top: 42px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--mono);
  background:
    radial-gradient(ellipse 70% 40% at 50% 0%, #1a1520 0%, transparent 55%),
    var(--bg);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.tape {
  height: 18px;
  overflow: hidden;
  background: #121820;
  color: #9aa8bc;
  border-bottom: 1px solid #000;
}
.tape-a {
  background: var(--pink-deep);
  color: var(--pink-ink);
}
.tape-b {
  height: 16px;
  background: #0e1218;
  color: var(--up);
  border-bottom: 1px solid var(--line);
}
.tape-b .tape-track { font-size: .55rem; padding: 2px 0; }
.tape-track {
  display: flex;
  gap: 2rem;
  width: max-content;
  padding: 3px 0;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .12em;
  animation: tape 18s linear infinite;
}
.tape-track.reverse { animation-direction: reverse; animation-duration: 26s; }
@keyframes tape { to { transform: translateX(-50%); } }

.top {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--top);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-bottom: 1px solid var(--line);
  background: #0a0c10f2;
  backdrop-filter: blur(8px);
}
.logo {
  font-family: var(--font);
  font-size: 1.45rem;
  letter-spacing: .05em;
  color: var(--pink);
  line-height: 1;
}
.top-stats {
  display: flex;
  gap: 12px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--mute);
  font-size: .58rem;
  letter-spacing: .08em;
  font-weight: 700;
}
.top-stats b {
  color: var(--amber);
  font-family: var(--font);
  font-size: .95rem;
  letter-spacing: .04em;
  font-weight: 400;
  margin-right: 3px;
}

.btn {
  border: 1px solid var(--line);
  background: #121820;
  color: var(--ink);
  padding: .5rem .7rem;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { border-color: var(--amber); color: var(--amber); }
.btn.primary {
  background: var(--pink-deep);
  color: var(--pink-ink);
  border-color: var(--pink-deep);
}
.btn.primary:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--pink-ink);
}
.btn.ghost { margin-left: auto; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .45; cursor: wait; }

.billboard-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 18px - 16px - var(--top));
  max-height: calc(100vh - 18px - 16px - var(--top));
  padding: 0;
  overflow: hidden;
}

.vegas {
  flex: 0 0 auto;
  padding: 0;
  background: #080a0e;
}
.vegas-frame {
  border: 2px solid #3a4558;
  background: #10151c;
  box-shadow: 0 0 0 1px #000, inset 0 0 30px #0008;
}
.vegas-bulbs {
  height: 8px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--dn) 0 6px,
      transparent 6px 12px,
      var(--up) 12px 18px,
      transparent 18px 24px,
      var(--amber) 24px 30px,
      transparent 30px 36px,
      var(--pink-deep) 36px 42px,
      transparent 42px 48px
    );
  animation: bulbs .9s steps(2) infinite;
}
.vegas-bulbs.bottom { border-top: 1px solid #2a3344; }
@keyframes bulbs { 50% { filter: brightness(.7); } }
.vegas-marquee {
  overflow: hidden;
  background: #0c1016;
  border-block: 1px solid #2a3344;
  padding: 3px 0;
}
.vegas-marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  font-family: var(--font);
  font-size: clamp(.75rem, 1.6vw, 1rem);
  letter-spacing: .16em;
  color: var(--amber);
  animation: vegasLtr 28s linear infinite;
}
@keyframes vegasLtr {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}
.vegas-screen {
  position: relative;
  min-height: 96px;
  max-height: 110px;
  overflow: hidden;
  background: linear-gradient(135deg, #151a22, #080a0e 60%);
}
.vegas-screen > img,
.vegas-screen > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .35;
}
.ad.territory {
  border-color: var(--claim, #3a4558);
  box-shadow: inset 0 0 0 1px #05070a, 0 0 12px var(--claim-glow, transparent);
}
.ad .media,
.ad video.media,
.ad img.media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .58;
}
.ad .media-lock {
  position: absolute;
  inset: auto 4px 28px 4px;
  z-index: 2;
  font-size: .38rem;
  letter-spacing: .06em;
  color: var(--amber);
  background: #000a;
  padding: 2px 3px;
}
.ad.s-huge .media { opacity: .7; }
.ad.s-big .media { opacity: .64; }
.vegas-copy {
  position: relative;
  z-index: 1;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 14px;
  max-width: 92%;
  background: linear-gradient(90deg, #000b 8%, #0004 65%, transparent);
}
.vegas-kicker {
  margin: 0 0 4px;
  color: var(--pink);
  font-size: .55rem;
  letter-spacing: .18em;
  font-weight: 700;
}
.vegas-copy h2 {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  line-height: .85;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
}
.vegas-copy p {
  margin: 4px 0 0;
  color: #aeb8c8;
  font-size: .65rem;
  line-height: 1.25;
  max-width: 40rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vegas-amt {
  margin-top: 4px !important;
  color: var(--amber) !important;
  font-family: var(--font);
  font-size: 1.1rem !important;
  letter-spacing: .08em;
}
.vegas-bgm {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 2;
  border-color: #3a4558;
  color: var(--amber);
  padding: .35rem .55rem;
  font-size: .55rem;
}
.vegas-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  background: #0c1016;
  color: var(--mute);
  font-size: .55rem;
  letter-spacing: .1em;
  font-weight: 700;
}
.vegas-foot .blink {
  color: var(--dn);
  animation: pulse 1s steps(2) infinite;
}
@keyframes pulse { 50% { opacity: .35; } }

.pit-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 3px 8px;
  background: #0e1218;
  border-block: 1px solid var(--line);
  color: var(--mute);
  font-size: .5rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.pit {
  display: grid;
  grid-template-columns: 64px 1fr 64px;
  flex: 1;
  min-height: 0;
  background: #05070a;
}
.rack-side {
  display: grid;
  grid-template-rows: repeat(28, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background: #07090d;
  border-inline: 1px solid #151b24;
}
.rack-side .micro {
  overflow: hidden;
  background: #0a0e14;
  border: 1px solid #151b24;
  font-size: .38rem;
  color: #3a4558;
  padding: 1px 2px;
  letter-spacing: .03em;
  line-height: 1.1;
}
.rack-side .micro b {
  display: block;
  color: #5a6a80;
  font-weight: 700;
}
.rack-side .micro.up b { color: var(--up); }
.rack-side .micro.dn b { color: var(--dn); }

.board {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  grid-auto-flow: dense;
  gap: 1px;
  padding: 1px;
  background: #000;
  min-height: 0;
  height: 100%;
  box-shadow: inset 0 0 60px #000;
}

.slot,
.ad,
.noise {
  position: relative;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}
.slot {
  border: 1px solid #141a22;
  background:
    repeating-linear-gradient(
      -45deg,
      #080a0e,
      #080a0e 3px,
      #0a0d12 3px,
      #0a0d12 6px
    );
  color: #2a3344;
  display: grid;
  place-items: center;
  font-size: .36rem;
  letter-spacing: .08em;
  font-weight: 700;
}
.noise {
  border: 1px solid #141a22;
  background: #090c11;
  color: #3a4558;
  padding: 1px 2px;
  font-size: .36rem;
  letter-spacing: .04em;
  line-height: 1.1;
}
.noise::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, #0004 2px 3px);
  pointer-events: none;
}
.noise .n-top {
  display: flex;
  justify-content: space-between;
  color: #4a5568;
  font-weight: 700;
}
.noise .n-val {
  color: #5a6a80;
  font-weight: 700;
  font-size: .5rem;
}
.noise.flash .n-val { color: var(--up); }
.noise.bleed .n-val { color: var(--dn); }

.ad {
  border: 1px solid #3a4558;
  background: #0c1016;
  box-shadow: inset 0 0 0 1px #05070a;
  z-index: 2;
}
.ad::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent 0 2px, #0003 2px 3px);
  pointer-events: none;
  z-index: 2;
}
.ad img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
}
.ad .pad {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 3px;
  background: linear-gradient(180deg, #000a, transparent 40%, #000c);
}
.ad .meta {
  display: flex;
  justify-content: space-between;
  gap: 2px;
  font-size: .34rem;
  letter-spacing: .06em;
  color: #6a788c;
  font-weight: 700;
}
.ad .nick {
  margin: 0;
  font-family: var(--font);
  font-size: clamp(.65rem, 1vw, 1.05rem);
  letter-spacing: .04em;
  line-height: .9;
}
.ad .msg {
  margin: 1px 0 0;
  color: #c0c8d4;
  font-size: .45rem;
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ad .amt { color: var(--amber); }
.ad.s-mid { border-color: #4a6070; }
.ad.s-big { border-color: #3a6a8a; }
.ad.s-huge {
  border-color: var(--pink-deep);
  box-shadow: inset 0 0 0 1px #05070a, 0 0 16px #e895a833;
}
.ad.s-huge .amt { color: var(--pink); }
.ad.s-big .amt { color: #6ec1ff; }

.dock {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #000a;
  display: grid;
  align-items: end;
}
.dock-panel {
  max-height: min(92vh, 760px);
  overflow: auto;
  background: #0e1218;
  border-top: 2px solid var(--pink-deep);
  padding: 12px;
}
.dock-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font);
  font-size: 1.35rem;
  letter-spacing: .08em;
}
.dock-grid {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 400px);
  gap: 16px;
}
.dock-copy p {
  margin: 0 0 12px;
  color: var(--mute);
  font-size: .78rem;
  line-height: 1.45;
}
.wallet-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  background: #0a0e14;
}
.wallet-panel small {
  display: block;
  color: var(--mute);
  font-size: .55rem;
  letter-spacing: .1em;
}
.treasury-box {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px dashed #2a3344;
}
.treasury-box label,
.burn-form label {
  display: grid;
  gap: 4px;
  font-size: .55rem;
  letter-spacing: .1em;
  color: var(--mute);
  font-weight: 700;
}
.treasury-box input,
.burn-form input,
.burn-form select {
  width: 100%;
  padding: 9px;
  border: 1px solid #2a3344;
  background: #080a0e;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 600;
}
.legal-links { color: var(--mute); font-size: .7rem; }
.legal-links a { text-decoration: underline; text-underline-offset: 2px; color: #aeb8c8; }

.burn-form {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #0a0e14;
}
.burn-form small { color: #4a5568; letter-spacing: 0; font-weight: 600; }
.check {
  grid-template-columns: 16px 1fr !important;
  align-items: start;
  font-size: .7rem !important;
  letter-spacing: 0 !important;
  color: #9aa8bc !important;
  line-height: 1.35;
}
.check input { width: 14px; height: 14px; margin-top: 2px; accent-color: var(--pink-deep); }
.check a { color: var(--pink); text-decoration: underline; }
.fine { margin: 0; color: #5a6a80; font-size: .65rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 60;
  background: var(--pink);
  color: var(--pink-ink);
  padding: 10px 14px;
  font-size: .72rem;
  font-weight: 700;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 #000;
}

.receipt-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #000c;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: auto;
}
.receipt-sheet {
  width: min(420px, 100%);
  background:
    repeating-linear-gradient(0deg, transparent, transparent 27px, #e8a8b822 27px, #e8a8b822 28px),
    linear-gradient(180deg, #f8d0da, #f0b8c6);
  color: var(--pink-ink);
  padding: 18px 16px 16px;
  border: 1px solid #c47a8c;
  box-shadow: 8px 8px 0 #0008;
  font-family: var(--mono);
}
.rs-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font);
  font-size: 1.15rem;
  letter-spacing: .08em;
  margin-bottom: 8px;
}
.rs-rule {
  border-top: 1px dashed #8a4058;
  margin: 10px 0;
}
.rs-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: .68rem;
  border-bottom: 1px dotted #c47a8c88;
}
.rs-row span { color: #6a3040; letter-spacing: .08em; font-weight: 700; }
.rs-row b {
  text-align: right;
  font-weight: 700;
  word-break: break-all;
  max-width: 62%;
}
.rs-row.tall b { font-size: .58rem; line-height: 1.3; }
.rs-stamp {
  margin: 12px 0 6px;
  text-align: center;
  font-family: var(--font);
  font-size: 1.35rem;
  letter-spacing: .1em;
  color: #8a2038;
  transform: rotate(-2deg);
  border: 2px solid #8a2038;
  padding: 6px;
}
.rs-fine {
  margin: 0 0 12px;
  font-size: .58rem;
  line-height: 1.4;
  color: #6a3040;
}
.rs-actions { display: flex; gap: 8px; }
.rs-actions .btn.primary {
  background: var(--pink-ink);
  color: var(--pink);
  border-color: var(--pink-ink);
}

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 16px 72px;
}
.legal h1 {
  font-family: var(--font);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: .04em;
  line-height: .9;
}
.legal .lead, .legal p, .legal li { color: #9aa8bc; line-height: 1.6; }
.legal h2 { font-family: var(--font); letter-spacing: .06em; }
.warn-box {
  padding: 14px;
  border: 1px solid var(--dn);
  background: #1a0808;
  color: #ffb0b0;
  margin: 16px 0;
}
.legal-foot { color: var(--mute); font-size: .72rem; margin-top: 28px; }
.big-line {
  font-family: var(--font);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #fff;
}

@media (max-width: 860px) {
  .dock-grid { grid-template-columns: 1fr; }
  .top-stats span:nth-child(2),
  .top-stats span:nth-child(3) { display: none; }
  .pit { grid-template-columns: 1fr; }
  .rack-side { display: none; }
  .billboard-shell {
    height: auto;
    max-height: none;
    min-height: calc(100vh - 80px);
  }
  .board {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: minmax(32px, auto);
    min-height: 62vh;
    height: auto;
  }
  .vegas-screen { max-height: 120px; }
  .vegas-bgm { position: static; margin: 0 10px 8px auto; display: block; }
}

@media print {
  body * { visibility: hidden; }
  .receipt-overlay, .receipt-overlay * { visibility: visible; }
  .receipt-overlay {
    position: static;
    background: #fff;
    display: block;
    padding: 0;
  }
  .no-print { display: none !important; }
  .receipt-sheet {
    box-shadow: none;
    border: 1px solid #999;
    width: 100%;
  }
}
