/* r211.css (#1014) — Dream Loop + Desktop Slice 0..5 Alignment + Visual Harmony Polish.
   Loaded after r210.css. Honors ALL owner locks (copy, R08, R09, R31, R32, spheres.html links). */

/* ============================================================================
   1. DESKTOP HERO — SEAMLESS TARGET.PNG MATCH (NO RECTANGULAR STATS BOX OVER FACES)
   ============================================================================ */
@media (min-width: 700px) {
  html:root body section#hero.hero {
    min-height: min(900px, 100vh) !important;
    height: 100vh !important;
    max-height: 1080px !important;
  }
  html:root body header#bar.bar nav.bar-nav {
    display: flex !important;
    flex-direction: row !important;
    width: auto !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  html:root body header#bar.bar nav.bar-nav a {
    border-bottom: 2px solid transparent !important;
  }
  html:root body header#bar.bar nav.bar-nav a.on,
  html:root body header#bar.bar nav.bar-nav a:hover {
    border-bottom-color: #e8c77a !important;
  }
  html:root body header#bar.bar a.bar-brand .logo-live,
  html:root body header#bar.bar a.bar-brand > img {
    width: 50px !important;
    height: 50px !important;
    flex: 0 0 50px !important;
    filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.94)) brightness(1.18) contrast(1.10) !important;
  }
  html:root body header#bar.bar a.bar-brand span {
    color: #f7ecd2 !important;
  }
  html:root body:not(.scrolled) header#bar.bar:not(.solid) {
    background: linear-gradient(180deg, rgba(8, 6, 4, 0.82) 0%, rgba(8, 6, 4, 0.36) 58%, rgba(8, 6, 4, 0) 100%) !important;
  }

  /* Deep left + bottom-corner vignette + soft bottom floor fade so ul.hero-facts needs ZERO hard box! */
  html:root body #hero .hero-shade {
    background:
      radial-gradient(ellipse 46% 36% at 14% 96%, rgba(8, 6, 4, 0.86) 0%, rgba(8, 6, 4, 0.56) 54%, rgba(8, 6, 4, 0) 100%),
      linear-gradient(90deg, rgba(8, 6, 4, 0.72) 0%, rgba(8, 6, 4, 0.38) 32%, rgba(8, 6, 4, 0.04) 48%, rgba(8, 6, 4, 0) 58%),
      linear-gradient(180deg, rgba(8, 6, 4, 0.78) 0%, rgba(8, 6, 4, 0.20) 16%, rgba(8, 6, 4, 0) 44%, rgba(10, 8, 5, 0.56) 76%, rgba(16, 12, 9, 0.86) 92%, #120e0a 100%) !important;
  }
  html:root body #hero h1#hero-title span:first-child {
    color: #fbf0d8 !important;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.96), 0 0 28px rgba(0, 0, 0, 0.6) !important;
  }
  html:root body #hero h1#hero-title span:last-child {
    color: #eed18f !important;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.96), 0 0 28px rgba(0, 0, 0, 0.6) !important;
  }
  html:root body #hero .hero-cta .btn-play,
  html:root body header#bar.bar .bar-end a.btn.btn-play {
    font-weight: 700 !important;
    letter-spacing: 0.11em !important;
  }
  html:root body #hero .cta-notes .promo {
    border-radius: 999px !important;
    background: rgba(12, 9, 6, 0.58) !important;
    border: 1px solid rgba(232, 199, 122, 0.20) !important;
    padding: 7px 18px !important;
  }

  /* Pure seamless stats row — NO background box, NO backdrop-filter rectangle cutting crowd faces! */
  html:root body #hero ul.hero-facts {
    background: transparent !important;
    background-image: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    margin: 14px 0 0 !important;
    margin-left: 0 !important;
    padding: 8px 0 4px !important;
    box-shadow: none !important;
  }
  html:root body #hero ul.hero-facts li {
    padding: 0 26px !important;
    border-right: 1px solid rgba(232, 199, 122, 0.34) !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.98), 0 0 18px rgba(0, 0, 0, 0.9) !important;
  }
  html:root body #hero ul.hero-facts li:first-child {
    padding-left: 0 !important;
  }
  html:root body #hero ul.hero-facts li:last-child {
    border-right: 0 !important;
    padding-right: 0 !important;
  }
}

@media (min-width: 700px) and (max-width: 1040px) {
  html:root body header#bar.bar {
    padding: 0 16px !important;
    gap: 10px !important;
  }
  html:root body header#bar.bar a.bar-brand .logo-live,
  html:root body header#bar.bar a.bar-brand > img {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px !important;
  }
  html:root body header#bar.bar a.bar-brand span,
  html:root body header#bar.bar a.bar-brand span:not(.logo-live) {
    font-size: 13px !important;
    letter-spacing: 0.10em !important;
  }
  html:root body header#bar.bar nav.bar-nav {
    gap: 11px !important;
  }
  html:root body header#bar.bar nav.bar-nav a,
  html:root body header#bar.bar .bar-end a.bar-sign {
    font-size: 12.5px !important;
    letter-spacing: 0.08em !important;
    padding: 0 3px !important;
  }
  html:root body header#bar.bar .bar-end {
    gap: 10px !important;
  }
  html:root body header#bar.bar .bar-end a.btn.btn-play {
    min-width: 76px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 14px !important;
    font-size: 12.5px !important;
  }
}

/* ============================================================================
   2. PHONE HERO — TARGET-PHONE.PNG MATCH (CLEAN TOP BAR + STRONGER SCRIMS)
   ============================================================================ */
@media (max-width: 699px) {
  /* At scroll 0, keep top bar clean (centered crest + menu button only, matching target-phone.png) */
  html:root body:not(.scrolled) header#bar.bar .bar-end a.bar-sign {
    display: none !important;
  }
  html:root body #hero .hero-logo {
    margin: 22px auto 0 !important;
  }
  html:root body #hero .hero-logo::before {
    width: 360px !important;
    height: 245px !important;
    background: radial-gradient(ellipse 58% 54% at 50% 48%, rgba(8, 6, 4, 0.86) 0%, rgba(8, 6, 4, 0.48) 54%, rgba(8, 6, 4, 0) 100%) !important;
  }
  html:root body #hero .hero-logo .emblem {
    width: 112px !important;
    height: 112px !important;
    flex: 0 0 112px !important;
    margin: 0 auto 6px !important;
  }
  html:root body #hero .hero-logo .emblem img,
  html:root body #hero .hero-logo .emblem canvas {
    width: 112px !important;
    height: 112px !important;
    max-width: 112px !important;
    max-height: 112px !important;
  }
  html:root body #hero .hero-logo .wordmark {
    letter-spacing: 0.16em !important;
  }
  html:root body #hero .hero-shade {
    background:
      linear-gradient(180deg, rgba(8, 6, 4, 0.84) 0%, rgba(8, 6, 4, 0.44) 22%, rgba(8, 6, 4, 0.04) 42%, rgba(8, 6, 4, 0.34) 56%, rgba(10, 8, 5, 0.84) 76%, #120e0a 100%) !important;
  }
  /* Borderless clean starter-gear text directly over smooth gradient per target-phone.png */
  html:root body #hero .cta-notes .promo {
    background: transparent !important;
    border: 0 !important;
    padding: 2px 8px !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.98) !important;
  }
  html:root body #hero .hero-dots {
    min-height: 36px !important;
    padding: 6px 12px !important;
    display: inline-flex !important;
    align-items: center !important;
  }
}

/* ============================================================================
   3. DESKTOP VIEWPORT RHYTHM (SLICE 1..4 CLEAN FRAMING AT 1440x900!)
   ============================================================================ */
@media (min-width: 700px) {
  /* Slice 1 (y=900..1800): #world + both dividers keep #journey.head cleanly clear below 1860 sticky bar */
  html:root body section#world.band .sunder {
    min-height: 756px !important;
    height: 756px !important;
  }
  html:root body .chapter-divider,
  html:root body .chapter-divider.chapter-divider-sub {
    min-height: 44px !important;
    padding: 8px 24px !important;
  }

  /* Slice 2 (y=1800..2700): Exact 16:9 un-cropped cards + entire INTO THE BREACH fits cleanly inside 1865..2680! */
  html:root body section#journey.band {
    padding: 66px 0 16px !important;
  }
  html:root body #journey .wrap {
    max-width: 1016px !important;
  }
  html:root body #journey .head {
    margin-bottom: 10px !important;
  }
  html:root body #journey .head h2 {
    font-size: clamp(26px, 2.2vw, 32px) !important;
    margin-bottom: 4px !important;
  }
  html:root body #journey .head > p.lead {
    font-size: 15px !important;
  }
  html:root body #game-band {
    margin-bottom: 12px !important;
  }
  html:root body #game-band,
  html:root body #journey-grid {
    gap: 14px !important;
  }
  html:root body #game-band figure.frame .clip,
  html:root body #journey-grid figure.frame .clip {
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  html:root body #game-band figure.frame figcaption,
  html:root body #journey-grid figure.frame figcaption {
    padding: 10px 16px 12px !important;
    gap: 3px !important;
  }
  html:root body #game-band figure.frame figcaption h3,
  html:root body #journey-grid figure.frame figcaption h3 {
    font-size: 18px !important;
  }
  html:root body #game-band figure.frame figcaption p,
  html:root body #journey-grid figure.frame figcaption p {
    font-size: 14.5px !important;
    line-height: 1.36 !important;
  }

  /* Slice 3 (y=2700..3600): Generous 432px Realms panorama & balanced right card spanning cleanly so #callings.head lands at y~3678 (>18px below 3660 sticky bar!) */
  html:root body section#realms.band {
    padding: 64px 0 72px !important;
  }
  html:root body #realms .head {
    margin-bottom: 18px !important;
  }
  html:root body #realms .realm-media {
    min-height: 432px !important;
    max-height: 444px !important;
  }
  html:root body #realms #realm-card {
    justify-content: center !important;
    padding: 28px 30px !important;
  }
  html:root body #realms #realm-card p.law {
    background: rgba(232, 199, 122, 0.07) !important;
    padding: 12px 16px !important;
    margin: 0 0 18px !important;
  }
  html:root body #realms #realm-card ul {
    gap: 16px !important;
  }
  html:root body #realms #realm-tabs > button.tab::before {
    filter: brightness(1.38) contrast(1.12) !important;
  }
  html:root body #realms .realm-counter {
    display: none !important;
  }

  /* Slice 4 (y=3600..4500): FOUR CALLINGS eyebrow + whole configurator sits squarely inside 3675..4420! */
  html:root body section#callings.band {
    padding: 28px 0 22px !important;
  }
}

/* ============================================================================
   4. CALLINGS HIERARCHY, CONTRAST & FOOTER POLISH (DESKTOP + PHONE)
   ============================================================================ */
/* Subordinate active highlight on secondary HUMAN / MALE choices so FIGHTER + WARRIOR lead the eye */
html:root body #callings #calling-panel button.cp-chip[aria-checked="true"] {
  background: linear-gradient(180deg, rgba(118, 86, 34, 0.34), rgba(52, 38, 16, 0.72)) !important;
  border: 1.5px solid rgba(232, 199, 122, 0.80) !important;
  color: #fff6df !important;
  box-shadow: none !important;
}
/* Standardize lock icon tint on DWARF / HALFLING to match muted pewter-gold MEMBERS badge */
html:root body #callings #calling-panel button.cp-chip svg {
  color: #cbb68a !important;
  opacity: 0.88 !important;
}

@media (max-width: 699px) {
  /* Darken active THALENYR tab background gradient so white text comfortably exceeds 7:1 contrast */
  html:root body #realms #realm-tabs > button.tab[aria-selected="true"] {
    background-image: linear-gradient(180deg, rgba(44, 34, 18, 0.96), rgba(22, 17, 11, 0.99)) !important;
  }
  /* Even horizontal margin on STALKER card around 🔒 Members */
  html:root body #callings #calling-row > button.calling {
    padding: 8px 10px !important;
    gap: 8px !important;
  }
  html:root body #callings #calling-row > button.calling small.medal-cap {
    padding: 2px 9px !important;
  }
  /* Compact phone footer & #play spacing so closing PLAY sits >20px CLEAR below sticky header at max scroll! */
  html:root body section#play.final {
    padding: 36px 16px 26px !important;
    min-height: 310px !important;
  }
  html:root body #play .final-actions {
    gap: 10px !important;
  }
  html:root body #play .final-member-note,
  html:root body #play .final-req {
    margin-top: 6px !important;
  }
  html:root body footer#account.foot {
    padding: 18px 16px 16px !important;
  }
  html:root body footer#account.foot .foot-links {
    margin: 10px 0 !important;
    row-gap: 6px !important;
  }
  html:root body footer#account.foot .foot-legal {
    margin-top: 8px !important;
  }
}

/* Cohesive primary gold footer PLAY button + clearer WebGPU notice + opaque footer ground */
html:root body footer#account.foot {
  background: #120e0a !important;
  position: relative !important;
  z-index: 5 !important;
}
html:root body footer#account.foot .foot-links a.foot-play-link {
  background: linear-gradient(180deg, rgba(214, 170, 84, 0.24), rgba(138, 98, 34, 0.34)) !important;
  border: 1.5px solid rgba(232, 199, 122, 0.74) !important;
  color: #ffe7a6 !important;
}
html:root body #play .final-req {
  color: #ded0b4 !important;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.96) !important;
}
