:root {
  --bg: #070b14;
  --panel: rgba(11, 18, 34, 0.78);
  --panel-solid: #0b1222;
  --border: rgba(56, 189, 248, 0.28);
  --cyan: #22d3ee;
  --pink: #f43f5e;
  --purple: #a855f7;
  --green: #34d399;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --shadow: 0 14px 40px rgba(2, 6, 23, 0.65);
  --radius: 16px;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Microsoft JhengHei", sans-serif;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

/* ── 3D Stage & Floating Labels ── */
#stage {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: radial-gradient(circle at 50% 35%, #162244 0%, #070b14 75%);
}

#loungeStage {
  position: fixed;
  inset: 0;
  z-index: 2;
}

#stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.world-labels {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.w-tag {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  will-change: transform;
}

.w-name {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(9, 14, 28, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.w-tag.me .w-name {
  border-color: var(--cyan);
  background: rgba(14, 116, 144, 0.72);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
}

.w-bub {
  max-width: 220px;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  word-break: break-word;
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.45);
  position: relative;
  animation: popIn 0.16s ease-out;
}

.w-bub::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.94) transparent transparent;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(4px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── HUD Overlay ── */
#hud {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

#hud > * {
  pointer-events: auto;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

/* Top-Left Player & Park Card */
#topLeft {
  position: fixed;
  top: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#meCard {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
}

.brand-dot {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #06101f;
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.45);
}

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

.me-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

#meName {
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.coins-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.16);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: #fde68a;
  font-size: 12px;
  font-weight: 700;
}

.me-sub {
  font-size: 12px;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
  width: fit-content;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.status-dot.offline {
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

/* Top-Right Minimap & Controls */
#topRight {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.minimap-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  padding: 4px;
  background: rgba(8, 13, 27, 0.86);
  border: 1px solid rgba(34, 211, 238, 0.45);
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.2), var(--shadow);
}

#minimap {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.toolbar-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  width: 176px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 8px;
  border-radius: 12px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s ease, background 0.15s ease;
}

.icon-btn:hover {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.16);
  transform: translateY(-1px);
}

.icon-btn.active {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.25);
  color: #fff;
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.35);
}

/* Bottom-Left Chat & Emotes */
#bottomLeft {
  position: fixed;
  left: 16px;
  bottom: 16px;
  width: min(360px, calc(100vw - 32px));
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#chatLog {
  max-height: 160px;
  overflow-y: auto;
  padding: 10px 12px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
}

#chatLog::-webkit-scrollbar {
  width: 5px;
}
#chatLog::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.chat-line {
  line-height: 1.35;
  word-break: break-word;
}

.chat-line .who {
  color: var(--cyan);
  font-weight: 700;
  margin-right: 6px;
}

.chat-line.sys {
  color: var(--muted);
  font-size: 12px;
}

.chat-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

#chatForm {
  flex: 1;
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 14px;
}

#chatInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  padding: 6px 10px;
  font-size: 13px;
}

#chatInput::placeholder {
  color: var(--muted);
}

.btn-primary {
  border: none;
  border-radius: 10px;
  padding: 7px 14px;
  background: linear-gradient(135deg, var(--cyan), #0ea5e9);
  color: #06101f;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: scale(0.97);
}

.emote-bar {
  display: flex;
  gap: 6px;
}

.emote-btn {
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.emote-btn:hover {
  border-color: var(--purple);
  background: rgba(168, 85, 247, 0.18);
}

/* Bottom-Right Quick Teleport / Hint */
#bottomRight {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.spots-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.spots-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 6px;
  padding: 10px;
  border-radius: 16px;
  max-height: 260px;
  overflow-y: auto;
}

.spot-chip {
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 11px;
  font-weight: 600;
  color: #cbd5e1;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spot-chip:hover {
  color: #fff;
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.18);
}

/* 3D Projected Landmark Badges */
.w-spot-tag {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 6;
  pointer-events: auto;
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(9, 15, 30, 0.86);
  border: 1px solid rgba(34, 211, 238, 0.65);
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(2, 6, 23, 0.55), 0 0 12px rgba(34, 211, 238, 0.25);
  transition: scale 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.w-spot-tag:hover {
  scale: 1.08;
  border-color: #ffffff;
  background: rgba(14, 116, 144, 0.92);
}

.hint-text {
  font-size: 11px;
  color: var(--muted);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ── Wardrobe / First-Screen Character Modal ── */
#wardrobeModal {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(4, 7, 15, 0.72);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 16px;
}

.wardrobe-card {
  width: min(900px, 100%);
  height: min(600px, 90vh);
  border-radius: 22px;
  padding: 20px;
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 20px;
  background: rgba(11, 18, 34, 0.94);
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.75);
}

@media (max-width: 680px) {
  .wardrobe-card {
    grid-template-columns: 1fr;
    height: min(92vh, 760px);
  }
  .preview-box {
    height: 220px !important;
    min-height: 220px !important;
  }
  #bottomRight {
    display: none;
  }
}

.preview-box {
  position: relative;
  height: 100%;
  min-height: 360px;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #1d2f5e 0%, #091020 80%);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.preview-controls {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.preview-ctrl-btn {
  padding: 6px 11px !important;
  font-size: 12px !important;
  background: rgba(9, 14, 28, 0.78) !important;
  backdrop-filter: blur(8px);
}

#avatarPreviewCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.preview-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.18);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: var(--cyan);
}

.wardrobe-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wardrobe-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wardrobe-title h2 {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(90deg, #fff, var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.text-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #f8fafc;
  font-size: 14px;
  outline: none;
}

.text-input:focus {
  border-color: var(--cyan);
}

.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
}

.swatch.active {
  border-color: #ffffff;
  transform: scale(1.16);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.style-pill {
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.style-pill.active {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.18);
  color: #fff;
  font-weight: 600;
}

.wardrobe-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.btn-ghost {
  padding: 9px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: var(--cyan);
}

/* ── Build Mode Bar ── */
#buildBar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 16px;
  max-width: calc(100vw - 32px);
  flex-wrap: wrap;
}

.build-header {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.build-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
}

.build-hint {
  font-size: 10px;
  color: var(--muted);
}

.build-props {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.build-prop-btn {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.build-prop-btn:hover {
  border-color: var(--cyan);
}

.build-prop-btn.active {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.22);
  color: #fff;
  font-weight: 700;
}

/* ── Tabbed 3D Wardrobe & Shop Extensions ── */
.preview-wave-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(11, 18, 34, 0.75);
  backdrop-filter: blur(8px);
}

.wardrobe-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wardrobe-title-actions {
  display: flex;
  gap: 6px;
}

.wardrobe-title-actions .btn-ghost {
  padding: 6px 10px;
  font-size: 12px;
}

.wardrobe-form {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.wardrobe-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wardrobe-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.wardrobe-subtab {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.65);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.wardrobe-subtab:hover {
  border-color: var(--cyan);
  color: var(--text);
}

.wardrobe-subtab.active {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.22);
  color: #fff;
}

.wardrobe-tab {
  padding: 6px 11px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.75);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.wardrobe-tab:hover {
  border-color: var(--cyan);
  color: var(--text);
}

.wardrobe-tab.active {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.2);
  color: #fff;
}

.wardrobe-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.wardrobe-grid::-webkit-scrollbar {
  width: 5px;
}

.wardrobe-grid::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border-radius: 999px;
}

.wardrobe-card-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text);
  cursor: pointer;
  transition: all 0.14s ease;
}

.wardrobe-card-item:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.wardrobe-card-item.active {
  border-color: var(--cyan);
  background: rgba(34, 211, 238, 0.18);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.25);
}

.wardrobe-card-item img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.wardrobe-card-item .card-label {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.wardrobe-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.swatch-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
}

.swatch-btn.active {
  border-color: #ffffff;
  transform: scale(1.16);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.65);
}

.shop-item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: rgba(15, 23, 42, 0.85);
}

.shop-item-card.owned {
  border-color: rgba(52, 211, 153, 0.45);
}

.shop-item-card img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.shop-item-name {
  font-size: 12px;
  font-weight: 700;
  color: #f8fafc;
  text-align: center;
}

.shop-item-meta {
  font-size: 11px;
  color: #fde68a;
}

.shop-item-card.owned .shop-item-meta {
  color: var(--green);
}

.btn-buy,
.btn-equip {
  width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  border: none;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.btn-buy {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #0f172a;
}

.btn-buy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-equip {
  background: rgba(52, 211, 153, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #d1fae5;
}

/* ── Shared Modal Backdrop & Header ── */
.mcw-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(4, 7, 15, 0.72);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
}

.modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ── BigMap Modal ── */
.bigmap-card {
  width: min(640px, 100%);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

#bigMapCanvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 74vh;
  border-radius: 16px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  cursor: crosshair;
  display: block;
}

/* ── Atlas Modal ── */
.atlas-card-shell {
  width: min(760px, 100%);
  max-height: 86vh;
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.atlas-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.atlas-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
}

@media (max-width: 680px) {
  .atlas-controls-grid {
    grid-template-columns: 1fr;
  }
}

.atlas-code-form,
.atlas-create-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.atlas-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  cursor: pointer;
}

.atlas-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 50vh;
  padding-right: 4px;
}

.atlas-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.24);
}

.atlas-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.atlas-name {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.atlas-no {
  font-family: monospace;
  font-size: 12px;
  color: var(--cyan);
}

.atlas-badge {
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}

.atlas-badge.pub {
  background: rgba(52, 211, 153, 0.18);
  color: var(--green);
}

.atlas-badge.priv {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
}

.atlas-card-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
}

.atlas-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.atlas-empty {
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 13px;
}

/* ── Visitor Center Admit One Ticket Modal ── */
.ticket-card {
  width: min(520px, 100%);
  display: grid;
  grid-template-columns: 110px 1fr;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(11, 18, 34, 0.96);
  border: 1px solid rgba(34, 211, 238, 0.5);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.8);
}

.ticket-stub {
  background: linear-gradient(160deg, var(--cyan), var(--purple));
  color: #06101f;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 8px;
  border-right: 2px dashed rgba(6, 16, 31, 0.45);
}

.ticket-admit {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.ticket-serial {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
}

.ticket-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-brand {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--cyan);
}

.ticket-park {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.ticket-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.ticket-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* ── Toast Notifications ── */
#toastContainer {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: min(440px, calc(100vw - 32px));
}

.mcw-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(11, 18, 34, 0.94);
  border: 1px solid rgba(34, 211, 238, 0.45);
  box-shadow: 0 12px 32px rgba(2, 6, 23, 0.65);
  color: #f8fafc;
  font-size: 13px;
  animation: popIn 0.16s ease-out;
}

.mcw-toast.warn {
  border-color: rgba(244, 63, 94, 0.55);
}

.mcw-toast.reward {
  border-color: rgba(251, 191, 36, 0.65);
}

/* ── Ride & Lounge Floating Pill Bars ── */
.floating-pill-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
}

#rideBar {
  top: 18px;
  z-index: 25;
  border-color: rgba(34, 211, 238, 0.5);
}

#atlasModal,
#friendsModal,
#accountModal,
#deskGuideModal {
  z-index: 45;
}

/* ── Friends, Account & Desk Guide Modals ── */
.friends-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.friend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  display: inline-block;
}

.friend-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.account-card {
  width: min(680px, 100%);
  border-radius: 22px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (max-width: 640px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

.account-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.24);
}

.account-box-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--cyan);
}

.desk-cmd-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.desk-cmd-box code {
  font-family: monospace;
  font-size: 12px;
  color: var(--cyan);
  word-break: break-all;
}

#loungeBar {
  top: 66px;
  border-color: rgba(251, 191, 36, 0.5);
}

.floating-pill-bar .btn-ghost {
  padding: 4px 10px;
  font-size: 12px;
}
