/* page-shell.css — apex chassis shared across non-game pages.
   Used by support, privacy, terms, and responsible-play. The lobby
   has its own one-off chrome (lobby-*) and does NOT use this file.

   game.css is also loaded for the CSS custom properties (--night,
   --gold, --gold-lt, --gold-glow, --cream, --cyan-pale, --cyan-soft,
   --txt, --txt-dim) and pins html/body to a fixed viewport — this
   file overrides that pinning so these pages scroll naturally.
   game.css itself is not modified. */

/* ─── Body / scroll override ─────────────────────────────────── */
html, body {
  height: auto !important;
  width:  auto !important;
  overflow: visible !important;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 30% at 50% 0%, rgba(95, 183, 255, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 100% 60% at 50% 100%, rgba(20, 42, 100, 0.65) 0%, transparent 70%),
    var(--night);
  background-attachment: fixed;
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  min-height: 100dvh;
  overflow-x: clip !important;
  -webkit-overflow-scrolling: touch;
}

#page-app { display: flex; flex-direction: column; min-height: 100dvh; }

/* ─── Top bar ────────────────────────────────────────────────── */
.page-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  background:
    radial-gradient(ellipse 100% 100% at 50% 0%, rgba(95, 183, 255, 0.20) 0%, transparent 70%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.92) 0%, rgba(10, 24, 56, 0.92) 100%);
  border-bottom: 1px solid rgba(240, 194, 82, 0.40);
  box-shadow:
    inset 0 -1px 0 rgba(255, 227, 154, 0.10),
    0 4px 14px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.page-home-link {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; outline: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.page-home-link:active { transform: translateY(1px); }
.page-logo-img {
  width: 40px; height: 40px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(255, 227, 154, 0.35));
}
.page-logo {
  font-size: 16px; font-weight: 800; letter-spacing: 0.01em; line-height: 1;
  background: linear-gradient(180deg, var(--cream) 0%, var(--gold-lt) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 6px rgba(240, 194, 82, 0.40));
}
.page-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(240, 194, 82, 0.55);
  background: linear-gradient(180deg, rgba(20, 42, 100, 0.55) 0%, rgba(10, 24, 56, 0.85) 100%);
  color: var(--gold-lt);
  text-decoration: none;
  outline: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s, border-color 0.15s;
}
.page-close svg { width: 20px; height: 20px; display: block; }
.page-close:hover { color: var(--cream); border-color: var(--gold-lt); }
.page-close:active { transform: translateY(1px); }

/* ─── Main column ────────────────────────────────────────────── */
.page-main {
  flex: 1 1 auto;
  padding: 22px 16px 28px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}

/* ─── Inner reading panel for legal-copy pages ───────────────── */
.page-card {
  padding: 18px 14px 80px;
  max-width: 480px;
  margin: 14px auto;
  flex: 1; overflow-y: auto;
  background:
    radial-gradient(ellipse 100% 30% at 50% 0%, rgba(95, 183, 255, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, rgba(20, 42, 100, 0.45) 0%, rgba(5, 13, 36, 0.85) 100%);
  border: 1px solid rgba(240, 194, 82, 0.55);
  border-radius: 18px;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 216, 0.18),
    inset 0 0 0 1px rgba(255, 227, 154, 0.10),
    0 0 18px -4px rgba(95, 183, 255, 0.25),
    0 8px 22px rgba(0, 0, 0, 0.55);
}
.page-card h1 {
  font-size: 24px; margin-bottom: 14px; letter-spacing: 0.06em;
  background: linear-gradient(180deg, var(--cream) 0%, var(--gold-lt) 60%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 8px rgba(240, 194, 82, 0.35));
}
.page-card h2 {
  font-size: 16px; color: var(--cyan-pale);
  margin-top: 22px; margin-bottom: 6px;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(95, 183, 255, 0.25);
}
.page-card p, .page-card li { font-size: 14px; line-height: 1.6; color: rgba(234, 242, 255, 0.85); }
.page-card b { color: var(--gold-glow); }
.page-card a { color: var(--gold-lt); text-decoration: underline; text-decoration-color: rgba(240, 194, 82, 0.45); text-underline-offset: 2px; }
.page-card a:hover { color: var(--cream); text-decoration-color: var(--gold-lt); }
.page-card ul { padding-left: 20px; margin-bottom: 8px; }

/* When a heading is itself a link (e.g. the external guide blurb on
   the Fairness page), the page-card-wide `.page-card a` rule above
   would otherwise paint the heading text gold — distinct from its
   sibling cyan headings. Scope an override to <a> inside .page-card h2
   so the linked heading reads as the SAME cyan as the headings around
   it, in all four link states (so :visited can't drift). Color +
   underline only; font-size / weight / spacing / text-shadow stay on
   the parent .page-card h2 rule above. Higher specificity than
   .page-card a (0,1,2 vs 0,1,1) so this wins the cascade. */
.page-card h2 a,
.page-card h2 a:link,
.page-card h2 a:visited,
.page-card h2 a:hover,
.page-card h2 a:active {
  color: var(--cyan-pale);
  text-decoration: underline;
}

/* Highlight callout used for safety / responsible-play warnings. */
.callout {
  margin: 18px 0; padding: 14px 16px; border-radius: 12px;
  background:
    radial-gradient(ellipse 100% 80% at 0% 0%, rgba(255, 227, 154, 0.18) 0%, transparent 70%),
    linear-gradient(180deg, rgba(31, 78, 168, 0.25) 0%, rgba(12, 26, 60, 0.55) 100%);
  border: 1px solid rgba(255, 227, 154, 0.55);
  color: var(--cream);
  font-size: 13.5px; font-weight: 700;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45), 0 0 6px rgba(255, 227, 154, 0.20);
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 216, 0.18),
    0 0 14px -2px rgba(255, 227, 154, 0.20);
}

/* ─── Footer ─────────────────────────────────────────────────── */
.page-footer {
  margin-top: auto;
  padding: 18px 14px calc(20px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(240, 194, 82, 0.20);
  text-align: center;
  font-size: 11.5px;
  color: var(--txt-dim);
}
.page-footer-links {
  display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center;
  margin-bottom: 8px;
}
.page-footer-links a {
  color: var(--gold-lt); text-decoration: none; opacity: 0.85; letter-spacing: 0.04em;
}
.page-footer-links a:hover { opacity: 1; color: var(--cream); text-shadow: 0 0 8px rgba(255, 227, 154, 0.45); }
.page-footer-links .dot { color: var(--cyan-soft); opacity: 0.45; }
