/* ════════════════════════════════════════════════════════════════
   Ethereal Light Oracle — Design System CSS
   Theme: "Illuminated Clarity"
   Palette: Pure whites, Lavender (#E1E1F5), Soft Rose (#EDDFE4),
            Gold (#D4AF37), Plum (#4A3F7A), Charcoal (#191C1D)
   ════════════════════════════════════════════════════════════════ */

/* ── CSS Custom Properties ────────────────────────────────────── */
:root {
  /* ══ Core palette (03_Components spec) ══ */
  --gold:               #D4AF37;
  --gold-soft:          #E8C87A;
  --gold-deep:          #B8922A;
  --plum:               #4A3F7A;
  --secondary:          #5C5D6E;
  --lavender:           #E1E1F5;
  --rose:               #EDDFE4;
  --rose-soft:          #FFF0F5;
  --tertiary:           #665C60;

  /* ══ Semantic surface tokens ══ */
  --surface:            #f8f9fa;
  --surface-lowest:     #ffffff;
  --surface-low:        #f3f4f5;
  --surface-mid:        #edeeef;
  --surface-high:       #e7e8e9;
  --surface-highest:    #e1e3e4;
  --surface-cl:         #ffffff;        /* card local surface (swatch bg) */
  --surface-c1:         #f3f4f5;        /* skeleton shimmer from */
  --surface-c3:         #e7e8e9;        /* skeleton shimmer to   */

  /* ══ Semantic text tokens ══ */
  --on-surface:         #191C1D;
  --on-surface-variant: #444748;

  /* ══ Legacy color aliases (backward compat) ══ */
  --color-gold:         #D4AF37;
  --color-gold-dim:     #B8922A;
  --color-gold-light:   rgba(212,175,55,0.15);
  --color-lavender:     #E6E6FA;
  --color-lavender-dim: #e1e1f5;
  --color-rose:         #FFF0F5;
  --color-rose-dim:     #eddfe4;

  /* ══ Legacy text aliases ══ */
  --text-primary:   #191c1d;
  --text-secondary: #444748;
  --text-muted:     #747878;

  /* ══ Typography ══ */
  --font-serif: 'Noto Serif', serif;
  --font-sans:  'Plus Jakarta Sans', sans-serif;

  /* ══ Spacing ══ */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-xxl: 64px;

  /* ══ Radius ══ */
  --radius-sm:   0.125rem;
  --radius-base: 0.25rem;
  --radius-md:   0.375rem;
  --radius-lg:   0.5rem;
  --radius-xl:   0.75rem;

  /* ══ Shadows ══ */
  --shadow-card: 0 8px 32px rgba(180,150,80,.14), 0 2px 8px rgba(0,0,0,.04);
  --shadow-deep: 0 16px 48px rgba(80,60,140,.18), 0 4px 16px rgba(0,0,0,.06);
}

/* ── Base Reset ───────────────────────────────────────────────── */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--surface);
  color: var(--on-surface);
}

/* ── Material Symbols ─────────────────────────────────────────── */
.msym,
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined', sans-serif;
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
  color: var(--gold);
}
.material-symbols-outlined.icon-muted   { color: var(--text-muted); }
.material-symbols-outlined.icon-surface { color: var(--text-secondary); }

/* ── Scrollbar ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--surface-low); }
::-webkit-scrollbar-thumb { background: var(--surface-highest); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #c4c7c8; }

/* ── Selection ────────────────────────────────────────────────── */
::selection { background: rgba(212,175,55,0.2); color: #191c1d; }

/* ── Brand mark ───────────────────────────────────────────────── */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.brand-lockup:hover { opacity: .78; }
.brand-logo-mark {
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(212,175,55,.18));
}
.brand-logo-mark-sm {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
}
.brand-logo-mark-lg {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
}
.brand-word {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0;
}
.brand-domain {
  margin-top: 4px;
  font-size: 10px;
  color: rgba(68,71,72,.5);
  letter-spacing: .18em;
}


/* ══════════════════════════════════════════════════════════════
   COMPONENT LIBRARY
   ══════════════════════════════════════════════════════════════ */

/* ── Glass Panel ──────────────────────────────────────────────── */
.glass-panel {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--gold);
}
.glass-panel-subtle {
  background: rgba(255, 255, 255, 0.50);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ── Gold Border utilities ────────────────────────────────────── */
.gold-border     { border: 1px solid var(--gold); }
.gold-border-top { border-top: 1px solid var(--gold); }
.gold-border-soft { border: 1px solid rgba(212,175,55,0.35); }

/* ── Ethereal Glow ────────────────────────────────────────────── */
.ethereal-glow {
  box-shadow: 0 0 32px rgba(225,225,245,0.7), 0 0 64px rgba(237,223,228,0.3);
}
.ethereal-glow-hover:hover {
  box-shadow: 0 0 20px rgba(225,225,245,0.9), 0 8px 32px rgba(212,175,55,0.08);
  transform: translateY(-1px);
}
.gold-glow { box-shadow: 0 0 24px rgba(212,175,55,0.2); }

/* ── Gradients ────────────────────────────────────────────────── */
.lavender-rose-gradient {
  background: linear-gradient(135deg, #e1e1f5 0%, #eddfe4 100%);
}
.lavender-gradient {
  background: linear-gradient(135deg, #e6e6fa 0%, #e1e1f5 100%);
}
.rose-gradient {
  background: linear-gradient(135deg, #fff0f5 0%, #eddfe4 100%);
}
.gold-gradient {
  background: linear-gradient(135deg, #D4AF37 0%, #E8C87A 100%);
}


/* ══════════════════════════════════════════════════════════════
   BUTTONS  (aligned to 03_Components spec)
   ══════════════════════════════════════════════════════════════ */

/* Primary — "Ritual CTA"  Gold gradient + white text + pill shape */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #D4AF37 0%, #b8922a 100%);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  border: none; cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(212,175,55,0.28);
  text-decoration: none;
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 32px rgba(212,175,55,0.42);
  transform: translateY(-1px);
  color: #ffffff;
}
.btn-primary .msym,
.btn-primary .material-symbols-outlined {
  color: #ffffff;
}
.btn-primary:active { transform: scale(0.97); }

/* Secondary — Outlined pill */
.btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 28px;
  border-radius: 999px;
  background: transparent;
  color: var(--on-surface);
  font-family: var(--font-serif);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid rgba(212,175,55,0.45);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn-secondary:hover {
  background: rgba(212,175,55,0.08);
  border-color: var(--gold);
  box-shadow: 0 2px 12px rgba(212,175,55,0.16);
  color: var(--on-surface);
}

/* Ghost — Tertiary, neutral border */
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 22px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  border: 1px solid rgba(196,199,200,0.65);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--text-primary); }

/* Danger */
.btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 18px;
  border-radius: 999px;
  background: transparent;
  color: #ba1a1a;
  font-size: 13px; font-weight: 500;
  border: 1px solid rgba(186,26,26,0.4);
  cursor: pointer;
  transition: all 0.15s;
}
.btn-danger:hover { background: rgba(186,26,26,0.06); }

/* Icon button — Circular utility */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  background: rgba(255,255,255,0.5);
  border: 1px solid rgba(212,175,55,0.25);
  cursor: pointer; color: var(--gold);
  transition: all 0.2s;
  flex-shrink: 0;
}
.icon-btn:hover {
  background: rgba(212,175,55,0.10);
  border-color: rgba(212,175,55,0.55);
}
.icon-btn .msym,
.icon-btn .material-symbols-outlined { font-size: 20px; }


/* ══════════════════════════════════════════════════════════════
   FORM CONTROLS  (aligned to 03_Components spec)
   ══════════════════════════════════════════════════════════════ */

.input {
  width: 100%;
  background: rgba(255, 255, 255, 0.70) !important;
  border: 1px solid rgba(212,175,55,0.18) !important;
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--on-surface) !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input::placeholder {
  color: rgba(68,71,72,0.35);
  font-family: var(--font-serif);
  font-style: italic;
}
.input:focus,
.input:focus-visible {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.10) !important;
  outline: none !important;
}
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(255,255,255,0.9) inset !important;
  -webkit-text-fill-color: var(--on-surface) !important;
}

.select {
  background: rgba(255, 255, 255, 0.70) !important;
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 8px;
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--on-surface) !important;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.10);
}

/* Textarea variant */
.textarea {
  width: 100%;
  padding: 16px;
  background: rgba(255,255,255,0.70);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 14px; line-height: 1.7;
  color: var(--on-surface);
  outline: none;
  min-height: 110px;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea::placeholder {
  color: rgba(68,71,72,0.32);
  font-family: var(--font-serif);
  font-style: italic;
}
.textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.10);
}


/* ══════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════ */

/* Primary card — glassmorphic, gold top accent */
.card {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212,175,55,0.22);
  border-top: 2px solid var(--gold);
  border-radius: 16px;
  padding: 24px;
  transition: box-shadow 0.3s, transform 0.3s;
  box-shadow: var(--shadow-card);
}
.card:hover {
  box-shadow: 0 16px 48px rgba(180,150,80,.16), 0 0 32px rgba(212,175,55,.12);
  transform: translateY(-3px);
}

/* Flat card — subtle, no top accent */
.card-flat {
  background: var(--surface-lowest);
  border: 1px solid rgba(196,199,200,0.6);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* Oracle card — used for deck/spread selectors */
.oracle-card {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.4s ease;
  border: 1px solid rgba(212,175,55,0.18);
  border-top: 2px solid rgba(212,175,55,0.35);
}
.oracle-card:hover {
  background: rgba(255,255,255,0.97);
  border-color: rgba(212,175,55,0.50);
  border-top-color: var(--gold);
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(180,150,80,.14), 0 0 32px rgba(212,175,55,.12);
}

/* Spread demo card */
.spread-demo {
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 14px;
  padding: 28px 24px;
}

/* ── KPI Cards (Manager dashboards) ──────────────────────────── */
.kpi {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212,175,55,0.20);
  border-top: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}
.kpi-val { font-size: 28px; font-weight: 700; line-height: 1; margin: 6px 0 4px; color: var(--on-surface); }
.kpi-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); }
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }


/* ══════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 7px; border-radius: 99px;
  font-size: 10px; font-weight: 700;
}
.badge-gold     { background: rgba(212,175,55,0.15); color: #9a7c1a; border: 1px solid rgba(212,175,55,0.3); }
.badge-lavender { background: var(--lavender); color: #444655; }
.badge-rose     { background: var(--rose); color: #665c60; }
.badge-red      { background: #ffdad6; color: #93000a; }
.badge-amber    { background: #fff3cd; color: #7a5c00; }
.badge-green    { background: #d4edda; color: #155724; }
.badge-gray     { background: var(--surface-high); color: var(--text-secondary); }


/* ══════════════════════════════════════════════════════════════
   DATA TABLES
   ══════════════════════════════════════════════════════════════ */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(196,199,200,0.8);
  background: var(--surface-low);
}
.data-table td {
  font-size: 13px; color: var(--text-secondary);
  padding: 12px 14px;
  border-bottom: 1px solid rgba(196,199,200,0.4);
}
.data-table tr:hover td { background: var(--surface-low); }
.data-table tr:last-child td { border-bottom: none; }


/* ══════════════════════════════════════════════════════════════
   CHIPS / TAGS  (aligned to 03_Components spec)
   ══════════════════════════════════════════════════════════════ */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px;
  background: var(--rose);
  color: var(--tertiary);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em;
  transition: all 0.15s;
}

/* Lavender variant */
.chip-lavender,
.chip.lavender  { background: var(--lavender); color: var(--secondary); }

/* Gold variant */
.chip-gold,
.chip.gold      { background: rgba(212,175,55,0.10); color: var(--gold); border: 1px solid rgba(212,175,55,0.25); }

/* Outline variant */
.chip-outline,
.chip.outline   { background: transparent; border: 1px solid rgba(212,175,55,0.30); color: var(--on-surface-variant); }


/* ══════════════════════════════════════════════════════════════
   ORACLE INSIGHT CALLOUT  (03_Components spec signature component)
   ══════════════════════════════════════════════════════════════ */
.oracle-insight {
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(212,175,55,0.18);
  border-top: 1px solid var(--gold);
  border-radius: var(--radius-xl);
  padding: 40px 48px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-card);
}
/* ✦ decorative corner markers */
.oracle-insight::before,
.oracle-insight::after {
  content: '✦';
  position: absolute;
  color: rgba(212,175,55,0.65);
  font-size: 12px;
  top: -7px;
  background: var(--surface);
  padding: 0 10px;
}
.oracle-insight::before { left: 28px; }
.oracle-insight::after  { right: 28px; }
.oracle-insight blockquote,
.oracle-insight p {
  font-family: var(--font-serif);
  font-size: 19px; font-style: italic;
  color: var(--on-surface);
  line-height: 1.7;
  margin: 0 0 12px;
}
.oracle-insight cite {
  font-style: normal;
  font-size: 11px; letter-spacing: 0.15em;
  color: var(--on-surface-variant); opacity: 0.6;
}


/* ══════════════════════════════════════════════════════════════
   SPECIALTY COMPONENTS
   ══════════════════════════════════════════════════════════════ */

/* ── Reader Card ── */
.reader-card {
  background: rgba(255,255,255,0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(212,175,55,0.16);
  border-top: 1px solid rgba(212,175,55,0.45);
  border-radius: 16px;
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 16px;
  align-items: center; text-align: center;
  transition: box-shadow 0.3s, transform 0.3s;
}
.reader-card:hover {
  box-shadow: var(--shadow-deep);
  transform: translateY(-3px);
}
.reader-card .avatar {
  width: 84px; height: 84px; border-radius: 999px;
  background: linear-gradient(135deg, var(--lavender), var(--rose));
  border: 1px solid rgba(212,175,55,0.35);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-style: italic;
  color: var(--gold); font-size: 30px;
  box-shadow: 0 0 24px rgba(212,175,55,0.18);
  overflow: hidden;
}

/* ── AI Interpretation Block ── */
.ai-block {
  background: rgba(255,255,255,0.62);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(212,175,55,0.20);
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: var(--shadow-deep);
}

/* ── Loading skeleton shimmer ── */
.skel {
  height: 14px; border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--surface-c1) 0%,
    var(--surface-c3) 50%,
    var(--surface-c1) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel.w-80 { width: 80%; }
.skel.w-60 { width: 60%; }
.skel.w-40 { width: 40%; }


/* ══════════════════════════════════════════════════════════════
   SIDEBAR NAV  (Manager & Member dashboards)
   ══════════════════════════════════════════════════════════════ */
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-lg);
  font-family: var(--font-sans);
  font-size: 13px; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.sidebar-link:hover {
  background: rgba(225,225,245,0.45);
  color: var(--text-primary);
  border-left-color: rgba(212,175,55,0.4);
}
.sidebar-link.active {
  background: rgba(225,225,245,0.55);
  color: #5c5d6e;
  font-weight: 600;
  border-left-color: var(--gold);
}
.sidebar-link .icon {
  font-size: 15px; width: 20px; text-align: center;
  flex-shrink: 0;
}

#mobile-nav-btn,
#mobile-nav-close,
#mobile-nav-overlay,
#sidebar-toggle,
#hamburger,
#sidebar-close,
#sidebar-overlay,
#nav-login,
#nav-account-btn,
.sidebar-link {
  touch-action: manipulation;
}

#mobile-nav-btn,
#mobile-nav-close,
#sidebar-toggle,
#hamburger,
#sidebar-close,
#nav-login,
#nav-account-btn {
  position: relative;
  z-index: 1;
  min-width: 44px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
}

#nav-login,
#nav-account-btn {
  flex-shrink: 0;
}

#mobile-nav {
  touch-action: manipulation;
}

#mobile-nav > div:last-child {
  z-index: 1;
}

.section-label {
  padding: 14px 14px 5px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--text-muted);
}

/* ── Sidebar RWD (mobile drawer) ──────────────────────────────── */
#sidebar { transition: transform 0.22s ease-in-out; }
#sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(25,28,29,0.35);
  z-index: 20;
}
#sidebar-overlay.open { display: block; }
#hamburger { display: none; }

@media (max-width: 767px) {
  body > header {
    z-index: 70;
  }
  body > header nav {
    min-height: 64px;
    gap: 10px;
  }
  #mobile-nav-btn {
    width: 44px;
    height: 44px;
    margin-left: -8px;
  }
  #nav-login {
    padding: 0 14px;
    justify-content: center;
  }
  #nav-account-btn {
    padding: 0 10px;
    justify-content: center;
  }
  #mobile-nav-close {
    width: 44px;
    height: 44px;
    margin-right: -8px;
  }
  #sidebar-toggle,
  #hamburger,
  #sidebar-close {
    min-width: 44px;
    min-height: 44px;
  }
  #mobile-nav .sidebar-link {
    min-height: 44px;
  }
  #sidebar {
    position: fixed; top: 0; left: 0;
    height: 100%; z-index: 30;
    transform: translateX(-100%);
  }
  #sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 32px rgba(0,0,0,0.15);
  }
  #hamburger { display: flex; }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 600px; }
  main table { min-width: 580px; }
  main .data-table-container,
  main [class*="overflow-x"] { overflow-x: auto; }
  .mobile-stack { flex-direction: column !important; }
  .mobile-full  { width: 100% !important; }

  body:has(#sidebar-toggle) > header,
  body:has(#sidebar-toggle) #sidebar,
  body:has(#sidebar-toggle) #sidebar-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  body:has(#sidebar-toggle) #sidebar-overlay {
    background: rgba(25,28,29,0.32);
  }
}


/* ══════════════════════════════════════════════════════════════
   TOAST NOTIFICATION  (dark style per 03_Components spec)
   ══════════════════════════════════════════════════════════════ */
@keyframes slide-in {
  from { transform: translateY(14px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.toast {
  animation: slide-in 0.22s ease;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px;
  border-radius: 12px;
  background: rgba(20,16,30,0.92);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 13px;
  box-shadow: 0 16px 40px rgba(45,30,70,.30);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.toast .material-symbols-outlined { color: var(--gold); font-size: 18px; }
.toast-error {
  background: rgba(93,0,5,0.90);
}


/* ══════════════════════════════════════════════════════════════
   TAROT CARD MECHANICS
   ══════════════════════════════════════════════════════════════ */

/* ── Step visibility ── */
.step.hidden { display: none; }

/* ── Card flip ── */
.flip-card { perspective: 1200px; cursor: pointer; }
.flip-card-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.75s cubic-bezier(0.4,0,0.2,1);
}
.flip-card.flipped .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 12px; overflow: hidden;
}
.flip-card-front { transform: rotateY(180deg); }

/* Card back default (dark mystic) */
.card-back-default {
  width: 100%; height: 100%;
  background: linear-gradient(155deg, #1a1432 0%, #2a1f48 50%, #1a1432 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: rgba(212,175,55,0.22);
}

/* ── File upload overlay ── */
.file-input {
  position: absolute; inset: 0; opacity: 0;
  cursor: pointer; width: 100%; height: 100%; z-index: 10;
}

/* ── Card compositing layers ── */
.layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.layer-bg   { object-fit: cover; }
.layer-main { object-fit: contain; }
.layer-text {
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0.6rem; font-size: 0.7rem; color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.9);
  background: linear-gradient(transparent 60%, rgba(0,0,0,0.7));
  text-align: center;
}

/* Deck preview thumbnail */
.deck-preview {
  position: relative;
  width: 140px; height: 230px;
  margin: 0 auto 1.25rem;
  border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(212,175,55,0.22);
  box-shadow: 0 8px 24px rgba(180,150,80,.18), 0 0 24px rgba(212,175,55,.08);
  background: linear-gradient(145deg, #221a38, #2f2450, #221a38);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.oracle-card:hover .deck-preview {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(180,150,80,.25), 0 0 32px rgba(212,175,55,.20);
}


/* ══════════════════════════════════════════════════════════════
   VISUAL FX
   ══════════════════════════════════════════════════════════════ */

/* ── Entry pulse animation ── */
@keyframes entry-pulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 20px rgba(212,175,55,0.4); }
  50%       { opacity: 0.7; text-shadow: 0 0 40px rgba(212,175,55,0.2); }
}
.entry-pulse { animation: entry-pulse 3s ease-in-out infinite; }

/* ── Gold divider ── */
.gold-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
  border: none;
  margin: 0;
}

/* ── Ambient background orbs ── */
.orb-lavender {
  background: radial-gradient(circle, rgba(225,225,245,0.6) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-rose {
  background: radial-gradient(circle, rgba(237,223,228,0.5) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-gold {
  background: radial-gradient(circle, rgba(212,175,55,0.1) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

/* ── Page transition ── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-fade-in { animation: fade-in 0.4s ease forwards; }


/* ══════════════════════════════════════════════════════════════
   UTILITY OVERRIDES
   ══════════════════════════════════════════════════════════════ */

/* Consistent gold focus ring on all interactive elements */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(212,175,55,0.6);
  outline-offset: 2px;
}
