/* r210.css (#1014) — Dream Loop Match + Typographic Hierarchy + Upgraded Gameplay Polish.
   Loaded after bundle-r100.css and r206..r209.css.
   Strict adherence: all owner controls kept (single logo per viewport, HERO.eyebrow clean,
   R08 stacked phone realms + R09 per-realm colors, R31 full-width top phone character stage
   + R32 interactive skills, spheres.html links on all membership mentions). */

:root {
  --ui-sans: "Inter", "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  --body-serif: "Soul Alegreya", "Alegreya", Georgia, serif;
}

/* ============================================================================
   1. AAA 3-ROLE TYPOGRAPHY PAIRING (CINZEL DISPLAY · SANS CHROME · ALEGREYA LORE)
   ============================================================================ */
html:root body header#bar.bar .bar-nav a,
html:root body header#bar.bar .bar-sign,
html:root body a.btn.btn-ghost,
html:root body #play a.final-signin,
html:root body .eyebrow,
html:root body #hero .cta-notes .promo,
html:root body #hero ul.hero-facts li,
html:root body #callings #calling-row > button.calling small.medal-cap,
html:root body #callings #calling-panel dt,
html:root body #callings #calling-panel button.cp-chip,
html:root body #callings #calling-panel .cp-tlabel,
html:root body #callings #calling-panel .adv-tag,
html:root body #callings #calling-panel .adv-state,
html:root body #callings #calling-panel .adv-label,
html:root body #callings #calling-panel .adv-btn span,
html:root body #callings #calling-panel .lock-line,
html:root body #callings #calling-panel .cp-pl,
html:root body #callings #calling-panel .cp-pn,
html:root body #callings #calling-panel .cp-pname,
html:root body #callings #calling-panel .cp-pstate,
html:root body #callings #lock-note.lock-note,
html:root body #realms #realm-card .element,
html:root body #realms #realm-card p.law b,
html:root body #realms .realm-counter,
html:root body footer#account.foot .foot-links a:not(.foot-play-link),
html:root body footer#account.foot .foot-legal,
html:root body footer#account.foot .foot-meta {
  font-family: var(--ui-sans) !important;
}

html:root body header#bar.bar .bar-nav a {
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.11em !important;
}
html:root body header#bar.bar .bar-sign {
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.10em !important;
  min-height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
}

html:root body .eyebrow {
  font-weight: 600 !important;
  letter-spacing: 0.20em !important;
}

html:root body #hero ul.hero-facts li b {
  font-family: "Soul Cinzel", "Cinzel", Georgia, serif !important;
}

/* Remove duplicate floating calling badge on desktop portraits (#1014 item 13) */
html:root body #callings #calling-panel .adv-media > img.badge {
  display: none !important;
}

/* Distinct locked "MEMBERS" pill with crisp padlock glyph so never confused with open PLAYABLE gold pills */
html:root body #callings #calling-row > button.calling small.medal-cap {
  font-size: 13px !important;
  min-height: 24px !important;
}
html:root body #callings #calling-row > button.calling small.medal-cap.lock-cap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: rgba(30, 24, 18, 0.94) !important;
  color: #dfd0b2 !important;
  border: 1px solid rgba(218, 180, 108, 0.36) !important;
}
html:root body #callings #calling-row > button.calling small.medal-cap.lock-cap .cap-lock-ico {
  display: inline-flex !important;
  width: 10px !important;
  height: 10px !important;
  color: #e8c77a !important;
  flex: 0 0 10px !important;
}

/* ============================================================================
   2. DESKTOP HERO & TOP BAR — DREAM LOOP TARGET.PNG MATCH
   ============================================================================ */
@media (min-width: 700px) {
  html:root body:not(.scrolled) header#bar.bar:not(.solid) {
    background: linear-gradient(180deg, rgba(8, 6, 4, 0.72) 0%, rgba(8, 6, 4, 0.34) 56%, rgba(8, 6, 4, 0) 100%) !important;
  }
  html:root body header#bar.bar a.bar-brand .logo-live,
  html:root body header#bar.bar a.bar-brand > img {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.9)) brightness(1.12) contrast(1.08) !important;
  }

  /* Match target.png luminous right rift & bright foreground robes */
  html:root body #hero .hero-art {
    filter: brightness(1.24) contrast(1.08) saturate(1.12) !important;
  }
  html:root body #hero .hero-shade {
    background:
      linear-gradient(90deg, rgba(10, 8, 5, 0.64) 0%, rgba(10, 8, 5, 0.32) 30%, rgba(10, 8, 5, 0.03) 46%, rgba(10, 8, 5, 0) 56%),
      linear-gradient(180deg, rgba(8, 6, 4, 0.34) 0%, rgba(8, 6, 4, 0) 16%, rgba(8, 6, 4, 0) 84%, rgba(18, 14, 10, 0.66) 95%, #120e0a 100%) !important;
  }

  /* Lift lower hero stack ~20px above scroll-cue cleanly */
  html:root body #hero .hero-copy {
    padding: 52px clamp(24px, 4vw, 60px) 62px !important;
  }
  html:root body #hero #hero-eyebrow.eyebrow {
    font-size: 14px !important;
    letter-spacing: 0.22em !important;
    margin: 0 0 10px !important;
  }
  html:root body #hero h1#hero-title {
    margin: 0 0 22px !important;
  }
  html:root body #hero .hero-cta {
    gap: 14px 18px !important;
    margin: 0 0 22px !important;
  }
  html:root body #hero .hero-cta .btn-ghost {
    border-radius: 8px !important;
    background: rgba(12, 9, 6, 0.50) !important;
    border: 1px solid rgba(232, 199, 122, 0.48) !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    letter-spacing: 0.13em !important;
  }
  html:root body #hero .cta-notes .promo {
    border-radius: 6px !important;
    background: linear-gradient(90deg, rgba(10, 8, 5, 0.72) 0%, rgba(10, 8, 5, 0.46) 82%, rgba(10, 8, 5, 0) 100%) !important;
    border: 0 !important;
    padding: 7px 18px 7px 14px !important;
    font-size: 14px !important;
    box-shadow: none !important;
  }

  /* Borderless smoke fade behind hero-facts (NO outer border or hard top hairline per target.png) */
  html:root body #hero ul.hero-facts {
    border: 0 !important;
    border-top: 0 !important;
    border-radius: 0 !important;
    margin: 10px 0 0 !important;
    margin-left: -18px !important;
    padding: 14px 40px 14px 18px !important;
    background: linear-gradient(90deg, rgba(10, 8, 5, 0.78) 0%, rgba(10, 8, 5, 0.58) 70%, rgba(10, 8, 5, 0) 100%) !important;
    box-shadow: none !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
  }
  html:root body #hero ul.hero-facts li {
    padding: 0 22px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    letter-spacing: 0.08em !important;
    border-right: 1px solid rgba(232, 199, 122, 0.22) !important;
  }
  html:root body #hero ul.hero-facts li:last-child {
    border-right: 0 !important;
  }
}

/* ============================================================================
   3. PHONE HERO — TARGET-PHONE.PNG MATCH (EMBLEM HEADROOM, SKY VIGNETTE, HEADER)
   ============================================================================ */
@media (max-width: 699px) {
  /* Give #emblem breathing room from very top edge & darken pale sky behind logo */
  html:root body #hero .hero-logo {
    margin: 18px auto 0 !important;
  }
  html:root body #hero .hero-logo::before {
    top: 48% !important;
    width: 360px !important;
    height: 230px !important;
    background: radial-gradient(ellipse 56% 52% at 50% 50%, rgba(8, 6, 4, 0.80) 0%, rgba(8, 6, 4, 0.42) 52%, rgba(8, 6, 4, 0) 100%) !important;
  }
  html:root body #hero .hero-logo .emblem {
    width: 114px !important;
    height: 114px !important;
    flex: 0 0 114px !important;
    margin: 0 auto !important;
  }
  html:root body #hero .hero-logo .emblem img,
  html:root body #hero .hero-logo .emblem canvas {
    width: 114px !important;
    height: 114px !important;
    max-width: 114px !important;
    max-height: 114px !important;
  }
  html:root body #hero .hero-shade {
    background:
      linear-gradient(180deg, rgba(8, 6, 4, 0.72) 0%, rgba(8, 6, 4, 0.34) 22%, rgba(8, 6, 4, 0.04) 44%, rgba(8, 6, 4, 0.28) 64%, rgba(18, 14, 10, 0.90) 88%, #120e0a 100%) !important;
  }
  html:root body #hero #hero-eyebrow.eyebrow {
    background: rgba(10, 8, 5, 0.68) !important;
    border: 1px solid rgba(232, 199, 122, 0.16) !important;
    font-size: 13px !important;
    letter-spacing: 0.13em !important;
  }
  html:root body #hero h1#hero-title span:last-child {
    color: #f0ddb0 !important;
  }
  html:root body #hero .cta-notes .promo {
    background: rgba(10, 8, 5, 0.44) !important;
    border: 0 !important;
    border-radius: 8px !important;
    padding: 5px 12px !important;
    font-size: 13.5px !important;
  }
  html:root body #hero .motion-toggle {
    width: 44px !important;
    height: 44px !important;
    bottom: 14px !important;
    right: 14px !important;
  }
  html:root body header#bar.bar {
    padding-inline: 14px !important;
    gap: 8px !important;
  }
  html:root body.scrolled:not(.at-cta) header#bar.bar .bar-end a.bar-sign {
    display: none !important;
  }
  html:root body.scrolled:not(.at-cta) header#bar.bar a.btn.btn-play {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 16px !important;
  }
  /* Stabilize mobile sticky header logo/title width across scroll & PLAY states */
  html:root body header#bar.bar a.bar-brand {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    gap: 8px !important;
  }
  html:root body header#bar.bar a.bar-brand > img,
  html:root body header#bar.bar a.bar-brand .logo-live {
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 32px !important;
  }
  html:root body header#bar.bar a.bar-brand span {
    white-space: nowrap !important;
    font-size: 13px !important;
    letter-spacing: 0.14em !important;
  }
}

/* ============================================================================
   4. SUNDERING & INTO THE BREACH — TIGHTER RHYTHM & COHESIVE CARD GRADING
   ============================================================================ */
html:root body .chapter-divider,
html:root body .chapter-divider.chapter-divider-sub {
  min-height: 36px !important;
  padding: 6px 24px !important;
}
html:root body #world .s-copy {
  padding: 28px clamp(20px, 4vw, 60px) 16px !important;
}
html:root body section#journey.band {
  padding: 22px 0 38px !important;
}
html:root body #journey .head {
  margin-bottom: 18px !important;
}
html:root body #game-band figure.frame,
html:root body #journey-grid figure.frame {
  border: 1px solid rgba(218, 180, 108, 0.26) !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}
html:root body #game-band figure.frame .clip,
html:root body #journey-grid figure.frame .clip {
  position: relative !important;
}
html:root body #game-band figure.frame .clip img,
html:root body #journey-grid figure.frame .clip img {
  filter: contrast(1.05) brightness(0.97) saturate(0.96) !important;
}
html:root body #game-band figure.frame .clip::after,
html:root body #journey-grid figure.frame .clip::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  box-shadow: inset 0 0 28px rgba(8, 6, 4, 0.52) !important;
}
@media (max-width: 699px) {
  /* Keep exact 16:9 ratio on phone cards so Make Your Character never slices left/right borders */
  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;
  }
}

/* ============================================================================
   5. DESKTOP 1-VIEWPORT REALMS & CALLINGS (1440x900 COMPLETE VISIBILITY)
   ============================================================================ */
@media (min-width: 700px) {
  html:root body section#realms.band {
    padding: 22px 0 28px !important;
  }
  html:root body #realms .head {
    margin-bottom: 14px !important;
  }
  html:root body #realms .head h2 {
    font-size: clamp(28px, 2.5vw, 36px) !important;
    margin-bottom: 6px !important;
  }
  html:root body #realms #realm-tabs {
    margin: 0 auto 14px !important;
  }
  html:root body #realms #realm-tabs > button.tab {
    min-height: 68px !important;
    padding: 8px 10px !important;
  }
  html:root body #realms #realm-tabs > button.tab::before {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    flex: 0 0 34px !important;
  }
  html:root body #realms .realm-media {
    min-height: 356px !important;
    max-height: 375px !important;
  }
  html:root body #realms #realm-card {
    padding: 22px 26px !important;
  }
  html:root body #realms #realm-card h3 {
    font-size: 25px !important;
    margin: 0 0 4px !important;
  }
  html:root body #realms #realm-card .element {
    font-size: 14px !important;
    margin: 0 0 14px !important;
    padding-bottom: 10px !important;
  }
  html:root body #realms #realm-card p.law {
    font-size: 16px !important;
    padding: 8px 12px !important;
    margin: 0 0 12px !important;
  }
  html:root body #realms #realm-card li {
    font-size: 15.5px !important;
    line-height: 1.44 !important;
  }

  /* Compact desktop Callings so Heading + Tabs + Fighter + Warrior + Lock Note all fit inside 1440x900 */
  html:root body section#callings.band {
    padding: 18px 0 26px !important;
  }
  html:root body #callings .head {
    margin-bottom: 12px !important;
  }
  html:root body #callings .head h2 {
    font-size: clamp(27px, 2.35vw, 34px) !important;
    margin-bottom: 4px !important;
  }
  html:root body #callings .head > p.lead {
    font-size: 15.5px !important;
  }
  html:root body #callings #calling-row {
    margin: 0 0 12px !important;
  }
  html:root body #callings #calling-row > button.calling {
    min-height: 66px !important;
    padding: 8px 12px !important;
  }
  html:root body #callings #calling-row > button.calling > img,
  html:root body #callings #calling-row > button.calling .medal,
  html:root body #callings #calling-row > button.calling .medal > img {
    width: 48px !important;
    height: 48px !important;
  }
  html:root body #callings #calling-panel {
    padding: 16px 22px !important;
    gap: 18px !important;
  }
  html:root body #callings #calling-panel .calling-base .adv-media.base-fig {
    min-height: 315px !important;
    max-height: 335px !important;
  }
  html:root body #callings #calling-panel h3 {
    font-size: 25px !important;
    margin: 0 0 4px !important;
  }
  html:root body #callings #calling-panel .cp-desk button.cp-chip {
    font-size: 14px !important;
  }
  html:root body #callings #calling-panel .adv {
    gap: 10px !important;
  }
  html:root body #callings #calling-panel .adv-btn {
    min-height: 40px !important;
    padding: 4px 11px !important;
    font-size: 14px !important;
  }
  html:root body #callings #calling-panel .adv-card {
    min-height: 196px !important;
    padding: 12px 16px !important;
  }
  html:root body #callings #calling-panel .adv-card .adv-media {
    height: 196px !important;
    padding-top: 6px !important;
  }
  html:root body #callings #lock-note.lock-note {
    margin: 10px 0 0 !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
  }
}

/* ============================================================================
   6. PHONE REALMS, CALLINGS & FOOTER TRANSITION POLISH
   ============================================================================ */
@media (max-width: 699px) {
  /* Refine active phone realm fill (keeps R08 layout & R09 per-realm color without orange CTA blockiness) */
  html:root body #realms #realm-tabs > button.tab[aria-selected="true"] {
    background-color: #16130f !important;
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--rtint, #8fd98a) 13%, rgba(22, 18, 13, 0.96)) 0%, rgba(16, 13, 10, 0.98) 100%) !important;
    border: 1.5px solid color-mix(in srgb, var(--rtint, #8fd98a) 84%, #fff) !important;
  }
  html:root body #realms #realm-card p.law {
    border-left: 2px solid color-mix(in srgb, var(--tint, #8fd98a) 68%, #d2b47c) !important;
    background: color-mix(in srgb, var(--tint, #8fd98a) 6%, rgba(22, 17, 13, 0.56)) !important;
  }

  /* Seamless uncropped R31 phone character spotlight (keeps character head on-screen & zero box border) */
  html:root body #callings #calling-panel .cp97 .v0 .cp-fig {
    flex: 0 0 232px !important;
    height: 232px !important;
    min-height: 232px !important;
    max-height: 232px !important;
    margin: 0 0 2px !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: radial-gradient(ellipse 68% 82% at 50% 56%, rgba(168, 126, 66, 0.22) 0%, rgba(26, 20, 14, 0.44) 64%, rgba(18, 14, 10, 0) 100%) !important;
  }
  html:root body #callings #calling-panel .cp97 .v0 .cp-fig > img,
  html:root body #callings #calling-panel .cp97 .cp-dfig > img {
    height: 224px !important;
    max-height: 224px !important;
  }
  html:root body #callings #calling-panel .cp97 .v0 .cp-text p.role {
    font-size: 13px !important;
    letter-spacing: 0.05em !important;
  }
  html:root body #callings #calling-panel .cp97 button.cp-chip {
    min-height: 44px !important;
    font-size: 13px !important;
  }

  /* Clean 2-line stacked VIEW PATHS button — NEVER truncates "Shadowknight" */
  html:root body #callings #calling-panel .cp97 .v0 .cp-paths {
    min-height: 52px !important;
    padding: 9px 14px !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }
  html:root body #callings #calling-panel .cp97 .v0 .cp-paths .cp-pwrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 2px !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  html:root body #callings #calling-panel .cp97 .v0 .cp-paths .cp-pl {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
  }
  html:root body #callings #calling-panel .cp97 .v0 .cp-paths .cp-pn {
    display: block !important;
    font-size: 13px !important;
    line-height: 1.32 !important;
    color: #d9c8a6 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    text-align: left !important;
    width: 100% !important;
  }
  html:root body #callings #calling-panel .cp97 .v0 .cp-paths .cp-arrow {
    flex: 0 0 auto !important;
  }

  /* Smooth atmospheric transition into footer */
  html:root body section#play.final::after {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 76px !important;
    pointer-events: none !important;
    background: linear-gradient(180deg, rgba(18, 14, 10, 0) 0%, #120e0a 100%) !important;
  }
  html:root body footer#account.foot {
    border-top: 1px solid rgba(218, 180, 108, 0.22) !important;
    box-shadow: 0 -16px 32px rgba(18, 14, 10, 0.85) !important;
  }
}
