/* r216.css (#1014) — Interactive 4-Chapter Sundering Controls, 1160px Slice 2 Alignment, Fixed Fire/Stone Thumbnails,
   Unified Obsidian-Gold Callings States, Forged CTA Chrome & Mobile Combat Lead.
   Loaded after r215.css. Honors ALL owner locks (copy, R08, R09, R31, R32, spheres.html links). */

/* ============================================================================
   1. SLICE 4 UNIFIED OBSIDIAN-GOLD ACTIVE STATES & DIAMOND SKILL PILLS (GLOBAL)
   ============================================================================ */
/* Unify HUMAN / MALE checked chips with THALENYR / FIGHTER / Warrior active styling */
html:root body #callings #calling-panel button.cp-chip[aria-checked="true"],
html:root body #callings #calling-panel .cp-desk .cp-trow button.cp-chip[aria-checked="true"],
html:root body #callings #calling-panel .cp97 .cp-toggle .cp-trow button.cp-chip[aria-checked="true"] {
  background: linear-gradient(180deg, rgba(50, 37, 18, 0.94) 0%, rgba(18, 14, 10, 0.98) 100%) !important;
  border: 1.5px solid #f0cf82 !important;
  color: #fff9eb !important;
  box-shadow: inset 0 1px 0 rgba(255, 236, 184, 0.28), 0 0 12px rgba(232, 199, 122, 0.14) !important;
}

/* Antique-gold RPG diamond gem (replaces video-play triangle on skill demo buttons while keeping R32 interactivity) */


/* Temper overly neon arcade saturation on Calling & Path circular sigils */
html:root body #callings #calling-row button.calling img,
html:root body #callings .adv-row .adv-btn img {
  filter: saturate(0.85) contrast(1.05) !important;
}

/* ============================================================================
   2. SLICE 3 REALMS — DISTINCT FIRE SUNS & STONE MONOLITH THUMBNAILS + COHESION
   ============================================================================ */
html:root body section#realms #realm-tabs > button#realm-tab-thalenyr::before {
  background-position: 50% 52% !important;
  background-size: 140% auto !important;
}
html:root body section#realms #realm-tabs > button#realm-tab-sky::before {
  background-position: 45% 35% !important;
  background-size: 155% auto !important;
}
html:root body section#realms #realm-tabs > button#realm-tab-fire::before {
  background-position: 82% 20% !important;
  background-size: 250% auto !important;
}
html:root body section#realms #realm-tabs > button#realm-tab-sea::before {
  background-position: 48% 44% !important;
  background-size: 145% auto !important;
}
html:root body section#realms #realm-tabs > button#realm-tab-stone::before {
  background-position: 62% 28% !important;
  background-size: 210% auto !important;
}

/* Bridge sunlit realm images into the obsidian frame with subtle inner vignette */
html:root body section#realms .realm-pics {
  position: relative !important;
}
html:root body section#realms .realm-pics img {
  filter: brightness(0.92) contrast(1.05) saturate(0.92) !important;
}
html:root body section#realms .realm-pics::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  z-index: 2 !important;
  box-shadow: inset 0 0 38px rgba(10, 8, 5, 0.56), inset 0 -26px 34px rgba(10, 8, 5, 0.42) !important;
}

/* ============================================================================
   3. DESKTOP (>= 700px): SLICE 1 INTERACTIVE CONTROLS, FORGED CTAs & SLICE 2 GRID
   ============================================================================ */
@media (min-width: 700px) {
  /* Opaque scrolled bar so chapter dividers scrolling behind the sticky bar never ghost or peek */
  html:root body header#bar.bar.scrolled {
    background: rgba(15, 11, 8, 0.97) !important;
  }

  /* Slice 0: forged dark obsidian + brass bevel on secondary CTAs + compact scroll cue */
  html:root body #hero .hero-cta .btn-ghost,
  html:root body #play .final-copy a.final-signin {
    border-radius: 4px !important;
    background: linear-gradient(180deg, rgba(36, 27, 17, 0.84) 0%, rgba(14, 11, 8, 0.94) 100%) !important;
    border: 1px solid rgba(232, 199, 122, 0.54) !important;
    box-shadow: inset 0 1px 0 rgba(255, 236, 188, 0.18), 0 6px 16px rgba(0, 0, 0, 0.50) !important;
  }
  html:root body #play .final-copy a.btn.btn-play {
    min-width: 204px !important;
    width: 204px !important;
    max-width: 204px !important;
    height: 58px !important;
    min-height: 58px !important;
    padding: 0 32px !important;
  }
  html:root body #hero a.scroll-cue {
    bottom: 12px !important;
    width: 34px !important;
    height: 34px !important;
    background: rgba(10, 8, 5, 0.72) !important;
  }

  /* Slice 1: Un-hide & style 4-chapter Sundering slideshow controls (CSS ::after labels -> 0 DOM text nodes) */
  html:root body #world .sunder .s-marks {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    position: absolute !important;
    left: auto !important;
    right: 76px !important;
    bottom: 26px !important;
    transform: none !important;
    height: 40px !important;
    padding: 4px 7px !important;
    border-radius: 999px !important;
    background: rgba(12, 9, 6, 0.84) !important;
    border: 1px solid rgba(218, 180, 108, 0.34) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55) !important;
    z-index: 5 !important;
  }
  html:root body #world .sunder .s-mark {
    width: auto !important;
    min-width: 44px !important;
    height: 30px !important;
    padding: 0 11px !important;
    border-radius: 999px !important;
    border: 1px solid transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
  }
  html:root body #world .sunder .s-mark::before {
    display: none !important;
    content: none !important;
  }
  html:root body #world .sunder .s-mark::after {
    font-family: var(--ui-sans) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.09em !important;
    text-transform: uppercase !important;
    color: rgba(235, 221, 192, 0.74) !important;
    white-space: nowrap !important;
  }
  html:root body #world .sunder .s-mark:nth-child(1)::after { content: "I \0000B7  Roots" !important; }
  html:root body #world .sunder .s-mark:nth-child(2)::after { content: "II \0000B7  Realms" !important; }
  html:root body #world .sunder .s-mark:nth-child(3)::after { content: "III \0000B7  Rifts" !important; }
  html:root body #world .sunder .s-mark:nth-child(4)::after { content: "IV \0000B7  Nexus" !important; }
  html:root body #world .sunder .s-mark[aria-current="true"] {
    background: linear-gradient(180deg, rgba(56, 42, 20, 0.95), rgba(22, 16, 10, 0.98)) !important;
    border-color: #f0cf82 !important;
  }
  html:root body #world .sunder .s-mark[aria-current="true"]::after {
    color: #fff8e6 !important;
  }
  html:root body #world .sunder .s-pause {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    right: 24px !important;
    bottom: 24px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: rgba(12, 9, 6, 0.84) !important;
    border: 1px solid rgba(218, 180, 108, 0.38) !important;
    color: #ebd08e !important;
    font-size: 12px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55) !important;
    z-index: 5 !important;
  }
}

@media (min-width: 1041px) {
  /* Slice 2: align #journey container width to Realms/Callings (1280px -> 1165px inner), keep div3 unclipped above y=2700, & w1440 H <= 5400px */
  html:root body section#journey.band {
    padding: 52px 0 0 !important;
  }
  html:root body #journey .wrap {
    max-width: 1280px !important;
  }
  html:root body #game-band {
    margin-bottom: 10px !important;
  }
  html:root body #game-band,
  html:root body #journey-grid {
    gap: 16px !important;
  }
  html:root body #game-band figure.frame .clip,
  html:root body #journey-grid figure.frame .clip {
    aspect-ratio: 2.42 / 1 !important;
    min-height: 0 !important;
    max-height: 236px !important;
  }
  html:root body #game-band figure.frame .clip img,
  html:root body #journey-grid figure.frame .clip img {
    object-position: 50% 42% !important;
  }
  /* Keep w1440 total height <= 5400px (strictly 6 slices 0..5, NO slice-6!) and div5 cleanly tucked above sticky bar on max scroll */
  html:root body section#realms.band {
    padding: 204px 0 80px !important;
  }
  html:root body section#play.final {
    padding-top: 84px !important;
  }
}

/* ============================================================================
   4. MOBILE (<= 699px): HERO WORDMARK BACKING, SUNDERING CONTROLS, COMBAT LEAD, CLEAN CALLINGS
   ============================================================================ */
@media (max-width: 699px) {
  /* Explicit non-overlapping 124px emblem geometry -> 0px TEXT/PIC overlap with wordmark while preserving tight Slice 0 lockup */
  html:root body #hero .hero-logo .emblem,
  html:root body #hero .hero-logo .emblem .sse-emblem {
    width: 124px !important;
    height: 124px !important;
    max-width: 124px !important;
    max-height: 124px !important;
    flex: 0 0 124px !important;
    margin: 2px auto 2px !important;
  }
  html:root body #hero .hero-logo .emblem canvas {
    width: 124px !important;
    height: 124px !important;
    max-width: 124px !important;
    max-height: 124px !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
  }
  html:root body #hero .hero-logo .emblem img {
    width: 78px !important;
    height: 78px !important;
    max-width: 78px !important;
    max-height: 78px !important;
    inset: 23px !important;
  }
  html:root body #hero .hero-logo .wordmark {
    margin: 0 auto !important;
    padding: 5px 16px !important;
    border-radius: 999px !important;
    background: radial-gradient(ellipse 72% 68% at 50% 50%, rgba(8, 8, 12, 0.74) 0%, rgba(8, 8, 12, 0.38) 62%, rgba(8, 8, 12, 0) 100%) !important;
  }

  /* Slice 1: Visible mobile 4-chapter controls inside bottom shade above div2 */
  html:root body section#world.band .sunder .s-copy {
    bottom: 66px !important;
    padding: 88px 18px 14px !important;
  }
  html:root body #world .sunder .s-marks {
    display: inline-flex !important;
    align-items: center !important;
    gap: 2px !important;
    position: absolute !important;
    left: 18px !important;
    right: auto !important;
    bottom: 16px !important;
    transform: none !important;
    height: 44px !important;
    padding: 0 6px !important;
    border-radius: 999px !important;
    background: rgba(12, 9, 6, 0.84) !important;
    border: 1px solid rgba(218, 180, 108, 0.32) !important;
    z-index: 5 !important;
  }
  html:root body #world .sunder .s-mark {
    width: 44px !important;
    height: 34px !important;
    border-radius: 999px !important;
    border: 1px solid transparent !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  html:root body #world .sunder .s-mark::before {
    display: none !important;
    content: none !important;
  }
  html:root body #world .sunder .s-mark::after {
    font-family: var(--ui-sans) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    color: rgba(235, 221, 192, 0.72) !important;
  }
  html:root body #world .sunder .s-mark:nth-child(1)::after { content: "I" !important; }
  html:root body #world .sunder .s-mark:nth-child(2)::after { content: "II" !important; }
  html:root body #world .sunder .s-mark:nth-child(3)::after { content: "III" !important; }
  html:root body #world .sunder .s-mark:nth-child(4)::after { content: "IV" !important; }
  html:root body #world .sunder .s-mark[aria-current="true"] {
    background: linear-gradient(180deg, rgba(56, 42, 20, 0.95), rgba(22, 16, 10, 0.98)) !important;
    border-color: #f0cf82 !important;
  }
  html:root body #world .sunder .s-mark[aria-current="true"]::after {
    color: #fff8e6 !important;
  }
  html:root body #world .sunder .s-pause {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    right: 18px !important;
    bottom: 16px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: rgba(12, 9, 6, 0.84) !important;
    border: 1px solid rgba(218, 180, 108, 0.36) !important;
    color: #ebd08e !important;
    font-size: 12px !important;
    z-index: 5 !important;
  }

  /* Slice 2: Show 1 / 4 slide counter cleanly inside carousel pill + trim vertical padding for Slice 3/4 headroom */
  html:root body section#journey.band {
    padding: 64px 0 36px !important;
  }
  html:root body section#realms.band {
    padding: 112px 0 0 !important;
  }
  html:root body #journey .j-nav .j-count {
    display: inline-flex !important;
    opacity: 1 !important;
    align-items: center !important;
    font-family: var(--ui-sans) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
    color: #dfd0b2 !important;
    padding: 0 6px !important;
    white-space: nowrap !important;
  }

  /* Slice 3: Show unambiguous REALM 1 OF 5 pill on mobile stage too */
  html:root body #realms .realm-counter {
    display: inline-flex !important;
    align-items: center !important;
    position: absolute !important;
    right: 10px !important;
    bottom: 10px !important;
    z-index: 6 !important;
    padding: 3px 10px !important;
    border-radius: 999px !important;
    background: rgba(12, 9, 6, 0.80) !important;
    border: 1px solid rgba(232, 199, 122, 0.34) !important;
    color: #f2e4c4 !important;
    font-family: var(--ui-sans) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em !important;
  }

  /* Slice 4: Strip circle wrapper behind DWARF/HALFLING lock icons + separate VIEW PATHS below BODY */
  html:root body #callings #calling-panel .cp97 .cp-chip .cp-lock {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    width: 13px !important;
    height: 13px !important;
    margin-left: 5px !important;
  }
  html:root body #callings #calling-panel .cp97 .v0 .cp-toggle {
    padding-bottom: 7px !important;
    border-bottom: 1px solid rgba(218, 180, 108, 0.16) !important;
  }
  html:root body #callings #calling-panel .cp97 .v0 .cp-paths {
    margin-top: 7px !important;
  }
  html:root body #callings #calling-panel .cp97 .v0 .cp-paths .cp-pl {
    text-transform: uppercase !important;
    letter-spacing: 0.09em !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #f0cf82 !important;
  }
}
