:root {
  --bg: #0f1216;
  --panel: #191e25;
  --panel-2: #222935;
  --line: #2c3440;
  --text: #eef1f4;
  --muted: #94a0ad;
  --p1: #ff5a5f;
  --p2: #3d9cff;
  --gold: #ffc940;
  --on-gold: #1a1300;                 /* text on the accent; a company's colour may need white */
  --ok: #3ecf8e;
  --bad: #ff6b6b;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.5 system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
h1 { font-size: 22px; margin: 8px 0 12px; }
h2 { font-size: 18px; margin: 0 0 12px; }

.wrap { max-width: 520px; margin: 0 auto; padding: 12px 16px calc(24px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.brand { font-weight: 800; letter-spacing: .12em; color: var(--gold); }
.lang { position: relative; margin-left: auto; }
.lang-btn { display: flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px; border-radius: 999px;
            background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.lang-btn svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.6; }
.lang-btn[aria-expanded="true"] { border-color: var(--gold); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 172px; padding: 6px;
             display: flex; flex-direction: column; gap: 2px; background: var(--panel-2); border: 1px solid var(--line);
             border-radius: 12px; box-shadow: 0 12px 32px rgba(0, 0, 0, .55); }
.lang-menu button { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 12px;
                    background: none; border: 0; border-radius: 8px; text-align: left; font-size: 15px; }
.lang-menu button:hover, .lang-menu button:focus-visible { background: var(--panel); outline: none; }
.lang-menu button[aria-checked="true"] { color: var(--gold); font-weight: 700; }
.lang-menu button[aria-checked="true"]::after { content: '✓'; }
.me { text-align: right; line-height: 1.2; }
.me-name { color: var(--muted); font-size: 13px; max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-points { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.me-points small { font-size: 13px; font-weight: 400; margin-left: 2px; color: var(--muted); }
.me-riding { font-size: 12px; color: var(--gold); line-height: 1.3; }

.view { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 14px; }
.field input { font: inherit; font-size: 18px; color: var(--text); background: var(--panel); border: 1px solid var(--line);
               border-radius: 10px; padding: 12px; }
.field input:focus { outline: 2px solid var(--p2); border-color: transparent; }
.hint { min-height: 1.5em; font-size: 14px; }
.hint.ok { color: var(--ok); }
.hint.error { color: var(--bad); }
.primary { background: var(--gold); color: var(--on-gold); border: 0; border-radius: 10px; padding: 14px; font-weight: 800; font-size: 17px; }
.link { background: none; border: 0; color: var(--p2); padding: 8px; }
.welcome { font-size: 18px; font-weight: 700; color: var(--gold); margin: 0 0 4px; }
.code { font-size: 44px; font-weight: 800; letter-spacing: .25em; text-align: center; padding: 18px; background: var(--panel);
        border: 2px dashed var(--gold); border-radius: var(--radius); font-variant-numeric: tabular-nums; }

.screen { position: relative; aspect-ratio: 4 / 3; background: #000; border-radius: var(--radius); overflow: hidden; }
.screen video { width: 100%; height: 100%; display: block; object-fit: contain; }
/* iOS 14 has no aspect-ratio: keep the 4:3 box the old way */
@supports not (aspect-ratio: 4 / 3) {
  .screen { height: 0; padding-top: 75%; }
  .screen video { position: absolute; top: 0; left: 0; }
}
.cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
         text-align: center; padding: 16px; background: rgba(0, 0, 0, .74); }
.cover .big { font-size: 26px; font-weight: 800; }
.cover .small { color: var(--muted); margin-top: 6px; }
.cover .small:empty, .cover-bet:empty { display: none; }
.cover-bet { margin-top: 10px; padding: 4px 12px; border-radius: 999px; background: var(--gold); color: var(--on-gold); font-weight: 800; font-size: 14px; }
.poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cover.on-poster { justify-content: flex-end; padding-bottom: 8%;
                   background: linear-gradient(to top, rgba(0, 0, 0, .88) 0%, rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .1) 100%); }
.cover.on-poster .small { color: #d8dee6; }
.cover.break { background: var(--bg); }

.chip { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.chip.picked { background: var(--gold); color: var(--on-gold); border-color: var(--gold); font-weight: 700; }

.card { background: var(--panel); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.card.empty > :not(.card-head) { display: none; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }
#joinForm { display: flex; flex-direction: column; gap: 14px; }
#joinForm { gap: 10px; }

.screen-tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 6px; z-index: 2; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; padding: 0; background: rgba(10, 12, 16, .62);
            display: flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.on { background: rgba(255, 201, 64, .92); }
.icon-btn.on svg { stroke: var(--on-gold); }
.live-pill { position: absolute; left: 8px; bottom: 8px; z-index: 2; display: flex; align-items: center; gap: 6px;
             padding: 3px 10px 3px 8px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 12px; font-weight: 800; }
.live-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.screen-chip { position: absolute; right: 8px; bottom: 8px; z-index: 2; max-width: calc(100% - 110px); padding: 4px 12px;
               border-radius: 999px; background: var(--gold); color: var(--on-gold); font-size: 13px; font-weight: 800;
               white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-bar { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
            padding: 0 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); font-size: 14px; }
.mini-what { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mini-bar .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.mini-bar .dot.live { background: #e5484d; }
.mini-bar .dot.next { background: var(--gold); }
.mini-open { flex: none; display: flex; align-items: center; gap: 4px; color: var(--gold); font-weight: 700; }
.mini-open svg { width: 16px; height: 16px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.bet-card { gap: 14px; }
.bet-title { display: flex; flex-direction: column; min-width: 0; }
.bet-title small { font-size: 13px; color: var(--muted); font-weight: 500; }
.bet-vs { font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }      /* long names wrap rather than vanish */
.vs-word { color: var(--muted); font-weight: 500; font-size: 14px; }
.bet-card.empty .bet-vs { display: none; }
.clock { flex: none; padding: 6px 12px; border-radius: 999px; background: rgba(255, 201, 64, .14); color: var(--gold);
         font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clock.soon { background: #e5484d; color: #fff; }
.clock:empty { display: none; }
.pick-group { display: flex; flex-direction: column; gap: 8px; }
.pick-grid { display: grid; gap: 8px; }
.pick-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pick-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; min-height: 76px;
        padding: 10px 8px; border-radius: 14px; background: var(--bg); border: 2px solid var(--line); text-align: center; }
.tile:disabled { opacity: 1; }
.tile-meta { display: flex; align-items: center; justify-content: center; gap: 6px; max-width: 100%; font-size: 12px; color: var(--muted);
             overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.tile-meta span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }   /* a long line is cut at its end, not both ends */
.tile-name { max-width: 100%; font-weight: 900; font-size: 17px; line-height: 1.2; overflow-wrap: anywhere; }
.side-tile .tile-name { font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bonus-tile { padding-inline: 4px; }
.bonus-tile .tile-name { font-size: 14px; overflow-wrap: normal; word-break: keep-all; }   /* break between words, never inside one */
.tile-mult { font-size: 15px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.mark { flex: none; display: inline-block; width: 8px; height: 8px; }
.mark.p1 { border-radius: 50%; background: var(--p1); }
.mark.p2 { border-radius: 2px; background: var(--p2); }
#sideP1 .tile-name { color: var(--p1); }
#sideP2 .tile-name { color: var(--p2); }
#sideP1.picked { border-color: var(--p1); background: rgba(255, 90, 95, .14); }
#sideP2.picked { border-color: var(--p2); background: rgba(61, 156, 255, .14); }
.bonus-tile.picked { border-color: var(--gold); background: rgba(255, 201, 64, .12); }
.tile.placed { border-style: dashed; border-color: var(--ok); }
.tile.placed .tile-mult { color: var(--ok); font-size: 13px; }
.tile:disabled:not(.placed) { opacity: .45; }
.info-toggle { align-self: flex-start; display: flex; align-items: center; gap: 6px; min-height: 32px; padding: 0; border: 0;
               background: none; color: #8fc3ff; font-size: 14px; }
.info-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.fighters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fighter { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13px; line-height: 1.5; color: #c9d1da; }
.fighters .fighter-name { font-weight: 800; font-size: 14px; }
.fighters .fighter-meta { display: none; }           /* already on the side buttons */
.pick-lines { display: flex; flex-direction: column; gap: 14px; }
.pick-lines:empty { display: none; }
.slip-row { display: flex; align-items: center; gap: 10px; padding: 2px 0 2px 10px; border-left: 4px solid var(--gold); }
.slip-row.p1 { border-left-color: var(--p1); } .slip-row.p2 { border-left-color: var(--p2); }
.slip-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.slip-text b { font-size: 16px; font-weight: 900; color: var(--gold); }
.slip-row.p1 .slip-text b { color: var(--p1); } .slip-row.p2 .slip-text b { color: var(--p2); }
.slip-mult { font-size: 13px; color: var(--gold); }
.slip-text small { font-size: 13px; color: #c9d1da; }
.stepper { flex: none; display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.stepper button { width: 44px; height: 44px; border: 0; background: none; font-size: 22px; line-height: 1; padding: 0; }
.stepper b { min-width: 44px; text-align: center; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rules-card h3 { margin: 0; font-size: 15px; }
.rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; color: #c9d1da; font-size: 13px; line-height: 1.5; }
.big-cta { min-height: 56px; font-size: 18px; font-weight: 900; border-radius: 14px; }
.big-cta:disabled { opacity: 1; background: #2a2f37; color: #9aa4b0; }
.bet-status { font-size: 14px; color: #c9d1da; text-align: center; min-height: 1.5em; margin-top: -4px; }
.bet-status:empty { display: none; }
.ghost-btn { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid #3a4352; background: transparent;
             font-size: 14px; white-space: nowrap; }
.mine-box { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 14px; border: 1px solid #6b5a22; }
.mine-label { color: var(--gold); font-size: 14px; letter-spacing: .04em; }
.ticket-lines { display: flex; flex-direction: column; gap: 8px; }
.ticket-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 12px; background: var(--bg); }
.ticket-text { min-width: 0; }
.ticket-what { font-size: 17px; font-weight: 900; }
.ticket-sub { font-size: 13px; color: #c9d1da; }
.c-gold { color: var(--gold); }

.tabs { display: flex; gap: 8px; }
.tab { flex: 1; background: none; border: 0; border-bottom: 2px solid var(--line); padding: 8px; color: var(--muted); }
.tab.active { color: var(--text); border-color: var(--gold); font-weight: 700; }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-list li { display: grid; grid-template-columns: 2em 1fr auto; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.rank-list li:nth-child(1) .rank-no { color: var(--gold); }
.rank-no { font-weight: 800; text-align: center; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-points { font-variant-numeric: tabular-nums; font-weight: 700; }
.bet-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.bet-list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 8px; background: var(--panel-2); border-radius: 8px; }
.bet-pick { color: var(--muted); grid-column: 1; }
.bet-result { grid-row: 1 / 3; grid-column: 2; align-self: center; font-weight: 800; }
.bet-result.won { color: var(--ok); }
.bet-result.lost { color: var(--bad); }
.foot { font-size: 12px; text-align: center; }

.c-p1 { color: var(--p1); }
.c-p2 { color: var(--p2); }

.road-count { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.road-count b { font-variant-numeric: tabular-nums; }
.road-wrap { overflow-x: auto; padding-bottom: 4px; }
.road { display: grid; grid-auto-flow: column; grid-template-rows: repeat(6, 22px); grid-auto-columns: 22px; gap: 4px;
        width: max-content; min-width: 100%; padding: 6px; background: var(--panel-2); border-radius: 8px; }
.bead { display: inline-block; width: 22px; height: 22px; border-radius: 50%; border: 0; padding: 0; vertical-align: -5px; }
.road-key .bead { width: 12px; height: 12px; vertical-align: -1px; margin: 0 3px 0 8px; }
.road-key .bead:first-child { margin-left: 0; }
.bead.p1 { background: var(--p1); }
.bead.p2 { background: var(--p2); }
.bead.draw { background: var(--ok); }
.bead.latest { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.road-key { font-size: 12px; }
.road-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.road-list li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 6px 8px;
                background: var(--panel-2); border-radius: 8px; }
.road-list .when { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13px; }
.road-list .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.road-list .win { font-weight: 800; }

.result-sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center;
                background: rgba(15, 18, 22, .78); }
.sheet { width: 100%; max-width: 460px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 8px;
         padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); text-align: center; background: var(--panel);
         border: 1px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; animation: sheet-up .28s ease-out; }
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.res-icon { width: 56px; height: 56px; border-radius: 50%; background: #a9b4c0; display: flex; align-items: center; justify-content: center; }
.res-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--bg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.result-sheet.win .res-icon { background: var(--ok); }
.res-title { font-size: 28px; font-weight: 900; }
.res-amount { font-size: 60px; font-weight: 900; line-height: 1; color: #c9d1da; font-variant-numeric: tabular-nums; }
.result-sheet.win .res-amount { color: var(--ok); }
.res-fight { font-size: 15px; color: #c9d1da; }
.res-fight:empty { display: none; }
.res-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; color: var(--muted); }
.res-lines li.won { color: var(--ok); }
.res-points { font-size: 14px; color: var(--muted); }
.sheet .big-cta { width: 100%; margin-top: 10px; }

.guide { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 20px;
         background: rgba(15, 18, 22, .92); }
.guide-card { width: 100%; max-width: 420px; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; padding: 24px 20px;
              background: var(--panel); border: 1px solid var(--line); border-radius: 20px; }
.guide-card h2 { margin: 0; font-size: 22px; }
.guide-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 14px; }
.guide-steps li { counter-increment: step; display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; }
.guide-steps li::before { content: counter(step); grid-row: 1 / 3; width: 32px; height: 32px; border-radius: 50%; background: var(--gold);
                          color: var(--on-gold); font-weight: 900; display: flex; align-items: center; justify-content: center; }
.guide-steps b { font-size: 16px; }
.guide-steps span { font-size: 14px; color: #c9d1da; }
.guide-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* a shape per side (circle left, square right), so colour is not the only cue */
.phone .road .bead { display: inline-flex; align-items: center; justify-content: center; color: #0f1216; font-size: 11px; font-weight: 900; line-height: 1; }
.bead.p2 { border-radius: 5px; }
.road-key .bead.p2 { border-radius: 2px; }

@media (prefers-reduced-motion: reduce) { .sheet { animation: none; } }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%);
         background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px;
         font-weight: 700; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); max-width: calc(100% - 32px); text-align: center; z-index: 10; }
.toast.win { background: var(--ok); color: #002313; border-color: var(--ok); }
.toast.lose { background: #3a1d20; border-color: var(--bad); }

.banner { display: flex; align-items: center; gap: 8px; padding: 10px 12px; margin: 8px 0; border-radius: 10px;
          background: var(--gold); color: var(--on-gold); font-weight: 700; position: sticky; top: 60px; z-index: 7;
          box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.banner #bannerText { flex: 1; }
.banner button { background: none; border: 0; color: inherit; font-size: 16px; padding: 0 4px; }

.head-event { display: none; }
.play-side { display: flex; flex-direction: column; gap: 12px; }

/* Phones: header and video stay at the top, so the fight (and its HP bars) is always in view. */
@media (max-width: 959px) and (min-height: 560px) {
  .top { position: sticky; top: 0; z-index: 6; height: 56px; margin: -12px -16px 0; padding: 0 16px; background: var(--bg); }
  .play-stage { position: sticky; top: 56px; z-index: 5; background: var(--bg); padding-bottom: 8px;
                display: flex; flex-direction: column; gap: 8px; }
  /* scrolled to: stop below the header and the 4:3 video */
  .bet-card { scroll-margin-top: calc(56px + (100vw - 32px) * 0.75 + 16px); }
}

@media (min-width: 960px) {
  .wrap { max-width: 1880px; padding: 16px 28px 24px; }
  .top { padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
  .head-event { display: block; flex: 1; text-align: center; font-weight: 700; color: var(--muted); overflow: hidden;
                text-overflow: ellipsis; white-space: nowrap; }
  .me-name { max-width: 30vw; font-size: 14px; }
  .me-points { font-size: 28px; }
  .view:not(.play) { max-width: 480px; margin: 6vh auto 0; }
  .view.play { display: grid; grid-template-columns: minmax(0, 1fr) clamp(340px, 28vw, 420px); gap: 24px; align-items: start; }
  .play-stage { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
  /* 4:3, filling the height under the header */
  .play-stage .screen { width: 100%; max-width: calc((100vh - 165px) * 4 / 3); margin: 0 auto; }
  .cover .big { font-size: clamp(26px, 3vw, 44px); }
  .cover .small { font-size: clamp(14px, 1.3vw, 18px); }
  .cover-bet { font-size: 16px; }
  .side-tile .tile-name { font-size: 19px; }
}

body.big { overflow: hidden; }
/* 4:3 video at 82% of the height: about 370 px left per side on 1080p */
.stage { height: 100vh; display: grid; grid-template-columns: 1fr minmax(0, calc(82vh * 4 / 3)) 1fr; grid-template-rows: 100vh; gap: 0; }
.stage .center { display: flex; align-items: center; }
.stage .center .screen { width: 100%; border-radius: 0; }
.side-panel { padding: 3vh 1.5vw; display: flex; flex-direction: column; gap: 1.8vh; min-width: 0; min-height: 0; overflow: hidden;
              font-size: 1.6vh; }
.side-panel h2 { font-size: 3vh; color: var(--gold); }
.big .road-count { font-size: 2vh; gap: .6vh 1.2vw; }
.big .road-streak { flex-basis: 100%; font-size: 2.8vh; font-weight: 800; }
.big .road-wrap { overflow: hidden; padding: 0; }
.big .road { grid-template-rows: repeat(6, 3.4vh); grid-auto-columns: 3.4vh; gap: .7vh; padding: .7vh; }
.big .road .bead { width: 3.4vh; height: 3.4vh; }
.big .bead.latest { box-shadow: 0 0 0 .3vh var(--bg), 0 0 0 .6vh var(--gold); }
.big .road-key { font-size: 1.6vh; }
.big .road-key .bead { width: 1.4vh; height: 1.4vh; }
.big .road-list { font-size: 1.9vh; gap: .6vh; }
.big .road-list li { padding: .8vh .8vw; }
.big .road-list .when { font-size: 1.6vh; }
.next { background: var(--panel); border-radius: var(--radius); padding: 2vh 1vw; display: flex; flex-direction: column; gap: 1vh; }
.next-vs { display: flex; flex-direction: column; gap: 1.2vh; }
.next-vs > small { align-self: center; font-size: 2vh; font-weight: 800; color: var(--muted); }
.next-vs .fighter { font-size: 1.6vh; gap: .4vh; text-align: center; align-items: center; }
.next-vs .fighter-name { font-size: 3.2vh; font-weight: 800; }
.side-panel.tight .fighter-about { display: none; }
.next-bonus { font-size: 1.7vh; color: var(--gold); text-align: center; font-weight: 700; }
.big-count { font-size: 2.6vh; text-align: center; }
.join { margin-top: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1vh; }
.join img { width: 70%; max-width: 21vh; image-rendering: pixelated; background: #fff; border-radius: 8px; }
.join-code { font-size: 2vh; font-weight: 700; word-break: break-all; }
.big .cover .big { font-size: 6vh; }
.big .cover .small { font-size: 2.6vh; }
.big .cover-bet { font-size: 2.4vh; }
.start { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; gap: 2vw; background: rgba(0, 0, 0, .6); }
.start .primary, .start .ghost-btn { font-size: 3vh; padding: 2vh 4vw; }

.big .ticker { position: fixed; left: 0; right: 0; bottom: 0; top: auto; margin: 0; border-radius: 0; font-size: 3.4vh;
               padding: 1.6vh 3vw; z-index: 20; }
.mode { position: fixed; inset: 0; z-index: 15; background: radial-gradient(circle at 50% 30%, #2a2210, var(--bg) 70%);
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4vh; padding: 4vh 6vw; }
.mode h1 { font-size: 7vh; margin: 0; color: var(--gold); letter-spacing: .06em; text-align: center; }
.mode-ranks { width: min(70vw, 1100px); }
.mode-ranks li { font-size: 3.6vh; padding: 1vh 1.5vw; grid-template-columns: 2.2em minmax(0, 1fr) auto; background: var(--panel); }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 24vw)); align-items: end; gap: 2vw; }
.place { display: flex; flex-direction: column; align-items: center; gap: 1.2vh; text-align: center; }
.place .who { font-size: 5vh; font-weight: 800; min-height: 1.3em; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place .pts { font-size: 3vh; color: var(--muted); min-height: 1.3em; }
.place .step { width: 100%; display: flex; align-items: flex-start; justify-content: center; font-size: 8vh; font-weight: 900;
               border-radius: 12px 12px 0 0; padding-top: 2vh; background: var(--panel-2); color: var(--muted); }
.place.p1 .step { height: 30vh; } .place.p2 .step { height: 22vh; } .place.p3 .step { height: 16vh; }
.place.shown .step { background: var(--gold); color: var(--on-gold); }
.place.p2.shown .step { background: #cfd6de; } .place.p3.shown .step { background: #d39a63; }
.place.shown .who { animation: pop .6s ease-out; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .place.shown .who { animation: none; } }

.brand img { display: block; max-height: 28px; max-width: 140px; }
.brand.own { letter-spacing: 0; display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand.own span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.big .sandbox-strip { position: fixed; top: 0; left: 0; right: 0; }
.sandbox-strip { position: relative; z-index: 50; padding: 2px 8px; text-align: center;
                 font-size: 12px; font-weight: 800; letter-spacing: .08em; background: repeating-linear-gradient(135deg, #3a2a00 0 12px, #4a3600 12px 24px);
                 color: #ffd970; pointer-events: none; }
.screen-brand { position: absolute; top: 14px; right: 18px; z-index: 6; display: flex; align-items: center; gap: 10px;
                font-weight: 800; font-size: 22px; color: var(--gold); }
.screen-brand img { max-height: 48px; max-width: 220px; }
