/* Ember Lounge — design tokens & reset
   Warm hearth palette: charred browns, lantern flame, parchment ink. */

:root {
  /* — surfaces: stacked warmth, never neutral grey — */
  --em-bg: #17100d;
  --em-bg-deep: #0d0807;
  --em-surface: #241a15;
  --em-surface-low: #1d1410;
  --em-surface-high: #32251d;
  --em-surface-top: #402f24;

  /* — ink — */
  --em-ink: #f7e9d9;
  --em-ink-dim: #cdb2a0;
  /* Faint ink is only used for small caps labels, so it must clear 4.5:1 on
     the darkest surface rather than read as a barely-there tint. */
  --em-ink-faint: #b39a87;

  /* — flame — */
  --em-ember: #ff9142;
  --em-ember-soft: #ffb37a;
  --em-ember-deep: #d9641f;
  --em-gold: #ffd9a4;
  --em-on-ember: #2b1204;

  /* — lines — */
  --em-line: rgba(255, 226, 199, 0.1);
  --em-line-strong: rgba(255, 226, 199, 0.22);
  --em-outline: #5b4438;

  /* — geometry — */
  --em-r-xs: 6px;
  --em-r-sm: 10px;
  --em-r-md: 14px;
  --em-r-lg: 20px;
  --em-r-pill: 999px;

  --em-pad: 16px;
  --em-gap: 12px;
  --em-space-xs: 6px;
  --em-space-sm: 10px;
  --em-space-md: 16px;
  --em-space-lg: 30px;

  /* Warm light, not neon haze. */
  --em-glow: 0 12px 34px rgba(150, 62, 12, 0.38);
  --em-glow-soft: 0 0 18px rgba(255, 145, 66, 0.28);

  --em-font-display: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  --em-font-body: 'Karla', 'Segoe UI', system-ui, sans-serif;

  /*
   * Content width grows with the viewport. Mobile stays a single narrow column;
   * the desktop breakpoints in layout.css widen this and reflow the grids.
   */
  --em-shell: min(100% - 32px, 480px);
  --em-gutter-x: 16px;

  /* Height of the top bar, needed to size the first screen exactly. */
  --em-bar-h: 53px;

  /* Where the first ad slot's top edge lands, as a share of viewport height. */
  --em-fold-share: 42vh;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--em-font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--em-ink);
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 145, 66, 0.11) 0%, transparent 60%),
    var(--em-bg);
  background-attachment: fixed;
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

img, svg, video { display: block; max-width: 100%; height: auto; }

/* Component classes set their own display (inline-flex, grid, …), which would
   otherwise override the [hidden] attribute's UA default. Keep `hidden`
   authoritative for every element the scripts toggle. */
[hidden] { display: none !important; }

iframe {
  display: block;
  max-width: 100%;
  border: 0;
  vertical-align: bottom;
}

a { color: var(--em-ember-soft); text-decoration: none; }

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

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

#em-main,
.em-home,
.em-detail,
.em-page,
.em-wings,
.em-wingview,
.em-play {
  max-width: 100%;
  overflow-x: clip;
}

.em-shell {
  width: var(--em-shell);
  max-width: 100%;
  margin-inline: auto;
}

.em-caps {
  font-family: var(--em-font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.em-note {
  font-size: 12px;
  color: var(--em-ink-dim);
  margin: 0 0 12px;
}

.em-oops {
  color: #ffb9a3;
  padding: 24px;
}

.em-locked {
  overflow: hidden;
  overscroll-behavior: none;
}

.em-skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 9999;
  padding: 9px 16px;
  background: var(--em-ember);
  color: var(--em-on-ember);
  border-radius: var(--em-r-sm);
  font-weight: 700;
}
.em-skip:focus { left: 8px; }

.em-wait {
  text-align: center;
  padding: 46px 16px;
  color: var(--em-ink-dim);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
