:root {
  --bg: #1a1a2a;
  --bg-2: #24243a;
  --bg-3: #0e0e18;
  --yellow: #fff02e;
  --pink: #f7266f;
  --magenta: #cc0080;
  --magenta-dark: #8f005f;
  --blue: #4fb4ff;
  --white: #ffffff;
  --grey: #8a8aa3;
  --pixel: 'Press Start 2P', monospace;
  --chunky: 'Silkscreen', monospace;
  /* pitch width: as wide as the window allows while the whole game fits vertically */
  --pw: min(1280px, calc(100vw - 64px), calc((100vh - 230px) * 400 / 210));
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--pixel);
  overflow-x: hidden;
  -webkit-font-smoothing: none;
  user-select: none;
  -webkit-user-select: none;
  min-width: 900px;
}
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; image-rendering: pixelated; }
.hidden { display: none !important; }

/* ---------- top bar ---------- */
.top-bar {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 32px;
}
.logo { font-size: 12px; color: var(--yellow); text-shadow: 0 3px 0 var(--pink); letter-spacing: 1px; }
.top-right { display: flex; align-items: center; gap: 14px; }
.net-pill { font-size: 10px; color: var(--grey); border: 2px solid var(--bg-2); padding: 8px 10px; }
.net-pill.main { color: var(--yellow); border-color: var(--yellow); }
.wallet-chip {
  font-family: var(--pixel); font-size: 10px; color: var(--white);
  background: var(--bg-2); border: 0; padding: 10px 14px; cursor: pointer;
  box-shadow: 0 4px 0 var(--bg-3);
}
.wallet-chip::before { content: '● '; color: #39e27a; }
.wallet-chip:hover::after { content: '  ✕'; color: var(--grey); }
body.on-home .logo { visibility: hidden; }

/* ---------- screens ---------- */
#app { position: relative; z-index: 1; padding: 0 32px 32px; }
.screen {
  display: none; flex-direction: column; align-items: center; text-align: center;
  min-height: calc(100vh - 102px);
}
.screen.active { display: flex; }

/* ---------- title: yellow pixel letters with pink bands + drop ---------- */
.title {
  margin-top: 2vh;
  font-family: var(--pixel);
  font-size: clamp(52px, min(7.5vw, 11vh), 112px);
  line-height: 1.02;
  letter-spacing: 4px;
  display: flex; flex-direction: column; gap: 10px;
}
.title span {
  display: block;
  background: linear-gradient(to bottom,
    var(--yellow) 0 22%, var(--pink) 22% 30%, var(--yellow) 30% 68%, var(--pink) 68% 74%, var(--yellow) 74% 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0.09em 0 var(--pink));
}
.title.result { margin-top: 10vh; }
.title.result.lose span {
  background: linear-gradient(to bottom, #c9c9de 0 22%, var(--grey) 22% 30%, #c9c9de 30% 68%, var(--grey) 68% 74%, #c9c9de 74% 100%);
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0.09em 0 #3a3a55);
}

.heading { margin-top: 16vh; font-size: 40px; line-height: 1.4; color: var(--yellow); text-shadow: 0 5px 0 var(--pink); }
.heading.small { margin-top: 6vh; font-size: 26px; }

.hero { margin-top: 4vh; display: flex; flex-direction: column; align-items: center; gap: 18px; }
#hero-slime { width: 192px; height: 88px; image-rendering: pixelated; animation: hop 1.1s steps(6) infinite; }
@keyframes hop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
.tag { font-size: 11px; color: var(--grey); letter-spacing: 2px; }

.info-row { margin-top: 4vh; display: flex; align-items: center; gap: 64px; }
.stakes { display: flex; align-items: center; gap: 24px; }
.stakes b { display: block; font-size: 30px; color: var(--white); }
.stakes b.win { color: var(--yellow); }
.stakes small { display: block; margin-top: 10px; font-size: 9px; color: var(--grey); }
.stakes .arrow { color: var(--pink); font-size: 20px; }

/* keyboard legend */
.keys-legend { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding-left: 64px; border-left: 2px solid var(--bg-2); }
.keyset { display: flex; align-items: center; gap: 8px; font-size: 9px; color: var(--grey); }
kbd {
  font-family: var(--pixel); font-size: 11px; color: var(--white);
  min-width: 30px; height: 30px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-2); box-shadow: 0 4px 0 var(--bg-3); border-radius: 2px;
}
kbd.wide { font-size: 8px; min-width: 64px; }
.keyset span { margin-left: 6px; }
.keys-legend.small { flex-direction: row; gap: 24px; padding-left: 0; border: 0; }
.keys-legend.small kbd { min-width: 24px; height: 24px; font-size: 9px; }
.keys-legend.small kbd.wide { min-width: 52px; font-size: 7px; }

.rules { margin-top: 24px; font-size: 9px; line-height: 1.8; color: var(--grey); }

/* ---------- buttons ---------- */
.cta { margin-top: auto; width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 20px; }
.btn {
  width: 100%;
  font-family: var(--chunky); font-weight: 700;
  font-size: 30px; letter-spacing: 1px;
  color: var(--white);
  background: var(--magenta);
  border: 0; border-radius: 4px;
  padding: 22px 12px 20px;
  box-shadow: 0 12px 0 var(--magenta-dark);
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 60ms steps(1), box-shadow 60ms steps(1), filter 60ms steps(1);
}
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: translateY(8px); box-shadow: 0 4px 0 var(--magenta-dark); }
.btn:disabled { opacity: .55; cursor: wait; filter: none; }
.btn:focus-visible, .link-btn:focus-visible, .wallet-chip:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.btn-ghost { background: var(--bg-2); box-shadow: 0 12px 0 var(--bg-3); font-size: 22px; }
.btn-ghost:active { box-shadow: 0 4px 0 var(--bg-3); }
.link-btn { font-family: var(--pixel); font-size: 10px; color: var(--grey); background: none; border: 0; padding: 10px; cursor: pointer; }
.link-btn:hover { color: var(--white); }

.msg { min-height: 1.9em; font-family: var(--pixel); font-size: 10px; line-height: 1.9; color: var(--grey); max-width: 520px; }
.msg.err { color: var(--pink); }
.msg.ok { color: var(--yellow); }

/* ---------- waiting ---------- */
.loader { margin: 56px 0 36px; display: flex; gap: 14px; }
.loader i { width: 20px; height: 20px; background: var(--yellow); animation: blink 0.9s steps(1) infinite; }
.loader i:nth-child(2) { animation-delay: .3s; background: var(--pink); }
.loader i:nth-child(3) { animation-delay: .6s; background: var(--blue); }
@keyframes blink { 50% { opacity: .15; } }

/* ---------- game ---------- */
#screen-game { justify-content: center; gap: 0; }
.scoreboard, .pitch-wrap, .game-foot { width: var(--pw); }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; margin-bottom: 16px; }
.team { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--grey); min-width: 0; }
.team.t1 { justify-content: flex-end; }
.team b { font-size: 40px; color: var(--white); }
.team .dot { width: 14px; height: 14px; flex: none; }
.t0 .dot { background: var(--blue); }
.t1 .dot { background: var(--pink); }
.team .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team.me .name { color: var(--yellow); }
.clock { font-size: 20px; color: var(--yellow); background: var(--bg-2); padding: 12px 16px; box-shadow: 0 5px 0 var(--bg-3); }
.clock.golden { color: var(--bg); background: var(--yellow); box-shadow: 0 5px 0 #a39700; }

.pitch-wrap { position: relative; }
#pitch {
  display: block; width: 100%; height: auto; aspect-ratio: 400 / 210;
  image-rendering: pixelated; image-rendering: crisp-edges;
  background: var(--bg);
  border: 6px solid var(--bg-2);
  box-shadow: 0 8px 0 var(--bg-3);
}
.banner {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: clamp(32px, 4vw, 56px); color: var(--yellow); text-shadow: 0 6px 0 var(--pink);
  pointer-events: none;
}
.game-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; }
.pot { font-size: 10px; color: var(--yellow); }

/* ---------- result ---------- */
.final { margin-top: 32px; font-size: 32px; }
.tx-link { margin-top: 20px; font-size: 10px; color: var(--yellow); }
#screen-end .msg { margin-top: 22px; }

/* ---------- phone visitors ---------- */
body.mobile { min-width: 0; }
body.mobile .top-bar { padding: 16px; }
body.mobile #app { padding: 0 16px 24px; }
body.mobile .title { font-size: clamp(44px, 15vw, 72px); }

/* ---------- practice picker ---------- */
.practice { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.practice-label { font-size: 9px; color: var(--grey); letter-spacing: 1px; }
.lvl-row { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.lvl-btn {
  font-family: var(--chunky); font-weight: 700; font-size: 18px; letter-spacing: 1px; color: var(--white);
  background: var(--bg-2); border: 0; border-radius: 4px; padding: 12px 0 10px;
  box-shadow: 0 6px 0 var(--bg-3); cursor: pointer;
  transition: transform 60ms steps(1), box-shadow 60ms steps(1);
}
.lvl-btn:hover { color: var(--yellow); }
.lvl-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--bg-3); }
.lvl-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

/* ---------- top bar extras ---------- */
.online-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; color: var(--grey); }
.online-pill i { width: 8px; height: 8px; background: #39e27a; animation: blink 1.6s steps(1) infinite; }
.online-pill b { color: var(--white); font-weight: normal; }
.top-btn {
  font-family: var(--pixel); font-size: 10px; color: var(--yellow);
  background: var(--bg-2); border: 0; padding: 10px 12px; cursor: pointer; box-shadow: 0 4px 0 var(--bg-3);
}
.top-btn:hover { filter: brightness(1.15); }
.top-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--bg-3); }

/* ---------- home: one-line title ---------- */
.title.inline { flex-direction: row; gap: 0.45em; font-size: clamp(48px, min(7vw, 10vh), 100px); }

.friend-row { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mid-btn {
  font-family: var(--chunky); font-weight: 700; font-size: 16px; letter-spacing: 1px; color: var(--white);
  background: var(--bg-2); border: 0; border-radius: 4px; padding: 13px 8px 11px;
  box-shadow: 0 6px 0 var(--bg-3); cursor: pointer;
  transition: transform 60ms steps(1), box-shadow 60ms steps(1);
}
.mid-btn:hover { color: var(--yellow); }
.mid-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--bg-3); }
.mid-btn:disabled { opacity: .5; cursor: wait; }
.mid-btn:focus-visible, .top-btn:focus-visible, .day-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.lobby-line { font-size: 8px; color: var(--grey); min-height: 1em; margin: 2px 0; }
.lobby-line b { color: var(--white); font-weight: normal; }
.cta .practice { margin-top: 6px; }

/* ---------- private game code ---------- */
.room-box { margin: 0 0 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.room-box small { font-size: 8px; color: var(--grey); }
.room-box .code {
  font-size: 56px; letter-spacing: 16px; padding: 18px 8px 18px 24px; color: var(--yellow);
  background: var(--bg-2); box-shadow: 0 8px 0 var(--bg-3); text-shadow: 0 5px 0 var(--pink);
}
.room-box .mid-btn { padding-left: 24px; padding-right: 24px; }
.code-input {
  margin: 28px 0 8px; width: 340px; text-align: center;
  font-family: var(--pixel); font-size: 52px; letter-spacing: 16px; text-indent: 16px; text-transform: uppercase;
  color: var(--yellow); background: var(--bg-2); border: 0; padding: 22px 0; box-shadow: 0 8px 0 var(--bg-3);
  caret-color: var(--pink); outline: none;
}
.code-input::placeholder { color: #3a3a58; }
.code-input:focus { box-shadow: 0 8px 0 var(--bg-3), 0 0 0 3px var(--yellow); }

/* ---------- leaderboard ---------- */
.board-title { margin-top: 5vh; }
.day-nav { margin-top: 28px; display: flex; align-items: center; gap: 18px; }
.day-btn {
  font-family: var(--pixel); font-size: 12px; color: var(--white); background: var(--bg-2);
  border: 0; width: 40px; height: 40px; cursor: pointer; box-shadow: 0 4px 0 var(--bg-3);
}
.day-btn:disabled { opacity: .3; cursor: default; }
.day-label { font-size: 14px; color: var(--yellow); min-width: 190px; }
.board-sub { margin-top: 14px; font-size: 8px; color: var(--grey); }
.board { margin-top: 24px; width: min(760px, 100%); background: rgba(14,14,24,.6); box-shadow: 0 8px 0 var(--bg-3); }
.board-head, .board-row {
  display: grid; grid-template-columns: 70px 1fr 110px 160px; align-items: center; text-align: left;
  padding: 14px 22px; font-size: 11px;
}
.board-head { font-size: 8px; color: var(--grey); background: var(--bg-2); }
.board-head span:nth-child(n+3), .board-row span:nth-child(n+3) { text-align: right; }
.board-row { border-top: 2px solid var(--bg-2); }
.board-row .rank { color: var(--grey); }
.board-row:nth-child(1) .rank { color: var(--yellow); }
.board-row:nth-child(2) .rank { color: #d8d8ea; }
.board-row:nth-child(3) .rank { color: #e08a4f; }
.board-row .sol { color: var(--yellow); }
.board-row.me { background: rgba(247,38,111,.14); }
.board-row.me .who::after { content: ' (YOU)'; color: var(--pink); }
.board-empty { padding: 34px 0; font-size: 10px; color: var(--grey); }
.end-links { display: flex; gap: 24px; }

/* ---------- home: two columns ---------- */
#screen-home { justify-content: center; }
.home-grid {
  width: min(1180px, 100%); margin: auto 0;
  display: grid; grid-template-columns: 1fr 520px; gap: 56px; align-items: center;
}
.home-left { display: flex; flex-direction: column; align-items: center; text-align: center; }
.home-left .title { margin-top: 0; font-size: clamp(56px, min(7.4vw, 12vh), 116px); }
.home-left .hero { margin-top: 5vh; }
.keys-legend.row { margin-top: 5vh; flex-direction: row; gap: 28px; padding: 0; border: 0; }
.home-left .rules { margin-top: 22px; }

.home-panel {
  display: flex; flex-direction: column; gap: 12px;
  background: rgba(14,14,24,.72); padding: 24px; box-shadow: 0 10px 0 var(--bg-3);
  border: 2px solid var(--bg-2);
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; color: var(--white); }
.lobby-mini { font-size: 8px; color: var(--grey); }
.lobby-mini b { color: var(--white); font-weight: normal; }

.stake-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stake {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-family: var(--pixel); color: var(--white); background: var(--bg-2); border: 0; border-radius: 3px;
  padding: 12px 4px 10px; box-shadow: 0 5px 0 var(--bg-3); cursor: pointer;
  transition: transform 60ms steps(1), box-shadow 60ms steps(1);
}
.stake b { font-size: 15px; font-weight: normal; }
.stake small { font-size: 7px; color: var(--grey); }
.stake em { font-style: normal; font-size: 7px; color: #4c4c6a; min-height: 9px; }
.stake em.hot { color: var(--pink); }
.stake em.hot::before { content: '● '; animation: blink 1s steps(1) infinite; }
.stake em.live { color: var(--grey); }
.stake:hover b { color: var(--yellow); }
.stake:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--bg-3); }
.stake.sel { background: var(--yellow); box-shadow: 0 5px 0 #a39700; }
.stake.sel b, .stake.sel small { color: var(--bg); }
.stake.sel em { color: #6b6200; }
.stake.sel em.hot { color: var(--magenta); }
.stake:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.stake.has-wait:not(.sel) { box-shadow: 0 5px 0 var(--bg-3), inset 0 0 0 2px var(--pink); }

.stake-summary { display: flex; align-items: center; justify-content: center; gap: 22px; margin-top: 6px; }
.stake-summary b { display: block; font-size: 24px; font-weight: normal; text-align: center; }
.stake-summary b.win { color: var(--yellow); }
.stake-summary small { display: block; margin-top: 8px; font-size: 7px; color: var(--grey); text-align: center; }
.stake-summary .arrow { color: var(--pink); font-size: 16px; }

.tier-note { font-size: 8px; line-height: 1.8; color: var(--grey); text-align: center; min-height: 1.8em; }
.tier-note.hot { color: var(--pink); }
.home-panel .msg { min-height: 0; text-align: center; margin: 0 auto; }
.home-panel .msg:empty { display: none; }
.home-panel .btn { margin: 4px 0 10px; font-size: 26px; padding: 18px 12px 16px; }
.home-panel .practice { margin-top: 6px; padding-top: 14px; border-top: 2px solid var(--bg-2); }

.wait-stake { margin-top: -12px; margin-bottom: 18px; font-size: 11px; color: var(--yellow); }
#screen-wait .tier-note { max-width: 520px; margin-top: 8px; }
.join-info { min-height: 1.6em; font-size: 11px; color: var(--yellow); margin-top: 18px; line-height: 1.8; }

/* ---------- leaderboard names ---------- */
.name-bar { margin-top: 20px; display: flex; align-items: center; gap: 12px; }
.name-label { font-size: 9px; color: var(--grey); }
.name-input {
  width: 260px; font-family: var(--pixel); font-size: 13px; color: var(--white); text-transform: uppercase;
  background: var(--bg-2); border: 0; padding: 12px 14px; box-shadow: 0 5px 0 var(--bg-3); outline: none;
}
.name-input::placeholder { color: #4c4c6a; }
.name-input:focus { box-shadow: 0 5px 0 var(--bg-3), 0 0 0 3px var(--yellow); }
.name-bar .mid-btn { padding: 11px 18px 9px; }
.name-msg { margin-top: 10px; min-height: 1.4em; }
.board-row .who .addr { color: var(--grey); font-size: 8px; margin-left: 10px; }

.stake.fee { background: transparent; box-shadow: none; border: 2px dashed var(--bg-2); cursor: default; justify-content: center; }
.stake.fee b { color: var(--grey); font-size: 13px; }
.stake.fee:active { transform: none; }

/* ---------- leaderboard pop-up ---------- */
.modal {
  position: fixed; inset: 0; z-index: 10;
  display: flex; align-items: center; justify-content: center; padding: 32px;
  background: rgba(10,10,20,.78);
}
.modal-card {
  position: relative; width: min(800px, 100%); max-height: calc(100vh - 64px);
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--bg); border: 4px solid var(--bg-2); box-shadow: 0 12px 0 var(--bg-3);
  padding: 34px 34px 26px;
}
.modal-x {
  position: absolute; top: 16px; right: 16px; width: 48px; height: 48px;
  font-family: var(--pixel); font-size: 18px; color: var(--white);
  background: var(--magenta); border: 0; border-radius: 3px; box-shadow: 0 6px 0 var(--magenta-dark); cursor: pointer;
}
.modal-x:hover { filter: brightness(1.12); }
.modal-x:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--magenta-dark); }
.modal-x:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.modal-title { font-size: 28px; color: var(--yellow); text-shadow: 0 4px 0 var(--pink); }
.modal .day-nav { margin-top: 22px; }
.modal .board { margin-top: 18px; width: 100%; display: flex; flex-direction: column; min-height: 0; }
.board-scroll { overflow-y: auto; max-height: 42vh; }
.modal .name-bar { margin-top: 22px; }

/* ---------- wallet connect + menu ---------- */
.wallet-wrap { position: relative; }
.wallet-btn {
  font-family: var(--pixel); font-size: 10px; color: var(--white);
  background: var(--magenta); border: 0; padding: 10px 14px; cursor: pointer; box-shadow: 0 4px 0 var(--magenta-dark);
}
.wallet-btn:hover { filter: brightness(1.12); }
.wallet-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--magenta-dark); }
.wallet-chip { display: inline-flex; align-items: center; gap: 10px; }
.wallet-chip i { font-style: normal; color: var(--grey); font-size: 8px; }
.wallet-chip:hover::after { content: none; }
.wallet-chip[aria-expanded="true"] { background: #2e2e4a; }
.wallet-btn:focus-visible, .wallet-menu button:focus-visible, .wallet-option:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.wallet-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 20; width: 250px;
  background: var(--bg); border: 3px solid var(--bg-2); box-shadow: 0 8px 0 var(--bg-3);
  display: flex; flex-direction: column; padding: 6px;
}
.wm-head { display: flex; flex-direction: column; gap: 8px; padding: 12px 10px 14px; border-bottom: 2px solid var(--bg-2); margin-bottom: 6px; text-align: left; }
.wm-head small { font-size: 7px; color: var(--grey); }
.wm-head span#wm-addr { font-size: 10px; color: var(--white); }
.wallet-menu button {
  font-family: var(--pixel); font-size: 9px; text-align: left; color: var(--white);
  background: none; border: 0; padding: 12px 10px; cursor: pointer;
}
.wallet-menu button:hover { background: var(--bg-2); color: var(--yellow); }
.wallet-menu button.danger { color: var(--pink); }
.wallet-menu button.danger:hover { color: var(--pink); background: rgba(247,38,111,.12); }

.modal-card.small { width: min(460px, 100%); }
.modal-sub { margin-top: 14px; font-size: 9px; color: var(--grey); }
.modal-foot { margin-top: 6px; font-size: 8px; color: var(--grey); }
.modal-card.small .modal-title { line-height: 1.4; }
.wallet-list { width: 100%; margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.wallet-option {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  font-family: var(--chunky); font-weight: 700; font-size: 20px; letter-spacing: 1px; color: var(--white);
  background: var(--bg-2); border: 0; border-radius: 4px; padding: 16px 18px 14px; cursor: pointer;
  box-shadow: 0 6px 0 var(--bg-3); transition: transform 60ms steps(1), box-shadow 60ms steps(1);
}
.wallet-option:hover { color: var(--yellow); }
.wallet-option:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--bg-3); }
.wallet-option em { font-family: var(--pixel); font-style: normal; font-size: 8px; color: var(--grey); }
.wallet-option.ready em { color: #39e27a; }
.wallet-option.ready em::before { content: '● '; }
.wallet-option:disabled { opacity: .6; cursor: wait; }
#wallet-modal .msg { margin-top: 14px; }

/* ---------- free tier ---------- */
.stake.free b { font-size: 13px; letter-spacing: 1px; }
.stake.free:not(.sel) b { color: #39e27a; }
.fee-line { font-size: 7px; color: #5c5c7a; text-align: center; margin-top: -4px; }

/* ---------- leaderboard switches ---------- */
.board-tabs { margin-top: 22px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--bg-3); padding: 4px; gap: 4px; }
.seg-btn {
  font-family: var(--pixel); font-size: 9px; color: var(--grey); background: transparent;
  border: 0; padding: 10px 14px; cursor: pointer;
}
.seg-btn:hover { color: var(--white); }
.seg-btn.on { background: var(--yellow); color: var(--bg); }
.seg-btn:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
.day-nav.off { visibility: hidden; height: 0; margin: 0; overflow: hidden; }
.board-head span.lead { color: var(--yellow); }
.board-row .wins.lead { color: var(--yellow); }
.board-row .sol:not(.lead) { color: var(--white); }

/* ---------- logo links home ---------- */
a.logo { text-decoration: none; cursor: pointer; }
a.logo:hover { color: var(--white); }
a.logo:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
