/* ==========================================================================
   Astral Kin Forge — Commercial Microsoft Store PC Widescreen Stylesheet (v1.2)
   Archetype: Play Store Vibrant Cartoon (Brawl Stars / Archero / Chibi)
   Palette Locked to Concept Art HEX: #285A69, #142746, #5E5F5A, #67B1B4, #57897D
   ========================================================================== */

:root {
  --c-teal: #285A69;
  --c-navy: #142746;
  --c-slate: #5E5F5A;
  --c-cyan: #67B1B4;
  --c-sage: #57897D;

  --c-ink: #1A1226;
  --c-title: #FFE14D;
  --c-gold: #FFBE0B;
  --c-emerald: #38D95A;
  --c-sky: #26B6FF;
  --c-coral: #FF595E;
  --c-violet: #A855F7;

  --font-display: 'Lilita One', 'Luckiest Guy', 'Segoe UI Black', Impact, sans-serif;
  --font-body: 'Baloo 2', 'Trebuchet MS', 'Segoe UI', sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-drag: none;
}

input, textarea {
  user-select: text !important;
  -webkit-user-select: text !important;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--c-navy);
  font-family: var(--font-body);
  color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
}

#world-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
}

#webgl-fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  display: block;
}

#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 90;
  pointer-events: none;
}

.font-title {
  font-family: var(--font-display);
  color: var(--c-title);
  -webkit-text-stroke: 2px var(--c-ink);
  paint-order: stroke fill;
  text-shadow: 0 4px 0 var(--c-ink), 0 6px 14px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.02em;
}

.font-num {
  font-family: var(--font-display);
  color: #FFFFFF;
  -webkit-text-stroke: 1.3px var(--c-ink);
  paint-order: stroke fill;
  text-shadow: 0 2.5px 0 var(--c-ink);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   STRICT CSS 9-SLICE ANTI-DISTORTION LAW (Spec 03 §5.5)
   ========================================================================== */
.btn-9slice {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: transparent;
  border: 14px solid transparent;
  border-image: url('../assets/ui/btn_primary.png') 99 191 99 191 fill / 14px stretch;
  border-radius: 0;
  box-shadow: none;
  padding: 4px 18px;
  min-height: 50px;
  min-width: 0;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.15vw, 18px);
  line-height: 1.15;
  color: #FFFFFF;
  -webkit-text-stroke: 1.5px var(--c-ink);
  paint-order: stroke fill;
  text-shadow: 0 2.5px 0 var(--c-ink);
  filter: drop-shadow(0 4px 0 rgba(18, 12, 30, 0.65));
  transition: transform 0.12s cubic-bezier(0.22, 1, 0.36, 1), filter 0.12s ease;
  overflow: visible;
  white-space: nowrap;
}
.btn-9slice > span:not(.notify-badge):not(.hotkey-pill):not(.hotkey-tag) {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.btn-9slice:hover:not(:disabled) {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.06) drop-shadow(0 6px 0 rgba(18, 12, 30, 0.7));
}

.btn-9slice:active:not(:disabled) {
  transform: translateY(2px) scale(0.98);
  filter: drop-shadow(0 2px 0 rgba(18, 12, 30, 0.7));
}

.btn-9slice:disabled {
  filter: grayscale(0.85) opacity(0.65);
  cursor: not-allowed;
}

.panel-9slice {
  background: transparent;
  border: 20px solid transparent;
  border-image: url('../assets/ui/frame_panel.png') 155 195 155 195 fill / 20px stretch;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 14px 32px rgba(8, 12, 26, 0.78));
}

/* Pure CSS Sculpted Cartoon Buttons — overflow: visible ALWAYS preserved for Red-Dots! */
.btn-cartoon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  min-width: 0;
  padding: 6px 12px;
  border: 3px solid var(--c-ink);
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: clamp(11px, 1.0vw, 15px);
  line-height: 1.15;
  color: #FFFFFF;
  -webkit-text-stroke: 1.3px var(--c-ink);
  paint-order: stroke fill;
  text-shadow: 0 2px 0 var(--c-ink);
  cursor: pointer;
  overflow: visible;
  white-space: nowrap;
  box-shadow: 0 4px 0 var(--c-ink), inset 0 3px 0 rgba(255, 255, 255, 0.42);
  transition: transform 0.1s ease, filter 0.12s ease;
}
.btn-cartoon > span:not(.notify-badge):not(.hotkey-pill):not(.hotkey-tag):not(.lock-pill) {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.btn-cartoon:hover:not(:disabled):not(.is-locked) {
  transform: translateY(-2px);
  filter: brightness(1.07);
}

.btn-cartoon:active:not(:disabled):not(.is-locked) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--c-ink), inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.btn-cartoon:disabled {
  filter: saturate(0.25) brightness(0.75);
  cursor: not-allowed;
}

.btn-gold { background: linear-gradient(180deg, #FFE047 0%, #FFBE0B 60%, #E09600 100%); }
.btn-emerald { background: linear-gradient(180deg, #5CF27B 0%, #38D95A 60%, #22A841 100%); }
.btn-sky { background: linear-gradient(180deg, #5CCBFF 0%, #26B6FF 60%, #1086CC 100%); }
.btn-coral { background: linear-gradient(180deg, #FF7D81 0%, #FF595E 60%, #D6343A 100%); }
.btn-teal { background: linear-gradient(180deg, #67B1B4 0%, #285A69 65%, #1B3F4A 100%); }
.btn-navy { background: linear-gradient(180deg, #2D4E80 0%, #142746 75%, #0E1B31 100%); }
.btn-violet { background: linear-gradient(180deg, #C084FC 0%, #9333EA 65%, #6B21A8 100%); }

.hotkey-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(20, 39, 70, 0.88);
  border: 1.5px solid rgba(103, 177, 180, 0.65);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 10px;
  color: #FFE14D;
  -webkit-text-stroke: 0;
  text-shadow: none;
  pointer-events: none;
  flex-shrink: 0;
}

.ui-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.45));
}
.ui-icon-xs { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.ui-icon-sm { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.ui-icon-lg { width: 38px; height: 38px; object-fit: contain; flex-shrink: 0; }

/* ==========================================================================
   TITLE / SANCTUARY BOOT OVERLAY
   ========================================================================== */
#title-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px 44px;
  background: url('../assets/art/title_bg.jpg') center center / cover no-repeat;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#title-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 44%, rgba(20, 39, 70, 0.15) 0%, rgba(12, 20, 38, 0.68) 100%);
  pointer-events: none;
}

#title-screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
}

.title-top-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1760px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.version-pill {
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(20, 39, 70, 0.9);
  border: 2.5px solid var(--c-gold);
  box-shadow: 0 3px 0 var(--c-ink);
  font-family: var(--font-display);
  font-size: 13px;
  color: #FFE14D;
  -webkit-text-stroke: 1px var(--c-ink);
  paint-order: stroke fill;
}

.title-center-emblem {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  animation: floatEmblem 3.4s ease-in-out infinite;
}

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

.title-logo-badge {
  padding: 18px 42px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(40, 90, 105, 0.88) 0%, rgba(20, 39, 70, 0.94) 100%);
  border: 4px solid var(--c-gold);
  box-shadow: 0 10px 0 var(--c-ink), 0 18px 40px rgba(0, 0, 0, 0.65), inset 0 3px 0 rgba(255, 255, 255, 0.35);
}

.title-main-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(42px, 5.4vw, 78px);
  line-height: 1.02;
  color: var(--c-title);
  -webkit-text-stroke: 3px var(--c-ink);
  paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--c-ink), 0 12px 24px rgba(0, 0, 0, 0.55);
}

.title-sub-heading {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.4vw, 21px);
  color: var(--c-cyan);
  -webkit-text-stroke: 1.4px var(--c-ink);
  paint-order: stroke fill;
  letter-spacing: 0.08em;
}

.title-cta-group {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  justify-content: center;
}

.title-loading-wrap {
  width: min(440px, 78vw);
  padding: 12px 18px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(28, 52, 82, 0.94) 0%, rgba(18, 30, 56, 0.96) 100%);
  border: 3px solid var(--c-gold);
  box-shadow: 0 5px 0 var(--c-ink), 0 12px 28px rgba(0, 0, 0, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.22);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.title-loading-wrap.hidden {
  display: none;
}

.title-loading-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: #FFE14D;
  -webkit-text-stroke: 1px var(--c-ink);
  paint-order: stroke fill;
}

#title-loading-pct {
  font-size: 15px;
  color: #67F2D1;
}

.title-loading-track {
  width: 100%;
  height: 22px;
  padding: 2px;
  border-radius: 999px;
  background: #0D1628;
  border: 3px solid var(--c-ink);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

#title-loading-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #26B6FF 0%, #67F2D1 52%, #FFE14D 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5), 0 0 10px rgba(103, 242, 209, 0.55);
  transition: width 0.12s ease-out;
}

#btn-title-play {
  min-width: 270px;
  min-height: 74px;
  font-size: clamp(24px, 2.2vw, 34px);
  padding: 8px 44px;
  animation: titlePlayPop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1) 1;
}

#btn-title-play.title-play-hidden {
  display: none;
}

@keyframes titlePlayPop {
  0% { opacity: 0; transform: scale(0.84) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   NATIVE PC 16:9 WIDESCREEN GAME SHELL (>= 94% Width Utilized!)
   ========================================================================== */
#game-shell {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 2.8vw 12px;
  pointer-events: none;
}

#game-shell > * {
  pointer-events: auto;
}

#top-hud {
  position: relative;
  z-index: 48;
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hud-cluster {
  display: flex;
  align-items: center;
  gap: clamp(5px, 0.55vw, 9px);
  flex-wrap: wrap;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  padding: 3px 11px 3px 9px;
  background: linear-gradient(180deg, rgba(40, 90, 105, 0.92) 0%, rgba(20, 39, 70, 0.95) 100%);
  border: 3px solid var(--c-ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--c-ink), inset 0 2px 0 rgba(103, 177, 180, 0.45);
}

.hud-pill-stage {
  background: linear-gradient(180deg, #285A69 0%, #142746 100%);
  border-color: var(--c-gold);
  padding: 4px 16px;
}

.hud-plus-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--c-ink);
  background: var(--c-emerald);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--c-ink);
}
.hud-plus-btn:hover { filter: brightness(1.12); transform: scale(1.08); }

.hud-icon-btn {
  position: relative;
  height: 42px;
  min-height: 42px;
  padding: 0 clamp(7px, 0.65vw, 11px);
  border-radius: 12px;
  font-size: clamp(10.5px, 0.9vw, 13.5px);
}

.hud-square-btn {
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border-radius: 12px;
}

/* 2. MAIN WIDESCREEN SPLIT-STAGE */
#widescreen-stage {
  flex: 1;
  width: 100%;
  min-height: 0;
  margin: 8px 0;
  display: grid;
  grid-template-columns: minmax(390px, 45fr) minmax(440px, 55fr);
  gap: 22px;
  align-items: stretch;
  pointer-events: none;
}

/* LEFT WING: 20-Slot Sanctuary Merge Forge */
#forge-wing {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 16px 14px;
  background: linear-gradient(180deg, rgba(20, 39, 70, 0.78) 0%, rgba(16, 30, 54, 0.86) 100%);
  border: 3.5px solid var(--c-ink);
  border-radius: 24px;
  box-shadow: 0 8px 0 var(--c-ink), 0 14px 32px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(103, 177, 180, 0.45);
  backdrop-filter: blur(4px);
  min-height: 0;
}

.wing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.wing-title {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.25vw, 20px);
  color: var(--c-title);
  -webkit-text-stroke: 1.5px var(--c-ink);
  paint-order: stroke fill;
  text-shadow: 0 2.5px 0 var(--c-ink);
}

.wing-sub-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(40, 90, 105, 0.85);
  border: 2px solid var(--c-ink);
  font-weight: 800;
  font-size: 12px;
  color: #E2F8F9;
  white-space: nowrap;
}

.combo-pill {
  background: linear-gradient(180deg, #2D4E80 0%, #142746 100%);
  border-color: #67F2D1;
  color: #67F2D1;
  font-family: var(--font-display);
  -webkit-text-stroke: 0.9px var(--c-ink);
  paint-order: stroke fill;
}
.combo-pill.overload-active {
  background: linear-gradient(180deg, #FFE047 0%, #FFBE0B 100%);
  border-color: var(--c-ink);
  color: #FFFFFF;
  -webkit-text-stroke: 1.4px var(--c-ink);
  text-shadow: 0 2px 0 var(--c-ink);
  box-shadow: 0 2px 0 var(--c-ink), 0 0 14px rgba(255, 225, 77, 0.9);
  animation: pulseBadge 0.55s ease-in-out infinite alternate;
}

.boss-phase-pill {
  background: linear-gradient(180deg, #34597E 0%, #1C2D4D 100%);
  border-color: #67B1B4;
  color: #E2F8F9;
  font-family: var(--font-display);
  font-size: 11px;
  padding: 2px 8px;
}
.boss-phase-pill.boss-phase-p2 {
  background: linear-gradient(180deg, #F59E0B 0%, #B45309 100%);
  border-color: #FFE14D;
  color: #FFFFFF;
}
.boss-phase-pill.boss-phase-enrage {
  background: linear-gradient(180deg, #FF595E 0%, #991B1B 100%);
  border-color: #FFE14D;
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(255, 89, 94, 0.85);
  animation: pulseBadge 0.45s ease-in-out infinite alternate;
}

.boss-status-strip {
  display: none;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 5px;
}
.boss-status-strip.has-items {
  display: flex;
}
.boss-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(13, 22, 40, 0.88);
  border: 1.5px solid #67B1B4;
  color: #E2F8F9;
  white-space: nowrap;
}
.boss-status-chip.passive {
  border-color: #A855F7;
  color: #E9D5FF;
}
.boss-status-chip.debuff {
  border-color: #FFE14D;
  color: #FFE14D;
}
.boss-status-chip.element {
  border-color: #67F2D1;
  color: #67F2D1;
}

.drag-tip-bar {
  font-size: 12px;
  font-weight: 700;
  color: #CBEFF1;
  text-align: center;
  margin-bottom: 6px;
  opacity: 0.92;
}

/* 5x4 Sanctuary Merge Grid (20 Tactile Crystal Slots with slot_tile.png) */
#merge-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 6px;
  align-items: center;
  justify-items: center;
  min-height: 0;
  padding: 2px;
}

.merge-slot {
  position: relative;
  height: 100%;
  max-height: 86px;
  max-width: 86px;
  aspect-ratio: 1 / 1;
  background: url('../assets/ui/slot_tile.png') center center / contain no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.merge-slot:hover {
  transform: translateY(-2px) scale(1.04);
  filter: brightness(1.1);
}

.merge-slot.merge-source-hover {
  filter: drop-shadow(0 0 8px #67F2D1) brightness(1.12);
}

@keyframes matchPairGlow {
  0% { transform: scale(1.0); filter: drop-shadow(0 0 8px #38D95A) brightness(1.12); }
  100% { transform: scale(1.06); filter: drop-shadow(0 0 16px #FFE14D) brightness(1.24); }
}

.merge-slot.merge-match-hint {
  animation: matchPairGlow 0.55s ease-in-out infinite alternate;
}

.merge-slot.drag-over {
  transform: scale(1.08);
  filter: drop-shadow(0 0 12px #FFE14D) brightness(1.18);
}

.merge-slot.slot-locked {
  filter: saturate(0.55) brightness(0.78);
}

.slot-unit-canvas {
  width: 92%;
  height: 92%;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.slot-tier-badge {
  position: absolute;
  bottom: 3px;
  right: 4px;
  z-index: 2;
  min-width: 21px;
  height: 19px;
  padding: 0 4px;
  border-radius: 6px;
  background: var(--c-navy);
  border: 2px solid var(--c-ink);
  font-family: var(--font-display);
  font-size: 10.5px;
  color: var(--c-title);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.slot-lock-overlay {
  position: absolute;
  inset: 10%;
  border-radius: 12px;
  background: rgba(14, 24, 44, 0.78);
  border: 2px dashed rgba(103, 177, 180, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px;
  text-align: center;
}

.slot-lock-cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-display);
  font-size: 10.5px;
  color: #FFE14D;
  -webkit-text-stroke: 1px var(--c-ink);
  paint-order: stroke fill;
}

/* Wide Dynamic-Width SUMMON Button + 4-Button Sub-Action Strip */
.forge-controls {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

#btn-summon {
  position: relative;
  width: 100%;
  height: 58px;
  border: 3.5px solid var(--c-ink);
  border-radius: 16px;
  background: linear-gradient(180deg, #FFE14D 0%, #FFBE0B 58%, #E09200 100%);
  box-shadow: 0 5px 0 var(--c-ink), 0 8px 18px rgba(0, 0, 0, 0.42), inset 0 3px 0 rgba(255, 255, 255, 0.55);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  transition: transform 0.1s ease, filter 0.12s ease;
}

#btn-summon:hover { transform: translateY(-2px); filter: brightness(1.05); }
#btn-summon:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--c-ink); }

#summon-recharge-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 7px;
  width: 0%;
  background: linear-gradient(90deg, #38D95A, #67F2D1);
  border-top: 1.5px solid var(--c-ink);
  transition: width 0.08s linear;
  pointer-events: none;
}

.summon-left, .summon-right {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
}

.summon-title-text {
  font-family: var(--font-display);
  font-size: clamp(15px, 1.35vw, 21px);
  color: #FFFFFF;
  -webkit-text-stroke: 1.8px var(--c-ink);
  paint-order: stroke fill;
  text-shadow: 0 3px 0 var(--c-ink);
}

.summon-cost-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(20, 39, 70, 0.9);
  border: 2px solid var(--c-ink);
}

.forge-sub-actions {
  display: flex;
  gap: 6px;
}

.forge-sub-actions > button {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 4px 8px;
  font-size: clamp(10.5px, 0.92vw, 13.5px);
}

/* v2.2 High-Z Unobstructed Flying Sky-Bonus Target (z-index: 45 ABOVE HUD, BELOW Modals!) */
#sky-bonus-btn {
  position: fixed;
  z-index: 45;
  width: 68px;
  height: 68px;
  margin-left: -34px;
  margin-top: -34px;
  border: none;
  background: transparent;
  padding: 0;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  overflow: visible;
  filter: drop-shadow(0 0 12px rgba(255, 225, 77, 0.92));
  transition: transform 0.08s ease;
}
#sky-bonus-btn:hover {
  transform: scale(1.16);
}
#sky-bonus-btn .sky-bonus-halo {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 225, 77, 0.55) 0%, rgba(103, 242, 209, 0.25) 55%, rgba(0, 0, 0, 0) 75%);
  animation: pulseSkyHalo 1.2s ease-in-out infinite alternate;
  pointer-events: none;
}
#sky-bonus-btn img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  position: relative;
  z-index: 2;
  pointer-events: none;
}
@keyframes pulseSkyHalo {
  from { transform: scale(0.92) rotate(-6deg); opacity: 0.8; }
  to   { transform: scale(1.14) rotate(6deg); opacity: 1.0; }
}

#btn-smart-merge.pair-ready {
  border-color: #38D95A;
  box-shadow: 0 4px 0 var(--c-ink), 0 0 14px rgba(56, 217, 90, 0.78);
}

/* RIGHT WING: Open Cinematic Battle Arena + Boss Bar + Formation Bar + Boost Chips */
#battle-wing {
  position: relative;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 8px 4px;
  min-height: 0;
}

#boss-hud-card {
  pointer-events: auto;
  align-self: center;
  width: min(94%, 650px);
  padding: 10px 16px 12px;
  background: linear-gradient(180deg, rgba(20, 39, 70, 0.86) 0%, rgba(15, 26, 48, 0.92) 100%);
  border: 3px solid var(--c-ink);
  border-radius: 18px;
  box-shadow: 0 5px 0 var(--c-ink), 0 8px 20px rgba(0, 0, 0, 0.45);
}

.boss-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.boss-name-label {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.25vw, 19px);
  color: #FFE14D;
  -webkit-text-stroke: 1.4px var(--c-ink);
  paint-order: stroke fill;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hp-bar-outer {
  position: relative;
  width: 100%;
  height: 22px;
  border-radius: 999px;
  background: #0D1628;
  border: 2.5px solid var(--c-ink);
  overflow: hidden;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.7);
}

#enemy-hp-trail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: #FFFFFF;
  transition: width 0.28s ease-out;
}

#enemy-hp-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(180deg, #FF7D81 0%, #FF595E 55%, #C92A32 100%);
  transition: width 0.08s linear;
}

#enemy-hp-text {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
}

#boss-skill-bar-wrap {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-bar-outer {
  flex: 1;
  height: 11px;
  border-radius: 999px;
  background: #0D1628;
  border: 2px solid var(--c-ink);
  overflow: hidden;
}

#boss-skill-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #26B6FF, #A855F7, #FFBE0B);
  transition: width 0.1s linear;
}

#boss-skill-status {
  font-family: var(--font-display);
  font-size: 11px;
  color: #67B1B4;
  -webkit-text-stroke: 1px var(--c-ink);
  paint-order: stroke fill;
  white-space: nowrap;
}
#boss-skill-status.danger {
  color: #FFBE0B;
  animation: pulseBadge 0.5s infinite alternate;
}

#battle-arena-interactive {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 220px;
  pointer-events: auto;
  cursor: crosshair;
}

/* v1.1 3 Saveable Battle Formation Presets Strip */
#formation-bar {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 16;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 14px;
  background: rgba(14, 24, 46, 0.84);
  border: 2.5px solid var(--c-ink);
  box-shadow: 0 4px 0 var(--c-ink);
  cursor: default;
  max-width: calc(100% - 12px);
  flex-wrap: wrap;
}

.preset-btn, .preset-save-btn {
  min-height: 32px;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: clamp(10px, 0.85vw, 12px);
  gap: 5px;
  box-shadow: 0 2.5px 0 var(--c-ink);
}

.preset-btn.active {
  background: linear-gradient(180deg, #FFE047 0%, #FFBE0B 65%, #E09600 100%);
  border-color: #FFFFFF;
}

.preset-btn.has-saved::after {
  content: '';
  position: absolute;
  top: -4px;
  right: -4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #38D95A;
  border: 1.5px solid var(--c-ink);
  pointer-events: none;
}

/* v1.1 Per-Slot DPS Hover Telemetry Popover */
#slot-dps-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 65;
  pointer-events: none;
  min-width: 165px;
  max-width: 260px;
  padding: 8px 12px;
  border-radius: 13px;
  background: linear-gradient(180deg, rgba(24, 48, 82, 0.97) 0%, rgba(12, 22, 42, 0.98) 100%);
  border: 2.5px solid var(--c-gold);
  box-shadow: 0 6px 0 var(--c-ink), 0 10px 22px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(4px) scale(0.96);
  transition: opacity 0.1s ease, transform 0.1s ease;
}
#slot-dps-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}
#slot-dps-tooltip .tt-title {
  font-family: var(--font-display);
  font-size: 13px;
  color: #FFE14D;
  -webkit-text-stroke: 1px var(--c-ink);
  paint-order: stroke fill;
  margin-bottom: 2px;
}
#slot-dps-tooltip .tt-stat {
  font-family: var(--font-display);
  font-size: 14px;
  color: #38D95A;
  -webkit-text-stroke: 1px var(--c-ink);
  paint-order: stroke fill;
}
#slot-dps-tooltip .tt-sub {
  font-size: 11px;
  font-weight: 800;
  color: #CBEFF1;
}
#slot-dps-tooltip .tt-buff {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  color: #67F2D1;
}
#slot-dps-tooltip .tt-hint {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  color: #FFE14D;
}

#starter-offer-pill {
  position: absolute;
  top: 62px;
  right: 8px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 16px;
  background: linear-gradient(180deg, #FF7D81 0%, #FF595E 100%);
  border: 3px solid var(--c-ink);
  box-shadow: 0 4px 0 var(--c-ink);
  cursor: pointer;
  animation: floatEmblem 2.2s ease-in-out infinite;
}
#starter-offer-pill.hidden { display: none !important; }

#battle-boost-strip {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.boost-chip {
  position: relative;
  height: 48px;
  padding: 4px 11px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.boost-chip.boost-active {
  border-color: #FFE14D;
  box-shadow: 0 0 14px rgba(255, 225, 77, 0.75), 0 4px 0 var(--c-ink);
}

#bottom-dock {
  width: 100%;
  display: flex;
  gap: 14px;
  padding-top: 2px;
}

.dock-btn {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  height: 56px;
  border-radius: 16px;
  font-size: clamp(13px, 1.15vw, 17px);
  justify-content: center;
  gap: 9px;
}

.is-locked {
  filter: saturate(0.35) brightness(0.82);
}

.lock-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 24, 42, 0.92);
  border: 1.5px solid rgba(255, 225, 77, 0.55);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  color: #FFE14D;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

/* ==========================================================================
   UNIVERSAL RED-DOT NOTIFICATION BADGES (Unclipped Top-Right!)
   ========================================================================== */
.notify-badge {
  position: absolute;
  top: -9px;
  right: -9px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #FF6B6B 0%, #E62E35 100%);
  border: 2.5px solid var(--c-ink);
  box-shadow: 0 2px 0 var(--c-ink), 0 0 12px rgba(255, 89, 94, 0.9);
  font-family: var(--font-display);
  font-size: 11.5px;
  line-height: 1;
  color: #FFFFFF;
  -webkit-text-stroke: 0.8px var(--c-ink);
  paint-order: stroke fill;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  pointer-events: none;
  animation: pulseBadge 0.85s ease-in-out infinite alternate;
}

.notify-badge.visible {
  display: inline-flex;
}

@keyframes pulseBadge {
  0% { transform: scale(0.95); }
  100% { transform: scale(1.14); }
}

/* ==========================================================================
   SPRING-OVERSHOOT SECONDARY MODALS
   ========================================================================== */
#modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 92;
  background: rgba(10, 18, 36, 0.74);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#modal-backdrop:not(.open) {
  display: none !important;
}
#modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: min(92vw, 960px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  padding: 16px 22px 20px;
  transform: scale(0.84);
  opacity: 0;
  transition: transform 0.26s cubic-bezier(0.34, 1.42, 0.64, 1), opacity 0.2s ease;
}

#modal-backdrop.open .modal-card {
  transform: scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2.5px solid rgba(103, 177, 180, 0.35);
  margin-bottom: 12px;
}

.modal-title {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
}

.modal-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.modal-tab-btn {
  position: relative;
  min-width: 130px;
}
.modal-tab-btn.active {
  background: linear-gradient(180deg, #FFE047 0%, #FFBE0B 60%, #E09600 100%);
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: rgba(14, 24, 44, 0.5); border-radius: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--c-cyan); border-radius: 8px; border: 2px solid var(--c-ink); }

/* v1.1 Buy x1 / x5 / Max Header Bar inside Upgrades Modal */
.upg-mult-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 14px;
  background: rgba(14, 26, 48, 0.78);
  border: 2.5px solid var(--c-ink);
  flex-wrap: wrap;
}

.upg-mult-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-upg-mult {
  min-height: 36px;
  min-width: 58px;
  padding: 4px 12px;
  font-size: 13px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.card-grid-2 > *,
.card-grid-3 > *,
.card-grid-4 > * {
  min-width: 0;
  max-width: 100%;
}

.game-item-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(40, 90, 105, 0.65) 0%, rgba(20, 39, 70, 0.88) 100%);
  border: 3px solid var(--c-ink);
  box-shadow: 0 4px 0 var(--c-ink), inset 0 2px 0 rgba(103, 177, 180, 0.3);
  min-width: 0;
}

.vip-roi-banner {
  border-color: var(--c-gold);
  background: linear-gradient(90deg, rgba(40, 90, 105, 0.88) 0%, rgba(20, 39, 70, 0.95) 100%);
}

.shop-roi-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(14, 24, 44, 0.85);
  border: 1.5px solid rgba(103, 242, 209, 0.45);
  font-size: 11px;
  font-weight: 800;
  color: #67F2D1;
}

.shop-pack-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 18px 14px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(40, 90, 105, 0.82) 0%, rgba(20, 39, 70, 0.96) 100%);
  border: 3px solid var(--c-ink);
  box-shadow: 0 5px 0 var(--c-ink), inset 0 2px 0 rgba(255, 255, 255, 0.25);
  gap: 6px;
  min-width: 0;
}

.shop-pack-card.featured {
  border-color: var(--c-gold);
  background: linear-gradient(180deg, rgba(62, 114, 130, 0.92) 0%, rgba(28, 48, 88, 0.98) 100%);
}

.shop-art {
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
}

.ribbon-badge {
  position: absolute;
  top: -10px;
  left: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 2px solid var(--c-ink);
  font-family: var(--font-display);
  font-size: 11px;
  color: #FFFFFF;
  -webkit-text-stroke: 1px var(--c-ink);
  paint-order: stroke fill;
  box-shadow: 0 3px 0 var(--c-ink);
}
.ribbon-starter { background: var(--c-emerald); }
.ribbon-popular { background: var(--c-sky); }
.ribbon-best { background: var(--c-coral); }

.value-pill {
  position: absolute;
  top: -9px;
  right: 10px;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--c-gold);
  border: 2px solid var(--c-ink);
  font-family: var(--font-display);
  font-size: 10.5px;
  color: var(--c-ink);
}

.bestiary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px;
  border-radius: 15px;
  background: rgba(20, 39, 70, 0.85);
  border: 2.5px solid var(--c-ink);
  gap: 6px;
  min-width: 0;
}
.bestiary-sprite.locked-silhouette {
  filter: brightness(0) opacity(0.5);
}

/* ==========================================================================
   CELEBRATION / CHEST / WHEEL / UNLOCK / TUTORIAL OVERLAYS
   ========================================================================== */
#celebration-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(8, 12, 28, 0.78);
  backdrop-filter: blur(5px);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
#celebration-overlay.active { display: flex; }

.sunburst-bg {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 225, 77, 0.28) 0deg 15deg,
    rgba(103, 177, 180, 0.04) 15deg 30deg
  );
  mask-image: radial-gradient(circle, rgba(0,0,0,1) 15%, rgba(0,0,0,0) 70%);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,1) 15%, rgba(0,0,0,0) 70%);
  animation: spinSunburst 14s linear infinite;
  pointer-events: none;
}

@keyframes spinSunburst {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

#unlock-banner {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-24px) scale(0.9);
  z-index: 85;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, #285A69 0%, #142746 100%);
  border: 3.5px solid var(--c-gold);
  box-shadow: 0 8px 0 var(--c-ink), 0 14px 30px rgba(0, 0, 0, 0.65);
  opacity: 0;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.34, 1.45, 0.64, 1);
}
#unlock-banner:not(.show) {
  display: none !important;
}
#unlock-banner.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
#btn-modal-close {
  position: relative;
  z-index: 30;
  pointer-events: auto;
}

#tutorial-layer {
  position: fixed;
  inset: 0;
  z-index: 78;
  pointer-events: none;
}
#tutorial-layer.hidden { display: none !important; }

#tutorial-ring {
  position: fixed;
  border: 4px solid #FFE14D;
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(8, 14, 28, 0.45), 0 0 24px #FFE14D;
  pointer-events: none;
  transition: all 0.25s ease;
  animation: tutPulse 1s ease-in-out infinite alternate;
}

@keyframes tutPulse {
  from { border-color: #FFE14D; transform: scale(1); }
  to { border-color: #38D95A; transform: scale(1.03); }
}

#tutorial-callout {
  position: fixed;
  max-width: 380px;
  padding: 12px 18px;
  border-radius: 16px;
  background: linear-gradient(180deg, #285A69 0%, #142746 100%);
  border: 3px solid #FFE14D;
  box-shadow: 0 6px 0 var(--c-ink), 0 10px 24px rgba(0,0,0,0.6);
  font-weight: 800;
  font-size: 15px;
  color: #FFFFFF;
  pointer-events: auto;
}

#tutorial-hand {
  position: fixed;
  width: 44px;
  height: 44px;
  pointer-events: none;
  z-index: 79;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.65));
  transition: left 0.55s ease-in-out, top 0.55s ease-in-out;
}

#btn-tutorial-skip {
  position: fixed;
  top: auto;
  bottom: 136px;
  right: 20px;
  z-index: 80;
  pointer-events: auto;
}

/* Preview-Only [DEV F2] Pill & Collapsible Debug Panel */
#dev-f2-pill {
  position: fixed;
  bottom: 8px;
  right: 10px;
  z-index: 95;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(20, 39, 70, 0.9);
  border: 2px solid #38D95A;
  color: #38D95A;
  font-family: monospace;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
}

#debug-panel {
  position: fixed;
  bottom: 40px;
  right: 12px;
  z-index: 95;
  width: 320px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 12px;
  border-radius: 14px;
  background: rgba(14, 22, 38, 0.96);
  border: 2.5px solid #38D95A;
  box-shadow: 0 10px 28px rgba(0,0,0,0.75);
  display: none;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
}
#debug-panel.open { display: flex; }
#debug-panel button {
  padding: 5px 8px;
  border-radius: 8px;
  border: 1.5px solid #285A69;
  background: #1B3358;
  color: #FFFFFF;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
#debug-panel button:hover { background: #285A69; }

@media (max-width: 900px) {
  #game-shell {
    padding: 6px 10px 8px;
  }
  #widescreen-stage {
    grid-template-columns: 1fr;
    grid-template-rows: 46fr 54fr;
    gap: 8px;
  }
  #battle-wing {
    order: 1;
    min-height: 170px;
  }
  #forge-wing {
    order: 2;
    padding: 8px 10px 10px;
  }
  #merge-grid {
    gap: 4px;
  }
  #btn-summon {
    height: 48px;
  }
  .dock-btn {
    height: 46px;
    padding: 4px 6px;
  }
  .dock-btn .hotkey-tag { display: none; }
  .forge-sub-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid-2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   v1.3 ACTIVE RELIC LOADOUT BAR & MYTHIC PRISM CHEST HALO
   ========================================================================== */
#relic-loadout-bar {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 16;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 14px;
  background: rgba(18, 24, 48, 0.86);
  border: 2.5px solid var(--c-ink);
  box-shadow: 0 4px 0 var(--c-ink);
}
#relic-loadout-bar.is-locked {
  display: none;
}

.relic-socket-btn {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 2px;
  border-radius: 10px;
  background: rgba(34, 58, 92, 0.92);
  border: 2px solid #67B1B4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: visible;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.relic-socket-btn:hover {
  transform: translateY(-2px) scale(1.06);
  filter: brightness(1.12);
}
.relic-socket-btn.equipped {
  border-color: #FFE14D;
  box-shadow: 0 0 10px rgba(255, 225, 77, 0.55);
}
.relic-socket-btn.locked-archivist {
  border-style: dashed;
  border-color: #A855F7;
  opacity: 0.82;
}
.relic-socket-lv {
  position: absolute;
  bottom: -4px;
  right: -4px;
  padding: 0 4px;
  border-radius: 5px;
  background: #142746;
  border: 1.5px solid var(--c-ink);
  font-family: var(--font-display);
  font-size: 9px;
  color: #FFE14D;
  pointer-events: none;
}

.mythic-rainbow-halo {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #FF595E, #FFBE0B, #38D95A, #26B6FF, #A855F7, #FF595E);
  mask-image: radial-gradient(circle, rgba(0,0,0,0.85) 20%, rgba(0,0,0,0) 70%);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,0.85) 20%, rgba(0,0,0,0) 70%);
  animation: spinSunburst 4.5s linear infinite;
  opacity: 0.68;
  pointer-events: none;
}

/* ==========================================================================
   v1.4 ELEMENTAL GATE CLASH (16:9 3-LANE TACTICAL ARENA)
   ========================================================================== */
#gate-clash-screen {
  position: fixed;
  inset: 0;
  z-index: 68;
  background: #0D1628;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 2.4vw 12px;
}
#gate-clash-screen.hidden {
  display: none !important;
}

.clash-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.clash-stage-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(20, 39, 70, 0.92);
  border: 2.5px solid var(--c-gold);
}

.clash-medal-shop-strip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.clash-arena-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  margin: 8px 0;
  border-radius: 22px;
  border: 3.5px solid var(--c-ink);
  box-shadow: 0 8px 0 var(--c-ink), 0 14px 32px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

#clash-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.clash-triangle-pill {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(14, 24, 44, 0.88);
  border: 2px solid rgba(255, 225, 77, 0.65);
  font-family: var(--font-display);
  font-size: 11.5px;
  color: #FFE14D;
  -webkit-text-stroke: 0.9px var(--c-ink);
  paint-order: stroke fill;
  pointer-events: none;
  white-space: nowrap;
}

#clash-result-banner {
  position: absolute;
  inset: 0;
  z-index: 12;
  background: rgba(8, 14, 28, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#clash-result-banner.hidden { display: none !important; }

.clash-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.clash-mana-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 14px;
  background: rgba(20, 39, 70, 0.9);
  border: 2.5px solid var(--c-ink);
}

.clash-deck-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.clash-card-btn {
  min-height: 44px;
  padding: 4px 12px;
  flex-direction: column;
  gap: 1px;
}
.clash-card-btn.selected {
  background: linear-gradient(180deg, #285A69 0%, #1B3F4A 100%);
  box-shadow: 0 0 12px rgba(255, 225, 77, 0.75), 0 3px 0 var(--c-ink);
  transform: translateY(-2px);
}

.clash-adv-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #38D95A;
  border: 1.5px solid var(--c-ink);
  font-family: var(--font-display);
  font-size: 9.5px;
  color: #FFFFFF;
  -webkit-text-stroke: 0.7px var(--c-ink);
  paint-order: stroke fill;
  pointer-events: none;
}

.clash-ult-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}


/* ==========================================================================
   v1.5–v1.7 PROGRESSIVE HUD DECLUTTER, MODES DRAWER, ARCHMAGE SPELLS & TILE VAULT
   ========================================================================== */
.is-hidden-far,
.is-hidden-locked {
  display: none !important;
}

.modes-drawer-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.modes-drawer-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 55;
  min-width: 215px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(16, 28, 52, 0.97);
  border: 3px solid var(--c-gold);
  box-shadow: 0 10px 0 var(--c-ink), 0 16px 32px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modes-drawer-menu.hidden {
  display: none !important;
}

.modes-item-btn {
  width: 100%;
  justify-content: flex-start;
  min-height: 40px;
  padding: 5px 12px;
  font-size: 13px;
  overflow: visible;
}

/* v1.5 Battle Row Elemental Synergy Badges */
#synergy-badge-bar {
  position: absolute;
  top: 46px;
  left: 8px;
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.synergy-pill {
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(14, 24, 44, 0.85);
  border: 2px solid #5E5F5A;
  font-family: var(--font-display);
  font-size: 11px;
  color: #CBEFF1;
  -webkit-text-stroke: 0.7px var(--c-ink);
  paint-order: stroke fill;
}
.synergy-pill.active {
  background: rgba(20, 42, 68, 0.94);
  box-shadow: 0 0 10px rgba(255, 225, 77, 0.35);
}

/* v1.5 Archmage Active Spell Bar (Q/W/E/R + SVG Radial Cooldown Rings) */
#archmage-spell-bar {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 16;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  pointer-events: auto;
}

.spell-chip-btn {
  min-height: 42px;
  padding: 3px 9px 3px 5px;
  gap: 6px;
  overflow: visible;
}
.spell-chip-btn.spell-active-glow {
  border-color: #38D95A;
  box-shadow: 0 0 12px rgba(56, 217, 90, 0.65), 0 3px 0 var(--c-ink);
}

.spell-ring-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.spell-chip-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.spell-cd-svg {
  position: absolute;
  inset: -1px;
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
  pointer-events: none;
}
.spell-cd-track {
  fill: none;
  stroke: rgba(10, 16, 30, 0.55);
  stroke-width: 3;
}
.spell-cd-prog {
  fill: none;
  stroke-width: 3.2;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.1s linear;
}

.spell-chip-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}
.spell-chip-name {
  font-size: 11px;
  color: #FFFFFF;
  max-width: 88px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.spell-chip-status {
  font-size: 9.5px;
  color: #FFE14D;
}

/* v1.6 Relic Tile Vault Screen & 7-Slot Holding Tray */
#tile-vault-screen {
  position: fixed;
  inset: 0;
  z-index: 69;
  background: #0D1628;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 2.4vw 12px;
}
#tile-vault-screen.hidden {
  display: none !important;
}

#vault-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#vault-result-banner {
  position: absolute;
  inset: 0;
  z-index: 12;
  background: rgba(8, 14, 28, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#vault-result-banner.hidden {
  display: none !important;
}

.vault-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.vault-tray-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 16px;
  background: rgba(20, 39, 70, 0.94);
  border: 3px solid var(--c-gold);
  box-shadow: 0 4px 0 var(--c-ink);
}

.vault-tray-slot {
  width: 46px;
  height: 48px;
  border-radius: 10px;
  background: rgba(10, 18, 34, 0.85);
  border: 2px dashed rgba(103, 177, 180, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.vault-tray-slot.filled {
  background: linear-gradient(180deg, #F2FBFC 0%, #CFEBEE 100%);
  border-style: solid;
  border-width: 2.5px;
  box-shadow: 0 3px 0 var(--c-ink);
}

.vault-tools-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==========================================================================
   v1.8–v2.0 ABYSSAL BOSS RUSH & 100-FLOOR INFINITE ASTRAL SPIRE
   ========================================================================== */
#boss-rush-screen,
#astral-spire-screen {
  position: fixed;
  inset: 0;
  z-index: 69;
  background: #0D1628;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 2.4vw 12px;
}
#boss-rush-screen.hidden,
#astral-spire-screen.hidden {
  display: none !important;
}

#rush-canvas,
#spire-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

#rush-summary-overlay {
  position: absolute;
  inset: 0;
  z-index: 14;
  background: rgba(8, 14, 28, 0.78);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#rush-summary-overlay.hidden {
  display: none !important;
}

/* ==========================================================================
   v2.2 CONTEXTUAL FIRST-TIME FEATURE MINI-TUTORIAL OVERLAY
   ========================================================================== */
.feature-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 260;
  background: rgba(8, 12, 26, 0.78);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.feature-guide-overlay.hidden {
  display: none !important;
}

.feature-guide-card {
  width: min(94vw, 520px);
  padding: 18px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 3.5px solid var(--c-gold);
  box-shadow: 0 10px 0 var(--c-ink), 0 22px 48px rgba(0, 0, 0, 0.75);
}

.feature-guide-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(103, 177, 180, 0.35);
}

.fg-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(56, 217, 90, 0.22);
  border: 1.5px solid #38D95A;
  font-family: var(--font-display);
  font-size: 10.5px;
  color: #67F2D1;
  letter-spacing: 0.5px;
}

.feature-guide-body {
  text-align: left;
  min-height: 92px;
}

.feature-guide-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 4px;
}

/* ==========================================================================
   v2.3–v3.0 SEASON 2 SOVEREIGN ODYSSEY STYLES
   (2-Column Modes Drawer, Titan Armor Bar, Nightmare Toggle, World Raid,
    Elemental Trials Towers & Cozy Astral Pet Garden)
   ========================================================================== */
#top-hud {
  gap: 8px;
}

.hud-cluster {
  gap: clamp(4px, 0.44vw, 8px);
}

.modes-drawer-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(92vw, 448px);
  min-width: 360px;
  gap: 9px;
  padding: 11px;
}

.modes-drawer-menu > .modes-item-btn {
  min-width: 0;
  padding: 5px 10px;
  font-size: 12px;
}

/* v2.3 Breakable Titan Armor Bar inside #boss-hud-card */
#boss-armor-bar-wrap {
  margin-bottom: 5px;
  display: none;
  align-items: center;
}

.armor-bar-outer {
  position: relative;
  width: 100%;
  height: 17px;
  border-radius: 999px;
  background: #091526;
  border: 2px solid var(--c-ink);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.72);
}

#boss-armor-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: linear-gradient(90deg, #26B6FF 0%, #67F2D1 55%, #FFE14D 100%);
  transition: width 0.09s linear;
}

.armor-bar-outer.shattered {
  border-color: #FFE14D;
  box-shadow: 0 0 12px rgba(103, 242, 209, 0.78);
}

#boss-armor-text {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  color: #FFFFFF;
}

/* v2.9 Nightmare Mode Toggle Pill */
#btn-nightmare-toggle {
  min-height: 30px;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 11px;
}

#btn-nightmare-toggle.nightmare-on {
  background: linear-gradient(180deg, #FF7D81 0%, #E62E35 60%, #991B1B 100%);
  border-color: #FFE14D;
  box-shadow: 0 3px 0 var(--c-ink), 0 0 14px rgba(255, 89, 94, 0.85);
}

/* v2.5 World Raid, v2.6 Elemental Towers & v3.0 Cozy Pet Garden Full-Screen Modes */
#world-raid-screen,
#elemental-towers-screen,
#pet-garden-screen {
  position: fixed;
  inset: 0;
  z-index: 69;
  background: #0D1628;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px 2.4vw 12px;
}

#world-raid-screen.hidden,
#elemental-towers-screen.hidden,
#pet-garden-screen.hidden {
  display: none !important;
}

#raid-canvas,
#towers-canvas,
#garden-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}

.raid-bottom-drawer {
  width: 100%;
  display: flex;
  align-items: stretch;
}

.garden-bottom-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .modes-drawer-menu {
    grid-template-columns: 1fr;
    min-width: 220px;
  }
}

/* ==========================================================================
   v3.1 COMPACT 16:9 WIDESCREEN DENSITY GUARD (1920x1080 & 1280x720)
   Guarantees 1-row #top-hud (zero off-screen overflow!), zero Boss head clipping,
   and zero #archmage-spell-bar overlap on Battle Pads when all 24 features unlock!
   ========================================================================== */
#top-hud {
  min-height: 42px;
  gap: 6px;
}
.hud-cluster {
  gap: clamp(3px, 0.35vw, 6px);
}
.hud-pill {
  height: 38px;
  padding: 2px 9px;
}
.hud-pill-stage {
  padding: 2px 12px;
}
.hud-icon-btn {
  height: 38px;
  min-height: 38px;
  padding: 0 clamp(6px, 0.48vw, 9px);
  font-size: clamp(10px, 0.78vw, 12px);
  gap: 4px;
}
.hud-square-btn {
  width: 38px;
  height: 38px;
  min-height: 38px;
}

@media (max-height: 780px), (max-width: 1440px) {
  #game-shell {
    padding: 5px 10px 7px;
  }
  #top-hud {
    min-height: 36px;
    gap: 4px;
    flex-wrap: nowrap;
  }
  .hud-cluster {
    gap: 3px;
    flex-wrap: nowrap;
  }
  .hud-pill {
    height: 32px;
    padding: 2px 6px;
    gap: 3px;
  }
  .hud-pill-stage {
    padding: 2px 8px;
  }
  .hud-pill .ui-icon,
  .hud-pill .ui-icon-sm {
    width: 16px;
    height: 16px;
  }
  #hud-stage-text {
    font-size: 11.5px !important;
    line-height: 1.05;
  }
  #hud-zone-text {
    font-size: 8.5px !important;
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #hud-souls-val,
  #hud-gems-val,
  #hud-dps-val {
    font-size: 12px !important;
  }
  .hud-plus-btn {
    width: 18px;
    height: 18px;
    font-size: 12px;
  }
  .hud-icon-btn {
    height: 32px;
    min-height: 32px;
    padding: 0 4.5px;
    font-size: 9.2px;
    gap: 2.5px;
    border-radius: 9px;
    border-width: 2.5px;
  }
  .hud-icon-btn .ui-icon-sm {
    width: 13px;
    height: 13px;
  }
  .hud-square-btn {
    width: 30px;
    height: 30px;
    min-height: 30px;
    border-radius: 9px;
    border-width: 2.5px;
  }
  .notify-badge {
    top: -7px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 10px;
  }
  #widescreen-stage {
    margin: 5px 0;
    gap: 14px;
  }
  #forge-wing {
    padding: 8px 12px 10px;
  }
  .drag-tip-bar {
    font-size: 10.5px;
    margin-bottom: 4px;
  }
  #btn-summon {
    height: 48px;
    padding: 0 12px;
  }
  .forge-controls {
    margin-top: 5px;
    gap: 5px;
  }
  .forge-sub-actions {
    gap: 4px;
  }
  .forge-sub-actions > button {
    min-height: 36px;
    padding: 3px 5px;
    font-size: 10px;
    gap: 3px;
  }
  .forge-sub-actions .ui-icon-sm {
    width: 15px;
    height: 15px;
  }
  #boss-hud-card {
    padding: 6px 12px 7px;
    border-radius: 14px;
  }
  .boss-top-row {
    margin-bottom: 4px;
  }
  .hp-bar-outer {
    height: 18px;
  }
  .armor-bar-outer {
    height: 14px;
  }
  #boss-armor-bar-wrap {
    margin-bottom: 3px;
  }
  #boss-skill-bar-wrap {
    margin-top: 4px;
  }
  #formation-bar {
    top: 4px;
    left: 4px;
    padding: 3px 5px;
    gap: 4px;
  }
  .preset-btn, .preset-save-btn {
    min-height: 28px;
    padding: 2px 7px;
    font-size: 9.5px;
  }
  #relic-loadout-bar {
    top: 4px;
    right: 6px;
    padding: 3px 5px;
    gap: 4px;
  }
  .relic-socket-btn {
    width: 28px;
    height: 28px;
  }
  #synergy-badge-bar {
    top: 38px;
    left: 6px;
    gap: 4px;
  }
  .synergy-pill {
    padding: 2px 7px;
    font-size: 9.5px;
  }
  #archmage-spell-bar {
    bottom: 4px;
    left: 6px;
    gap: 4px;
    flex-wrap: nowrap;
  }
  .spell-chip-btn {
    min-height: 32px;
    padding: 2px 6px 2px 4px;
    gap: 4px;
    border-radius: 10px;
  }
  .spell-ring-wrap {
    width: 24px;
    height: 24px;
  }
  .spell-chip-icon {
    width: 17px;
    height: 17px;
  }
  .spell-cd-svg {
    width: 26px;
    height: 26px;
  }
  .spell-chip-name {
    display: none;
  }
  .spell-chip-status {
    font-size: 8.8px;
  }
  #battle-boost-strip {
    gap: 5px;
  }
  .boost-chip {
    height: 36px;
    min-height: 36px;
    padding: 2px 8px;
    font-size: 10.5px;
    border-radius: 11px;
  }
  #bottom-dock {
    gap: 10px;
  }
  .dock-btn {
    height: 44px;
    min-height: 44px;
    font-size: 13px;
    border-radius: 13px;
  }
}

@media (max-width: 1360px) {
  #game-shell {
    padding: 5px 8px 7px;
  }
  #top-hud {
    gap: 3px;
  }
  .hud-cluster {
    gap: 2.5px;
  }
  .hud-pill {
    padding: 2px 5px;
    gap: 2.5px;
  }
  .hud-pill-stage {
    padding: 2px 6px;
  }
  .hud-icon-btn {
    padding: 0 3.8px;
    font-size: 8.8px;
    gap: 2px;
  }
  .hud-square-btn {
    width: 28px;
    height: 28px;
    min-height: 28px;
  }
}

/* ==========================================================================
   PREVIEW-ONLY [DEV F2] ANIMATION & VFX SHOWCASE STUDIO
   ========================================================================== */
#dev-showcase-overlay {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: #0A1326;
  color: #E2F1F8;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
}

#dev-showcase-overlay.hidden {
  display: none;
}

.sc-topbar {
  min-height: 52px;
  padding: 6px 14px;
  background: linear-gradient(180deg, #16294A 0%, #0E1B33 100%);
  border-bottom: 2px solid #285A69;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sc-brand {
  font-family: var(--font-display);
  font-size: 16px;
  color: #FFE14D;
  -webkit-text-stroke: 1px #14121F;
  paint-order: stroke fill;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sc-tag {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: #38D95A;
  color: #0D1628;
  -webkit-text-stroke: 0;
}

.sc-controls-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sc-telemetry {
  font-family: monospace;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(10, 18, 34, 0.85);
  border: 1px solid #285A69;
  color: #67F2D1;
}

.sc-select {
  background: #142746;
  color: #FFFFFF;
  border: 1.5px solid #67B1B4;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.sc-main {
  flex: 1;
  min-height: 0;
  display: flex;
}

.sc-stage-wrap {
  flex: 1;
  min-width: 0;
  position: relative;
  background: #081020;
}

#dev-showcase-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.sc-sidebar {
  width: 396px;
  max-width: 42vw;
  background: #101D36;
  border-left: 2px solid #285A69;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sc-tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  background: #0C162B;
  border-bottom: 1.5px solid #223B5E;
}

.sc-tab-btn {
  flex: 1;
  padding: 7px 6px;
  border-radius: 8px;
  border: 1.5px solid #2C4A70;
  background: #16294A;
  color: #B8D4E8;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.sc-tab-btn.active {
  background: #FFE14D;
  color: #14121F;
  border-color: #14121F;
}

.sc-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sc-sec-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #67F2D1;
  margin-top: 4px;
  border-bottom: 1px solid rgba(103, 242, 209, 0.2);
  padding-bottom: 3px;
}

.sc-row { display: flex; gap: 6px; }
.sc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sc-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }

.sc-btn {
  background: #1A3154;
  color: #E8F6FF;
  border: 1.5px solid #325582;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
}

.sc-btn:hover { background: #23426F; border-color: #67F2D1; }
.sc-btn.active { background: #38D95A; color: #0E1B33; border-color: #14121F; font-weight: 900; }
.sc-btn.sc-gold { background: linear-gradient(180deg, #FFE14D, #FFBE0B); color: #14121F; border-color: #14121F; font-weight: 800; }
.sc-btn.sc-accent { background: linear-gradient(180deg, #A855F7, #7E22CE); color: #FFFFFF; border-color: #14121F; font-weight: 800; }
.sc-btn.sc-danger { background: #FF595E; color: #FFFFFF; border-color: #14121F; font-weight: 800; }

/* ==========================================================================
   v4.0.1 HOTFIX GUARDS ([VPS #2, #5, #6, #11])
   ========================================================================== */
body.ms-release #dev-f2-pill,
body.ms-release #debug-panel,
body.ms-release #dev-showcase-overlay {
  display: none !important;
  pointer-events: none !important;
}

.game-item-card .btn-claim-q,
#btn-claim-big-quest,
#btn-claim-all-quests {
  flex-shrink: 0;
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

#hud-dps-val.dps-cc-warn {
  color: #FF6B6B;
}

#celebration-content {
  max-width: min(94vw, 760px);
  overflow: visible;
}

#celebration-content h2.font-title {
  padding: 4px 14px;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
  line-height: 1.2;
}

/* v4.8 PC Accessibility Presets */
body.acc-high-contrast .font-num,
body.acc-high-contrast .font-title {
  -webkit-text-stroke: 2.4px #000000;
  text-shadow: 0 3px 0 #000000, 0 0 10px rgba(255, 255, 255, 0.45);
}
body.acc-reduced-flash .sunburst-bg {
  animation: none !important;
  opacity: 0.25;
}
