.hidden{display:none!important}
.panel{max-height:calc(100vh - 28px);max-height:calc(100dvh - 28px);overflow-y:auto;overscroll-behavior:contain}

/* ---- custom art icons ------------------------------------------------ */
.how-img{width:29px;height:29px;object-fit:contain;filter:drop-shadow(0 3px 7px rgba(0,0,0,.45))}
.card-icon{display:flex;align-items:center;justify-content:center;width:48px;height:48px;font-size:0}
.card-icon-img{width:46px;height:46px;object-fit:contain;filter:drop-shadow(0 5px 10px rgba(0,0,0,.5))}

/* ---- WAX sign-in ----------------------------------------------------- */
.account-row{
  margin:16px 0 2px;
  display:flex;flex-direction:column;align-items:center;gap:8px;
}
.wax-btn{
  display:inline-flex;align-items:center;gap:9px;
  padding:10px 18px;border-radius:999px;
  background:rgba(255,200,74,.06);
  border:1px solid rgba(255,200,74,.36);
  color:#ffe7a8;
  font-family:'Press Start 2P',monospace;
  font-size:8.5px;letter-spacing:.06em;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,transform .1s ease;
}
.wax-btn:hover{background:rgba(255,200,74,.14);border-color:rgba(255,200,74,.65)}
.wax-btn:active{transform:translateY(1px)}
.wax-btn[disabled]{opacity:.55;cursor:wait}
.wax-btn.small{font-size:7px;padding:9px 13px;margin-top:10px;line-height:1.5}
.wax-mark{
  display:inline-grid;place-items:center;
  width:22px;height:22px;border-radius:50%;
  background:linear-gradient(180deg,#ffd35c,#ff961c);
  color:#3a1c02;
  font-family:'Bungee',system-ui,sans-serif;font-size:13px;
  box-shadow:0 0 0 1px rgba(255,240,190,.4) inset;
}
.account-chip{
  display:flex;align-items:center;gap:8px;
  padding:8px 11px;border-radius:999px;
  border:1px solid rgba(120,230,140,.38);
  background:rgba(80,200,120,.08);
}
.chip-dot{width:7px;height:7px;border-radius:50%;background:#6ee08a;box-shadow:0 0 8px #6ee08a}
.chip-label{font-family:'Press Start 2P',monospace;font-size:7px;color:#9fd8ac;letter-spacing:.07em}
.account-chip b{font-size:13px;color:#ecfff1;font-weight:400;letter-spacing:.02em}
.chip-x{
  background:none;border:none;padding:0 0 0 3px;
  color:#9fd8ac;font-size:17px;line-height:1;cursor:pointer;
}
.chip-x:hover{color:#fff}
.wax-note{
  margin:0;font-family:system-ui,-apple-system,'Segoe UI',sans-serif;
  font-size:11.5px;color:#9d8cab;min-height:15px;text-align:center;
}

.start-actions{
  display:flex;gap:10px;justify-content:center;align-items:center;
  flex-wrap:wrap;margin-top:4px;
}
.btn.ghost{
  background:transparent;color:var(--honey);
  border:2px solid rgba(255,200,74,.36);
  box-shadow:none;
  padding:13px 26px;
  font-size:13px;
  animation:none;
}
.btn.ghost:hover{background:rgba(255,200,74,.1);border-color:rgba(255,200,74,.7);box-shadow:0 0 24px rgba(255,150,30,.16)}
.end-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:10px}
.submit-status{
  min-height:18px;margin-top:10px;
  font-family:'Press Start 2P',monospace;font-size:7.5px;
  letter-spacing:.04em;color:#9fd8ac;line-height:1.6;
}

/* ---- leaderboard ----------------------------------------------------- */
.board-panel{width:min(730px,95vw)}
.board{
  display:flex;flex-direction:column;gap:6px;
  margin:20px 0 8px;
  max-height:52vh;overflow:auto;
  padding-right:2px;
}
.board-row{
  display:grid;
  grid-template-columns:34px minmax(0,1fr) 52px 42px 54px 34px;
  gap:8px;align-items:center;
  padding:10px 12px;border-radius:10px;
  background:rgba(255,255,255,.03);
  border:1px solid rgba(255,200,74,.1);
  font-family:system-ui,-apple-system,'Segoe UI',sans-serif;
  font-size:12px;color:#d9cae4;
  text-align:left;
}
.board-row.head{
  background:none;border-color:transparent;
  padding:0 12px 2px;
  font-family:'Press Start 2P',monospace;
  font-size:6.5px;letter-spacing:.06em;color:#8d7c9b;
}
.board-row.me{
  border-color:rgba(255,200,74,.5);
  background:rgba(255,200,74,.08);
}
.board-rank{font-family:'Bungee',system-ui,sans-serif;font-size:14px;color:var(--honey)}
.board-account{
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-weight:700;color:#fff0cf;
}
.board-win{color:#8fe06a;font-size:10px;font-family:'Press Start 2P',monospace}
.board-empty{
  padding:34px 10px;text-align:center;
  font-family:system-ui,-apple-system,'Segoe UI',sans-serif;
  font-size:13px;color:#9d8cab;
}

@media (max-width:620px){
  .board-row{grid-template-columns:30px minmax(0,1fr) 46px 52px;font-size:11px}
  .board-row .col-level,.board-row .col-bonk{display:none}
  .board-row.head{padding-left:12px}
  .wax-btn{font-size:7.5px;padding:9px 13px}
  .account-row{margin-top:12px}
  .start-actions{flex-direction:column;gap:8px}
  .start-actions .btn{width:min(320px,80vw)}
  .card-icon{width:40px;height:40px}
  .card-icon-img{width:38px;height:38px}
}

/* ---- ranked / practice modes ---------------------------------------- */
.mode-select{
  display:grid;grid-template-columns:1fr 1fr;gap:10px;
  margin:14px 0 4px;text-align:left;
}
.mode-card{
  appearance:none;-webkit-appearance:none;
  display:flex;flex-direction:column;gap:5px;
  padding:14px 15px 13px;border-radius:14px;
  background:rgba(255,255,255,.025);
  border:1px solid rgba(255,200,74,.18);
  color:#f6e9cf;cursor:pointer;text-align:left;
  font-family:system-ui,-apple-system,'Segoe UI',sans-serif;
  transition:border-color .15s ease,background .15s ease,transform .1s ease;
}
.mode-card:hover{transform:translateY(-1px);background:rgba(255,255,255,.055)}
.mode-card:active{transform:translateY(0)}
.mode-card:disabled{opacity:.55;cursor:wait;transform:none}
.mode-card.ranked{
  border-color:rgba(255,190,60,.55);
  background:linear-gradient(155deg,rgba(255,175,40,.16),rgba(255,130,20,.05));
  box-shadow:0 0 28px rgba(255,150,30,.1) inset;
}
.mode-card.practice{border-color:rgba(120,220,145,.25)}
.mode-tag{
  font-family:'Press Start 2P',monospace;font-size:6.5px;
  letter-spacing:.14em;color:#ffcf68;
}
.mode-card.practice .mode-tag{color:#8fe0a4}
.mode-price{
  font-family:'Bungee',system-ui,sans-serif;font-weight:400;
  font-size:27px;line-height:1;color:#fff1c8;
}
.mode-price small{font-family:'Press Start 2P',monospace;font-size:9px;letter-spacing:.08em;color:#e7b65c}
.mode-desc{font-size:10.5px;line-height:1.35;color:#b7a5c3;min-height:28px}
.mode-cta{
  margin-top:2px;font-family:'Press Start 2P',monospace;
  font-size:6.5px;letter-spacing:.08em;color:#ffd77a;
}
.mode-card.practice .mode-cta{color:#9fe6b0}
.ranked-status{
  min-height:16px;margin:8px 0 0;
  font-family:'Press Start 2P',monospace;font-size:7px;
  letter-spacing:.04em;line-height:1.6;color:#ffcf68;text-align:center;
}
.run-mode{
  margin-top:12px;font-family:'Press Start 2P',monospace;
  font-size:7px;letter-spacing:.08em;color:#9d8cab;
}
.pot-banner{
  display:grid;gap:3px;margin:18px 0 4px;padding:13px 16px;
  border-radius:14px;border:1px solid rgba(255,200,74,.28);
  background:linear-gradient(140deg,rgba(255,180,45,.13),rgba(80,30,80,.1));
  text-align:left;
}
.pot-label{font-family:'Press Start 2P',monospace;font-size:7px;letter-spacing:.12em;color:#e9b85b}
.pot-banner b{font-family:'Bungee',system-ui,sans-serif;font-weight:400;font-size:30px;line-height:1;color:#fff0c0;text-shadow:0 0 20px rgba(255,160,30,.25)}
.pot-meta{font-size:10.5px;color:#b7a5c3}

/* ---- live pot on the start screen ----------------------------------- */
.live-pot{
  margin:14px 0 0;padding:11px 14px;border-radius:14px;
  border:1px solid rgba(255,200,74,.28);
  background:linear-gradient(135deg,rgba(255,180,45,.12),rgba(80,30,80,.08));
  text-align:left;
}
.live-pot-head{display:flex;align-items:center;gap:7px;min-width:0}
.live-dot{
  width:7px;height:7px;border-radius:50%;background:#8fe06a;
  box-shadow:0 0 0 0 rgba(143,224,106,.5);
  animation:live-pulse 1.8s ease-out infinite;
  flex:0 0 auto;
}
@keyframes live-pulse{
  0%{box-shadow:0 0 0 0 rgba(143,224,106,.5)}
  70%{box-shadow:0 0 0 7px rgba(143,224,106,0)}
  100%{box-shadow:0 0 0 0 rgba(143,224,106,0)}
}
.live-pot-runs{
  margin-left:auto;font-family:'Press Start 2P',monospace;
  font-size:6px;letter-spacing:.05em;color:#c7ac7c;white-space:nowrap;
}
.live-pot-main{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:3px}
.live-pot-main b{
  font-family:'Bungee',system-ui,sans-serif;font-weight:400;
  font-size:26px;line-height:1;color:#fff0c0;
  text-shadow:0 0 20px rgba(255,160,30,.24);
}
.live-pot-note{font-size:10px;line-height:1.35;color:#b7a5c3;text-align:right}
.live-pot-note .dim{color:#8d7c9b}
.season-line{
  display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;
  margin-top:8px;padding-top:8px;border-top:1px solid rgba(255,200,74,.16);
  font-family:'Press Start 2P',monospace;font-size:6px;line-height:1.7;
  letter-spacing:.05em;color:#d8b879;
}
.season-line b{font-weight:400;color:#8fe06a}

@media (max-width:620px){
  .mode-select{grid-template-columns:1fr;gap:8px;margin-top:12px}
  .mode-card{padding:11px 13px 10px}
  .mode-price{font-size:23px}
  .mode-desc{min-height:0}
  .pot-banner{padding:11px 13px}
  .pot-banner b{font-size:25px}
}
