/* ============================================================================
   A Late Night Reborn - 04 / DREAMSCAPE (Living Illustrated Twilight Sky World)
   Optional Refresh [Beta] Stylesheet (Fredoka loaded via page <link>)
   ============================================================================ */

html[data-ui="refresh"],
html[data-ui="refresh"][data-theme="light"],
html[data-ui="refresh"][data-theme="light-lite"] {
  /* Core Dreamscape Palette (Storybook Twilight + Warm Cloud Paper) */
  --ds-sky-top:         #181436;
  --ds-sky-mid:         #3b2d6b;
  --ds-sky-low:         #8f6ba8;
  --ds-horizon:         #f4beb4;
  --ds-cloud-deep:      #33285e;
  --ds-cloud-mid:       #5a468c;
  --ds-ground:          #fdf6ef;
  --ds-ground-alt:      #f6ede4;
  --ds-surface:         #ffffff;
  --ds-surface-soft:    #f4ebe2;
  --ds-border:          #e7dbd0;
  --ds-border-strong:   #d8c7b8;

  --ds-ink:             #261e3d;
  --ds-ink-2:           #594f75;
  --ds-ink-muted:       #7c7098;

  --ds-moon:            #fdd4c9;
  --ds-gold:            #ebd09b;
  --ds-gold-ink:        #8a6120;

  /* Semantic Raid Colors (Chaotic ALWAYS Green) */
  --ds-ftb:             #e04f63;
  --ds-ftb-soft:        #fcebed;
  --ds-ftb-border:      rgba(224, 79, 99, 0.28);
  --ds-ftm:             #8152dc;
  --ds-ftm-soft:        #f2ecfc;
  --ds-ftm-border:      rgba(129, 82, 220, 0.28);
  --ds-chaotic:         #1d9e62;
  --ds-chaotic-soft:    #e5f7ee;
  --ds-chaotic-border:  rgba(29, 158, 98, 0.30);
  --ds-ba:              #2f7ec2;
  --ds-ba-soft:         #e7f2fc;
  --ds-ba-border:       rgba(47, 126, 194, 0.30);
  --ds-drs:             #c4881d;
  --ds-drs-soft:        #fcf4e1;

  --ds-display:         'Fredoka', 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  --ds-serif:           'Fredoka', 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
  --ds-sans:            'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Map legacy CSS variables so existing components harmonize cleanly */
  --bg-deep:            var(--ds-ground);
  --accent-rose:        #d4696a;
  --accent-purple:      var(--ds-ftm);
  --accent-periwinkle:  #6f55a6;
  --accent-gold:        var(--ds-gold-ink);
  --accent-blue:        var(--ds-ba);
  --accent-teal:        var(--ds-chaotic);
  --glass-bg:           var(--ds-surface);
  --glass-border:       var(--ds-border);
  --text-primary:       var(--ds-ink);
  --text-secondary:     var(--ds-ink-2);
  --text-muted:         var(--ds-ink-muted);
  --shadow-glass:       0 10px 30px rgba(42, 31, 74, 0.07);
  --radius-sm:          12px;
  --radius-md:          18px;
  --radius-lg:          22px;
  --radius-xl:          28px;
}

/* Midnight Dreamscape (Cohesive Dark Mode for 2AM Raiding) */
html[data-ui="refresh"][data-theme="dark"],
html[data-ui="refresh"][data-theme="dark-lite"] {
  --ds-sky-top:         #100d24;
  --ds-sky-mid:         #291f52;
  --ds-sky-low:         #5d4382;
  --ds-horizon:         #c98a96;
  --ds-cloud-deep:      #201942;
  --ds-cloud-mid:       #352a63;
  --ds-ground:          #16122c;
  --ds-ground-alt:      #1d1838;
  --ds-surface:         #211c3f;
  --ds-surface-soft:    #2a244f;
  --ds-border:          rgba(253, 212, 201, 0.16);
  --ds-border-strong:   rgba(253, 212, 201, 0.28);

  --ds-ink:             #f8f2fa;
  --ds-ink-2:           #cfc5e8;
  --ds-ink-muted:       #9b90bd;

  --ds-moon:            #fdd4c9;
  --ds-gold:            #ebd09b;
  --ds-gold-ink:        #ebd09b;

  --ds-ftb:             #f26b7c;
  --ds-ftb-soft:        rgba(242, 107, 124, 0.16);
  --ds-ftb-border:      rgba(242, 107, 124, 0.38);
  --ds-ftm:             #b28bf8;
  --ds-ftm-soft:        rgba(178, 139, 248, 0.16);
  --ds-ftm-border:      rgba(178, 139, 248, 0.38);
  --ds-chaotic:         #34d399;
  --ds-chaotic-soft:    rgba(52, 211, 153, 0.16);
  --ds-chaotic-border:  rgba(52, 211, 153, 0.38);
  --ds-ba:              #6cb4f5;
  --ds-ba-soft:         rgba(108, 180, 245, 0.16);
  --ds-ba-border:       rgba(108, 180, 245, 0.38);
  --ds-drs:             #f2c56b;
  --ds-drs-soft:        rgba(242, 197, 107, 0.16);

  --bg-deep:            var(--ds-ground);
  --accent-rose:        #fdd4c9;
  --accent-purple:      var(--ds-ftm);
  --accent-periwinkle:  #b59be8;
  --accent-gold:        #ebd09b;
  --accent-blue:        var(--ds-ba);
  --accent-teal:        var(--ds-chaotic);
  --glass-bg:           var(--ds-surface);
  --glass-border:       var(--ds-border);
  --text-primary:       var(--ds-ink);
  --text-secondary:     var(--ds-ink-2);
  --text-muted:         var(--ds-ink-muted);
  --shadow-glass:       0 14px 36px rgba(6, 5, 18, 0.45);
}

/* ============================================================================
   Base Document & Hallmark Layout Floor
   ============================================================================ */

html[data-ui="refresh"] {
  overflow-x: clip;
}

html[data-ui="refresh"] body {
  font-family: var(--ds-sans);
  background: var(--ds-ground);
  color: var(--ds-ink);
  overflow-x: clip;
  line-height: 1.65;
  font-size: 15.5px;
  -webkit-font-smoothing: antialiased;
}

html[data-ui="refresh"] .bg-nebula {
  display: none !important;
}

html[data-ui="refresh"] #stars-canvas {
  opacity: 0.35;
  z-index: 1;
}

html[data-ui="refresh"][data-theme="light"] #stars-canvas,
html[data-ui="refresh"][data-theme="light-lite"] #stars-canvas {
  opacity: 0.18;
}

html[data-ui="refresh"][data-theme$="-lite"] #stars-canvas {
  display: none !important;
}

html[data-ui="refresh"] .site-wrapper {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html[data-ui="refresh"] .main-content {
  flex: 1;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Accessible focus outlines */
html[data-ui="refresh"] :focus-visible {
  outline: 2.5px solid var(--ds-moon);
  outline-offset: 2px;
}

/* ============================================================================
   Floating Twilight Header (Transparent over Sky, Frosted on Scroll)
   ============================================================================ */

html[data-ui="refresh"][data-theme] .site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: rgba(24, 20, 54, 0.16) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(253, 212, 201, 0.12) !important;
  box-shadow: none !important;
  transition: background-color 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

html[data-ui="refresh"][data-theme] body.ds-scrolled .site-header {
  background: rgba(24, 20, 54, 0.92) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom-color: rgba(253, 212, 201, 0.22) !important;
  box-shadow: 0 8px 30px rgba(14, 11, 34, 0.34) !important;
}

html[data-ui="refresh"][data-theme$="-lite"] .site-header,
html[data-ui="refresh"][data-theme$="-lite"] body.ds-scrolled .site-header {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(24, 20, 54, 0.96) !important;
}

html[data-ui="refresh"] .header-inner {
  max-width: 1560px;
  margin: 0 auto;
  padding: 0.72rem 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

html[data-ui="refresh"] .header-logo {
  height: 42px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(253, 212, 201, 0.45));
}

html[data-ui="refresh"] .header-site-name {
  font-family: var(--ds-serif) !important;
  font-size: 1.32rem !important;
  font-weight: 500 !important;
  background: none !important;
  -webkit-text-fill-color: #ffffff !important;
  color: #ffffff !important;
  letter-spacing: 0.01em !important;
  filter: none !important;
  text-shadow: 0 2px 12px rgba(18, 14, 42, 0.4);
  transition: opacity 0.28s ease, max-width 0.32s ease, margin 0.28s ease;
  display: inline-block;
  max-width: 260px;
  overflow: hidden;
  vertical-align: middle;
}

/* Avoid repeating "A Late Night Reborn" directly above the Home hero on initial load */
html[data-ui="refresh"] body.ds-page-home:not(.ds-scrolled) .header-site-name {
  opacity: 0 !important;
  max-width: 0 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

html[data-ui="refresh"] body.ds-page-home:not(.ds-scrolled) .ds-header-nav {
  margin-left: 0.85rem;
}

/* Desktop primary links injected by dreamscape.js */
html[data-ui="refresh"] .ds-header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 1.75rem;
}

html[data-ui="refresh"] .ds-header-link {
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(240, 232, 255, 0.84);
  transition: color 0.2s ease, background-color 0.2s ease;
}

html[data-ui="refresh"] .ds-header-link:hover {
  color: #ffffff;
  background: rgba(253, 212, 201, 0.14);
}

html[data-ui="refresh"] .ds-header-link.is-active {
  color: var(--ds-moon);
  background: rgba(253, 212, 201, 0.18);
}

/* Unified header controls (always crisp white-on-twilight) */
html[data-ui="refresh"] .site-header .header-discord {
  margin-left: auto;
  height: 36px;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: rgba(253, 212, 201, 0.20) !important;
  border: 1.5px solid rgba(253, 212, 201, 0.48) !important;
  color: #ffffff !important;
  font-family: var(--ds-sans);
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

html[data-ui="refresh"] .site-header .header-discord:hover {
  background: rgba(253, 212, 201, 0.32) !important;
  border-color: var(--ds-moon) !important;
  transform: translateY(-1px);
}

html[data-ui="refresh"] .site-header .theme-toggle,
html[data-ui="refresh"] .site-header .header-avatar-btn {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.10) !important;
  border: 1.5px solid rgba(253, 212, 201, 0.34) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html[data-ui="refresh"] .site-header .theme-toggle:hover,
html[data-ui="refresh"] .site-header .header-avatar-btn:hover {
  background: rgba(253, 212, 201, 0.24) !important;
  border-color: var(--ds-moon) !important;
}

html[data-ui="refresh"] .site-header .nav-toggle {
  width: 36px !important;
  height: 36px !important;
  border: none !important;
  background: transparent !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

html[data-ui="refresh"] .site-header .nav-toggle:hover {
  background: rgba(253, 212, 201, 0.16) !important;
  border-radius: 50%;
}

/* Light Mode Adaptive Sky-to-Paper Header (Option 1: Warm Cloud-Paper Bar Past Sky) */
html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header {
  background: rgba(253, 246, 239, 0.93) !important;
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
  border-bottom-color: var(--ds-border) !important;
  box-shadow: 0 8px 26px rgba(42, 31, 74, 0.08) !important;
}

html[data-ui="refresh"][data-theme="light-lite"] body.ds-past-sky .site-header {
  background: #fdf6ef !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .header-logo {
  filter: drop-shadow(0 2px 8px rgba(38, 30, 61, 0.14));
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .header-site-name {
  color: var(--ds-ink) !important;
  -webkit-text-fill-color: var(--ds-ink) !important;
  text-shadow: none !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .ds-header-link {
  color: var(--ds-ink-2) !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .ds-header-link:hover {
  color: var(--ds-ink) !important;
  background: rgba(38, 30, 61, 0.07) !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .ds-header-link.is-active {
  color: #5b35a8 !important;
  background: rgba(129, 82, 220, 0.12) !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .header-discord {
  background: #261e3d !important;
  border-color: #261e3d !important;
  color: var(--ds-moon) !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .header-discord:hover {
  background: #352a56 !important;
  border-color: #352a56 !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .theme-toggle,
html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .header-avatar-btn {
  background: var(--ds-surface-soft) !important;
  border-color: var(--ds-border-strong) !important;
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .theme-toggle:hover,
html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .header-avatar-btn:hover {
  background: var(--ds-surface) !important;
  border-color: var(--ds-ink-muted) !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .nav-toggle {
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .nav-toggle:hover {
  background: rgba(38, 30, 61, 0.07) !important;
}

/* Header dropdown popovers (Theme & Profile) - high specificity across all 4 theme modes */
html[data-ui="refresh"][data-theme] .theme-dropdown-menu,
html[data-ui="refresh"][data-theme] .header-popover {
  background: #211b40 !important;
  border: 1.5px solid rgba(253, 212, 201, 0.28) !important;
  border-radius: 18px !important;
  box-shadow: 0 20px 50px rgba(10, 7, 26, 0.58) !important;
  color: #f8f2fa !important;
}

html[data-ui="refresh"][data-theme] .popover-theme-btn {
  color: #e4dcf7 !important;
  border: 1.5px solid rgba(253, 212, 201, 0.20) !important;
  background: rgba(255, 255, 255, 0.07) !important;
  font-family: var(--ds-sans) !important;
  font-weight: 700 !important;
}

html[data-ui="refresh"][data-theme] .popover-theme-btn:hover {
  background: rgba(253, 212, 201, 0.16) !important;
  color: #ffffff !important;
}

html[data-ui="refresh"][data-theme] .popover-theme-btn.active {
  background: var(--ds-moon) !important;
  color: #211b40 !important;
  border-color: var(--ds-moon) !important;
}

html[data-ui="refresh"][data-theme] .popover-perf-row {
  color: #f3ecff !important;
  background: rgba(255, 255, 255, 0.07) !important;
  border: 1.5px solid rgba(253, 212, 201, 0.16) !important;
  font-family: var(--ds-sans) !important;
  font-weight: 700 !important;
}

html[data-ui="refresh"][data-theme] .popover-perf-row:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

html[data-ui="refresh"][data-theme] .popover-perf-label {
  color: #f3ecff !important;
}

html[data-ui="refresh"][data-theme] .popover-perf-row .popover-switch {
  background: rgba(255, 255, 255, 0.20) !important;
}

html[data-ui="refresh"][data-theme] .popover-perf-row.active .popover-switch {
  background: #23a86b !important;
}

html[data-ui="refresh"][data-theme] .header-avatar-dot {
  border-color: #0a0b1c !important;
}

html[data-ui="refresh"][data-theme] .header-popover .popover-user-head {
  background: rgba(255, 255, 255, 0.03) !important;
  border-bottom-color: rgba(253, 212, 201, 0.14) !important;
}

html[data-ui="refresh"][data-theme] .header-popover .popover-user-name,
html[data-ui="refresh"][data-theme] .header-popover .popover-user-name-row,
html[data-ui="refresh"][data-theme] .header-popover .popover-item {
  color: #f8f2fa !important;
}

html[data-ui="refresh"][data-theme] .header-popover .popover-user-sub,
html[data-ui="refresh"][data-theme] .header-popover .popover-user-char {
  color: #d6cceb !important;
}

html[data-ui="refresh"][data-theme] .header-popover .popover-user-handle {
  color: #a89bc7 !important;
}

html[data-ui="refresh"][data-theme] .header-popover .popover-status-pill.verified {
  background: rgba(46, 204, 113, 0.16) !important;
  border-color: rgba(46, 204, 113, 0.42) !important;
  color: #5eeea0 !important;
}

html[data-ui="refresh"][data-theme] .header-popover .popover-status-pill.unverified {
  background: rgba(245, 158, 11, 0.16) !important;
  border-color: rgba(245, 158, 11, 0.42) !important;
  color: #fcd34d !important;
}

html[data-ui="refresh"][data-theme] .header-popover .popover-divider {
  background: rgba(253, 212, 201, 0.12) !important;
}

html[data-ui="refresh"][data-theme] .header-popover .popover-item:hover {
  background: rgba(253, 212, 201, 0.14) !important;
}

/* ============================================================================
   1. HOME PAGE - LIVING ILLUSTRATED TWILIGHT WORLD + CLOUD LAND
   ============================================================================ */

html[data-ui="refresh"] .ds-home-sky {
  position: relative;
  min-height: 495px;
  padding-top: 86px;
  padding-bottom: 120px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: linear-gradient(
    180deg,
    #181436 0%,
    #362865 48%,
    #885e99 79%,
    #f1b8b0 100%
  );
}

html[data-ui="refresh"][data-theme="dark"] .ds-home-sky,
html[data-ui="refresh"][data-theme="dark-lite"] .ds-home-sky {
  background: linear-gradient(
    180deg,
    #0e0b21 0%,
    #241b4a 52%,
    #523874 84%,
    #8d5b7a 100%
  );
}

html[data-ui="refresh"] .ds-sky-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

html[data-ui="refresh"] .ds-sky-art svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Gentle breathing animations for moon and stars (disabled in Lite / reduced motion) */
@keyframes dsMoonFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

@keyframes dsStarTwinkle {
  0%, 100% { opacity: 0.95; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.84); }
}

@keyframes dsCloudDrift {
  0%, 100% { transform: translateX(0px); }
  50% { transform: translateX(18px); }
}

@keyframes dsOrbFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-9px); }
}

html[data-ui="refresh"] .ds-anim-moon {
  transform-box: fill-box;
  transform-origin: center;
  animation: dsMoonFloat 7s ease-in-out infinite;
}

html[data-ui="refresh"] .ds-anim-star {
  transform-box: fill-box;
  transform-origin: center;
  animation: dsStarTwinkle 4.2s ease-in-out infinite;
}

html[data-ui="refresh"] .ds-anim-star-2 {
  transform-box: fill-box;
  transform-origin: center;
  animation: dsStarTwinkle 5.6s ease-in-out 1.4s infinite;
}

html[data-ui="refresh"] .ds-anim-cloud-slow {
  animation: dsCloudDrift 16s ease-in-out infinite;
}

html[data-ui="refresh"] .ds-anim-orb-1 {
  transform-box: fill-box;
  transform-origin: center;
  animation: dsOrbFloat 5.5s ease-in-out infinite;
}

html[data-ui="refresh"] .ds-anim-orb-2 {
  transform-box: fill-box;
  transform-origin: center;
  animation: dsOrbFloat 6.6s ease-in-out 1.2s infinite;
}

html[data-ui="refresh"] .ds-anim-orb-3 {
  transform-box: fill-box;
  transform-origin: center;
  animation: dsOrbFloat 5.9s ease-in-out 2.3s infinite;
}

html[data-ui="refresh"][data-theme$="-lite"] .ds-anim-moon,
html[data-ui="refresh"][data-theme$="-lite"] .ds-anim-star,
html[data-ui="refresh"][data-theme$="-lite"] .ds-anim-star-2,
html[data-ui="refresh"][data-theme$="-lite"] .ds-anim-cloud-slow,
html[data-ui="refresh"][data-theme$="-lite"] .ds-anim-orb-1,
html[data-ui="refresh"][data-theme$="-lite"] .ds-anim-orb-2,
html[data-ui="refresh"][data-theme$="-lite"] .ds-anim-orb-3 {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui="refresh"] .ds-anim-moon,
html[data-ui="refresh"] .ds-anim-star,
html[data-ui="refresh"] .ds-anim-star-2,
html[data-ui="refresh"] .ds-anim-cloud-slow,
html[data-ui="refresh"] .ds-anim-orb-1,
html[data-ui="refresh"] .ds-anim-orb-2,
html[data-ui="refresh"] .ds-anim-orb-3 {
    animation: none !important;
  }
}

/* Home Hero Copy seated cleanly on the left over the sky */
html[data-ui="refresh"] .ds-home-sky .hero {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto !important;
  padding: 2.2rem 2rem 1.5rem !important;
  text-align: left !important;
}

html[data-ui="refresh"] .ds-home-sky .hero-heading {
  font-family: var(--ds-display) !important;
  font-size: clamp(2.55rem, 4.7vw, 3.85rem) !important;
  font-weight: 600 !important;
  line-height: 1.12 !important;
  letter-spacing: -0.005em !important;
  background: none !important;
  -webkit-text-fill-color: #ffffff !important;
  color: #ffffff !important;
  text-shadow: 0 6px 32px rgba(20, 15, 48, 0.42) !important;
  max-width: 720px;
  margin: 0 0 1rem !important;
  filter: none !important;
}

html[data-ui="refresh"] .ds-home-sky .hero-sub {
  font-family: var(--ds-sans) !important;
  font-size: 1.12rem !important;
  line-height: 1.62 !important;
  color: rgba(251, 244, 255, 0.92) !important;
  max-width: 540px !important;
  margin: 0 !important;
  text-shadow: 0 2px 14px rgba(20, 15, 48, 0.38);
}

html[data-ui="refresh"] .ds-home-sky .hero-actions {
  margin-top: 1.7rem !important;
  justify-content: flex-start !important;
  gap: 0.9rem;
}

html[data-ui="refresh"] .ds-home-sky .hero-cta-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.65rem !important;
  border-radius: 999px !important;
  background: #fdf6ef !important;
  color: #261e3d !important;
  border: 1.5px solid rgba(255, 255, 255, 0.75) !important;
  font-family: var(--ds-sans) !important;
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  box-shadow: 0 12px 32px rgba(22, 16, 52, 0.34) !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease !important;
}

html[data-ui="refresh"] .ds-home-sky .hero-cta-btn:hover {
  transform: translateY(-2px);
  background: #ffffff !important;
  box-shadow: 0 16px 38px rgba(22, 16, 52, 0.42) !important;
}

html[data-ui="refresh"] .ds-home-sky .hero-cta-btn .material-symbols-outlined {
  color: var(--ds-ftb);
  font-size: 1.2rem;
}

/* Home Cloud-Land (Warm Storybook Ground Below the Rolling Clouds) */
html[data-ui="refresh"] .ds-cloud-land {
  position: relative;
  z-index: 5;
  background: var(--ds-ground);
  padding: 0.8rem 2rem 4.5rem;
}

html[data-ui="refresh"] .ds-cloud-land .home-workspace-grid {
  max-width: 1560px;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 2rem !important;
}

html[data-ui="refresh"] .ds-cloud-land .home-sidebar {
  position: relative !important;
  top: auto !important;
  width: 100% !important;
  max-height: none !important;
  padding-right: 0 !important;
  overflow: visible !important;
}

/* Refresh [Beta] hides the legacy tab strip & uses the 2-stage Raid Hub -> Dropdown flow */
html[data-ui="refresh"] .ds-cloud-land .raid-tab-bar.ds-editorial-tabs,
html[data-ui="refresh"] .ds-cloud-land .home-sidebar-heading {
  display: none !important;
}

html[data-ui="refresh"] body.ds-home-raid-picker .ds-cloud-land .home-main-col,
html[data-ui="refresh"] body.ds-home-raid-picker .ds-raid-switcher-bar {
  display: none !important;
}

html[data-ui="refresh"] body.ds-home-raid-selected .ds-raid-hub {
  display: none !important;
}

/* Stage 1: Initial Raid Selector Hub */
html[data-ui="refresh"] .ds-raid-hub {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

html[data-ui="refresh"] .ds-raid-hub-group {
  display: flex;
  flex-direction: column;
}

html[data-ui="refresh"] .ds-raid-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

html[data-ui="refresh"] .ds-raid-hub-wip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

html[data-ui="refresh"] .ds-raid-hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  width: 100%;
  background: var(--ds-surface);
  border: 1.5px solid var(--ds-border);
  border-radius: 18px;
  padding: 1.15rem 3.4rem 1.2rem 1.35rem;
  box-shadow: var(--shadow-glass);
  cursor: pointer;
  color: var(--ds-ink);
  font-family: var(--ds-sans);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, box-shadow 0.22s ease;
}

html[data-ui="refresh"] .ds-raid-hub-card:hover:not(.is-locked) {
  transform: translateY(-3px);
  border-color: var(--ds-border-strong);
  box-shadow: 0 14px 30px rgba(42, 31, 74, 0.12);
}

html[data-ui="refresh"][data-theme^="dark"] .ds-raid-hub-card:hover:not(.is-locked) {
  box-shadow: 0 14px 32px rgba(5, 4, 18, 0.56);
}

html[data-ui="refresh"] .ds-raid-hub-card[data-raid="ftb"]:hover {
  border-color: var(--ds-ftb-border);
}

html[data-ui="refresh"] .ds-raid-hub-card[data-raid="ftm"]:hover {
  border-color: var(--ds-ftm-border);
}

html[data-ui="refresh"] .ds-raid-hub-card[data-raid="cod"]:hover {
  border-color: var(--ds-chaotic-border);
}

html[data-ui="refresh"] .ds-raid-hub-card[data-raid="ba"]:hover {
  border-color: var(--ds-ba-border);
}

html[data-ui="refresh"] .ds-raid-hub-card:active:not(.is-locked) {
  transform: scale(0.985);
}

html[data-ui="refresh"] .ds-raid-hub-card.is-locked {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  opacity: 0.62;
  cursor: not-allowed;
}

html[data-ui="refresh"] .ds-raid-hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

html[data-ui="refresh"] .ds-raid-hub-card[data-raid="ftb"] .ds-raid-hub-badge {
  background: var(--ds-ftb-soft);
  color: var(--ds-ftb);
}

html[data-ui="refresh"] .ds-raid-hub-card[data-raid="ftm"] .ds-raid-hub-badge {
  background: var(--ds-ftm-soft);
  color: var(--ds-ftm);
}

html[data-ui="refresh"] .ds-raid-hub-card[data-raid="cod"] .ds-raid-hub-badge {
  background: var(--ds-chaotic-soft);
  color: var(--ds-chaotic);
}

html[data-ui="refresh"] .ds-raid-hub-card[data-raid="ba"] .ds-raid-hub-badge {
  background: var(--ds-ba-soft);
  color: var(--ds-ba);
}

html[data-ui="refresh"] .ds-raid-hub-title {
  font-family: var(--ds-display);
  font-size: 1.26rem;
  font-weight: 600;
  line-height: 1.24;
  color: var(--ds-ink);
}

html[data-ui="refresh"] .ds-raid-hub-cta {
  position: absolute;
  top: 50%;
  right: 1.2rem;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ds-surface-soft);
  color: var(--ds-ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.94rem;
  font-weight: 800;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

html[data-ui="refresh"] .ds-raid-hub-card:hover:not(.is-locked) .ds-raid-hub-cta {
  transform: translate(4px, -50%);
  background: var(--ds-ink);
  color: var(--ds-ground);
}

html[data-ui="refresh"] .ds-raid-hub-wip-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

html[data-ui="refresh"] .ds-raid-hub-wip-title {
  font-family: var(--ds-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ds-ink);
}

html[data-ui="refresh"] .ds-raid-hub-wip-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 0.16rem 0.58rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  flex-shrink: 0;
}

html[data-ui="refresh"] .ds-raid-hub-wip-pill .material-symbols-outlined {
  font-size: 0.82rem;
}

html[data-ui="refresh"] .ds-raid-hub-card[data-raid="ba"] .ds-raid-hub-wip-pill,
html[data-ui="refresh"] .ds-raid-dropdown-option[data-raid="ba"] .ds-raid-hub-wip-pill {
  background: var(--ds-ba-soft);
  color: var(--ds-ba);
}

html[data-ui="refresh"] .ds-raid-hub-card[data-raid="drs"] .ds-raid-hub-wip-pill,
html[data-ui="refresh"] .ds-raid-dropdown-option[data-raid="drs"] .ds-raid-hub-wip-pill {
  background: var(--ds-drs-soft);
  color: var(--ds-drs);
}

/* Stage 2: Selected Raid Dropdown Switcher Bar */
html[data-ui="refresh"] .ds-raid-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  padding-bottom: 1.15rem;
  border-bottom: 1.5px solid var(--ds-border);
}

html[data-ui="refresh"] .ds-raid-dropdown {
  position: relative;
  width: min(100%, 400px);
}

html[data-ui="refresh"] .ds-raid-dropdown-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.7rem 1rem 0.7rem 1.05rem;
  background: var(--ds-surface);
  border: 1.5px solid var(--ds-border-strong);
  border-radius: 14px;
  color: var(--ds-ink);
  font-family: var(--ds-sans);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-glass);
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

html[data-ui="refresh"] .ds-raid-dropdown-trigger:hover,
html[data-ui="refresh"] .ds-raid-dropdown.is-open .ds-raid-dropdown-trigger {
  background: var(--ds-surface-soft);
}

html[data-ui="refresh"] .ds-raid-dropdown[data-active-raid="ftb"] .ds-raid-dropdown-trigger {
  border-color: var(--ds-ftb-border);
}

html[data-ui="refresh"] .ds-raid-dropdown[data-active-raid="ftm"] .ds-raid-dropdown-trigger {
  border-color: var(--ds-ftm-border);
}

html[data-ui="refresh"] .ds-raid-dropdown[data-active-raid="cod"] .ds-raid-dropdown-trigger {
  border-color: var(--ds-chaotic-border);
}

html[data-ui="refresh"] .ds-raid-dropdown[data-active-raid="ba"] .ds-raid-dropdown-trigger {
  border-color: var(--ds-ba-border);
}

html[data-ui="refresh"] .ds-raid-dropdown-trigger-left {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

html[data-ui="refresh"] .ds-raid-dropdown-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-ui="refresh"] .ds-raid-dropdown-chev {
  font-size: 1.25rem;
  color: var(--ds-ink-muted);
  flex-shrink: 0;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-ui="refresh"] .ds-raid-dropdown.is-open .ds-raid-dropdown-chev {
  transform: rotate(180deg);
}

html[data-ui="refresh"] .ds-raid-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 45;
  background: var(--ds-surface);
  border: 1.5px solid var(--ds-border-strong);
  border-radius: 16px;
  padding: 0.45rem;
  box-shadow: 0 18px 44px rgba(14, 10, 34, 0.24);
  display: none;
  flex-direction: column;
  gap: 0.2rem;
}

html[data-ui="refresh"][data-theme^="dark"] .ds-raid-dropdown-menu {
  background: #1d173b;
  box-shadow: 0 20px 48px rgba(4, 3, 16, 0.68);
}

html[data-ui="refresh"] .ds-raid-dropdown.is-open .ds-raid-dropdown-menu {
  display: flex;
  animation: dsPanelFade 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
}

html[data-ui="refresh"] .ds-raid-dropdown-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--ds-ink-2);
  font-family: var(--ds-sans);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

html[data-ui="refresh"] .ds-raid-dropdown-option:hover:not(.is-locked) {
  background: var(--ds-surface-soft);
  color: var(--ds-ink);
}

html[data-ui="refresh"] .ds-raid-dropdown-option.is-active {
  color: var(--ds-ink);
  font-weight: 800;
}

html[data-ui="refresh"] .ds-raid-dropdown-option.is-active[data-raid="ftb"] {
  background: var(--ds-ftb-soft);
}

html[data-ui="refresh"] .ds-raid-dropdown-option.is-active[data-raid="ftm"] {
  background: var(--ds-ftm-soft);
}

html[data-ui="refresh"] .ds-raid-dropdown-option.is-active[data-raid="cod"] {
  background: var(--ds-chaotic-soft);
}

html[data-ui="refresh"] .ds-raid-dropdown-option.is-active[data-raid="ba"] {
  background: var(--ds-ba-soft);
}

html[data-ui="refresh"] .ds-raid-dropdown-option.is-locked {
  opacity: 0.56;
  cursor: not-allowed;
}

html[data-ui="refresh"] .ds-raid-dropdown-opt-left {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

html[data-ui="refresh"] .ds-raid-dropdown-check {
  font-size: 1.05rem;
  color: var(--ds-ink);
  opacity: 0;
  flex-shrink: 0;
}

html[data-ui="refresh"] .ds-raid-dropdown-option.is-active .ds-raid-dropdown-check {
  opacity: 1;
}

html[data-ui="refresh"] .ds-raid-dropdown-sep {
  height: 1px;
  background: var(--ds-border);
  margin: 0.28rem 0.5rem;
}

html[data-ui="refresh"] .ds-raid-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.95rem;
  border-radius: 12px;
  background: transparent;
  border: 1.5px solid var(--ds-border);
  color: var(--ds-ink-2);
  font-family: var(--ds-sans);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

html[data-ui="refresh"] .ds-raid-back-btn:hover {
  background: var(--ds-surface);
  border-color: var(--ds-border-strong);
  color: var(--ds-ink);
}

html[data-ui="refresh"] .ds-raid-back-btn .material-symbols-outlined {
  font-size: 1.05rem;
}

html[data-ui="refresh"] .ds-raid-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

html[data-ui="refresh"] .ds-raid-dot.ftb { background: var(--ds-ftb); }
html[data-ui="refresh"] .ds-raid-dot.ftm { background: var(--ds-ftm); }
html[data-ui="refresh"] .ds-raid-dot.cod { background: var(--ds-chaotic); }
html[data-ui="refresh"] .ds-raid-dot.ba { background: var(--ds-ba); }
html[data-ui="refresh"] .ds-raid-dot.drs { background: var(--ds-drs); }

html[data-ui="refresh"] .ds-cloud-land .ds-editorial-tabs .tab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: none !important;
}

html[data-ui="refresh"] .ds-cloud-land .ds-editorial-tabs .tab-dot.blood { background: var(--ds-ftb) !important; }
html[data-ui="refresh"] .ds-cloud-land .ds-editorial-tabs .tab-dot.magic { background: var(--ds-ftm) !important; }
html[data-ui="refresh"] .ds-cloud-land .ds-editorial-tabs .tab-dot.chaotic { background: var(--ds-chaotic) !important; }
html[data-ui="refresh"] .ds-cloud-land .ds-editorial-tabs .tab-dot.ba { background: var(--ds-ba) !important; }
html[data-ui="refresh"] .ds-cloud-land .ds-editorial-tabs .tab-dot.drs { background: var(--ds-drs) !important; }

html[data-ui="refresh"] .ds-cloud-land .ds-editorial-tabs .tab-wip-tag {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

html[data-ui="refresh"] .ds-cloud-land .ds-editorial-tabs .raid-tab[data-raid="ba"] .tab-wip-tag {
  background: var(--ds-ba-soft);
  color: var(--ds-ba);
}

html[data-ui="refresh"] .ds-cloud-land .ds-editorial-tabs .raid-tab[data-raid="drs"] .tab-wip-tag {
  background: var(--ds-drs-soft);
  color: var(--ds-drs);
}

html[data-ui="refresh"] .ds-cloud-land .ds-editorial-tabs .tab-wip-tag .material-symbols-outlined {
  font-size: 0.78rem !important;
}

html[data-ui="refresh"] .ds-cloud-land .sections-label {
  font-family: var(--ds-sans) !important;
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ds-ink-muted) !important;
  margin-bottom: 1.05rem !important;
}

html[data-ui="refresh"] .ds-cloud-land .section-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 1rem !important;
}

html[data-ui="refresh"] .ds-cloud-land .section-card:last-child:nth-child(3n - 2) {
  grid-column: auto !important;
}

html[data-ui="refresh"] .ds-cloud-land .section-card {
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  background: var(--ds-surface) !important;
  border: 1.5px solid var(--ds-border) !important;
  border-radius: 17px !important;
  padding: 1.05rem 1.2rem 1.15rem !important;
  box-shadow: var(--shadow-glass) !important;
  backdrop-filter: none !important;
  transition: transform 0.22s cubic-bezier(.22,1,.36,1), border-color 0.22s ease, box-shadow 0.22s ease !important;
  overflow: hidden;
  min-height: 0 !important;
}

html[data-ui="refresh"] .ds-cloud-land .section-card::before {
  display: none !important;
}

html[data-ui="refresh"] .ds-cloud-land .section-card:hover {
  transform: translateY(-3px) !important;
  border-color: var(--ds-border-strong) !important;
  box-shadow: 0 14px 30px rgba(42, 31, 74, 0.11) !important;
}

html[data-ui="refresh"][data-theme="dark"] .ds-cloud-land .section-card:hover,
html[data-ui="refresh"][data-theme="dark-lite"] .ds-cloud-land .section-card:hover {
  border-color: rgba(253, 212, 201, 0.42) !important;
  box-shadow: 0 14px 32px rgba(5, 4, 18, 0.56) !important;
}

html[data-ui="refresh"] .ds-cloud-land .card-title {
  font-family: var(--ds-serif) !important;
  font-size: 1.2rem !important;
  font-weight: 600 !important;
  line-height: 1.22 !important;
  color: var(--ds-ink) !important;
  margin-top: 0.5rem !important;
  margin-bottom: 0.35rem !important;
  padding-right: 1.8rem;
}

html[data-ui="refresh"] .ds-cloud-land .card-desc {
  font-family: var(--ds-sans) !important;
  font-size: 0.87rem !important;
  line-height: 1.48 !important;
  color: var(--ds-ink-2) !important;
  flex: 1;
}

html[data-ui="refresh"] .ds-cloud-land .card-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.25rem 0.78rem !important;
  border-radius: 999px !important;
  font-size: 0.75rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase;
  border: none !important;
}

html[data-ui="refresh"] .ds-cloud-land .card-badge.boss {
  background: var(--ds-ftb-soft) !important;
  color: var(--ds-ftb) !important;
}

html[data-ui="refresh"] #ftm-content .card-badge.boss,
html[data-ui="refresh"] #ftm-content .card-badge.mini-boss {
  background: var(--ds-ftm-soft) !important;
  color: var(--ds-ftm) !important;
}

html[data-ui="refresh"] #cod-content .card-badge.boss {
  background: var(--ds-chaotic-soft) !important;
  color: var(--ds-chaotic) !important;
}

html[data-ui="refresh"] #cod-content .section-card.is-boss .card-title {
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"] #cod-content .section-card:hover {
  border-color: var(--ds-chaotic-border) !important;
}

html[data-ui="refresh"] #ba-content .card-badge.boss {
  background: var(--ds-ba-soft) !important;
  color: var(--ds-ba) !important;
}

html[data-ui="refresh"] #ba-content .section-card.is-boss .card-title {
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"] #ba-content .section-card:hover {
  border-color: var(--ds-ba-border) !important;
}

html[data-ui="refresh"] .ds-cloud-land .card-badge.traversal {
  background: var(--ds-chaotic-soft) !important;
  color: var(--ds-chaotic) !important;
}

html[data-ui="refresh"] .ds-cloud-land .card-badge.puzzle {
  background: var(--ds-ba-soft) !important;
  color: var(--ds-ba) !important;
}

html[data-ui="refresh"] .ds-cloud-land .card-badge.additional {
  background: var(--ds-drs-soft) !important;
  color: var(--ds-drs) !important;
}

html[data-ui="refresh"] .ds-cloud-land .card-cta {
  position: absolute !important;
  top: 0.95rem !important;
  right: 1.05rem !important;
  bottom: auto !important;
  margin-top: 0 !important;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ds-surface-soft);
  color: var(--ds-ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 800;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

html[data-ui="refresh"] .ds-cloud-land .section-card:hover .card-cta {
  transform: translateX(3px);
  background: var(--ds-ink);
  color: var(--ds-ground);
}

/* ============================================================================
   2. BOSS GUIDES - ILLUSTRATED NIGHT SKY BANNER + DREAMY STUDY PAGE
   ============================================================================ */

html[data-ui="refresh"] .ds-guide-sky {
  position: relative;
  min-height: 320px;
  padding: 96px 0 118px;
  overflow: hidden;
  background: linear-gradient(180deg, #161333 0%, #31255f 62%, #684b8e 100%);
}

html[data-ui="refresh"][data-theme="dark"] .ds-guide-sky,
html[data-ui="refresh"][data-theme="dark-lite"] .ds-guide-sky {
  background: linear-gradient(180deg, #0e0b22 0%, #241b4a 62%, #4a346d 100%);
}

html[data-ui="refresh"] .ds-guide-sky-inner {
  position: relative;
  z-index: 4;
  max-width: 1560px;
  margin: 0 auto;
  padding: 0 2rem;
}

html[data-ui="refresh"] .ds-guide-sky .breadcrumb {
  color: rgba(235, 226, 255, 0.78) !important;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 0.85rem !important;
}

html[data-ui="refresh"] .ds-guide-sky .breadcrumb a {
  color: var(--ds-moon) !important;
}

html[data-ui="refresh"] .ds-guide-sky .page-header {
  margin-bottom: 0 !important;
  max-width: 780px;
}

html[data-ui="refresh"] .ds-guide-sky .page-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.9rem !important;
  border-radius: 999px !important;
  background: rgba(253, 212, 201, 0.18) !important;
  border: 1.5px solid rgba(253, 212, 201, 0.42) !important;
  color: var(--ds-moon) !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

html[data-ui="refresh"] .ds-guide-sky.mood-chaotic .page-badge {
  background: rgba(52, 211, 153, 0.20) !important;
  border-color: rgba(52, 211, 153, 0.50) !important;
  color: #a7f3d0 !important;
}

html[data-ui="refresh"] .ds-guide-sky .page-title,
html[data-ui="refresh"] .ds-guide-sky .boss-title {
  font-family: var(--ds-display) !important;
  font-size: clamp(2.2rem, 4.1vw, 3.2rem) !important;
  font-weight: 600 !important;
  line-height: 1.14 !important;
  background: none !important;
  -webkit-text-fill-color: #ffffff !important;
  color: #ffffff !important;
  text-shadow: 0 4px 24px rgba(15, 11, 38, 0.42) !important;
  margin-bottom: 0.75rem !important;
  filter: none !important;
}

html[data-ui="refresh"] .ds-guide-sky .page-subtitle {
  color: rgba(242, 235, 255, 0.88) !important;
  font-size: 1rem !important;
  line-height: 1.62 !important;
  max-width: 700px !important;
}

/* Guide Study Body seated cleanly on warm cloud paper */
html[data-ui="refresh"] .ds-guide-body-wrap {
  position: relative;
  z-index: 5;
  background: var(--ds-ground);
  padding: 1.25rem 2rem 4.5rem;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-workspace-grid {
  max-width: 1560px;
  margin: 0 auto !important;
  gap: 2.25rem !important;
  align-items: start;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-sidebar {
  top: 86px !important;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-sidebar-card {
  background: var(--ds-surface) !important;
  border: 1.5px solid var(--ds-border) !important;
  border-radius: 20px !important;
  padding: 1.2rem 1.15rem !important;
  box-shadow: var(--shadow-glass) !important;
  backdrop-filter: none !important;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-sidebar-heading {
  font-family: var(--ds-sans) !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase;
  color: var(--ds-ink-muted) !important;
  border-bottom: 1px solid var(--ds-border) !important;
  padding-bottom: 0.65rem;
  margin-bottom: 0.65rem;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-toc-link,
html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link {
  border-radius: 11px !important;
  color: var(--ds-ink-2) !important;
  font-weight: 700 !important;
  font-size: 0.89rem !important;
  transition: background-color 0.18s ease, color 0.18s ease;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-toc-link:hover,
html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link:hover {
  background: var(--ds-surface-soft) !important;
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-toc-link.active,
html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link.active {
  background: #261e3d !important;
  color: var(--ds-moon) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link.active .guide-raid-link-title {
  color: #ffffff !important;
}

/* Crisp readable badges inside dark active sidebar rows in both Light and Dark modes */
html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link.active .guide-raid-badge,
html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link.active .card-badge,
html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link.active .nav-badge {
  background: rgba(253, 212, 201, 0.20) !important;
  border: 1px solid rgba(253, 212, 201, 0.45) !important;
  color: #fdd4c9 !important;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link.active .boss {
  background: rgba(253, 224, 155, 0.22) !important;
  border-color: rgba(253, 224, 155, 0.52) !important;
  color: #fef0c7 !important;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link.active .traversal {
  background: rgba(52, 211, 153, 0.22) !important;
  border-color: rgba(52, 211, 153, 0.52) !important;
  color: #a7f3d0 !important;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link.active .puzzle {
  background: rgba(244, 143, 177, 0.22) !important;
  border-color: rgba(244, 143, 177, 0.52) !important;
  color: #fbcfe8 !important;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-raid-link.active .additional {
  background: rgba(196, 181, 253, 0.22) !important;
  border-color: rgba(196, 181, 253, 0.52) !important;
  color: #e9d5ff !important;
}

html[data-ui="refresh"][data-theme="dark"] .ds-guide-body-wrap .guide-toc-link.active,
html[data-ui="refresh"][data-theme="dark"] .ds-guide-body-wrap .guide-raid-link.active,
html[data-ui="refresh"][data-theme="dark-lite"] .ds-guide-body-wrap .guide-toc-link.active,
html[data-ui="refresh"][data-theme="dark-lite"] .ds-guide-body-wrap .guide-raid-link.active {
  background: rgba(253, 212, 201, 0.18) !important;
  color: var(--ds-moon) !important;
}

/* Guide Content Cards -> Crisp Storybook Study Sheets */
html[data-ui="refresh"] .content-card {
  background: var(--ds-surface) !important;
  border: 1.5px solid var(--ds-border) !important;
  border-radius: 22px !important;
  padding: 1.85rem 2.1rem !important;
  box-shadow: var(--shadow-glass) !important;
  backdrop-filter: none !important;
  margin-bottom: 1.5rem !important;
}

html[data-ui="refresh"] .content-card .card-heading {
  font-family: var(--ds-serif) !important;
  font-size: 1.65rem !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: -0.015em !important;
  color: var(--ds-ink) !important;
  border-bottom: 1.5px solid var(--ds-border) !important;
  padding-bottom: 0.75rem !important;
  margin-bottom: 1.2rem !important;
}

html[data-ui="refresh"] .content-body,
html[data-ui="refresh"] .content-body p,
html[data-ui="refresh"] .content-body li {
  color: var(--ds-ink-2) !important;
  font-size: 0.98rem !important;
  line-height: 1.68 !important;
}

html[data-ui="refresh"] .content-body strong {
  color: var(--ds-ink) !important;
}

/* Storybook Callout Ribbons */
html[data-ui="refresh"] .alert-box {
  border-radius: 16px !important;
  padding: 1rem 1.25rem !important;
  border: 1.5px solid transparent !important;
  font-weight: 600;
  margin: 1rem 0 !important;
}

html[data-ui="refresh"] .alert-box.warning {
  background: #fef2da !important;
  border-color: #f3d79e !important;
  color: #5b3f13 !important;
}

html[data-ui="refresh"] .alert-box.tip {
  background: #e6f3fc !important;
  border-color: #bddcf5 !important;
  color: #194b73 !important;
}

html[data-ui="refresh"] .alert-box.info {
  background: #f1ecfc !important;
  border-color: #d6c8f5 !important;
  color: #3a2768 !important;
}

html[data-ui="refresh"] .alert-box.danger {
  background: #fcebed !important;
  border-color: #f5c2c9 !important;
  color: #7d202d !important;
}

html[data-ui="refresh"] .alert-box strong {
  color: inherit !important;
}

html[data-ui="refresh"][data-theme="dark"] .alert-box.warning,
html[data-ui="refresh"][data-theme="dark-lite"] .alert-box.warning {
  background: rgba(235, 208, 155, 0.12) !important;
  border-color: rgba(235, 208, 155, 0.30) !important;
  color: #f6e2b3 !important;
}

html[data-ui="refresh"][data-theme="dark"] .alert-box.tip,
html[data-ui="refresh"][data-theme="dark-lite"] .alert-box.tip {
  background: rgba(108, 180, 245, 0.12) !important;
  border-color: rgba(108, 180, 245, 0.30) !important;
  color: #c7e5ff !important;
}

html[data-ui="refresh"][data-theme="dark"] .alert-box.info,
html[data-ui="refresh"][data-theme="dark-lite"] .alert-box.info {
  background: rgba(178, 139, 248, 0.13) !important;
  border-color: rgba(178, 139, 248, 0.32) !important;
  color: #e4d6ff !important;
}

html[data-ui="refresh"][data-theme="dark"] .alert-box.danger,
html[data-ui="refresh"][data-theme="dark-lite"] .alert-box.danger {
  background: rgba(242, 107, 124, 0.14) !important;
  border-color: rgba(242, 107, 124, 0.34) !important;
  color: #ffc5cc !important;
}

/* Dreamscape Constellation Spine Timeline (Clean, Open, Scannable) */
html[data-ui="refresh"] .timeline {
  position: relative;
  border-left: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 0 !important;
}

html[data-ui="refresh"] .timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 14px;
  bottom: 14px;
  width: 2px;
  background: linear-gradient(180deg, var(--ds-border-strong) 0%, var(--ds-border) 100%);
  border-radius: 999px;
}

html[data-ui="refresh"] .tl-row {
  position: relative;
  display: flex !important;
  align-items: center;
  gap: 0.9rem;
  background: transparent !important;
  border: none !important;
  border-bottom: 1px solid var(--ds-border) !important;
  border-radius: 0 !important;
  padding: 0.62rem 0.6rem 0.62rem 0 !important;
  margin-bottom: 0 !important;
  transition: background-color 0.16s ease;
}

html[data-ui="refresh"] .tl-row:last-child {
  border-bottom: none !important;
}

html[data-ui="refresh"] .tl-row:not(.sub):hover {
  background: var(--ds-ground) !important;
  border-radius: 10px !important;
}

html[data-ui="refresh"] .tl-row.sub {
  border-bottom: none !important;
  padding: 0.24rem 0.6rem 0.24rem 0 !important;
}

html[data-ui="refresh"] .tl-row.sub + .tl-row:not(.sub) {
  margin-top: 0.35rem !important;
  border-top: 1px solid var(--ds-border) !important;
}

html[data-ui="refresh"] .tl-dot {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  z-index: 2;
  flex-shrink: 0;
  width: 12px !important;
  height: 12px !important;
  margin-left: 6px !important;
  border-radius: 50%;
  border: 2.5px solid var(--ds-surface) !important;
  box-shadow: 0 0 0 1.5px var(--ds-border-strong) !important;
  background: var(--ds-ftm) !important;
}

html[data-ui="refresh"] .tl-row.mechanic .tl-dot { background: var(--ds-ftm) !important; box-shadow: 0 0 0 2px var(--ds-ftm-soft) !important; }
html[data-ui="refresh"] .tl-row.tankbuster .tl-dot { background: var(--ds-drs) !important; box-shadow: 0 0 0 2px var(--ds-drs-soft) !important; }
html[data-ui="refresh"] .tl-row.raidwide .tl-dot { background: var(--ds-ba) !important; box-shadow: 0 0 0 2px var(--ds-ba-soft) !important; }
html[data-ui="refresh"] .tl-row.enrage .tl-dot { background: var(--ds-ftb) !important; box-shadow: 0 0 0 2px var(--ds-ftb-soft) !important; }

html[data-ui="refresh"] .tl-row.sub .tl-dot {
  width: 6px !important;
  height: 6px !important;
  margin-left: 9px !important;
  background: var(--ds-border-strong) !important;
  border: none !important;
  box-shadow: none !important;
}

html[data-ui="refresh"] .tl-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

html[data-ui="refresh"] .tl-text {
  color: var(--ds-ink) !important;
  font-weight: 700;
  font-size: 0.94rem !important;
  line-height: 1.45;
}

html[data-ui="refresh"] .tl-row.sub .tl-text {
  color: var(--ds-ink-2) !important;
  font-weight: 600;
  font-size: 0.87rem !important;
  padding-left: 0.35rem;
}

html[data-ui="refresh"] .tl-badge {
  border-radius: 999px !important;
  font-weight: 800 !important;
  font-size: 0.69rem !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.18rem 0.62rem !important;
  flex-shrink: 0;
}

html[data-ui="refresh"] .tl-badge.mechanic { background: var(--ds-ftm-soft) !important; color: var(--ds-ftm) !important; }
html[data-ui="refresh"] .tl-badge.tankbuster { background: var(--ds-drs-soft) !important; color: var(--ds-drs) !important; }
html[data-ui="refresh"] .tl-badge.raidwide { background: var(--ds-ba-soft) !important; color: var(--ds-ba) !important; }
html[data-ui="refresh"] .tl-badge.enrage { background: var(--ds-ftb-soft) !important; color: var(--ds-ftb) !important; }

/* Section Prev/Next Nav inside Guides */
html[data-ui="refresh"] .section-nav {
  max-width: 1560px;
  margin: 2rem auto 0 !important;
}

html[data-ui="refresh"] .section-nav a {
  background: var(--ds-surface) !important;
  border: 1.5px solid var(--ds-border) !important;
  border-radius: 16px !important;
  color: var(--ds-ink) !important;
  box-shadow: var(--shadow-glass) !important;
}

html[data-ui="refresh"] .section-nav a:hover {
  border-color: var(--ds-border-strong) !important;
  transform: translateY(-2px);
}

/* Elemental Weakness inline readability */
html[data-ui="refresh"] .elemental-weakness {
  padding: 0.75rem 1.1rem;
  border-radius: 12px;
  background: var(--ds-surface-soft);
  border: 1px solid var(--ds-border);
  margin-top: 0.85rem;
  font-size: 0.94rem;
}

html[data-ui="refresh"][data-theme="light"] .element-lightning,
html[data-ui="refresh"][data-theme="light-lite"] .element-lightning { color: #7c3aed !important; font-weight: 800; }
html[data-ui="refresh"][data-theme="light"] .element-ice,
html[data-ui="refresh"][data-theme="light-lite"] .element-ice { color: #0284c7 !important; font-weight: 800; }
html[data-ui="refresh"][data-theme="light"] .element-fire,
html[data-ui="refresh"][data-theme="light-lite"] .element-fire { color: #dc2626 !important; font-weight: 800; }

/* ============================================================================
   Footer & Secondary Pages
   ============================================================================ */

html[data-ui="refresh"] .site-footer {
  background: var(--ds-ground-alt) !important;
  border-top: 1.5px solid var(--ds-border) !important;
  color: var(--ds-ink-muted) !important;
  padding: 1.5rem 2rem !important;
  font-weight: 600;
  text-align: left !important;
}

html[data-ui="refresh"] .site-footer .footer-brand {
  font-family: var(--ds-display) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"] .site-footer .footer-links a {
  color: var(--ds-ink-2) !important;
  font-weight: 700 !important;
}

html[data-ui="refresh"] .site-footer .footer-links a:hover {
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"] .alnr-skel-card {
  background: var(--ds-surface);
  border: 1.5px solid var(--ds-border);
  border-radius: 18px;
}

html[data-ui="refresh"] .alnr-skel-line,
html[data-ui="refresh"] .alnr-skel-block {
  background: var(--ds-surface-soft);
}

html[data-ui="refresh"] .alnr-toast {
  background: var(--ds-surface);
  border: 1.5px solid var(--ds-border-strong);
  border-radius: 14px;
  color: var(--ds-ink);
  font-family: var(--ds-sans);
  box-shadow: 0 16px 40px rgba(14, 10, 34, 0.22);
}

html[data-ui="refresh"][data-theme^="dark"] .alnr-toast {
  background: #1f193d;
  box-shadow: 0 18px 44px rgba(4, 3, 16, 0.65);
}

/* Secondary Sky Banner & Ground (Contact / Privacy / Dashboard) */
html[data-ui="refresh"] body.ds-page-secondary .signups-container {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

html[data-ui="refresh"] .ds-secondary-sky {
  position: relative;
  min-height: 285px;
  padding: 102px 0 82px;
  background: linear-gradient(180deg, #181436 0%, #3d2e6d 65%, #84609c 100%);
  overflow: hidden;
}

html[data-ui="refresh"][data-theme="dark"] .ds-secondary-sky,
html[data-ui="refresh"][data-theme="dark-lite"] .ds-secondary-sky {
  background: linear-gradient(180deg, #0e0b22 0%, #271e4f 65%, #4d3770 100%);
}

html[data-ui="refresh"] .ds-secondary-sky-inner {
  position: relative;
  z-index: 4;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

html[data-ui="refresh"] .ds-secondary-sky .signups-hero {
  margin-bottom: 0 !important;
  text-align: left !important;
}

html[data-ui="refresh"] .ds-secondary-sky h1,
html[data-ui="refresh"] .ds-secondary-sky .signups-title {
  font-family: var(--ds-display) !important;
  font-size: clamp(2.15rem, 3.8vw, 3rem) !important;
  font-weight: 600 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  background: none !important;
  text-shadow: 0 4px 22px rgba(15, 11, 38, 0.45);
  filter: none !important;
  margin-bottom: 0.45rem !important;
}

html[data-ui="refresh"] .ds-secondary-sky p,
html[data-ui="refresh"] .ds-secondary-sky .signups-desc {
  color: rgba(242, 235, 255, 0.90) !important;
  font-size: 1rem !important;
  max-width: 680px;
  margin: 0 !important;
}

html[data-ui="refresh"] .ds-secondary-body-wrap {
  position: relative;
  z-index: 5;
  background: var(--ds-ground);
  padding: 1.35rem 2rem 4.5rem;
}

html[data-ui="refresh"] .ds-secondary-body-inner {
  max-width: 1240px;
  margin: 0 auto;
}

html[data-ui="refresh"] body.ds-page-secondary .glass-card {
  background: var(--ds-surface) !important;
  border: 1.5px solid var(--ds-border) !important;
  border-radius: 22px !important;
  box-shadow: var(--shadow-glass) !important;
  backdrop-filter: none !important;
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"] body.ds-page-secondary .glass-card h2,
html[data-ui="refresh"] body.ds-page-secondary .privacy-section h2 {
  font-family: var(--ds-serif) !important;
  font-weight: 600 !important;
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"] body.ds-page-secondary .auth-banner-unauthed {
  background: var(--ds-surface) !important;
  border: 1.5px solid var(--ds-border) !important;
}

html[data-ui="refresh"] body.ds-page-secondary .privacy-highlight-box {
  background: var(--ds-ground) !important;
  border: 1.5px solid var(--ds-border-strong) !important;
  color: var(--ds-ink-2) !important;
}

html[data-ui="refresh"] body.ds-page-secondary .privacy-section code {
  background: var(--ds-surface-soft);
  border: 1px solid var(--ds-border);
  border-radius: 6px;
  padding: 0.08rem 0.42rem;
  color: var(--ds-ink);
  font-size: 0.86em;
}

html[data-ui="refresh"] body.ds-page-secondary .contact-form .input-text,
html[data-ui="refresh"] body.ds-page-secondary .contact-form .input-textarea {
  background: var(--ds-ground) !important;
  border: 1.5px solid var(--ds-border-strong) !important;
  color: var(--ds-ink) !important;
}

/* Mobile Nav Drawer Harmony - High-Contrast in Both Light & Dark Modes */
html[data-ui="refresh"][data-theme^="light"] .nav-panel,
html[data-ui="refresh"][data-theme^="light"] .nav-drawer {
  background: #fdf6ef !important;
  border-left: 1.5px solid #e4d6c8 !important;
  color: #261e3d !important;
  box-shadow: -12px 0 40px rgba(24, 18, 48, 0.18) !important;
}

html[data-ui="refresh"][data-theme^="light"] .nav-panel-header {
  border-bottom: 1.5px solid #e7dbd0 !important;
}

html[data-ui="refresh"][data-theme^="light"] .nav-panel-title {
  font-family: var(--ds-serif) !important;
  color: #261e3d !important;
}

html[data-ui="refresh"][data-theme^="light"] .nav-panel-close {
  color: #261e3d !important;
  background: #f3e9df !important;
  border-color: #dfcfc0 !important;
}

html[data-ui="refresh"][data-theme^="light"] .nav-panel .nav-home-link,
html[data-ui="refresh"][data-theme^="light"] .nav-panel .nav-page-link,
html[data-ui="refresh"][data-theme^="light"] .nav-panel .nav-sub-link,
html[data-ui="refresh"][data-theme^="light"] .nav-panel a {
  color: #2d2447 !important;
  font-weight: 700 !important;
}

html[data-ui="refresh"][data-theme^="light"] .nav-panel .nav-sub-link {
  color: #5b5078 !important;
  font-weight: 600 !important;
}

html[data-ui="refresh"][data-theme^="light"] .nav-panel .nav-raid-header {
  color: #261e3d !important;
  background: #f5ece2 !important;
  border-color: #e4d6c8 !important;
}

html[data-ui="refresh"][data-theme^="light"] .nav-panel a:hover,
html[data-ui="refresh"][data-theme^="light"] .nav-panel a.nav-current {
  background: #f2e5d9 !important;
  color: #1f1736 !important;
}

html[data-ui="refresh"][data-theme^="dark"] .nav-panel,
html[data-ui="refresh"][data-theme^="dark"] .nav-drawer {
  background: #1b163a !important;
  border-left: 1.5px solid rgba(253, 212, 201, 0.20) !important;
  color: #f8f2fa !important;
}

html[data-ui="refresh"][data-theme^="dark"] .nav-panel-header {
  border-bottom-color: rgba(253, 212, 201, 0.16) !important;
}

html[data-ui="refresh"][data-theme^="dark"] .nav-panel-title {
  font-family: var(--ds-serif) !important;
  color: var(--ds-moon) !important;
}

html[data-ui="refresh"][data-theme^="dark"] .nav-panel a,
html[data-ui="refresh"][data-theme^="dark"] .nav-drawer a {
  color: #e4dcf7 !important;
}

html[data-ui="refresh"][data-theme^="dark"] .nav-panel a:hover,
html[data-ui="refresh"][data-theme^="dark"] .nav-panel a.nav-current,
html[data-ui="refresh"][data-theme^="dark"] .nav-drawer a:hover,
html[data-ui="refresh"][data-theme^="dark"] .nav-drawer a.active {
  background: rgba(253, 212, 201, 0.16) !important;
  color: var(--ds-moon) !important;
}

/* Unified Nav Drawer Section Badges (matches Home page card badges 1-to-1) */
html[data-ui="refresh"] .nav-panel .nav-badge {
  border: none !important;
  border-radius: 999px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  padding: 0.16rem 0.56rem !important;
}

html[data-ui="refresh"] .nav-panel #nav-raid-ftb .nav-badge.boss,
html[data-ui="refresh"] .nav-panel #nav-raid-ftb .nav-badge.mini-boss {
  background: var(--ds-ftb-soft) !important;
  color: var(--ds-ftb) !important;
}

html[data-ui="refresh"] .nav-panel #nav-raid-ftm .nav-badge.boss,
html[data-ui="refresh"] .nav-panel #nav-raid-ftm .nav-badge.mini-boss {
  background: var(--ds-ftm-soft) !important;
  color: var(--ds-ftm) !important;
}

html[data-ui="refresh"] .nav-panel #nav-raid-cod .nav-badge.boss {
  background: var(--ds-chaotic-soft) !important;
  color: var(--ds-chaotic) !important;
}

html[data-ui="refresh"] .nav-panel #nav-raid-ba .nav-badge.boss {
  background: var(--ds-ba-soft) !important;
  color: var(--ds-ba) !important;
}

html[data-ui="refresh"] .nav-panel .nav-badge.traversal {
  background: var(--ds-chaotic-soft) !important;
  color: var(--ds-chaotic) !important;
}

html[data-ui="refresh"] .nav-panel .nav-badge.puzzle {
  background: var(--ds-ba-soft) !important;
  color: var(--ds-ba) !important;
}

html[data-ui="refresh"] .nav-panel .nav-badge.additional {
  background: var(--ds-drs-soft) !important;
  color: var(--ds-drs) !important;
}

/* ============================================================================
   Responsive Polish (1024px Laptop & 390px Mobile)
   ============================================================================ */

@media (max-width: 1439px) {
  html[data-ui="refresh"] .ds-cloud-land .section-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Guide Macro Boxes & Lightbox Polish */
html[data-ui="refresh"][data-theme] .macro-box {
  background: var(--ds-ground) !important;
  border: 1.5px solid var(--ds-border) !important;
  border-radius: 16px !important;
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"][data-theme] .macro-box pre {
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"][data-theme] .macro-copy-btn {
  background: var(--ds-surface-soft) !important;
  border: 1.5px solid var(--ds-border) !important;
  border-radius: 999px !important;
  color: var(--ds-ink-2) !important;
  font-family: var(--ds-sans) !important;
  font-weight: 800 !important;
}

html[data-ui="refresh"][data-theme] .macro-copy-btn:hover {
  border-color: var(--ds-border-strong) !important;
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"][data-theme] .macro-copy-btn.copied {
  background: var(--ds-chaotic-soft) !important;
  border-color: var(--ds-chaotic-border) !important;
  color: var(--ds-chaotic) !important;
}

html[data-ui="refresh"][data-theme] .macro-toolbar {
  background: var(--ds-surface) !important;
  border-bottom: 1.5px solid var(--ds-border) !important;
}

html[data-ui="refresh"][data-theme] .macro-lang-switcher {
  background: var(--ds-ground) !important;
  border: 1px solid var(--ds-border) !important;
  border-radius: 999px !important;
  padding: 0.2rem !important;
}

html[data-ui="refresh"][data-theme] .macro-lang-btn {
  border-radius: 999px !important;
  font-family: var(--ds-sans) !important;
  font-weight: 800 !important;
  color: var(--ds-ink-muted) !important;
}

html[data-ui="refresh"][data-theme] .macro-lang-btn:hover {
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"][data-theme] .macro-lang-btn.active {
  background: var(--ds-ftm-soft) !important;
  border-color: var(--ds-ftm-border) !important;
  color: var(--ds-ink) !important;
}

html[data-ui="refresh"] .lightbox-overlay {
  background: rgba(14, 11, 32, 0.86) !important;
  backdrop-filter: blur(8px) !important;
}

html[data-ui="refresh"] .lightbox-img {
  border-radius: 14px !important;
  box-shadow: 0 24px 64px rgba(6, 4, 18, 0.65) !important;
}

html[data-ui="refresh"] .lightbox-close {
  background: rgba(255, 255, 255, 0.14) !important;
  border: 1.5px solid rgba(253, 212, 201, 0.35) !important;
  border-radius: 999px !important;
  color: #ffffff !important;
}

html[data-ui="refresh"] .lightbox-close:hover {
  background: rgba(253, 212, 201, 0.25) !important;
}

/* ============================================================================
   Motion System & Micro-Interactions (GPU-only, disabled in Performance Mode)
   ============================================================================ */

@keyframes dsCardFadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes dsCardFadeUpLocked {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 0.62;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes dsPanelFade {
  from {
    opacity: 0;
    transform: translate3d(0, 6px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* Home Guide Card Stagger & Arrow Nudge */
html[data-ui="refresh"] .ds-cloud-land .section-card.ds-card-enter,
html[data-ui="refresh"] .ds-cloud-land .ds-raid-hub-card:not(.is-locked).ds-card-enter {
  animation: dsCardFadeUp 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--ds-i, 0) * 26ms);
}

html[data-ui="refresh"] .ds-cloud-land .ds-raid-hub-card.is-locked.ds-card-enter {
  animation: dsCardFadeUpLocked 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--ds-i, 0) * 26ms);
}

html[data-ui="refresh"] .ds-cloud-land .section-card:hover .card-cta {
  transform: translateX(4px);
}

/* Sliding Guide "On This Page" TOC Pill */
html[data-ui="refresh"] .ds-guide-body-wrap .guide-toc-list.ds-has-indicator {
  position: relative;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-toc-list.ds-has-indicator .guide-toc-link {
  position: relative;
  z-index: 1;
}

html[data-ui="refresh"] .ds-guide-body-wrap .guide-toc-list.ds-has-indicator .guide-toc-link.active {
  background: transparent !important;
}

html[data-ui="refresh"] .ds-toc-indicator {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  border-radius: 11px;
  background: #261e3d;
  pointer-events: none;
  z-index: 0;
  will-change: transform, height;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), height 0.22s ease, opacity 0.18s ease;
}

html[data-ui="refresh"][data-theme^="dark"] .ds-toc-indicator {
  background: rgba(253, 212, 201, 0.16);
}

/* Crisp Tactile Press Feedback & Smooth Lightbox Zoom */
html[data-ui="refresh"] .hero-cta-btn:active,
html[data-ui="refresh"] .header-discord:active,
html[data-ui="refresh"] .macro-copy-btn:active,
html[data-ui="refresh"] .ds-header-link:active,
html[data-ui="refresh"] .section-card:active {
  transform: scale(0.98) !important;
}

html[data-ui="refresh"] .lightbox-overlay {
  transition: opacity 0.22s ease, visibility 0.22s ease !important;
}

html[data-ui="refresh"] .lightbox-img {
  transform: scale(0.95);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html[data-ui="refresh"] .lightbox-overlay.active .lightbox-img {
  transform: scale(1);
}

html[data-ui="refresh"] .lightbox-overlay.active .lightbox-img.zoomed {
  transform: scale(1.45);
}

/* Minimal Motion in Performance Mode (-lite) & Reduced Motion */
html[data-ui="refresh"][data-theme$="-lite"] .ds-cloud-land .section-card.ds-card-enter,
html[data-ui="refresh"][data-theme$="-lite"] .ds-cloud-land .ds-raid-hub-card.ds-card-enter,
html[data-ui="refresh"][data-theme$="-lite"] .ds-raid-dropdown.is-open .ds-raid-dropdown-menu {
  animation: none !important;
}

html[data-ui="refresh"][data-theme$="-lite"] .ds-toc-indicator,
html[data-ui="refresh"][data-theme$="-lite"] .ds-raid-dropdown-chev,
html[data-ui="refresh"][data-theme$="-lite"] .lightbox-img,
html[data-ui="refresh"][data-theme$="-lite"] .lightbox-overlay {
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui="refresh"] .ds-cloud-land .section-card.ds-card-enter,
  html[data-ui="refresh"] .ds-cloud-land .ds-raid-hub-card.ds-card-enter,
  html[data-ui="refresh"] .ds-raid-dropdown.is-open .ds-raid-dropdown-menu {
    animation: none !important;
  }
  html[data-ui="refresh"] .ds-toc-indicator,
  html[data-ui="refresh"] .ds-raid-dropdown-chev,
  html[data-ui="refresh"] .lightbox-img,
  html[data-ui="refresh"] .lightbox-overlay {
    transition: none !important;
  }
}

@media (max-width: 1080px) {
  html[data-ui="refresh"] .ds-cloud-land .section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  html[data-ui="refresh"] .ds-raid-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  html[data-ui="refresh"],
html[data-ui="refresh"] body,
html[data-ui="refresh"] .site-wrapper,
html[data-ui="refresh"] .main-content {
    max-width: 100% !important;
    overflow-x: clip !important;
  }
  html[data-ui="refresh"] .ds-header-nav {
    display: none;
  }
  html[data-ui="refresh"] .header-inner {
    padding: 0.65rem 1rem;
    gap: 0.5rem;
    max-width: 100%;
  }
  html[data-ui="refresh"] .ds-home-sky {
    min-height: 380px;
    padding-top: 76px;
    padding-bottom: 92px;
  }
  html[data-ui="refresh"] .ds-home-sky .hero {
    padding: 1.3rem 1.15rem 0.85rem !important;
    max-width: 100% !important;
  }
  html[data-ui="refresh"] .ds-home-sky .hero-heading {
    font-size: clamp(2rem, 8.5vw, 2.6rem) !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-break: break-word;
  }
  html[data-ui="refresh"] .ds-home-sky .hero-sub {
    font-size: 0.98rem !important;
    max-width: 100% !important;
  }
  html[data-ui="refresh"] .ds-cloud-land {
    padding: 0.6rem 1.15rem 3.5rem;
  }
  html[data-ui="refresh"] .ds-raid-hub-grid,
  html[data-ui="refresh"] .ds-raid-hub-wip-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  html[data-ui="refresh"] .ds-raid-dropdown {
    width: 100%;
  }
  html[data-ui="refresh"] .ds-cloud-land .section-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  html[data-ui="refresh"] .ds-guide-sky {
    min-height: 255px;
    padding: 84px 0 92px;
  }
  html[data-ui="refresh"] .ds-guide-sky-inner,
html[data-ui="refresh"] .ds-guide-body-wrap {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }
  html[data-ui="refresh"] .content-card {
    padding: 1.35rem 1.15rem !important;
  }
}

@media (max-width: 520px) {
  html[data-ui="refresh"] .header-inner {
    padding: 0.58rem 0.75rem;
    gap: 0.38rem;
  }
  html[data-ui="refresh"] .header-site-name {
    display: none !important;
  }
  html[data-ui="refresh"] .header-logo {
    height: 34px;
  }
  html[data-ui="refresh"] .site-header .header-discord {
    padding: 0 0.7rem;
    font-size: 0.76rem;
    height: 32px;
  }
  html[data-ui="refresh"] .site-header .theme-toggle,
  html[data-ui="refresh"] .site-header .header-avatar-btn,
  html[data-ui="refresh"] .site-header .nav-toggle {
    width: 32px !important;
    height: 32px !important;
  }
  html[data-ui="refresh"] .ds-raid-dropdown-trigger {
    font-size: 0.92rem;
    padding: 0.66rem 0.9rem;
  }
}

/* Site-Wide Live Streams Pill in Dreamscape Header */
html[data-ui="refresh"] .site-header .header-live-wrap.is-visible {
  margin-left: auto;
}

html[data-ui="refresh"] .site-header .header-live-wrap.is-visible + .header-discord {
  margin-left: 0 !important;
}

html[data-ui="refresh"] .site-header .header-live-pill {
  color: #ffffff !important;
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.22), rgba(145, 70, 255, 0.28)) !important;
  border-color: rgba(255, 128, 158, 0.56) !important;
}

html[data-ui="refresh"][data-theme^="light"] body.ds-past-sky .site-header .header-live-pill {
  background: #2b1742 !important;
  border-color: rgba(255, 110, 145, 0.65) !important;
  color: #ffffff !important;
}

/* Match Dreamscape solid popover surfaces (avoids nested backdrop-filter glitch inside .site-header) */
html[data-ui="refresh"][data-theme] .site-header .header-live-popover {
  background: #1e183b !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1.5px solid rgba(253, 212, 201, 0.28) !important;
  border-radius: 18px !important;
  box-shadow: 0 22px 54px rgba(10, 7, 26, 0.66) !important;
}

html[data-ui="refresh"][data-theme^="light"] .site-header .header-live-popover {
  background: #fdf9f5 !important;
  border-color: rgba(124, 58, 237, 0.26) !important;
  box-shadow: 0 20px 50px rgba(38, 30, 61, 0.20) !important;
}

/* Compact Hero & Sidebar Strategy Switcher in Dreamscape Guide Layout */
html[data-ui="refresh"] .ds-guide-sky .strat-hero-label {
  color: rgba(242, 235, 255, 0.82);
}

html[data-ui="refresh"] .ds-guide-sky .strat-hero-label .material-symbols-outlined {
  color: var(--ds-moon);
}

html[data-ui="refresh"] .ds-guide-sky .strat-segmented {
  background: rgba(12, 10, 30, 0.52);
  border: 1px solid rgba(253, 212, 201, 0.26);
  backdrop-filter: blur(8px);
}

html[data-ui="refresh"] .ds-guide-sky .strat-btn {
  color: rgba(242, 235, 255, 0.8);
}

html[data-ui="refresh"] .ds-guide-sky .strat-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

html[data-ui="refresh"] .ds-guide-sky .strat-btn.active {
  background: rgba(253, 212, 201, 0.24);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(253, 212, 201, 0.5);
}

html[data-ui="refresh"][data-theme^="dark"] .ds-guide-body-wrap .strat-side-btn.active {
  background: var(--ds-ftb-soft);
  border-color: var(--ds-ftb-border);
  color: var(--ds-ftb);
}
