/* r227.css (#1014 / #1064) — Complete Craft, Alignment, Touch-Target & Lighting Cohesion Pass:
   1. Global: Warm parchment small-caps display H2 across ALL sections including Slice 1; engraved dark-obsidian/gold
      skill sigil buttons; unified antique-gold active state across HUMAN, MALE & WARRIOR; quiet stepped-back locks
      + inline lock-note SVG alignment; transparent .chapter-divider canvas (eliminates horizontal color seams).
   2. Desktop (>= 1041px): Brighter Hero key-art luminescence, unboxed fit-content .hero-facts fading cleanly,
      uniform 3px angular CTA/promo frames, exact 100px #world left rail, gold-bordered Slice 2 frames with uniform
      2-line captions, bordered 318px Realms frame, and 3-column aligned Callings with 50/50 skills & flush WARRIOR.
   3. Mobile (<= 699px): >=44px sculpted double-bevel sticky PLAY & menu controls, overlap-free 130px/90px top crest,
      fiery target-phone Hero rim scrim + cleared flanking crowd faces + 26px H1 + >=44px bottom controls, crisp Slice 1
      tabs, 16px Slice 2 card gutter + >=44px dots + reduced void, seamless Slice 3 transition, 148px/140px R31
      cathedral Fighter stage, aligned PLAY/SIGN IN widths, >=44px footer links & visible Spheres Membership link.
   Preserves all sacred owner locks (content.js verbatim copy, 0 step badges, .chapter-divider, R08/R09/R31/R32, spheres.html). */

/* ============================================================================
   1. GLOBAL POLISH: PARCHMENT SMALL-CAPS H2, ENGRAVED SKILL SIGILS, ACTIVE GOLD, SEAMLESS DIVIDERS
   ============================================================================ */
html:root body main section#world.band .sunder .s-copy h2,
html:root body main section#world.band .sheet h2 {
  text-transform: capitalize !important;
  font-variant: small-caps !important;
  color: #f6ecd6 !important;
}

/* Engraved obsidian & gold RPG skill sigil buttons (beats generic flat yellow play square) */


/* Unified antique-gold active selection across HUMAN, MALE & WARRIOR */
html:root body main section#callings #calling-panel button.cp-chip[aria-checked="true"],
html:root body main section#callings #calling-panel .cp-desk .cp-trow button.cp-chip[aria-checked="true"],
html:root body main section#callings #calling-panel .cp-desk .cp-trow:last-of-type button.cp-chip[aria-checked="true"],
html:root body main section#callings #calling-panel .cp-desk .cp-trow:last-of-type button.cp-chip[aria-checked="true"]:first-of-type,
html:root body main section#callings #calling-panel .cp-desk .cp-trow:last-of-type button.cp-chip[aria-checked="true"]:last-of-type,
html:root body main section#callings #calling-panel .cp97 .v0 .cp-toggle .cp-trow button.cp-chip[aria-checked="true"],
html:root body main section#callings #calling-panel .cp97 .v0 .cp-toggle .cp-trow:last-of-type button.cp-chip[aria-checked="true"],
html:root body main section#callings #calling-panel .cp97 .v0 .cp-toggle .cp-trow:last-of-type button.cp-chip[aria-checked="true"]:first-of-type,
html:root body main section#callings #calling-panel .cp97 .v0 .cp-toggle .cp-trow:last-of-type button.cp-chip[aria-checked="true"]:last-of-type {
  background: linear-gradient(180deg, rgba(84, 60, 25, 0.90) 0%, rgba(32, 22, 11, 0.96) 100%) !important;
  border: 1px solid rgba(236, 204, 134, 0.84) !important;
  border-left: 1px solid rgba(236, 204, 134, 0.84) !important;
  border-right: 1px solid rgba(236, 204, 134, 0.84) !important;
  box-shadow: inset 0 1px 0 rgba(255, 242, 198, 0.28), 0 0 10px rgba(218, 176, 92, 0.14) !important;
  color: #fff8e8 !important;
  font-weight: 700 !important;
}

/* Readable MEMBERS lock label + clearly stepped-back locked ancestries + inline lock-note SVG */
html:root body main section#callings #calling-row > button.calling.locked small.medal-cap,
html:root body main section#callings #calling-row > button.calling.locked small.medal-cap.lock-cap {
  color: #b8aa92 !important;
  opacity: 0.96 !important;
}
html:root body main section#callings #calling-panel button.cp-chip[aria-checked="false"]:is([data-v="dwarf"], [data-v="halfling"]),
html:root body main section#callings #calling-panel button.cp-chip[aria-checked="false"]:has(.cp-lock),
html:root body main section#callings #calling-panel button.cp-chip[data-v="dwarf"][aria-checked="false"],
html:root body main section#callings #calling-panel button.cp-chip[data-v="halfling"][aria-checked="false"] {
  background: rgba(9, 7, 5, 0.92) !important;
  border: 1px solid rgba(154, 136, 108, 0.19) !important;
  color: #968974 !important;
  opacity: 1 !important;
}
html:root body section#callings .lock-note#lock-note .lock-note-text {
  display: inline !important;
  line-height: 1.4 !important;
}
html:root body section#callings .lock-note#lock-note .ln-svg {
  display: inline-block !important;
  width: 13px !important;
  height: 13px !important;
  vertical-align: -2px !important;
  margin-right: 5px !important;
}

/* Transparent divider canvas eliminates horizontal color bands between sections */
html:root body .chapter-divider,
html:root body .chapter-divider.chapter-divider-sub {
  background: transparent !important;
  background-color: transparent !important;
}

/* ============================================================================
   2. DESKTOP (>= 1041px): HERO LUMINANCE, UNBOXED FACTS, 100PX #WORLD RAIL, 50/50 CALLINGS & FLUSH WARRIOR
   ============================================================================ */
@media (min-width: 1041px) {
  html:root body #hero .hero-art img.hero-poster {
    filter: brightness(1.12) contrast(1.05) saturate(1.08) !important;
  }
  html:root body main section#hero.hero .hero-copy ul.hero-facts {
    width: fit-content !important;
    max-width: 100% !important;
    background: linear-gradient(90deg, rgba(10, 8, 5, 0.48) 0%, rgba(10, 8, 5, 0.24) 72%, rgba(10, 8, 5, 0) 100%) !important;
    border: 0 !important;
    border-radius: 2px !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 8px 20px 8px 0 !important;
    margin: 14px 0 0 0 !important;
  }
  html:root body section#hero.hero .cta-notes p.note#hero-note,
  html:root body #hero .cta-notes .promo {
    border-radius: 3px !important;
    border: 1px solid rgba(218, 180, 108, 0.24) !important;
    background: linear-gradient(90deg, rgba(12, 9, 6, 0.80) 0%, rgba(12, 9, 6, 0.56) 100%) !important;
  }
  html:root body #hero .hero-cta a.btn.btn-ghost {
    border-radius: 3px !important;
    border: 1px solid rgba(226, 190, 114, 0.46) !important;
  }

  /* Slice 1: Exact 100px left axis alignment matching Hero & header emblem */
  html:root body main section#world.band .sunder .s-copy {
    left: max(58px, calc(50% - 620px)) !important;
    right: auto !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
  }

  /* Slice 2: Gold-framed focal crops & uniform 2-line captions */
  html:root body #game-band figure.frame {
    border: 1px solid rgba(218, 180, 108, 0.30) !important;
    box-shadow: inset 0 1px 0 rgba(255, 238, 194, 0.10), 0 10px 28px rgba(0, 0, 0, 0.56) !important;
  }
  html:root body #game-band figure.frame:nth-child(1) .clip img { object-position: 50% 20% !important; }
  html:root body #game-band figure.frame:nth-child(2) .clip img { object-position: 50% 44% !important; }
  html:root body #game-band figure.frame:nth-child(3) .clip img { object-position: 50% 46% !important; }
  html:root body #game-band figure.frame:nth-child(4) .clip img { object-position: 50% 32% !important; }
  html:root body #game-band figure.frame figcaption p {
    max-width: 54ch !important;
    font-size: 14.5px !important;
    line-height: 1.42 !important;
  }

  /* Slice 3: Matched subtle border around left Realm scene & balanced 318px typography */
  html:root body section#realms .realm-media {
    border: 1px solid rgba(218, 180, 108, 0.28) !important;
    border-radius: 3px !important;
  }
  html:root body section#realms .realm-media,
  html:root body section#realms .realm-pics,
  html:root body section#realms #realm-card {
    height: 318px !important;
    min-height: 318px !important;
    max-height: 318px !important;
    box-sizing: border-box !important;
  }
  html:root body section#realms #realm-card ul li {
    max-width: 50ch !important;
    font-size: 14.6px !important;
    line-height: 1.44 !important;
  }

  /* Slice 4: Flush 3-column bottom baseline + 50/50 skills matching ANCESTRY/BODY */
  html:root body #callings #calling-panel .calling-base > div:not(.adv-media) {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-self: stretch !important;
    gap: 6px !important;
    padding: 2px 0 !important;
  }
  html:root body #callings #calling-panel .calling-base h3 {
    margin: 0 !important;
  }
  html:root body #callings #calling-panel .calling-base p.open-line:empty {
    display: none !important;
  }
  html:root body #callings #calling-panel .calling-base p.role {
    margin: 2px 0 8px 0 !important;
  }
  html:root body #callings #calling-panel .calling-base dl,
  html:root body #callings #calling-panel .calling-base .cp-toggle.cp-desk {
    width: 100% !important;
    max-width: 100% !important;
  }
  html:root body #callings #calling-panel .calling-base .cp-toggle.cp-desk {
    margin-top: auto !important;
  }
  html:root body #callings #calling-panel .calling-base dl dd {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 6px 0 0 0 !important;
  }
  html:root body #callings #calling-panel > .adv {
    display: flex !important;
    flex-direction: column !important;
    align-self: stretch !important;
  }
  html:root body #callings #calling-panel > .adv > .adv-card {
    flex: 1 1 auto !important;
    display: flex !important;
    align-items: stretch !important;
    padding: 14px 0 0 !important;
    margin-top: auto !important;
  }
  html:root body #callings #calling-panel .adv-card .adv-media.figure {
    width: 204px !important;
    min-width: 204px !important;
    height: 100% !important;
    min-height: 254px !important;
    align-self: stretch !important;
  }

  /* Slice 5: Balanced closing CTA padding & subtle backing behind WebGPU note */
  html:root body section#play.final {
    padding: 146px 0 96px !important;
  }
  html:root body section#play.final .final-copy p.req {
    display: inline-block !important;
    background: radial-gradient(ellipse 90% 90% at 50% 50%, rgba(8, 6, 4, 0.72) 0%, rgba(8, 6, 4, 0) 100%) !important;
    padding: 4px 16px !important;
  }
}

/* ============================================================================
   3. MOBILE (<= 699px): >=44PX STICKY/DOTS/FOOTER, FIERY TARGET HERO & CLEAN CROPS, 16PX CAROUSEL, 148PX STAGE
   ============================================================================ */
@media (max-width: 699px) {
  html:root body.scrolled header#bar.bar:not(.open) a.btn.btn-play,
  html:root body.scrolled.at-cta header#bar.bar:not(.open) a.btn.btn-play,
  html:root body.scrolled header#bar.bar.cta-gone:not(.open) a.btn.btn-play,
  html:root body.scrolled:not(.at-cta) header#bar.bar:not(.open) a.btn.btn-play {
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 16px !important;
    border-radius: 3px !important;
    border: 1px solid #f7e1a8 !important;
    box-shadow: inset 0 0 0 2px rgba(34, 20, 5, 0.72), inset 0 1px 0 rgba(255, 250, 224, 0.70), 0 2px 10px rgba(0, 0, 0, 0.75) !important;
  }
  html:root body header#bar.bar .menu-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 3px !important;
    border: 1px solid rgba(226, 190, 114, 0.44) !important;
  }
  html:root body header#bar.bar .bar-brand {
    min-height: 44px !important;
  }

  /* Hero Mobile: Target-Phone glow + overlap-free 130px/90px crest + shadowed side margins clearing flanking faces */
  html:root body #hero .hero-art {
    transform: none !important;
  }
  html:root body #hero .hero-poster,
  html:root body #hero .hero-canvas {
    object-position: 54% 25% !important;
    filter: contrast(1.06) saturate(1.12) !important;
  }
  html:root body #hero .hero-shade {
    background:
      radial-gradient(ellipse 58% 28% at 84% 18%, rgba(255, 146, 54, 0.28) 0%, rgba(214, 96, 30, 0.10) 52%, rgba(0, 0, 0, 0) 100%),
      radial-gradient(ellipse 38% 22% at 8% 60%, rgba(10, 8, 6, 0.97) 0%, rgba(10, 8, 6, 0.86) 56%, rgba(10, 8, 6, 0) 100%),
      radial-gradient(ellipse 38% 22% at 92% 62%, rgba(10, 8, 6, 0.96) 0%, rgba(10, 8, 6, 0.84) 56%, rgba(10, 8, 6, 0) 100%),
      radial-gradient(ellipse 68% 20% at 50% 14%, rgba(8, 6, 4, 0.42) 0%, rgba(8, 6, 4, 0) 100%),
      linear-gradient(180deg, rgba(8, 6, 4, 0.48) 0%, rgba(8, 6, 4, 0.08) 22%, rgba(8, 6, 4, 0) 36%, rgba(8, 6, 4, 0.12) 48%, rgba(10, 8, 6, 0.86) 64%, rgba(12, 9, 6, 0.98) 79%, #100c08 100%) !important;
  }
  html:root body #hero .hero-logo {
    top: 4px !important;
    padding: 2px 16px 4px !important;
    gap: 0 !important;
  }
  html:root body #hero .hero-logo .emblem,
  html:root body #hero .hero-logo .emblem .sse-emblem,
  html:root body #hero .hero-logo .emblem canvas {
    width: 130px !important;
    height: 130px !important;
    max-width: 130px !important;
    max-height: 130px !important;
    flex: 0 0 130px !important;
    margin: 0 !important;
  }
  html:root body #hero .hero-logo .emblem img {
    width: 90px !important;
    height: 90px !important;
    max-width: 90px !important;
    max-height: 90px !important;
  }
  html:root body #hero .hero-logo .wordmark {
    font-size: 24px !important;
    margin-top: 0 !important;
  }
  html:root body section#hero.hero .hero-copy p#hero-eyebrow.eyebrow {
    border-radius: 999px !important;
    border: 1px solid rgba(226, 190, 114, 0.28) !important;
    background: rgba(10, 8, 5, 0.82) !important;
    padding: 5px 15px !important;
  }
  html:root body section#hero.hero .hero-copy h1#hero-title {
    font-size: 26px !important;
    line-height: 1.13 !important;
    max-width: none !important;
  }
  html:root body #hero .hero-dots {
    height: 44px !important;
    min-height: 44px !important;
    bottom: 20px !important;
    border-radius: 999px !important;
  }
  html:root body #hero .motion-toggle {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    bottom: 20px !important;
  }
  html:root body #hero .hero-copy {
    padding-bottom: 76px !important;
  }

  /* Slice 1 Mobile: Crisp imagery & readable tab text */
  html:root body section#world.band .sunder img {
    filter: contrast(1.06) saturate(1.05) !important;
  }
  html:root body #world .sunder .s-mark::after {
    font-size: 9.8px !important;
    letter-spacing: 0.04em !important;
  }

  /* Slice 2 Mobile: Fix negative .j-swipe margin so 16px outer gutter matches Realms/Callings & align slice cadence */
  html:root body section#journey.band {
    padding: 96px 0 38px !important;
  }
  html:root body section#journey.band .wrap {
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  html:root body #journey .j-swipe {
    margin: 0 !important;
    padding: 0 0 8px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  html:root body #journey .j-swipe figure.frame {
    margin-left: 0 !important;
    margin-right: 0 !important;
    flex: 0 0 100% !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  html:root body #journey .j-swipe figure.frame .clip img {
    object-position: 50% 20% !important;
  }
  html:root body #journey .j-dots {
    min-height: 44px !important;
    align-items: center !important;
  }

  /* Slice 3 Mobile: Smooth masked backdrop (kills y~782 seam) & frame THE REALMS clearly below sticky bar */
  html:root body section#realms.band {
    padding: 154px 0 8px !important;
    background-color: transparent !important;
  }
  html:root body section#realms.band .realm-bg {
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 12%, #000 84%, rgba(0, 0, 0, 0) 100%) !important;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 12%, #000 84%, rgba(0, 0, 0, 0) 100%) !important;
  }

  /* Slice 4 Mobile: 130px vaulted stage & 122px uncropped R31 portrait framed cleanly below sticky bar */
  html:root body section#callings.band {
    padding: 100px 0 0 !important;
  }
  html:root body section#callings #calling-panel .cp97 .v0 .cp-fig {
    flex: 0 0 130px !important;
    height: 130px !important;
    min-height: 130px !important;
    max-height: 130px !important;
    background-color: #120e0a !important;
    background-image:
      radial-gradient(ellipse 52% 14% at 50% 94%, rgba(0, 0, 0, 0.90) 0%, rgba(0, 0, 0, 0) 100%),
      radial-gradient(ellipse 46% 82% at 50% 50%, rgba(18, 13, 9, 0.74) 0%, rgba(226, 182, 98, 0.16) 48%, rgba(14, 10, 7, 0.94) 96%),
      url("art/band-skills-900.webp") !important;
    background-size: 100% 100%, 100% 100%, cover !important;
    background-position: center, center, 50% 34% !important;
  }
  html:root body section#callings #calling-panel .cp97 .v0 .cp-fig > img,
  html:root body #callings #calling-panel .cp97 .v0 .cp-fig > img,
  html:root body #callings #calling-panel .cp97 .cp-dfig > img {
    height: 122px !important;
    max-height: 122px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  /* Slice 5 Mobile: Aligned PLAY / SIGN IN width, >=44px footer links & visible inline Spheres Membership */
  html:root body section#play.final {
    padding: 68px 16px 32px !important;
  }
  html:root body #play .final-copy a.btn.btn-play {
    width: 268px !important;
    min-width: 268px !important;
    max-width: 268px !important;
  }
  html:root body section#play.final #account-mount a#sign-in.final-signin {
    width: 264px !important;
    min-width: 264px !important;
    max-width: 264px !important;
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 3px !important;
    border: 1px solid rgba(226, 190, 114, 0.44) !important;
    box-shadow: inset 0 1px 0 rgba(255, 240, 198, 0.12) !important;
  }
  html:root body footer#account.foot .foot-notes .foot-links a {
    min-height: 44px !important;
    padding: 2px 0 !important;
  }
  html:root body footer#account.foot .wrap.foot-meta {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 11px !important;
  }
  html:root body footer#account.foot .wrap.foot-meta a.foot-meta-spheres,
  html:root body footer#account.foot .foot-meta a.foot-meta-spheres {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    font-size: 11px !important;
    min-height: 36px !important;
  }
}
