/* ============================================================ Stand-a-Thon */

:root {
  --bg: #060a14;
  --bg-2: #0b1223;
  --panel: rgba(255, 255, 255, 0.045);
  --panel-2: rgba(255, 255, 255, 0.075);
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #e9eefb;
  --muted: #8b9cbd;
  --accent: #7cf7a8;
  --accent-ink: #052213;
  --sky: #38bdf8;
  --gold: #ffd166;
  --danger: #ff8080;
  --radius: 18px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --font: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --display: 'Outfit', var(--font);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(124, 247, 168, 0.16), transparent 60%),
    radial-gradient(900px 560px at 92% 4%, rgba(56, 189, 248, 0.15), transparent 62%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display { font-family: var(--display); letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 .6rem; }
h2 { font-size: 1.35rem; margin: 0 0 .2rem; }
h3 { font-size: 1rem; margin: 0; }
p { line-height: 1.6; }
a { color: var(--accent); }

.wrap { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.muted { color: var(--muted); }
.tiny { font-size: .78rem; }
.small { font-size: .87rem; }
.center { text-align: center; }
.stack { display: grid; gap: 1rem; }
.row { display: flex; align-items: center; gap: .7rem; }
.row.wrap-row { flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.grow { flex: 1; min-width: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------- kort */

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(14px);
}
.card.tight { padding: 1rem; }

.pill {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .7rem; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: .78rem; font-weight: 600; color: var(--muted);
}
.pill.accent { color: var(--accent-ink); background: var(--accent); border-color: transparent; }
.pill.gold { color: #3a2a00; background: var(--gold); border-color: transparent; }
.pill.live { color: var(--accent); border-color: rgba(124, 247, 168, .4); background: rgba(124, 247, 168, .1); }

.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(124, 247, 168, .5); }
  50% { opacity: .75; transform: scale(1.15); box-shadow: 0 0 0 7px rgba(124, 247, 168, 0); }
}

/* ---------------------------------------------------------------- knapper */

button, .btn {
  font: inherit; font-weight: 650; cursor: pointer;
  border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text);
  padding: .72rem 1.25rem;
  transition: transform .12s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
}
button:hover, .btn:hover { background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
button:active, .btn:active { transform: translateY(0); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4fe3d0);
  color: var(--accent-ink); border-color: transparent;
  box-shadow: 0 10px 30px rgba(124, 247, 168, .22);
}
.btn-primary:hover { background: linear-gradient(135deg, #94ffbb, #6ff0dd); }
.btn-danger { background: rgba(255, 128, 128, .14); border-color: rgba(255, 128, 128, .4); color: #ffc4c4; }
.btn-ghost { background: transparent; }
.btn-sm { padding: .45rem .85rem; font-size: .85rem; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------ felter */

label { display: block; font-size: .8rem; font-weight: 650; color: var(--muted); margin-bottom: .35rem; }

input[type=text], input[type=email], input[type=password], select {
  width: 100%; font: inherit; color: var(--text);
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2);
  border-radius: 12px; padding: .8rem .9rem;
}
input::placeholder { color: #5f708f; }
select { appearance: none; cursor: pointer; }
select option { background: #101830; color: var(--text); }

.field { margin-bottom: 1rem; }
.error { color: #ffb4b4; background: rgba(255, 128, 128, .1); border: 1px solid rgba(255, 128, 128, .3);
  border-radius: 12px; padding: .7rem .9rem; font-size: .88rem; }
.success { color: #bdf7d3; background: rgba(124, 247, 168, .1); border: 1px solid rgba(124, 247, 168, .3);
  border-radius: 12px; padding: .7rem .9rem; font-size: .88rem; }

/* ------------------------------------------------------------------ header */

.topbar {
  position: sticky; top: 0; z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(6, 10, 20, .72);
  border-bottom: 1px solid var(--line);
}
.topbar .inner { display: flex; align-items: center; gap: 1rem; padding: .85rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 700; font-size: 1.1rem; }
.brand .mark { width: 34px; height: 34px; border-radius: 11px; display: block; }

.tabs { display: flex; gap: .3rem; background: rgba(0, 0, 0, .3); padding: .28rem; border-radius: 999px; border: 1px solid var(--line); }
.tabs button {
  border: none; background: transparent; color: var(--muted);
  padding: .5rem 1rem; font-size: .88rem; border-radius: 999px;
}
.tabs button[aria-selected=true] { background: var(--panel-2); color: var(--text); }

/* --------------------------------------------------------------- landing */

.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 2rem; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.lead { font-size: 1.08rem; color: #c3cfe6; max-width: 46ch; }
.gradient-text { background: linear-gradient(100deg, var(--accent), var(--sky) 55%, #c4b5fd);
  -webkit-background-clip: text; background-clip: text; color: transparent; }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-top: 1.75rem; }
.fact { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .9rem; }
.fact b { display: block; font-family: var(--display); font-size: 1.5rem; }

.steps { counter-reset: step; display: grid; gap: .55rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; display: flex; gap: .7rem; align-items: flex-start; font-size: .92rem; color: #c3cfe6; }
.steps li::before {
  content: counter(step); flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: .75rem; font-weight: 700;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--accent);
}

/* ----------------------------------------------------------- bedriftsvalg */

.company-list { display: grid; gap: .45rem; }
.company-row {
  display: flex; align-items: center; gap: .7rem; width: 100%;
  padding: .65rem .8rem; border-radius: 14px;
  border: 1px solid var(--line); background: var(--panel);
}
.company-row[aria-pressed=true] { border-color: var(--accent); background: rgba(124, 247, 168, .1); }
.company-row .cname { display: block; font-weight: 650; font-size: .94rem; }
.company-row .cdomain { display: block; font-size: .75rem; color: var(--muted); }
.company-go { color: var(--muted); font-weight: 700; }
.company-row:hover .company-go { color: var(--accent); }

/* --------------------------------------------------- ledende bedrifter */

.leaders-card {
  margin-top: 1.75rem; padding: 1.1rem 1.25rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel);
}
.mini-track { display: grid; gap: .35rem; }

.mini-lane {
  display: grid; grid-template-columns: 22px 30px minmax(70px, 118px) 1fr auto;
  align-items: center; gap: .55rem; width: 100%;
  padding: .45rem .5rem; border-radius: 12px;
  border: 1px solid transparent; background: transparent;
}
.mini-lane:hover { background: rgba(255, 255, 255, .05); transform: none; }
.mini-lane.leader .mini-name { color: var(--gold); }
.mini-rank { font-size: .95rem; text-align: center; }
.mini-name { font-weight: 640; font-size: .88rem; text-align: left; }
.mini-km {
  font-family: var(--display); font-weight: 700; font-size: .85rem;
  font-variant-numeric: tabular-nums; min-width: 62px; text-align: right;
}

.mini-rail { position: relative; height: 22px; }
.mini-rail::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 5px;
  transform: translateY(-50%); border-radius: 999px; background: rgba(255, 255, 255, .08);
}
.mini-trail {
  position: absolute; left: 0; top: 50%; height: 5px; transform: translateY(-50%);
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--lane-color) 30%, transparent), var(--lane-color));
}
.mini-runner {
  position: absolute; top: 50%; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: .78rem;
  transform: translate(-50%, -50%);
  background: #0d1425; border: 2px solid var(--lane-color);
}
.mini-lane.leader .mini-runner { border-color: var(--gold); box-shadow: 0 0 10px rgba(255, 209, 102, .45); }

/* ------------------------------------------------------- Brreg-registrering */

.brreg-list { display: grid; gap: .35rem; margin-bottom: .8rem; }
.brreg-row {
  display: flex; align-items: center; gap: .6rem; width: 100%;
  padding: .55rem .75rem; border-radius: 12px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .2);
}
.brreg-row:disabled { opacity: .45; }
.brreg-name { font-weight: 640; font-size: .9rem; }
.chosen-org {
  padding: .7rem .85rem; border-radius: 12px; margin-bottom: 1rem;
  border: 1px solid rgba(124, 247, 168, .35); background: rgba(124, 247, 168, .08);
}

/* ---------------------------------------------------------------- fairplay */

.fairplay {
  border: 1px solid rgba(255, 209, 102, .35);
  background: linear-gradient(180deg, rgba(255, 209, 102, .11), rgba(255, 209, 102, .04));
  border-radius: var(--radius); padding: 1.1rem 1.25rem;
}
.fairplay h3 { color: var(--gold); display: flex; align-items: center; gap: .5rem; }
.fairplay ul { margin: .7rem 0 0; padding-left: 1.1rem; color: #e2d9c0; font-size: .9rem; line-height: 1.75; }
.fairplay ul li::marker { color: var(--gold); }

/* --------------------------------------------------------------- stå-panel */

.stand-panel { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 1.5rem; align-items: center; }

.stand-btn {
  position: relative; width: 216px; height: 216px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; border: none;
  background: radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .1), rgba(255, 255, 255, .02));
  font-family: var(--display);
  transition: transform .15s ease, background .3s ease;
}
.stand-btn:hover { transform: translateY(-2px) scale(1.015); background:
  radial-gradient(circle at 50% 28%, rgba(255, 255, 255, .15), rgba(255, 255, 255, .04)); }

.stand-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.stand-ring circle { fill: none; stroke-width: 8; stroke-linecap: round; }
.ring-track { stroke: rgba(255, 255, 255, .09); }
.ring-fill {
  stroke: var(--accent);
  transition: stroke-dashoffset .8s cubic-bezier(.32, .72, 0, 1), stroke .3s ease;
  filter: drop-shadow(0 0 6px rgba(124, 247, 168, .45));
}

.stand-face { display: grid; justify-items: center; gap: .15rem; padding: 0 2rem; }
.stand-icon { font-size: 3rem; line-height: 1; }
.stand-clock {
  font-size: 2.1rem; font-weight: 700; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; color: var(--accent);
}
.stand-lbl { font-size: 1rem; font-weight: 700; }
.stand-sub { font-size: .74rem; color: var(--muted); font-family: var(--font); font-weight: 500; }
.stand-hint { margin-top: .6rem; }

.stand-btn.live {
  background: radial-gradient(circle at 50% 28%, rgba(124, 247, 168, .22), rgba(124, 247, 168, .04));
  animation: breathe 3.6s ease-in-out infinite;
}
.stand-btn.live .stand-lbl { color: var(--text); }
.stand-btn.live .stand-sub::before { content: '🛑 '; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 247, 168, .3); }
  50% { box-shadow: 0 0 0 22px rgba(124, 247, 168, 0); }
}

.readout { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .8rem; }
.metric { background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: 14px; padding: .85rem 1rem; }
.metric .k { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); }
.metric .v { font-family: var(--display); font-size: 1.75rem; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.metric .u { font-size: .8rem; color: var(--muted); font-family: var(--font); font-weight: 500; }

.progress { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--sky)); transition: width .6s ease; }

/* ------------------------------------------------------------------ banen */

.badge {
  position: relative; flex: none;
  width: var(--badge-size, 30px); height: var(--badge-size, 30px);
  border-radius: 9px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line);
}
.badge-glyph { font-size: calc(var(--badge-size, 30px) * .56); line-height: 1; }
.badge-logo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; padding: 14%; border-radius: 8px; background: #fff;
}
.badge-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 8px;
}
.badge-corner {
  position: absolute; right: -4px; bottom: -4px;
  width: 46%; height: 46%; border-radius: 5px; padding: 1px;
  object-fit: contain; background: #fff; box-shadow: 0 0 0 2px var(--bg-2);
}

.track-card { padding: 0; overflow: hidden; }
.track-head { padding: 1.15rem 1.35rem; border-bottom: 1px solid var(--line); }

.track-note {
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: center;
  padding: .85rem 1.35rem; border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .022); font-size: .87rem;
}
.track-note b { color: var(--text); }
.track-note .sep { color: var(--line-2); }

.track {
  --cols: 34px minmax(140px, 210px) minmax(160px, 1fr) 96px;
  padding: 1.1rem 1.35rem 1.35rem;
}
.axis, .lane {
  display: grid; grid-template-columns: var(--cols);
  align-items: center; column-gap: .8rem;
}

.axis { margin-bottom: .35rem; }
.axis-caption { grid-column: 1 / 3; display: grid; gap: .1rem; }
.axis-span { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.axis-rail { position: relative; height: 66px; }
.axis-road {
  position: absolute; left: 0; right: 0; bottom: 4px; height: 12px; border-radius: 999px;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .45) 0 14px, transparent 14px 30px)
      center / auto 2px no-repeat,
    linear-gradient(180deg, #39445f, #212a41);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 6px 16px rgba(0, 0, 0, .4);
}

.pin { position: absolute; bottom: 0; transform: translateX(-50%); text-align: center; width: max-content; }
.pin.start { transform: none; text-align: left; }
.pin.end { transform: translateX(-100%); text-align: right; }
.pin-label { display: block; font-size: .8rem; font-weight: 650; color: #8ea1c2; white-space: nowrap; }
.pin-km { display: block; font-size: .7rem; color: #64769a; font-variant-numeric: tabular-nums; }
.pin.passed .pin-label { color: #e4ecfb; }
.pin.passed .pin-km { color: var(--muted); }
.pin-dot {
  display: block; width: 10px; height: 10px; border-radius: 50%; margin: 6px auto 5px;
  background: #465273; box-shadow: 0 0 0 3px rgba(6, 10, 20, .9);
  transition: background .3s ease;
}
.pin.passed .pin-dot { background: var(--accent); }
.pin.start .pin-dot { margin-left: 1px; }
.pin.end .pin-dot { margin-right: 1px; }

.lanes { display: grid; gap: .25rem; }
.lane-more {
  margin-top: .6rem; padding-left: .5rem;
  font-size: .8rem; color: var(--muted);
}

.lane {
  padding: .42rem .5rem; border-radius: 12px; border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease;
}
.lane:hover { background: rgba(255, 255, 255, .04); }
.lane.me { background: rgba(124, 247, 168, .08); border-color: rgba(124, 247, 168, .34); }
.lane.leader .lane-name { color: var(--gold); }

.lane-rank {
  font-family: var(--display); font-weight: 700; font-size: .95rem;
  color: var(--muted); text-align: center;
}
.lane-who { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.lane-name { font-weight: 640; font-size: .92rem; }
.lane-sub { font-size: .74rem; color: var(--muted); }

.lane-rail { position: relative; height: 26px; background-repeat: no-repeat; }
.lane-rail::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 6px;
  transform: translateY(-50%); border-radius: 999px;
  background: rgba(255, 255, 255, .07);
}
.lane-trail {
  position: absolute; left: 0; top: 50%; height: 6px; transform: translateY(-50%);
  border-radius: 999px; transition: width .9s cubic-bezier(.32, .72, 0, 1);
  background: linear-gradient(90deg, color-mix(in srgb, var(--lane-color) 35%, transparent), var(--lane-color));
}
.lane-runner {
  position: absolute; top: 50%; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: .95rem;
  transform: translate(-50%, -50%);
  background: #0d1425; border: 2px solid var(--lane-color);
  transition: left .9s cubic-bezier(.32, .72, 0, 1);
}
.lane.leader .lane-runner { border-color: var(--gold); box-shadow: 0 0 12px rgba(255, 209, 102, .5); }
.lane.standing .lane-runner { animation: runnerPulse 2.2s ease-in-out infinite; }
@keyframes runnerPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124, 247, 168, .55); }
  50% { box-shadow: 0 0 0 8px rgba(124, 247, 168, 0); }
}

.lane-dist { text-align: right; font-variant-numeric: tabular-nums; }
.lane-dist strong { display: block; font-family: var(--display); font-size: .95rem; }
.lane-dist small { display: block; font-size: .7rem; color: var(--muted); }

.track-empty { text-align: center; padding: 2.5rem 1rem; }

/* ----------------------------------------------------------------- butikk */

.coin-purse { text-align: right; }
.coin-balance {
  font-family: var(--display); font-size: 2.2rem; font-weight: 800; line-height: 1;
  color: var(--gold); font-variant-numeric: tabular-nums;
}
.coin-balance::before { content: '🪙 '; font-size: 1.4rem; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: .7rem; }
.shop-heading {
  grid-column: 1 / -1; display: flex; align-items: baseline; gap: .6rem;
  margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line);
}
.shop-heading:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.shop-item {
  display: grid; gap: .3rem; justify-items: center; text-align: center;
  padding: 1rem .8rem; border-radius: 16px;
  border: 1px solid var(--line); background: var(--panel);
}
.shop-item.owned { border-color: rgba(255, 255, 255, .2); }
.shop-item.equipped {
  border-color: var(--item-color, var(--accent));
  background: rgba(124, 247, 168, .09);
}
.shop-emoji {
  font-size: 2.2rem; line-height: 1; width: 62px; height: 62px;
  display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, var(--item-color, rgba(255,255,255,.12)), transparent 70%);
}
.shop-name { font-family: var(--display); font-weight: 700; }
.shop-blurb { min-height: 2.4em; }
.shop-item button { margin-top: .4rem; }

/* ------------------------------------------------------------ invitasjoner */

.invite-shell { max-width: 520px; margin-inline: auto; }
.invite-card { padding: 2rem 1.75rem; }
.invite-versus {
  display: flex; align-items: center; justify-content: center; gap: 1.25rem;
  margin-top: 1.75rem; flex-wrap: wrap;
}
.invite-side { display: grid; justify-items: center; gap: .4rem; min-width: 110px; }
.invite-name { font-family: var(--display); font-weight: 700; }
.invite-vs { font-family: var(--display); font-weight: 800; color: var(--muted); font-size: 1.1rem; }
.invite-message {
  margin: 1rem 0 0; padding: .7rem 1rem; border-radius: 12px;
  background: rgba(255, 255, 255, .05); font-style: italic; color: #cfdaf0;
}

/* -------------------------------------------------------------- topplister */

.board { display: grid; gap: .45rem; }
.board-row {
  display: grid; grid-template-columns: 34px 38px 1fr auto; align-items: center; gap: .7rem;
  padding: .7rem .85rem; border-radius: 14px; border: 1px solid var(--line); background: var(--panel);
}
.board-row.me { border-color: rgba(124, 247, 168, .5); background: rgba(124, 247, 168, .07); }
.board-row .rank { font-family: var(--display); font-weight: 700; color: var(--muted); text-align: center; }
.board-row.top1 .rank { color: var(--gold); }
.board-row .who { font-weight: 640; }
.board-row .sub { font-size: .76rem; color: var(--muted); }
.board-row .dist { text-align: right; font-family: var(--display); font-weight: 700; font-variant-numeric: tabular-nums; }
.board-row .dist small { display: block; font-family: var(--font); font-weight: 500; font-size: .72rem; color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }

table.log { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.log th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: .5rem .6rem; }
table.log td { padding: .55rem .6rem; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------- modal */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 1.5rem;
  background: rgba(3, 6, 14, .78); backdrop-filter: blur(6px);
}
.modal { width: min(520px, 100%); background: #0d1425; border: 1px solid var(--line-2);
  border-radius: 22px; padding: 1.6rem; box-shadow: var(--shadow); }

.toast-host { position: fixed; z-index: 80; bottom: 1.2rem; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; }
.toast { padding: .7rem 1.1rem; border-radius: 999px; background: #131c33; border: 1px solid var(--line-2);
  box-shadow: var(--shadow); font-size: .88rem; animation: toastIn .25s ease; }
.toast.bad { border-color: rgba(255, 128, 128, .45); color: #ffc9c9; }
.toast.good { border-color: rgba(124, 247, 168, .45); color: #c9ffdd; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

footer.site { padding: 3rem 0 2rem; color: var(--muted); font-size: .82rem; }

@media (max-width: 760px) {
  .track { --cols: 26px minmax(96px, 132px) minmax(90px, 1fr) 74px; padding: 1rem .8rem 1.1rem; }
  .track-head, .track-note { padding-inline: .9rem; }
  .lane-sub, .axis-span { display: none; }
  .lane-name { font-size: .85rem; }
  .pin-label { font-size: .72rem; }
  .pin-km { display: none; }
  .lane-dist strong { font-size: .82rem; }
}

@media (max-width: 900px) {
  .hero-grid, .grid-2, .stand-panel { grid-template-columns: 1fr; }
  .coin-purse { text-align: left; }
  .topbar .inner { flex-wrap: wrap; }
  .tabs { order: 3; width: 100%; justify-content: space-between; }
  .tabs button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.lane-sub:empty, .board-row .sub:empty { display: none; }
