@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@600;700;800;900&display=swap');

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #0c1524;
  color: #fffdf2;
  font-family: 'Fredoka', cursive, system-ui, sans-serif;
  user-select: none;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

main {
  max-width: 480px;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 8px 12px max(10px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  position: relative;
}

/* Screen Sections */
#home, #waiting, #result {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
}

#game {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 6px;
}

/* Hide top header during battle to give track 100% full mobile screen */
body[data-screen="game"] header,
body.in-game header,
body:has(#game:not([hidden])) header {
  display: none !important;
}

/* Header */
header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 3px solid #1e2d42;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.header-balances {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.bal-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #162438;
  border: 2px solid #1e272e;
  border-radius: 12px;
  padding: 4px 8px;
  cursor: pointer;
}

.bal-pill b {
  font-size: 12px;
  font-weight: 900;
  color: #fff;
}

.bal-pill .plus-icon {
  background: #2ed573;
  color: #fff;
  width: 14px;
  height: 14px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
  margin-left: 2px;
}

.vip-pill {
  background: #ffd32a;
  border-color: #1e272e;
}

.crate-pill {
  background: #2e1f5e;
  border-color: #a78bfa;
}

.vip-pill span {
  font-size: 11px;
  font-weight: 900;
  color: #1e272e;
}

/* Win Milestone Track Card */
.milestone-track-card {
  background: #1b2838;
  border: 2.5px solid #ffd32a;
  border-radius: 16px;
  padding: 10px 14px;
  margin: 10px 0;
  box-shadow: 0 4px 0 #1e272e;
}

.milestone-track-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 900;
  color: #ffd32a;
  margin-bottom: 6px;
}

.milestone-track-header span {
  color: #fff;
}

.milestone-progress-bar {
  height: 10px;
  background: #0c1524;
  border-radius: 5px;
  border: 1.5px solid #1e272e;
  overflow: hidden;
  margin-bottom: 4px;
}

.milestone-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2ed573, #10ac84);
  transition: width 0.3s ease;
}

.milestone-track-card small {
  font-size: 10px;
  color: #ced6e0;
  font-weight: 700;
}

/* Gateway & Exchange Dialogs */
.mock-status-pill {
  background: #e3faf0;
  border: 1.5px solid #2ed573;
  border-radius: 8px;
  padding: 4px 10px;
  color: #20bf6b;
  font-size: 10px;
  font-weight: 900;
  margin: 8px 0;
  display: inline-block;
}

.gateway-packs, .exchange-tiers, .skins-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}

.gateway-pack-row, .exchange-tier-row, .skin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8f9fa;
  border: 2px solid #1e272e;
  border-radius: 12px;
  padding: 8px 12px;
  color: #1e272e;
}

.pay-btn, .exchange-btn, .skin-btn {
  background: #2ed573;
  color: #fff;
  border: 2px solid #1e272e;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 0 #1e272e;
}

.pay-btn:active, .exchange-btn:active, .skin-btn:active {
  transform: translateY(2px);
  box-shadow: none;
}

.skin-btn.active {
  background: #ffd32a;
  color: #1e272e;
}

.result-milestone {
  background: #ffd32a;
  border: 3px solid #1e272e;
  border-radius: 16px;
  padding: 12px;
  margin: 12px 0;
  color: #1e272e;
  text-align: center;
  animation: bounceHint 1.2s infinite;
}

.milestone-crown-banner {
  font-size: 24px;
}

.brand-badge {
  background: #ffd32a;
  border: 3px solid #1e272e;
  border-radius: 12px;
  padding: 5px 10px;
  transform: rotate(-3deg);
  box-shadow: 2px 3px 0 #1e272e;
}

.brand-text {
  font-size: 17px;
  font-weight: 900;
  color: #1e272e;
}

.game-title {
  font-size: 19px;
  font-weight: 900;
  color: #ffd32a;
  letter-spacing: 1px;
}

.comic-sound-btn {
  margin-left: auto;
  background: #1e2d42;
  border: 2px solid #34495e;
  color: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

/* Comic Badge */
.comic-badge {
  display: inline-block;
  background: #ffd32a;
  border: 2.5px solid #1e272e;
  color: #1e272e;
  border-radius: 10px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  box-shadow: 2px 3px 0 #1e272e;
  margin-bottom: 8px;
}

/* Titles */
h1.main-title {
  font-size: 38px;
  line-height: 1.05;
  font-weight: 900;
  color: #fffdf2;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.highlight {
  color: #ffd32a;
}

.tagline {
  color: #a4b0be;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 16px;
}

/* Hero Arena (Comic Clashing Cars) */
.hero-arena {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 150px;
  background: #fffdf2;
  border: 3.5px solid #1e272e;
  border-radius: 20px;
  margin: 12px 0 16px;
  box-shadow: 3px 5px 0 #1e272e;
  position: relative;
  overflow: hidden;
}

.hero-car {
  width: 58px;
  height: 98px;
  border-radius: 16px;
  border: 3px solid #1e272e;
  position: relative;
  box-shadow: 0 4px 0 #1e272e;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-car.blue {
  background: #0fbcf9;
  transform: rotate(20deg);
  animation: carBobLeft 1.4s ease-in-out infinite alternate;
}

.hero-car.red {
  background: #ff4757;
  transform: rotate(-160deg);
  animation: carBobRight 1.4s ease-in-out infinite alternate;
}

@keyframes carBobLeft {
  0% { transform: rotate(16deg) translateY(0); }
  100% { transform: rotate(24deg) translateY(-6px); }
}

@keyframes carBobRight {
  0% { transform: rotate(-156deg) translateY(0); }
  100% { transform: rotate(-164deg) translateY(6px); }
}

.car-eyes {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.eye {
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #1e272e;
  border-radius: 50%;
  position: relative;
}

.eye::after {
  content: '';
  position: absolute;
  width: 5px;
  height: 5px;
  background: #1e272e;
  border-radius: 50%;
  top: 1px;
  left: 2px;
}

.car-stripe {
  width: 6px;
  height: 55px;
  background: #ffffff;
  border-radius: 3px;
  margin-top: 6px;
}

.clash-bubble {
  background: #ffd32a;
  border: 3px solid #1e272e;
  border-radius: 14px;
  padding: 8px 14px;
  font-size: 20px;
  font-weight: 900;
  color: #1e272e;
  box-shadow: 2px 3px 0 #1e272e;
  transform: rotate(-5deg);
  z-index: 2;
  animation: pulse 1s infinite alternate;
}

@keyframes pulse {
  0% { transform: rotate(-5deg) scale(0.95); }
  100% { transform: rotate(-3deg) scale(1.1); }
}

/* 3D Tactile Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: 3px solid #1e272e;
  border-radius: 16px;
  font-weight: 900;
  font-size: 16px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

button:active {
  transform: translateY(3px) !important;
  box-shadow: 0 1px 0 #1e272e !important;
}

.primary {
  width: 100%;
  background: #2ed573;
  color: #fff;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 5px 0 #1e272e;
  letter-spacing: 0.8px;
  margin-bottom: 10px;
}

.secondary {
  width: 100%;
  background: #3867d6;
  color: #fff;
  padding: 14px 20px;
  box-shadow: 0 4px 0 #1e272e;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
}

/* Friends Box */
.friends-box {
  background: #fffdf2;
  border: 3px solid #1e272e;
  border-radius: 18px;
  padding: 14px;
  box-shadow: 3px 4px 0 #1e272e;
  margin-bottom: 12px;
}

.friends-box h2 {
  font-size: 13px;
  font-weight: 900;
  color: #1e272e;
  margin-bottom: 8px;
}

.ghost-btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: #3867d6;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 0;
  box-shadow: none;
}

.join-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

input {
  flex: 1;
  background: #dfe4ea;
  border: 2.5px solid #1e272e;
  border-radius: 12px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 900;
  color: #1e272e;
  letter-spacing: 2px;
  outline: none;
}

.join-btn {
  background: #ffd32a;
  color: #1e272e;
  padding: 10px 18px;
  box-shadow: 0 3px 0 #1e272e;
}

.hint {
  text-align: center;
  font-size: 12px;
  color: #a4b0be;
  font-weight: 700;
  margin: 10px 0;
}

.shop-link {
  background: transparent;
  border: none;
  color: #ffd32a;
  font-size: 13px;
  font-weight: 800;
  width: 100%;
  text-align: center;
  padding: 6px;
  box-shadow: none;
}

/* Game Scoreboard */
.comic-scoreboard {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fffdf2;
  border: 3px solid #1e272e;
  border-radius: 16px;
  padding: 6px 12px;
  box-shadow: 2px 3px 0 #1e272e;
  flex-shrink: 0;
}

.game-sound-btn {
  background: #ffd32a;
  border: 2px solid #1e272e;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 0 #1e272e;
  margin-left: 4px;
}

.racer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90px;
}

.racer-box.danger {
  animation: dangerPulse 0.8s infinite alternate ease-in-out;
}

@keyframes dangerPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); filter: drop-shadow(0 0 8px #ff4757); }
}

.racer-tag {
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1.5px solid #1e272e;
}

.rival .racer-tag { background: #ff4757; }
.you .racer-tag { background: #0284c7; }
.you.danger .racer-tag { background: #e74c3c; animation: flashTag 0.5s infinite alternate; }

@keyframes flashTag {
  0% { background: #e74c3c; }
  100% { background: #c0392b; }
}

.hp-num {
  font-size: 22px;
  font-weight: 900;
  margin-top: 1px;
}

.hp-num.red { color: #e11d48; }
.hp-num.blue { color: #0284c7; }
.you.danger .hp-num.blue { color: #ff4757; }

.mini-bar {
  width: 100%;
  height: 6px;
  background: #dcdde1;
  border: 1px solid #1e272e;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2px;
}

.mini-bar-fill {
  height: 100%;
  transition: width 0.25s ease;
}

.mini-bar-fill.red {
  background: linear-gradient(90deg, #ff4757, #ff6b81);
}

.mini-bar-fill.blue {
  background: linear-gradient(90deg, #0fbcf9, #4bcffa);
}

.match-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.clock {
  font-size: 18px;
  font-weight: 900;
  color: #1e272e;
}

.pot-badge {
  background: #ffd32a;
  border: 1.5px solid #1e272e;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 900;
  color: #1e272e;
  margin-top: 2px;
}

/* Track Wrapper & Canvas - Fills 100% Mobile Height */
.track-wrapper {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 280px;
  position: relative;
  display: flex;
}

canvas {
  flex: 1;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 18px;
  border: 3.5px solid #1e272e;
  box-shadow: 0 4px 0 #1e272e;
  touch-action: none;
}

/* Royal Pass VIP Gold Track Aura */
body.royal-theme .track-wrapper canvas {
  border-color: #ffd32a !important;
  box-shadow: 0 0 24px rgba(255, 211, 42, 0.55), 0 4px 0 #1e272e !important;
}

.royal-track-crowns {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

body.royal-theme .royal-track-crowns {
  display: block;
}

.royal-sparkle {
  position: absolute;
  font-size: 20px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
  animation: floatCrown 2.4s infinite ease-in-out;
}

.sp-1 { top: 8px; left: 10px; }
.sp-2 { top: 8px; right: 10px; animation-delay: 0.6s; }
.sp-3 { bottom: 50px; left: 10px; animation-delay: 1.2s; }
.sp-4 { bottom: 50px; right: 10px; animation-delay: 1.8s; }

@keyframes floatCrown {
  0% { transform: translateY(0) scale(1) rotate(-5deg); }
  50% { transform: translateY(-8px) scale(1.15) rotate(5deg); }
  100% { transform: translateY(0) scale(1) rotate(-5deg); }
}

/* 10-Cell Turbo Energy Battery */
.energy-panel {
  margin: 2px 0;
  flex-shrink: 0;
}

.energy-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 900;
  color: #ffd32a;
  margin-bottom: 2px;
}

.energy-cells {
  display: flex;
  gap: 3px;
  height: 13px;
  background: #0f1929;
  padding: 2px;
  border-radius: 6px;
  border: 2px solid #1e272e;
}

.energy-cells .cell {
  flex: 1;
  background: #1e2d42;
  border-radius: 3px;
  transition: all 0.2s ease;
}

.energy-cells .cell.active {
  background: linear-gradient(180deg, #ffd32a 0%, #ff9f43 100%);
  box-shadow: 0 0 6px rgba(255, 211, 42, 0.6);
}

.energy-cells .cell.ready-pulse {
  animation: cellPulse 0.9s infinite alternate;
}

@keyframes cellPulse {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.35) drop-shadow(0 0 4px #ffd32a); }
}

/* Next Card */
.next-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #ffffff 0%, #fffdf2 100%);
  border: 3px solid #1e272e;
  border-radius: 14px;
  padding: 6px 12px;
  box-shadow: 0 3px 0 #1e272e;
  flex-shrink: 0;
}

.next-icon-bubble {
  font-size: 26px;
  width: 44px;
  height: 44px;
  background: #ffd32a;
  border: 2px solid #1e272e;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.next-meta {
  display: flex;
  flex-direction: column;
}

.ready-badge {
  font-size: 8px;
  font-weight: 900;
  color: #1e272e;
  background: #ffd32a;
  border: 1px solid #1e272e;
  padding: 1px 5px;
  border-radius: 4px;
  width: fit-content;
}

.next-meta b {
  font-size: 14px;
  font-weight: 900;
  color: #1e272e;
}

.next-meta span {
  font-size: 11px;
  font-weight: 800;
  color: #c2410c;
}

.tap-hint {
  margin-left: auto;
  font-size: 10px;
  font-weight: 900;
  color: #fff;
  background: #2ed573;
  border: 1.5px solid #1e272e;
  border-radius: 8px;
  padding: 3px 8px;
  box-shadow: 0 2px 0 #1e272e;
  animation: bounceHint 1.2s infinite ease-in-out;
}

@keyframes bounceHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.game-footer {
  display: flex;
  justify-content: center;
  flex-shrink: 0;
  padding-bottom: 2px;
}

.exit {
  background: #e74c3c;
  color: #fff;
  padding: 5px 18px;
  font-size: 11px;
  font-weight: 900;
  border: 2px solid #1e272e;
  border-radius: 20px;
  box-shadow: 0 2px 0 #1e272e;
  cursor: pointer;
  display: block;
}

/* Waiting Spinner */
.spinner-box {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 36px auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 100px;
  height: 100px;
  border: 6px solid #2f414c;
  border-top-color: #ffd32a;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-car {
  position: absolute;
  font-size: 34px;
  animation: bounce 0.8s infinite alternate;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bounce { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }

/* Toast */
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffd32a;
  color: #1e272e;
  border: 3px solid #1e272e;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 900;
  display: none;
  z-index: 100;
  box-shadow: 2px 4px 0 #1e272e;
}
body.in-game #toast {
  bottom: 132px;
}

/* Dialog */
dialog {
  background: #fffdf2;
  color: #1e272e;
  border: 4px solid #1e272e;
  border-radius: 22px;
  max-width: 360px;
  padding: 24px;
  box-shadow: 4px 6px 0 #1e272e;
  margin: auto;
}

dialog::backdrop {
  background: #000c;
}

.close {
  float: right;
  background: #ff4757;
  color: #fff;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 14px;
  border: 2px solid #1e272e;
}

/* Royal Pass VIP Banner */
.royal-pass-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffd32a;
  border: 3.5px solid #1e272e;
  border-radius: 18px;
  padding: 12px 14px;
  margin-bottom: 12px;
  box-shadow: 3px 5px 0 #1e272e;
}

.royal-pass-banner.active {
  background: #fffdf2;
  border-color: #ffd32a;
}

.crown-icon {
  font-size: 32px;
  animation: crownWiggle 1.5s infinite alternate ease-in-out;
}

@keyframes crownWiggle {
  0% { transform: rotate(-8deg) scale(0.95); }
  100% { transform: rotate(8deg) scale(1.08); }
}

.royal-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.royal-meta b {
  font-size: 15px;
  font-weight: 900;
  color: #1e272e;
}

.royal-meta small {
  font-size: 11px;
  font-weight: 700;
  color: #57606f;
}

.royal-btn {
  background: #2ed573;
  color: #fff;
  border: 2.5px solid #1e272e;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 3px 0 #1e272e;
}

/* Animated Royal Theme for VIP */
body.royal-theme main {
  border: 4px solid #ffd32a;
  box-shadow: 0 0 25px #ffd32a55;
  animation: royalShimmer 2.5s infinite alternate ease-in-out;
  position: relative;
}

@keyframes royalShimmer {
  0% { border-color: #ffd32a; box-shadow: 0 0 15px #ffd32a44; }
  100% { border-color: #ff9f43; box-shadow: 0 0 35px #ffd32a88; }
}

.racer-box.danger {
  border: 2px solid #ff4757;
  border-radius: 10px;
  animation: dangerPulse 0.5s infinite alternate ease-in-out;
}

@keyframes dangerPulse {
  0% { background: #fffdf2; }
  100% { background: #ffeae8; }
}

[hidden] {
  display: none !important;
}

.quick-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.stake-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.stake-label {
  font-size: 11px;
  font-weight: 900;
  color: #cbd5e1;
  letter-spacing: 0.6px;
}

.stake-chip {
  flex: 1;
  background: #1e293b;
  color: #cbd5e1;
  border: 2px solid #334155;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 0 #0f172a;
}

.stake-chip.active {
  background: #ffd32a;
  color: #1e272e;
  border-color: #1e272e;
}

.btn-ad {
  background: #f59e0b !important;
  color: #1e272e !important;
  border: 2.5px solid #1e272e !important;
  box-shadow: 0 3px 0 #1e272e !important;
  border-radius: 12px;
}

.btn-ad:disabled,
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rules-list {
  text-align: left;
  padding-left: 18px;
  margin: 10px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #1e272e;
}

.ad-progress-track {
  width: 100%;
  height: 12px;
  background: #dfe4ea;
  border: 2px solid #1e272e;
  border-radius: 8px;
  overflow: hidden;
  margin: 10px 0 14px;
}

.ad-progress-fill {
  height: 100%;
  background: #f59e0b;
  transition: width 0.25s linear;
}

button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 2px;
}

.store-tabs {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.store-tab {
  flex: 1;
  background: #dfe4ea;
  color: #1e272e;
  border: 2px solid #1e272e;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 900;
}

.store-tab.active {
  background: #0fbcf9;
  color: #fff;
}

.coach-banner {
  background: #ffd32a;
  color: #1e272e;
  border: 2.5px solid #1e272e;
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 6px;
}

.upcoming-queue {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #0284c7;
  margin-top: 2px;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 10px 0;
}

.p-stat {
  background: #f1f2f6;
  border: 2px solid #1e272e;
  border-radius: 10px;
  padding: 6px 4px;
  text-align: center;
}

.p-stat b {
  display: block;
  font-size: 15px;
  color: #1e272e;
}

.p-stat small {
  font-size: 10px;
  font-weight: 800;
  color: #57606f;
}

.recovery-box {
  background: #fff8db;
  border: 2px dashed #e67e22;
  border-radius: 12px;
  padding: 8px 10px;
  margin: 10px 0;
  text-align: center;
}

.recovery-code {
  display: inline-block;
  font-family: monospace;
  font-size: 15px;
  font-weight: 900;
  color: #1e272e;
  background: #fff;
  border: 1.5px solid #1e272e;
  border-radius: 6px;
  padding: 2px 8px;
  margin-top: 4px;
  user-select: all;
}

.inline-form-row {
  display: flex;
  gap: 6px;
  margin: 8px 0;
}

.inline-form-row input {
  min-width: 0;
  font-size: 13px;
  letter-spacing: 0.5px;
  padding: 8px 10px;
}

.inline-form-row button {
  padding: 8px 12px;
  font-size: 13px;
  background: #2ed573;
  color: #fff;
  box-shadow: 0 3px 0 #1e272e;
  white-space: nowrap;
}

.history-list {
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 12px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f1f2f6;
  border: 2px solid #1e272e;
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 12px;
}
