:root {
  color-scheme: dark;
  --ink: #ffffff;
  --muted: #b7d2f8;
  --outline: #07122b;
  --royal-hi: #3092ff;
  --royal-lo: #1254c8;
  --royal-base: #0a2d7a;
  --orange-hi: #ffd23f;
  --orange-lo: #ff7a00;
  --orange-base: #a83c00;
  --emerald-hi: #4cf082;
  --emerald-lo: #17b355;
  --emerald-base: #0b6b32;
  --purple-hi: #c86bff;
  --purple-lo: #8329e0;
  --purple-base: #4c118f;
  --gold-hi: #ffe45e;
  --gold-lo: #f4a418;
  --gold-base: #9c5800;
  --coral-hi: #ff7b72;
  --coral-lo: #e03744;
  --coral-base: #8a1522;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #071636;
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", system-ui, -apple-system, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

/* Chunky Royal Cartoon 3D outline text helper */
.cartoon-stroke,
.hud-score,
.result h2,
.btn-3d,
.combo-banner {
  text-shadow:
    0 2px 0 var(--outline),
    -1.2px -1.2px 0 var(--outline),
    1.2px -1.2px 0 var(--outline),
    -1.2px 1.2px 0 var(--outline),
    1.2px 1.2px 0 var(--outline);
}

/* Full-bleed responsive stage (100dvh, zero scroll on mobile & PC) */
.cabinet {
  width: 100%;
  height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 25%, #163d8a 0%, #071534 75%);
}

.frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0d2666;
}

@media (min-width: 960px) and (min-height: 640px) {
  .cabinet { padding: 14px; }
  .frame {
    max-width: 1120px;
    max-height: 820px;
    border-radius: 28px;
    border: 4px solid var(--outline);
    box-shadow: 0 10px 0 #050d20, 0 28px 80px rgba(0, 0, 0, 0.72);
  }
}

canvas#scene {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: pointer;
}

/* Universal Royal Cartoon 3D Button */
.btn-3d, button, select {
  font: inherit;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.btn-3d {
  position: relative;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 15px;
  border: 3px solid var(--outline);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  transition: transform 0.08s ease, box-shadow 0.08s ease, filter 0.12s ease;
}
.btn-3d::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 6px;
  right: 6px;
  height: 42%;
  border-radius: 10px 10px 18px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.04));
  pointer-events: none;
}
.btn-3d:active:not(:disabled) {
  transform: translateY(3px);
}
.btn-3d:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-3d:focus-visible, select:focus-visible {
  outline: 3px solid #ffe45e;
  outline-offset: 2px;
}

.btn-royal {
  background: linear-gradient(180deg, var(--royal-hi), var(--royal-lo));
  box-shadow: 0 4px 0 var(--royal-base), 0 6px 12px rgba(0, 0, 0, 0.45);
}
.btn-royal:active:not(:disabled) { box-shadow: 0 1px 0 var(--royal-base); }

.btn-orange {
  background: linear-gradient(180deg, var(--orange-hi), var(--orange-lo));
  box-shadow: 0 5px 0 var(--orange-base), 0 8px 18px rgba(255, 130, 0, 0.42);
}
.btn-orange:active:not(:disabled) { box-shadow: 0 2px 0 var(--orange-base); }

.btn-emerald {
  background: linear-gradient(180deg, var(--emerald-hi), var(--emerald-lo));
  box-shadow: 0 4px 0 var(--emerald-base), 0 6px 14px rgba(15, 175, 80, 0.35);
}
.btn-emerald:active:not(:disabled) { box-shadow: 0 1px 0 var(--emerald-base); }

.btn-purple {
  background: linear-gradient(180deg, var(--purple-hi), var(--purple-lo));
  box-shadow: 0 4px 0 var(--purple-base), 0 6px 14px rgba(130, 40, 224, 0.38);
}
.btn-purple:active:not(:disabled) { box-shadow: 0 1px 0 var(--purple-base); }

.btn-gold {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-lo));
  box-shadow: 0 4px 0 var(--gold-base), 0 6px 14px rgba(244, 164, 24, 0.38);
}
.btn-gold:active:not(:disabled) { box-shadow: 0 1px 0 var(--gold-base); }

.btn-coral {
  background: linear-gradient(180deg, var(--coral-hi), var(--coral-lo));
  box-shadow: 0 4px 0 var(--coral-base), 0 6px 14px rgba(224, 55, 68, 0.35);
}
.btn-coral:active:not(:disabled) { box-shadow: 0 1px 0 var(--coral-base); }

/* Floating Top Bar */
.top-bar {
  position: absolute;
  z-index: 4;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.top-left, .top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.mode-pill {
  min-height: 44px;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 0.94rem;
}
.mode-glyph {
  font-size: 1.08rem;
  line-height: 1;
}
.caret {
  font-size: 0.78rem;
  opacity: 0.9;
}
.compact-pill {
  min-height: 40px;
  padding: 5px 12px;
  font-size: 0.82rem;
}

.icon-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 14px;
}
.icon-btn svg {
  width: 21px;
  height: 21px;
  display: block;
  filter: drop-shadow(0 2px 0 rgba(7, 18, 43, 0.75));
}
#sound[aria-pressed="true"] .ico-sound-off,
#sound[aria-pressed="false"] .ico-sound-on { display: none; }
#music[aria-pressed="false"] { opacity: 0.65; }
#music[aria-pressed="true"] {
  background: linear-gradient(180deg, var(--emerald-hi), var(--emerald-lo));
  box-shadow: 0 4px 0 var(--emerald-base), 0 0 12px rgba(76, 240, 130, 0.45);
}
#pause[aria-pressed="true"] .ico-pause,
#pause[aria-pressed="false"] .ico-play { display: none; }

.menu-btn { overflow: visible; }
.lvl-dot {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe45e, #ff9900);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 2.5px solid var(--outline);
  box-shadow: 0 2px 0 var(--outline);
}

/* Chunky Center Score HUD */
.hud {
  position: absolute;
  z-index: 3;
  top: calc(max(12px, env(safe-area-inset-top)) + 52px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
  text-align: center;
}

.hud-score-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.hud-score {
  font-size: clamp(2.8rem, 9.5vw, 4.1rem);
  font-weight: 900;
  line-height: 0.94;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  text-shadow:
    0 5px 0 var(--outline),
    -2.5px -2.5px 0 var(--outline),
    2.5px -2.5px 0 var(--outline),
    -2.5px 2.5px 0 var(--outline),
    2.5px 2.5px 0 var(--outline),
    0 10px 22px rgba(0, 0, 0, 0.45);
  transition: transform 0.14s ease, color 0.14s ease;
}
.hud-score.is-best {
  color: #ffe45e;
  transform: scale(1.06);
}
@keyframes scorePop {
  0% { transform: scale(1); }
  35% { transform: scale(1.26); }
  100% { transform: scale(1); }
}
.hud-score.score-pop {
  animation: scorePop 0.28s cubic-bezier(0.2, 1.4, 0.4, 1);
}

.crown-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1b4ea8, #0e2c6b);
  border: 2.5px solid var(--outline);
  box-shadow: 0 3px 0 var(--outline);
  font-size: 0.88rem;
  font-weight: 900;
  color: #ffe45e;
  font-variant-numeric: tabular-nums;
}
.crown-ico { font-size: 0.95rem; }

.combo-banner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 16px;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffbe26, #ff6c00);
  border: 2.5px solid var(--outline);
  box-shadow: 0 3px 0 var(--outline), 0 6px 14px rgba(255, 118, 0, 0.45);
  font-size: 0.88rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #ffffff;
  transform: rotate(-2.5deg);
}

.hud-meta {
  display: inline-flex;
  align-items: center;
  padding: 2px 11px;
  border-radius: 999px;
  background: rgba(7, 18, 43, 0.56);
  border: 2px solid rgba(110, 200, 255, 0.35);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b7dcff;
  font-variant-numeric: tabular-nums;
}
.hud-meta em { font-style: normal; }
.hud-meta b { color: #ffffff; margin-left: 4px; }
.hud-meta .dot { margin: 0 6px; opacity: 0.65; }
.star-hud b { color: #ffe45e; }

.biome-banner {
  margin-top: 2px;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #b85cff, #6f22d4);
  border: 2.5px solid var(--outline);
  box-shadow: 0 3px 0 var(--outline), 0 0 16px rgba(184, 92, 255, 0.55);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ffffff;
  animation: scorePop 0.35s ease;
}

.ghost-status {
  margin-top: 2px;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1676a8, #0c446b);
  border: 2.5px solid var(--outline);
  box-shadow: 0 3px 0 var(--outline);
  font-size: 0.78rem;
  font-weight: 900;
  color: #d6fbff;
}

/* In-scene floating sign & hazard pill */
.sign {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 27%;
  transform: translateX(-50%);
  min-height: 1.5rem;
  font-size: clamp(1.15rem, 4.4vw, 1.55rem);
  font-weight: 900;
  color: #ffe45e;
  text-shadow:
    0 3px 0 var(--outline),
    -2px -2px 0 var(--outline),
    2px -2px 0 var(--outline),
    -2px 2px 0 var(--outline),
    2px 2px 0 var(--outline);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}

.hazard-status {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: calc(max(12px, env(safe-area-inset-top)) + 150px);
  transform: translateX(-50%);
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff7b54, #c9332b);
  border: 2.5px solid var(--outline);
  box-shadow: 0 3px 0 var(--outline);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  pointer-events: none;
  white-space: nowrap;
}

/* Bottom Controls: Cartoon 3D Power Meter + 3-Button Arcade Dock */
.bottom-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

.charge-dock {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.charge-frame {
  position: relative;
  width: 100%;
  padding: 5px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1b4696, #0c2459);
  border: 3px solid var(--outline);
  box-shadow: 0 4px 0 var(--outline), 0 8px 18px rgba(0, 0, 0, 0.45);
}

.charge {
  position: relative;
  height: 18px;
  border-radius: 10px;
  overflow: hidden;
  background: #081533;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.65);
}

#fill {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #42f57b 0%, #c8ff47 38%, #ffd23f 64%, #ff6b2b 100%);
  transform: scaleX(0);
  transform-origin: left;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.36);
}

.charge-ticks {
  position: absolute;
  z-index: 3;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent calc(20% - 2px),
    rgba(7, 18, 43, 0.55) calc(20% - 2px),
    rgba(7, 18, 43, 0.55) 20%
  );
  pointer-events: none;
}

.charge-star {
  position: absolute;
  z-index: 5;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff4a3, #ffb300);
  border: 3px solid var(--outline);
  box-shadow: 0 2px 0 var(--outline), 0 0 12px rgba(255, 224, 94, 0.75);
  color: #ffffff;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  text-shadow: 0 1px 0 var(--outline);
}

.band {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  pointer-events: none;
}
.band.safe {
  background: rgba(66, 245, 123, 0.28);
  border-inline: 2px solid rgba(120, 255, 175, 0.85);
}
.band.gold {
  z-index: 4;
  background: rgba(255, 232, 96, 0.55);
  border-inline: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(255, 230, 100, 0.85);
}

.tip {
  font-size: 0.84rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow:
    0 2px 0 var(--outline),
    -1.2px -1.2px 0 var(--outline),
    1.2px -1.2px 0 var(--outline),
    -1.2px 1.2px 0 var(--outline),
    1.2px 1.2px 0 var(--outline);
  letter-spacing: 0.02em;
}

/* Bottom 3-button Royal Cartoon Arcade Dock (auto-fades while jumping!) */
.arcade-dock {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 7px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(16, 46, 108, 0.92), rgba(8, 22, 58, 0.96));
  border: 3px solid var(--outline);
  box-shadow: 0 5px 0 var(--outline), 0 12px 24px rgba(0, 0, 0, 0.52);
  pointer-events: auto;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.arcade-dock.is-playing {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.dock-btn {
  position: relative;
  min-height: 58px;
  padding: 6px 6px 8px;
  flex-direction: column;
  gap: 2px;
  border-radius: 14px;
  font-size: 0.8rem;
  overflow: visible;
}
.mission-dot {
  position: absolute;
  top: -6px;
  right: -5px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ff6b6b, #d91c2f);
  border: 2.5px solid var(--outline);
  box-shadow: 0 2px 0 var(--outline);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  animation: dotBounce 0.9s infinite ease-in-out;
}
@keyframes dotBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.dock-ico {
  font-size: 1.25rem;
  line-height: 1;
}
.dock-ball {
  width: 28px;
  height: 28px;
  display: block;
}

.sr-jump {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* Royal Cartoon 3D Trophy Rematch Card (zero scroll) */
.overlay {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 14px max(16px, env(safe-area-inset-bottom));
  background: rgba(5, 13, 34, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.result {
  position: relative;
  width: min(100%, 380px);
  margin-top: 22px;
  background: linear-gradient(180deg, #2178f2 0%, #1049b8 58%, #0b348c 100%);
  border: 4px solid var(--outline);
  border-radius: 26px;
  padding: 40px 16px 16px;
  text-align: center;
  box-shadow:
    inset 0 4px 0 rgba(160, 224, 255, 0.5),
    0 8px 0 var(--outline),
    0 24px 60px rgba(0, 0, 0, 0.78);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.trophy-crest {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.55));
}

.result h2 {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #ffe45e;
  text-transform: uppercase;
  text-shadow:
    0 4px 0 var(--outline),
    -2px -2px 0 var(--outline),
    2px -2px 0 var(--outline),
    -2px 2px 0 var(--outline),
    2px 2px 0 var(--outline);
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.stat-tile {
  background: linear-gradient(180deg, #0b245e, #07173f);
  border: 3px solid var(--outline);
  border-radius: 14px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.5);
}
.stat-tile span {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #96c5ff;
}
.stat-tile strong {
  font-size: 1.35rem;
  font-weight: 900;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 var(--outline);
}
.stat-tile-xp strong { color: #ffe45e; }

.result-hint {
  margin: 0;
  padding: 8px 12px;
  border-radius: 13px;
  background: linear-gradient(180deg, #ffe866, #ffb923);
  border: 3px solid var(--outline);
  box-shadow: 0 3px 0 var(--outline);
  font-size: 0.88rem;
  font-weight: 900;
  color: #161d30;
  text-shadow: none;
}

.rematch-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.rematch-btn {
  flex: 1;
  min-height: 56px;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  border-radius: 16px;
}
.rematch-btn span:first-child { position: relative; z-index: 2; }
.rematch-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: rgba(255, 255, 255, 0.7);
  transform-origin: left;
  transform: scaleX(0);
}

.hold-btn {
  width: 56px;
  min-height: 56px;
  padding: 0;
  border-radius: 16px;
  font-size: 1.15rem;
}

.result-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.result-actions button {
  min-height: 46px;
  font-size: 0.9rem;
}
.result-actions button:only-child { grid-column: 1 / -1; }

#shareText {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 2.5px solid var(--outline);
  background: #081533;
  color: #ffffff;
  font-size: 0.82rem;
}

/* Off-stage Modal Sheets (Modes & Spotlight Wardrobe) */
.sheet-backdrop {
  position: absolute;
  z-index: 8;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px 12px max(12px, env(safe-area-inset-bottom));
  background: rgba(4, 11, 30, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
@media (min-width: 720px) {
  .sheet-backdrop { align-items: center; }
}

.sheet {
  width: min(100%, 440px);
  max-height: min(88dvh, 690px);
  overflow-y: auto;
  background: linear-gradient(180deg, #1b60d4 0%, #0e3588 100%);
  border: 4px solid var(--outline);
  border-radius: 24px;
  padding: 14px 14px 16px;
  box-shadow:
    inset 0 4px 0 rgba(160, 224, 255, 0.45),
    0 8px 0 var(--outline),
    0 24px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sheet-head h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 900;
  color: #ffe45e;
  text-shadow: 0 3px 0 var(--outline), -1.5px -1.5px 0 var(--outline), 1.5px -1.5px 0 var(--outline), -1.5px 1.5px 0 var(--outline), 1.5px 1.5px 0 var(--outline);
}
.sheet-close {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 13px;
  font-size: 1.02rem;
}

/* Color-coded Royal Cartoon Mode Cards */
.modes {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.mode-card {
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 3px solid var(--outline);
  cursor: pointer;
  transition: transform 0.08s ease;
}
.mode-card:active { transform: translateY(2px); }
.mc-royal {
  background: linear-gradient(135deg, #257bf0, #123e96);
  box-shadow: 0 4px 0 #092259;
}
.mc-storm {
  background: linear-gradient(135deg, #1698a8, #0b4f6c);
  box-shadow: 0 4px 0 #072c40;
}
.mc-coral {
  background: linear-gradient(135deg, #f2704a, #b83244);
  box-shadow: 0 4px 0 #6e1726;
}
.mc-emerald {
  background: linear-gradient(135deg, #28c76f, #117a47);
  box-shadow: 0 4px 0 #094a2b;
}
.mc-purple {
  background: linear-gradient(135deg, #9d50f5, #5e22a8);
  box-shadow: 0 4px 0 #371066;
}
.mode-card strong {
  font-size: 1rem;
  color: #ffffff;
  text-shadow: 0 2px 0 var(--outline);
}
.mode-card small {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
}
.mode-card[aria-pressed="true"] {
  border-color: #ffe45e;
  box-shadow: 0 4px 0 var(--outline), 0 0 18px rgba(255, 228, 94, 0.55);
}
.mode-tag {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ffe45e;
  color: #081229;
  font-size: 0.68rem;
  font-weight: 900;
  border: 2px solid var(--outline);
}

.course {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.course label { font-size: 0.84rem; font-weight: 800; color: #dbeaff; }
.course select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 13px;
  border: 3px solid var(--outline);
  background: #091d4a;
  color: #ffffff;
  font-weight: 800;
}

/* Spotlight Wardrobe & Stats Sheet Cards */
.sheet-card {
  background: linear-gradient(180deg, #0d2a69, #081942);
  border: 3px solid var(--outline);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.45);
}
.sheet-card h3 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 900;
  color: #ffe45e;
  text-shadow: 0 2px 0 var(--outline);
}

.spotlight-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 10px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 42%, rgba(74, 174, 255, 0.32), rgba(7, 18, 46, 0.85) 72%);
  border: 2.5px solid rgba(110, 195, 255, 0.28);
}
#spotlightCanvas {
  width: 148px;
  height: 118px;
  display: block;
}
.spotlight-name {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 2px 0 var(--outline);
}
.xp-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.xp-head strong { color: #ffe45e; font-size: 0.86rem; font-weight: 900; }
.xp-head label { color: #b7dcff; font-size: 0.8rem; font-weight: 800; }

#wardrobe progress {
  display: block;
  width: 100%;
  height: 12px;
  appearance: none;
  -webkit-appearance: none;
  border: 2.5px solid var(--outline);
  border-radius: 999px;
  background: #06122e;
  overflow: hidden;
}
#wardrobe progress::-webkit-progress-bar {
  background: #06122e;
  border-radius: 999px;
}
#wardrobe progress::-webkit-progress-value {
  background: linear-gradient(90deg, #ffe45e, #ff9900);
  border-radius: 999px;
}
#wardrobe progress::-moz-progress-bar {
  background: linear-gradient(90deg, #ffe45e, #ff9900);
  border-radius: 999px;
}

/* Chunky 4-column cartoon skin tiles */
.skin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.skin-chip {
  min-height: 76px;
  padding: 6px 3px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: linear-gradient(180deg, #174196, #0c255e);
  border: 3px solid var(--outline);
  box-shadow: 0 3px 0 var(--outline);
  cursor: pointer;
  text-align: center;
}
.skin-chip.r-rare { background: linear-gradient(180deg, #12627d, #092c44); }
.skin-chip.r-epic { background: linear-gradient(180deg, #6226a6, #2d1057); }
.skin-chip.r-legend {
  background: linear-gradient(180deg, #7d4c0e, #3d1f07);
  border-color: #c98b18;
}
.skin-chip[aria-checked="true"] {
  border-color: #ffe45e;
  box-shadow: 0 3px 0 var(--outline), 0 0 14px rgba(255, 228, 94, 0.7);
}
.skin-chip:disabled { opacity: 0.46; cursor: not-allowed; }
.skin-canvas {
  width: 38px;
  height: 38px;
  display: block;
}
.skin-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.skin-meta strong {
  font-size: 0.72rem;
  color: #ffffff;
  line-height: 1.1;
}
.skin-chip[aria-checked="true"] .skin-meta strong { color: #ffe45e; }
.skin-meta small {
  font-size: 0.62rem;
  font-weight: 800;
  color: #a9ceff;
}

.muted { margin: 0; font-size: 0.8rem; font-weight: 700; color: #b7d2f8; line-height: 1.4; }
.badges-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.badges-grid li {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: #071636;
  border: 2px solid rgba(130, 185, 255, 0.25);
  color: #9ec0ee;
}
.badges-grid li.earned {
  border-color: var(--outline);
  background: linear-gradient(180deg, #42f07e, #15a84c);
  color: #ffffff;
  box-shadow: 0 2px 0 var(--outline);
}

.wide-btn { width: 100%; }

.about {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #c5dfff;
}
.about a { color: #ffe45e; text-decoration: none; }
.about a:hover { text-decoration: underline; }

/* Online Leaderboard, Ghost Challenge & Daily Missions */
.rank-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.tab-btn { min-height: 44px; font-size: 0.9rem; opacity: 0.72; }
.tab-btn[aria-selected="true"] {
  opacity: 1;
  border-color: #ffe45e;
  box-shadow: 0 4px 0 var(--outline), 0 0 14px rgba(255, 228, 94, 0.45);
}

.nick-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nick-row label { font-size: 0.8rem; font-weight: 800; color: #b7dcff; white-space: nowrap; }
.nick-row input {
  flex: 1;
  min-width: 0;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: 11px;
  border: 2.5px solid var(--outline);
  background: #06122e;
  color: #ffffff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
}

.sub-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.sub-tabs-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.sub-tab {
  min-height: 36px;
  padding: 4px 6px;
  border-radius: 11px;
  border: 2.5px solid var(--outline);
  background: #091d4a;
  color: #b7dcff;
  font-size: 0.76rem;
  font-weight: 900;
  cursor: pointer;
}
.sub-tab[aria-pressed="true"] {
  background: linear-gradient(180deg, #3092ff, #1254c8);
  color: #ffffff;
  border-color: #ffe45e;
}

.board-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 290px;
  overflow-y: auto;
}
.board-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 13px;
  background: linear-gradient(180deg, #13357a, #0a1f4d);
  border: 2.5px solid var(--outline);
}
.board-row.top-1 { background: linear-gradient(180deg, #754a0c, #422605); border-color: #ffe45e; }
.board-rank {
  min-width: 28px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 900;
  color: #ffe45e;
}
.board-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.board-info strong {
  font-size: 0.86rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-info small { font-size: 0.72rem; font-weight: 700; color: #a9ceff; }
.board-val {
  font-size: 0.95rem;
  font-weight: 900;
  color: #ffe45e;
  font-variant-numeric: tabular-nums;
}
.ghost-challenge-btn {
  min-height: 34px;
  padding: 4px 9px;
  border-radius: 10px;
  font-size: 0.74rem;
}

.missions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mission-item {
  background: linear-gradient(180deg, #153982, #0b2050);
  border: 2.5px solid var(--outline);
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mission-item.is-ready {
  border-color: #ffe45e;
  box-shadow: 0 0 14px rgba(255, 228, 94, 0.35);
}
.mission-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mission-top strong { font-size: 0.86rem; color: #ffffff; }
.mission-top span { font-size: 0.76rem; font-weight: 900; color: #ffe45e; }
.mission-bar {
  height: 9px;
  border-radius: 999px;
  background: #06122e;
  border: 2px solid var(--outline);
  overflow: hidden;
}
.mission-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4cf082, #ffe45e);
}
.mission-claim { min-height: 38px; font-size: 0.84rem; width: 100%; }

/* Animated 3D Reward Chest Modal */
.chest-overlay { z-index: 12; }
.chest-card { padding-top: 20px; }
.chest-art {
  position: relative;
  display: grid;
  place-items: center;
  height: 108px;
}
.chest-rays {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 228, 94, 0.35) 0deg 18deg, transparent 18deg 36deg);
  animation: spinRays 8s linear infinite;
}
@keyframes spinRays { to { transform: rotate(360deg); } }
.chest-art svg { position: relative; z-index: 2; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.5)); }
.chest-art .chest-lid {
  transform-origin: 60px 44px;
  animation: chestPop 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) forwards;
}
@keyframes chestPop {
  0% { transform: translateY(0) rotate(0deg); }
  35% { transform: translateY(-4px) rotate(-6deg); }
  70% { transform: translateY(-16px) rotate(-18deg); }
  100% { transform: translateY(-13px) rotate(-14deg); }
}
.chest-reward {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 3px 0 var(--outline);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Privacy standalone page support */
.privacy {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 18px;
  height: auto;
  overflow: auto;
}
body:has(.privacy) { height: auto; overflow: auto; }
.privacy h1 { line-height: 1.07; }
.privacy h2 { margin: 1.45rem 0 0.2rem; }
.privacy p { color: var(--muted); }
.privacy a { color: #ffe45e; }

/* Wind mini-event HUD badge & Star Effects Shop */
.wind-badge {
  margin-top: 4px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #e6fbff;
  background: linear-gradient(180deg, rgba(16, 76, 138, 0.9), rgba(8, 32, 74, 0.92));
  border: 2px solid var(--outline);
  box-shadow: 0 2px 0 var(--outline);
}
.wind-badge.is-head {
  color: #ffe3b8;
  background: linear-gradient(180deg, rgba(138, 62, 18, 0.9), rgba(74, 28, 10, 0.92));
}

.shop-sub {
  margin: 4px 0 0;
  font-size: 0.82rem;
  font-weight: 900;
  color: #cfe4ff;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.shop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 13px;
  border: 2.5px solid var(--outline);
  background: linear-gradient(180deg, #163d8c, #0a1f52);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--outline);
}
.shop-item:active { transform: translateY(2px); }
.shop-item[aria-checked="true"] {
  border-color: #ffe45e;
  background: linear-gradient(180deg, #2568c7, #10327a);
  box-shadow: 0 3px 0 var(--outline), 0 0 12px rgba(255, 228, 94, 0.55);
}
.shop-item.is-locked { opacity: 0.85; }
.shop-item.is-locked:disabled { opacity: 0.48; cursor: not-allowed; }
.shop-ico {
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
}
.shop-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}
.shop-meta strong {
  font-size: 0.78rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-item[aria-checked="true"] .shop-meta strong { color: #ffe45e; }
.shop-meta small {
  font-size: 0.68rem;
  font-weight: 800;
  color: #a9ceff;
}
.shop-item.is-locked .shop-meta small { color: #ffe45e; }

/* v2.0 Mega Edition: 4 Boss Worlds, Roof Royale, Power-up HUD, Fever & Track Editor */
.mc-royale {
  background: linear-gradient(135deg, #f59e0b, #d946ef 62%, #6d28d9);
  box-shadow: 0 4px 0 #3b0a6e;
}
.mc-volcano {
  background: linear-gradient(135deg, #f97316, #b91c1c);
  box-shadow: 0 4px 0 #5c0b0b;
}
.mc-orbit {
  background: linear-gradient(135deg, #0ea5e9, #312e81);
  box-shadow: 0 4px 0 #14124a;
}
.mc-skyline {
  background: linear-gradient(135deg, #eab308, #b45309);
  box-shadow: 0 4px 0 #572505;
}
.mc-editor {
  background: linear-gradient(135deg, #10b981, #0f766e);
  box-shadow: 0 4px 0 #06423d;
}
.worlds-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.modes-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.world-mini {
  padding: 10px 10px;
}
.world-mini strong { font-size: 0.88rem; }
.world-mini small { font-size: 0.7rem; }

.power-hud,
.royale-hud {
  margin-top: 4px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  color: #ffffff;
  border: 2px solid var(--outline);
  box-shadow: 0 2px 0 var(--outline);
}
.power-hud {
  background: linear-gradient(180deg, rgba(16, 138, 168, 0.92), rgba(8, 52, 92, 0.94));
}
.royale-hud {
  background: linear-gradient(180deg, rgba(217, 70, 239, 0.92), rgba(109, 40, 217, 0.94));
}

.combo-banner.is-fever {
  background: linear-gradient(180deg, #ff52d9, #ff8c1a);
  box-shadow: 0 3px 0 var(--outline), 0 0 18px rgba(255, 82, 217, 0.85);
  animation: feverPulse 0.55s ease-in-out infinite alternate;
}
@keyframes feverPulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

.editor-canvas {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 2.5px solid var(--outline);
  background: #07122b;
  cursor: pointer;
}
.ed-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.ed-pill {
  padding: 4px 8px;
  border-radius: 9px;
  border: 2px solid var(--outline);
  background: #0c255e;
  color: #d6e9ff;
  font-size: 0.74rem;
  font-weight: 900;
  cursor: pointer;
}
.ed-pill.is-active {
  background: #2568c7;
  border-color: #ffe45e;
  color: #ffe45e;
}
.ed-pill.is-bad {
  background: #7f1d1d;
  border-color: #ff6b6b;
}
.ed-select {
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 11px;
  border: 2.5px solid var(--outline);
  background: #06122e;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.78rem;
}
.ed-sliders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.ed-sliders label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #b7dcff;
}
.ed-sliders b { color: #ffe45e; font-size: 0.76rem; }
.ed-sliders input[type="range"] { width: 100%; accent-color: #ffe45e; }
.ed-kinds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
.ed-kind-btn {
  padding: 6px 5px;
  border-radius: 10px;
  border: 2px solid var(--outline);
  background: #0b2050;
  color: #d6e9ff;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.ed-kind-btn[aria-pressed="true"] {
  background: linear-gradient(180deg, #3092ff, #1254c8);
  border-color: #ffe45e;
  color: #ffffff;
}
.ed-kind-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.ed-row-btns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ed-row-btns .btn-3d { min-height: 40px; font-size: 0.8rem; padding: 6px 10px; }
.ed-status {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 900;
  color: #4cf082;
  text-align: center;
}
.ed-status.is-bad { color: #ff7b72; }

/* Account login sheet */
.login-backdrop { z-index: 20; align-items: center; }
.login-sheet { gap: 10px; }
.login-title {
  margin: 0;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffe45e;
  text-shadow: 0 3px 0 var(--outline), -1.5px -1.5px 0 var(--outline), 1.5px -1.5px 0 var(--outline), -1.5px 1.5px 0 var(--outline), 1.5px 1.5px 0 var(--outline);
}
.login-fields { display: flex; flex-direction: column; gap: 6px; }
.login-fields label { font-size: 0.85rem; font-weight: 800; color: #b7dcff; }
.login-fields input {
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 2.5px solid var(--outline);
  background: #06122e;
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
}
.login-error { margin: 0; color: #ffb4a8; font-weight: 800; font-size: 0.85rem; }
.login-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.login-skip {
  background: none;
  border: none;
  box-shadow: none;
  color: #b7d2f8;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: underline;
  padding: 6px;
  min-height: 0;
  cursor: pointer;
}

/* Quick fail banner (tap-through: only the details button catches clicks) */
.quick-fail {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 30%;
  transform: translateX(-50%);
  width: min(86%, 340px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 14px 10px;
  border: 3px solid var(--outline);
  border-radius: 20px;
  background: rgba(8, 25, 66, 0.86);
  box-shadow: 0 6px 0 var(--outline), 0 16px 40px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  text-align: center;
  animation: qf-pop 0.22s ease-out;
}
.quick-fail strong { font-size: 1.35rem; font-weight: 900; color: #ffe45e; text-shadow: 0 2px 0 var(--outline); }
.quick-fail #qfInfo { font-size: 0.9rem; font-weight: 800; color: #ffffff; line-height: 1.35; }
.quick-fail .qf-tap { margin-top: 4px; font-size: 1rem; font-weight: 900; color: #7ef7a8; animation: qf-pulse 1s ease-in-out infinite; }
.quick-fail .qf-details {
  pointer-events: auto;
  margin-top: 4px;
  min-height: 0;
  padding: 4px 10px;
  border: none;
  background: none;
  box-shadow: none;
  color: #b7d2f8;
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}
@keyframes qf-pop { from { transform: translateX(-50%) scale(0.85); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes qf-pulse { 50% { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) { .quick-fail, .quick-fail .qf-tap { animation: none; } }

/* Extra life */
.quick-fail .qf-life { pointer-events: auto; margin-top: 6px; min-height: 40px; padding: 6px 16px; font-size: 0.95rem; }
.life-shop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.life-shop span { font-weight: 900; font-size: 1rem; color: #ffffff; }
.life-shop button { min-height: 38px; padding: 6px 12px; font-size: 0.85rem; }

/* Seasonal skin series in the wardrobe */
.skin-series { grid-column: 1 / -1; margin: 8px 0 0; font-size: 0.86rem; font-weight: 900; color: #ffe45e; text-shadow: 0 2px 0 var(--outline); }
.skin-chip.for-sale { opacity: 0.92; }
.skin-chip.for-sale small { color: #ffe45e; font-weight: 900; }
.skin-chip.in-season { box-shadow: 0 0 0 2px #ff8a3d, 0 0 14px rgba(255, 138, 61, 0.6); }

/* Arena emote panel */
.emote-bar {
  position: absolute;
  z-index: 5;
  right: 8px;
  top: 26%;
  display: grid;
  grid-template-columns: repeat(2, 38px);
  gap: 6px;
  padding: 6px;
  border: 3px solid var(--outline);
  border-radius: 16px;
  background: rgba(8, 25, 66, 0.72);
  box-shadow: 0 4px 0 var(--outline);
}
.emote-bar button {
  width: 38px;
  height: 38px;
  min-height: 0;
  padding: 0;
  border: 2px solid var(--outline);
  border-radius: 11px;
  background: linear-gradient(180deg, #2c74e8, #1747a6);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.emote-bar button:active { transform: translateY(2px); }
.emote-bar.cooldown button { opacity: 0.5; }

.arena-head { display: flex; flex-direction: column; gap: 2px; padding: 2px 4px 0; }
.arena-head strong { font-size: 1rem; font-weight: 900; color: #ffe45e; text-shadow: 0 2px 0 var(--outline); }
.arena-head small { font-size: 0.76rem; font-weight: 700; color: #b7d2f8; }

/* Editor additions */
.ed-gen { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 6px; }
.ed-gen .btn-3d { min-height: 38px; font-size: 0.8rem; padding: 4px 8px; }
.ed-row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ed-row-4 .btn-3d { font-size: 0.74rem; padding: 6px 4px; }
.ed-hint { margin: -4px 0 0; font-size: 0.72rem; font-weight: 700; color: #9fc0ee; }
.ed-info { margin: 0; font-size: 0.8rem; font-weight: 900; color: #ffffff; }
.editor-canvas { touch-action: none; cursor: grab; }

.emote-bar .emote-toggle { grid-column: 1 / -1; width: 100%; background: linear-gradient(180deg, #ffd84d, #f5a623); }
.emote-bar.collapsed { grid-template-columns: 38px; }
.emote-bar.collapsed button:not(.emote-toggle) { display: none; }
