/* ==========================================================================
   Pocket New Adventure — "Dawn Sanctum" Player Center Design System
   100% original game-native visual system for PNA's official Player Center
   (deep lagoon teal canopy, antique sunburst gold compass trim, verdant
   emerald leaf aurora, and cherry-blossom coral highlights).
   Zero external fonts/CDNs. Strict CSP safe (no data: URIs, no inline styles).
   ========================================================================== */

@font-face {
  font-family: "Bebas Neue";
  src: url("/portal/assets/bebas-neue.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root,
[data-theme="dark"] {
  color-scheme: dark;
  --bg-void: #031114;
  --bg-deep: #05191d;
  --bg-sidebar-top: rgba(6, 27, 31, 0.96);
  --bg-sidebar-bot: rgba(3, 17, 20, 0.98);
  --bg-topbar: rgba(4, 20, 23, 0.86);

  --surface-card: linear-gradient(168deg, rgba(12, 48, 54, 0.86) 0%, rgba(6, 25, 30, 0.94) 100%);
  --surface-card-hover: linear-gradient(168deg, rgba(16, 61, 68, 0.92) 0%, rgba(7, 32, 37, 0.96) 100%);
  --surface-panel: linear-gradient(175deg, rgba(11, 46, 52, 0.90) 0%, rgba(5, 24, 29, 0.96) 100%);
  --surface-hero: linear-gradient(135deg, rgba(13, 55, 60, 0.90) 0%, rgba(6, 30, 36, 0.94) 55%, rgba(16, 46, 42, 0.90) 100%);
  --surface-inset: rgba(3, 15, 18, 0.68);
  --surface-chip: rgba(4, 21, 25, 0.78);
  --surface-input: rgba(3, 18, 22, 0.86);
  --surface-table-head: rgba(3, 15, 18, 0.44);
  --surface-table-alt: rgba(94, 234, 212, 0.04);

  --border-subtle: rgba(94, 234, 212, 0.16);
  --border-med: rgba(94, 234, 212, 0.28);
  --border-gold: rgba(251, 191, 36, 0.45);
  --border-popular: rgba(251, 113, 133, 0.72);
  --border-value: rgba(52, 211, 153, 0.72);
  --border-starter: rgba(251, 191, 36, 0.66);

  --ink: #f1fdfa;
  --ink-2: #bde0da;
  --ink-muted: #7aa8a3;
  --ink-on-gold: #221202;
  --ink-on-jade: #f3fffe;

  --gold: #fbbf24;
  --gold-bright: #fef08a;
  --gold-deep: #d97706;
  --jade: #2dd4bf;
  --emerald: #34d399;
  --emerald-deep: #059669;
  --blossom: #fb7185;
  --blossom-deep: #e11d48;

  --glow-gold: 0 0 0 1.5px rgba(251, 191, 36, 0.85), 0 14px 34px rgba(245, 158, 11, 0.26);
  --glow-popular: 0 0 26px rgba(244, 63, 94, 0.16), 0 10px 26px rgba(0, 0, 0, 0.34);
  --glow-value: 0 0 26px rgba(16, 185, 129, 0.18), 0 10px 26px rgba(0, 0, 0, 0.34);
  --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(167, 243, 208, 0.14);
  --shadow-hero: 0 18px 46px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(254, 240, 138, 0.18);

  --scene-opacity: 0.42;
  --veil-bg: radial-gradient(circle at 72% 14%, rgba(251, 191, 36, 0.14), transparent 44%),
             radial-gradient(circle at 18% 82%, rgba(45, 212, 191, 0.14), transparent 46%),
             linear-gradient(180deg, rgba(4, 20, 24, 0.68) 0%, rgba(3, 15, 19, 0.88) 54%, rgba(3, 14, 17, 0.96) 100%);
  --font-ui: 'Avenir Next', 'Plus Jakarta Sans', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --sidebar-w: 238px;
  --topbar-h: 74px;
}

/* Optional Sunlit Parchment Light Mode (inspired by branding/sdk-dialog/panel.png) */
[data-theme="light"] {
  color-scheme: light;
  --bg-void: #f5efe2;
  --bg-deep: #ece3cf;
  --bg-sidebar-top: rgba(253, 249, 239, 0.96);
  --bg-sidebar-bot: rgba(244, 236, 218, 0.98);
  --bg-topbar: rgba(253, 249, 240, 0.92);

  --surface-card: linear-gradient(175deg, rgba(255, 253, 247, 0.96) 0%, rgba(249, 243, 229, 0.96) 100%);
  --surface-card-hover: linear-gradient(175deg, #ffffff 0%, rgba(254, 248, 232, 0.99) 100%);
  --surface-panel: linear-gradient(175deg, rgba(255, 253, 248, 0.98) 0%, rgba(247, 239, 222, 0.97) 100%);
  --surface-hero: linear-gradient(135deg, rgba(13, 62, 68, 0.94) 0%, rgba(9, 44, 49, 0.96) 60%, rgba(16, 66, 58, 0.94) 100%);
  --surface-inset: rgba(15, 62, 68, 0.06);
  --surface-chip: rgba(15, 62, 68, 0.08);
  --surface-input: #ffffff;
  --surface-table-head: rgba(13, 88, 92, 0.11);
  --surface-table-alt: rgba(13, 88, 92, 0.04);

  --border-subtle: rgba(168, 126, 52, 0.22);
  --border-med: rgba(15, 118, 110, 0.30);
  --border-gold: rgba(202, 138, 4, 0.48);
  --border-popular: rgba(225, 29, 72, 0.62);
  --border-value: rgba(5, 150, 105, 0.62);
  --border-starter: rgba(217, 119, 6, 0.58);

  --ink: #0f2c30;
  --ink-2: #2d5156;
  --ink-muted: #58787c;
  --ink-on-gold: #221202;
  --ink-on-jade: #f3fffe;

  --gold: #c27803;
  --gold-bright: #92400e;
  --gold-deep: #b45309;
  --jade: #0d9488;
  --emerald: #059669;
  --emerald-deep: #047857;
  --blossom: #e11d48;
  --blossom-deep: #be123c;

  --glow-gold: 0 0 0 2px rgba(217, 119, 6, 0.85), 0 12px 26px rgba(217, 119, 6, 0.18);
  --glow-popular: 0 0 0 1px rgba(225, 29, 72, 0.35), 0 10px 24px rgba(225, 29, 72, 0.10);
  --glow-value: 0 0 0 1px rgba(5, 150, 105, 0.35), 0 10px 24px rgba(5, 150, 105, 0.10);
  --shadow-card: 0 8px 22px rgba(28, 46, 48, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  --shadow-hero: 0 16px 36px rgba(9, 44, 49, 0.22);

  --scene-opacity: 0.22;
  --veil-bg: linear-gradient(180deg, rgba(246, 240, 226, 0.82) 0%, rgba(245, 239, 226, 0.93) 50%, rgba(242, 235, 219, 0.97) 100%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background-color: var(--bg-void);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 900;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink-on-gold);
  font-weight: 800;
}
.skip:focus {
  left: 12px;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ==========================================================================
   Full-Viewport Dawn Basin Atmospheric Backdrop
   ========================================================================== */
.scene-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("/portal/assets/hero-dawn.jpg");
  background-size: cover;
  background-position: center 22%;
  background-repeat: no-repeat;
  opacity: var(--scene-opacity);
  transform: scale(1.03);
  pointer-events: none;
}

.scene-veil {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: var(--veil-bg);
  pointer-events: none;
}

/* ==========================================================================
   Player Center App Shell (Left Sidebar Rail + Right Main Stage)
   ========================================================================== */
.portal-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: relative;
  align-self: stretch;
  background:
    url("/portal/assets/compass-pattern.svg") repeat,
    linear-gradient(180deg, var(--bg-sidebar-top) 0%, var(--bg-sidebar-bot) 100%);
  background-size: 96px 96px, 100% 100%;
  border-right: 1px solid var(--border-subtle);
  backdrop-filter: blur(18px);
  z-index: 40;
}

.sidebar-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 18px;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4px 6px 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.brand-lockup {
  display: block;
  width: 100%;
  max-width: 192px;
  transition: transform 0.18s ease;
}
.brand-lockup:hover {
  transform: translateY(-1px) scale(1.015);
}

.brand-wordmark {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
}

.brand-caption {
  margin: 8px 0 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.sidebar-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.28);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.24);
  flex-shrink: 0;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.main-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--ink-2);
  border: 1px solid transparent;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}

.main-nav a:hover {
  background: rgba(45, 212, 191, 0.10);
  color: var(--ink);
  border-color: var(--border-subtle);
}

.main-nav a.active {
  background: linear-gradient(180deg, #32b8a8 0%, #15827a 54%, #0d5e5a 100%);
  color: #f4fffe;
  border-color: rgba(167, 243, 208, 0.55);
  box-shadow:
    inset 0 1.5px 0 rgba(236, 254, 255, 0.52),
    inset 0 -2px 0 rgba(4, 46, 44, 0.58),
    0 8px 20px rgba(13, 148, 136, 0.34);
  font-weight: 750;
}

.nav-ico {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.88;
}
.main-nav a.active .nav-ico {
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(254, 240, 138, 0.45));
}

.nav-sep {
  height: 1px;
  background: var(--border-subtle);
  margin: 10px 6px 6px;
}

.nav-group-label {
  margin: 2px 12px 4px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.sidebar-foot {
  margin-top: 16px;
  padding: 14px 10px 2px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.sidebar-trust {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  color: var(--ink-2);
  font-weight: 600;
}

.trust-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.65);
  flex-shrink: 0;
}

.sidebar-motto {
  margin: 0 0 12px;
  color: var(--ink-muted);
}

.sidebar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* ==========================================================================
   Full-Screen Dedicated Login Wall Mode (body[data-shell="auth"])
   Hides Player Center dashboard sidebar & topbar before sign-in so the Login
   Wall is a clean, cinematic standalone entry into the logged-in Player Center.
   ========================================================================== */
.auth-topbar {
  display: none;
}

body[data-shell="auth"] .portal-shell {
  grid-template-columns: minmax(0, 1fr);
}

body[data-shell="auth"] .sidebar,
body[data-shell="auth"] .topbar,
body[data-shell="auth"] .mobile-tabbar {
  display: none !important;
}

body[data-shell="auth"] .auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px clamp(16px, 4vw, 44px);
}

body[data-shell="auth"] .auth-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

body[data-shell="auth"] main {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 980px;
  padding: 12px 24px 42px;
}

body[data-shell="auth"] .app-root {
  width: 100%;
}

body[data-shell="auth"] .scene-backdrop {
  background-image: url("/portal/assets/login-bg.jpg");
  background-position: center center;
  opacity: 0.96;
}

body[data-shell="auth"] .scene-veil {
  background: radial-gradient(circle at 50% 45%, rgba(2, 13, 16, 0.22), rgba(2, 13, 16, 0.70));
}

body[data-shell="auth"] .auth-brand-pane .display-h1 {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(2.6rem, 4.5vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 0.94;
  text-transform: uppercase;
  color: #fef08a;
  text-shadow: 0 4px 0 #572b03, 0 10px 24px rgba(0, 0, 0, 0.65);
}

.sidebar-auth-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  margin-left: -10px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.sidebar-auth-link:hover {
  color: var(--gold-bright);
  background: rgba(251, 191, 36, 0.10);
}

/* ==========================================================================
   Main Stage & Sticky Top Trainer / Diamond Wallet Bar
   ========================================================================== */
.stage-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: var(--topbar-h);
  padding: 12px 28px;
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(16px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.menu-toggle,
.mobile-brand {
  display: none;
}

.trainer-identity {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.trainer-eyebrow {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--jade);
  line-height: 1.2;
}

.trainer-name {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trainer-meta {
  font-size: 0.78rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Ornate Golden-Trimmed Diamond Wallet Pill */
.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(16, 48, 52, 0.92), rgba(7, 25, 29, 0.96));
  border: 1px solid var(--border-gold);
  box-shadow:
    inset 0 1px 0 rgba(254, 240, 138, 0.28),
    0 6px 18px rgba(0, 0, 0, 0.28);
}
[data-theme="light"] .wallet-pill {
  background: linear-gradient(180deg, #103b40, #082428);
  color: #f0fdfa;
}

.wallet-gem {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(251, 191, 36, 0.35));
}

.wallet-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  padding-right: 4px;
}

.wallet-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #99f6e4;
}

.wallet-value {
  font-size: 1.02rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  color: #fef08a;
}

.wallet-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffe27a, #e59312);
  color: #1f1102;
  font-weight: 900;
  font-size: 1.08rem;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition: transform 0.14s ease, filter 0.14s ease;
}
.wallet-plus:hover {
  transform: scale(1.06);
  filter: brightness(1.08);
}

.theme-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
}

.theme-switch button {
  padding: 5px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.theme-switch button[aria-pressed="true"] {
  background: rgba(45, 212, 191, 0.22);
  color: var(--ink);
}

.btn-header-account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 11px;
  background: var(--surface-chip);
  border: 1px solid var(--border-med);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-header-account:hover {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.12);
}

/* Main Content Region */
main {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 28px 42px;
}

.app-root {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.loading-shell {
  padding: 64px 24px;
  text-align: center;
}

.muted {
  color: var(--ink-muted);
}

/* ==========================================================================
   Shared Buttons, Pills, Eyebrows & Glass Cards
   ========================================================================== */
.eyebrow {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--jade);
}
.eyebrow.gold {
  color: var(--gold);
}

.display-h1 {
  margin: 0;
  font-size: clamp(1.65rem, 2.8vw, 2.38rem);
  font-weight: 880;
  font-style: italic;
  letter-spacing: -0.025em;
  line-height: 1.09;
  color: #f4fffe;
}

.section-h2 {
  margin: 0;
  font-size: clamp(1.22rem, 1.9vw, 1.54rem);
  font-weight: 840;
  font-style: italic;
  letter-spacing: -0.018em;
  color: var(--ink);
}

.btn-gold,
.btn-jade,
.btn-ghost,
.btn-ghost-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  text-align: center;
}

/* Beveled Sunburst Gold CTA (inspired by branding/sdk-dialog/button.png) */
.btn-gold {
  padding: 12px 20px;
  background: linear-gradient(180deg, #ffe584 0%, #f7b52c 50%, #d87706 100%);
  color: var(--ink-on-gold);
  border-color: rgba(254, 240, 138, 0.72);
  box-shadow:
    inset 0 1.5px 0 rgba(255, 255, 255, 0.72),
    inset 0 -2.5px 0 rgba(133, 62, 2, 0.56),
    0 10px 24px rgba(217, 119, 6, 0.34);
}
.btn-gold:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.btn-gold:active:not(:disabled) {
  transform: translateY(0);
}
.btn-gold:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.25);
  box-shadow: none;
}

/* Glossy Lagoon Jade CTA */
.btn-jade {
  padding: 11px 18px;
  background: linear-gradient(180deg, #32baa9 0%, #15847c 52%, #0e5f5b 100%);
  color: var(--ink-on-jade);
  border-color: rgba(167, 243, 208, 0.52);
  box-shadow:
    inset 0 1.5px 0 rgba(230, 255, 250, 0.52),
    inset 0 -2px 0 rgba(4, 46, 44, 0.62),
    0 8px 20px rgba(13, 148, 136, 0.30);
}
.btn-jade:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.btn-jade:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.btn-ghost {
  padding: 10px 16px;
  background: var(--surface-chip);
  color: var(--ink);
  border-color: var(--border-med);
}
.btn-ghost:hover {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.11);
}

.btn-ghost-sm {
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  background: var(--surface-chip);
  color: var(--ink-2);
  border-color: var(--border-subtle);
}
.btn-ghost-sm:hover {
  color: var(--ink);
  border-color: var(--border-med);
}

.btn-block {
  width: 100%;
}

.glass-panel {
  background: var(--surface-panel);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
  padding: 20px;
  min-width: 0;
}

/* ==========================================================================
   Editorial Compass-Textured Hero Promo Banners (All Views)
   ========================================================================== */
.hero-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(240px, 0.82fr);
  gap: 24px;
  align-items: center;
  padding: 28px 30px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 86% 24%, rgba(251, 191, 36, 0.16), transparent 45%),
    radial-gradient(circle at 12% 90%, rgba(45, 212, 191, 0.16), transparent 46%),
    url("/portal/assets/compass-pattern.svg") repeat,
    var(--surface-hero);
  background-size: auto, auto, 96px 96px, 100% 100%;
  border: 1px solid var(--border-med);
  box-shadow: var(--shadow-hero);
  color: #f0fdfa;
  overflow: hidden;
}

.hero-banner::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(254, 240, 138, 0.55), rgba(94, 234, 212, 0.55), transparent);
  pointer-events: none;
}

.hero-banner.single-col {
  grid-template-columns: minmax(0, 1fr);
}

.hero-banner-copy p {
  margin: 10px 0 0;
  color: #c2e5df;
  font-size: 0.94rem;
  max-width: 56ch;
}

.hero-banner-side {
  padding-left: 24px;
  border-left: 1px solid rgba(254, 240, 138, 0.22);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hero-multiplier {
  font-size: 2.75rem;
  font-weight: 900;
  font-style: italic;
  line-height: 0.95;
  color: #fde68a;
  text-shadow: 0 4px 20px rgba(245, 158, 11, 0.42);
}

.hero-side-title {
  margin: 2px 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: #fffbeb;
}

.hero-side-note {
  margin: 0;
  font-size: 0.84rem;
  color: #bfe2dc;
  line-height: 1.45;
}

/* ==========================================================================
   HOME VIEW — Cinematic Dawn Basin Showcase + Quick Portal Launchpad
   ========================================================================== */
.home-showcase {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-hero);
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(260px, 0.72fr);
  gap: 24px;
  align-items: end;
  padding: 32px;
  background:
    linear-gradient(95deg, rgba(4, 22, 26, 0.90) 0%, rgba(5, 29, 34, 0.72) 52%, rgba(4, 20, 24, 0.82) 100%),
    url("/portal/assets/hero-dawn.jpg") center 28% / cover no-repeat;
  color: #f4fffe;
}

.home-showcase::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(254, 240, 138, 0.42), inset 0 -1px 0 rgba(45, 212, 191, 0.22);
  pointer-events: none;
}

.home-hero-main {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.home-hero-wordmark {
  width: min(320px, 78%);
  height: auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.58));
}

.status-pill-hero {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(5, 28, 31, 0.78);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #a7f3d0;
  font-size: 0.78rem;
  font-weight: 750;
  backdrop-filter: blur(8px);
}

.home-hero-lead {
  margin: 0;
  color: #d6f0eb;
  font-size: 0.98rem;
  max-width: 54ch;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.home-realm-card {
  position: relative;
  z-index: 2;
  background: rgba(4, 22, 26, 0.82);
  border: 1px solid rgba(251, 191, 36, 0.34);
  border-radius: var(--radius-lg);
  padding: 18px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.realm-kv-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.realm-kv {
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(3, 15, 18, 0.65);
  border: 1px solid rgba(94, 234, 212, 0.14);
}

.realm-kv dt {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #88bab4;
  margin-bottom: 2px;
}

.realm-kv dd {
  margin: 0;
  font-size: 0.94rem;
  font-weight: 800;
  color: #fef9c3;
}

.launchpad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-gold);
}

.feature-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 212, 191, 0.14);
  border: 1px solid rgba(94, 234, 212, 0.28);
  color: var(--jade);
}
.feature-icon-wrap.gold {
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.34);
  color: var(--gold);
}
.feature-icon-wrap.blossom {
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.34);
  color: var(--blossom);
}

.feature-card h3 {
  margin: 0;
  font-size: 1.04rem;
  font-weight: 820;
  color: var(--ink);
}

.feature-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-2);
  flex: 1;
}

.feature-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--gold);
  margin-top: 4px;
}

.notice-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0% 50%, rgba(251, 191, 36, 0.12), transparent 36%),
    var(--surface-panel);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-card);
}

.notice-strip-body {
  min-width: 0;
}

.notice-strip-title {
  margin: 2px 0 4px;
  font-size: 1.08rem;
  font-weight: 820;
  color: var(--ink);
}

.notice-strip-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-2);
}

.notice-strip-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

/* ==========================================================================
   TOP-UP STOREFRONT — 3-Step Storefront + Sticky Checkout + Orders Ledger
   ========================================================================== */
.topup-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 338px;
  gap: 22px;
  align-items: start;
}

.topup-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

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

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

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 850;
  color: var(--gold-bright);
  background: rgba(251, 191, 36, 0.14);
  border: 1px solid var(--border-gold);
  flex-shrink: 0;
}

.step-heading {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 820;
  color: var(--ink);
}

.step-meta {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

/* Step 1: Compact Inline Trainer Verification Bar */
.trainer-lookup-box {
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-panel);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lookup-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.field-input {
  flex: 1;
  min-width: 180px;
  padding: 11px 14px;
  border-radius: 11px;
  background: var(--surface-input);
  border: 1px solid var(--border-med);
  color: var(--ink);
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field-input::placeholder {
  color: var(--ink-muted);
}

.field-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.16);
  outline: none;
}

.verified-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: var(--ink);
  font-size: 0.88rem;
}

.verified-chip-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.verified-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emerald);
  color: #03221c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  flex-shrink: 0;
}

.error-banner {
  padding: 10px 14px;
  border-radius: 11px;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(251, 113, 133, 0.48);
  color: #fecdd3;
  font-size: 0.86rem;
  font-weight: 600;
}
[data-theme="light"] .error-banner {
  color: #9f1239;
}

/* Filter Pill Strip */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.filter-pill {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--surface-chip);
  color: var(--ink-2);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--border-med);
  color: var(--ink);
}

.filter-pill.active {
  background: linear-gradient(180deg, #2cb3a3, #137670);
  color: #f4fffe;
  border-color: rgba(167, 243, 208, 0.56);
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.30);
}

/* 3-Column High-Craft Diamond Bundle Grid */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.pack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  padding: 20px 16px 16px;
  margin-top: 8px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.18s ease, background 0.16s ease;
  min-width: 0;
}

.pack-card:hover {
  background: var(--surface-card-hover);
  border-color: var(--border-med);
  transform: translateY(-2px);
}

.pack-card.hl-popular {
  border-color: var(--border-popular);
  box-shadow: var(--glow-popular);
}

.pack-card.hl-value {
  border-color: var(--border-value);
  box-shadow: var(--glow-value);
}

.pack-card.hl-starter {
  border-color: var(--border-starter);
}

.pack-card.selected {
  border-color: var(--gold);
  box-shadow: var(--glow-gold);
  transform: translateY(-2px);
}

/* Floating top-left badge ribbon (MOST POPULAR / BEST VALUE / BEST STARTER) */
.pack-flag {
  position: absolute;
  top: -11px;
  left: 14px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.36);
}
.pack-flag.popular {
  background: linear-gradient(90deg, #fb7185, #e11d48);
  color: #fff1f2;
}
.pack-flag.value {
  background: linear-gradient(90deg, #34d399, #059669);
  color: #022c22;
}
.pack-flag.starter {
  background: linear-gradient(90deg, #fde68a, #f59e0b);
  color: #221202;
}

.pack-ribbon-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.pack-promo-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #fde047, #f59e0b);
  color: #241301;
}

.pack-promo-pill.pass {
  background: linear-gradient(90deg, rgba(45, 212, 191, 0.24), rgba(16, 185, 129, 0.24));
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: var(--emerald);
}

.pack-selected-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink-on-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.pack-card.selected .pack-selected-dot {
  opacity: 1;
  transform: scale(1);
}

.pack-amount-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
}

.pack-gem-ico {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgba(45, 212, 191, 0.30));
}

.pack-qty {
  font-size: 1.52rem;
  font-weight: 880;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--ink);
}

.pack-unit {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-left: 3px;
}

.pack-card-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 820;
  color: var(--ink);
  line-height: 1.2;
}

.pack-bonus-line {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.35;
}

.pack-extra-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(45, 212, 191, 0.13);
  border: 1px solid rgba(94, 234, 212, 0.24);
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--jade);
}

.pack-price-row {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  width: 100%;
}

.pack-price-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 9px;
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
  font-size: 0.98rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.pack-usd-ref {
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.store-footnote {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Sticky Right Checkout Panel ("YOUR TOP-UP") */
.checkout-panel {
  position: sticky;
  top: calc(var(--topbar-h) + 18px);
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 22px 20px;
  border-radius: var(--radius-xl);
  background: var(--surface-panel);
  border: 1px solid var(--border-med);
  box-shadow: var(--shadow-hero);
  backdrop-filter: blur(16px);
}

.checkout-title {
  margin: 0;
  font-size: 1.24rem;
  font-weight: 850;
  font-style: italic;
  color: var(--ink);
}

.checkout-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px 14px;
  border-radius: 13px;
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
  font-size: 0.86rem;
}

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.summary-row span {
  color: var(--ink-muted);
}

.summary-row strong {
  color: var(--ink);
  font-weight: 780;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.summary-row.total {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.summary-row.total strong {
  font-size: 1.08rem;
  color: var(--gold-bright);
}

.checkout-step-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 780;
  color: var(--ink);
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.channel-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 11px;
  border-radius: 11px;
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
  min-width: 0;
}

.channel-card:hover {
  border-color: var(--border-med);
}

.channel-card.selected {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.12);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.55);
}

.channel-name {
  font-size: 0.81rem;
  font-weight: 780;
  color: var(--ink);
  line-height: 1.25;
}

.channel-note {
  font-size: 0.7rem;
  color: var(--ink-muted);
}

.standby-box {
  padding: 13px 14px;
  border-radius: 13px;
  border: 1px dashed var(--border-med);
  background: rgba(3, 16, 20, 0.44);
  text-align: center;
}
[data-theme="light"] .standby-box {
  background: rgba(13, 148, 136, 0.06);
}

.standby-box strong {
  display: block;
  font-size: 0.84rem;
  color: var(--ink);
  margin-bottom: 3px;
}

.standby-box p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.checkout-caption {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* Receipt Card */
.receipt-card {
  padding: 14px;
  border-radius: 13px;
  background: rgba(16, 185, 129, 0.10);
  border: 1px solid rgba(52, 211, 153, 0.45);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.receipt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.receipt-id {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-bright);
  white-space: nowrap;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.status-badge.pending_payment {
  background: rgba(251, 191, 36, 0.18);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: var(--gold-bright);
}
[data-theme="light"] .status-badge.pending_payment {
  color: #92400e;
}
.status-badge.paid {
  background: rgba(16, 185, 129, 0.20);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: var(--emerald);
}
.status-badge.on_hold {
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(251, 146, 60, 0.55);
  color: #fdba74;
}
[data-theme="light"] .status-badge.on_hold {
  color: #9a3412;
}
.status-badge.expired,
.status-badge.cancelled {
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(251, 113, 133, 0.45);
  color: var(--blossom);
}
.receipt-note {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.4;
}
.receipt-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

/* Multi-provider channel groups & Crypto Direct Deposit Panel */
.channel-group-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.channel-group-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.channel-group-head {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-muted);
}
.channel-card.disabled-min {
  opacity: 0.55;
}
.crypto-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 11px;
  background: rgba(2, 14, 18, 0.52);
  border: 1px solid var(--border-gold);
}
[data-theme="light"] .crypto-panel {
  background: rgba(255, 255, 255, 0.72);
}
.crypto-amount-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.crypto-exact-val {
  font-family: var(--font-mono);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--gold-bright);
  word-break: break-all;
}
[data-theme="light"] .crypto-exact-val {
  color: #92400e;
}
.crypto-net-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.45);
  color: var(--jade-bright);
}
[data-theme="light"] .crypto-net-badge {
  color: #0f766e;
}
.crypto-addr-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.crypto-addr-code {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--ink);
  word-break: break-all;
  overflow-wrap: anywhere;
}
[data-theme="light"] .crypto-addr-code {
  background: rgba(15, 23, 42, 0.06);
}
.crypto-warn-box {
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.45);
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--ink);
}
.crypto-txid-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--border-subtle);
}
.crypto-txid-form label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink-muted);
}
.crypto-txid-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.crypto-txid-row .field-input {
  flex: 1 1 140px;
  min-width: 0;
  padding: 7px 10px;
  font-size: 0.78rem;
}
.crypto-claims-list {
  margin: 0;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--ink-muted);
  word-break: break-all;
}

/* Orders Ledger Section ("EVERY PAYMENT, ACCOUNTED FOR") */
.orders-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.orders-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.order-lookup-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.order-lookup-bar .field-input {
  width: 280px;
  max-width: 100%;
  flex: 0 1 280px;
  padding: 8px 12px;
  font-size: 0.84rem;
}

.empty-dashed-box {
  padding: 32px 20px;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-med);
  background: rgba(4, 21, 25, 0.54);
  text-align: center;
}
[data-theme="light"] .empty-dashed-box {
  background: rgba(13, 148, 136, 0.04);
}

.empty-dashed-box strong {
  display: block;
  font-size: 0.96rem;
  color: var(--ink);
  margin-bottom: 4px;
}

.empty-dashed-box p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

/* ==========================================================================
   STORE & PASSES VIEW (/perks)
   ========================================================================== */
.daily-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 8% 50%, rgba(251, 191, 36, 0.16), transparent 34%),
    var(--surface-panel);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-card);
}

.daily-strip-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.daily-star-badge {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.45);
  color: var(--gold-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.perks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.perk-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 18px 18px;
  margin-top: 8px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
}

.perk-card.hl-popular {
  border-color: var(--border-popular);
  box-shadow: var(--glow-popular);
}
.perk-card.hl-value {
  border-color: var(--border-value);
  box-shadow: var(--glow-value);
}
.perk-card.hl-starter {
  border-color: var(--border-starter);
}

.perk-card h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 840;
  color: var(--ink);
}

.perk-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-2);
}

.perk-list {
  list-style: none;
  margin: 0;
  padding: 10px 0 0;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.83rem;
  color: var(--ink-2);
  flex: 1;
}

.perk-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.perk-list li::before {
  content: "✦";
  color: var(--gold);
  font-size: 0.72rem;
  flex-shrink: 0;
}

.perk-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
}

.perk-price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ==========================================================================
   REWARDS & ACCOUNT VIEW (/account) — Auth Split-Wall & Rewards Profile Hub
   ========================================================================== */
.auth-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  gap: 16px;
  align-items: stretch;
  margin: 12px 0;
}

.auth-brand-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 36px 28px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 50% 25%, rgba(251, 191, 36, 0.16), transparent 55%),
    url("/portal/assets/compass-pattern.svg") repeat,
    var(--surface-hero);
  background-size: auto, 96px 96px, 100% 100%;
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-hero);
  color: #f0fdfa;
}

.auth-brand-logo {
  width: min(260px, 84%);
  height: auto;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.56));
}

.auth-trust-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  font-size: 0.84rem;
  color: #cbeae4;
  width: 100%;
  max-width: 310px;
}

.auth-trust-list li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.auth-trust-list li::before {
  content: "◆";
  color: #fde68a;
  font-size: 0.65rem;
}

.auth-form-pane {
  padding: 30px 28px;
  border-radius: var(--radius-xl);
  background: var(--surface-panel);
  border: 1px solid var(--border-med);
  box-shadow: var(--shadow-hero);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.seg-tabs {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-inset);
  border: 1px solid var(--border-subtle);
}

.seg-tabs button {
  padding: 9px 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-muted);
  font-weight: 780;
  font-size: 0.88rem;
  cursor: pointer;
}

.seg-tabs button.active {
  background: linear-gradient(180deg, #2fb5a5, #147972);
  color: #f4fffe;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.30);
}

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

.field-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-2);
}

/* Signed-In Profile & Rewards KPI Strip */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.kpi-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-card.gold-accent {
  border-color: var(--border-gold);
}

.kpi-value {
  font-size: 1.62rem;
  font-weight: 880;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--ink);
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 650;
}

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.pw-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.pw-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

.kv-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0 16px;
}

.kv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}
.kv-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Milestones Progress Grid */
.milestone-cadence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.milestone-subhead {
  margin-top: 22px;
  margin-bottom: 12px;
}

.milestone-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.milestone-total {
  font-size: 1.38rem;
  font-weight: 880;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.progress-track {
  height: 7px;
  border-radius: 999px;
  background: var(--surface-inset);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--jade), var(--gold));
  width: 0%;
  transition: width 0.35s ease;
}

.progress-fill.p25 { width: 25%; }
.progress-fill.p50 { width: 50%; }
.progress-fill.p75 { width: 75%; }
.progress-fill.p100 { width: 100%; }

.lifetime-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

/* Order Table */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--surface-inset);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table th {
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--surface-table-head);
}

.data-table tr:nth-child(even) td {
  background: var(--surface-table-alt);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   DOWNLOAD, NEWS & SUPPORT VIEWS
   ========================================================================== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.step-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-card h3 {
  margin: 4px 0 0;
  font-size: 1rem;
  font-weight: 820;
  color: var(--ink);
}

.step-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--ink-2);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border-radius: var(--radius-md);
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.faq-item summary {
  padding: 15px 18px;
  font-weight: 780;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-item summary::after {
  content: "+";
  color: var(--gold);
  font-size: 1.15rem;
  font-weight: 800;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin: 0;
  padding: 0 18px 16px;
  font-size: 0.88rem;
  color: var(--ink-2);
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

/* ==========================================================================
   Footer, Mobile Drawer, Bottom Tab Bar & Toasts
   ========================================================================== */
.site-footer {
  margin-top: auto;
  padding: 18px 28px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-left strong {
  color: var(--ink-2);
}

.footer-left a:hover {
  color: var(--gold);
}

.footer-right {
  margin: 0;
}

/* Mobile Drawer */
.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(2, 11, 13, 0.72);
  backdrop-filter: blur(4px);
}

.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(296px, 86vw);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  background:
    url("/portal/assets/compass-pattern.svg") repeat,
    linear-gradient(180deg, var(--bg-sidebar-top), var(--bg-sidebar-bot));
  background-size: 96px 96px, 100% 100%;
  border-right: 1px solid var(--border-gold);
  box-shadow: 18px 0 42px rgba(0, 0, 0, 0.55);
  overflow-y: auto;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-logo {
  width: 148px;
  height: auto;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 0;
  flex: 1;
}

.drawer-nav a {
  padding: 11px 14px;
  border-radius: 11px;
  font-weight: 700;
  color: var(--ink-2);
}

.drawer-nav a.active {
  background: linear-gradient(180deg, #32b8a8, #0e605c);
  color: #f4fffe;
}

.drawer-foot {
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
}

/* Mobile Bottom Tab Bar */
.mobile-tabbar {
  display: none;
}

.toast-region {
  position: fixed;
  right: 22px;
  top: calc(var(--topbar-h) + 12px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(340px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  padding: 11px 16px;
  border-radius: 12px;
  background: rgba(7, 36, 40, 0.96);
  border: 1px solid var(--border-gold);
  color: #f0fdfa;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* ==========================================================================
   Responsive Breakpoints (1080px, 900px, 600px, 390px, 320px — Zero Overflow!)
   ========================================================================== */
@media (max-width: 1120px) {
  .topup-workspace {
    grid-template-columns: minmax(0, 1fr) 308px;
  }
  .pack-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .perks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .portal-shell {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border-med);
    background: var(--surface-chip);
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
  }
  .menu-toggle svg {
    width: 20px;
    height: 20px;
  }
  .mobile-brand {
    display: inline-flex;
    flex-shrink: 0;
  }
  .mobile-brand img {
    border-radius: 9px;
  }
  .topbar {
    padding: 10px 14px;
    gap: 8px;
  }
  .btn-header-account {
    display: none;
  }
  main {
    padding: 18px 14px 86px;
  }
  .site-footer {
    padding: 16px 14px 86px;
  }
  .topup-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
  .checkout-panel {
    position: static;
  }
  .home-showcase {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 18px;
  }
  .hero-banner {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 18px;
    gap: 16px;
  }
  .hero-banner-side {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid rgba(254, 240, 138, 0.22);
  }
  .launchpad-grid,
  .steps-grid,
  .benefit-grid,
  .pw-grid,
  .milestone-cadence-grid,
  .lifetime-grid,
  .auth-stage {
    grid-template-columns: minmax(0, 1fr);
  }
  .kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .notice-strip,
  .daily-strip {
    flex-direction: column;
    align-items: flex-start;
  }
  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--bg-topbar);
    border-top: 1px solid var(--border-med);
    backdrop-filter: blur(16px);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    gap: 4px;
  }
  .mobile-tabbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 9px 4px;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 760;
    color: var(--ink-muted);
  }
  .mobile-tabbar a.active {
    background: linear-gradient(180deg, #32b8a8, #0e605c);
    color: #f4fffe;
  }
}

@media (max-width: 540px) {
  .trainer-eyebrow,
  .trainer-meta {
    display: none;
  }
  .theme-switch {
    display: none;
  }
  .wallet-pill {
    padding: 4px 6px 4px 8px;
    gap: 7px;
  }
  .wallet-gem {
    width: 24px;
    height: 24px;
  }
  .wallet-label {
    font-size: 0.56rem;
  }
  .wallet-value {
    font-size: 0.88rem;
  }
  .pack-grid,
  .perks-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .channel-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .order-lookup-bar,
  .order-lookup-bar .field-input {
    width: 100%;
    flex: 1 1 100%;
  }
  .realm-kv-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 350px) {
  .topbar {
    padding: 8px 10px;
  }
  main {
    padding: 14px 10px 84px;
  }
  .trainer-name {
    font-size: 0.88rem;
  }
  .kpi-strip {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Realm status badge: colour follows realm_status from /portal/api/site */
[data-realm="degraded"] .pulse-dot,
[data-realm="maintenance"] .pulse-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.26);
}

[data-realm="offline"] .pulse-dot {
  background: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.26);
}
