/* Dot Race — candy colours, chunky sticker cards, LED jumbotron panels. */
:root {
  --ink: #17142e;
  --ink-2: #3a3560;
  --paper: #fff8f0;
  --white: #ffffff;
  --sky: #47c2ff;
  --blue: #3d6bff;
  --lime: #9be22d;
  --mint: #33e0ae;
  --pink: #ff5fb3;
  --coral: #ff6b6b;
  --orange: #ff9a2e;
  --sun: #ffd43b;
  --grape: #8b5cf6;
  --up: #22d46a;
  --down: #ff3d86;
  --led: #14122a;
  --led-amber: #ffd43b;
  --radius: 26px;
  --border: 3px solid var(--ink);
  --pop: 5px 6px 0 var(--ink);
  --pop-sm: 3px 4px 0 var(--ink);
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Plus Jakarta Sans", system-ui, sans-serif;
  --dotfont: "Doto", ui-monospace, monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--paper); font-weight: 500; line-height: 1.5; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
::selection { background: var(--sun); }

/* ---------- type ---------- */
.display { font-family: var(--display); font-weight: 900; letter-spacing: -0.02em; line-height: 0.98; }
.led { font-family: var(--dotfont); font-weight: 900; letter-spacing: 0.02em; }
.kicker { font-family: var(--display); font-weight: 800; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }

/* ---------- buttons ---------- */
.btn {
  --bg: var(--lime);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border: var(--border); border-radius: 999px; background: var(--bg);
  font-family: var(--display); font-weight: 800; font-size: 16px; letter-spacing: 0.01em; text-decoration: none;
  box-shadow: var(--pop); cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; white-space: nowrap;
}
.btn:hover { transform: translate(-1px, -2px); box-shadow: 6px 8px 0 var(--ink); }
.btn:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { --bg: var(--white); }
.btn.pink { --bg: var(--pink); color: #fff; }
.btn.sky { --bg: var(--sky); }
.btn.sun { --bg: var(--sun); }
.btn.big { padding: 20px 34px; font-size: 19px; }
.btn.small { padding: 9px 16px; font-size: 13px; box-shadow: var(--pop-sm); }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn .key { font-family: var(--body); font-size: 12px; font-weight: 800; background: rgba(23, 20, 46, 0.12); border-radius: 8px; padding: 2px 7px; }

/* ---------- chips & pills ---------- */
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: var(--border); border-radius: 999px; background: var(--white); font-weight: 800; font-size: 13px; box-shadow: var(--pop-sm); }
.chip .live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--down); box-shadow: 0 0 0 0 rgba(255, 61, 134, 0.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 61, 134, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(255, 61, 134, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 61, 134, 0); } }
.pct { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: 13px; color: #fff; }
.pct.up { background: var(--up); } .pct.down { background: var(--down); }

/* ---------- cards ---------- */
.card { background: var(--white); border: var(--border); border-radius: var(--radius); box-shadow: var(--pop); }
.stock-tile { width: 44px; height: 44px; border-radius: 14px; background: #fff; border: var(--border); display: grid; place-items: center; overflow: hidden; flex: none; }
.stock-tile img { width: 78%; height: 78%; object-fit: contain; }
.stock-tile.dark { background: var(--ink); }

/* ---------- LED jumbotron ---------- */
.jumbo { background: var(--led); color: #fff; border: var(--border); border-radius: 22px; box-shadow: var(--pop); position: relative; overflow: hidden; }
.jumbo::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.09) 1.6px, transparent 1.9px); background-size: 9px 9px; }
.jumbo .btn { color: var(--ink); }
.jumbo .led { color: var(--led-amber); text-shadow: 0 0 14px rgba(255, 212, 59, 0.55); }
.jumbo .led.green { color: #6dff9e; text-shadow: 0 0 14px rgba(34, 212, 106, 0.6); }
.jumbo .led.pink { color: #ff7db4; text-shadow: 0 0 14px rgba(255, 61, 134, 0.6); }
.jumbo .led.white { color: #fff; text-shadow: 0 0 12px rgba(255, 255, 255, 0.45); }
.jumbo .led.blue { color: #7fd8ff; text-shadow: 0 0 14px rgba(71, 194, 255, 0.6); }

/* ---------- header ---------- */
.top { position: fixed; inset: 14px 16px auto 16px; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; padding: 8px 18px 8px 12px; background: var(--white); border: var(--border); border-radius: 999px; box-shadow: var(--pop-sm); }
.brand img { width: 34px; height: 34px; }
.brand .wm { font-family: var(--display); font-weight: 900; font-size: 20px; letter-spacing: -0.02em; }
.brand .wm b { color: var(--pink); }
.nav { display: flex; gap: 6px; padding: 6px; background: var(--white); border: var(--border); border-radius: 999px; box-shadow: var(--pop-sm); }
.nav a { text-decoration: none; font-weight: 800; font-size: 14px; padding: 8px 14px; border-radius: 999px; }
.nav a:hover { background: var(--paper); }
.top .right { display: flex; gap: 10px; align-items: center; }
@media (max-width: 1360px) { .nav { display: none; } }
@media (max-width: 560px) { .brand .wm { font-size: 17px; } .top .chip { display: none; } .top .right .btn:not(.wallet-pill):not(#walletBtn) { display: none; } .brand { padding: 6px 12px 6px 8px; } }

/* ---------- toasts ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; box-shadow: var(--pop-sm); }

/* ---------- wallet picker ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 95; background: rgba(23, 20, 46, 0.45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(420px, 100%); padding: 24px; }
.modal h3 { margin: 0 0 14px; font-family: var(--display); font-weight: 900; font-size: 22px; }
.wallet-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; margin: 8px 0; background: var(--paper); border: var(--border); border-radius: 16px; cursor: pointer; font-weight: 800; }
.wallet-btn img { width: 28px; height: 28px; border-radius: 8px; }

/* ---------- wallet ---------- */
.wdot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink); box-shadow: inset -2px -2px 0 rgba(255, 255, 255, 0.35); }
.wallet-pill { padding: 5px 12px 5px 6px; gap: 8px; }
.wallet-pill img { width: 30px; height: 30px; }
.wallet-pill .caret { font-size: 11px; opacity: 0.6; }
.wallet-menu { position: fixed; z-index: 96; width: 280px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.wallet-menu .wm-head { display: flex; align-items: center; gap: 10px; }
.wallet-menu .wm-head img { width: 44px; height: 44px; }
.wallet-menu .wm-head b { display: block; font-family: var(--display); font-weight: 900; }
.wallet-menu code { font-family: var(--dotfont); font-weight: 900; font-size: 15px; }
.wallet-menu .wm-line { margin: 2px 0 4px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.wallet-menu button { text-align: left; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--paper); font-weight: 800; cursor: pointer; }
.wallet-menu button:hover { background: #fff3c4; }
.prize-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.prize-card b { font-family: var(--display); font-weight: 900; font-size: 18px; line-height: 1.2; }
.prize-card p { margin: 0; font-weight: 600; font-size: 14px; }
.prize-card .btn { align-self: flex-start; }
.prize-card.off { background: linear-gradient(135deg, #fff6cc, #ffe3f1); }
.prize-card.on { background: #e9fbcf; }
.prize-card.warn { background: #fff3c4; }
.pc-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pc-top code { font-family: var(--dotfont); font-weight: 900; font-size: 16px; }
.pc-badge { font-family: var(--display); font-weight: 900; font-size: 11px; letter-spacing: 0.1em; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: var(--sun); }

/* keyboard focus, visible on every control */
:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; border-radius: 12px; }
.btn:focus-visible { outline-offset: 4px; border-radius: 999px; }

/* the X button */
.xbtn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); color: #fff; border: var(--border); box-shadow: var(--pop-sm); text-decoration: none; flex: none; transition: transform 0.12s ease; }
.xbtn svg { width: 18px; height: 18px; }
.xbtn:hover { transform: translate(-1px, -2px); }
.foot-x svg { width: 18px; height: 18px; }
.foot .brand, .foot .btn { color: var(--ink); }
@media (max-width: 440px) {
  .top .brand .wm { display: none; }
  .top .brand { padding: 6px; }
  .xbtn { width: 40px; height: 40px; }
  #walletBtn { padding: 9px 13px; font-size: 13px; }
}
