:root {
  --bg-main: #f5fbf3;
  --bg-soft: #e9f6e5;
  --surface: #ffffff;
  --surface-warm: #fffdf7;
  --primary: #27965c;
  --primary-dark: #1d7546;
  --primary-light: #dcfce7;
  --accent: #ff824d;
  --accent-dark: #e0632e;
  --gold: #f59e0b;
  --gold-light: #fef3c7;
  --ink: #1f352b;
  --ink-muted: #5b7367;
  --border: #d5ead0;
  --radius-xl: 26px;
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at 15% 10%, #e7f8e2 0%, #f5fbf3 45%, #fffaf0 100%);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 900;
}

/* Top Navigation Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.brand-logo {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(39, 150, 92, 0.2));
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}

.brand-domain {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.rank-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--gold-light);
  border: 2px solid #fcd34d;
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.rank-pill:hover {
  transform: translateY(-2px);
}

.rank-badge-lv {
  background: var(--gold);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
}

.rank-pill-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rank-pill-title {
  font-size: 13px;
  font-weight: 800;
  color: #92400e;
}

.rank-xp-bar {
  width: 96px;
  height: 6px;
  background: rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  overflow: hidden;
}

.rank-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fb923c);
  border-radius: 999px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stat-chip {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.stat-chip:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.btn-toy {
  border: none;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-toy-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 0 var(--primary-dark);
}

.btn-toy-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--primary-dark);
}

.btn-toy-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--primary-dark);
}

.btn-toy-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 0 var(--accent-dark);
}

.btn-toy-accent:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 var(--accent-dark);
}

.btn-toy-accent:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--accent-dark);
}

.btn-toy-outline {
  background: #fff;
  color: var(--ink);
  border: 2px solid var(--border);
  box-shadow: 0 3px 0 #c7e2c0;
}

.btn-toy-outline:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #c7e2c0;
}

/* Main Container */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 18px 48px;
}

/* Hero Banner on Home Map */
.hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #eefaf0 65%, #fef7e6 100%);
  border: 3px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px 28px;
  display: grid;
  grid-template-columns: 175px 1fr auto;
  align-items: center;
  gap: 24px;
  box-shadow: 0 12px 28px rgba(39, 150, 92, 0.08);
  margin-bottom: 26px;
}

.hero-mascot-wrap {
  width: 165px;
  height: 165px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mascot-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: mascotBreathe 3.2s ease-in-out infinite;
}

.mascot-svg.mood-cheer {
  animation: mascotJump 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mascot-svg.mood-oops {
  animation: mascotShake 0.36s ease-in-out;
}

@keyframes mascotBreathe {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

@keyframes mascotJump {
  0% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-18px) scale(1.08); }
  75% { transform: translateY(2px) scale(0.97); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes mascotShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px) rotate(-3deg); }
  75% { transform: translateX(6px) rotate(3deg); }
}

.hero-greeting {
  font-size: 26px;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: 6px;
}

.hero-sub {
  font-size: 15px;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-bottom: 14px;
}

.hero-progress-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-xp-track {
  flex: 1;
  min-width: 200px;
  max-width: 360px;
  height: 16px;
  background: #e2f2de;
  border-radius: 999px;
  padding: 2px;
  overflow: hidden;
}

.hero-xp-bar {
  height: 100%;
  background: linear-gradient(90deg, #27965c, #4ade80);
  border-radius: 999px;
  transition: width 0.45s ease;
}

.hero-xp-label {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-dark);
}

.guest-save-banner {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff7ed;
  border: 1.5px dashed #fb923c;
  color: #9a3412;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

/* World Cards Grid */
.worlds-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.world-section {
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 22px;
  box-shadow: 0 8px 20px rgba(31, 53, 43, 0.04);
}

.world-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.world-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.world-icon {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--bg-soft);
}

.world-title {
  font-size: 20px;
  font-weight: 900;
}

.world-desc {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

.age-pill {
  font-size: 12px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  color: #fff;
}

.stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px;
}

.stage-card {
  background: var(--surface-warm);
  border: 2px solid #e4f0e0;
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  text-align: left;
}

.stage-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 8px 16px rgba(39, 150, 92, 0.12);
}

.stage-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.stage-name {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
}

.stage-sub {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 3px;
  line-height: 1.4;
}

.stage-stars {
  font-size: 16px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.stage-meta-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
}

/* Practice Arena View */
.hidden {
  display: none !important;
}

.arena-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.mode-switch {
  display: inline-flex;
  background: #e6f4e2;
  padding: 4px;
  border-radius: 999px;
  border: 2px solid var(--border);
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(39, 150, 92, 0.28);
}

.arena-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 18px;
  align-items: stretch;
}

.coach-panel {
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: center;
}

.coach-mascot-box {
  width: 138px;
  height: 138px;
}

.coach-bubble {
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1.45;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.live-metrics {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.metric-box {
  background: var(--surface-warm);
  border: 1.5px solid #e5efe2;
  border-radius: 12px;
  padding: 8px 6px;
}

.metric-label {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 700;
}

.metric-val {
  font-size: 19px;
  font-weight: 900;
  color: var(--ink);
  margin-top: 2px;
}

.metric-val.combo-hot {
  color: var(--accent);
  transform: scale(1.08);
}

/* Typing Stage Card */
.stage-arena-card {
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 300px;
  box-shadow: 0 10px 26px rgba(39, 150, 92, 0.06);
}

.round-dots {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}

.round-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e2eee0;
  transition: all 0.25s ease;
}

.round-dot.done {
  background: var(--primary);
  transform: scale(1.1);
}

.round-dot.current {
  background: var(--accent);
  width: 24px;
  border-radius: 999px;
}

.prompt-emoji {
  font-size: 48px;
  line-height: 1.1;
  margin: 4px 0;
  animation: gentleBob 2.4s ease-in-out infinite;
}

@keyframes gentleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.prompt-hint {
  font-size: 14px;
  color: var(--ink-muted);
  font-weight: 700;
  margin-bottom: 10px;
}

.hanzi-cards-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  margin: 6px 0 12px;
}

.char-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  border-radius: 18px;
  border: 2.5px solid #e4efe2;
  background: #fafdf9;
  min-width: 72px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.char-unit.done {
  border-color: #4ade80;
  background: #ecfdf5;
  color: #15803d;
}

.char-unit.active {
  border-color: var(--accent);
  background: #fff7ed;
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 8px 18px rgba(255, 130, 77, 0.18);
}

.char-pinyin {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 0.5px;
}

.char-glyph {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.15;
}

.pinyin-slots {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.py-slot {
  width: 30px;
  height: 34px;
  border-radius: 9px;
  border: 2px solid #cbd5e1;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 900;
  color: #94a3b8;
  text-transform: lowercase;
}

.py-slot.typed {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.py-slot.next {
  border-color: var(--accent);
  color: var(--accent);
  background: #fff7ed;
  animation: slotPulse 1.1s ease-in-out infinite;
}

@keyframes slotPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Built-in Cute Virtual IME Candidate Picker */
.candidate-bar {
  margin-top: 10px;
  background: linear-gradient(90deg, #fffbeb, #fef3c7);
  border: 2.5px solid #fbbf24;
  border-radius: 18px;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.16);
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.cand-tip {
  font-size: 13px;
  font-weight: 800;
  color: #92400e;
}

.cand-btn {
  border: 2px solid #fde68a;
  background: #fff;
  border-radius: 12px;
  padding: 6px 13px;
  font-size: 20px;
  font-weight: 900;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: transform 0.12s ease, background 0.12s ease;
}

.cand-btn:hover,
.cand-btn.first-cand {
  border-color: var(--accent);
  background: #fff7ed;
}

.cand-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent-dark);
  background: #ffedd5;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* System IME Input Box */
.ime-input-wrap {
  width: 100%;
  max-width: 520px;
  margin-top: 10px;
  text-align: center;
}

.ime-input {
  width: 100%;
  padding: 12px 18px;
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  border-radius: 16px;
  border: 3px solid var(--primary);
  background: #f8fafc;
  color: var(--ink);
  outline: none;
}

.ime-input:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 130, 77, 0.18);
}

/* Floating Score Popups */
.floating-pop {
  position: fixed;
  pointer-events: none;
  font-weight: 900;
  font-size: 22px;
  color: var(--accent);
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.95);
  z-index: 950;
  animation: floatUpFade 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes floatUpFade {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.8); }
  40% { opacity: 1; transform: translate(-50%, -34px) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -68px) scale(0.95); }
}

/* Virtual Keyboard & Finger Guide */
.keyboard-panel {
  margin-top: 16px;
  background: var(--surface);
  border: 2.5px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
}

.finger-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.finger-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
}

.kb-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.kb-row {
  display: flex;
  gap: 7px;
  justify-content: center;
}

.kb-key {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  background: #f8fafc;
  border: 2px solid #dbe7d8;
  box-shadow: 0 4px 0 #cbdcd0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  position: relative;
  transition: transform 0.08s ease, background 0.12s ease;
  cursor: pointer;
}

.kb-key.space-key {
  width: 270px;
  font-size: 14px;
}

.kb-key.home-bump::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 14px;
  height: 3px;
  border-radius: 2px;
  background: #64748b;
}

.kb-key.target-key {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-dark);
  box-shadow: 0 4px 0 var(--accent-dark), 0 0 0 4px rgba(255, 130, 77, 0.26);
  animation: keyGlow 1s ease-in-out infinite;
}

.kb-key.target-key::after {
  background: #fff;
}

.kb-key:active,
.kb-key.pressed {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #cbdcd0;
}

@keyframes keyGlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Modals (Account, Stage Clear, Rank-Up Promotion, Badges, Leaderboard) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 38, 29, 0.55);
  backdrop-filter: blur(5px);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  background: var(--surface);
  border: 3px solid var(--border);
  border-radius: 28px;
  max-width: 500px;
  width: 100%;
  padding: 26px 28px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  animation: popIn 0.26s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-card.promo-card {
  background: radial-gradient(circle at 50% 25%, #fffbeb 0%, #ffffff 70%);
  border-color: #fbbf24;
  max-width: 540px;
}

.close-x {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  color: var(--ink-muted);
}

.big-stars-row {
  font-size: 50px;
  margin: 10px 0;
  letter-spacing: 8px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 20px;
}

.result-item {
  background: var(--bg-main);
  border-radius: 14px;
  padding: 10px;
}

.result-item .lbl {
  font-size: 12px;
  color: var(--ink-muted);
  font-weight: 700;
}

.result-item .val {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary-dark);
  margin-top: 2px;
}

/* Account Form & Avatar Picker */
.auth-tabs {
  display: flex;
  background: #eef6ec;
  border-radius: 999px;
  padding: 4px;
  margin: 12px 0 16px;
}

.auth-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink-muted);
}

.auth-tab.active {
  background: var(--primary);
  color: #fff;
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0 16px;
}

.avatar-option {
  border: 2px solid #e2eee0;
  background: #fafdf9;
  border-radius: 14px;
  padding: 8px 4px;
  cursor: pointer;
  font-size: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.avatar-option span {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-muted);
}

.avatar-option.selected {
  border-color: var(--accent);
  background: #fff7ed;
  transform: scale(1.04);
}

.field-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid #cfe3ca;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  outline: none;
}

.field-input:focus {
  border-color: var(--primary);
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}

.pin-btn {
  border: 1.5px solid #d8ead3;
  background: #f8fcf6;
  border-radius: 10px;
  padding: 8px 0;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.pin-btn:active {
  background: var(--primary-light);
}

.error-msg {
  color: #dc2626;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  min-height: 18px;
}

.badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  text-align: left;
}

.badge-item {
  border: 2px solid #e5efe2;
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0.45;
  filter: grayscale(1);
}

.badge-item.unlocked {
  opacity: 1;
  filter: none;
  background: #fffbeb;
  border-color: #fcd34d;
}

.leader-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid #edf5eb;
  font-weight: 700;
}

@media (max-width: 820px) {
  .hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .arena-layout {
    grid-template-columns: 1fr;
  }
  .kb-key {
    width: 34px;
    height: 40px;
    font-size: 14px;
  }
  .kb-key.space-key {
    width: 180px;
  }
}
