/* ==========================================================================
   Azure Spire: Stickman Clash — Commercial Vibrant Cartoon & Neon-Dusk GUI
   Visual Archetype: Play Store Vibrant Cartoon (Brawl Stars / Archero / Chibi)
   Palette Tokens: #201E3B, #272B57, #14122F, #463567, #FDF1F6, #84326C, #CE8BB7, #00E5FF, #FFE14D
   ========================================================================== */

:root {
  --bg-deep: #14122F;
  --bg-citadel: #201E3B;
  --bg-indigo: #272B57;
  --panel-dusk: #463567;
  --parchment: #FDF1F6;
  --ink: #020104;
  --ink-stroke: #1A1226;
  --blossom: #CE8BB7;
  --magenta-boss: #84326C;
  --azure: #00E5FF;
  --gold-accent: #FFE14D;
  --emerald: #38D95A;
  --coral: #FF595E;
  --text-light: #FDF1F6;
  --text-muted: #E7D4D4;
  --font-display: 'Lilita One', 'Luckiest Guy', 'Trebuchet MS', Impact, sans-serif;
  --font-body: 'Baloo 2', 'Segoe UI', system-ui, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-light);
  font-family: var(--font-body);
}

.hidden {
  display: none !important;
}

/* ── Strict CSS 9-Slice Chrome (NEVER background-size: 100% 100% or double borders!) ── */
.btn-9slice {
  box-sizing: border-box;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
  border-width: 18px 22px 17px 22px;
  border-image: url('../assets/ui/btn_primary.png') 215 195 191 198 fill / 18px 22px 17px 22px / 0 stretch;
  filter: none;
  font-family: var(--font-display);
  font-size: clamp(13px, 1.15vw, 17px);
  line-height: 1.15;
  color: #14121F;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 10px;
  position: relative;
  overflow: visible !important;
  transition: transform 110ms ease, filter 110ms ease;
}

.btn-9slice:hover:not(:disabled) {
  transform: translateY(-2px);
}

.btn-9slice:active:not(:disabled) {
  transform: translateY(2px);
}

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

.btn-9slice > .btn-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.panel-9slice {
  box-sizing: border-box;
  background: transparent;
  border-style: solid;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
  border-width: 36px 38px 36px 39px;
  border-image: url('../assets/ui/frame_panel.png') 289 303 291 311 fill / 36px 38px 36px 39px / 0 stretch;
  filter: none;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  color: #FFFFFF;
}

/* ── Red-Dot Notification Badge (NEVER Clipped!) ── */
button, .has-badge {
  overflow: visible !important;
  position: relative;
}

.notify-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FF8FA3 0%, #FF2A4B 65%, #99001C 100%);
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  z-index: 35;
  display: none;
  pointer-events: none;
}

.notify-badge.active {
  display: block;
  animation: badgePulse 1.4s infinite ease-in-out;
}

@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ── TITLE SCREEN ── */
.screen-title {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #14122F url('../assets/art/title_bg.jpg') center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 24px 36px 42px;
}

.screen-title::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(32, 30, 59, 0.18) 0%, rgba(14, 12, 34, 0.76) 100%);
  pointer-events: none;
}

.title-top-bar {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.util-pill-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 2.5px solid var(--ink-stroke);
  background: linear-gradient(180deg, #463567 0%, #272B57 100%);
  box-shadow: 0 4px 0 var(--ink-stroke);
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: transform 100ms ease, filter 100ms ease;
}

.util-pill-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.util-pill-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink-stroke); }

.title-center-hero {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 780px;
}

.title-logo-kicker {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 999px;
  background: rgba(132, 50, 108, 0.85);
  border: 2px solid var(--blossom);
  color: var(--gold-accent);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.title-main-heading {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.04;
  color: var(--gold-accent);
  -webkit-text-stroke: 2.5px var(--ink-stroke);
  text-shadow: 0 6px 0 var(--ink-stroke), 0 12px 26px rgba(0, 0, 0, 0.6);
}

.title-sub-heading {
  margin: 10px 0 0;
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 800;
  color: var(--parchment);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
}

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

.title-loading-wrap {
  width: min(420px, 84vw);
  text-align: center;
}

.title-loading-track {
  width: 100%;
  height: 22px;
  border-radius: 999px;
  background: rgba(20, 18, 47, 0.9);
  border: 3px solid var(--ink-stroke);
  padding: 2px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55);
}

.title-loading-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #00E5FF 0%, #CE8BB7 55%, #FFE14D 100%);
  transition: width 140ms ease-out;
}

.title-loading-label {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 15px;
  color: #FFFFFF;
  -webkit-text-stroke: 1px var(--ink-stroke);
}

.title-play-btn {
  min-width: 248px;
  min-height: 68px;
  font-size: clamp(20px, 2vw, 28px);
}

/* ── 16:9 3-COLUMN WIDESCREEN GAME SHELL (>= 96% Viewport Width!) ── */
.screen-game {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-citadel);
}

.top-command-bar {
  height: 60px;
  flex-shrink: 0;
  width: 100%;
  background: linear-gradient(180deg, #272B57 0%, #1B1838 100%);
  border-bottom: 3px solid var(--ink);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 40;
}

.hud-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-selector-pill {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: linear-gradient(180deg, #463567 0%, #2B2144 100%);
  box-shadow: 0 3px 0 var(--ink);
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.stage-selector-pill:hover { filter: brightness(1.1); }
.stage-selector-title {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--gold-accent);
  line-height: 1.05;
}
.stage-selector-sub {
  font-size: 11px;
  font-weight: 700;
  color: var(--blossom);
  line-height: 1.1;
}

.hud-stat-pill {
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: rgba(20, 18, 47, 0.88);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 16px;
  color: #FFFFFF;
  -webkit-text-stroke: 1.1px var(--ink-stroke);
  text-shadow: 0 2px 0 var(--ink-stroke);
  font-variant-numeric: tabular-nums;
}

.hud-stat-pill.hud-punch {
  animation: hudPunch 240ms ease-out;
}

@keyframes hudPunch {
  0% { transform: scale(1); }
  45% { transform: scale(1.24); }
  100% { transform: scale(1); }
}

.hud-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.hud-add-mini {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #38D95A 0%, #16A34A 100%);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.giant-gauge-pill {
  width: 146px;
  height: 42px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: rgba(20, 18, 47, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.giant-gauge-track {
  width: 100%;
  height: 9px;
  border-radius: 99px;
  background: #14122F;
  overflow: hidden;
  border: 1.5px solid var(--ink);
}

.giant-gauge-fill {
  height: 100%;
  width: 25%;
  background: linear-gradient(90deg, #00E5FF 0%, #FFE14D 100%);
  transition: width 200ms ease-out;
}

.giant-gauge-lbl {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--azure);
  text-align: center;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tactical Hotkey Buttons */
.tactical-btn {
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: linear-gradient(180deg, #3A2E5C 0%, #241C3D 100%);
  box-shadow: 0 3px 0 var(--ink);
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: clamp(12px, 1vw, 14px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 100ms ease, filter 100ms ease;
}

.tactical-btn:hover { filter: brightness(1.12); transform: translateY(-1px); }
.tactical-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.tactical-btn.is-active {
  background: linear-gradient(180deg, #00E5FF 0%, #0284C7 100%);
  color: #14121F;
}

.tactical-btn.shop-cta-btn {
  position: relative;
  padding-right: 16px;
  background: linear-gradient(180deg, #FFE14D 0%, #F59E0B 100%);
  color: #14121F;
  box-shadow: 0 3px 0 var(--ink), 0 0 12px rgba(255, 225, 77, 0.52);
}

.tactical-btn.daily-cta-btn {
  position: relative;
  padding-right: 16px;
  overflow: visible !important;
  background: linear-gradient(180deg, #38BDF8 0%, #0284C7 100%);
  color: #14121F;
}

.tactical-btn:disabled {
  opacity: 0.56;
  cursor: default;
  filter: none;
  transform: none;
}

.tactical-btn.next-cta-btn {
  background: linear-gradient(180deg, #38D95A 0%, #16A34A 100%);
  color: #14121F;
}

.tactical-btn.quit-cta-btn {
  background: linear-gradient(180deg, #84326C 0%, #581C4B 100%);
}

.hotkey-chip {
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.38);
  color: var(--gold-accent);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
}

.tactical-btn > .btn-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#btn-hud-mute.is-muted svg .sound-waves {
  display: none;
}

/* ── MAIN 3-COLUMN ARENA GRID ── */
.widescreen-3col {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: clamp(224px, 18vw, 256px) minmax(0, 1fr) clamp(224px, 18vw, 256px);
  gap: 10px;
  padding: 10px 12px;
}

.side-column {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  overflow-x: visible;
  padding-right: 2px;
}

.side-column::-webkit-scrollbar { width: 5px; }
.side-column::-webkit-scrollbar-thumb { background: rgba(206, 139, 183, 0.4); border-radius: 99px; }

.side-card {
  background: linear-gradient(180deg, rgba(70, 53, 103, 0.92) 0%, rgba(32, 30, 59, 0.95) 100%);
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  padding: 9px 10px;
  box-shadow: 0 4px 0 rgba(2, 1, 4, 0.65);
  position: relative;
  overflow: visible !important;
}

.side-card.pulse-focus {
  animation: focusGlow 900ms ease-out;
}

@keyframes focusGlow {
  0%, 100% { box-shadow: 0 4px 0 rgba(2, 1, 4, 0.65); }
  50% { box-shadow: 0 0 0 3px var(--azure), 0 0 22px var(--azure); }
}

.side-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 7px;
}

.side-card-title {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold-accent);
  -webkit-text-stroke: 1px var(--ink-stroke);
  text-shadow: 0 2px 0 var(--ink-stroke);
  letter-spacing: 0.3px;
}

.mini-lock-pill {
  padding: 1px 7px;
  border-radius: 99px;
  background: rgba(20, 18, 47, 0.8);
  border: 1px solid var(--blossom);
  font-size: 11px;
  font-weight: 800;
  color: var(--blossom);
}

/* Left Column: Arsenal, Ally Bench, Keep Upgrades */
.arsenal-sub-note {
  font-size: 10.5px;
  color: var(--blossom);
  margin: -2px 0 5px;
  font-weight: 700;
}

.arsenal-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.arsenal-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 10px;
  background: rgba(20, 18, 47, 0.62);
  border: 1.5px solid rgba(206, 139, 183, 0.25);
}

.arsenal-item.active {
  background: rgba(0, 229, 255, 0.16);
  border-color: var(--azure);
}

.arsenal-item.owned {
  border-color: rgba(56, 217, 90, 0.42);
}

.arsenal-item.locked {
  opacity: 0.72;
  background: rgba(14, 12, 28, 0.55);
  border-style: dashed;
}

.arsenal-item.locked .arsenal-icon {
  filter: grayscale(0.9) opacity(0.75);
}

.arsenal-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.arsenal-meta {
  flex: 1;
  min-width: 0;
}

.arsenal-name {
  font-size: 11.5px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--parchment);
  white-space: normal;
  overflow-wrap: break-word;
}

.arsenal-counter {
  font-size: 10.5px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--azure);
}

.arsenal-tag {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--azure);
  color: #14121F;
  font-size: 10px;
  font-weight: 800;
  flex-shrink: 0;
}

.arsenal-equip-btn {
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1.5px solid var(--ink);
  background: linear-gradient(180deg, #38D95A 0%, #16A34A 100%);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 10.5px;
  cursor: pointer;
  flex-shrink: 0;
}

.arsenal-unlock-btn {
  height: 24px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1.5px solid var(--ink);
  background: linear-gradient(180deg, #FFE14D 0%, #F59E0B 100%);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 10.5px;
  cursor: pointer;
  flex-shrink: 0;
}

.arsenal-lock-tag {
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #C2A8B3;
  font-size: 9.5px;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}

.active-ward-banner {
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(0, 229, 255, 0.16);
  border: 1.5px solid var(--azure);
  color: #00E5FF;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.ally-bench-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ally-bench-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 10px;
  background: rgba(20, 18, 47, 0.72);
  border: 1.5px solid rgba(0, 229, 255, 0.35);
}

.ally-bench-top {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.ally-bench-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.ally-bench-card.used {
  opacity: 0.52;
  border-color: rgba(255, 255, 255, 0.15);
}

.ally-bench-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: contain;
  border: 1.5px solid var(--azure);
  background: #14122F;
  flex-shrink: 0;
}

.ally-swap-btn {
  width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 7px;
  border: 1.8px solid var(--ink);
  background: linear-gradient(180deg, #3B3168 0%, #272B57 100%);
  color: #FFE14D;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.squad-portrait-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  object-fit: contain;
  border: 2px solid var(--azure);
  background: #14122F;
  flex-shrink: 0;
}

.ally-bench-info {
  flex: 1;
  min-width: 0;
}

.ally-bench-name {
  font-size: 11px;
  line-height: 1.2;
  font-weight: 800;
  color: #FFFFFF;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

.ally-bench-desc {
  font-size: 9.5px;
  line-height: 1.2;
  color: var(--blossom);
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.ally-use-btn {
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #38D95A 0%, #16A34A 100%);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 10.5px;
  cursor: pointer;
  flex-shrink: 0;
}

.ally-use-btn:disabled {
  background: #374151;
  color: #9CA3AF;
  cursor: default;
}

.idle-collect-btn {
  width: 100%;
  height: 34px;
  margin-bottom: 7px;
  border-radius: 9px;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #FFE14D 0%, #F59E0B 100%);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 12px;
  cursor: pointer;
}

.keep-upgrades-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.keep-up-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  border-radius: 9px;
  background: rgba(20, 18, 47, 0.65);
}

.keep-up-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.keep-up-meta {
  flex: 1;
  min-width: 0;
}

.keep-up-name {
  font-size: 11.5px;
  line-height: 1.2;
  font-weight: 800;
  white-space: normal;
  overflow-wrap: break-word;
}

.keep-up-lv {
  font-size: 10.5px;
  color: var(--azure);
  font-weight: 700;
}

.keep-buy-btn {
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: #374151;
  color: #D1D5DB;
  font-family: var(--font-display);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: not-allowed;
  flex-shrink: 0;
}

.keep-buy-btn.affordable {
  background: linear-gradient(180deg, #FFE14D 0%, #F59E0B 100%);
  color: #14121F;
  cursor: pointer;
}

.mini-coin {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.locked-box-notice, .empty-hint {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
  background: rgba(20, 18, 47, 0.55);
  border-radius: 9px;
  padding: 8px 9px;
  text-align: center;
}

/* ── CENTER CANVAS ARENA ── */
.center-arena-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  border-radius: 16px;
  border: 3px solid var(--ink);
  overflow: hidden;
  background: var(--bg-deep);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
}

#arena-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: pointer;
}

/* Non-blocking FTUE Tutorial Banner */
.tutorial-banner {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, 94%);
  background: linear-gradient(180deg, rgba(39, 43, 87, 0.96) 0%, rgba(20, 18, 47, 0.96) 100%);
  border: 2.5px solid var(--azure);
  border-radius: 14px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 30;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.65);
}

.tutorial-step-badge {
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--azure);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 12px;
  flex-shrink: 0;
}

.tutorial-step-text {
  flex: 1;
  font-size: 13.5px;
  font-weight: 700;
  color: #FFFFFF;
}

.tutorial-btn {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 12px;
  cursor: pointer;
}

.tutorial-btn.primary {
  background: linear-gradient(180deg, #FFE14D 0%, #F59E0B 100%);
  color: #14121F;
}

.tutorial-btn.ghost {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
}

/* Victory / Defeat Result Overlay inside Arena */
.result-overlay {
  position: absolute;
  inset: 0;
  z-index: 38;
  background: rgba(12, 10, 26, 0.80);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.result-card {
  width: min(580px, 96%);
  margin-top: 38px;
  text-align: center;
  animation: modalSpring 240ms cubic-bezier(0.22, 1.35, 0.36, 1);
}

.result-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(26px, 2.8vw, 38px);
  color: var(--gold-accent);
  -webkit-text-stroke: 2px var(--ink-stroke);
  text-shadow: 0 4px 0 var(--ink-stroke);
}

.result-overlay.is-defeat .result-title {
  color: var(--coral);
}

.result-rewards-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.result-loot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(20, 18, 47, 0.85);
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
}

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

.result-actions-grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.result-actions-grid.cols-3 .btn-9slice {
  border-width: 13px 14px 13px 14px;
  border-image-width: 13px 14px 13px 14px;
  padding: 0 6px;
  min-height: 46px;
  font-size: clamp(12px, 1.05vw, 15px);
}

.result-actions-grid > * {
  min-width: 0;
  max-width: 100%;
}

/* ── RIGHT COLUMN: MODES, MATH LOG, PIGGY BANK, VANGUARD RAID ── */
.mode-switcher-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mode-switch-btn {
  width: 100%;
  padding: 7px 16px 7px 9px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: rgba(20, 18, 47, 0.72);
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  transition: transform 100ms ease, border-color 100ms ease;
}

.mode-switch-btn:hover { transform: translateY(-1px); border-color: var(--blossom); }
.mode-switch-btn.active-mode {
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.22) 0%, rgba(70, 53, 103, 0.85) 100%);
  border-color: var(--azure);
}
.mode-switch-btn.is-locked { opacity: 0.68; }

.mode-btn-info { flex: 1; min-width: 0; }
.mode-btn-name {
  font-family: var(--font-display);
  font-size: 12.5px;
  line-height: 1.18;
  color: #FFFFFF;
  white-space: normal;
  overflow-wrap: break-word;
}
.mode-btn-sub {
  font-size: 10.5px;
  line-height: 1.18;
  font-weight: 700;
  color: var(--blossom);
  white-space: normal;
  overflow-wrap: break-word;
}

.math-log-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 128px;
  overflow-y: auto;
}

.math-log-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 4px 7px;
  border-radius: 7px;
  background: rgba(20, 18, 47, 0.65);
  font-size: 11px;
  line-height: 1.25;
  font-weight: 700;
}

.math-step {
  color: var(--gold-accent);
  font-family: var(--font-display);
  flex-shrink: 0;
}

.math-expr {
  color: var(--parchment);
  white-space: normal;
  overflow-wrap: anywhere;
}

.progress-bar-wrap {
  width: 100%;
  height: 12px;
  border-radius: 99px;
  background: #14122F;
  border: 2px solid var(--ink);
  overflow: hidden;
  margin: 5px 0 7px;
}

.progress-bar-fill {
  height: 100%;
  width: 30%;
  background: linear-gradient(90deg, #CE8BB7 0%, #FFE14D 100%);
  transition: width 220ms ease-out;
}

.progress-bar-fill.raid-fill {
  background: linear-gradient(90deg, #FF595E 0%, #84326C 100%);
}

.meta-stat-line {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
}

.full-w-cta {
  width: 100%;
  min-height: 44px;
  font-size: 13px;
}

/* ── 4-PHASE ULTIMATE CUT-IN OVERLAY (`js/cutin.js`) ── */
.cutin-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cutin-scrim {
  position: absolute;
  top: 60px; /* Keeps Top Command Bar Power HUD readable! */
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(14, 12, 26, 0.46);
}

.cutin-band {
  position: relative;
  width: 106vw;
  height: 186px;
  background: linear-gradient(95deg, #14122F 0%, #463567 42%, #84326C 78%, #00E5FF 100%);
  border-top: 4px solid var(--gold-accent);
  border-bottom: 4px solid var(--ink);
  transform: rotate(-3deg) translateX(-110%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}

.cutin-overlay.theme-boss .cutin-band {
  background: linear-gradient(95deg, #14122F 0%, #581C4B 45%, #B91C1C 85%, #FFE14D 100%);
}

.cutin-overlay.active .cutin-band {
  animation: cutinSweep var(--cutin-dur, 420ms) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cutinSweep {
  0% { transform: rotate(-3deg) translateX(-105%); opacity: 0.4; }
  22% { transform: rotate(-3deg) translateX(0%); opacity: 1; }
  78% { transform: rotate(-3deg) translateX(2%); opacity: 1; }
  100% { transform: rotate(-3deg) translateX(105%); opacity: 0; }
}

.cutin-portrait-wrap {
  width: 168px;
  height: 168px;
  flex-shrink: 0;
  filter: none;
}

.cutin-portrait-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cutin-actor-tag {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1.2px;
  color: var(--azure);
  text-transform: uppercase;
}

.cutin-skill-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 44px);
  color: var(--gold-accent);
  -webkit-text-stroke: 2.2px var(--ink-stroke);
  text-shadow: 0 5px 0 var(--ink-stroke);
}

/* ── SPRING MODALS & OVERFLOW-SAFE `minmax(0, 1fr)` GRIDS ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10, 8, 24, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease-out;
}

.modal-backdrop.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-underlay-inert,
.modal-underlay-inert * {
  pointer-events: none !important;
}

.modal-underlay-inert [data-modal-inert-disabled="1"]:disabled {
  opacity: 1 !important;
  filter: none !important;
}

.tutorial-banner.result-occluded {
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal-window {
  width: min(880px, 94vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.modal-backdrop.open .modal-window {
  transform: none;
}

@keyframes modalSpring {
  0% { transform: scale(0.84); opacity: 0; }
  70% { transform: scale(1.04); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.modal-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(22px, 2.2vw, 30px);
  color: var(--gold-accent);
  -webkit-text-stroke: 1.8px var(--ink-stroke);
  text-shadow: 0 3px 0 var(--ink-stroke);
}

.modal-close-btn {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 2.5px solid var(--ink);
  background: linear-gradient(180deg, #FF595E 0%, #B91C1C 100%);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 18px;
  cursor: pointer;
}

.modal-body {
  overflow-y: auto;
  max-height: calc(88vh - 130px);
  padding: 14px 6px 10px 4px;
}

/* Giftcode & 7-Day Daily Check-in */
.giftcode-redeem-box {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(20, 18, 47, 0.85);
  border: 2px solid rgba(0, 229, 255, 0.35);
}

.giftcode-hdr {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold-accent);
  margin-bottom: 6px;
}

.giftcode-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.giftcode-input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 2px solid var(--blossom);
  background: #0F0D24;
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.giftcode-input:focus {
  border-color: var(--azure);
}

.giftcode-submit-btn {
  height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #FFE14D 0%, #F59E0B 100%);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 13px;
  cursor: pointer;
  flex-shrink: 0;
}

.giftcode-msg {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
}

.giftcode-msg.is-ok { color: #38D95A; }
.giftcode-msg.is-err { color: #FF595E; }

.daily-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(20, 18, 47, 0.78);
  border: 1.5px solid rgba(0, 229, 255, 0.35);
}

.daily-streak-pill {
  font-size: 13px;
  color: var(--azure);
}

.daily-sub-note {
  font-size: 12px;
  color: var(--text-muted);
}

.daily-grid-7 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.daily-day-card {
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(20, 18, 47, 0.85);
  border: 2px solid rgba(206, 139, 183, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
}

.daily-day-card.is-grand {
  grid-column: span 2;
  background: linear-gradient(180deg, rgba(132, 50, 108, 0.65) 0%, rgba(20, 18, 47, 0.92) 100%);
  border-color: var(--gold-accent);
}

.daily-day-card.is-today {
  border-color: var(--azure);
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.35);
}

.daily-day-card.claimed {
  opacity: 0.62;
  border-color: #38D95A;
}

.daily-day-num {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--gold-accent);
}

.daily-day-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.daily-day-rw {
  font-size: 11.5px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
}

.daily-day-status {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: var(--blossom);
}

.daily-day-card.is-today .daily-day-status {
  background: var(--azure);
  color: #14121F;
}

.daily-day-card.claimed .daily-day-status {
  background: #38D95A;
  color: #14121F;
}

.daily-cta-row {
  display: flex;
  justify-content: center;
}

.daily-claim-btn {
  min-width: 240px;
}

/* CRITICAL MODAL GRID CONTAINMENT LAW */
.modal-grid {
  display: grid;
  gap: 12px;
}

.modal-grid > * {
  min-width: 0;
  max-width: 100%;
}

.shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mod-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lang-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stage-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.raid-tier-grid { grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 8px; }

/* Supply Store Cards */
.shop-card {
  position: relative;
  background: linear-gradient(180deg, rgba(70, 53, 103, 0.92) 0%, rgba(20, 18, 47, 0.95) 100%);
  border: 2.5px solid var(--blossom);
  border-radius: 14px;
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.shop-ribbon {
  position: absolute;
  top: -9px;
  right: 8px;
  padding: 2px 9px;
  border-radius: 99px;
  border: 2px solid var(--ink);
  font-family: var(--font-display);
  font-size: 11px;
  color: #14121F;
  background: var(--gold-accent);
  z-index: 4;
}

.shop-ribbon.badge-popular { background: var(--azure); }
.shop-ribbon.badge-best { background: #38D95A; }

.shop-art-wrap {
  width: 96px;
  height: 96px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-art-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: none;
}

.shop-card-name {
  font-family: var(--font-display);
  font-size: 15px;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.shop-card-desc {
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 8px;
}

.shop-buy-btn {
  width: 100%;
  min-height: 46px;
}

/* Campaign Map Nodes */
.biome-section { margin-bottom: 14px; }
.biome-hdr {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--azure);
  margin-bottom: 6px;
}

.stage-node-btn {
  height: 58px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: rgba(39, 43, 87, 0.9);
  color: #FFFFFF;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.stage-node-btn.cleared { background: rgba(22, 163, 74, 0.35); border-color: #38D95A; }
.stage-node-btn.current { border-color: var(--gold-accent); box-shadow: 0 0 12px rgba(255, 225, 77, 0.5); }
.stage-node-btn.boss-node { background: rgba(132, 50, 108, 0.65); }
.stage-node-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.stage-num { font-family: var(--font-display); font-size: 17px; display: inline-flex; align-items: center; gap: 4px; }
.stage-sub { font-size: 10.5px; font-weight: 800; color: var(--gold-accent); }
.mini-crown { width: 16px; height: 16px; object-fit: contain; }

/* Event & Raid Modals */
.event-mod-card {
  background: rgba(20, 18, 47, 0.78);
  border: 2px solid var(--blossom);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.event-mod-card.selected { border-color: var(--azure); }
.event-mod-icon { width: 48px; height: 48px; object-fit: contain; margin-bottom: 6px; }
.event-mod-name { font-family: var(--font-display); font-size: 15px; color: var(--gold-accent); }
.event-mod-desc { font-size: 12px; color: var(--text-muted); flex: 1; margin: 5px 0 8px; }
.event-play-btn { width: 100%; min-height: 44px; }

.weekly-pass-bar {
  margin: 12px 0 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(132, 50, 108, 0.45);
  border: 1.5px solid var(--blossom);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pass-unlock-btn, .ms-claim-btn, .secondary-cartoon-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #FFE14D 0%, #F59E0B 100%);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 13px;
  cursor: pointer;
}

.ms-claim-btn:disabled { background: #374151; color: #9CA3AF; cursor: default; }

.raid-boss-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(20, 18, 47, 0.8);
  border: 2px solid var(--magenta-boss);
  margin-bottom: 10px;
}

.raid-boss-portrait { width: 84px; height: 84px; object-fit: contain; flex-shrink: 0; }
.raid-boss-info { flex: 1; min-width: 0; }
.raid-boss-name { font-family: var(--font-display); font-size: 18px; color: var(--gold-accent); }
.raid-boss-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.raid-hp-bar { height: 14px; border-radius: 99px; background: #14122F; border: 2px solid var(--ink); overflow: hidden; }
.raid-hp-fill { height: 100%; background: linear-gradient(90deg, #FF595E 0%, #FFE14D 100%); }
.raid-dmg-stat { font-size: 12px; font-weight: 800; color: var(--azure); margin-top: 4px; }

.milestone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(20, 18, 47, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
}
.milestone-row.ready { border-color: #38D95A; background: rgba(56, 217, 90, 0.12); }
.ms-req { font-family: var(--font-display); font-size: 14px; color: var(--gold-accent); }
.ms-rw { font-size: 13px; font-weight: 700; flex: 1; text-align: center; }

/* Settings Modal */
.settings-form { display: flex; flex-direction: column; gap: 10px; }
.settings-section-lbl { font-family: var(--font-display); font-size: 15px; color: var(--azure); }

.lang-option-btn {
  height: 40px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: rgba(20, 18, 47, 0.78);
  color: var(--text-light);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}
.lang-option-btn.active {
  background: linear-gradient(180deg, #00E5FF 0%, #0284C7 100%);
  color: #14121F;
}

.settings-slider-row, .settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(20, 18, 47, 0.68);
}

.settings-row-lbl { width: 130px; font-weight: 800; font-size: 13.5px; }
.settings-range { flex: 1; accent-color: var(--azure); cursor: pointer; }
.settings-pct { width: 44px; text-align: right; font-family: var(--font-display); font-size: 13px; }

.settings-mute-pill, .toggle-switch {
  min-width: 58px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: #38D95A;
  color: #14121F;
  font-family: var(--font-display);
  font-size: 12px;
  cursor: pointer;
}
.settings-mute-pill.muted, .toggle-switch:not(.on) {
  background: #4B5563;
  color: #E5E7EB;
}

.settings-toggles-list { display: flex; flex-direction: column; gap: 6px; }
.settings-footer-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.modal-quick-links-bar { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.arsenal-item.trial { border-color: #FFE14D; background: rgba(120, 53, 15, 0.42); }

/* ── 3-BEAT CHEST CELEBRATION, CLICK JUICE & BEZIER FLYERS (`js/celebrations.js`) ── */
.chest-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chest-scrim { position: absolute; inset: 0; background: rgba(8, 10, 24, 0.86); }
.chest-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.chest-sunburst {
  position: absolute;
  top: -40px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(255, 225, 77, 0.28) 0deg 15deg, transparent 15deg 30deg);
  opacity: 0;
  pointer-events: none;
}
.chest-modal.beat-2 .chest-sunburst, .chest-modal.beat-3 .chest-sunburst {
  opacity: 1;
  animation: spinSun 9s linear infinite;
}
@keyframes spinSun { to { transform: rotate(360deg); } }

.chest-burst-canvas {
  position: absolute;
  top: -36px;
  pointer-events: none;
}

.chest-sprite {
  width: 148px;
  height: 148px;
  object-fit: contain;
  position: relative;
  z-index: 3;
}
.chest-modal.beat-1 .chest-sprite {
  animation: chestJiggle 220ms infinite alternate ease-in-out;
}
@keyframes chestJiggle {
  0% { transform: scale(1.06, 0.92) rotate(-4deg); }
  100% { transform: scale(0.94, 1.08) rotate(4deg); }
}

.chest-title {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--gold-accent);
  -webkit-text-stroke: 1.8px var(--ink-stroke);
  margin: 8px 0 12px;
}

.chest-cards-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.chest-reward-card {
  width: 124px;
  padding: 12px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, #463567 0%, #1B1734 100%);
  border: 2.5px solid var(--gold-accent);
  animation: modalSpring 260ms cubic-bezier(0.22, 1.35, 0.36, 1) backwards;
}
.chest-reward-icon { width: 46px; height: 46px; object-fit: contain; }
.chest-reward-amt { font-family: var(--font-display); font-size: 20px; color: #FFFFFF; margin-top: 4px; }
.chest-reward-lbl { font-size: 12px; font-weight: 800; color: var(--blossom); }

.ba-click-fx {
  position: fixed;
  pointer-events: none;
  z-index: 9800;
}
.ba-click-ring {
  position: absolute;
  left: -24px;
  top: -24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--azure);
  animation: clickRing 380ms ease-out forwards;
}
@keyframes clickRing {
  0% { transform: scale(0.2); opacity: 1; }
  100% { transform: scale(1.45); opacity: 0; }
}
.ba-click-spark {
  position: absolute;
  width: 12px;
  height: 3px;
  background: var(--gold-accent);
  border-radius: 99px;
  transform-origin: left center;
  animation: clickSpark 380ms ease-out forwards;
}
@keyframes clickSpark {
  0% { transform: rotate(var(--spark-deg)) translateX(4px) scaleX(1); opacity: 1; }
  100% { transform: rotate(var(--spark-deg)) translateX(28px) scaleX(0.2); opacity: 0; }
}

.flying-currency-icon {
  position: fixed;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  object-fit: contain;
  pointer-events: none;
  z-index: 9600;
}

/* Unlock Toast & Game Toast */
.unlock-toast {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 420;
  background: linear-gradient(90deg, #272B57 0%, #84326C 100%);
  border: 2.5px solid var(--gold-accent);
  border-radius: 14px;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
}
.unlock-toast-icon { width: 38px; height: 38px; object-fit: contain; }
.unlock-toast-kicker { font-size: 11px; font-weight: 800; color: var(--gold-accent); }
.unlock-toast-name { font-family: var(--font-display); font-size: 16px; color: #FFFFFF; }
.unlock-toast-btn {
  height: 32px; padding: 0 12px; border-radius: 8px; border: 2px solid var(--ink);
  background: var(--azure); color: #14121F; font-family: var(--font-display); cursor: pointer;
}

.game-toast {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 450;
  background: rgba(20, 18, 47, 0.95);
  border: 2px solid var(--blossom);
  border-radius: 99px;
  padding: 6px 18px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold-accent);
  pointer-events: none;
}

/* ── PREVIEW-ONLY `[DEV F2]` STUDIO ── */
.dev-f2-pill {
  position: fixed;
  bottom: 8px;
  left: 8px;
  z-index: 9000;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1.5px solid var(--azure);
  background: rgba(14, 12, 28, 0.85);
  color: var(--azure);
  font-family: monospace;
  font-size: 11px;
  cursor: pointer;
}

.debug-panel {
  position: fixed;
  bottom: 38px;
  left: 8px;
  width: 340px;
  z-index: 9001;
  background: rgba(14, 12, 28, 0.96);
  border: 2px solid var(--azure);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.8);
}

.debug-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
  font-weight: 700;
  font-size: 12px;
  color: var(--gold-accent);
  margin-bottom: 8px;
}
.dbg-close-btn { background: transparent; border: none; color: #FFF; cursor: pointer; font-size: 14px; }
.debug-subhdr { font-size: 11px; font-weight: 800; color: var(--blossom); margin: 8px 0 5px; }
.debug-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.debug-grid button {
  padding: 5px 6px;
  border-radius: 6px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: #272B57;
  color: #FFF;
  font-size: 11px;
  cursor: pointer;
}
.debug-grid button:hover { background: #463567; }

/* ── RESPONSIVE 1280x720 COMPACT TOP COMMAND BAR (ZERO CLIPPING / OVERFLOW!) ── */
@media (max-width: 1460px) {
  .top-command-bar {
    height: 56px;
    padding: 0 8px;
    gap: 5px;
  }
  .hud-cluster {
    gap: 4px;
    min-width: 0;
  }
  .stage-selector-pill {
    height: 40px;
    padding: 0 8px;
    flex-shrink: 0;
  }
  .stage-selector-title { font-size: 13px; white-space: nowrap; }
  .stage-selector-sub { font-size: 10px; white-space: nowrap; }
  .hud-stat-pill {
    height: 38px;
    padding: 0 7px;
    gap: 4px;
    font-size: 13.5px;
    flex-shrink: 0;
  }
  .hud-icon {
    width: 20px;
    height: 20px;
  }
  .giant-gauge-pill {
    width: 102px;
    height: 38px;
    padding: 3px 7px;
    flex-shrink: 0;
  }
  .giant-gauge-lbl { font-size: 10px; }
  .tactical-btn {
    height: 40px;
    padding: 0 8px;
    gap: 4px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .tactical-btn.daily-cta-btn,
  .tactical-btn.shop-cta-btn {
    padding: 0 14px 0 8px;
  }
  .hotkey-chip {
    padding: 1px 4px;
    font-size: 10px;
  }
}

/* ── STUDIO ANNOUNCEMENTS, CROSS-PROMO & ARSENAL 11-ELEMENT VFX SWATCHES ── */
.studio-meta-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 2px;
}

.studio-meta-pill {
  height: 30px;
  padding: 0 4px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #3A2E5C 0%, #241C3D 100%);
  color: #FDF1F6;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 11px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.studio-meta-pill.promo-pill {
  background: linear-gradient(180deg, #7C3AED 0%, #4C1D95 100%);
  color: #FFE14D;
}

.studio-meta-pill:hover { filter: brightness(1.14); }

.announcements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0;
}

.announce-card, .promo-card {
  padding: 12px 14px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: rgba(20, 18, 47, 0.85);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.announce-card-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.announce-tag {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.18);
  border: 1.5px solid var(--azure);
  color: var(--azure);
  font-family: var(--font-display);
  font-size: 11px;
}

.announce-date {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.announce-title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--gold-accent);
}

.announce-body {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-light);
}

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

.promo-actions {
  margin-top: 6px;
}

.forge-vfx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 800;
  color: #FDF1F6;
}

.forge-vfx-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid #FFFFFF;
  flex-shrink: 0;
}

.forge-act-btn.vfx-preview-btn {
  background: linear-gradient(180deg, #0EA5E9 0%, #0369A1 100%);
  color: #FFFFFF;
}

.arsenal-lock-tag.is-trial {
  color: #FFE14D;
  border-color: #FFE14D;
}

/* ── RESPONSIVE `< 980px` FALLBACK ── */
@media (max-width: 980px) {
  .widescreen-3col {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 1fr) auto;
    overflow-y: auto;
  }
  .side-column {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .side-card {
    flex: 1 1 240px;
  }
  .shop-grid, .mod-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


/* ═══════════════════════════════════════════════════════════════════════════
   SEASONS 2–4 (v2.1 → v5.0) — FORGE, EVENT PASS, TRIALS, HALL & RAID UI
   ═══════════════════════════════════════════════════════════════════════════ */

.title-season-pill {
  margin-top: 12px;
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(20, 18, 47, 0.88);
  border: 2px solid var(--azure);
  color: var(--azure);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.4px;
}

.shard-hud-pill {
  cursor: pointer;
  border-color: #C084FC;
  background: linear-gradient(180deg, rgba(88, 28, 135, 0.88) 0%, rgba(20, 18, 47, 0.92) 100%);
  transition: transform 100ms ease, filter 100ms ease;
}
.shard-hud-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.12);
}

.mini-action-pill {
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 8px;
  border: 1.5px solid var(--ink);
  background: linear-gradient(180deg, #00E5FF 0%, #0284C7 100%);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
}
.mini-action-pill:hover { filter: brightness(1.1); }

.mythic-cleave-btn {
  width: 100%;
  min-height: 34px;
  margin-bottom: 6px;
  padding: 4px 8px;
  border-radius: 9px;
  border: 2px solid var(--ink);
  background: linear-gradient(90deg, #7E22CE 0%, #C084FC 50%, #F43F5E 100%);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
}
.mythic-cleave-btn:disabled {
  filter: grayscale(0.8) opacity(0.6);
  cursor: default;
}

.raid-dual-btns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.raid-mini-btn {
  width: 100%;
  min-height: 34px;
  padding: 4px 6px;
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

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

.modal-tab-btn {
  min-height: 36px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 2px solid var(--ink);
  background: rgba(20, 18, 47, 0.82);
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 13px;
  cursor: pointer;
}
.modal-tab-btn.active {
  background: linear-gradient(180deg, #00E5FF 0%, #0284C7 100%);
  color: #14121F;
}

.ascension-tier-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: rgba(20, 18, 47, 0.85);
  border: 2px solid var(--blossom);
}

.tier-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tier-pill-btn {
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: #272B57;
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 12px;
  cursor: pointer;
}
.tier-pill-btn.active {
  background: linear-gradient(180deg, #FFE14D 0%, #F59E0B 100%);
  color: #14121F;
}

.shard-vault-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.72) 0%, rgba(20, 18, 47, 0.92) 100%);
  border: 2px solid #C084FC;
}

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

.forge-card {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(20, 18, 47, 0.85);
  border: 2px solid rgba(206, 139, 183, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.forge-card.is-mythic {
  border-color: #C084FC;
  background: linear-gradient(180deg, rgba(59, 20, 100, 0.62) 0%, rgba(20, 18, 47, 0.92) 100%);
}
.forge-card.is-equipped {
  border-color: var(--azure);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.25);
}

.forge-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.forge-card-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}
.forge-card-title {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold-accent);
}
.forge-card-sub {
  font-size: 11.5px;
  color: var(--azure);
  font-weight: 700;
}
.forge-card-desc {
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-muted);
  flex: 1;
}
.forge-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.forge-act-btn {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: linear-gradient(180deg, #FFE14D 0%, #F59E0B 100%);
  color: #14121F;
  font-family: var(--font-display);
  font-size: 11.5px;
  cursor: pointer;
}
.forge-act-btn.shard-btn {
  background: linear-gradient(180deg, #C084FC 0%, #7E22CE 100%);
  color: #FFFFFF;
}
.forge-act-btn.equip-btn {
  background: linear-gradient(180deg, #38D95A 0%, #16A34A 100%);
  color: #14121F;
}
.forge-act-btn:disabled {
  background: #374151;
  color: #9CA3AF;
  cursor: default;
}

.skin-swatch-dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid #FFFFFF;
  flex-shrink: 0;
}

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

.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.lb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(20, 18, 47, 0.78);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
}
.lb-row.is-you {
  border-color: var(--azure);
  background: rgba(0, 229, 255, 0.14);
}
.lb-rank {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--gold-accent);
  min-width: 36px;
}
.lb-name {
  flex: 1;
  font-weight: 800;
  font-size: 13px;
}
.lb-score {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--azure);
}

.seed-builder-box, .replay-log-box {
  padding: 12px;
  border-radius: 12px;
  background: rgba(20, 18, 47, 0.85);
  border: 2px solid rgba(0, 229, 255, 0.35);
  margin-top: 10px;
}

.event-pass-tiers-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0;
}

.pass-tier-box {
  padding: 10px;
  border-radius: 12px;
  background: rgba(20, 18, 47, 0.85);
  border: 2px solid var(--blossom);
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-align: center;
}
.pass-tier-box.is-active {
  border-color: #38D95A;
}


/* ==========================================================================
   v1.0.2.0-rc1 Visual QA & Readability Polish (Title Feathering, Volumetric
   Loading Bar, Unclipped Season & Ally Panels, High-Contrast Keep/Raid Notices)
   ========================================================================== */

#screen-title.screen-title {
  padding: 14px 28px 20px;
  overflow: hidden;
}

.title-ambient-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

#screen-title .title-center-hero {
  position: relative;
  z-index: 2;
  max-width: min(94vw, 960px);
  padding: 4px 28px 10px;
  border: none;
  background: radial-gradient(
    ellipse 70% 66% at 50% 48%,
    rgba(16, 14, 42, 0.70) 0%,
    rgba(30, 32, 74, 0.34) 56%,
    rgba(16, 14, 42, 0) 100%
  );
}

.title-hero-stage {
  position: relative;
  width: min(560px, 88vw);
  height: clamp(192px, 31vh, 290px);
  margin: 0 auto 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}

.title-hero-aura {
  position: absolute;
  top: 52%;
  left: 50%;
  width: clamp(280px, 40vh, 440px);
  height: clamp(200px, 28vh, 320px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(0, 229, 255, 0.44) 0%,
    rgba(255, 92, 168, 0.22) 45%,
    rgba(20, 18, 47, 0) 74%
  );
  animation: azureAuraPulse 4.8s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes azureAuraPulse {
  0% { transform: translate(-50%, -50%) scale(0.94); opacity: 0.80; }
  100% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
}

.title-spire-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(205px, 29vh, 310px);
  height: clamp(205px, 29vh, 310px);
  border-radius: 50%;
  border: 2px dashed rgba(0, 229, 255, 0.40);
  box-shadow: 0 0 26px rgba(0, 229, 255, 0.24), inset 0 0 18px rgba(255, 225, 77, 0.14);
  animation: azureRingSpin 32s linear infinite;
  z-index: 1;
}

@keyframes azureRingSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.title-crest-card {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 35%, #232A60 0%, #100E28 100%);
  border-radius: 26px 26px 46% 46% / 22px 22px 28% 28%;
  will-change: transform;
}

.title-crest-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 22px rgba(10, 8, 28, 0.65), inset 0 2px 6px rgba(255, 255, 255, 0.26);
  z-index: 2;
  pointer-events: none;
}

.title-crest-lead {
  z-index: 4;
  width: clamp(162px, 24vh, 240px);
  height: clamp(184px, 27.5vh, 272px);
  border: 3px solid #00E5FF;
  box-shadow:
    0 0 0 2px rgba(16, 14, 42, 0.92),
    0 0 28px rgba(0, 229, 255, 0.56),
    0 14px 28px rgba(0, 0, 0, 0.78);
  animation: azureHeroFloat 3.8s ease-in-out infinite alternate;
}

.title-crest-lead::after {
  content: "";
  position: absolute;
  top: -30%;
  left: -80%;
  width: 48%;
  height: 170%;
  background: linear-gradient(105deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.34) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-22deg);
  animation: azureCrestGlint 5.4s ease-in-out infinite;
  z-index: 3;
  pointer-events: none;
}

@keyframes azureCrestGlint {
  0%, 72% { transform: translateX(0) skewX(-22deg); opacity: 0; }
  80% { opacity: 0.9; }
  100% { transform: translateX(520%) skewX(-22deg); opacity: 0; }
}

@keyframes azureHeroFloat {
  0% { transform: translate3d(0, 3px, 0) scale(0.992); }
  100% { transform: translate3d(0, -7px, 0) scale(1.018); }
}

.title-crest-flank {
  z-index: 2;
  width: clamp(122px, 18vh, 180px);
  height: clamp(142px, 21vh, 208px);
  margin-bottom: 10px;
  border: 2.5px solid rgba(255, 225, 77, 0.78);
  box-shadow:
    0 0 0 2px rgba(16, 14, 42, 0.9),
    0 0 20px rgba(255, 142, 194, 0.34),
    0 12px 24px rgba(0, 0, 0, 0.74);
}

.title-crest-flank.left {
  margin-right: -24px;
  animation: azureFlankFloatL 4.4s ease-in-out infinite alternate;
}

.title-crest-flank.right {
  margin-left: -24px;
  animation: azureFlankFloatR 4.7s ease-in-out infinite alternate;
}

@keyframes azureFlankFloatL {
  0% { transform: rotate(-9deg) translate3d(0, 4px, 0); }
  100% { transform: rotate(-8deg) translate3d(-4px, -5px, 0); }
}

@keyframes azureFlankFloatR {
  0% { transform: rotate(9deg) translate3d(0, -4px, 0); }
  100% { transform: rotate(8deg) translate3d(4px, 5px, 0); }
}

.title-hero-lead,
.title-hero-flank {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  display: block;
  transform: scale(1.06);
}

#screen-title .title-logo-kicker {
  margin-bottom: 6px;
  font-size: 13px;
}

#screen-title .title-main-heading {
  font-size: clamp(32px, 4.2vw, 58px);
  text-shadow:
    0 5px 0 var(--ink-stroke),
    0 0 28px rgba(0, 229, 255, 0.44),
    0 12px 26px rgba(0, 0, 0, 0.68);
}

#screen-title .title-sub-heading {
  margin: 6px 0 0;
  font-size: clamp(14px, 1.3vw, 18px);
}

#screen-title .title-season-pill {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: min(92vw, 880px);
  width: auto;
  padding: 6px 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(28, 32, 72, 0.96) 0%, rgba(16, 14, 38, 0.96) 100%);
  border: 2px solid var(--azure);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.65), 0 0 16px rgba(0, 229, 255, 0.28);
  color: #7CEEFF;
  font-size: clamp(12px, 1.05vw, 13.5px);
  line-height: 1.32;
  white-space: normal;
  text-align: center;
  overflow: visible !important;
}

#screen-title .title-cta-zone {
  min-height: 76px;
}

#screen-title .title-loading-wrap {
  width: min(460px, 88vw);
  text-align: center;
}

#screen-title .title-loading-track {
  width: 100%;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(180deg, #090718 0%, #1D1A3B 60%, #121029 100%);
  border: 2.5px solid #00E5FF;
  padding: 3px;
  overflow: hidden;
  box-shadow:
    inset 0 3px 6px rgba(0, 0, 0, 0.88),
    inset 0 -1px 2px rgba(255, 255, 255, 0.16),
    0 0 18px rgba(0, 229, 255, 0.42),
    0 6px 16px rgba(0, 0, 0, 0.72);
}

#screen-title .title-loading-fill {
  height: 100%;
  border-radius: 999px;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68) 0%, rgba(255, 255, 255, 0.14) 38%, rgba(0, 0, 0, 0.08) 66%, rgba(0, 0, 0, 0.34) 100%),
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.20) 0 10px, rgba(255, 255, 255, 0) 10px 20px),
    linear-gradient(90deg, #00E5FF 0%, #38BDF8 34%, #F59E0B 72%, #FFE14D 100%);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, 0.82),
    inset 0 -2px 4px rgba(120, 42, 0, 0.55),
    0 0 14px rgba(0, 229, 255, 0.75);
  transition: width 140ms ease-out;
}

#screen-title .title-loading-label {
  display: inline-block;
  margin-top: 10px;
  padding: 5px 20px;
  border-radius: 999px;
  background: rgba(10, 8, 24, 0.94);
  border: 1.5px solid rgba(0, 229, 255, 0.72);
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.4px;
  color: #FFE14D;
  -webkit-text-stroke: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.96);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.7);
}

/* Prevent flex-shrink clipping on Left/Right Column cards ('Rescued Allies' & 'Citadel Keep') */
.side-column {
  gap: 7px;
}

.side-column > .side-card {
  flex-shrink: 0;
  height: auto;
  min-height: fit-content;
  padding: 8px 10px;
}

.arsenal-item {
  padding: 4px 7px;
}

.ally-bench-list {
  min-height: fit-content;
  overflow: visible;
}

/* High-contrast readable empty hints & stage-lock notices */
.locked-box-notice,
.empty-hint {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.38;
  color: #FFFFFF;
  background: rgba(10, 8, 26, 0.92);
  border: 1.5px solid rgba(0, 229, 255, 0.48);
  border-radius: 9px;
  padding: 7px 10px;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95);
  white-space: normal;
  overflow-wrap: break-word;
  overflow: visible;
}

.locked-box-notice {
  color: #FFE14D;
  border-color: rgba(255, 225, 77, 0.58);
}

/* Raid Boss 0 HP Victory Feedback */
.raid-defeated-highlight {
  color: #FFE14D !important;
  font-weight: 800;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.raid-fill.is-defeated {
  background: linear-gradient(90deg, #38D95A 0%, #FFE14D 100%) !important;
}

.secondary-cartoon-btn.raid-claim-ready {
  background: linear-gradient(180deg, #FFE14D 0%, #F59E0B 100%);
  color: #14121F !important;
  border-color: #92400E;
  font-weight: 800;
  box-shadow: 0 0 12px rgba(255, 225, 77, 0.65);
}

.raid-boss-banner.is-defeated {
  border-color: #FFE14D;
  box-shadow: 0 0 18px rgba(255, 225, 77, 0.35);
}

.piggy-sub-note {
  font-size: 10.5px;
  line-height: 1.25;
  font-weight: 700;
  color: rgba(24, 28, 46, 0.80);
  margin: -2px 0 6px;
}

.cutin-skip-btn {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 72;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 2.5px solid #FFE14D;
  background: rgba(15, 12, 34, 0.92);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.52);
  transition: transform 110ms ease, background-color 110ms ease;
}

.cutin-skip-btn:hover {
  transform: translateX(-50%) translateY(-2px) scale(1.04);
  background: rgba(34, 25, 74, 0.96);
}

.cutin-skip-btn kbd {
  padding: 2px 7px;
  border-radius: 6px;
  background: #FFE14D;
  color: #14121F;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
}

.cutin-skip-btn.hidden {
  display: none !important;
}
