:root {
  --bg-deep: #0b1528;
  --bg-card: rgba(17, 30, 56, 0.88);
  --bg-card-solid: #132342;
  --border-gold: rgba(251, 191, 36, 0.42);
  --border-soft: rgba(148, 163, 184, 0.24);
  --gold: #fbbf24;
  --gold-bright: #fef08a;
  --sky: #38bdf8;
  --emerald: #10b981;
  --purple: #a855f7;
  --coral: #fb7185;
  --text-main: #f8fafc;
  --text-dim: #cbd5e1;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-arcade: 0 10px 28px rgba(0, 0, 0, 0.42);
}

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

input {
  user-select: text;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(circle at 50% 22%, #1d3b6e 0%, #0f1f3d 55%, #091224 100%);
  color: var(--text-main);
}

.hidden {
  display: none !important;
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* ======================== GAME CENTER TOAST ======================== */
.gc-toast {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 24px);
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.96));
  border: 2px solid var(--gold);
  border-radius: 22px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 24px rgba(251, 191, 36, 0.35);
  animation: gcSlideIn 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes gcSlideIn {
  from { transform: translate(-50%, -80px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

.gc-toast-icon {
  font-size: 28px;
}
.gc-toast-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--gold);
}
.gc-toast-title {
  font-size: 14px;
  font-weight: 800;
}
.gc-toast-sub {
  font-size: 12px;
  color: var(--text-dim);
}

/* ======================== TOPBAR ======================== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(10px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 10px max(20px, env(safe-area-inset-left));
  background: rgba(9, 18, 36, 0.92);
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
  flex-wrap: wrap;
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-crest {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 4px 10px rgba(251, 191, 36, 0.4));
}

.brand-title {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
}
.brand-title span {
  color: var(--gold);
  text-shadow: 0 2px 12px rgba(251, 191, 36, 0.45);
}
.brand-sub {
  font-size: 12px;
  color: var(--text-dim);
}

.currency-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid var(--border-soft);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}
.pill-stat:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}
.pill-laurels { border-color: rgba(251, 191, 36, 0.5); cursor: default; }
.pill-keys { border-color: rgba(168, 85, 247, 0.55); }
.pill-xp { border-color: rgba(56, 189, 248, 0.55); }
.pill-label { font-size: 12px; color: var(--text-dim); }

.mini-xp-track {
  width: 48px;
  height: 7px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  overflow: hidden;
  display: inline-block;
}
.mini-xp-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #fbbf24);
}

.icon-btn, .profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(30, 41, 59, 0.92);
  color: var(--text-main);
  border: 1.5px solid var(--border-soft);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.profile-chip:hover, .icon-btn:hover {
  border-color: var(--gold);
}

.deity-mini-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.22);
  border: 1px solid rgba(251, 191, 36, 0.55);
  color: var(--gold-bright);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.audio-state-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
  white-space: nowrap;
}
.audio-state-pill.sound-on {
  background: rgba(6, 78, 59, 0.58);
  border: 1.5px solid #10b981;
  color: #d1fae5;
}
.audio-state-pill.sound-muted {
  background: rgba(127, 29, 29, 0.52);
  border: 1.5px solid #fb7185;
  color: #ffe4e6;
}
.audio-state-pill:hover {
  transform: translateY(-1px);
}

/* ======================== MANDATORY READACHILLES AUTH GATE (GAMBIT 2-STAGE FLOW) ======================== */
#authGateScreen {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background:
    radial-gradient(circle at 24% 24%, rgba(251, 191, 36, 0.16) 0%, transparent 45%),
    radial-gradient(circle at 78% 72%, rgba(56, 189, 248, 0.14) 0%, transparent 48%),
    linear-gradient(180deg, #0c1931 0%, #091224 100%);
}

.auth-stage-shell {
  width: min(1040px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.auth-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--gold-bright);
}
.auth-brand-crest {
  width: 30px;
  height: 30px;
}

.btn-auth-back {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.btn-auth-back:hover {
  border-color: var(--gold);
}

.auth-welcome-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: center;
}

.auth-amphitheater-card {
  background: rgba(16, 27, 50, 0.92);
  border: 2px solid rgba(251, 191, 36, 0.48);
  border-radius: 26px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
}

.duo-speech-bubble {
  position: relative;
  width: 100%;
  background: #172542;
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 11px 14px;
  text-align: center;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}
.duo-speech-speaker {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.09em;
  color: var(--gold);
  margin-bottom: 3px;
}
.duo-speech-copy {
  font-size: 13px;
  line-height: 1.38;
  font-weight: 700;
  color: var(--text-main);
}
.duo-speech-tail {
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 14px;
  height: 14px;
  background: #172542;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: translateX(-50%) rotate(45deg);
}

.auth-spotlight-stage {
  position: relative;
  width: 156px;
  height: 156px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-sunburst-ring {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.34) 0%, rgba(56, 189, 248, 0.08) 65%, transparent 100%);
  border: 1.5px dashed rgba(251, 191, 36, 0.45);
}
.auth-spotlight-hero {
  position: relative;
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 24px;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.55));
  animation: floatBob 3.2s ease-in-out infinite;
}
.auth-spotlight-canvas {
  position: relative;
  width: 136px;
  height: 136px;
  border-radius: 24px;
  cursor: grab;
}
.auth-stage-toys-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: -4px;
}
.auth-toy-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  border-bottom: 3px solid #091224;
  background: rgba(15, 23, 42, 0.9);
  color: var(--gold-bright);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.auth-goal-pledge-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.auth-goal-chip {
  padding: 5px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--border-soft);
  border-bottom: 3px solid #091224;
  background: rgba(15, 23, 42, 0.82);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.auth-goal-chip.active {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.22);
  color: var(--gold-bright);
}
@media (max-height: 500px) {
  .auth-stage-toys-row,
  .auth-goal-pledge-row {
    display: none;
  }
}

.auth-cast-block {
  width: 100%;
  text-align: center;
}
.auth-cast-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 7px;
}
.auth-cast-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}
.auth-cast-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.84);
  border: 1.5px solid var(--border-soft);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.auth-cast-chip img {
  width: 30px;
  height: 30px;
}
.auth-cast-chip.active,
.auth-cast-chip:hover {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.2);
  color: var(--gold-bright);
  transform: translateY(-1px);
}

.auth-welcome-right {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.auth-headline {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  font-weight: 900;
  color: #ffffff;
}
.auth-subcopy {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--text-dim);
}
.auth-perk-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.auth-perk-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(251, 191, 36, 0.4);
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-bright);
}
.auth-perk-btn {
  cursor: pointer;
}
.auth-perk-btn:hover {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.22);
}

.duo-cta-stack {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.btn-duo-green {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 2px solid #86efac;
  border-bottom: 5px solid #15803d;
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 55%, #16a34a 100%);
  color: #052e16;
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.35);
  transition: transform 0.1s ease, border-bottom-width 0.06s ease;
}
.btn-duo-green:hover:not(:disabled) {
  transform: translateY(-1px);
}
.btn-duo-green:active:not(:disabled) {
  transform: translateY(3px);
  border-bottom-width: 2px;
}
.btn-duo-green:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-duo-secondary {
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 16px;
  border: 2px solid rgba(251, 191, 36, 0.55);
  border-bottom: 5px solid #0f172a;
  background: rgba(23, 37, 66, 0.95);
  color: var(--gold-bright);
  font-size: 14.5px;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform 0.1s ease, border-bottom-width 0.06s ease;
}
.btn-duo-secondary:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.btn-duo-secondary:active {
  transform: translateY(3px);
  border-bottom-width: 2px;
}

/* Stage 2 Sanctuary */
.auth-sanctuary-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 22px;
  align-items: center;
}
.auth-sanctuary-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.auth-mentor-hero {
  width: 148px;
  height: 148px;
  object-fit: contain;
  border-radius: 24px;
  border: 2.5px solid var(--gold);
  background: #0f172a;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.5);
}

.auth-sanctuary-card {
  background: rgba(16, 27, 50, 0.95);
  border: 2px solid rgba(251, 191, 36, 0.45);
  border-radius: 24px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.6);
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.auth-mode-tab {
  min-height: 42px;
  border-radius: 13px;
  border: 1.5px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-dim);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.auth-mode-tab.active {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.22);
  color: var(--gold-bright);
}

.auth-card-heading h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}
.auth-card-heading p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--text-dim);
}

.auth-step-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-oauth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.btn-oauth {
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 13px;
  border: 1.5px solid var(--border-soft);
  border-bottom: 4px solid rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.1s ease;
}
.btn-oauth:hover {
  transform: translateY(-1px);
  border-color: var(--gold);
}
.btn-oauth.google {
  background: #ffffff;
  color: #0f172a;
  border-color: #e2e8f0;
  border-bottom-color: #94a3b8;
}
.btn-oauth.google .oauth-badge {
  color: #2563eb;
  font-weight: 900;
  font-size: 15px;
}
.btn-oauth.apple {
  background: #090d16;
  color: #ffffff;
  border-color: #334155;
  border-bottom-color: #020617;
}
.btn-oauth.passkey {
  background: #1e1b4b;
  color: #e0e7ff;
  border-color: #6366f1;
  border-bottom-color: #0f172a;
}

.auth-or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}
.auth-or-divider::before,
.auth-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.auth-inputs-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-field-wrap input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border-radius: 12px;
  border: 1.5px solid var(--border-soft);
  background: #091224;
  color: #ffffff;
  font-size: 16px; /* Prevents iOS Safari auto-zoom on focus! */
  font-weight: 600;
}
.auth-field-wrap input:focus {
  outline: none;
  border-color: var(--gold);
}

.auth-submit-btn {
  width: 100%;
  min-height: 48px;
  font-size: 14.5px;
}

.auth-status-note {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #d1fae5;
  font-size: 12.5px;
  line-height: 1.35;
}

.otp-entry-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.otp-master-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 2px solid var(--gold);
  background: #091224;
  color: var(--gold-bright);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.36em;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.otp-visual-boxes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  width: 100%;
}
.otp-box {
  height: 34px;
  border-radius: 9px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 15px;
  color: var(--gold-bright);
}
.otp-box.filled {
  border-color: var(--gold);
  background: rgba(245, 158, 11, 0.2);
}

.auth-code-subactions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-error-banner {
  padding: 9px 12px;
  border-radius: 12px;
  background: rgba(159, 18, 57, 0.38);
  border: 1.5px solid #fb7185;
  color: #ffe4e6;
  font-size: 12.5px;
  font-weight: 700;
}

/* ======================== LOBBY GRID ======================== */
.lobby-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 300px 1fr 340px;
  gap: 16px;
  padding: 14px 20px;
  overflow: hidden;
  align-items: stretch;
}

.lobby-left, .lobby-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  min-width: 0;
}

.feature-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 2px solid var(--border-soft);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-arcade);
  transition: transform 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}
.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
}
.vault-card { border-color: rgba(16, 185, 129, 0.48); }
.chest-card { border-color: rgba(251, 191, 36, 0.55); background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(88, 28, 135, 0.52)); }
.armory-card { border-color: rgba(56, 189, 248, 0.45); }

.fc-icon { font-size: 28px; flex-shrink: 0; }
.fc-text { flex: 1; min-width: 0; padding-right: 0; }
.fc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.fc-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.5);
  white-space: nowrap;
}
.fc-badge.gold-pulse {
  background: rgba(251, 191, 36, 0.24);
  color: var(--gold-bright);
  border-color: var(--gold);
}
.fc-badge.sky-badge {
  background: rgba(56, 189, 248, 0.22);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.5);
}

.quests-box {
  flex: 1;
  min-height: 0;
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: var(--shadow-arcade);
  overflow: hidden;
}
.quests-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.quests-title-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 2px 0;
  color: var(--gold-bright);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.quest-ready-pill {
  padding: 2px 6px;
  border-radius: 999px;
  background: #10b981;
  color: #052e16;
  font-size: 9.5px;
  font-weight: 900;
  white-space: nowrap;
}
.link-pill {
  background: rgba(251, 191, 36, 0.16);
  color: var(--gold-bright);
  border: 1px solid var(--border-gold);
  border-radius: 99px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.quest-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
}
.quest-item {
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  padding: 7px 9px;
  font-size: 12px;
  flex-shrink: 0;
}
.quest-item.claimable {
  border-color: #10b981;
  background: rgba(6, 78, 59, 0.45);
}
.quest-item.done {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(6, 78, 59, 0.25);
}
.quest-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  margin-bottom: 3px;
}
.quest-title-txt {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.quest-top > span:last-child {
  white-space: nowrap;
  flex-shrink: 0;
}
.quest-desc-txt {
  font-size: 11px;
  color: #cbd5e1;
  margin-bottom: 4px;
}
.btn-claim-quest {
  padding: 3px 9px;
  border-radius: 8px;
  border: 1px solid #6ee7b7;
  border-bottom: 3px solid #047857;
  background: #10b981;
  color: #052e16;
  font-size: 10.5px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.quest-prog-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
}
.quest-prog-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #10b981, #fbbf24);
}

/* ======================== CENTER PEDESTAL STAGE ======================== */
.lobby-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  min-width: 0;
  background: radial-gradient(ellipse at 50% 62%, rgba(251, 191, 36, 0.18) 0%, rgba(56, 189, 248, 0.08) 42%, transparent 72%);
  border-radius: 26px;
  padding: 10px 12px;
}

.pedestal-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  width: 100%;
  min-height: 0;
}

.stage3d-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 560px;
}

.stage3d-top-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2px;
  z-index: 4;
}

.stage3d-canvas {
  width: 100%;
  height: clamp(220px, 44dvh, 310px);
  display: block;
  cursor: grab;
  touch-action: pan-y;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.48));
}
.stage3d-canvas:active {
  cursor: grabbing;
}

.stage3d-captions {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
  width: 100%;
}

.stage3d-caption-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
}
.stage3d-caption-card .pedestal-emote-bubble {
  top: -38px;
  z-index: 10;
}

.pedestal-member-tag {
  margin-bottom: 4px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.24);
  border: 1px solid rgba(56, 189, 248, 0.65);
  color: #e0f2fe;
  font-size: 10.5px;
  font-weight: 800;
  white-space: nowrap;
}

.pedestal-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.pedestal-emote-bubble {
  position: absolute;
  top: -18px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  padding: 5px 12px;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  animation: floatBob 1.8s ease-in-out infinite;
  white-space: nowrap;
}

.pedestal-tier-pill {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.07em;
  padding: 3px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
}

.pedestal-figurine {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 28px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  border: 3px solid rgba(251, 191, 36, 0.55);
  animation: floatBob 3.2s ease-in-out infinite;
  background: #0f172a;
  margin-top: 6px;
}

.pedestal-unit.partner .pedestal-figurine {
  width: 165px;
  height: 165px;
  border-color: #38bdf8;
}

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

.pedestal-base {
  margin-top: 2px;
  padding: 7px 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 65%, #b45309 100%);
  color: #0f172a;
  font-weight: 900;
  font-size: 15.5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  text-align: center;
  white-space: nowrap;
}
.pedestal-caret {
  font-size: 11px;
  opacity: 0.78;
}
.pedestal-sub {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: center;
  max-width: 260px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stage-emote-bar {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: 100%;
}
.emote-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  background: rgba(30, 41, 59, 0.88);
  color: var(--text-main);
  border: 1.5px solid var(--border-soft);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.emote-chip:hover { border-color: var(--gold); transform: scale(1.04); }

/* ======================== RIGHT COLUMN: MODES & PARTY ======================== */
.panel-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-arcade);
}
.panel-kicker {
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 9px;
}

.mode-buttons {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.72);
  border: 2px solid transparent;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.14s ease;
}
.mode-btn strong { display: block; font-size: 14px; }
.mode-btn small { font-size: 11.5px; color: var(--text-dim); }
.mode-icon { font-size: 24px; }
.mode-btn:hover { background: rgba(30, 41, 59, 0.92); }
.mode-btn.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(37, 99, 235, 0.25));
}

.party-help {
  font-size: 11.5px;
  color: var(--text-dim);
  margin: 0 0 8px;
  line-height: 1.35;
}
.party-actions-row {
  display: grid;
  grid-template-columns: auto minmax(64px, 1fr) auto;
  gap: 6px;
  align-items: center;
}
.party-join-inline {
  display: contents;
}
.party-actions-row input,
#inputPartyCode {
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--border-soft);
  background: #091224;
  color: var(--gold-bright);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}
#btnCreateParty,
#btnJoinParty {
  white-space: nowrap;
}

.btn-secondary, .btn-primary {
  padding: 9px 13px;
  border-radius: 11px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
  border: 1.5px solid var(--border-soft);
  background: #1e293b;
  color: var(--text-main);
}
.btn-primary {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 65%, #d97706 100%);
  color: #0f172a;
  border-color: var(--gold-bright);
  border-bottom: 4px solid #92400e;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.65), 0 6px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), border-bottom-width 0.06s ease;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); }
.btn-primary:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.btn-secondary:hover { border-color: var(--gold); }

.party-code-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px dashed var(--gold);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 8px;
}
.code-label { display: block; font-size: 10px; color: var(--text-dim); font-weight: 800; }
.party-code-banner strong { font-size: 22px; color: var(--gold-bright); letter-spacing: 0.14em; }
.party-mini-btns { display: flex; gap: 6px; }
.btn-tiny {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: #1e293b;
  color: var(--text-main);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}
.btn-tiny.danger { color: #fda4af; border-color: rgba(251, 113, 133, 0.4); }
.party-member-pills {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
}
.party-member-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(30, 58, 138, 0.35);
}

.party-queue-toggle {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: #fde68a;
  cursor: pointer;
}

.net-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid var(--border-soft);
  border-radius: 14px;
}
.net-mode-pill {
  padding: 7px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}
.net-mode-pill.active {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.45);
}

.matchmaking-overlay {
  position: fixed;
  inset: 0;
  z-index: 68;
  background: rgba(9, 18, 36, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.matchmaking-card {
  width: min(510px, 94vw);
  background: linear-gradient(180deg, #13284c 0%, #0d1b36 100%);
  border: 2.5px solid #38bdf8;
  border-radius: 24px;
  padding: 20px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72);
  text-align: center;
}
.mm-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #7dd3fc;
}
.mm-count-row {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.mm-count-row strong {
  font-size: 26px;
  color: #fef08a;
}
.mm-timer-pill {
  padding: 4px 11px;
  border-radius: 99px;
  background: rgba(2, 132, 199, 0.35);
  border: 1px solid #38bdf8;
  font-size: 12.5px;
  font-weight: 800;
  color: #e0f2fe;
}
.mm-avatars-row {
  margin: 14px 0 10px;
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 44px;
}
.mm-avatar-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid #fde047;
  font-size: 12px;
  font-weight: 800;
}
.mm-avatar-chip img {
  width: 26px;
  height: 26px;
}
.mm-sub-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
}
.mm-actions-row {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.btn-play-giant {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 22px;
  border: 3px solid #fef08a;
  border-bottom: 7px solid #b45309;
  background: linear-gradient(180deg, #fef08a 0%, #fbbf24 48%, #d97706 100%);
  color: #0f172a;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.48), inset 0 3px 0 rgba(255, 255, 255, 0.78);
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1), border-bottom-width 0.06s ease;
}
.btn-play-giant:hover { transform: translateY(-2px) scale(1.02); }
.btn-play-giant:active { transform: translateY(4px) scale(0.99); border-bottom-width: 3px; }
.play-spark { font-size: 30px; }
.play-main { font-size: 20px; font-weight: 900; letter-spacing: 0.03em; }
.play-sub { font-size: 11.5px; font-weight: 700; opacity: 0.85; }

/* ======================== ARENA & DROP MAP ======================== */
#arenaCanvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

#arenaHudCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(9, 18, 36, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.drop-card {
  width: min(740px, 96vw);
  max-height: calc(100dvh - 16px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #10203d;
  border: 2.5px solid var(--gold);
  border-radius: 24px;
  padding: 16px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}
.drop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.drop-kicker { font-size: 11px; font-weight: 900; color: var(--gold); letter-spacing: 0.1em; }
.drop-header h2 { margin: 3px 0 0; font-size: 20px; }
.drop-timer-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.85);
  padding: 8px 14px;
  border-radius: 14px;
  border: 1px solid var(--border-gold);
}
.drop-timer-box strong { font-size: 22px; color: var(--gold-bright); }
.btn-launch-now {
  padding: 8px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.drop-island-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: clamp(160px, 52dvh, 360px);
  border-radius: 22px;
  border: 3.5px solid #fbbf24;
  overflow: hidden;
  box-shadow: inset 0 0 28px rgba(2, 106, 162, 0.65), 0 12px 28px rgba(0, 0, 0, 0.45);
  background: #0369a1;
}

#dropIslandCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.drop-map-board {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  min-height: 0;
  height: 100%;
  align-items: stretch;
}

.zone-drop-tile {
  position: relative;
  padding: 11px 9px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.94));
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-bottom: 4px solid rgba(9, 18, 36, 0.95);
  color: #fff;
  text-align: center;
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.14s ease;
}
.zone-drop-tile:hover { transform: translateY(-2px) scale(1.03); border-color: #fef08a; }
.zone-drop-tile.selected {
  border-color: #fde047;
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.45), rgba(180, 83, 9, 0.68));
  box-shadow: 0 0 24px rgba(250, 204, 21, 0.65);
  transform: translateY(-2px) scale(1.03);
}
.zone-tile-icon { font-size: 26px; }
.zone-tile-name { font-size: 13px; font-weight: 800; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-tile-meta { font-size: 11px; color: #fde68a; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-rival-badge {
  position: absolute;
  top: 6px;
  right: 7px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.9);
  padding: 2px 7px;
  border-radius: 99px;
  color: #93c5fd;
}

.drop-footer {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-dim);
  flex-wrap: nowrap;
  gap: 8px;
  overflow: hidden;
}
#selectedDropLabel,
.drop-tip {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ======================== IN-MATCH HUD ======================== */
.arena-hud-top {
  position: absolute;
  top: max(10px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
  gap: 10px;
}

.hud-vitals-stack, .hud-right-stack, .hud-center-banner {
  pointer-events: none;
}
.hud-utility-row button, .minimap-wrap {
  pointer-events: auto;
}

.vital-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid var(--border-soft);
  border-radius: 16px;
  min-width: 225px;
}
.vital-avatar { width: 42px; height: 42px; }
.vital-bars { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.vital-name-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.bush-stealth-pill {
  font-size: 10.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.bar-track {
  position: relative;
  height: 13px;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill { height: 100%; }
.shield-fill { background: linear-gradient(90deg, #06b6d4, #38bdf8); }
.hp-fill { background: linear-gradient(90deg, #22c55e, #4ade80); }
.bar-track span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  text-shadow: 0 1px 2px #000;
}

.squad-vitals-list {
  margin-top: 5px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 280px;
}
.current-realm-pill {
  margin-top: 5px;
  padding: 5px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 58, 138, 0.78));
  border: 1.5px solid rgba(253, 224, 71, 0.55);
  display: flex;
  flex-direction: column;
  gap: 1px;
  max-width: 265px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.realm-pill-title {
  font-size: 11px;
  font-weight: 900;
  color: #fef08a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.realm-pill-concept {
  font-size: 9.5px;
  font-weight: 700;
  color: #bae6fd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 640px), (max-height: 500px) {
  .current-realm-pill {
    max-width: 195px;
    padding: 3px 8px;
  }
  .realm-pill-title {
    font-size: 10px;
  }
  .realm-pill-concept {
    font-size: 8.5px;
  }
}
.mate-vital-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 10px;
  font-size: 11px;
  max-width: 136px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mate-vital-pill.downed {
  border-color: #fbbf24;
  background: rgba(180, 83, 9, 0.65);
  animation: pulseWarn 0.8s infinite alternate;
}
@keyframes pulseWarn {
  from { transform: scale(1); }
  to { transform: scale(1.04); }
}

.vital-identity-cluster {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}
.vital-identity-cluster strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-center-banner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.score-pill, .wars-score-pill {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.86);
  border: 1.5px solid var(--border-gold);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.team-oly { color: #38bdf8; font-weight: 800; }
.team-tit { color: #fb7185; font-weight: 800; }
.wars-vs { font-size: 10px; font-weight: 900; color: var(--gold); }
.storm-pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.9), rgba(217, 119, 6, 0.9));
  border: 1.5px solid #fde047;
  color: #fffbeb;
  font-size: 11.5px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.4);
  white-space: nowrap;
}

.hud-right-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.hud-utility-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.net-status-pill {
  padding: 4px 9px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.86);
  border: 1px solid rgba(56, 189, 248, 0.45);
  font-size: 10.5px;
  font-weight: 800;
  color: #bae6fd;
  white-space: nowrap;
}

.hud-util-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1.5px solid rgba(253, 224, 71, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: #fef08a;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.hud-util-btn.danger {
  border-color: rgba(251, 113, 133, 0.55);
  color: #ffe4e6;
}

body.touch-active .kb-hint {
  display: none !important;
}
@media (pointer: coarse) {
  .kb-hint {
    display: none !important;
  }
}

.heroic-banner {
  position: absolute;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 28;
  padding: 7px 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fef08a 0%, #f59e0b 100%);
  border: 2.5px solid #ffffff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  white-space: nowrap;
  animation: bannerPop 0.24s cubic-bezier(0.22, 1.4, 0.36, 1);
}
@keyframes bannerPop {
  from { transform: translateX(-50%) scale(0.65); opacity: 0; }
  to { transform: translateX(-50%) scale(1); opacity: 1; }
}

.spectator-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.94);
  border: 2px solid #38bdf8;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  flex-wrap: wrap;
  justify-content: center;
}
.spectator-info {
  display: flex;
  flex-direction: column;
  min-width: 150px;
  text-align: center;
}
.spec-kicker {
  font-size: 10px;
  font-weight: 900;
  color: #7dd3fc;
  letter-spacing: 0.08em;
}
.spec-cheer-btn {
  border-color: #f472b6;
  color: #fbcfe8;
}

.minimap-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  border: 2px solid var(--gold);
  border-radius: 16px;
  overflow: hidden;
  background: #072f49;
  box-shadow: var(--shadow-arcade);
  cursor: pointer;
}
#minimapCanvas { display: block; width: 100%; height: 100%; }
.tactical-map-overlay {
  position: absolute;
  inset: 0;
  z-index: 38;
  background: rgba(9, 18, 36, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.tactical-map-card {
  max-width: 96vw;
  max-height: calc(100dvh - 20px);
  background: #10203d;
  border: 2.5px solid var(--gold);
  border-radius: 24px;
  padding: 14px 18px 18px;
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.tactical-map-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
#fullIslandMapCanvas {
  width: min(520px, 76vmin);
  height: min(520px, 76vmin);
  border-radius: 18px;
  border: 3px solid #fbbf24;
  display: block;
}

.killfeed {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  max-width: 270px;
}
.kf-pill {
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.82);
  font-size: 11px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.partner-compass {
  position: absolute;
  z-index: 22;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.92);
  border: 2px solid #fef08a;
  color: #fff;
  font-weight: 900;
  font-size: 12px;
  pointer-events: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.arena-hud-bottom {
  position: absolute;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.weapon-dock button, .arena-emote-strip {
  pointer-events: auto;
}

.weapon-dock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-arcade);
}
.weapon-star-pill {
  padding: 4px 8px;
  border-radius: 9px;
  font-weight: 900;
  font-size: 13px;
  background: #22c55e;
  color: #052e16;
}
.weapon-icon-big { font-size: 26px; }
.weapon-meta { min-width: 155px; }
.weapon-title { font-size: 13px; font-weight: 800; margin-bottom: 3px; }
.nectar-bar-track {
  position: relative;
  height: 12px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  overflow: hidden;
}
.nectar-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fde047);
}
.nectar-bar-track span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9.5px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px #000;
}

.action-pill-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--border-soft);
  background: #1e293b;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}
.action-pill-btn small { font-size: 9.5px; font-weight: 800; margin-top: 1px; }
.action-pill-btn.swap-highlight {
  border-color: #fde047;
  background: rgba(245, 158, 11, 0.35);
}

.arena-emote-strip {
  display: flex;
  gap: 5px;
  background: rgba(15, 23, 42, 0.82);
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
}
.arena-emote-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  font-size: 17px;
  cursor: pointer;
}
.arena-emote-btn:hover { transform: scale(1.12); background: rgba(251, 191, 36, 0.3); }

/* ======================== TWIN-STICK TOUCH CONTROLS ======================== */
.touch-layer {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  display: none;
}
body.touch-active .touch-layer {
  display: block;
}
.touch-zone {
  position: absolute;
  bottom: 0;
  top: 90px;
  width: 48%;
  pointer-events: auto;
  touch-action: none;
}
.left-zone { left: 0; }
.right-zone { right: 0; }

.stick-base {
  position: absolute;
  bottom: 85px;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 2.5px solid rgba(255, 255, 255, 0.34);
  display: flex;
  align-items: center;
  justify-content: center;
}
#leftStickBase { left: max(32px, calc(env(safe-area-inset-left) + 18px)); }
#rightStickBase {
  right: max(32px, calc(env(safe-area-inset-right) + 18px));
  border-color: rgba(251, 191, 36, 0.65);
  background: rgba(245, 158, 11, 0.16);
}
.stick-knob {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.fire-stick-knob {
  background: linear-gradient(135deg, #fde047, #f59e0b);
}

.touch-arc-btn {
  position: absolute;
  z-index: 18;
  pointer-events: auto;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid rgba(253, 224, 71, 0.75);
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  font-size: 21px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.48);
  cursor: pointer;
}
.touch-arc-btn:active {
  transform: scale(0.92);
}
#touchMeleeBtn {
  bottom: 214px;
  right: max(38px, calc(env(safe-area-inset-right) + 24px));
}
#touchDashBtn {
  bottom: 214px;
  right: calc(max(38px, calc(env(safe-area-inset-right) + 24px)) + 58px);
  border-color: #38bdf8;
  background: rgba(12, 74, 110, 0.92);
}
#touchSwapBtn {
  bottom: 214px;
  right: calc(max(38px, calc(env(safe-area-inset-right) + 24px)) + 116px);
  border-color: #4ade80;
  background: rgba(6, 78, 59, 0.92);
}
#touchInteractBtn {
  bottom: 272px;
  right: max(38px, calc(env(safe-area-inset-right) + 24px));
}

/* ======================== MODALS & 64-CHARACTER VAULT ======================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 12, 26, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

.modal-window {
  width: min(680px, 96vw);
  max-height: calc(100dvh - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-card-solid);
  border: 2px solid var(--border-gold);
  border-radius: 24px;
  padding: 16px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}
.modal-window.modal-wide {
  width: min(1060px, 96vw);
}

.modal-scroll-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.modal-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.modal-header > div:first-child {
  min-width: 0;
  flex: 1;
}
.modal-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--gold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.modal-header h2 {
  margin: 2px 0 0;
  font-size: clamp(15px, 2.2vw, 22px);
  line-height: 1.2;
}
.modal-header-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

@media (max-width: 480px) {
  .modal-window { padding: 12px; }
  .modal-header { gap: 6px; margin-bottom: 8px; }
  .modal-kicker { display: none; }
  .modal-header h2 { font-size: 14.5px; }
  .modal-header-right { gap: 4px; }
  .modal-header-right .pill-stat { padding: 3px 6px; font-size: 11px; }
  .btn-close-modal { width: 32px; height: 32px; font-size: 14px; }
}
.btn-close-modal {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border-soft);
  background: #1e293b;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.tier-filter-tabs {
  flex-shrink: 0;
  display: flex;
  gap: 7px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 10px;
}
.tier-tab {
  flex-shrink: 0;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1.5px solid var(--border-soft);
  background: #0f172a;
  color: var(--text-dim);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}
.tier-tab.active {
  background: var(--gold);
  color: #0f172a;
  border-color: var(--gold-bright);
}

.vault-layout {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 16px;
}

.vault-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 4px;
}

.char-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 7px;
  border-radius: 15px;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(148, 163, 184, 0.22);
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.char-tile:hover { transform: translateY(-2px); border-color: var(--gold); }
.char-tile.selected { border-color: #fde047; box-shadow: 0 0 16px rgba(251, 191, 36, 0.45); }
.char-tile.locked img { filter: grayscale(0.55) brightness(0.68); }
.char-tile img { width: 66px; height: 66px; border-radius: 12px; object-fit: cover; }
.char-tile-name { font-size: 12px; font-weight: 800; margin-top: 5px; text-align: center; }
.char-tile-tier { font-size: 10px; font-weight: 800; margin-top: 2px; }
.char-lock-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.92);
  color: var(--gold-bright);
  font-weight: 800;
}

.vault-inspector {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid var(--border-soft);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.vault-inspector img {
  width: 170px;
  height: 170px;
  border-radius: 20px;
  border: 2.5px solid var(--gold);
  margin-bottom: 10px;
}
.inspector-lore {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
  margin: 8px 0 12px;
}

/* Mystery Chests */
.chest-tiers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.chest-box-card {
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid var(--border-soft);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chest-big-emoji {
  font-size: 46px;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.chest-box-card:hover .chest-big-emoji {
  transform: scale(1.16) rotate(-6deg);
}
.chest-reveal-stage {
  margin-top: 16px;
  padding: 18px;
  border-radius: 20px;
  background:
    repeating-conic-gradient(from 0deg, rgba(253, 224, 71, 0.14) 0deg 15deg, transparent 15deg 30deg),
    radial-gradient(circle, rgba(251, 191, 36, 0.32), rgba(15, 23, 42, 0.96));
  border: 2.5px solid var(--gold);
  text-align: center;
  animation: heroPopReveal 0.48s cubic-bezier(0.18, 1.4, 0.32, 1);
}
.chest-reveal-stage img {
  width: 176px;
  height: 176px;
  border-radius: 22px;
  border: 3px solid var(--gold-bright);
  box-shadow: 0 12px 32px rgba(251, 191, 36, 0.45);
}

@keyframes heroPopReveal {
  0% { transform: scale(0.65); opacity: 0; }
  70% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Armory & Trail & Results */
.cosmetic-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.cosmetic-chip {
  padding: 8px 13px;
  border-radius: 12px;
  background: #0f172a;
  border: 1.5px solid var(--border-soft);
  color: #fff;
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}
.cosmetic-chip.active { border-color: var(--gold); background: rgba(245, 158, 11, 0.22); }
.cosmetic-chip.locked { opacity: 0.5; cursor: not-allowed; }

.weapons-codex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 10px;
}
.weapon-codex-card {
  background: rgba(15, 23, 42, 0.82);
  border: 1.5px solid var(--border-soft);
  border-radius: 14px;
  padding: 11px 13px;
}
.weapon-codex-card.mythic { border-color: #ec4899; background: rgba(131, 24, 67, 0.28); }

.season-trail-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 10px;
}
.trail-node {
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  border: 1.5px solid var(--border-soft);
}
.trail-node.claimed {
  border-color: #10b981;
  background: rgba(6, 78, 59, 0.32);
}

.inline-row { display: flex; gap: 8px; margin-top: 6px; }
.inline-row input {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--border-soft);
  background: #091224;
  color: #fff;
}
.cloud-sync-box {
  margin-top: 14px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border-soft);
  font-size: 13px;
}
.stats-mini-grid, .achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.stat-box, .ach-card {
  padding: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid var(--border-soft);
  font-size: 12px;
}
.ach-card.unlocked { border-color: var(--gold); background: rgba(245, 158, 11, 0.16); }

.leaderboard-list { display: flex; flex-direction: column; gap: 7px; }
.leader-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-soft);
}

.results-window { text-align: center; }
.results-banner h2 { font-size: 28px; color: var(--gold-bright); margin: 4px 0; }
.results-podium-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 14px 0;
  flex-wrap: wrap;
}
.podium-hero img { width: 112px; height: 112px; border-radius: 18px; border: 2.5px solid var(--gold); }
.results-rewards-strip {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.reward-chip {
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  border: 1.5px solid var(--gold);
  font-weight: 900;
}
.results-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.btn-play-again {
  padding: 11px 22px;
  border-radius: 14px;
  border: 2px solid #fef08a;
  background: linear-gradient(135deg, #fde047, #f59e0b);
  color: #0f172a;
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
}

/* ReadAchilles Ecosystem Switcher Pill & Menu */
.royale-eco-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.pill-eco {
  border-color: rgba(251, 191, 36, 0.55);
  background: rgba(15, 23, 42, 0.92);
  font-weight: 800;
}
.royale-eco-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 268px;
  padding: 8px;
  border-radius: var(--radius-md);
  background: rgba(13, 25, 48, 0.98);
  border: 1.5px solid var(--border-gold);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65);
  z-index: 6000;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.royale-eco-kicker {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--gold);
  padding: 4px 10px 3px;
}
.royale-eco-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-main);
  transition: background 0.14s ease;
}
.royale-eco-link:hover,
.royale-eco-link.active {
  background: rgba(251, 191, 36, 0.14);
}
.royale-eco-link span {
  font-size: 18px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.royale-eco-link strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
}
.royale-eco-link small {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
}

/* Cross-Platform Pairing & Platform Badges */
.pair-code-banner {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.22), rgba(245, 158, 11, 0.24));
  border: 1.5px solid #fde047;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.pair-code-banner strong {
  font-size: 21px;
  letter-spacing: 0.18em;
  color: #fde047;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.platform-mini-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.38);
  font-size: 10px;
  font-weight: 800;
  color: #bae6fd;
  margin-left: 4px;
}

/* Foldable & Compact Tablet Landscape (e.g. Galaxy Z Fold Unfolded 828x690 & Tab A9 1024x600) */
@media (max-width: 1120px) and (min-height: 501px) and (orientation: landscape) {
  .lobby-grid {
    grid-template-columns: minmax(190px, 224px) minmax(0, 1fr) minmax(210px, 246px);
    gap: 10px;
    padding: 10px max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  }
  .lobby-stage {
    min-width: 0;
    padding: 8px;
  }
  .stage3d-canvas {
    height: clamp(170px, 34dvh, 240px);
  }
  .feature-card {
    padding: 9px 11px;
    gap: 9px;
  }
  .fc-icon { font-size: 22px; }
  .fc-title { font-size: 13.5px; }
  .panel-card { padding: 10px 11px; }
  .mode-btn { padding: 7px 9px; gap: 8px; }
  .mode-btn small { display: none; }
  .btn-play-giant { min-height: 52px; padding: 10px 12px; }
  .play-main { font-size: 14.5px; }
  .play-sub { font-size: 10px; }
}

/* Responsive Tablet & Portrait Layout (Zero-Scroll Docked Play CTA & Non-Overlapping HUD Bands) */
@media (max-width: 980px) and (orientation: portrait) {
  .auth-welcome-grid,
  .auth-sanctuary-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .auth-sanctuary-aside {
    flex-direction: row;
    text-align: left;
    gap: 10px;
  }
  .auth-mentor-hero {
    width: 68px;
    height: 68px;
    border-radius: 16px;
    flex-shrink: 0;
  }
  .auth-oauth-grid {
    grid-template-columns: 1fr;
  }
  .auth-spotlight-stage {
    width: 118px;
    height: 118px;
  }
  .auth-spotlight-hero {
    width: 102px;
    height: 102px;
  }
  .topbar {
    padding: max(5px, env(safe-area-inset-top)) 10px 5px;
    gap: 5px;
    flex-wrap: wrap;
  }
  .brand-crest { width: 24px; height: 24px; }
  .brand-title { font-size: 14px; }
  .brand-sub, .pill-label, .mini-xp-track, .eco-label-txt, .audio-state-pill .audio-label, #hudEquippedDeityChip { display: none; }
  .currency-strip {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 100%;
  }
  .pill-stat, .profile-chip, .icon-btn, .audio-state-pill {
    padding: 3px 7px;
    font-size: 11px;
    flex-shrink: 0;
  }
  .lobby-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 7px;
    padding: 6px max(10px, env(safe-area-inset-right)) 68px max(10px, env(safe-area-inset-left));
    overflow-y: auto;
  }
  .lobby-stage {
    order: 1;
    padding: 6px 8px 8px;
    min-height: auto;
    height: auto;
    overflow: visible;
  }
  #lobbyPedestalRow { min-height: auto; height: auto; }
  .stage3d-canvas { height: clamp(112px, 18.5dvh, 146px); }
  .stage3d-captions { margin-top: 2px; }
  .pedestal-sub { display: none; }
  .stage-emote-bar { margin-top: 5px; gap: 4px; flex-wrap: wrap; justify-content: center; }
  .emote-chip { min-height: 28px; padding: 3px 8px; font-size: 10.5px; }
  .lobby-right { order: 2; gap: 6px; min-height: auto; height: auto; overflow: visible; }
  .panel-card { padding: 7px 10px; border-radius: 12px; }
  .panel-kicker { font-size: 9px; margin-bottom: 4px; }
  .party-help { display: none; }
  .lobby-left {
    order: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    min-height: auto;
    height: auto;
    overflow: visible;
  }
  .lobby-left .feature-card {
    padding: 6px 8px;
    gap: 6px;
    border-radius: 12px;
  }
  .lobby-left .fc-icon { font-size: 16px; }
  .lobby-left .fc-title { font-size: 11px; }
  .lobby-left .fc-badge { font-size: 9px; padding: 1px 5px; }
  .lobby-left .fc-desc { display: none; }
  .quests-box {
    flex: none;
    max-height: none;
    overflow: hidden;
    padding: 6px 8px;
    border-radius: 12px;
    justify-content: center;
  }
  .quests-box .quests-title-btn { font-size: 11px; }
  .quests-box .quest-ready-pill { font-size: 8.5px; padding: 1px 4px; }
  .quests-box .link-pill { font-size: 9px; padding: 2px 5px; }
  .quests-box #lobbyQuestList { display: none; }
  .mode-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .mode-btn { padding: 6px 8px; gap: 6px; border-radius: 10px; }
  .mode-btn small { display: none; }
  #btnPlayNow {
    position: fixed;
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
    bottom: max(6px, env(safe-area-inset-bottom));
    z-index: 38;
    padding: 8px 14px;
    min-height: 46px;
    border-radius: 16px;
    border-bottom-width: 4px;
  }
  .play-main { font-size: 14.5px; }
  .play-sub { font-size: 9.5px; }
  .pedestal-figurine {
    width: 138px;
    height: 138px;
  }
  .vault-layout {
    grid-template-columns: 1fr;
  }
  .vault-grid {
    max-height: 42dvh;
  }
  .vault-inspector img {
    width: 96px;
    height: 96px;
  }
  .chest-tiers-grid {
    grid-template-columns: 1fr;
  }
  .vital-card {
    min-width: 130px;
  }
  .drop-card {
    padding: 10px 12px;
    max-height: calc(100dvh - 16px);
  }
  .drop-header {
    flex-wrap: wrap;
    gap: 6px;
  }
  .drop-header h2 { font-size: 13px; }
  .drop-kicker { font-size: 9px; }
  .drop-timer-box {
    width: 100%;
    justify-content: space-between;
    padding: 4px 8px;
  }
  .drop-island-stage { height: clamp(180px, 44dvh, 290px); }
  .drop-map-board { gap: 6px; padding: 6px; }
  .zone-drop-tile { padding: 5px 4px; border-radius: 10px; }
  .zone-tile-icon { font-size: 16px; }
  .zone-tile-name { font-size: 10px; margin-top: 2px; }
  .zone-tile-meta, .drop-tip { display: none; }
}

/* Portrait Phones (< 640px wide): Non-Overlapping Bottom Weapon Dock + Elevated Twin-Sticks */
@media (max-width: 640px) and (orientation: portrait) {
  .auth-stage-shell {
    padding: max(10px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)) 12px;
    gap: 10px;
  }
  .auth-amphitheater-card,
  .auth-sanctuary-card {
    padding: 13px 14px;
    border-radius: 18px;
  }
  .auth-cast-chip span {
    font-size: 9.5px;
  }
  .arena-hud-top {
    left: 8px;
    right: 8px;
    gap: 4px;
  }
  .vital-card {
    min-width: 112px;
    max-width: 38vw;
    padding: 4px 6px;
    gap: 5px;
    border-radius: 11px;
  }
  .vital-avatar { width: 24px; height: 24px; }
  .vital-name-row { font-size: 10.5px; }
  .deity-mini-chip { font-size: 9px; padding: 1px 5px; }
  .bar-track { height: 10px; }
  .bar-track span { font-size: 8.5px; }
  .mate-vital-pill { padding: 3px 6px; font-size: 10px; }
  .hud-center-banner { gap: 4px; }
  .score-pill, .wars-score-pill { padding: 3px 7px; font-size: 10px; gap: 4px; }
  .storm-pill { padding: 3px 7px; font-size: 9.5px; }
  .minimap-wrap { width: 72px; height: 72px; border-radius: 10px; }
  .net-status-pill { display: none; }
  .hud-util-btn { min-width: 28px; height: 26px; padding: 0 6px; font-size: 10.5px; }
  .killfeed, .arena-emote-strip { display: none !important; }
  .arena-hud-bottom {
    bottom: max(6px, env(safe-area-inset-bottom));
    width: calc(100vw - 16px);
    flex-wrap: nowrap;
    gap: 4px;
  }
  .weapon-dock {
    padding: 4px 6px;
    gap: 4px;
    border-radius: 12px;
    max-width: 100%;
    flex-wrap: nowrap;
  }
  .weapon-icon-big { font-size: 16px; }
  .weapon-meta { min-width: 64px; flex: 1; }
  .weapon-title { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 86px; }
  .weapon-actions { display: flex; gap: 3px; flex-wrap: nowrap; flex-shrink: 0; }
  .action-pill-btn { padding: 3px 5px; font-size: 11px; }
  .stick-base {
    width: 84px;
    height: 84px;
    bottom: calc(max(6px, env(safe-area-inset-bottom)) + 74px);
  }
  #leftStickBase { left: max(12px, calc(env(safe-area-inset-left) + 8px)); }
  #rightStickBase { right: max(12px, calc(env(safe-area-inset-right) + 8px)); }
  .stick-knob { width: 38px; height: 38px; font-size: 16px; }
  .touch-arc-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
  #touchMeleeBtn {
    bottom: calc(max(6px, env(safe-area-inset-bottom)) + 162px);
    right: max(14px, calc(env(safe-area-inset-right) + 10px));
  }
  #touchDashBtn {
    bottom: calc(max(6px, env(safe-area-inset-bottom)) + 162px);
    right: calc(max(14px, calc(env(safe-area-inset-right) + 10px)) + 52px);
  }
  #touchSwapBtn {
    bottom: calc(max(6px, env(safe-area-inset-bottom)) + 162px);
    right: calc(max(14px, calc(env(safe-area-inset-right) + 10px)) + 104px);
  }
  #touchInteractBtn {
    bottom: calc(max(6px, env(safe-area-inset-bottom)) + 214px);
    right: max(14px, calc(env(safe-area-inset-right) + 10px));
  }
}

/* Medium-Height Landscape Tablets (`541px..820px` height: iPad mini, Tab A9, Z Fold Unfolded, Tab S9) */
@media (max-height: 820px) and (orientation: landscape) {
  .topbar {
    padding: max(6px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 6px max(14px, env(safe-area-inset-left));
    gap: 8px;
    flex-wrap: nowrap;
  }
  .lobby-grid {
    grid-template-columns: 242px 1fr 274px;
    gap: 12px;
    padding: 8px max(14px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    height: calc(100dvh - 50px);
    max-height: calc(100dvh - 50px);
    overflow: hidden;
  }
  .lobby-left, .lobby-right {
    max-height: 100%;
    overflow: hidden;
    gap: 7px;
  }
  .lobby-right {
    justify-content: space-between;
  }
  .mode-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .mode-btn { padding: 6px 8px; gap: 6px; }
  .mode-icon { font-size: 17px; }
  .mode-btn strong { font-size: 11.5px; line-height: 1.15; }
  .mode-btn small { display: none; }
  .panel-card { padding: 8px 10px; }
  .party-help { display: none; }
  .btn-play-giant {
    margin-top: auto;
    flex-shrink: 0;
    padding: 10px 14px;
    min-height: 44px;
    border-radius: 16px;
    border-bottom-width: 4px;
  }
  .play-main { font-size: 15px; }
  .play-sub { font-size: 10px; }
  .stage3d-canvas { height: clamp(160px, 38dvh, 250px); }
}

/* Native iOS & Android Widescreen Landscape Arcade Layout (iPhone Dynamic Island / Pixel / Z Fold Cover `344px..540px` height) */
@media (max-height: 540px) and (orientation: landscape) {
  /* Auth Gate Widescreen Split: Zero Clipping at 360-393px Height! */
  .auth-stage-shell {
    padding: max(5px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    gap: 6px;
  }
  .auth-brand-pill { font-size: 12px; }
  .auth-brand-crest { width: 22px; height: 22px; }
  .auth-welcome-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 12px;
  }
  .auth-amphitheater-card {
    padding: 8px 12px;
    border-radius: 16px;
    gap: 6px;
  }
  .duo-speech-bubble {
    padding: 6px 10px;
    border-radius: 12px;
  }
  .duo-speech-copy { font-size: 11px; line-height: 1.25; }
  .auth-spotlight-stage { width: 84px; height: 84px; }
  .auth-spotlight-hero,
  .auth-spotlight-canvas { width: 76px; height: 76px; }
  .auth-cast-kicker { display: none; }
  .auth-cast-chip { padding: 3px 2px; border-radius: 9px; font-size: 9px; }
  .auth-cast-chip img { width: 22px; height: 22px; }
  .auth-welcome-right { gap: 10px; }
  .auth-headline { font-size: 18px; }
  .auth-subcopy { font-size: 11.5px; margin-top: 4px; line-height: 1.3; }
  .auth-perk-pills { margin-top: 6px; gap: 5px; }
  .auth-perk-pill { padding: 3px 8px; font-size: 10px; }
  .duo-cta-stack { gap: 7px; }
  .btn-duo-green, .btn-duo-secondary {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 12.5px;
    border-radius: 12px;
    border-bottom-width: 3px;
  }

  .auth-sanctuary-layout {
    grid-template-columns: 205px 1fr;
    gap: 10px;
  }
  .auth-mentor-hero { width: 82px; height: 82px; border-radius: 16px; }
  .auth-sanctuary-card { padding: 9px 12px; border-radius: 16px; gap: 7px; }
  .auth-mode-tab { min-height: 30px; font-size: 11.5px; border-radius: 9px; }
  .auth-card-heading h2 { font-size: 14.5px; }
  .auth-card-heading p { display: none; }
  .auth-step-box { gap: 6px; }
  .btn-oauth { min-height: 36px; padding: 5px 7px; font-size: 10.5px; border-radius: 9px; border-bottom-width: 2px; }
  .auth-or-divider { font-size: 9px; }
  .auth-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 6px;
  }
  .auth-field-wrap input { min-height: 34px; padding: 5px 9px; border-radius: 9px; font-size: 16px; }
  .auth-submit-btn { min-height: 36px; padding: 6px 10px; font-size: 12.5px; border-radius: 10px; }
  .otp-master-input { min-height: 38px; padding: 4px 10px; font-size: 18px; }
  .otp-box { height: 26px; font-size: 12px; }

  /* Lobby Widescreen Landscape: Zero Clipping on 852x393 & 740x360! */
  .topbar {
    padding: max(3px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 3px max(12px, env(safe-area-inset-left));
    gap: 6px;
    flex-wrap: nowrap;
  }
  .royale-eco-switcher .eco-label-txt,
  .brand-sub,
  .pill-label,
  .audio-state-pill .audio-label { display: none; }
  .brand-crest { width: 22px; height: 22px; }
  .brand-title { font-size: 13.5px; white-space: nowrap; }
  .currency-strip { gap: 4px; flex-wrap: nowrap; }
  .pill-stat, .profile-chip, .audio-state-pill { padding: 3px 7px; font-size: 10.5px; white-space: nowrap; }

  .lobby-grid {
    grid-template-columns: 204px 1fr 236px;
    gap: 8px;
    padding: 4px max(12px, env(safe-area-inset-right)) max(4px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    height: calc(100dvh - 34px);
    max-height: calc(100dvh - 34px);
    overflow: hidden;
  }
  .lobby-left, .lobby-right {
    overflow: hidden;
    height: 100%;
    max-height: 100%;
    gap: 4px;
  }
  .lobby-right {
    justify-content: space-between;
  }
  .feature-card { padding: 5px 8px; border-radius: 10px; gap: 7px; }
  .fc-icon { font-size: 16px; }
  .fc-title { font-size: 11px; }
  .fc-desc { display: none; }
  .fc-badge { font-size: 8.5px; padding: 1px 5px; }
  .quests-box { padding: 5px 7px; gap: 4px; min-height: 0; }
  .quests-title-btn { font-size: 11px; }
  .link-pill { padding: 2px 7px; font-size: 9.5px; }
  .quest-item { padding: 4px 6px; border-radius: 8px; font-size: 10px; }
  .quest-desc-txt { display: none; }
  .panel-card { padding: 5px 8px; border-radius: 10px; }
  .panel-kicker { font-size: 8.5px; margin-bottom: 3px; }
  .mode-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
  .mode-btn { padding: 4px 6px; gap: 4px; border-radius: 8px; }
  .mode-icon { font-size: 14px; }
  .mode-btn strong { font-size: 10px; line-height: 1.1; }
  .mode-btn small { display: none; }
  .party-help { display: none; }
  .party-actions-row .btn-secondary,
  #inputPartyCode {
    padding: 4px 6px;
    font-size: 10px;
    height: 26px;
  }
  .net-mode-switch { padding: 2px; border-radius: 10px; }
  .net-mode-pill { padding: 3px 6px; font-size: 10px; border-radius: 7px; }
  .btn-play-giant {
    margin-top: auto;
    flex-shrink: 0;
    padding: 6px 10px;
    min-height: 40px;
    border-radius: 12px;
    border-bottom-width: 3px;
    gap: 8px;
  }
  .play-spark { font-size: 18px; }
  .play-main { font-size: 12px; }
  .play-sub { font-size: 8.5px; }
  .lobby-stage { padding: 4px 6px; min-height: 0; justify-content: center; gap: 2px; overflow: hidden; }
  #lobbyPedestalRow { min-height: 0; height: auto; }
  .pedestal-tier-pill { font-size: 9px; padding: 2px 7px; }
  .stage3d-canvas { height: clamp(124px, 44dvh, 174px); }
  .stage3d-captions { margin-top: 2px; }
  .pedestal-base { padding: 4px 14px; font-size: 12.5px; }
  .pedestal-sub { display: none; }
  .stage-emote-bar { gap: 3px; margin-top: 4px; flex-wrap: nowrap; }
  .emote-chip { min-height: 24px; padding: 2px 5px; font-size: 10px; }
  .emote-chip span { display: none; }

  /* Arena HUD Landscape */
  .arena-hud-top {
    top: max(4px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: max(10px, env(safe-area-inset-right));
  }
  .vital-card { min-width: 144px; padding: 4px 7px; border-radius: 11px; }
  .vital-avatar { width: 24px; height: 24px; }
  .current-realm-pill { max-width: 190px; padding: 2px 7px; margin-top: 3px; }
  .realm-pill-concept { display: none; }
  .squad-vitals-list { margin-top: 3px; gap: 3px; max-width: 240px; }
  .mate-vital-pill { padding: 2px 6px; font-size: 9.5px; max-width: 112px; }
  .mate-vital-pill img { width: 16px !important; height: 16px !important; }
  .heroic-banner { top: 36px; padding: 4px 12px; font-size: 11.5px; }
  .score-pill, .wars-score-pill { padding: 3px 9px; font-size: 11px; }
  .storm-pill { padding: 3px 8px; font-size: 10px; }
  .minimap-wrap { width: 82px; height: 82px; border-radius: 11px; }
  .hud-util-btn { min-width: 26px; height: 24px; padding: 0 6px; font-size: 10px; }
  .killfeed, .arena-emote-strip { display: none; }
  .arena-hud-bottom { bottom: max(5px, env(safe-area-inset-bottom)); gap: 5px; }
  .weapon-dock { padding: 4px 9px; border-radius: 12px; gap: 5px; }
  .weapon-meta { min-width: 96px; }
  .action-pill-btn { padding: 4px 7px; font-size: 13px; }
  .stick-base { width: 88px; height: 88px; bottom: 16px; }
  .stick-knob { width: 40px; height: 40px; font-size: 16px; }
  .touch-arc-btn { width: 44px; height: 44px; font-size: 18px; }
  #touchMeleeBtn {
    bottom: 114px;
    right: max(16px, calc(env(safe-area-inset-right) + 12px));
  }
  #touchDashBtn {
    bottom: 114px;
    right: calc(max(16px, calc(env(safe-area-inset-right) + 12px)) + 52px);
  }
  #touchSwapBtn {
    bottom: 114px;
    right: calc(max(16px, calc(env(safe-area-inset-right) + 12px)) + 104px);
  }
  #touchInteractBtn {
    bottom: 114px;
    right: calc(max(16px, calc(env(safe-area-inset-right) + 12px)) + 156px);
  }

  .drop-overlay { padding: 6px; }
  .drop-card {
    padding: 7px 12px;
    max-height: calc(100dvh - 12px);
    border-radius: 16px;
  }
  .drop-header { margin-bottom: 4px; }
  .drop-kicker { font-size: 9px; }
  .drop-header h2 { font-size: 13px; margin: 1px 0 0; }
  .drop-timer-box { padding: 3px 8px; gap: 6px; border-radius: 9px; }
  .drop-timer-box strong { font-size: 15px; }
  .btn-launch-now { padding: 4px 9px; font-size: 11px; }
  .drop-island-stage {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    border-radius: 12px;
    border-width: 2px;
  }
  .drop-map-board {
    padding: 5px;
    gap: 5px;
    min-height: 0;
    height: 100%;
  }
  .zone-drop-tile {
    padding: 3px 6px;
    border-radius: 8px;
    border-bottom-width: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 0;
  }
  .zone-tile-icon { font-size: 15px; }
  .zone-tile-name { font-size: 10px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .zone-tile-meta, .drop-tip { display: none; }
  .zone-rival-badge { position: static; margin-left: auto; font-size: 9px; padding: 1px 5px; }
  .drop-footer { margin-top: 4px; font-size: 10px; }
  .vault-layout { grid-template-columns: 1fr 205px; gap: 10px; }
  .vault-inspector { padding: 9px; }
  .vault-inspector img { width: 82px; height: 82px; margin-bottom: 6px; }
  .inspector-lore { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 4px 0 6px; }
  .modal-window { padding: 10px 14px; max-height: calc(100dvh - 12px); }
  .modal-header { margin-bottom: 6px; }
  .vault-grid { max-height: none; }
}

/* ======================== 8-SLOT OLYMPIAN STYLE STUDIO & HERMES DASH UI ======================== */
.style-studio-chip {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.32), rgba(245, 158, 11, 0.28)) !important;
  border-color: rgba(251, 191, 36, 0.85) !important;
}
.lucky-style-chip {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(16, 185, 129, 0.28)) !important;
  border-color: rgba(56, 189, 248, 0.85) !important;
}
.dash-pill-btn {
  border-color: rgba(56, 189, 248, 0.75) !important;
  background: rgba(12, 74, 110, 0.85) !important;
}
.style-preset-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.preset-slot-btn {
  padding: 5px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}
.preset-slot-btn.active {
  border-color: #fde047;
  background: rgba(245, 158, 11, 0.24);
  color: #fef08a;
}
.preset-slot-btn.lucky {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(168, 85, 247, 0.28));
  color: #bae6fd;
}
.style-studio-tabs {
  flex-wrap: wrap;
  gap: 5px;
}
.style-summary-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-size: 12px;
  color: #e2e8f0;
}
.style-swatch-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  font-size: 11px;
  font-weight: 700;
}
.style-swatch-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  display: inline-block;
}

/* ======================== v12.0 IDLE TREASURY, LIVE 3D MANNEQUIN & CURRENCY CASCADES ======================== */
.olympus-treasury-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(120, 53, 15, 0.42));
  border: 1.5px solid rgba(251, 191, 36, 0.58);
  box-shadow: 0 4px 0 rgba(180, 83, 9, 0.55);
}
.armory-preview-canvas {
  width: 112px;
  height: 112px;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 42%, rgba(56, 189, 248, 0.25), rgba(15, 23, 42, 0.92));
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  cursor: grab;
  flex-shrink: 0;
}
.podium-3d-canvas {
  width: 156px;
  height: 156px;
  border-radius: 16px;
  background: radial-gradient(circle at 50% 40%, rgba(251, 191, 36, 0.28), rgba(15, 23, 42, 0.92));
  border: 2px solid #fde047;
  cursor: grab;
  margin: 0 auto 6px;
  display: block;
}
@keyframes chestWobbleBurst {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.08, 0.92) rotate(-7deg); }
  45% { transform: scale(0.94, 1.08) rotate(7deg); }
  70% { transform: scale(1.12, 0.9) rotate(-5deg); }
  100% { transform: scale(1.16) rotate(0deg); filter: brightness(1.35); }
}
.chest-wobble-anim {
  animation: chestWobbleBurst 0.45s ease-in-out;
}
.currency-fly-particle {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  font-size: 18px;
  font-weight: 900;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
  transition: transform 0.62s cubic-bezier(0.2, 0.85, 0.35, 1), opacity 0.62s ease-in;
}

/* ======================== v14.0 MOBILE-NATIVE APP SHELL & 24 GREEK MYTHOLOGY EMOJI SYSTEM ======================== */
html,
body {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: manipulation;
}
input,
textarea {
  -webkit-user-select: text;
  user-select: text;
}
button:active {
  transform: scale(0.96);
}
.greek-myth-emoji-svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}
.emote-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.greek-emoji-drawer-chip {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.34), rgba(225, 29, 72, 0.32)) !important;
  border-color: #fde047 !important;
  color: #fef08a !important;
}
.greek-wheel-btn {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.45), rgba(168, 85, 247, 0.45)) !important;
  border-color: #fde047 !important;
}
.pedestal-emote-bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
}
.greek-emoji-tabs {
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.greek-emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 8px;
}
.greek-emoji-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(251, 191, 36, 0.35);
  color: #f8fafc;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}
.greek-emoji-card:hover {
  border-color: #fde047;
  background: rgba(30, 41, 59, 0.95);
  transform: translateY(-2px);
}
.greek-emoji-art {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.greek-emoji-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.greek-emoji-info strong {
  font-size: 12.5px;
  font-weight: 800;
  color: #fef08a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.greek-emoji-quote {
  font-size: 11px;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.greek-emoji-deity {
  font-size: 10px;
  font-weight: 700;
  color: #38bdf8;
}
@media (max-width: 640px) {
  .greek-emoji-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .greek-emoji-card {
    padding: 6px 8px;
    gap: 7px;
  }
  .greek-emoji-art {
    width: 38px;
    height: 38px;
  }
}

/* ======================== v20.0 READACHILLES LOGO, WORLD INTERACT & ANALYTICS DATA-VIZ DASHBOARD ======================== */
.ra-official-logo {
  border-radius: 7px;
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.38);
  object-fit: cover;
  flex-shrink: 0;
}
.interact-highlight {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(14, 165, 233, 0.35)) !important;
  border-color: #4ade80 !important;
  color: #ecfdf5 !important;
}
.interact-arc-btn {
  background: linear-gradient(135deg, #10b981, #0284c7) !important;
  border-color: #a7f3d0 !important;
}
.lb-community-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.my-standing-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.72), rgba(15, 23, 42, 0.94));
  border: 1.5px solid rgba(251, 191, 36, 0.65);
}
.percentile-pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid #34d399;
  color: #6ee7b7;
  font-size: 11px;
  font-weight: 900;
}
.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.analytics-kpi-card {
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(15, 23, 42, 0.86);
  border: 1.5px solid rgba(148, 163, 184, 0.26);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.analytics-kpi-card strong {
  font-size: 18px;
  font-weight: 900;
  color: #fef08a;
}
.analytics-kpi-card span {
  font-size: 11px;
  font-weight: 800;
  color: #cbd5e1;
}
.analytics-kpi-card small {
  font-size: 10px;
  font-weight: 800;
  color: #34d399;
}
.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.analytics-chart-card {
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(251, 191, 36, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.analytics-chart-card canvas {
  max-width: 100%;
  height: auto;
}
.analytics-card-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  margin-bottom: 6px;
}
.analytics-legend-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  color: #cbd5e1;
}
.analytics-legend-inline i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 3px;
}
.analytics-benchmark-section {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.86);
  border: 1.5px solid rgba(56, 189, 248, 0.32);
  margin-bottom: 12px;
}
.analytics-benchmark-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}
.bm-row-card {
  padding: 9px 11px;
  border-radius: 12px;
  background: rgba(9, 18, 36, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.bm-track {
  position: relative;
  height: 9px;
  border-radius: 99px;
  background: rgba(30, 41, 59, 0.95);
  overflow: hidden;
  margin-top: 5px;
}
.bm-fill {
  height: 100%;
  border-radius: 99px;
}
.analytics-hero-mastery-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.analytics-coach-banner {
  padding: 11px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(245, 158, 11, 0.18));
  border: 1.5px solid #34d399;
  font-size: 12px;
  color: #ecfdf5;
  line-height: 1.4;
}




