﻿/* ============================================
   mobile.css â€” Touch controls + mobile UI styles
   ============================================ */

/* â”€â”€ Touch Controls Layer â”€â”€ */
#touchControlsLayer {
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

/* Joystick zone â€” left half of screen */
.touch-joy-zone {
  position: absolute;
  left: 0; top: 0;
  width: 50%; height: 100%;
  pointer-events: auto;
}

/* Joystick ring and knob */
.touch-joy-ring {
  position: absolute;
  width: 100px; height: 100px;
  border: 2px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  pointer-events: none;
  display: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px rgba(0,200,255,0.15);
}
.touch-joy-knob {
  position: absolute;
  width: 40px; height: 40px;
  background: radial-gradient(circle, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.2) 100%);
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  pointer-events: none;
  display: none;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px rgba(0,200,255,0.25);
}

/* Jump button â€” right side */
.touch-jump-btn {
  position: absolute;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14px);
  width: 68px; height: 68px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: 2px solid rgba(255,255,255,0.22);
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
  z-index: 10;
  color: rgba(255,255,255,0.7);
  font-weight: 700;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.4);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.08s ease, background 0.08s ease, border-color 0.08s ease;
}
.touch-jump-btn:active, .touch-jump-btn.pressed {
  transform: scale(0.92);
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.4);
}

/* Trick swipe zone â€” right side above jump */
.touch-trick-zone {
  position: absolute;
  right: 6px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  width: 90px; height: 90px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.3);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Tuck button — appears only when airborne, right side */
.touch-tuck-btn {
  position: absolute;
  right: 92px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
  width: 62px; height: 62px;
  border-radius: 50%;
  background: rgba(56,189,248,0.1);
  border: 2px solid rgba(56,189,248,0.35);
  display: flex; align-items: center; justify-content: center;
  pointer-events: auto;
  z-index: 11;
  color: rgba(56,189,248,0.85);
  font-weight: 700;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  box-shadow: 0 0 16px rgba(56,189,248,0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.06s ease, background 0.06s ease, border-color 0.06s ease;
  animation: tuckFadeIn 0.15s ease-out;
}
.touch-tuck-btn:active, .touch-tuck-btn.active {
  transform: scale(0.9);
  background: rgba(56,189,248,0.35);
  border-color: rgba(56,189,248,0.7);
  box-shadow: 0 0 24px rgba(56,189,248,0.35);
  color: #fff;
}
@keyframes tuckFadeIn {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

/* Settings gear button */
.touch-settings-btn {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 7px);
  right: 24px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  border: none;
  pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, background 0.08s ease;
}
.touch-settings-btn:active {
  background: rgba(255,255,255,0.2);
  transform: scale(0.9);
}
.touch-settings-btn svg {
  width: 18px;
  height: 18px;
}

/* â”€â”€ Lift Skip Button (appears while riding a lift) â”€â”€ */
.touch-skip-lift-btn {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 96px);
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 22px;
  border-radius: 28px;
  background: rgba(56, 189, 248, 0.2);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 14px rgba(56, 189, 248, 0.15);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  z-index: 11;
  transition: transform 0.08s ease, background 0.08s ease;
}
.touch-skip-lift-btn:active {
  transform: translateX(-50%) scale(0.93);
  background: rgba(56, 189, 248, 0.4);
}
.touch-skip-lift-btn svg {
  width: 16px;
  height: 16px;
}

/* Hide desktop lift skip hint on mobile */
.is-mobile #liftSkipHint { display: none !important; }

/* â”€â”€ Mobile Landing Screen â”€â”€ */
#mobileLanding {
  background: linear-gradient(180deg, #0a1420 0%, #0d1a28 40%, #101d2a 100%);
  font-family: 'Segoe UI', -apple-system, sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-logo {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 4px;
  text-shadow: 0 2px 16px rgba(0,150,255,0.3);
}
.mobile-subtitle {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

/* Mode cards */
.mobile-cards {
  display: flex;
  gap: 14px;
  width: 100%;
  max-width: 500px;
}
.mobile-card {
  flex: 1;
  background: rgba(14, 18, 26, 0.85);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.mobile-card:active {
  transform: scale(0.96);
  border-color: rgba(60,180,255,0.5);
}
.mobile-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
}
.mobile-card p {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.4;
}

/* Park list */
.mobile-park-list {
  width: 100%;
  max-width: 500px;
  margin-top: 12px;
}
.mobile-park-item {
  background: rgba(14, 18, 26, 0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.mobile-park-item:active {
  border-color: rgba(60,180,255,0.4);
}
.mobile-park-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.mobile-park-players {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
}

/* Mission picker */
.mobile-mission-list {
  width: 100%;
  max-width: 500px;
  margin-top: 12px;
}
.mobile-mission-item {
  background: rgba(14, 18, 26, 0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.mobile-mission-item:active {
  border-color: rgba(60,180,255,0.4);
}

/* Back button */
.mobile-back {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 0.8rem;
  margin-bottom: 12px;
  cursor: pointer;
  align-self: flex-start;
}

/* â”€â”€ Mobile HUD â”€â”€ */
#mobileHUD {
  position: fixed;
  inset: 0;
  z-index: 910;
  pointer-events: none;
  font-family: 'Segoe UI', -apple-system, sans-serif;
}

.mhud-speed {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
  left: 10px;
  display: flex;
  align-items: baseline;
  gap: 3px;
  color: rgba(255,255,255,0.8);
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}
.mhud-speed-val {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mhud-speed-unit {
  font-size: 0.65rem;
  font-weight: 600;
  opacity: 0.55;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mhud-trick-toast {
  position: absolute;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #66ff88;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6), 0 0 20px rgba(102,255,136,0.3);
  opacity: 0;
  transition: opacity 0.25s ease;
  white-space: nowrap;
  pointer-events: none;
  padding: 12px 20px;
}
.mhud-trick-toast.show {
  opacity: 1;
  pointer-events: auto;
}

.mhud-timer {
  position: absolute;
  top: max(10px, env(safe-area-inset-top, 0px) + 6px);
  right: max(56px, 48px);
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
  display: none;
}

/* â”€â”€ Run Score (beside jump button) â”€â”€ */
.mhud-run-score {
  position: absolute;
  right: 88px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  pointer-events: none;
  z-index: 10;
}
.mhud-run-label {
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
}
.mhud-run-pts {
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
}

/* â”€â”€ HUD Buttons (Restart / Players) â”€â”€ */
.mhud-btn {
  pointer-events: auto;
  position: absolute;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.35);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  z-index: 12;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, background 0.08s ease;
}
.mhud-btn:active {
  background: rgba(255,255,255,0.2);
  transform: scale(0.9);
}
.mhud-btn svg {
  width: 18px;
  height: 18px;
}

.mhud-restart {
  top: calc(env(safe-area-inset-top, 0px) + 7px);
  left: 24px;
}

.mhud-players {
  top: calc(env(safe-area-inset-top, 0px) + 7px);
  right: 62px;
}

.mhud-fullscreen {
  top: calc(env(safe-area-inset-top, 0px) + 7px);
  left: 68px;
}

/* â”€â”€ Players Panel â”€â”€ */
.mhud-players-panel {
  pointer-events: auto;
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 45px);
  right: 62px;
  width: 200px;
  max-height: 260px;
  background: rgba(15,15,25,0.88);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  overflow: hidden;
  z-index: 20;
}
.mhud-players-panel.hidden { display: none; }

.mhud-pp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mhud-pp-close {
  font-size: 1.2rem;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  line-height: 1;
}

.mhud-pp-list {
  overflow-y: auto;
  max-height: 200px;
  padding: 6px 0;
}

.mhud-pp-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
}
.mhud-pp-icon { font-size: 1rem; flex-shrink: 0; }
.mhud-pp-name {
  flex: 1;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mhud-pp-role {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.mhud-pp-loading, .mhud-pp-empty {
  padding: 16px 12px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

/* â”€â”€ Mobile Settings Panel â”€â”€ */
.mobile-settings-panel {
  position: fixed;
  top: max(56px, env(safe-area-inset-top, 0px) + 52px);
  right: max(12px, env(safe-area-inset-right, 0px) + 8px);
  width: 260px;
  background: rgba(12,14,22,0.95);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.65);
  z-index: 1000;
  font-family: 'Exo 2', 'Segoe UI', -apple-system, sans-serif;
  color: #fff;
  overflow: hidden;
  pointer-events: auto;
  touch-action: auto;
}

/* ── Header with tabs + close ── */
.ms-header {
  display: flex;
  align-items: center;
  padding: 0 6px 0 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ms-tabs {
  display: flex;
  flex: 1;
  gap: 0;
}
.ms-tab {
  flex: 1;
  padding: 10px 4px;
  border: none;
  background: transparent;
  color: rgba(155, 176, 203, 0.4);
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.ms-tab.active {
  color: #67b4ff;
  border-bottom-color: #67b4ff;
}
.ms-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Body ── */
.ms-body {
  position: relative;
}
.ms-pane {
  display: none;
  padding: 10px 12px 14px;
  flex-direction: column;
  gap: 10px;
  max-height: 52vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ms-pane::-webkit-scrollbar { display: none; }
.ms-pane.active { display: flex; }

/* ── Shared rows ── */
.ms-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.85);
}
.ms-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #4af;
  flex-shrink: 0;
}
.ms-row input[type="range"] {
  width: 80px;
  height: 4px;
  accent-color: #4af;
  flex-shrink: 0;
}
.ms-row select {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 0.68rem;
  outline: none;
}

/* ── Account tab ── */
.ms-account-card {
  border-radius: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.06);
}
.ms-account-card.ms-signed-in {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(103, 180, 255, 0.06);
  border-color: rgba(103, 180, 255, 0.15);
}
.ms-account-card.ms-signed-out {
  background: rgba(255,255,255,0.03);
  text-align: center;
}
.ms-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.ms-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(103, 180, 255, 0.2);
  flex-shrink: 0;
}
.ms-account-info {
  flex: 1;
  min-width: 0;
}
.ms-account-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(220, 235, 250, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ms-account-email {
  font-size: 0.52rem;
  color: rgba(155, 176, 203, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ms-signout-btn {
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  color: rgba(220, 235, 250, 0.6);
  font-size: 0.55rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.12s;
}
.ms-signout-btn:active { background: rgba(255,255,255,0.1); }

.ms-account-cta { margin-bottom: 8px; }
.ms-account-heading {
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(220, 235, 250, 0.9);
  margin-bottom: 2px;
}
.ms-account-sub {
  font-size: 0.58rem;
  color: rgba(155, 176, 203, 0.5);
  line-height: 1.4;
}

.ms-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: rgba(220, 235, 250, 0.9);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.ms-google-btn:active { background: rgba(255,255,255,0.12); }
.ms-google-btn:disabled { opacity: 0.5; }
.ms-google-icon { flex-shrink: 0; }

.ms-sync-note {
  font-size: 0.52rem;
  color: rgba(74, 222, 128, 0.6);
  text-align: center;
  padding: 2px 0;
}

/* ── Buttons ── */
.ms-leave-btn {
  margin-top: 4px;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: rgba(255,60,60,0.2);
  color: #ff8888;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.ms-leave-btn:active { background: rgba(255,60,60,0.4); }
.ms-perf-btn {
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: rgba(60,160,255,0.15);
  color: #88ccff;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
}
.ms-perf-btn:active { background: rgba(60,160,255,0.35); }

/* â”€â”€ Landscape Prompt â”€â”€ */
#landscapePrompt {
  background: rgba(0,0,0,0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Segoe UI', -apple-system, sans-serif;
}
.landscape-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  animation: rotatePhone 2s ease-in-out infinite;
}
@keyframes rotatePhone {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(90deg); }
}
.landscape-text {
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
}

/* â”€â”€ Hide desktop-only elements on mobile â”€â”€ */
@media (pointer: coarse) and (max-width: 1024px) {
  .toolbar { display: none !important; }
  #welcomeOverlay { display: none !important; }
  #inventoryPanel { display: none !important; }
  #assetPanel { display: none !important; }
  #liftPanel { display: none !important; }
  #mountainPanel { display: none !important; }
  .inv-icon-dock { display: none !important; }
  .ops-icon-dock { display: none !important; }
  #skierPanel { display: none !important; }
  #customPanel { display: none !important; }
  .keybinds-overlay { display: none !important; }
  #mobileLanding { display: none !important; }
  .achv-popup { display: none !important; }
  .achv-pop { display: none !important; }
  #achvTray { display: none !important; }
  .achv-menu { display: none !important; }
  .notif-btn { display: none !important; }
  .notif-menu { display: none !important; }
  .achv-btn { display: none !important; }
  .prog-unlock-toast { display: none !important; }

  /* Splash screen â€” tips hidden on desktop layout, shown in mobile splash */
  :root:not(.is-mobile) .splash .splash-tips { display: none; }

  /* Canvas: fill entire screen including behind home indicator */
  canvas#scene {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: calc(100vh + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Body/html: extend behind home indicator */
  html, body {
    height: 100% !important;
    height: calc(100% + env(safe-area-inset-bottom, 0px)) !important;
    background: #0a1420 !important;
  }

  /* Hide desktop trick notification â€” mobile uses mhud-trick-toast instead */
  #trickNotif { display: none !important; }

  /* Move combo HUD above the jump button on mobile */
  #comboHud {
    bottom: max(108px, env(safe-area-inset-bottom, 0px) + 96px) !important;
    right: 16px !important;
    pointer-events: auto !important;
    opacity: 0.3;
    transition: opacity 0.25s ease;
    display: none !important;
  }
  body.show-trick-hud #comboHud {
    display: block !important;
  }
  #comboHud.trick-focused {
    opacity: 1;
  }
  /* Hide desktop run score â€” mobile has its own */
  #comboHud .combo-run-score { display: none !important; }
  .combo-feed { max-height: 100px !important; }
  .combo-multi { font-size: 26px !important; }
  .combo-trick-name { font-size: 12px !important; }
  .combo-trick-pts { font-size: 10px !important; }
  .combo-run-score .run-pts { font-size: 16px !important; }

  /* Trick toast defocused by default on mobile */
  .mhud-trick-toast.show {
    opacity: 0.35;
    transition: opacity 0.25s ease;
  }
  .mhud-trick-toast.show.trick-focused {
    opacity: 1;
  }
}

/* â•â•â• Lefty Mode â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   Swaps only the jump button and speed indicator.
   ========================================================= */
body.lefty-mode .touch-jump-btn {
  right: auto !important;
  left: 12px;
}
body.lefty-mode .touch-tuck-btn {
  right: auto !important;
  left: 92px;
}
body.lefty-mode .mhud-speed {
  left: auto;
  right: 10px;
}

/* â•â•â• PWA Install Prompt Overlay â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.mhud-install-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}
.mhud-install-overlay.show { opacity: 1; }

.mhud-install-card {
  position: relative;
  width: calc(100% - 48px);
  max-width: 340px;
  background: rgba(12, 18, 30, 0.95);
  border: 1px solid rgba(74, 168, 255, 0.2);
  border-radius: 20px;
  padding: 28px 24px 24px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), 0 0 60px rgba(74,168,255,0.08);
  transform: translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.mhud-install-overlay.show .mhud-install-card {
  transform: translateY(0);
}

.mhud-install-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  color: rgba(255,255,255,0.5);
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}
.mhud-install-close:active {
  background: rgba(255,255,255,0.2);
}

.mhud-install-header {
  text-align: center;
  margin-bottom: 16px;
}
.mhud-install-hero {
  margin-bottom: 8px;
}
.mhud-install-title {
  font: 700 20px/1.2 var(--font-family, -apple-system, sans-serif);
  color: #fff;
  letter-spacing: 0.5px;
}
.mhud-install-subtitle {
  margin-top: 4px;
  font: 400 13px/1.4 var(--font-family, -apple-system, sans-serif);
  color: rgba(180, 210, 240, 0.7);
}

.mhud-install-benefits {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: rgba(74, 168, 255, 0.06);
  border-radius: 12px;
  border: 1px solid rgba(74, 168, 255, 0.1);
}
.mhud-install-benefits-text {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
.mhud-install-benefit {
  font: 500 12.5px/1.3 var(--font-family, -apple-system, sans-serif);
  color: rgba(210, 230, 250, 0.9);
  letter-spacing: 0.2px;
  padding-left: 16px;
  position: relative;
}
.mhud-install-benefit::before {
  content: 'âœ¦';
  position: absolute;
  left: 0;
  color: #4aa8ff;
  font-size: 10px;
}
.mhud-install-appicon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE WARDROBE — Fullscreen overlay (.mw- prefix)
   Font: Exo 2 matching desktop wardrobe/skin panels
   ═══════════════════════════════════════════════════════════════ */

/* Wardrobe HUD button — positioned left of players btn */
.mhud-wardrobe {
  top: calc(env(safe-area-inset-top, 0px) + 7px);
  right: 106px;
  border: 1px solid rgba(103,180,255,0.24);
  background: linear-gradient(180deg, rgba(16,28,42,0.62), rgba(5,9,16,0.42));
  color: rgba(210,235,255,0.86);
  box-shadow: 0 2px 10px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,255,255,0.08);
}
.mhud-wardrobe svg { filter: drop-shadow(0 0 6px rgba(103,180,255,0.26)); }

/* Sign-in HUD pill — only shown in guest lobby mode, hidden when signed in */
.mhud-signin {
  top: calc(env(safe-area-inset-top, 0px) + 7px);
  right: 150px;
  display: none; /* shown via body.freeski-guest below */
  gap: 5px;
  width: auto;
  padding: 0 10px;
  border-radius: 20px;
  font: 500 11px/1 var(--font-family, -apple-system, sans-serif);
  letter-spacing: 0.02em;
  color: rgba(160,200,240,0.75);
  border-color: rgba(255,255,255,0.10);
}
.mhud-signin::after {
  content: 'Sign in';
  font: inherit;
  color: inherit;
}
/* Show when guest lobby is active */
body.freeski-guest .mhud-signin { display: flex; }
/* Hide once the user has authenticated */
body.user-signed-in .mhud-signin { display: none !important; }

/* ── Fullscreen overlay container ── */
.mw-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  height: 100vh;
  height: 100dvh;
  background: rgba(6, 9, 16, 0.97);
  backdrop-filter: blur(24px) saturate(1.1);
  -webkit-backdrop-filter: blur(24px) saturate(1.1);
  display: flex;
  flex-direction: column;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  color: rgba(220, 235, 250, 0.92);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0.22s;
  -webkit-tap-highlight-color: transparent;
}
.mw-overlay.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s 0s;
}

/* Preview mode — fully transparent, cards have own background */
.mw-overlay.mw-preview-mode {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
/* Top bar & tabs get own background in preview mode for readability */
.mw-preview-mode .mw-top {
  background: rgba(6, 9, 16, 0.88);
}
.mw-preview-mode .mw-tabs {
  background: rgba(6, 9, 16, 0.88);
}
/* Body in preview mode — no padding, no scroll (inner list scrolls) */
.mw-preview-mode .mw-body {
  padding: 0;
}

/* ── Top bar ── */
.mw-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) calc(env(safe-area-inset-right, 0px) + 16px) 8px calc(env(safe-area-inset-left, 0px) + 16px);
  flex-shrink: 0;
}
.mw-back {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(220, 235, 250, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.mw-back:active { background: rgba(255, 255, 255, 0.12); }

.mw-top-title {
  flex: 1;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
}
.mw-shred {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fbbf24;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.15);
}

/* ── Name input row (overlays top of body, no layout shift) ── */
.mw-name-row {
  position: absolute;
  top: 8px;
  left: calc(env(safe-area-inset-left, 0px) + 16px);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  max-width: 260px;
  background: rgba(6,9,16,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(103,180,255,0.10);
  border-radius: 10px;
}
.mw-name-label {
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 11px;
  font-weight: 700;
  color: rgba(200,210,230,0.45);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  white-space: nowrap;
}
.mw-name-input {
  flex: 1;
  height: 34px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(103,180,255,0.12);
  border-radius: 8px;
  padding: 0 12px;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 14px;
  font-weight: 600;
  color: #e8edf3;
  outline: none;
  transition: border-color 0.2s;
}
.mw-name-input:focus {
  border-color: rgba(103,180,255,0.35);
}
.mw-name-input::placeholder {
  color: rgba(200,210,230,0.3);
}

/* ── Tabs ── */
.mw-tabs {
  display: flex;
  gap: 0;
  padding: 0 calc(env(safe-area-inset-right, 0px) + 16px) 0 calc(env(safe-area-inset-left, 0px) + 16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}
.mw-tab {
  flex: 1;
  padding: 11px 4px;
  border: none;
  background: transparent;
  color: rgba(155, 176, 203, 0.45);
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.mw-tab.active {
  color: #67b4ff;
  border-bottom-color: #67b4ff;
}

/* ── Scrollable body ── */
.mw-body {
  position: relative;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 0 calc(16px + env(safe-area-inset-bottom, 0px));
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  scrollbar-width: none;
}
.mw-body::-webkit-scrollbar { display: none; }

/* ── Section headers ── */
.mw-section {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(155, 176, 203, 0.4);
  padding: 16px 16px 8px;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
}
.mw-section-ct {
  font-weight: 600;
  color: rgba(155, 176, 203, 0.25);
}

/* ── Empty state ── */
.mw-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 60px 20px;
  text-align: center;
}
.mw-empty-icon { opacity: 0.35; }
.mw-empty-text { font-size: 1rem; font-weight: 700; color: rgba(220, 235, 250, 0.8); }
.mw-empty-sub { font-size: 0.8rem; color: rgba(155, 176, 203, 0.45); }

/* ═══════════════════════════════════════════════╗
   OUTFIT TAB — split preview + card list         ║
   ═══════════════════════════════════════════════╝ */

.mw-outfit-split {
  display: flex;
  height: 100%;
}

/* Left — transparent preview window (shows 3D game canvas) */
.mw-outfit-preview {
  flex: 1;
  min-width: 0;
  pointer-events: none;
}

/* Right — scrollable vertical list of outfit cards */
.mw-outfit-list {
  width: 200px;
  max-width: 35vw;
  height: 100%;
  box-sizing: border-box;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 10px 16px 10px;
  background: rgba(6, 9, 16, 0.94);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
}
.mw-outfit-list::-webkit-scrollbar { display: none; }

.mw-outfit-card {
  background: rgba(18, 22, 32, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 8px;
  margin-bottom: 5px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
.mw-outfit-card:active { transform: scale(0.97); }
.mw-outfit-card.mw-active {
  border-color: rgba(103, 180, 255, 0.45);
  background: rgba(103, 180, 255, 0.1);
  box-shadow: 0 0 12px rgba(103, 180, 255, 0.12);
}

.mw-outfit-bar {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}
.mw-ob {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mw-outfit-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(220, 235, 250, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
}

.mw-outfit-wearing {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(103, 180, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #67b4ff;
}

/* ═══════════════════════════════════════════════╗
   HORIZONTAL CAROUSEL ROW (shared by all tabs)  ║
   ═══════════════════════════════════════════════╝ */

.mw-row {
  margin-bottom: 4px;
}
.mw-row-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px 6px;
}
.mw-row-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mw-row-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
}
.mw-row-count {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(155, 176, 203, 0.3);
  margin-left: auto;
}

.mw-carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding: 4px 16px 10px;
  scrollbar-width: none;
}
.mw-carousel::-webkit-scrollbar { display: none; }

/* ═══════════════════════════════════════════════╗
   SKI COLLECTION TAB — sidebar split layout      ║
   2-column grid per rarity, scrollable sidebar   ║
   ═══════════════════════════════════════════════╝ */

/* Split: transparent left (shows skier) + sidebar right */
.mw-sc-split {
  display: flex;
  height: 100%;
}
.mw-sc-preview-zone {
  flex: 1;
  min-width: 0;
  pointer-events: none;
}
.mw-sc-sidebar {
  width: 300px;
  max-width: 50vw;
  height: 100%;
  box-sizing: border-box;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 8px 20px 8px;
  background: rgba(6, 9, 16, 0.94);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
}
.mw-sc-sidebar::-webkit-scrollbar { display: none; }

/* -- Hero stats bar (compact sidebar version) -- */
.mw-sc-hero {
  margin: 0 0 8px;
  padding: 10px 10px;
  background: rgba(16, 20, 30, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  text-align: center;
}
.mw-sc-count {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
}
.mw-sc-owned {
  font-size: 1.4rem;
  font-weight: 900;
  color: #fff;
}
.mw-sc-slash {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(155, 176, 203, 0.3);
}
.mw-sc-total {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(155, 176, 203, 0.45);
}
.mw-sc-pct {
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(155, 176, 203, 0.3);
  margin-left: 4px;
}
.mw-sc-bar {
  display: flex;
  height: 4px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  margin-top: 6px;
}
.mw-sc-seg { height: 100%; transition: flex 0.4s ease; }
.mw-sc-complete {
  font-size: 0.55rem;
  font-weight: 800;
  color: #fbbf24;
  margin-top: 5px;
  letter-spacing: 0.06em;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
}

/* -- Hero layout row (stats + sort) -- */
.mw-sc-hero-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

/* -- Sort dropdown -- */
.mw-sc-sort-wrap {
  position: relative;
  flex-shrink: 0;
}
.mw-sc-sort-toggle {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(155, 176, 203, 0.5);
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.mw-sc-sort-toggle:active { transform: scale(0.96); }
.mw-sc-sort-toggle:hover,
.mw-sc-sort-toggle:focus { color: rgba(200, 215, 235, 0.7); border-color: rgba(255, 255, 255, 0.12); }

.mw-sc-sort-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 90px;
  background: rgba(14, 18, 28, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  padding: 3px;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.12s, transform 0.12s, visibility 0s 0.12s;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.mw-sc-sort-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.12s, transform 0.12s, visibility 0s 0s;
}
.mw-sc-sort-opt {
  display: block;
  width: 100%;
  padding: 5px 8px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: rgba(155, 176, 203, 0.55);
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.44rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.mw-sc-sort-opt:active { background: rgba(103, 180, 255, 0.08); }
.mw-sc-sort-opt.active {
  color: rgba(220, 235, 250, 0.9);
  background: rgba(103, 180, 255, 0.1);
}

/* -- Per-rarity row -- */
.mw-sc-row { margin-bottom: 2px; }
.mw-sc-row-hdr {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 4px 4px;
}
.mw-sc-rdot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mw-sc-rlabel {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
}
.mw-sc-rcount {
  font-size: 0.52rem;
  font-weight: 600;
  color: rgba(155, 176, 203, 0.35);
  margin-left: auto;
}
.mw-sc-tier-done {
  font-size: 0.5rem;
  font-weight: 800;
  color: #4ade80;
  margin-left: 3px;
}

/* -- 3-column grid -- */
.mw-sc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 2px 4px 6px;
}

/* -- Collection cards (compact for sidebar) -- */
.mw-sc-card {
  flex-shrink: 0;
  background: rgba(18, 22, 35, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px 3px 6px;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.08s, box-shadow 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.mw-sc-card:active { transform: scale(0.96); }

/* Owned cards get a subtle rarity border + glow */
.mw-sc-card.mw-sc-owned {
  border-color: color-mix(in srgb, var(--rc) 30%, transparent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--rc) 10%, transparent);
}

/* Equipped card: stronger glow */
.mw-sc-card.mw-sc-equipped {
  border-color: color-mix(in srgb, var(--rc) 55%, transparent);
  box-shadow: 0 0 16px color-mix(in srgb, var(--rc) 20%, transparent),
              inset 0 0 12px color-mix(in srgb, var(--rc) 6%, transparent);
}

/* Locked cards */
.mw-sc-card.mw-sc-locked {
  opacity: 0.32;
  cursor: default;
}

/* Inner radial glow (owned only) */
.mw-sc-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 160%;
  height: 100%;
  background: radial-gradient(ellipse at center, var(--rc, #67b4ff) 0%, transparent 65%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.mw-sc-card.mw-sc-owned .mw-sc-glow { opacity: 0.06; }
.mw-sc-card.mw-sc-equipped .mw-sc-glow { opacity: 0.1; }

/* Equipped badge */
.mw-sc-eq {
  position: absolute;
  top: 3px;
  right: 3px;
  font-size: 0.38rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--rc, #67b4ff);
  background: color-mix(in srgb, var(--rc) 12%, transparent);
  padding: 1px 4px;
  border-radius: 3px;
  z-index: 2;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
}

.mw-sc-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
}
.mw-sc-name {
  font-size: 0.46rem;
  font-weight: 700;
  color: rgba(220, 235, 250, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  z-index: 1;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
}
.mw-sc-card.mw-sc-locked .mw-sc-name { color: rgba(155, 176, 203, 0.3); }

/* ═══════════════════════════════════════════════╗
   SHOP TAB                                      ║
   ═══════════════════════════════════════════════╝ */

/* -- Featured Shop: 3-piece timed grid -- */

@keyframes mwFeatShimmer {
  0% { transform: translateX(-100%) skewX(-18deg); }
  100% { transform: translateX(250%) skewX(-18deg); }
}
@keyframes mwFeatPulse {
  0%, 100% { opacity: 0.05; }
  50% { opacity: 0.10; }
}
@keyframes mwDotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.15; }
}

/* ── Grid container ── */
.mw-featured-shop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 4px 10px 12px;
}

/* ── Shared card base ── */
.mw-feat-daily,
.mw-feat-weekly {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(18, 22, 38, 0.92), rgba(10, 14, 24, 0.97));
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
}

/* Rarity glow */
.mw-feat-glow {
  position: absolute;
  inset: -50%;
  background: radial-gradient(ellipse at 50% 65%, var(--rc, #67b4ff), transparent 58%);
  opacity: 0.05;
  pointer-events: none;
  animation: mwFeatPulse 5s ease-in-out infinite;
}

/* Shimmer streak (daily only) */
.mw-feat-shimmer {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 60%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03) 38%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 62%, transparent);
  pointer-events: none;
  animation: mwFeatShimmer 6s ease-in-out infinite;
  z-index: 1;
}

/* ── Header (label + timer) — consistent across all cards ── */
.mw-feat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px 0 10px;
  z-index: 2;
  position: relative;
  flex-shrink: 0;
}
.mw-feat-label {
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgba(200, 215, 235, 0.3);
  text-transform: uppercase;
  line-height: 1;
}
.mw-feat-timer {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.6rem;
  font-weight: 700;
  color: rgba(200, 215, 235, 0.28);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.mw-feat-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(200, 215, 235, 0.2);
  flex-shrink: 0;
}
.mw-feat-dot-live {
  background: #ef4444;
  box-shadow: 0 0 4px rgba(239,68,68,0.5);
  animation: mwDotBlink 1.4s ease-in-out infinite;
}

/* ═══ DAILY card (left column) ═══ */
.mw-feat-daily {
  grid-row: 1 / 2;
  grid-column: 1 / 2;
}

/* Ski preview area — contained, doesn't bleed into text */
.mw-feat-ski-area {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-height: 80px;
  padding: 10px 8px 6px;
  z-index: 2;
  position: relative;
}

/* Meta: rarity + name together */
.mw-feat-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 0 10px;
  z-index: 2;
}

/* Shared text styles */
.mw-feat-rarity {
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1;
}
.mw-feat-name {
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.82rem;
  font-weight: 800;
  color: #e8ecf2;
  text-align: center;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Pricing row */
.mw-feat-pricing {
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
  padding: 3px 10px 0;
  justify-content: center;
}
.mw-feat-pricing-sm { padding: 2px 0 0; }
.mw-feat-old {
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.6rem;
  font-weight: 600;
  color: rgba(155, 176, 203, 0.22);
  text-decoration: line-through;
}
.mw-feat-cur {
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.85rem;
  font-weight: 800;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 3px;
}
.mw-feat-cur-sm { font-size: 0.78rem; }

/* Owned */
.mw-feat-owned-tag {
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.62rem;
  font-weight: 800;
  color: rgba(74, 222, 128, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  z-index: 2;
  text-align: center;
  padding: 6px 10px 8px;
}
.mw-feat-owned-sm { padding: 4px 8px 6px; font-size: 0.58rem; }

/* ── Buy button — refined, outlined style ── */
.mw-feat-buy {
  display: block;
  width: calc(100% - 18px);
  margin: 4px 9px 8px;
  padding: 7px 0;
  border: 1px solid rgba(200, 215, 235, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 235, 250, 0.75);
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
  z-index: 2;
  position: relative;
}
.mw-feat-buy:active { transform: scale(0.97); }
.mw-feat-buy:not(.mw-feat-buy-off):hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(200, 215, 235, 0.25);
}
.mw-feat-buy-sm {
  margin: 2px 8px 6px;
  padding: 6px 0;
  font-size: 0.58rem;
}

.mw-feat-buy-off {
  border-color: rgba(155, 176, 203, 0.06);
  background: transparent;
  color: rgba(155, 176, 203, 0.2);
  cursor: not-allowed;
}

/* ═══ WEEKLY column (right, 2 stacked) ═══ */
.mw-feat-weekly-col {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mw-feat-weekly {
  flex: 1;
  min-height: 0;
}

/* Rarity border tints — subtle, not neon */
.mw-feat-tier-legendary { border-color: rgba(251, 191, 36, 0.15); }
.mw-feat-tier-legendary .mw-feat-label { color: rgba(251,191,36,0.45); }
.mw-feat-tier-epic { border-color: rgba(192, 132, 252, 0.15); }
.mw-feat-tier-epic .mw-feat-label { color: rgba(192,132,252,0.45); }

/* Weekly card body — horizontal: ski + info */
.mw-feat-wk-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 3px;
  z-index: 2;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.mw-feat-ski-sm {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
}
.mw-feat-wk-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mw-feat-name-sm {
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  color: #dce3ed;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* -- Buttons -- */
.mw-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s;
  min-height: 42px;
}
.mw-btn:active { transform: scale(0.96); }
.mw-btn-accent {
  background: linear-gradient(135deg, #67b4ff, #4a90d9);
  color: #fff;
  box-shadow: 0 2px 12px rgba(103, 180, 255, 0.2);
}
.mw-btn-off {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(155, 176, 203, 0.4);
  cursor: not-allowed;
  box-shadow: none;
}

/* -- Crate strip -- */
.mw-crate-strip {
  display: flex;
  gap: 8px;
  padding: 0 16px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.mw-crate-strip::-webkit-scrollbar { display: none; }

.mw-crate {
  flex-shrink: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(20, 25, 40, 0.8);
  color: rgba(220, 235, 250, 0.85);
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s, transform 0.08s;
}
.mw-crate:active { transform: scale(0.96); background: rgba(255, 255, 255, 0.06); }
.mw-crate-icon { font-size: 1rem; }
.mw-crate-ct { font-weight: 800; color: #fbbf24; }

/* -- Catalog cards inside carousel -- */
.mw-cat-card {
  flex-shrink: 0;
  width: 120px;
  background: rgba(18, 22, 35, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px 6px 8px;
  text-align: center;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 0.08s, border-color 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.mw-cat-card:active { transform: scale(0.96); }
.mw-cat-card.mw-cat-owned { opacity: 0.4; }

.mw-cat-vis {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 65px;
  margin-bottom: 4px;
}
.mw-cat-name {
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(220, 235, 250, 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 3px;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
}
.mw-cat-price {
  font-size: 0.62rem;
  font-weight: 700;
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: 'Exo 2', var(--font-family, -apple-system, sans-serif);
}
.mw-cat-check {
  color: #4ade80;
  font-weight: 800;
  font-size: 0.7rem;
}

/* Old collection styles removed — merged into .mw-sc-* above */

/* Old category filter + collection cards removed — merged into .mw-sc-* above */

/* ═══ Controls Overlay ═══════════════════════════════════════
   Quick one-time tutorial showing left/right control zones.
   ============================================================ */
.ctrl-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.ctrl-overlay.show { opacity: 1; }
.ctrl-overlay.hiding { opacity: 0; }

.ctrl-overlay-half {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  pointer-events: none;
}
.ctrl-overlay-left {
  background: rgba(140, 180, 220, 0.07);
  border-right: 1px solid rgba(255,255,255,0.04);
}
.ctrl-overlay-right {
  background: rgba(180, 200, 230, 0.07);
}

.ctrl-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  pointer-events: none;
}
.ctrl-icon {
  opacity: 0.6;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
}
.ctrl-label {
  font-family: 'Exo 2', -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  letter-spacing: 0.04em;
}
.ctrl-sublabel {
  font-family: 'Exo 2', -apple-system, sans-serif;
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(255,255,255,0.4);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.ctrl-overlay-divider {
  position: absolute;
  left: 50%;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.1) 30%, rgba(255,255,255,0.1) 70%, transparent);
  pointer-events: none;
}

/* Lefty mode: swap overlay halves */
body.lefty-mode .ctrl-overlay {
  flex-direction: row-reverse;
}

/* ═══════════════════════════════════════════════════════════════
   CRATE CEREMONY — Mobile overrides
   Fixes the "NEW!" reveal screen overflowing vertically
   ═══════════════════════════════════════════════════════════════ */

.cc-showcase {
  padding: 20px 12px 48px !important;
  gap: 16px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}
.cc-showcase-card {
  width: 92vw !important;
  max-width: 380px !important;
  padding: 16px 14px 20px !important;
}
.cc-showcase-preview-ski {
  height: 200px !important;
}
.cc-showcase-name {
  font-size: 22px !important;
}
.cc-showcase-glow {
  width: 300px !important;
  height: 300px !important;
}
.cc-showcase-rings {
  width: 280px !important;
  height: 280px !important;
}
.cc-showcase-rays {
  width: 350px !important;
  height: 350px !important;
}
.cc-showcase-actions {
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
}
.cc-showcase-actions button {
  min-height: 44px !important;
  font-size: 14px !important;
  padding: 10px 16px !important;
}


/* ═══════════════════════════════════════════════════════════════════════
   DAILY REWARD — Mobile Overrides
   Single-row track layout, landscape-first
   ═══════════════════════════════════════════════════════════════════════ */

/* Panel fits viewport with safe areas */
.dr-panel {
  width: min(900px, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px) - 24px)) !important;
  padding: 0 env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px);
}

/* Tighter top bar */
.dr-top {
  padding-bottom: 10px !important;
}
.dr-top-title { font-size: 18px !important; }
.dr-streak-badge { padding: 5px 12px 5px 8px !important; }
.dr-streak-val { font-size: 14px !important; }
.dr-close { width: 32px !important; height: 32px !important; }

/* Track scrolls horizontally */
.dr-track {
  justify-content: flex-start !important;
  padding: 12px 4px !important;
}

/* Cards — substantial on mobile */
.dr-card {
  width: 88px !important;
  padding: 12px 6px 10px !important;
  border-radius: 10px !important;
}
.dr-connector { width: 12px !important; }
.dr-card-day-num { font-size: 10px !important; letter-spacing: 0.8px !important; }
.dr-card-vis { width: 48px !important; height: 48px !important; }
.dr-card-crate { width: 44px !important; height: 44px !important; }
.dr-card-check { width: 16px !important; height: 16px !important; top: -4px !important; right: -4px !important; }
.dr-card-check svg { width: 10px !important; height: 10px !important; }
.dr-reward-tag { font-size: 10px !important; }
.dr-card-btn { font-size: 9px !important; padding: 4px 10px !important; }
.dr-card-ring { inset: -2px !important; }

/* Tap-to-Open: smaller on mobile */
#drTapWrap { width: 120px !important; height: 120px !important; }
.dr-tap-crate { width: 84px !important; height: 84px !important; }
.dr-tap-rays { width: 280px !important; height: 280px !important; }
.dr-tap-meter { width: 150px !important; }
.dr-tap-label { font-size: 11px !important; letter-spacing: 1.5px !important; }

/* Portrait: horizontal scroll instead of wrapping */
@media (orientation: portrait) {
  .dr-panel { width: calc(100vw - 24px) !important; }
  .dr-track {
    justify-content: flex-start !important;
    flex-wrap: nowrap !important;
    padding: 12px 8px !important;
  }
  .dr-card { width: 82px !important; }
}

/* ── Daily Reward HUD Button ── */
.mhud-daily-reward {
  top: calc(env(safe-area-inset-top, 0px) + 7px);
  right: 150px;
}
.mhud-daily-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.6);
  animation: mhudDotPulse 2s ease-in-out infinite;
}
@keyframes mhudDotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px rgba(251, 191, 36, 0.4); }
  50%      { opacity: 0.6; box-shadow: 0 0 10px rgba(251, 191, 36, 0.7); }
}

