:root {
  --bg: #05060b;
  --panel: rgba(18, 18, 26, 0.86);
  --panel-solid: #121219;
  --line: rgba(244, 239, 232, 0.12);
  --line-strong: rgba(244, 239, 232, 0.28);
  --text: #f4efe8;
  --muted: #a8a3b3;
  --coral: #ef5b3f;
  --cobalt: #4a5fe0;
  --lilac: #9a86e0;
  --mustard: #e0c055;
  --charcoal: #1d1b22;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1100px 700px at 50% -15%, #121a3d 0%, var(--bg) 62%) fixed, var(--bg);
  color: var(--text);
  font: 14px/1.4 Inter, system-ui, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
a { color: inherit; }

/* ── Top bar ── */
.topbar > * { min-width: 0; }
/* On a very wide monitor the page stays at a comfortable width, in the middle. */
.topbar, .stage { width: 100%; max-width: 1920px; margin-inline: auto; }
.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
}
.left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* The contract address, in the middle of the bar, set like the stats: click to copy it. */
.ca {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  height: 46px;
  padding: 0 7px 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  white-space: nowrap;
}
.ca small { grid-area: 1 / 1; align-self: end; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; }
.ca span { grid-area: 2 / 1; align-self: start; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ca i { grid-area: 1 / 2 / 3 / 3; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--charcoal); }
.ca svg { width: 15px; height: 15px; color: var(--muted); transition: color 0.15s; }
.ca:hover { border-color: var(--line-strong); }
.ca:hover svg { color: var(--text); }
.ca.copied svg { color: #8fbf9a; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 26px/1 "Inter Tight", Inter, sans-serif;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-right: 6px;
}
.stats {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  overflow: hidden;
}
.stat { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 7px 16px; line-height: 1.15; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; }
.stat b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat.pool b { color: var(--mustard); }
.stat.pool em { color: var(--muted); font-style: normal; font-weight: 500; font-size: 12px; }

/* A tumbler icon: a colored ball with the white T. */
.tumbler {
  --c: var(--coral);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  display: inline-grid;
  place-items: center;
  background: radial-gradient(circle at 50% 50%, var(--c) 58%, color-mix(in srgb, var(--c) 52%, #000) 100%);
}
.tumbler svg { width: 64%; height: 64%; }
.tumbler.big { width: 44px; height: 44px; }
.tumbler.small { width: 18px; height: 18px; }

.actions { display: flex; gap: 8px; justify-self: end; flex-wrap: wrap; align-items: center; }
/* Not room for all three in a row: the address sits between the two sides instead of in the exact middle. */
@media (max-width: 1440px) {
  .topbar { display: flex; flex-wrap: wrap; }
  .ca { margin-inline: auto; }
}
.pill {
  border: 1px solid var(--line);
  background: var(--charcoal);
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.pill:hover { border-color: var(--line-strong); }
.pill.primary { background: var(--text); color: #0a0a0f; border-color: transparent; font-weight: 700; }
.pill.primary:hover { background: #fff; }
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(239, 91, 63, 0.4);
  background: rgba(239, 91, 63, 0.1);
  color: #ffd9cf;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 10px var(--coral); animation: pulse 1.6s infinite; }
.ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ghost:hover { background: var(--charcoal); border-color: var(--line); }
.ghost svg { width: 17px; height: 17px; color: var(--muted); }
.ghost.icon { padding: 9px; border-color: var(--line); background: var(--panel); }
.ghost.icon svg { width: 16px; height: 16px; color: var(--text); }
.pill.connected { gap: 8px; padding-left: 8px; }
.pill.connected .tumbler { width: 22px; height: 22px; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* Before launch: a curtain over the whole site, the demo race moving behind it. */
body.stubbed { overflow: hidden; }
.stub {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex; /* the card centred when it fits, scrolling from its top when it doesn't */
  padding: 24px 16px;
  overflow-y: auto;
  background: radial-gradient(90% 90% at 50% 40%, rgba(5, 6, 11, 0.5), rgba(5, 6, 11, 0.88));
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
}
.stub-card {
  margin: auto;
  display: grid;
  grid-template-columns: 340px minmax(0, 380px);
  gap: 32px;
  align-items: center;
  padding: 22px 30px 22px 22px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgba(14, 14, 20, 0.84);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);
}
.stub-art { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 18px; }
.stub-text { display: grid; gap: 14px; justify-items: start; }
.stub-text h1 { margin: 0; font: 800 78px/0.9 "Inter Tight", Inter, sans-serif; letter-spacing: -0.035em; }
.stub-text p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
.stub-tag { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(239, 91, 63, 0.55); background: rgba(239, 91, 63, 0.12); color: #ffd9cf; font-weight: 700; font-size: 12px; letter-spacing: 0.06em; }
.stub-soon { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--mustard); }
.stub-soon i { width: 8px; height: 8px; border-radius: 50%; background: var(--mustard); box-shadow: 0 0 10px var(--mustard); animation: pulse 1.6s infinite; }
.stub .pill svg { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .stub-card { grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 420px; padding: 16px 16px 22px; }
  .stub-text h1 { font-size: 60px; }
}

/* ── Stage ── */
.stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) clamp(300px, 19vw, 360px);
  gap: 12px;
  padding: 0 16px 16px;
}
.track-map {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.track-map small { font-size: 9px; letter-spacing: 0.1em; color: var(--muted); }
.bar { position: relative; flex: 1; width: 8px; border-radius: 4px; background: linear-gradient(180deg, rgba(74, 95, 224, 0.55), rgba(239, 91, 63, 0.55)); }
.bar i { position: absolute; left: 50%; width: 7px; height: 7px; margin: -3px 0 0 -3.5px; border-radius: 50%; background: var(--text); opacity: 0.55; }
.bar i.lead { width: 12px; height: 12px; margin: -6px 0 0 -6px; background: var(--mustard); opacity: 1; box-shadow: 0 0 10px var(--mustard); }
.bar i.you { width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; background: var(--coral); opacity: 1; box-shadow: 0 0 10px var(--coral); }

.arena {
  position: relative;
  min-height: 0;
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #05060b;
}
.arena canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 clamp(90px, 16vw, 200px)/1 "Inter Tight", Inter, sans-serif;
  color: var(--text);
  text-shadow: 0 0 40px rgba(239, 91, 63, 0.7);
  pointer-events: none;
}
.banner {
  position: absolute;
  left: 50%;
  bottom: 9%;
  transform: translateX(-50%);
  font: 700 clamp(18px, 2.6vw, 30px)/1.2 "Inter Tight", Inter, sans-serif;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  white-space: nowrap;
  pointer-events: none;
}
.winner {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border: 1px solid rgba(224, 192, 85, 0.45);
  border-radius: 16px;
  background: rgba(10, 10, 16, 0.94);
  box-shadow: 0 0 40px rgba(239, 91, 63, 0.18);
  max-width: calc(100% - 32px);
}
.winner b { font-size: 18px; }
.winner p { margin: 2px 0 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.tag { background: var(--mustard); color: #0a0a0f; font-weight: 800; font-size: 10px; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 5px; vertical-align: 2px; }
.tx { color: var(--mustard); text-decoration: none; font-weight: 600; }
.next {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(10, 10, 16, 0.88);
  border: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.next b { color: var(--text); font-variant-numeric: tabular-nums; }

.side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.prize {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(224, 192, 85, 0.35);
  background: radial-gradient(120% 120% at 100% 0%, rgba(224, 192, 85, 0.16), rgba(18, 18, 26, 0.9) 60%);
}
.prize-top { display: flex; justify-content: space-between; align-items: center; }
.prize-top span:first-child { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); }
.race-tag { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; padding: 3px 7px; border-radius: 6px; background: rgba(244, 239, 232, 0.08); color: var(--text); }
.prize > b { color: var(--mustard); font: 700 32px/1.05 "Inter Tight", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.prize > small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.timer { height: 4px; border-radius: 3px; background: rgba(244, 239, 232, 0.1); overflow: hidden; margin-top: 8px; }
.timer i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--coral), var(--mustard)); border-radius: 3px; }
.prize .timer-label { font-size: 11px; color: var(--muted); }
/* What the game has paid so far, and the way to the history. */
.paid { display: flex; align-items: center; gap: 18px; margin-top: 10px; padding-top: 11px; border-top: 1px solid var(--line); }
.paid div { display: grid; gap: 2px; }
.paid small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; }
.paid b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.paid .pill { margin-left: auto; padding: 7px 11px; font-size: 12px; gap: 6px; }
.paid .pill svg { width: 15px; height: 15px; color: var(--muted); }

.mine {
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(239, 91, 63, 0.4);
  background: rgba(239, 91, 63, 0.07);
}
.mine-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.mine-main:hover { background: rgba(239, 91, 63, 0.08); }
.mine-text { min-width: 0; flex: 1; }
.mine-text b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mine-text small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.mine-pos { font: 700 20px/1 "Inter Tight", Inter, sans-serif; color: var(--coral); font-variant-numeric: tabular-nums; text-align: right; }
.mine-pos small { display: block; font: 500 10px Inter, sans-serif; color: var(--muted); letter-spacing: 0.04em; margin-top: 2px; }
.follow {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 58px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--charcoal);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.follow svg { width: 18px; height: 18px; color: var(--muted); }
.follow[aria-pressed="true"] { background: var(--coral); border-color: transparent; color: #0a0a0f; }
.follow[aria-pressed="true"] svg { color: #0a0a0f; }

.standings {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  overflow: hidden;
}
.standings header { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.standings header span { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); }
.standings header .state { color: #ffd9cf; background: rgba(239, 91, 63, 0.14); padding: 2px 6px; border-radius: 5px; }
.standings header .state.final { color: #0a0a0f; background: var(--mustard); }
.standings header small { margin-left: auto; color: var(--muted); font-size: 11px; }
.standings ol { list-style: none; margin: 0; padding: 0 8px 8px; overflow-y: auto; }
.standings li {
  display: grid;
  grid-template-columns: 24px 20px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 9px;
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 13px;
}
.standings li + li { margin-top: 2px; }
.standings li.note { display: block; padding: 14px 12px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.standings li:hover { background: rgba(255, 255, 255, 0.04); }
.standings li.first { background: linear-gradient(90deg, rgba(224, 192, 85, 0.18), rgba(224, 192, 85, 0.04)); box-shadow: inset 0 0 0 1px rgba(224, 192, 85, 0.4); }
.standings li.you { background: linear-gradient(90deg, rgba(239, 91, 63, 0.2), rgba(239, 91, 63, 0.05)); box-shadow: inset 0 0 0 1px rgba(239, 91, 63, 0.55); }
.standings .rank { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.standings .rank.r1 { background: var(--mustard); color: #0a0a0f; }
.standings .rank.r2 { background: #cfd3dc; color: #0a0a0f; }
.standings .rank.r3 { background: var(--coral); color: #0a0a0f; }
.standings .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.standings .who em { color: var(--coral); font-style: normal; font-weight: 800; font-size: 10px; letter-spacing: 0.06em; margin-left: 6px; }
.standings .time { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.standings .time.win { color: var(--mustard); font-weight: 700; }
.standings .prog { display: block; height: 4px; border-radius: 3px; background: rgba(244, 239, 232, 0.1); overflow: hidden; }
.standings .prog i { display: block; height: 100%; background: rgba(244, 239, 232, 0.55); border-radius: 3px; }
.standings li.first .prog i { background: var(--mustard); }
.standings li.you .prog i { background: var(--coral); }

dialog.sheet {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, #17161f, #0e0e14);
  color: var(--text);
  padding: 26px;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
dialog[open] { animation: pop 0.18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
dialog::backdrop { background: rgba(3, 3, 8, 0.72); backdrop-filter: blur(3px); }
dialog h2 { margin: 0; font: 700 24px/1.15 "Inter Tight", Inter, sans-serif; }
dialog h2:focus { outline: none; }
.x { position: absolute; top: 16px; right: 16px; margin: 0; }
.x button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--charcoal);
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.x button:hover { color: var(--text); border-color: var(--line-strong); }
.sheet-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; padding-right: 44px; }
.sheet-head p { margin: 4px 0 0; font-size: 13px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

.steps { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}
.steps .num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--coral);
  color: #0a0a0f;
  font-weight: 800;
}
.steps b { display: block; margin-bottom: 2px; }
.steps p { margin: 0; color: var(--muted); font-size: 13px; }
.fees { padding: 14px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 16px; font-size: 13px; }
.feebar { display: flex; gap: 3px; height: 10px; margin: 10px 0; }
.feebar i { border-radius: 4px; }
.f-pool { background: var(--mustard); }
.f-ops { background: var(--lilac); }
.f-plat { background: var(--cobalt); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.fee-note { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.pill.wide { width: 100%; justify-content: center; padding: 12px; font-size: 14px; }

.board { display: grid; gap: 6px; }
.brow {
  display: grid;
  grid-template-columns: 30px 22px minmax(0, 1fr) 70px 80px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}
.brow.head { background: none; border: 0; padding: 0 12px 2px; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; }
.brow .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
a.who { color: inherit; text-decoration: none; }
a.who:hover { color: var(--mustard); text-decoration: underline; text-underline-offset: 3px; }
.brow .num-r { text-align: right; }
.brow .won { color: var(--mustard); font-weight: 700; }
.medal { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: #24222b; color: var(--muted); }
.brow.top1 { border-color: rgba(224, 192, 85, 0.5); background: rgba(224, 192, 85, 0.07); }
.brow.top1 .medal { background: var(--mustard); color: #0a0a0f; }
.brow.top2 .medal { background: #cfd3dc; color: #0a0a0f; }
.brow.top3 .medal { background: var(--coral); color: #0a0a0f; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.tile { display: grid; gap: 3px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); }
.tile small { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; }
.tile b { font: 700 22px/1.1 "Inter Tight", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.tile:first-child b { color: var(--mustard); }
.tile span { color: var(--muted); font-size: 12px; }
.hrow { grid-template-columns: 44px 22px minmax(0, 1fr) 70px 64px 44px; }
.hrow .race { color: var(--muted); font-weight: 700; }
.hrow .when { color: var(--muted); text-align: right; font-size: 12px; }
.hrow .tx { text-align: right; font-size: 12px; }
.hrow .tx.none { color: var(--muted); font-weight: 500; }
.history-note { margin: 12px 0 0; text-align: center; }
@media (max-width: 600px) {
  .tiles { gap: 6px; }
  .tile { padding: 10px; }
  .tile b { font-size: 18px; }
  .tile span { font-size: 11px; }
  .hrow { grid-template-columns: 38px 18px minmax(0, 1fr) 62px 34px; gap: 8px; padding: 10px; }
  .hrow .when { display: none; }
}
.board .empty { text-align: center; padding: 28px 12px; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }

.addr {
  margin-top: 6px;
  font: 600 12px Inter, sans-serif;
  color: var(--muted);
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
}
.addr:hover { color: var(--text); }
.status { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); margin-bottom: 16px; }
.status p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.status .dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; }
.status.ok { border-color: rgba(143, 191, 154, 0.45); }
.status.ok .dot { background: #8fbf9a; box-shadow: 0 0 10px #8fbf9a; }
.status.no { border-color: rgba(239, 91, 63, 0.4); }
.status.no .dot { background: var(--coral); box-shadow: 0 0 10px var(--coral); }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.name-row { display: flex; align-items: center; background: #08080d; border: 1px solid var(--line); border-radius: 12px; }
.name-row:focus-within { border-color: var(--line-strong); }
.name-row .at { padding-left: 14px; color: var(--muted); font-weight: 700; }
.name-row input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: 600 16px Inter, sans-serif; color: var(--text); padding: 12px 12px 12px 4px; }
.preview-line { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.preview { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(8, 8, 13, 0.9); border: 1px solid rgba(239, 91, 63, 0.6); font-weight: 600; font-size: 13px; }
.row { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.row form { margin: 0; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 0; font-size: 12px; }
.disconnect { display: block; margin: 16px auto 0; }

@media (max-width: 900px) {
  body { overflow: auto; }
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: 62vh auto; padding: 0 16px 16px; }
  .track-map { display: none; }
  .actions { margin-left: 0; }
  .ca { margin-inline: 0; }
  .side { max-height: 60vh; }
  .brand { font-size: 22px; }
  .pill { padding: 8px 11px; font-size: 12px; }
  .stat { padding: 6px 11px; }
  .stat b { font-size: 13px; }
  .ghost { padding: 7px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .live-badge i { animation: none; }
}
dialog h2:focus { outline: none; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--text);
  color: #0a0a0f;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  max-width: calc(100vw - 32px);
}
.toast b { font-size: 14px; }
.toast small { font-size: 12px; color: #4b4855; }
.join { margin: 12px 0 2px; padding: 14px; border-radius: 14px; border: 1px solid rgba(239, 91, 63, 0.35); background: linear-gradient(180deg, rgba(239, 91, 63, 0.09), rgba(255, 255, 255, 0.02)); }
.join-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.join-steps li { display: flex; gap: 8px; align-items: flex-start; min-width: 0; padding: 8px 9px; border-radius: 10px; background: rgba(5, 6, 11, 0.45); border: 1px solid var(--line); }
.join-steps li span { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: rgba(244, 239, 232, 0.1); color: var(--muted); }
.join-steps li b { display: block; font-size: 13px; line-height: 1.3; }
.join-steps li small { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.join-steps li.done span { background: #8fbf9a; color: #0a0a0f; }
.join-steps li.now { border-color: rgba(239, 91, 63, 0.6); }
.join-steps li.now span { background: var(--coral); color: #fff; box-shadow: 0 0 10px rgba(239, 91, 63, 0.6); }
.join-steps li.warn { border-color: rgba(224, 192, 85, 0.5); }
.join-steps li.warn span { background: var(--mustard); color: #0a0a0f; }
.join-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.join-facts div { padding: 8px 10px; border-radius: 10px; background: rgba(5, 6, 11, 0.45); border: 1px solid var(--line); }
.join-facts small { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.join-facts b { font-size: 15px; font-variant-numeric: tabular-nums; }
.join p { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.join .row { margin: 0; }
.pill.coral { background: var(--coral); color: #fff; border-color: transparent; font-weight: 700; }
.pill.coral:hover { background: #f36d52; }
.join .pill[disabled] { opacity: 0.55; cursor: default; }
.join .pill.coral[disabled]:hover { background: var(--coral); }
@media (max-width: 520px) { .join-steps { grid-template-columns: 1fr; } }
