/* ═══════════════════════════════════════════════
   ORACLE — Divine Matching App
   Skeuomorphic Greek/Roman Temple UI
═══════════════════════════════════════════════ */

:root {
  /* ── Amphoreus Gold ── */
  --gold: #D4A82A;
  --gold-light: #F0CA48;
  --gold-deep: #8A6A10;
  /* ── Midnight Navy Stone ── */
  --stone-dark: #07091C;
  --stone-mid: #0D1428;
  --stone-light: #1E2848;
  --stone-surface: #2A3858;
  /* ── Marble & Ivory ── */
  --parchment: #E8E4D8;
  --parchment-dark: #CCC8B8;
  --parchment-aged: #A0A898;
  /* ── Indigo & Cobalt ── */
  --purple-deep: #0A0824;
  --purple-mid: #160E3C;
  --cobalt: #1A3478;
  --cobalt-light: #2A4A9A;
  /* ── Crimson Accent ── */
  --crimson: #8A1428;
  --crimson-light: #B82035;
  /* ── Flame ── */
  --flame-orange: #E05A10;
  --flame-yellow: #FFD040;
  /* ── Text ── */
  --text-gold: #D4A82A;
  --text-parchment: #DDD8C8;
  --text-stone: #6A7090;
  --shadow-deep: rgba(0,5,20,0.85);
  --shadow-gold: rgba(212, 168, 42, 0.4);
}

/* ─── RESET & BASE ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: #030610;
  font-family: 'IM Fell English', Georgia, serif;
  color: var(--text-parchment);
  -webkit-font-smoothing: antialiased;
}

#app-root {
  position: fixed;
  inset: 0;
  overflow: hidden;
  isolation: isolate;
}

/* ─── CLOUD BACKGROUND ──────────────────────── */
#app-root::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  /* 200% wide so we have room to drift without showing a gap */
  width: 200%; height: 100%;
  background-image:
    /* dark navy tint so the bright sky fits the dark UI */
    linear-gradient(rgba(5, 8, 20, 0.20), rgba(5, 8, 20, 0.20)),
    url('./background.jpg');
  background-size: auto 100%;  /* preserve aspect ratio, fill height, tile horizontally */
  background-repeat: repeat-x;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  animation: cloudDrift 40s ease-in-out infinite;
}

@keyframes cloudDrift {
  0%   { transform: translateX(0%); }
  50%  { transform: translateX(-25%); } /* 25% of 200vw = 50vw drift */
  100% { transform: translateX(0%); }
}

/* ─── SCREEN SYSTEM ────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  z-index: 1;
}
.screen.active { opacity: 1; pointer-events: all; }
.screen.fading-out { opacity: 0; pointer-events: none; }

.main-screen { padding-bottom: 80px; }

/* ─── STARS CANVAS ─────────────────────────── */
#stars-canvas, #auth-canvas, #connect-canvas, #divination-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ─── SMOKE OVERLAY ─────────────────────────── */
.smoke-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(30,50,120,0.18) 0%, transparent 70%);
  pointer-events: none; z-index: 1;
  animation: smokePulse 6s ease-in-out infinite;
}
@keyframes smokePulse {
  0%,100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ═══════════════════════════════════════════════
   SPLASH SCREEN
═══════════════════════════════════════════════ */
#screen-splash {
  background: radial-gradient(ellipse at center, rgba(14,20,56,0.72) 0%, rgba(6,10,32,0.78) 60%, rgba(3,6,16,0.85) 100%);
  display: flex; align-items: center; justify-content: center;
}

.splash-logo-wrap {
  position: relative;
  display: inline-block;
  overflow: hidden;
}

.splash-logo {
  display: block;
  max-width: 80vw;
  max-height: 60vh;
  width: auto;
  height: auto;
  filter: drop-shadow(0 0 30px rgba(201,168,76,0.4));
}

.splash-shine {
  position: absolute;
  top: 0; left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.55) 50%,
    transparent 70%
  );
  transform: skewX(-15deg);
  animation: shineSwipe 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes shineSwipe {
  0%   { left: -120%; }
  40%  { left: 160%; }
  100% { left: 160%; }
}

/* ═══════════════════════════════════════════════
   STONE TABLET BASE
═══════════════════════════════════════════════ */
.stone-tablet {
  background: linear-gradient(145deg, #0C1826 0%, #0A1220 50%, #0C1826 100%);
  border: 2px solid #1A2E50;
  border-radius: 4px;
  box-shadow:
    inset 0 1px 0 rgba(201,168,76,0.1),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 4px 20px rgba(0,0,0,0.7),
    0 0 0 1px rgba(201,168,76,0.05);
  position: relative;
}
.tablet-weathering {
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  border-radius: 4px; pointer-events: none; opacity: 0.5;
}
.tablet-cracks {
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(0,0,0,0.05) 50%, transparent 70%);
  pointer-events: none; border-radius: 4px;
}
.tablet-content { padding: 24px 20px; position: relative; z-index: 1; }

/* ─── DIVIDERS & RUNES ─────────────────────── */
.divider-runes {
  text-align: center; color: var(--gold-deep);
  font-size: 0.9rem; letter-spacing: 4px;
  margin: 12px 0;
}
.divider-runes.small { font-size: 0.7rem; margin: 8px 0; }

.section-rune {
  text-align: center; font-size: 1.5rem;
  color: var(--gold); margin-bottom: 8px;
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.5));
}

/* ─── STONE BUTTONS ─────────────────────────── */
.stone-button {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 100%; padding: 14px 20px;
  background: linear-gradient(145deg, #101928 0%, #0C1826 50%, #101928 100%);
  border: 1px solid #1C2C4A;
  border-radius: 3px;
  cursor: pointer;
  color: var(--text-parchment);
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5), inset 0 1px 0 rgba(201,168,76,0.1);
  position: relative; overflow: hidden;
}
.stone-button::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(201,168,76,0.05) 0%, transparent 100%);
}
.stone-button:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(0,0,0,0.6), 0 0 12px rgba(201,168,76,0.2), inset 0 1px 0 rgba(201,168,76,0.15);
  transform: translateY(-1px);
}
.stone-button:active { transform: translateY(1px); }
.stone-button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.primary-cta {
  background: linear-gradient(145deg, #0E1C3A 0%, #101C30 50%, #0E1C3A 100%);
  border-color: var(--gold);
}
.primary-cta .btn-latin {
  font-family: 'Cinzel', serif; font-size: 1rem; font-weight: 600;
  color: var(--gold); letter-spacing: 1px;
}

.btn-latin {
  font-family: 'Cinzel', serif; font-size: 0.85rem; font-weight: 600;
  color: var(--text-parchment); letter-spacing: 1px;
}
.btn-greek {
  font-size: 0.6rem; color: var(--text-stone);
  letter-spacing: 1px; margin-top: 3px;
}

.secondary-btn .btn-latin { color: var(--text-stone); font-size: 0.75rem; }

/* ─── OFFERING DIVIDER ──────────────────────── */
.offering-divider {
  display: flex; align-items: center; gap: 10px;
  margin: 16px 0;
}
.div-line { flex: 1; height: 1px; background: var(--stone-light); }
.div-text { font-size: 0.75rem; color: var(--text-stone); letter-spacing: 2px; font-style: italic; }

/* ═══════════════════════════════════════════════
   AUTH SCREEN
═══════════════════════════════════════════════ */
#screen-auth {
  background: radial-gradient(ellipse at bottom, rgba(11,16,32,0.76) 0%, rgba(5,8,16,0.82) 60%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}


.auth-container { position: relative; z-index: 10; width: 100%; max-width: 340px; }
.auth-tablet { border-radius: 22px !important; overflow: hidden; }

.auth-logo {
  display: block;
  width: 120px; height: auto;
  margin: 4px auto 14px;
}
.auth-title-img {
  display: block;
  width: 100%; max-width: 391px; height: auto;
  margin: 0 auto 22px;
}

.auth-buttons { display: flex; flex-direction: column; gap: 10px; margin: 0; }

.auth-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  background: #151f38;
  color: #fff;
}
.auth-btn:hover { background: #1e2d4d; border-color: rgba(255,255,255,0.2); }
.auth-btn-main { font-family: system-ui, sans-serif; font-size: 0.88rem; font-weight: 500; flex: 1; color: #fff; }

.auth-btn-logo {
  width: 20px; height: 20px;
  object-fit: contain; flex-shrink: 0;
}
.auth-apple-logo { filter: invert(1) brightness(2); }

.auth-guest { justify-content: center; }
.auth-guest .auth-btn-main { text-align: center; flex: unset; }

/* ═══════════════════════════════════════════════
   CONNECT MUSIC SCREEN
═══════════════════════════════════════════════ */
#screen-connect {
  background: radial-gradient(ellipse at top, rgba(11,16,32,0.76) 0%, rgba(5,8,16,0.82) 60%);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.connect-container { position: relative; z-index: 10; width: 100%; max-width: 340px; }
.connect-tablet { border-radius: 22px !important; overflow: hidden; }

.connect-logo {
  display: block;
  width: 80px; height: auto;
  margin: 4px auto 10px;
}
.connect-offerings-img {
  display: block;
  width: 100%; max-width: 260px; height: auto;
  margin: 0 auto 16px;
}

.music-services { display: flex; flex-direction: column; gap: 10px; margin: 0 0 10px; }
.service-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  background: #151f38;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  transition: border-color 0.2s;
}
.service-card.connected { border-color: var(--gold); }
.service-icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
}
.service-icon img { width: 100%; height: 100%; object-fit: cover; }
.spotify-icon { background: rgba(30,215,96,0.15); }
.apple-icon   { background: rgba(252,60,68,0.15); }
.sc-icon      { background: rgba(255,102,0,0.15); }

.service-info { flex: 1; }
.service-name { font-family: system-ui, sans-serif; font-size: 0.9rem; font-weight: 500; color: #fff; }

.service-connect-btn {
  padding: 7px 14px;
  background: #0e1628;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  color: #fff;
  font-family: system-ui, sans-serif;
  font-size: 0.78rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.service-connect-btn:hover { border-color: var(--gold); color: var(--gold); }
.service-connect-btn.active { border-color: var(--gold); color: var(--gold); background: rgba(201,168,76,0.1); }

.connect-hint {
  text-align: center; font-size: 0.7rem;
  color: var(--text-stone); margin: 4px 0 10px;
}

/* ═══════════════════════════════════════════════
   DIVINATION SCREEN
═══════════════════════════════════════════════ */
#screen-divination {
  background: radial-gradient(ellipse at center, rgba(12,10,46,0.76) 0%, rgba(6,4,22,0.82) 60%);
  display: flex; align-items: center; justify-content: center;
}
.oracle-chamber {
  position: relative; z-index: 10;
  display: flex; flex-direction: column;
  align-items: center; gap: 30px;
  padding: 40px 20px; width: 100%;
}
.chamber-header { text-align: center; }
.chamber-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.1rem; color: var(--gold);
  letter-spacing: 2px; margin-top: 8px;
}

/* Cauldron */
.cauldron { position: relative; display: flex; flex-direction: column; align-items: center; }
.cauldron-body { position: relative; }
.cauldron-rim {
  width: 100px; height: 14px;
  background: linear-gradient(180deg, #5A4A2A 0%, #101C30 100%);
  border-radius: 50%; border: 2px solid #7A6A3A;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
}
.cauldron-belly {
  width: 80px; height: 60px; margin: 0 auto;
  background: radial-gradient(ellipse at top, #1A2448, #0B1020);
  border-radius: 0 0 50% 50%; border: 2px solid #1A2840;
  border-top: none;
  box-shadow: inset 0 -10px 20px rgba(0,0,0,0.6), 0 4px 10px rgba(0,0,0,0.5);
}
.cauldron-base {
  width: 50px; height: 10px; margin: 0 auto;
  background: linear-gradient(180deg, #101C30, #0B1020);
  border-radius: 0 0 4px 4px; border: 1px solid #1A2840; border-top: none;
}
.cauldron-legs { display: flex; justify-content: space-between; width: 70px; margin: 0 auto; }
.cauldron-leg {
  width: 8px; height: 16px;
  background: linear-gradient(180deg, #101C30, #0B1020);
  border-radius: 0 0 3px 3px; border: 1px solid #1A2840; border-top: none;
}
.cauldron-fire {
  position: absolute; top: -24px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 40px; display: flex; align-items: flex-end; justify-content: center; gap: 4px;
}
.cauldron-flame {
  border-radius: 50% 50% 20% 20%;
  filter: blur(2px);
  animation: cauldronFlame 0.6s ease-in-out infinite alternate;
}
.f1 { width: 20px; height: 35px; background: radial-gradient(ellipse at bottom, #FFD700, #FF6B00 70%, transparent); animation-delay: 0s; }
.f2 { width: 28px; height: 50px; background: radial-gradient(ellipse at bottom, #FFA500, #FF4400 70%, transparent); animation-delay: 0.2s; }
.f3 { width: 18px; height: 30px; background: radial-gradient(ellipse at bottom, #FFD700, #FF8800 70%, transparent); animation-delay: 0.4s; }
@keyframes cauldronFlame {
  0% { transform: scaleX(0.9) skewX(-3deg); }
  100% { transform: scaleX(1.1) skewX(3deg); }
}
.cauldron-smoke-plume { position: absolute; top: -70px; left: 50%; transform: translateX(-50%); width: 80px; }
.smoke-particle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(140,160,220,0.22), transparent 70%);
  animation: smokeDrift linear infinite;
  filter: blur(6px);
}
.sp1 { width: 30px; height: 30px; left: 25px; animation-duration: 2.5s; animation-delay: 0s; }
.sp2 { width: 24px; height: 24px; left: 30px; animation-duration: 3s; animation-delay: 0.5s; }
.sp3 { width: 36px; height: 36px; left: 20px; animation-duration: 2s; animation-delay: 1s; }
.sp4 { width: 20px; height: 20px; left: 35px; animation-duration: 3.5s; animation-delay: 0.3s; }
.sp5 { width: 28px; height: 28px; left: 22px; animation-duration: 2.8s; animation-delay: 0.8s; }
@keyframes smokeDrift {
  0% { transform: translateY(0) translateX(0) scale(0.5); opacity: 0.6; }
  100% { transform: translateY(-80px) translateX(10px) scale(1.5); opacity: 0; }
}

.divination-text-panel {
  width: 100%; max-width: 360px;
  padding: 20px; text-align: center;
}
.phase-text {
  font-size: 0.9rem; font-style: italic;
  color: var(--text-parchment); line-height: 1.6;
  min-height: 40px; transition: opacity 0.4s ease;
}
.oracle-progress { display: flex; justify-content: center; gap: 12px; margin-top: 16px; }
.progress-rune {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--stone-light);
  font-family: 'IM Fell English', serif; font-size: 0.9rem;
  color: var(--text-stone); transition: all 0.4s;
}
.progress-rune.active {
  border-color: var(--gold); color: var(--gold);
  box-shadow: 0 0 10px rgba(201,168,76,0.4);
  animation: runePulse 0.8s ease-in-out infinite;
}
.progress-rune.done {
  border-color: var(--gold-deep); background: var(--gold-deep);
  color: var(--stone-dark);
}
@keyframes runePulse {
  0%,100% { box-shadow: 0 0 10px rgba(201,168,76,0.4); }
  50% { box-shadow: 0 0 20px rgba(201,168,76,0.7); }
}

/* ═══════════════════════════════════════════════
   HOME / PROFILE SCREEN
═══════════════════════════════════════════════ */
#screen-home {
  background: linear-gradient(180deg, rgba(7,9,28,0.78) 0%, rgba(5,8,21,0.82) 100%);
}

/* ── GOD PICK ────────────────────────────────── */
#screen-godpick {
  display: flex; align-items: flex-start; justify-content: center;
  overflow-y: auto;
}
.godpick-chamber {
  position: relative; z-index: 10;
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 16px 60px; width: 100%; max-width: 900px;
}
.godpick-header { text-align: center; margin-bottom: 28px; }
.godpick-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.3rem; color: var(--gold); margin: 8px 0 10px;
  text-shadow: 0 0 18px rgba(212,168,42,0.5);
}
.godpick-subtitle {
  font-size: 0.85rem; color: var(--text-stone); line-height: 1.6;
}
.godpick-cards {
  display: flex; flex-direction: row; gap: 16px;
  width: 100%; justify-content: center; flex-wrap: wrap;
}
.godpick-card {
  flex: 1; min-width: 220px; max-width: 280px;
  background: linear-gradient(160deg, #0C1826 0%, #0A1220 100%);
  border: 1px solid var(--god-color, var(--gold-deep));
  border-radius: 4px;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
  box-shadow: 0 0 20px var(--god-glow, transparent);
  transition: transform 0.2s, box-shadow 0.2s;
}
.godpick-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 32px var(--god-glow, transparent);
}
.godpick-img {
  width: 100%; max-height: 200px;
  object-fit: contain; object-position: bottom center;
  background: linear-gradient(180deg, transparent 60%, #0A1220 100%);
}
.godpick-card-body {
  padding: 14px 16px 18px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  flex: 1; width: 100%;
}
.godpick-icon { font-size: 1.6rem; }
.godpick-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem; color: var(--god-color, var(--gold)); margin: 0;
  letter-spacing: 0.06em;
}
.godpick-epithet {
  font-size: 0.72rem; color: var(--gold-dim);
  font-style: italic; margin: 0;
}
.godpick-desc {
  font-size: 0.78rem; color: var(--text-stone);
  line-height: 1.5; margin: 4px 0 10px;
}
.godpick-btn {
  margin-top: auto;
  background: transparent;
  border: 1px solid var(--god-color, var(--gold));
  color: var(--god-color, var(--gold));
  font-family: 'Cinzel', serif; font-size: 0.72rem; letter-spacing: 0.08em;
  padding: 9px 18px; cursor: pointer; border-radius: 2px;
  transition: background 0.18s, color 0.18s;
}
.godpick-btn:hover {
  background: var(--god-color, var(--gold));
  color: #060810;
}
@media (max-width: 600px) {
  .godpick-cards { flex-direction: column; align-items: center; }
  .godpick-card  { min-width: 0; width: 100%; max-width: 340px; }
  .godpick-img   { max-height: 160px; }
}

/* ── ROUTE PAGE ──────────────────────────────── */
.route-page { padding: 0 0 100px; }

.profile-page-header {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 20px 10px;
  background: linear-gradient(180deg, #07101E 0%, #0B1220 100%);
  border-bottom: 1px solid #141E36;
  box-shadow: 0 2px 12px rgba(0,5,20,0.6);
}
.profile-header-ornament { color: var(--gold); font-size: 0.8rem; }
.profile-header-text { text-align: center; }
.profile-header-title {
  font-family: 'Cinzel', serif; font-size: 0.75rem;
  letter-spacing: 3px; color: var(--text-parchment); text-transform: uppercase;
}
.profile-header-sub { font-size: 0.6rem; color: var(--text-stone); letter-spacing: 1px; margin-top: 2px; }
.service-connected-label { color: #1ED760; font-weight: bold; }

/* Hero row — image left, identity right, route card below */
.hero-row {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  position: relative;
  border-bottom: 1px solid var(--gold-deep);
  overflow: visible;
  min-height: 180px;
  background: #07091C;
}
.archetype-bg {
  display: block;
  flex-shrink: 0;
  width: auto;
  max-width: 42%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  object-position: bottom center;
  align-self: flex-end;
  position: relative;
  z-index: 1;
  filter: brightness(0.92) saturate(1.08);
}
.hero-identity-panel {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
  /* pad to stay inside the scroll's inner parchment area:
     top = ST (44px), right = SR (72px), bottom = SB (44px) */
  padding: 44px 72px 44px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.scroll-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
}

/* keep hero name/epithet/desc styles, now inside .hero-identity-panel */
.hero-identity { flex: 1; min-width: 0; }
.hero-god-name,
.hero-epithet,
.hero-desc {
  position: relative;
  z-index: 1;
}
.hero-god-name {
  font-family: 'Cinzel Decorative', serif; font-size: 1.2rem; font-weight: 700;
  color: #5a2e00; text-shadow: 0 1px 2px rgba(255,240,200,0.6); line-height: 1.1;
}
.hero-epithet {
  font-family: 'Cinzel', serif; font-size: 0.6rem;
  color: #1a2a5a; letter-spacing: 2px; margin-top: 3px;
}
.hero-desc { font-size: 0.62rem; color: #3a3a2a; margin-top: 4px; line-height: 1.4; }

/* Route header card */
.route-header-card {
  margin: 0 6px 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, #0C1826, #0A1220);
  border: 1px solid #1E2848;
  border-radius: 3px;
  text-align: center;
}
.rhc-eyebrow {
  font-family: 'Cinzel', serif; font-size: 0.5rem;
  letter-spacing: 3px; color: var(--text-stone); margin-bottom: 5px;
}
.rhc-title {
  font-family: 'Cinzel Decorative', serif; font-size: 1.1rem; font-weight: 700;
  color: var(--gold); text-shadow: 0 0 15px rgba(212,168,42,0.3); margin-bottom: 4px;
}
.rhc-meta {
  font-family: 'Cinzel', serif; font-size: 0.52rem;
  color: var(--cobalt-light); letter-spacing: 2px; margin-bottom: 10px;
}
.rhc-decree {
  font-size: 0.65rem; color: var(--text-stone); font-style: italic; line-height: 1.6;
  padding-top: 10px; border-top: 1px solid #141E36;
}

/* Home route map */
.home-map-wrap {
  position: relative; margin: 0 6px 14px;
  height: 400px; border-radius: 3px; overflow: hidden;
  box-shadow:
    0 0 0 2px #5a3a10,
    0 0 0 4px #0B1020,
    0 0 0 6px #8b5e1a,
    0 4px 20px rgba(0,5,20,0.6);
}
#home-map { width: 100%; height: 100%; }
.home-map-vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(7,9,28,0.35) 100%);
}
.home-map-loading {
  position: absolute; inset: 0; z-index: 10;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(6,9,18,0.85);
  transition: opacity 0.5s ease;
}
.home-map-loading.hidden { opacity: 0; pointer-events: none; }
.hml-rune {
  font-size: 2rem; color: var(--gold);
  animation: runePulse 1.2s ease-in-out infinite;
}
.hml-text {
  font-family: 'Cinzel', serif; font-size: 0.55rem;
  letter-spacing: 2px; color: var(--text-stone);
}

/* Navigation overlay */
.nav-overlay {
  position: absolute; top: 10px; left: 10px; right: 10px;
  z-index: 20; display: flex; align-items: center; gap: 10px;
  background: rgba(5,7,20,0.93); border: 1px solid var(--gold);
  border-radius: 4px; padding: 10px 12px;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(0,0,0,0.6), 0 0 12px rgba(212,168,42,0.15);
}
.nav-maneuver {
  width: 38px; height: 38px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--stone-dark); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: bold;
}
.nav-text { flex: 1; min-width: 0; }
.nav-instruction {
  font-family: 'Cinzel', serif; font-size: 0.65rem; font-weight: 600;
  color: var(--text-parchment); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px;
}
.nav-distance {
  font-size: 0.52rem; color: var(--gold); letter-spacing: 1px;
}
.nav-stop {
  width: 30px; height: 30px; flex-shrink: 0;
  background: rgba(138,20,40,0.85); border: 1px solid var(--crimson);
  color: #fff; border-radius: 50%; font-size: 0.7rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.nav-stop:hover { background: var(--crimson); }

/* Current destination banner */
.nav-dest-bar {
  position: absolute; bottom: 10px; left: 10px; right: 10px;
  z-index: 20; display: flex; align-items: center; gap: 8px;
  background: rgba(5,7,20,0.90); border: 1px solid var(--cobalt-light);
  border-radius: 4px; padding: 8px 12px;
  backdrop-filter: blur(6px);
}
.nav-dest-icon { width: 28px; height: 28px; flex-shrink: 0; }
.nav-dest-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nav-dest-name {
  font-family: 'Cinzel', serif; font-size: 0.62rem; font-weight: 600;
  color: var(--text-parchment); letter-spacing: 1px;
}

/* Route itinerary */
.route-itinerary { padding: 0 14px; }
.route-itinerary-title {
  font-family: 'Cinzel', serif; font-size: 0.52rem; letter-spacing: 3px;
  color: var(--text-stone); text-align: center; padding: 8px 0 12px;
}
.route-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }

/* Place card */
.route-place-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #0C1826, #0A1220);
  border: 1px solid #141E36; border-radius: 3px;
  position: relative; overflow: hidden;
  transition: border-color 0.2s;
}
.route-place-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: linear-gradient(180deg, var(--gold), var(--gold-deep));
}
.route-place-card:hover { border-color: var(--gold-deep); }
.rpc-number {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cinzel', serif; font-size: 0.7rem; font-weight: 700;
  color: var(--stone-dark);
}
.rpc-content { flex: 1; min-width: 0; }
.rpc-header { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.rpc-name {
  font-family: 'Cinzel', serif; font-size: 0.75rem;
  color: var(--text-parchment); font-weight: 600;
}
.rpc-type {
  font-size: 0.48rem; color: var(--cobalt-light);
  letter-spacing: 2px; text-transform: uppercase;
}
.rpc-why { font-size: 0.6rem; color: var(--text-stone); line-height: 1.5; font-style: italic; }
.rpc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.rpc-icon { width: 42px; height: 42px; flex-shrink: 0; }
.rpc-icon img { width: 100%; height: 100%; object-fit: contain; display: block; }
.rpc-time {
  font-family: 'Cinzel', serif; font-size: 0.5rem;
  color: var(--gold); letter-spacing: 1px; white-space: nowrap;
}

/* Route CTA */
.route-cta-wrap { padding: 0 14px 14px; }

/* ═══════════════════════════════════════════════
   QUEST SCREEN
═══════════════════════════════════════════════ */
#screen-quest { background: linear-gradient(180deg, rgba(7,9,28,0.78) 0%, rgba(5,8,21,0.82) 100%); }
.quest-page { padding: 0 0 80px; }

.page-header {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 20px 10px;
  background: linear-gradient(180deg, #07101E 0%, #0B1220 100%);
  border-bottom: 1px solid #141E36;
}
.page-header-decor { font-size: 1.2rem; }
.page-header-text { text-align: center; }
.page-header-title {
  font-family: 'Cinzel', serif; font-size: 0.85rem;
  letter-spacing: 4px; color: var(--text-parchment);
}
.page-header-sub { font-size: 0.6rem; color: var(--text-stone); letter-spacing: 1px; }

.quest-progress-banner {
  margin: 12px 14px;
  background: linear-gradient(135deg, #0C1826, #0A1220);
  border: 1px solid #141E36; border-radius: 3px;
  padding: 10px 14px;
}
.qp-label { font-size: 0.55rem; letter-spacing: 2px; color: var(--text-stone); font-family: 'Cinzel', serif; }
.qp-bar-wrap { margin: 6px 0; }
.qp-bar { height: 6px; background: rgba(0,0,0,0.4); border-radius: 3px; overflow: hidden; }
.qp-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--flame-orange)); border-radius: 3px; }
.qp-value { font-family: 'Cinzel', serif; font-size: 0.6rem; color: var(--gold); }

.quest-list { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }

.quest-card {
  background: linear-gradient(135deg, #0C1826, #0A1220);
  border: 1px solid #141E36; border-radius: 3px;
  padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  transition: border-color 0.2s;
}
.quest-card.completed { border-color: var(--gold-deep); }
.quest-card.locked { opacity: 0.5; }

.quest-icon-wrap {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #141E36, #0C1626);
  border: 2px solid #1A2840;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.quest-card.completed .quest-icon-wrap { border-color: var(--gold); }
.quest-card.locked .quest-icon-wrap { filter: grayscale(1); }

.quest-info { flex: 1; }
.quest-name { font-family: 'Cinzel', serif; font-size: 0.75rem; color: var(--text-parchment); }
.quest-desc { font-size: 0.6rem; color: var(--text-stone); margin-top: 3px; line-height: 1.4; }
.quest-progress-mini { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.qpm-bar { flex: 1; height: 4px; background: rgba(0,0,0,0.4); border-radius: 2px; overflow: hidden; }
.qpm-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--flame-orange)); }
.qpm-label { font-size: 0.55rem; color: var(--text-stone); white-space: nowrap; }

.quest-reward {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.quest-reward-icon { font-size: 1.2rem; filter: drop-shadow(0 0 6px rgba(201,168,76,0.4)); }
.quest-reward-label { font-size: 0.5rem; color: var(--gold); font-family: 'Cinzel', serif; letter-spacing: 1px; }
.quest-check { color: var(--gold); font-size: 1.4rem; }

/* ═══════════════════════════════════════════════
   CHAT — WAR COUNCIL
═══════════════════════════════════════════════ */
#screen-chat {
  background: linear-gradient(180deg, rgba(7,9,28,0.78) 0%, rgba(5,8,21,0.82) 100%);
  display: flex; flex-direction: column;
  padding-bottom: 0 !important;
}
.war-council-layout {
  display: flex; flex-direction: column;
  height: 100vh; height: 100svh;
  padding-bottom: 80px;
}

.council-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #07101E, #0B1220);
  border-bottom: 2px solid #141E36;
  flex-shrink: 0;
}
.header-ornament { font-size: 1.1rem; }
.header-text { flex: 1; text-align: center; }
.header-title { font-family: 'Cinzel', serif; font-size: 0.85rem; letter-spacing: 3px; color: var(--text-parchment); }
.header-sub { font-size: 0.55rem; color: var(--text-stone); letter-spacing: 1px; margin-top: 2px; }

.roster-panel {
  padding: 8px 16px;
  background: #07101E;
  border-bottom: 1px solid #141E36;
  flex-shrink: 0;
}
.roster-title { font-family: 'Cinzel', serif; font-size: 0.55rem; letter-spacing: 2px; color: var(--text-stone); margin-bottom: 6px; }
.roster-members { display: flex; gap: 12px; overflow-x: auto; }
.roster-member { display: flex; flex-direction: column; align-items: center; gap: 4px; flex-shrink: 0; }
.roster-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #141E36, #0C1626);
  border: 2px solid #1A2840;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; position: relative;
}
.roster-avatar.you { border-color: var(--gold); box-shadow: 0 0 8px rgba(201,168,76,0.3); }
.online-dot {
  position: absolute; bottom: 0; right: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: #2ECC71; border: 1px solid #07101E;
}
.roster-name { font-size: 0.5rem; color: var(--text-stone); text-align: center; max-width: 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Chat Messages */
.tablet-messages {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.tablet-message {
  display: flex; gap: 8px; align-items: flex-start;
  animation: msgAppear 0.3s ease-out;
}
.tablet-message.own { flex-direction: row-reverse; }
.tablet-message.system-message { justify-content: center; }
@keyframes msgAppear {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #141E36, #0C1626);
  border: 1px solid #1A2840;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; flex-shrink: 0;
}
.msg-content {
  max-width: 72%; padding: 8px 12px;
  background: linear-gradient(135deg, #0C1826, #0A1220);
  border: 1px solid #141E36; border-radius: 2px 8px 8px 8px;
  position: relative;
}
.tablet-message.own .msg-content { border-radius: 8px 2px 8px 8px; background: linear-gradient(135deg, #0C1626, #101C30); border-color: var(--gold-deep); }
.msg-chisel-marks {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent, transparent 8px, rgba(201,168,76,0.02) 8px, rgba(201,168,76,0.02) 9px);
  pointer-events: none; border-radius: inherit;
}
.msg-sender { font-family: 'Cinzel', serif; font-size: 0.55rem; color: var(--gold); margin-bottom: 4px; letter-spacing: 1px; }
.msg-text { font-size: 0.75rem; color: var(--text-parchment); line-height: 1.5; }
.msg-timestamp { font-size: 0.5rem; color: var(--text-stone); margin-top: 4px; font-style: italic; }
.system-message .msg-content { background: transparent; border: none; border-top: 1px solid #141E36; border-bottom: 1px solid #141E36; border-radius: 0; max-width: 100%; text-align: center; }
.system-message .msg-text { font-size: 0.65rem; color: var(--text-stone); font-style: italic; }

/* Inscription Panel */
.inscription-panel {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #07101E;
  border-top: 2px solid #141E36;
  flex-shrink: 0;
}
.chisel-icon { font-size: 1.1rem; color: var(--text-stone); }
.inscription-input {
  flex: 1; background: linear-gradient(135deg, #0C1826, #0A1220);
  border: 1px solid #1A2840; border-radius: 2px;
  color: var(--text-parchment);
  font-family: 'IM Fell English', serif; font-size: 0.8rem;
  padding: 8px 12px; outline: none;
}
.inscription-input:focus { border-color: var(--gold-deep); }
.inscription-input::placeholder { color: var(--text-stone); }
.stone-send-btn {
  padding: 8px 14px;
  background: linear-gradient(145deg, #101928, #0C1826);
  border: 1px solid var(--gold-deep);
  border-radius: 2px;
  color: var(--gold); cursor: pointer;
  font-family: 'Cinzel', serif; font-size: 0.65rem;
  letter-spacing: 1px; transition: all 0.2s;
  flex-shrink: 0;
}
.stone-send-btn:hover { border-color: var(--gold); box-shadow: 0 0 8px rgba(201,168,76,0.3); }

/* Prophecy Banner */
.prophecy-banner {
  position: absolute; bottom: 84px; left: 0; right: 0;
  padding: 10px 16px;
  background: linear-gradient(135deg, rgba(8,10,32,0.95), rgba(14,16,52,0.95));
  border-top: 1px solid #3A3A9A; border-bottom: 1px solid #3A3A9A;
  display: flex; align-items: center; gap: 10px;
  transform: translateY(100%); transition: transform 0.4s ease;
  z-index: 50;
}
.prophecy-banner.visible { transform: translateY(0); }
.prophecy-icon { font-size: 1.1rem; }
.prophecy-text { font-size: 0.7rem; color: #A8B8E8; font-style: italic; line-height: 1.4; }

/* ═══════════════════════════════════════════════
   MAP SCREEN
═══════════════════════════════════════════════ */
#screen-map {
  background: rgba(11,16,32,0.82);
  display: flex; flex-direction: column;
  padding-bottom: 0 !important;
  overflow: hidden;
}

.map-toggle-panel {
  background: linear-gradient(180deg, #060912 0%, #0B1020 100%);
  border-bottom: 2px solid #1C2F58;
  padding: 8px 12px 10px;
  flex-shrink: 0;
  z-index: 20;
}
.map-toggle-title {
  text-align: center; font-family: 'Cinzel', serif;
  font-size: 0.55rem; letter-spacing: 3px;
  color: var(--text-stone); margin-bottom: 8px;
}
.map-toggles-row { display: flex; gap: 6px; justify-content: center; }
.map-toggle {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 12px;
  background: linear-gradient(135deg, #0B1020, #1A0A04);
  border: 1px solid #1A2840; border-radius: 20px;
  color: var(--text-stone); cursor: pointer;
  transition: all 0.2s;
  font-size: 0.55rem; font-family: 'Cinzel', serif;
  letter-spacing: 1px;
}
.mt-icon { font-size: 0.9rem; }
.mt-label { font-size: 0.5rem; letter-spacing: 1px; }
.map-toggle.active {
  background: linear-gradient(135deg, #0F1828, #0B1020);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 8px rgba(201,168,76,0.25);
}

/* Map Frame */
#map-frame {
  flex: 1;
  position: relative;
  margin: 8px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow:
    0 0 0 2px #5a3a10,
    0 0 0 5px #2a1a08,
    0 0 0 7px #8b5e1a;
  min-height: 0;
}
#map { width: 100%; height: 100%; }
.corner {
  position: absolute; width: 40px; height: 40px; z-index: 10; pointer-events: none;
}
.corner-tl { top: 2px; left: 2px; border-top: 3px solid #c8941a; border-left: 3px solid #c8941a; }
.corner-tr { top: 2px; right: 2px; border-top: 3px solid #c8941a; border-right: 3px solid #c8941a; }
.corner-bl { bottom: 2px; left: 2px; border-bottom: 3px solid #c8941a; border-left: 3px solid #c8941a; }
.corner-br { bottom: 2px; right: 2px; border-bottom: 3px solid #c8941a; border-right: 3px solid #c8941a; }
.map-vignette {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(20,10,2,0.6) 100%);
  pointer-events: none; z-index: 5;
}
#compass {
  position: absolute; bottom: 18px; right: 18px;
  width: 56px; height: 56px; z-index: 20;
  pointer-events: none; opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(200,148,26,0.6));
}

/* Oracle Decree at bottom of map */
.map-oracle-decree {
  background: linear-gradient(180deg, #0B1020 0%, #060912 100%);
  border-top: 2px solid #1C2F58;
  padding: 8px 14px;
  flex-shrink: 0;
  margin-bottom: 80px;
}
.decree-venue-name {
  font-family: 'Cinzel Decorative', serif; font-size: 0.85rem;
  color: var(--gold); letter-spacing: 2px;
}
.decree-text { font-size: 0.65rem; color: var(--text-stone); font-style: italic; margin: 3px 0; }
.decree-energy { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.de-label { font-size: 0.55rem; color: var(--text-stone); font-family: 'Cinzel', serif; letter-spacing: 1px; }
.de-bar { flex: 1; height: 5px; background: rgba(0,0,0,0.4); border-radius: 3px; overflow: hidden; }
.de-fill { height: 100%; background: linear-gradient(90deg, var(--gold), var(--flame-orange)); border-radius: 3px; transition: width 1s ease; }
.de-lightning { font-size: 0.6rem; color: var(--gold); }

/* ═══════════════════════════════════════════════
   SETTINGS SCREEN
═══════════════════════════════════════════════ */
#screen-settings { background: linear-gradient(180deg, rgba(7,9,28,0.78) 0%, rgba(5,8,21,0.82) 100%); }
.settings-page { padding: 0 0 80px; }

.settings-card {
  margin: 0 14px 10px;
  background: linear-gradient(135deg, #0C1826, #0A1220);
  border: 1px solid #141E36; border-radius: 3px;
  overflow: hidden;
}

.profile-settings-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; margin-top: 12px;
  border-color: var(--gold-deep);
}
.settings-profile-icon { font-size: 2.2rem; }
.settings-profile-name { font-family: 'Cinzel', serif; font-size: 0.85rem; color: var(--gold); }
.settings-profile-epithet { font-size: 0.65rem; color: var(--text-stone); margin-top: 3px; }

.settings-section-title {
  font-family: 'Cinzel', serif; font-size: 0.6rem;
  letter-spacing: 2px; color: var(--text-stone);
  padding: 10px 14px 4px; text-transform: uppercase;
}

.settings-service-row, .settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #0C1826;
}
.settings-service-row:last-child, .settings-row:last-child { border-bottom: none; }
.svc-icon { font-size: 1.2rem; }
.spotify-color { color: #1ED760; }
.apple-color { color: #FC3C44; }
.sc-color { color: #FF6600; }
.svc-name { font-family: 'Cinzel', serif; font-size: 0.75rem; color: var(--text-parchment); flex: 1; }

.settings-row-info { flex: 1; }
.settings-row-title { font-family: 'Cinzel', serif; font-size: 0.72rem; color: var(--text-parchment); }
.settings-row-sub { font-size: 0.58rem; color: var(--text-stone); margin-top: 2px; }

/* Greek Toggle */
.toggle-wrap { flex-shrink: 0; }
.greek-toggle {
  width: 46px; height: 24px; border-radius: 12px;
  background: linear-gradient(135deg, #0C1826, #07091C);
  border: 1px solid #1A2840;
  position: relative; cursor: pointer;
  transition: all 0.3s;
}
.greek-toggle.active {
  background: linear-gradient(135deg, #0E1E40, #0A1630);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(212,168,42,0.2);
}
.toggle-knob {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #1A2840, #141E36);
  border: 1px solid #1A2E50;
  transition: transform 0.3s, background 0.3s;
}
.greek-toggle.active .toggle-knob {
  transform: translateX(22px);
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  border-color: var(--gold);
}

/* Danger Buttons */
.settings-danger-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 13px 16px;
  background: transparent;
  border: none; border-bottom: 1px solid #0C1826;
  color: var(--text-stone); cursor: pointer;
  font-family: 'IM Fell English', serif; font-size: 0.75rem;
  transition: background 0.2s;
}
.settings-danger-btn:last-child { border-bottom: none; }
.settings-danger-btn:hover { background: rgba(255,255,255,0.03); }
.settings-danger-btn.danger-red { color: #CC4444; }
.settings-danger-btn.danger-red:hover { background: rgba(204,68,68,0.05); }
.danger-icon { font-size: 1.1rem; }

.settings-footer { text-align: center; padding: 20px; }
.settings-footer-text { font-family: 'Cinzel', serif; font-size: 0.6rem; letter-spacing: 2px; color: var(--text-stone); }
.settings-footer-sub { font-size: 0.55rem; color: var(--stone-surface); margin-top: 4px; font-style: italic; }

/* ═══════════════════════════════════════════════
   BOTTOM NAV
═══════════════════════════════════════════════ */
.stone-nav {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 72px; z-index: 100;
  display: none;
  align-items: stretch;
  background: linear-gradient(180deg, #07101E 0%, #120E04 100%);
  border-top: 2px solid #1A2840;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.7);
}
.stone-nav.visible { display: flex; }

.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  background: transparent; border: none;
  cursor: pointer; color: var(--text-stone);
  transition: all 0.2s;
  padding: 8px 4px;
  position: relative;
}
.nav-item::before {
  content: '';
  position: absolute; top: 0; left: 10%; right: 10%;
  height: 1px;
  background: transparent;
  transition: background 0.2s;
}
.nav-item.active { color: var(--gold); }
.nav-item.active::before { background: var(--gold); }
.nav-icon { font-size: 1.3rem; line-height: 1; }
.nav-label { font-family: 'Cinzel', serif; font-size: 0.45rem; letter-spacing: 1px; text-transform: uppercase; }

/* Center nav button */
.nav-center {
  position: relative;
}
.nav-center-icon {
  font-size: 1.6rem !important;
  filter: drop-shadow(0 0 8px rgba(201,168,76,0.4));
}
.nav-center.active .nav-center-icon { filter: drop-shadow(0 0 12px rgba(201,168,76,0.7)); }

/* ═══════════════════════════════════════════════
   PROPHECY SCROLL POPUP
═══════════════════════════════════════════════ */
.prophecy-scroll-popup {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s;
}
.prophecy-scroll-popup.visible { opacity: 1; pointer-events: all; }

.prophecy-scroll-inner {
  width: 90%; max-width: 360px;
  background: linear-gradient(180deg, #F0E0A0 0%, #E0C888 50%, #F0E0A0 100%);
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.8);
  overflow: hidden;
}
.scroll-top-curl, .scroll-bottom-curl {
  height: 20px;
  background: linear-gradient(135deg, #8B6914, #C9A84C, #8B6914);
  border-bottom: 2px solid #6A4A0A;
}
.scroll-bottom-curl { border-bottom: none; border-top: 2px solid #6A4A0A; }
.prophecy-scroll-content { padding: 20px 24px; text-align: center; }
.prophecy-seal { font-size: 2rem; margin-bottom: 8px; }
.prophecy-header {
  font-family: 'Cinzel', serif; font-size: 1rem;
  color: #3A1A04; margin-bottom: 12px;
}
.prophecy-body {
  font-size: 0.85rem; color: #4A2A0A;
  font-style: italic; line-height: 1.7;
  margin-bottom: 16px;
}
.small-btn { max-width: 200px; margin: 0 auto; }
.small-btn .btn-latin { color: #3A1A04 !important; font-size: 0.7rem !important; }
.small-btn { background: rgba(139,105,20,0.2) !important; border-color: #8B6914 !important; }

/* ─── SCROLLBAR STYLING ─────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--stone-dark); }
::-webkit-scrollbar-thumb { background: var(--stone-light); border-radius: 2px; }

/* ═══════════════════════════════════════════════
   8-BIT PIXEL SHADER MODE
═══════════════════════════════════════════════ */

/* CRT overlay elements */
#pixel-scanlines {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 3px,
    rgba(0, 0, 0, 0.22) 3px,
    rgba(0, 0, 0, 0.22) 4px
  );
}

#pixel-crt {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 9996;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 55%,
    rgba(0, 20, 5, 0.55) 100%
  );
}

/* ── Activate 8-bit mode ── */
body.eight-bit #app-root {
  filter: url('#eight-bit-filter') contrast(1.12);
}

body.eight-bit #pixel-scanlines,
body.eight-bit #pixel-crt { display: block; }

/* Kill smoothing everywhere */
body.eight-bit,
body.eight-bit * {
  font-family: 'Press Start 2P', monospace !important;
  border-radius: 0 !important;
  transition: none !important;
  -webkit-font-smoothing: none !important;
  font-smooth: never !important;
  letter-spacing: 0 !important;
}

/* Canvas gets pixelated rendering */
body.eight-bit canvas {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Step-frame animations (4 frames instead of smooth) */
body.eight-bit .flame-inner,
body.eight-bit .flame-outer,
body.eight-bit .flame-glow,
body.eight-bit .smoke-particle,
body.eight-bit .smoke-overlay {
  animation-timing-function: steps(4) !important;
}

body.eight-bit .tapHintBlink {
  animation-timing-function: steps(1) !important;
}

/* ── Font size scale-downs (Press Start 2P runs large) ── */
body.eight-bit .splash-title-main   { font-size: 1.6rem !important; line-height: 1.2 !important; }
body.eight-bit .splash-title-top    { font-size: 0.6rem !important; }
body.eight-bit .splash-subtitle     { font-size: 0.42rem !important; }
body.eight-bit .splash-tap-hint     { font-size: 0.45rem !important; }

body.eight-bit .auth-title          { font-size: 0.75rem !important; }
body.eight-bit .auth-subtitle       { font-size: 0.42rem !important; line-height: 1.8 !important; }
body.eight-bit .auth-btn-main       { font-size: 0.5rem !important; }
body.eight-bit .auth-btn-latin      { font-size: 0.35rem !important; }

body.eight-bit .btn-latin           { font-size: 0.48rem !important; }
body.eight-bit .btn-greek           { font-size: 0.32rem !important; }

body.eight-bit .chamber-title       { font-size: 0.55rem !important; }
body.eight-bit .phase-text          { font-size: 0.48rem !important; line-height: 1.8 !important; }
body.eight-bit .progress-rune       { font-size: 1rem !important; }

body.eight-bit .profile-header-title { font-size: 0.55rem !important; }
body.eight-bit .profile-header-sub  { font-size: 0.38rem !important; }
body.eight-bit .stat-value          { font-size: 1.1rem !important; }
body.eight-bit .stat-label          { font-size: 0.32rem !important; }
body.eight-bit .accuracy-label      { font-size: 0.38rem !important; }
body.eight-bit .accuracy-value      { font-size: 0.55rem !important; }
body.eight-bit .accuracy-desc       { font-size: 0.35rem !important; }
body.eight-bit .card-title          { font-size: 0.48rem !important; }
body.eight-bit .dna-text            { font-size: 0.4rem !important; line-height: 1.8 !important; }
body.eight-bit .arch-god-name       { font-size: 1rem !important; }
body.eight-bit .arch-god-epithet    { font-size: 0.45rem !important; }
body.eight-bit .arch-identity-desc  { font-size: 0.4rem !important; line-height: 1.8 !important; }
body.eight-bit .artist-name         { font-size: 0.42rem !important; }
body.eight-bit .genre-name          { font-size: 0.38rem !important; }
body.eight-bit .genre-pct           { font-size: 0.38rem !important; }
body.eight-bit .match-name          { font-size: 0.42rem !important; }
body.eight-bit .match-desc          { font-size: 0.35rem !important; }
body.eight-bit .match-pct           { font-size: 0.45rem !important; }

body.eight-bit .page-header-title   { font-size: 0.65rem !important; }
body.eight-bit .page-header-sub     { font-size: 0.35rem !important; }
body.eight-bit .quest-name          { font-size: 0.5rem !important; }
body.eight-bit .quest-desc          { font-size: 0.36rem !important; line-height: 1.7 !important; }
body.eight-bit .qpm-label           { font-size: 0.35rem !important; }
body.eight-bit .qp-value            { font-size: 0.42rem !important; }

body.eight-bit .header-title        { font-size: 0.65rem !important; }
body.eight-bit .header-sub          { font-size: 0.35rem !important; }
body.eight-bit .roster-name         { font-size: 0.38rem !important; }
body.eight-bit .msg-sender          { font-size: 0.38rem !important; }
body.eight-bit .msg-text            { font-size: 0.48rem !important; line-height: 1.8 !important; }
body.eight-bit .msg-timestamp       { font-size: 0.35rem !important; }
body.eight-bit .inscription-input   { font-size: 0.5rem !important; }
body.eight-bit .stone-send-btn      { font-size: 0.42rem !important; }

body.eight-bit .map-toggle-title    { font-size: 0.4rem !important; }
body.eight-bit .mt-label            { font-size: 0.38rem !important; }
body.eight-bit .decree-venue-name   { font-size: 0.65rem !important; }
body.eight-bit .decree-text         { font-size: 0.4rem !important; }

body.eight-bit .settings-profile-name  { font-size: 0.55rem !important; }
body.eight-bit .settings-profile-epithet { font-size: 0.38rem !important; }
body.eight-bit .settings-section-title { font-size: 0.42rem !important; }
body.eight-bit .settings-row-title  { font-size: 0.48rem !important; }
body.eight-bit .settings-row-sub    { font-size: 0.34rem !important; line-height: 1.7 !important; }
body.eight-bit .svc-name            { font-size: 0.48rem !important; }
body.eight-bit .settings-danger-btn { font-size: 0.45rem !important; }
body.eight-bit .settings-footer-text { font-size: 0.38rem !important; }
body.eight-bit .nav-label           { font-size: 0.32rem !important; }

/* ── Pixel-art box-shadow borders ── */
body.eight-bit .stone-tablet {
  box-shadow:
    4px 0 0 0 #C9A84C,
    -4px 0 0 0 #6B4A10,
    0 4px 0 0 #C9A84C,
    0 -4px 0 0 #F0D080,
    inset 2px 2px 0 0 rgba(255,255,255,0.08),
    inset -2px -2px 0 0 rgba(0,0,0,0.4) !important;
}

body.eight-bit .profile-card,
body.eight-bit .quest-card {
  box-shadow:
    2px 0 0 0 #C9A84C,
    -2px 0 0 0 #6B4A10,
    0 2px 0 0 #C9A84C,
    0 -2px 0 0 #F0D080 !important;
  border: 2px solid #C9A84C !important;
}

body.eight-bit .settings-card {
  border: 2px solid #C9A84C !important;
  box-shadow: 3px 3px 0 0 #6B4A10 !important;
}

body.eight-bit .stone-nav {
  border-top: 4px solid #C9A84C !important;
  box-shadow: 0 -4px 0 0 #F0D080 !important;
}

body.eight-bit .nav-item.active::before {
  height: 4px !important;
}

body.eight-bit .map-toggle {
  border: 2px solid #6B4A10 !important;
}
body.eight-bit .map-toggle.active {
  border: 2px solid #C9A84C !important;
  box-shadow: 2px 2px 0 0 #6B4A10 !important;
}

/* Pixel-art toggle knob */
body.eight-bit .toggle-knob {
  border-radius: 0 !important;
  width: 16px !important;
  height: 16px !important;
}
body.eight-bit .greek-toggle {
  border-radius: 0 !important;
}

/* Blink cursor on tap hint in 8-bit mode */
body.eight-bit .splash-tap-hint::after {
  content: '_';
  animation: pixelBlink 0.8s steps(1) infinite;
}
@keyframes pixelBlink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Service cards in 8-bit */
body.eight-bit .service-card {
  border: 2px solid #C9A84C !important;
  border-radius: 0 !important;
}

/* Auth buttons in 8-bit */
body.eight-bit .auth-btn {
  border-radius: 0 !important;
  border: 2px solid #C9A84C !important;
  box-shadow: 3px 3px 0 0 #0B1020 !important;
}
body.eight-bit .auth-btn:active {
  box-shadow: 1px 1px 0 0 #0B1020 !important;
  transform: translate(2px, 2px) !important;
}

/* Stone button pixel style */
body.eight-bit .stone-button {
  border-radius: 0 !important;
  box-shadow: 3px 3px 0 0 #0B1020, -1px -1px 0 0 rgba(255,255,255,0.1) !important;
}
body.eight-bit .stone-button:active {
  box-shadow: 1px 1px 0 0 #0B1020 !important;
  transform: translate(2px, 2px) !important;
}

/* Radar SVG labels in 8-bit */
body.eight-bit .radar-svg text {
  font-family: 'Press Start 2P', monospace !important;
  font-size: 5px !important;
}

/* Progress bars — sharp pixel style */
body.eight-bit .qp-bar,
body.eight-bit .qpm-bar,
body.eight-bit .genre-bar-track,
body.eight-bit .calc-bar-track,
body.eight-bit .de-bar {
  border-radius: 0 !important;
  border: 1px solid #C9A84C !important;
}
body.eight-bit .qp-fill,
body.eight-bit .qpm-fill,
body.eight-bit .genre-bar-fill,
body.eight-bit .calc-bar-fill,
body.eight-bit .de-fill {
  border-radius: 0 !important;
}

/* Scrollbar in 8-bit */
body.eight-bit ::-webkit-scrollbar { width: 6px; }
body.eight-bit ::-webkit-scrollbar-thumb { border-radius: 0; background: #C9A84C; }
