:root {
  --rarity-common: #9088a8;
  --rarity-uncommon: #84a56e;
  --rarity-rare: #7dd3fc;
  --rarity-epic: #a98bc9;
  --rarity-legendary: #d9b881;
  --rarity-mythic: #f0445e;
  --rarity-living: #78d7d0;
}

/* Act II campaign milestone */
.act-two-unlock-backdrop {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 32px);
  overflow: auto;
  background:
    radial-gradient(circle at 50% 12%, rgba(80, 202, 226, 0.15), transparent 34%),
    linear-gradient(145deg, rgba(2, 7, 16, 0.94), rgba(8, 6, 20, 0.97));
  backdrop-filter: blur(12px);
  animation: act-two-backdrop-in 420ms ease-out both;
}

.act-two-unlock-modal {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid rgba(104, 217, 230, 0.52);
  border-radius: 12px;
  color: var(--color-parchment);
  background:
    linear-gradient(180deg, rgba(7, 23, 36, 0.98), rgba(5, 10, 22, 0.99));
  box-shadow:
    0 0 0 1px rgba(128, 91, 220, 0.22),
    0 30px 90px rgba(0, 0, 0, 0.72),
    0 0 72px rgba(61, 181, 209, 0.15);
  isolation: isolate;
  animation: act-two-modal-in 560ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.act-two-unlock-modal::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 44px rgba(82, 209, 230, 0.055);
}

.act-two-unlock-hero {
  position: relative;
  min-height: 238px;
  display: flex;
  align-items: flex-end;
  gap: clamp(18px, 4vw, 38px);
  padding: clamp(24px, 5vw, 48px);
  overflow: hidden;
  border-bottom: 1px solid rgba(104, 217, 230, 0.34);
  background-image:
    linear-gradient(90deg, rgba(2, 9, 19, 0.97) 0%, rgba(3, 13, 25, 0.83) 45%, rgba(5, 14, 25, 0.22) 100%),
    linear-gradient(0deg, rgba(3, 10, 20, 0.92), transparent 72%),
    url("zones/emberjaw-ridge.webp");
  background-position: center;
  background-size: cover;
}

.act-two-unlock-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(115deg, transparent 35%, rgba(97, 224, 233, 0.09) 48%, transparent 62%),
    repeating-linear-gradient(90deg, transparent 0 92px, rgba(151, 115, 235, 0.04) 93px 94px);
  animation: act-two-light-sweep 5.5s ease-in-out infinite;
}

.act-two-unlock-hero__rune {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(76px, 11vw, 104px);
  aspect-ratio: 1;
  border: 1px solid rgba(239, 205, 118, 0.68);
  border-radius: 50%;
  color: #f8dfa0;
  background:
    radial-gradient(circle, rgba(42, 111, 132, 0.72), rgba(10, 27, 43, 0.92) 58%, rgba(9, 8, 23, 0.98) 72%);
  box-shadow:
    inset 0 0 0 6px rgba(3, 10, 20, 0.58),
    inset 0 0 0 7px rgba(101, 223, 232, 0.2),
    0 0 34px rgba(79, 211, 225, 0.26);
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.3rem);
  font-style: italic;
  letter-spacing: 0.08em;
  text-shadow: 0 0 18px rgba(246, 208, 112, 0.48);
}

.act-two-unlock-hero__copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  padding-bottom: 2px;
}

.act-two-unlock-eyebrow,
.act-two-unlock-kicker {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.act-two-unlock-eyebrow {
  margin-bottom: 8px;
  color: #74e0e9;
}

.act-two-unlock-kicker {
  color: #e7c675;
}

.act-two-unlock-hero h2 {
  margin: 5px 0 0;
  color: #fff3cf;
  font-family: var(--font-serif);
  font-size: clamp(2.1rem, 6vw, 4.4rem);
  font-style: italic;
  font-weight: 700;
  line-height: 0.96;
  letter-spacing: 0.025em;
  text-wrap: balance;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.8), 0 0 28px rgba(93, 217, 229, 0.18);
}

.act-two-unlock-body {
  position: relative;
  z-index: 2;
  padding: clamp(22px, 4vw, 38px) clamp(22px, 5vw, 48px) clamp(24px, 4vw, 38px);
}

.act-two-unlock-lead {
  margin: 0;
  color: #f0e4c4;
  font-family: var(--font-serif);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-style: italic;
  line-height: 1.5;
  text-wrap: balance;
}

.act-two-unlock-description {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--color-lavender-grey);
  font-size: 0.86rem;
  line-height: 1.62;
}

.act-two-unlock-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.act-two-unlock-status > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(108, 218, 228, 0.28);
  border-radius: 999px;
  color: #b8eef0;
  background: rgba(18, 69, 83, 0.28);
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.105em;
}

.act-two-unlock-status strong {
  color: #fff0ba;
}

.act-two-unlock-route {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 14px 16px;
  overflow: hidden;
  border: 1px solid rgba(232, 196, 102, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(95deg, rgba(28, 69, 85, 0.42), rgba(17, 13, 36, 0.72));
}

.act-two-unlock-route::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 55%, rgba(233, 196, 96, 0.07));
}

.act-two-unlock-route__sigil {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(116, 224, 233, 0.45);
  border-radius: 6px;
  color: #f4d684;
  background: rgba(4, 15, 27, 0.72);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
}

.act-two-unlock-route__copy {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.act-two-unlock-route__copy > div {
  color: #77dbe6;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.act-two-unlock-route__copy strong {
  color: #fff0c2;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
}

.act-two-unlock-route__copy span,
.act-two-unlock-route__level {
  color: var(--color-lavender-grey);
  font-size: 0.68rem;
}

.act-two-unlock-route__level {
  position: relative;
  z-index: 1;
  padding: 7px 9px;
  border: 1px solid rgba(232, 196, 102, 0.24);
  border-radius: 4px;
  color: #e8cf8d;
  background: rgba(5, 11, 20, 0.56);
  font-family: var(--font-ui);
  font-weight: 700;
  white-space: nowrap;
}

.act-two-unlock-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
}

.act-two-unlock-action button {
  display: inline-flex;
  min-width: min(100%, 300px);
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 28px;
  border: 1px solid #f1d47f;
  border-radius: 6px;
  color: #07131b;
  background: linear-gradient(100deg, #60d5e5 0%, #8bdce2 42%, #f1d984 100%);
  box-shadow: 0 10px 28px rgba(46, 180, 201, 0.18), 0 0 26px rgba(238, 205, 116, 0.12);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.act-two-unlock-action button:hover,
.act-two-unlock-action button:focus-visible {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(46, 180, 201, 0.26), 0 0 34px rgba(238, 205, 116, 0.18);
}

.act-two-unlock-action button:focus-visible {
  outline: 2px solid #fff3c8;
  outline-offset: 3px;
}

.act-two-unlock-action svg {
  width: 20px;
  height: 20px;
}

.act-two-unlock-action small {
  color: rgba(188, 198, 211, 0.66);
  font-size: 0.65rem;
}

.act-two-unlock-backdrop.is-reduced-motion,
.act-two-unlock-backdrop.is-reduced-motion .act-two-unlock-modal,
.act-two-unlock-backdrop.is-reduced-motion .act-two-unlock-hero::after {
  animation: none !important;
}

@keyframes act-two-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes act-two-modal-in {
  from { opacity: 0; transform: translateY(24px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes act-two-light-sweep {
  0%, 38%, 100% { opacity: 0.48; transform: translateX(-8%); }
  58% { opacity: 0.86; transform: translateX(8%); }
}

@media (max-width: 700px) {
  .act-two-unlock-hero {
    min-height: 210px;
    align-items: center;
  }

  .act-two-unlock-hero__rune {
    width: 68px;
  }

  .act-two-unlock-route {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .act-two-unlock-route__level {
    grid-column: 1 / -1;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .act-two-unlock-backdrop {
    place-items: start center;
    padding: 8px;
  }

  .act-two-unlock-modal {
    max-height: calc(100vh - 16px);
  }

  .act-two-unlock-hero {
    min-height: 184px;
    gap: 14px;
    padding: 22px 18px;
  }

  .act-two-unlock-hero__rune {
    width: 58px;
    font-size: 1.65rem;
  }

  .act-two-unlock-eyebrow,
  .act-two-unlock-kicker {
    font-size: 0.54rem;
  }

  .act-two-unlock-body {
    padding: 19px 16px 22px;
  }

  .act-two-unlock-description {
    font-size: 0.77rem;
  }

  .act-two-unlock-status {
    gap: 6px;
  }

  .act-two-unlock-status > span {
    padding: 4px 8px;
    font-size: 0.54rem;
  }
}

@media (max-height: 720px) and (min-width: 701px) {
  .act-two-unlock-hero {
    min-height: 168px;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  .act-two-unlock-body {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .act-two-unlock-status,
  .act-two-unlock-route {
    margin-top: 14px;
  }

  .act-two-unlock-action {
    margin-top: 16px;
  }
}

.rarity-text--rare { color: var(--rarity-rare) !important; }
.rarity-text--epic { color: var(--rarity-epic) !important; }
.rarity-text--mythic { color: var(--rarity-mythic) !important; }
.rarity-text--living { color: var(--rarity-living) !important; }
.rarity-border--rare { border-color: color-mix(in srgb, var(--rarity-rare) 72%, transparent) !important; }
.rarity-border--epic { border-color: color-mix(in srgb, var(--rarity-epic) 58%, transparent) !important; }
.rarity-border--mythic { border-color: color-mix(in srgb, var(--rarity-mythic) 78%, transparent) !important; }
.rarity-border--living { border-color: color-mix(in srgb, var(--rarity-living) 78%, transparent) !important; }
.rarity-glow--rare { box-shadow: 0 0 5px color-mix(in srgb, var(--rarity-rare) 24%, transparent) !important; }
.rarity-glow--epic { box-shadow: 0 0 10px color-mix(in srgb, var(--rarity-epic) 34%, transparent) !important; }
.rarity-glow--mythic { box-shadow: 0 0 16px color-mix(in srgb, var(--rarity-mythic) 48%, transparent) !important; }
.rarity-glow--living { box-shadow: 0 0 18px color-mix(in srgb, var(--rarity-living) 48%, transparent) !important; }
.rarity-badge--rare { color: var(--rarity-rare) !important; background: rgba(20, 78, 112, 0.42) !important; }
.rarity-badge--epic { color: var(--rarity-epic) !important; background: rgba(91, 75, 138, 0.3) !important; }
.rarity-badge--mythic { color: #ffd6dc !important; background: rgba(111, 18, 38, 0.82) !important; }
.rarity-badge--living { color: #d8fffb !important; background: rgba(10, 78, 78, 0.82) !important; }

.rarity-frame {
  --rarity-frame-color: var(--rarity-common);
  border-color: var(--rarity-frame-color) !important;
}
.rarity-frame--common { --rarity-frame-color: var(--rarity-common); }
.rarity-frame--uncommon { --rarity-frame-color: var(--rarity-uncommon); }
.rarity-frame--rare {
  --rarity-frame-color: #7dd3fc;
  border-width: 1px !important;
}
.rarity-frame--epic {
  --rarity-frame-color: var(--rarity-epic);
  border-width: 2px !important;
  box-shadow: 0 0 8px color-mix(in srgb, var(--rarity-epic) 28%, transparent);
}
.rarity-frame--legendary {
  --rarity-frame-color: #f6c453;
  border-style: double !important;
  border-width: 3px !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 164, 0.22),
    0 0 12px rgba(246, 196, 83, 0.42);
  animation: gear-rarity-frame-breathe 2.8s ease-in-out infinite;
}
.rarity-frame--mythic {
  --rarity-frame-color: var(--rarity-mythic);
  border-style: double !important;
  border-width: 3px !important;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--rarity-mythic) 34%, transparent),
    0 0 13px color-mix(in srgb, var(--rarity-mythic) 44%, transparent);
}
.rarity-frame--living {
  --rarity-frame-color: #42e8db;
  border-width: 3px !important;
  box-shadow:
    inset 0 0 0 1px rgba(225, 255, 252, 0.46),
    inset 0 0 10px rgba(66, 232, 219, 0.2),
    0 0 16px rgba(66, 232, 219, 0.48);
}

@keyframes gear-rarity-frame-breathe {
  0%,
  100% {
    filter: brightness(0.96);
  }
  50% {
    filter: brightness(1.2);
  }
}

.ascension-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--color-ivory-beige);
  overflow-y: auto;
  overflow-x: hidden;
  font-family: var(--font-ui);
  z-index: 10;
}

/* Frontier v3.5 - seal manager, bigger briefing stats, and clearer Aether reward. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-panel-bg:
      linear-gradient(180deg, rgb(var(--indigo-rgb) / 0.96), rgb(var(--surface-rgb) / 0.90));
    --frontier-panel-inner:
      linear-gradient(180deg, rgb(var(--indigo-rgb) / 0.72), rgb(var(--surface-rgb) / 0.52));
    --frontier-panel-border: rgb(var(--brass-rgb) / 0.30);
    --frontier-panel-border-soft: rgb(var(--brass-rgb) / 0.18);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
    border-color: var(--frontier-panel-border) !important;
    background: var(--frontier-panel-bg) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(var(--frontier-briefing-height, 210px) + 8px) !important;
    bottom: 0 !important;
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign {
    min-height: 0 !important;
    height: 100% !important;
    overflow-y: auto !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
    font-size: clamp(1.35rem, 1.35vw, 1.68rem) !important;
    line-height: 1.05 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
    gap: 0.6rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div {
    min-height: 4.1rem !important;
    padding: 0.72rem 0.82rem !important;
    border-color: rgba(80, 178, 255, 0.22) !important;
    background:
      linear-gradient(180deg, rgba(17, 64, 112, 0.72), rgba(5, 24, 48, 0.76)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div > div:first-child {
    color: rgba(221, 234, 248, 0.72) !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.15em !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div > div:last-child {
    color: #fff6d7 !important;
    font-size: clamp(1rem, 1vw, 1.26rem) !important;
    line-height: 1.05 !important;
    text-shadow: 0 0 12px rgba(82, 177, 255, 0.24) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward {
    position: relative;
    min-height: 4.2rem !important;
    padding: 0.72rem 7.8rem 0.72rem 0.9rem !important;
    border-color: rgba(108, 210, 255, 0.36) !important;
    background:
      radial-gradient(circle at 88% 50%, rgba(64, 196, 255, 0.20), transparent 42%),
      linear-gradient(180deg, rgba(17, 70, 118, 0.78), rgba(5, 25, 52, 0.82)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.08),
      0 0 22px rgba(54, 164, 255, 0.12) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__label {
    font-size: 0.72rem !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__value {
    color: #e9fbff !important;
    font-family: var(--font-serif) !important;
    font-size: clamp(1.15rem, 1.1vw, 1.42rem) !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
    text-shadow: 0 0 16px rgba(89, 209, 255, 0.34) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__bonus {
    margin-top: 0.28rem;
    color: rgba(196, 231, 255, 0.82);
    font-size: 0.72rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__mark {
    position: absolute;
    top: 50%;
    right: 0.86rem;
    transform: translateY(-50%);
    border: 1px solid rgba(162, 226, 255, 0.42);
    border-radius: 4px;
    padding: 0.5rem 0.72rem;
    background:
      linear-gradient(180deg, rgba(14, 105, 168, 0.78), rgba(5, 36, 74, 0.92));
    color: #f4fcff;
    font-family: var(--font-serif);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.13),
      0 0 18px rgba(82, 177, 255, 0.22);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign button {
    min-height: 2.35rem !important;
    border-radius: 4px !important;
    font-size: 0.82rem !important;
  }
}

/* Player-facing dated patch notes */
.player-patch-notes {
  --patch-gold: #d7b66d;
  --patch-gold-bright: #f2d58c;
  --patch-ink: #070b15;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: auto;
  padding: clamp(14px, 2vw, 28px);
  color: var(--color-parchment, #eee5d4);
  background:
    radial-gradient(circle at 12% 0%, rgba(77, 54, 113, 0.2), transparent 31rem),
    radial-gradient(circle at 94% 12%, rgba(169, 112, 44, 0.1), transparent 25rem),
    linear-gradient(180deg, rgba(5, 9, 18, 0.2), rgba(5, 8, 15, 0.64));
  scrollbar-color: rgba(215, 182, 109, 0.38) rgba(3, 6, 12, 0.55);
}

.player-patch-notes > * {
  width: min(100%, 1480px);
  margin-inline: auto;
}

.player-patch-notes button:focus-visible {
  outline: 2px solid var(--patch-gold-bright);
  outline-offset: 2px;
}

.patch-notes-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(18px, 3vw, 48px);
  min-height: 146px;
  padding: clamp(20px, 3vw, 34px);
  overflow: hidden;
  border: 1px solid rgba(215, 182, 109, 0.42);
  border-radius: 7px 7px 2px 2px;
  background:
    linear-gradient(100deg, rgba(18, 16, 35, 0.96), rgba(10, 16, 31, 0.94) 58%, rgba(31, 22, 36, 0.94)),
    repeating-linear-gradient(135deg, transparent 0 18px, rgba(255, 255, 255, 0.018) 18px 19px);
  box-shadow:
    inset 0 1px rgba(255, 239, 190, 0.08),
    0 18px 48px rgba(0, 0, 0, 0.32);
}

.patch-notes-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -90px;
  bottom: -165px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(215, 182, 109, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgba(215, 182, 109, 0.025),
    0 0 0 66px rgba(215, 182, 109, 0.02);
}

.patch-notes-hero__identity {
  display: flex;
  align-items: center;
  gap: clamp(15px, 2vw, 24px);
  min-width: 0;
}

.patch-notes-hero__seal {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: clamp(60px, 7vw, 82px);
  aspect-ratio: 1;
  border: 1px solid rgba(242, 213, 140, 0.72);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(84, 54, 34, 0.86) 0 42%, rgba(24, 19, 32, 0.96) 43% 62%, rgba(183, 130, 55, 0.48) 63% 66%, rgba(8, 11, 22, 0.96) 67%);
  color: #f7dfa0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  box-shadow:
    inset 0 0 18px rgba(255, 193, 91, 0.16),
    0 8px 25px rgba(0, 0, 0, 0.36);
}

.patch-notes-eyebrow {
  margin: 0 0 4px;
  color: var(--patch-gold);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.patch-notes-hero h1 {
  margin: 0;
  color: #f5ead7;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.025em;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.55);
}

.patch-notes-hero__subtitle {
  max-width: 660px;
  margin: 10px 0 0;
  color: rgba(221, 216, 224, 0.74);
  font-size: clamp(12px, 1.2vw, 14px);
  line-height: 1.55;
}

.patch-notes-hero__stats {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid rgba(215, 182, 109, 0.26);
  border-radius: 5px;
  background: rgba(3, 7, 15, 0.5);
}

.patch-notes-hero__stats > div {
  display: flex;
  min-width: 118px;
  padding: 13px 16px;
  flex-direction: column;
  justify-content: center;
}

.patch-notes-hero__stats > div + div {
  border-left: 1px solid rgba(215, 182, 109, 0.19);
}

.patch-notes-hero__stats strong {
  color: #f0dfba;
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.patch-notes-hero__stats > div:first-child strong {
  font-size: 24px;
}

.patch-notes-hero__stats span {
  margin-top: 3px;
  color: rgba(180, 177, 190, 0.66);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.patch-notes-layout {
  display: grid;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  gap: clamp(14px, 2vw, 24px);
  align-items: start;
  padding-top: clamp(14px, 2vw, 24px);
}

.patch-notes-archive {
  display: grid;
  gap: 14px;
}

.patch-calendar-panel,
.patch-date-list,
.patch-notes-entry {
  border: 1px solid rgba(139, 121, 163, 0.31);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(16, 19, 34, 0.96), rgba(8, 13, 24, 0.97)),
    var(--patch-ink);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.035),
    0 13px 35px rgba(0, 0, 0, 0.25);
}

.patch-calendar-panel {
  padding: 16px;
}

.patch-calendar-panel__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.patch-calendar-panel__heading > div:first-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.patch-calendar-panel__heading span,
.patch-date-list h2 {
  color: rgba(192, 183, 201, 0.68);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.patch-calendar-panel__heading strong {
  margin-top: 2px;
  color: #f0dfba;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 700;
  text-transform: capitalize;
}

.patch-calendar-panel__hint {
  margin: 10px 0 13px;
  color: rgba(197, 193, 203, 0.58);
  font-size: 10px;
  line-height: 1.4;
}

.patch-calendar-nav {
  display: flex;
  gap: 5px;
}

.patch-calendar-nav button {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(215, 182, 109, 0.3);
  border-radius: 3px;
  background: rgba(8, 12, 23, 0.8);
  color: var(--patch-gold);
  cursor: pointer;
}

.patch-calendar-nav button:disabled {
  cursor: default;
  opacity: 0.25;
}

.patch-calendar-weekdays,
.patch-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.patch-calendar-weekdays {
  margin-bottom: 5px;
}

.patch-calendar-weekdays span {
  color: rgba(171, 165, 181, 0.45);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.patch-calendar-day {
  position: relative;
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 3px;
  background: rgba(4, 8, 16, 0.42);
  color: rgba(180, 177, 188, 0.42);
  font-family: var(--font-mono);
  font-size: 10px;
}

button.patch-calendar-day {
  appearance: none;
}

.patch-calendar-day.is-empty {
  visibility: hidden;
}

.patch-calendar-day.has-update {
  border-color: rgba(215, 182, 109, 0.42);
  background:
    radial-gradient(circle at 50% 30%, rgba(164, 108, 57, 0.23), transparent 70%),
    rgba(22, 19, 31, 0.94);
  color: #f1ddb2;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 224, 158, 0.035);
}

.patch-calendar-day.has-update::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 3px;
  left: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--patch-gold);
  opacity: 0.72;
}

.patch-calendar-day.has-update:hover,
.patch-calendar-day.has-update.is-selected {
  border-color: rgba(242, 213, 140, 0.9);
  background:
    radial-gradient(circle at 50% 20%, rgba(194, 129, 60, 0.38), transparent 74%),
    rgba(37, 25, 37, 0.98);
  color: #fff1c5;
}

.patch-calendar-day.has-update.is-selected {
  box-shadow:
    inset 0 0 0 1px rgba(242, 213, 140, 0.22),
    0 0 15px rgba(183, 124, 58, 0.13);
}

.patch-date-list {
  overflow: hidden;
}

.patch-date-list h2 {
  margin: 0;
  padding: 13px 15px 10px;
  border-bottom: 1px solid rgba(139, 121, 163, 0.22);
}

.patch-date-button {
  position: relative;
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid rgba(139, 121, 163, 0.14);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.patch-date-button:last-child {
  border-bottom: 0;
}

.patch-date-button time {
  grid-column: 1;
  color: rgba(215, 182, 109, 0.75);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.patch-date-button strong {
  grid-column: 1;
  overflow: hidden;
  color: rgba(226, 221, 226, 0.8);
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.patch-date-button > span {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  color: rgba(215, 182, 109, 0.4);
  font-size: 22px;
}

.patch-date-button:hover,
.patch-date-button.is-selected {
  background:
    linear-gradient(90deg, rgba(118, 73, 73, 0.2), transparent 82%),
    rgba(37, 28, 47, 0.34);
}

.patch-date-button.is-selected {
  box-shadow: inset 3px 0 var(--patch-gold);
}

.patch-date-button.is-selected strong {
  color: #f3e7ce;
}

.patch-date-button.is-selected > span {
  color: var(--patch-gold-bright);
}

.patch-notes-entry {
  min-width: 0;
  overflow: hidden;
}

.patch-notes-entry__header {
  position: relative;
  padding: clamp(21px, 3vw, 36px) clamp(20px, 4vw, 48px);
  border-bottom: 1px solid rgba(215, 182, 109, 0.26);
  background:
    linear-gradient(112deg, rgba(51, 34, 56, 0.52), transparent 57%),
    radial-gradient(circle at 94% 0%, rgba(181, 115, 50, 0.12), transparent 22rem);
}

.patch-notes-entry__label {
  display: inline-flex;
  padding: 4px 7px;
  border: 1px solid rgba(215, 182, 109, 0.28);
  border-radius: 2px;
  background: rgba(7, 10, 19, 0.5);
  color: var(--patch-gold);
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.patch-notes-entry__header time {
  display: block;
  margin-top: 14px;
  color: rgba(214, 200, 178, 0.63);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.patch-notes-entry__header h2 {
  max-width: 860px;
  margin: 5px 0 0;
  color: #f5ead8;
  font-family: var(--font-serif);
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 700;
  line-height: 1.12;
}

.patch-notes-entry__header p {
  max-width: 850px;
  margin: 12px 0 0;
  color: rgba(216, 210, 218, 0.7);
  font-size: 13px;
  line-height: 1.65;
}

.patch-notes-entry__body {
  padding: clamp(6px, 1vw, 12px) clamp(20px, 4vw, 48px) clamp(24px, 4vw, 46px);
}

.patch-note-section {
  padding: clamp(20px, 2.5vw, 30px) 0;
  border-bottom: 1px solid rgba(139, 121, 163, 0.2);
}

.patch-note-section:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.patch-note-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 13px;
  color: #e7d5ac;
  font-family: var(--font-serif);
  font-size: clamp(16px, 1.7vw, 20px);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.patch-note-section h3::before {
  content: "";
  width: 18px;
  height: 1px;
  background: linear-gradient(90deg, var(--patch-gold), rgba(215, 182, 109, 0.1));
  box-shadow: 0 0 6px rgba(215, 182, 109, 0.3);
}

.patch-note-section ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.patch-note-section li {
  position: relative;
  padding-left: 18px;
  color: rgba(218, 215, 222, 0.77);
  font-size: 12px;
  line-height: 1.58;
}

.patch-note-section li::before {
  content: "";
  position: absolute;
  top: 0.65em;
  left: 2px;
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  border: 1px solid rgba(215, 182, 109, 0.72);
  background: rgba(95, 58, 52, 0.62);
}

@media (max-width: 1040px) {
  .patch-notes-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .patch-notes-hero__stats {
    width: 100%;
  }

  .patch-notes-hero__stats > div {
    flex: 1 1 50%;
  }

  .patch-notes-layout {
    grid-template-columns: 1fr;
  }

  .patch-notes-archive {
    grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
  }
}

@media (max-width: 680px) {
  .player-patch-notes {
    padding: 10px;
  }

  .patch-notes-hero {
    min-height: 0;
    padding: 18px 15px;
  }

  .patch-notes-hero__identity {
    align-items: flex-start;
  }

  .patch-notes-hero__seal {
    width: 54px;
  }

  .patch-notes-hero__stats {
    flex-direction: column;
  }

  .patch-notes-hero__stats > div {
    min-width: 0;
  }

  .patch-notes-hero__stats > div + div {
    border-top: 1px solid rgba(215, 182, 109, 0.19);
    border-left: 0;
  }

  .patch-notes-archive {
    grid-template-columns: 1fr;
  }

  .patch-notes-entry__header,
  .patch-notes-entry__body {
    padding-right: 17px;
    padding-left: 17px;
  }

  .patch-note-section li {
    font-size: 11px;
  }
}

.reduce-motion .player-patch-notes *,
.reduce-motion .player-patch-notes *::before,
.reduce-motion .player-patch-notes *::after {
  scroll-behavior: auto !important;
  transition: none !important;
  animation: none !important;
}


/* Frontier v3.6.2 - absolute final override for viewport-fit polish. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-briefing-height: clamp(220px, 24vh, 244px) !important;
    --frontier-panel-bg:
      linear-gradient(180deg, rgba(10, 12, 17, 0.97), rgba(5, 5, 8, 0.93)) !important;
    --frontier-panel-inner:
      linear-gradient(180deg, rgba(22, 18, 16, 0.62), rgba(8, 7, 9, 0.46)) !important;
    --frontier-panel-border: rgba(217, 184, 129, 0.36) !important;
    --frontier-panel-border-soft: rgba(217, 184, 129, 0.18) !important;
    height: calc(100dvh - 6.2rem) !important;
    margin-top: -30px !important;
    padding: 4px 8px 8px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
    border-color: var(--frontier-panel-border) !important;
    background: var(--frontier-panel-bg) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__arrow,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
    border-color: var(--frontier-panel-border-soft) !important;
    background: var(--frontier-panel-inner) !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    border-color: rgba(217, 184, 129, 0.3) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    top: 0 !important;
    height: var(--frontier-briefing-height) !important;
    max-height: var(--frontier-briefing-height) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 0.45rem !important;
    overflow: hidden !important;
    padding: 0.72rem !important;
    align-self: stretch !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(var(--frontier-briefing-height) + 6px) !important;
    bottom: 0 !important;
    max-height: none !important;
    gap: 0.52rem !important;
    padding: 0.72rem !important;
    align-self: stretch !important;
    justify-self: stretch !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0.58rem !important;
    margin-top: 0 !important;
    min-height: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
    width: 58px !important;
    height: 58px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
    font-size: clamp(1.08rem, 1.08vw, 1.32rem) !important;
    line-height: 1.04 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
    gap: 0.35rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip {
    min-height: 2.15rem !important;
    padding: 0.32rem 0.42rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    border-color: var(--frontier-panel-border-soft) !important;
    background: transparent !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
    min-width: 0 !important;
    min-height: 2.1rem !important;
    font-size: 0.72rem !important;
    font-style: normal !important;
    text-transform: uppercase !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    inset: auto 16px 106px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    top: clamp(154px, 25%, 220px) !important;
  }
}

.frontier-region-expedition.frontier-page-shell--open {
  --frontier-panel-bg: linear-gradient(135deg, rgba(8, 20, 38, 0.94), rgba(13, 25, 48, 0.84)),
    radial-gradient(circle at 82% 18%, rgba(214, 169, 79, 0.12), transparent 32%) !important;
  --frontier-panel-inner: rgba(3, 12, 23, 0.72) !important;
  --frontier-panel-inner-strong: rgba(3, 8, 17, 0.96) !important;
  --frontier-panel-border: rgba(214, 169, 79, 0.28) !important;
  --frontier-panel-border-bright: rgba(214, 169, 79, 0.48) !important;
  --frontier-panel-text: rgba(244, 232, 208, 0.92) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
  border-color: var(--frontier-panel-border) !important;
  background: var(--frontier-panel-bg) !important;
  color: var(--frontier-panel-text) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 244, 215, 0.035), 0 10px 26px rgba(0, 0, 0, 0.3) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-status,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__meta,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__progress,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__chip--nodes {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared:not(.frontier-route-node--boss) .frontier-route-node__number {
  border-color: rgba(214, 169, 79, 0.7) !important;
  background: radial-gradient(circle at 35% 28%, rgba(232, 223, 201, 0.98), rgba(214, 169, 79, 0.62) 54%, rgba(3, 12, 23, 0.95) 100%) !important;
  color: #08111d !important;
  box-shadow: 0 0 0 2px rgba(214, 169, 79, 0.18), 0 0 18px rgba(214, 169, 79, 0.34) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
  padding: 7px 9px !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__list {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 6px !important;
  align-items: stretch !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
  min-width: 0 !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 7px 8px !important;
  overflow: visible !important;
  border-color: rgba(214, 169, 79, 0.18) !important;
  background: var(--frontier-panel-inner) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__main {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  grid-template-rows: 15px minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 5px !important;
  row-gap: 3px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__gem {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__code {
  position: static !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 24px !important;
  height: 22px !important;
  min-width: 24px !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  border: 1px solid rgba(214, 169, 79, 0.42) !important;
  border-radius: 4px !important;
  background: rgba(3, 8, 17, 0.9) !important;
  color: #f3c96d !important;
  font: 900 10px/1 var(--font-ui, inherit) !important;
  letter-spacing: 0 !important;
  transform: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__name {
  grid-column: 1 / 3 !important;
  grid-row: 2 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: rgba(244, 232, 208, 0.9) !important;
  font-size: 8.7px !important;
  line-height: 1.08 !important;
  letter-spacing: 0.02em !important;
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--complete {
  border-color: rgba(214, 169, 79, 0.42) !important;
  background: linear-gradient(135deg, rgba(14, 40, 51, 0.82), rgba(3, 12, 23, 0.82)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--complete .frontier-region-dock__gem {
  background: radial-gradient(circle, rgba(232, 223, 201, 0.98), rgba(214, 169, 79, 0.62) 58%, rgba(3, 12, 23, 0.95) 100%) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 0.55fr) !important;
  align-items: center !important;
  column-gap: 12px !important;
  min-height: 82px !important;
  padding: 10px 12px !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel > .flex:first-child {
  display: contents !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel > .flex:first-child > div:first-child,
.frontier-region-expedition.frontier-page-shell--open .frontier-seals-header-chips {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-slot-grid {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  display: grid !important;
  grid-template-columns: repeat(3, 58px) !important;
  gap: 8px !important;
  margin: 0 !important;
  z-index: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions {
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  display: grid !important;
  grid-template-columns: minmax(118px, 142px) minmax(86px, 108px) !important;
  gap: 8px !important;
  align-items: stretch !important;
  z-index: 2 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 58px !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 4px !important;
  border-radius: 6px !important;
  border-color: rgba(214, 169, 79, 0.28) !important;
  background: rgba(3, 12, 23, 0.78) !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__frame,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty {
  display: grid !important;
  place-items: center !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 5px !important;
  border: 1px solid rgba(214, 169, 79, 0.26) !important;
  background: rgba(3, 8, 17, 0.84) !important;
  overflow: hidden !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty::before {
  content: "" !important;
  width: 22px !important;
  height: 22px !important;
  border: 1px solid rgba(232, 223, 201, 0.18) !important;
  border-radius: 3px !important;
  transform: rotate(45deg) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__icon {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__pips {
  position: absolute !important;
  right: -3px !important;
  bottom: -3px !important;
  transform: scale(0.78) !important;
  transform-origin: right bottom !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 158px !important;
  min-height: 40px !important;
  padding: 7px 9px !important;
  border: 1px solid rgba(214, 169, 79, 0.22) !important;
  border-radius: 7px !important;
  background: rgba(3, 12, 23, 0.82) !important;
  color: rgba(244, 232, 208, 0.9) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025) !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__icon {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(214, 169, 79, 0.36) !important;
  background: rgba(3, 8, 17, 0.96) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__label {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: rgba(244, 232, 208, 0.86) !important;
  font: 900 10px/1 var(--font-ui, inherit) !important;
  letter-spacing: 0.08em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__state {
  color: #f3c96d !important;
  font: 900 10px/1 var(--font-mono, monospace) !important;
  letter-spacing: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button--on {
  border-color: rgba(77, 194, 185, 0.46) !important;
  background: linear-gradient(135deg, rgba(14, 40, 51, 0.88), rgba(3, 12, 23, 0.9)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__close {
  min-height: 38px !important;
  border-radius: 5px !important;
  border: 1px solid rgba(214, 169, 79, 0.38) !important;
  color: rgba(255, 244, 220, 0.95) !important;
  font: 900 11px/1.05 var(--font-ui, inherit) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind:disabled {
  border-color: rgba(214, 169, 79, 0.16) !important;
  background: linear-gradient(180deg, rgba(23, 36, 55, 0.96), rgba(7, 14, 27, 0.96)) !important;
  color: rgba(244, 232, 208, 0.62) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer,
.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs,
.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip {
  border-color: rgba(214, 169, 79, 0.2) !important;
  background: var(--frontier-panel-inner) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row {
  grid-template-columns: 42px minmax(0, 1fr) minmax(92px, 112px) !important;
  align-items: center !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__title,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__desc,
.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__body {
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal-layer {
  z-index: 2147483200 !important;
  padding: 22px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
  width: min(980px, calc(100vw - 64px)) !important;
  max-height: min(82vh, 760px) !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 12px !important;
  padding: 12px !important;
  overflow: hidden !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(214, 169, 79, 0.18) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__equipped {
  display: grid !important;
  grid-template-columns: minmax(104px, 150px) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 74px !important;
  padding: 10px !important;
  border: 1px solid rgba(214, 169, 79, 0.2) !important;
  border-radius: 6px !important;
  background: rgba(3, 12, 23, 0.72) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__section-title {
  color: #f3c96d !important;
  font-size: 10px !important;
  line-height: 1.2 !important;
  letter-spacing: 0.08em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 64px) !important;
  gap: 8px !important;
  justify-content: start !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 64px !important;
  height: 56px !important;
  padding: 4px !important;
  border-radius: 6px !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-icon,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-empty {
  width: 46px !important;
  height: 46px !important;
  border-radius: 5px !important;
  object-fit: cover !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-rank {
  position: absolute !important;
  right: 4px !important;
  bottom: 3px !important;
  color: #f3c96d !important;
  font: 900 9px/1 var(--font-mono, monospace) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  min-height: 0 !important;
  overflow: auto !important;
  padding-right: 6px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card {
  display: grid !important;
  grid-template-rows: auto auto auto auto !important;
  gap: 8px !important;
  min-width: 0 !important;
  padding: 10px !important;
  border-color: rgba(214, 169, 79, 0.2) !important;
  background: rgba(3, 12, 23, 0.72) !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card-head {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__portrait {
  width: 48px !important;
  height: 48px !important;
  border: 1px solid rgba(214, 169, 79, 0.28) !important;
  border-radius: 6px !important;
  object-fit: cover !important;
  background: rgba(3, 8, 17, 0.92) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__name {
  overflow-wrap: anywhere !important;
  color: rgba(244, 232, 208, 0.92) !important;
  line-height: 1.1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-help-tooltip {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help] {
  position: relative !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::before {
  content: none !important;
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::after {
  content: attr(data-help) !important;
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(100% + 8px) !important;
  top: auto !important;
  z-index: 2147483647 !important;
  width: min(320px, 78vw) !important;
  min-height: 0 !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(214, 169, 79, 0.42) !important;
  border-radius: 6px !important;
  background: rgba(3, 8, 17, 0.96) !important;
  color: rgba(244, 232, 208, 0.92) !important;
  font: 600 11px/1.35 var(--font-body, inherit) !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
  white-space: pre-line !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transform: translate(-50%, 4px) !important;
  transition: opacity 0.15s ease, transform 0.15s ease !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(214, 169, 79, 0.1) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]::after {
  left: auto !important;
  right: 0 !important;
  transform: translateY(4px) !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]:hover,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-visible,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-within {
  z-index: 2147483600 !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-within::after {
  opacity: 1 !important;
  transform: translate(-50%, 0) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:focus-within::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:focus-within::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]:focus-within::after {
  transform: translateY(0) !important;
}

@media (max-width: 1180px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-slot-grid {
    justify-self: start !important;
    grid-column: 1 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__grid {
  margin-top: 44px !important;
}

/* Frontier v3.6.4 - high-specificity node-briefing fit guard. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open.frontier-page-shell--open .frontier-node-reward.frontier-aether-reward.frontier-hud-chip-row {
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
  }
}

/* Frontier v3.6.1 - final cascade guard for screenshot polish. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-briefing-height: clamp(174px, 20vh, 196px) !important;
    --frontier-panel-bg:
      linear-gradient(180deg, rgba(10, 12, 17, 0.97), rgba(5, 5, 8, 0.93)) !important;
    --frontier-panel-inner:
      linear-gradient(180deg, rgba(22, 18, 16, 0.62), rgba(8, 7, 9, 0.46)) !important;
    --frontier-panel-border: rgba(217, 184, 129, 0.36) !important;
    --frontier-panel-border-soft: rgba(217, 184, 129, 0.18) !important;
    height: calc(100dvh - 4.35rem) !important;
    padding: 4px 8px 8px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
    border-color: var(--frontier-panel-border) !important;
    background: var(--frontier-panel-bg) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 240, 210, 0.07),
      0 14px 28px rgba(0, 0, 0, 0.32) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__arrow,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
    border-color: var(--frontier-panel-border-soft) !important;
    background: var(--frontier-panel-inner) !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    border-color: rgba(217, 184, 129, 0.3) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage::before {
    background:
      radial-gradient(circle at 50% 46%, rgba(217, 184, 129, 0.12), transparent 36%),
      linear-gradient(180deg, rgba(19, 12, 8, 0.08), rgba(5, 5, 8, 0.34)) !important;
    mix-blend-mode: normal !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    top: 0 !important;
    height: var(--frontier-briefing-height) !important;
    max-height: var(--frontier-briefing-height) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 0.45rem !important;
    overflow: hidden !important;
    padding: 0.72rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(var(--frontier-briefing-height) + 6px) !important;
    bottom: 0 !important;
    max-height: none !important;
    gap: 0.52rem !important;
    padding: 0.72rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0.58rem !important;
    margin-top: 0 !important;
    min-height: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
    width: 58px !important;
    height: 58px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
    font-size: clamp(1.08rem, 1.08vw, 1.32rem) !important;
    line-height: 1.04 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
    gap: 0.35rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip {
    min-height: 2.15rem !important;
    padding: 0.32rem 0.42rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
    min-width: 0 !important;
    min-height: 2.1rem !important;
    font-size: 0.72rem !important;
    font-style: normal !important;
    text-transform: uppercase !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button,
  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign button {
    min-height: 2.25rem !important;
    font-size: 0.82rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    inset: auto 16px 106px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    top: clamp(154px, 25%, 220px) !important;
  }
}

/* Frontier issue repair - physical EOF cascade guard. */
.frontier-region-expedition.frontier-page-shell--open {
  --frontier-panel-bg: linear-gradient(135deg, rgba(8, 20, 38, 0.94), rgba(13, 25, 48, 0.84)),
    radial-gradient(circle at 82% 18%, rgba(214, 169, 79, 0.12), transparent 32%) !important;
  --frontier-panel-inner: rgba(3, 12, 23, 0.72) !important;
  --frontier-panel-border: rgba(214, 169, 79, 0.28) !important;
  --frontier-panel-text: rgba(244, 232, 208, 0.92) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
  border-color: var(--frontier-panel-border) !important;
  background: var(--frontier-panel-bg) !important;
  color: var(--frontier-panel-text) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 244, 215, 0.035), 0 10px 26px rgba(0, 0, 0, 0.3) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-status,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__meta,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__progress,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__chip--nodes {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
  padding: 7px 9px !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__list {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
  min-width: 0 !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 7px 8px !important;
  overflow: visible !important;
  border-color: rgba(214, 169, 79, 0.18) !important;
  background: var(--frontier-panel-inner) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__main {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 24px !important;
  grid-template-rows: 15px minmax(0, 1fr) !important;
  column-gap: 5px !important;
  row-gap: 3px !important;
  width: 100% !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__gem {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__code {
  position: static !important;
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 24px !important;
  height: 22px !important;
  min-width: 24px !important;
  border: 1px solid rgba(214, 169, 79, 0.42) !important;
  border-radius: 4px !important;
  background: rgba(3, 8, 17, 0.9) !important;
  color: #f3c96d !important;
  font: 900 10px/1 var(--font-ui, inherit) !important;
  letter-spacing: 0 !important;
  transform: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__name {
  grid-column: 1 / 3 !important;
  grid-row: 2 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  color: rgba(244, 232, 208, 0.9) !important;
  font-size: 8.7px !important;
  line-height: 1.08 !important;
  letter-spacing: 0.02em !important;
  white-space: normal !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--complete {
  border-color: rgba(214, 169, 79, 0.42) !important;
  background: linear-gradient(135deg, rgba(14, 40, 51, 0.82), rgba(3, 12, 23, 0.82)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared:not(.frontier-route-node--boss) .frontier-route-node__number {
  border-color: rgba(214, 169, 79, 0.7) !important;
  background: radial-gradient(circle at 35% 28%, rgba(232, 223, 201, 0.98), rgba(214, 169, 79, 0.62) 54%, rgba(3, 12, 23, 0.95) 100%) !important;
  color: #08111d !important;
  box-shadow: 0 0 0 2px rgba(214, 169, 79, 0.18), 0 0 18px rgba(214, 169, 79, 0.34) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 0.55fr) !important;
  align-items: center !important;
  column-gap: 12px !important;
  min-height: 82px !important;
  padding: 10px 12px !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel > .flex:first-child {
  display: contents !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel > .flex:first-child > div:first-child,
.frontier-region-expedition.frontier-page-shell--open .frontier-seals-header-chips {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-slot-grid {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: center !important;
  display: grid !important;
  grid-template-columns: repeat(3, 58px) !important;
  gap: 8px !important;
  margin: 0 !important;
  z-index: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions {
  grid-column: 3 !important;
  grid-row: 1 !important;
  justify-self: end !important;
  display: grid !important;
  grid-template-columns: minmax(118px, 142px) minmax(86px, 108px) !important;
  gap: 8px !important;
  align-items: stretch !important;
  z-index: 2 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 58px !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 4px !important;
  border-radius: 6px !important;
  border-color: rgba(214, 169, 79, 0.28) !important;
  background: rgba(3, 12, 23, 0.78) !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__frame,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty {
  display: grid !important;
  place-items: center !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 5px !important;
  border: 1px solid rgba(214, 169, 79, 0.26) !important;
  background: rgba(3, 8, 17, 0.84) !important;
  overflow: hidden !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty::before {
  content: "" !important;
  width: 22px !important;
  height: 22px !important;
  border: 1px solid rgba(232, 223, 201, 0.18) !important;
  border-radius: 3px !important;
  transform: rotate(45deg) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__icon {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 158px !important;
  min-height: 40px !important;
  padding: 7px 9px !important;
  border: 1px solid rgba(214, 169, 79, 0.22) !important;
  border-radius: 7px !important;
  background: rgba(3, 12, 23, 0.82) !important;
  color: rgba(244, 232, 208, 0.9) !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__icon {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50% !important;
  border: 1px solid rgba(214, 169, 79, 0.36) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__label {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: rgba(244, 232, 208, 0.86) !important;
  font: 900 10px/1 var(--font-ui, inherit) !important;
  letter-spacing: 0.08em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__state {
  color: #f3c96d !important;
  font: 900 10px/1 var(--font-mono, monospace) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__close {
  min-height: 38px !important;
  border-radius: 5px !important;
  border: 1px solid rgba(214, 169, 79, 0.38) !important;
  color: rgba(255, 244, 220, 0.95) !important;
  font: 900 11px/1.05 var(--font-ui, inherit) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind:disabled {
  border-color: rgba(214, 169, 79, 0.16) !important;
  background: linear-gradient(180deg, rgba(23, 36, 55, 0.96), rgba(7, 14, 27, 0.96)) !important;
  color: rgba(244, 232, 208, 0.62) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer,
.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs,
.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip {
  border-color: rgba(214, 169, 79, 0.2) !important;
  background: var(--frontier-panel-inner) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row {
  grid-template-columns: 42px minmax(0, 1fr) minmax(92px, 112px) !important;
  align-items: center !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal-layer {
  z-index: 2147483200 !important;
  padding: 22px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
  width: min(980px, calc(100vw - 64px)) !important;
  max-height: min(82vh, 760px) !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 12px !important;
  padding: 12px !important;
  overflow: hidden !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-width: 0 !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid rgba(214, 169, 79, 0.18) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__equipped {
  display: grid !important;
  grid-template-columns: minmax(104px, 150px) minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 74px !important;
  padding: 10px !important;
  border: 1px solid rgba(214, 169, 79, 0.2) !important;
  border-radius: 6px !important;
  background: rgba(3, 12, 23, 0.72) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 64px) !important;
  gap: 8px !important;
  justify-content: start !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot {
  position: relative !important;
  display: grid !important;
  place-items: center !important;
  width: 64px !important;
  height: 56px !important;
  padding: 4px !important;
  border-radius: 6px !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-icon,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-empty {
  width: 46px !important;
  height: 46px !important;
  border-radius: 5px !important;
  object-fit: cover !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-rank {
  position: absolute !important;
  right: 4px !important;
  bottom: 3px !important;
  color: #f3c96d !important;
  font: 900 9px/1 var(--font-mono, monospace) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  min-height: 0 !important;
  overflow: auto !important;
  padding-right: 6px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card {
  display: grid !important;
  grid-template-rows: auto auto auto auto !important;
  gap: 8px !important;
  min-width: 0 !important;
  padding: 10px !important;
  border-color: rgba(214, 169, 79, 0.2) !important;
  background: rgba(3, 12, 23, 0.72) !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card-head {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__portrait {
  width: 48px !important;
  height: 48px !important;
  border: 1px solid rgba(214, 169, 79, 0.28) !important;
  border-radius: 6px !important;
  object-fit: cover !important;
  background: rgba(3, 8, 17, 0.92) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__name {
  overflow-wrap: anywhere !important;
  color: rgba(244, 232, 208, 0.92) !important;
  line-height: 1.1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-help-tooltip {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help] {
  position: relative !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::before {
  content: none !important;
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::after {
  content: attr(data-help) !important;
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(100% + 8px) !important;
  top: auto !important;
  z-index: 2147483647 !important;
  width: min(320px, 78vw) !important;
  min-height: 0 !important;
  padding: 8px 10px !important;
  border: 1px solid rgba(214, 169, 79, 0.42) !important;
  border-radius: 6px !important;
  background: rgba(3, 8, 17, 0.96) !important;
  color: rgba(244, 232, 208, 0.92) !important;
  font: 600 11px/1.35 var(--font-body, inherit) !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
  white-space: pre-line !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transform: translate(-50%, 4px) !important;
  transition: opacity 0.15s ease, transform 0.15s ease !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(214, 169, 79, 0.1) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]::after {
  left: auto !important;
  right: 0 !important;
  transform: translateY(4px) !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]:hover,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-visible,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-within {
  z-index: 2147483600 !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-within::after {
  opacity: 1 !important;
  transform: translate(-50%, 0) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:focus-within::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:focus-within::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]:focus-within::after {
  transform: translateY(0) !important;
}

@media (max-width: 1180px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__list {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-slot-grid {
    grid-column: 1 !important;
    justify-self: start !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Frontier v3.6 - screenshot polish, auto-combat, and solid foreground help. */
.frontier-active-step-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 74px;
  max-width: 116px;
  padding: 0.24rem 0.42rem;
  border: 1px solid rgba(217, 184, 129, 0.44);
  border-radius: 4px;
  background: rgba(8, 7, 10, 0.92);
  color: #ffe6a8;
  font-family: var(--font-ui, inherit);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 241, 209, 0.12);
}

.frontier-help-tooltip {
  position: fixed;
  z-index: 2147483647;
  width: max-content;
  max-width: min(340px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid rgba(217, 184, 129, 0.62);
  border-radius: 6px;
  background: linear-gradient(180deg, #09070b, #040306);
  color: #fff2d6;
  font-family: var(--font-ui, inherit);
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.32;
  pointer-events: none;
  white-space: normal;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 240, 210, 0.12);
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::before,
.frontier-region-expedition.frontier-page-shell--open [data-help]::after {
  content: none !important;
  display: none !important;
}

/* Frontier consistency repair - keep this as the physical last cascade block. */
.frontier-region-expedition.frontier-page-shell--open {
  --frontier-ui-blue: linear-gradient(135deg, rgba(8, 20, 38, 0.98), rgba(12, 28, 52, 0.94)) !important;
  --frontier-ui-blue-raised: linear-gradient(180deg, rgba(13, 31, 57, 0.98), rgba(5, 13, 25, 0.98)) !important;
  --frontier-ui-line: rgba(214, 169, 79, 0.36) !important;
  --frontier-ui-line-soft: rgba(214, 169, 79, 0.2) !important;
  --frontier-ui-text: rgba(244, 232, 208, 0.96) !important;
  --frontier-ui-muted: rgba(196, 211, 226, 0.78) !important;
  --frontier-ui-gold: #f3c96d !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
  border-color: var(--frontier-ui-line) !important;
  background: var(--frontier-ui-blue) !important;
  color: var(--frontier-ui-text) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 160, 0.04), 0 18px 46px rgba(0, 0, 0, 0.34) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
  background: linear-gradient(180deg, rgba(9, 22, 42, 0.98), rgba(4, 10, 21, 0.98)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
  gap: 0.45rem !important;
  border-color: transparent !important;
  background: rgba(2, 7, 15, 0.34) !important;
  padding: 0.35rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
  min-height: 2.55rem !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.86), rgba(3, 8, 17, 0.86)) !important;
  color: var(--frontier-ui-gold) !important;
  font-size: clamp(0.78rem, 0.72vw, 0.9rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button.bg-celestial-gold\/18,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button[aria-selected="true"] {
  border-color: rgba(214, 169, 79, 0.55) !important;
  background: linear-gradient(180deg, rgba(55, 43, 24, 0.96), rgba(24, 22, 20, 0.96)) !important;
  color: #fff1bf !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign {
  gap: 0.65rem !important;
  overflow: visible !important;
  color: var(--frontier-ui-text) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-note {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
  min-height: 6.4rem !important;
  padding: 0.72rem 0.78rem !important;
  border: 1px solid var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: var(--frontier-ui-blue-raised) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 226, 160, 0.035) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer--sweep .frontier-command-offer__row {
  display: grid !important;
  grid-template-columns: 3.25rem minmax(0, 1fr) 7.4rem !important;
  align-items: center !important;
  gap: 0.75rem !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__icon {
  width: 3rem !important;
  height: 3rem !important;
  padding: 0.28rem !important;
  border: 1px solid rgba(214, 169, 79, 0.28) !important;
  border-radius: 6px !important;
  background: rgba(2, 7, 15, 0.86) !important;
  object-fit: cover !important;
  box-shadow: 0 0 14px rgba(70, 143, 255, 0.12) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy {
  display: grid !important;
  grid-template-columns: minmax(10.5rem, 0.88fr) minmax(15.75rem, 1.12fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 0.85rem !important;
  row-gap: 0.16rem !important;
  align-items: center !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__title,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row .font-serif {
  grid-column: 1 !important;
  grid-row: 1 !important;
  margin: 0 !important;
  color: var(--frontier-ui-text) !important;
  font-family: var(--font-serif) !important;
  font-size: clamp(0.96rem, 0.9vw, 1.12rem) !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  text-align: left !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__desc {
  grid-column: 1 !important;
  grid-row: 2 !important;
  margin: 0 !important;
  color: var(--frontier-ui-muted) !important;
  font-size: clamp(0.72rem, 0.64vw, 0.82rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  text-align: left !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy > .frontier-hud-chip-row {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  display: grid !important;
  grid-template-columns: minmax(5.6rem, 1fr) auto minmax(5.6rem, 1fr) !important;
  align-items: center !important;
  gap: 0.52rem !important;
  margin: 0 !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip {
  min-height: 2.65rem !important;
  padding: 0.42rem 0.55rem !important;
  border-color: rgba(214, 169, 79, 0.32) !important;
  border-radius: 5px !important;
  background: linear-gradient(180deg, rgba(4, 10, 20, 0.95), rgba(1, 4, 10, 0.96)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__icon {
  width: 1.3rem !important;
  height: 1.3rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__value {
  color: #ffe2a3 !important;
  font-size: clamp(0.82rem, 0.76vw, 0.95rem) !important;
  line-height: 1.05 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__label {
  color: rgba(224, 231, 238, 0.78) !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.08em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__close {
  min-height: 2.7rem !important;
  border: 1px solid rgba(214, 169, 79, 0.42) !important;
  border-radius: 5px !important;
  font-size: clamp(0.76rem, 0.68vw, 0.88rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em !important;
  text-transform: none !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__close {
  background: linear-gradient(180deg, #e3ca8b, #c49a49) !important;
  color: #071421 !important;
  text-shadow: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:not(:disabled):hover,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:not(:disabled):hover,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action:not(:disabled):hover,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:not(:disabled):hover,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind:not(:disabled):hover,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__close:hover {
  background: linear-gradient(180deg, #f0dba3, #d6ad59) !important;
  transform: translateY(-1px) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind:disabled {
  border-color: rgba(120, 137, 158, 0.24) !important;
  background: linear-gradient(180deg, rgba(24, 37, 55, 0.98), rgba(8, 15, 29, 0.98)) !important;
  color: rgba(220, 229, 239, 0.72) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  padding: 0.8rem 1rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-slot-grid {
  gap: 0.55rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
  width: 3.7rem !important;
  min-height: 3.7rem !important;
  padding: 0.35rem !important;
  border-color: var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, rgba(8, 18, 34, 0.92), rgba(2, 6, 13, 0.94)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__frame,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty {
  width: 2.7rem !important;
  height: 2.7rem !important;
  border-radius: 5px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__icon {
  width: 2.7rem !important;
  height: 2.7rem !important;
  border-radius: 5px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button {
  min-height: 2.7rem !important;
  border-color: rgba(214, 169, 79, 0.32) !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, rgba(10, 22, 41, 0.98), rgba(4, 9, 18, 0.98)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal-layer {
  align-items: center !important;
  padding: 1.4rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
  width: min(74rem, calc(100vw - 4rem)) !important;
  max-height: calc(100vh - 3.5rem) !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 0.7rem !important;
  overflow: visible !important;
  padding: 0.85rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__header {
  align-items: center !important;
  margin-bottom: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__title {
  font-size: clamp(1.25rem, 1.35vw, 1.65rem) !important;
  line-height: 1.04 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__equipped {
  display: grid !important;
  grid-template-columns: 12.5rem minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0.9rem !important;
  min-height: 4.6rem !important;
  margin: 0 !important;
  padding: 0.65rem 0.8rem !important;
  border: 1px solid var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: var(--frontier-ui-blue-raised) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.55rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot {
  min-height: 3.35rem !important;
  padding: 0.35rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.62rem !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card {
  min-height: 8.1rem !important;
  padding: 0.62rem !important;
  border: 1px solid var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: var(--frontier-ui-blue-raised) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card-head {
  gap: 0.6rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__portrait {
  width: 3.05rem !important;
  height: 3.05rem !important;
  border-radius: 6px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__name {
  color: var(--frontier-ui-text) !important;
  font-size: clamp(0.96rem, 0.84vw, 1.1rem) !important;
  line-height: 1.08 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__stats {
  gap: 0.35rem !important;
  margin-top: 0.5rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind {
  margin-top: 0.52rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-help-tooltip {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open,
.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail,
.frontier-region-expedition.frontier-page-shell--open .frontier-map-stage,
.frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body {
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help] {
  position: relative !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::before {
  content: none !important;
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::after {
  content: attr(data-help) !important;
  display: block !important;
  position: absolute !important;
  left: 50% !important;
  bottom: calc(100% + 0.5rem) !important;
  z-index: 2147483647 !important;
  width: max-content !important;
  max-width: min(20rem, calc(100vw - 2rem)) !important;
  padding: 0.58rem 0.68rem !important;
  border: 1px solid rgba(214, 169, 79, 0.46) !important;
  border-radius: 6px !important;
  background: rgba(3, 8, 17, 0.99) !important;
  color: rgba(244, 232, 208, 0.96) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.58) !important;
  font-family: var(--font-ui, inherit) !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  white-space: normal !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transform: translate(-50%, 0.25rem) !important;
  transition: opacity 0.12s ease, transform 0.12s ease !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate [data-help]::after {
  left: auto !important;
  right: 0 !important;
  transform: translateY(0.25rem) !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-within::after {
  opacity: 1 !important;
  transform: translate(-50%, 0) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:focus-within::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:focus-within::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate [data-help]:focus-within::after {
  transform: translateY(0) !important;
}

@media (max-width: 1380px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer--sweep .frontier-command-offer__row {
    grid-template-columns: 2.85rem minmax(0, 1fr) 6.6rem !important;
    gap: 0.55rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy {
    grid-template-columns: minmax(7.4rem, 0.74fr) minmax(12.25rem, 1.26fr) !important;
    column-gap: 0.55rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy > .frontier-hud-chip-row {
    grid-template-columns: minmax(4.85rem, 1fr) auto minmax(4.85rem, 1fr) !important;
    gap: 0.35rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
    width: min(72rem, calc(100vw - 2.2rem)) !important;
  }
}

/* Frontier consistency repair - must stay after the old viewport-fit guard. */
.frontier-region-expedition.frontier-page-shell--open {
  --frontier-ui-blue: linear-gradient(135deg, rgba(8, 20, 38, 0.96), rgba(13, 25, 48, 0.88)) !important;
  --frontier-ui-blue-raised: linear-gradient(180deg, rgba(13, 30, 55, 0.96), rgba(5, 13, 25, 0.96)) !important;
  --frontier-ui-blue-soft: rgba(7, 18, 34, 0.88) !important;
  --frontier-ui-line: rgba(214, 169, 79, 0.32) !important;
  --frontier-ui-line-soft: rgba(214, 169, 79, 0.18) !important;
  --frontier-ui-text: rgba(244, 232, 208, 0.94) !important;
  --frontier-ui-muted: rgba(198, 211, 226, 0.74) !important;
  --frontier-ui-gold: #f3c96d !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
  border-color: var(--frontier-ui-line) !important;
  background: var(--frontier-ui-blue) !important;
  color: var(--frontier-ui-text) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 215, 0.04),
    0 12px 28px rgba(0, 0, 0, 0.34) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
  gap: 0.75rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  padding: 8px !important;
  border: 1px solid var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: rgba(3, 10, 20, 0.5) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
  min-height: 40px !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  color: var(--frontier-ui-gold) !important;
  font: 900 12px/1 var(--font-ui, inherit) !important;
  letter-spacing: 0.06em !important;
  background: transparent !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button[class*="bg-celestial-gold"],
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button:hover {
  border-color: rgba(214, 169, 79, 0.46) !important;
  background: linear-gradient(180deg, rgba(49, 39, 21, 0.92), rgba(22, 25, 33, 0.9)) !important;
  color: rgba(255, 244, 220, 0.98) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress {
  display: grid !important;
  gap: 10px !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-note {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
  min-height: 104px !important;
  padding: 12px !important;
  border: 1px solid var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: var(--frontier-ui-blue-raised) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer + .frontier-command-offer {
  margin-top: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer--sweep .frontier-command-offer__row {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) 126px !important;
  align-items: center !important;
  gap: 12px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__icon {
  width: 46px !important;
  height: 46px !important;
  padding: 5px !important;
  border: 1px solid rgba(214, 169, 79, 0.26) !important;
  border-radius: 6px !important;
  background: rgba(3, 8, 17, 0.84) !important;
  object-fit: cover !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy {
  display: grid !important;
  grid-template-columns: minmax(150px, 0.8fr) minmax(250px, 1.2fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 14px !important;
  row-gap: 3px !important;
  align-items: center !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__title {
  grid-column: 1 !important;
  grid-row: 1 !important;
  color: var(--frontier-ui-text) !important;
  font-size: clamp(15px, 0.92vw, 18px) !important;
  line-height: 1.1 !important;
  text-align: left !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__desc {
  grid-column: 1 !important;
  grid-row: 2 !important;
  margin: 0 !important;
  color: var(--frontier-ui-muted) !important;
  font-size: 11.5px !important;
  line-height: 1.25 !important;
  text-align: left !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy > .frontier-hud-chip-row {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  display: grid !important;
  grid-template-columns: minmax(88px, 1fr) auto minmax(88px, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 0 !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip {
  min-height: 42px !important;
  padding: 7px 8px !important;
  border-color: rgba(214, 169, 79, 0.28) !important;
  border-radius: 6px !important;
  background: rgba(3, 9, 18, 0.72) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__icon {
  width: 24px !important;
  height: 24px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__value {
  font-size: 12px !important;
  line-height: 1.05 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__label {
  font-size: 9px !important;
  line-height: 1.05 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip-arrow {
  color: var(--frontier-ui-gold) !important;
  font-size: 13px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--reason {
  grid-column: 1 / -1 !important;
  min-height: 34px !important;
  background: rgba(95, 22, 22, 0.48) !important;
  border-color: rgba(203, 80, 68, 0.55) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__close {
  min-height: 42px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(214, 169, 79, 0.42) !important;
  font: 900 12px/1.05 var(--font-ui, inherit) !important;
  letter-spacing: 0.03em !important;
  text-transform: none !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__close {
  background: linear-gradient(180deg, #e2c88a, #c59b4d) !important;
  color: #071421 !important;
  text-shadow: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind:disabled {
  background: linear-gradient(180deg, rgba(23, 36, 55, 0.96), rgba(7, 14, 27, 0.96)) !important;
  border-color: rgba(214, 169, 79, 0.18) !important;
  color: rgba(221, 231, 242, 0.7) !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer--sweep .frontier-command-offer__copy {
  grid-template-columns: minmax(180px, 0.85fr) minmax(220px, 1fr) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-sweep-pips {
  grid-column: 2 !important;
  justify-content: flex-start !important;
  margin-top: 5px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  min-height: 96px !important;
  padding: 14px 18px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-slot-grid {
  grid-template-columns: repeat(3, 68px) !important;
  gap: 12px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
  width: 68px !important;
  height: 68px !important;
  min-height: 68px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__frame,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty {
  width: 56px !important;
  height: 56px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions {
  grid-template-columns: minmax(138px, 164px) minmax(96px, 116px) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal-layer {
  z-index: 2147483200 !important;
  padding: 20px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
  width: min(1180px, calc(100vw - 80px)) !important;
  max-height: calc(100vh - 56px) !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto auto auto !important;
  gap: 12px !important;
  padding: 14px !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding-bottom: 10px !important;
  border-bottom: 1px solid var(--frontier-ui-line-soft) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__title {
  font-size: clamp(22px, 1.4vw, 28px) !important;
  line-height: 1.05 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__equipped {
  display: grid !important;
  grid-template-columns: 210px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 72px !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: var(--frontier-ui-blue-raised) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__section-title {
  color: var(--frontier-ui-gold) !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  letter-spacing: 0.08em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 60px) !important;
  gap: 10px !important;
  justify-content: start !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot {
  width: 60px !important;
  height: 54px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card {
  min-height: 146px !important;
  padding: 10px !important;
  gap: 7px !important;
  border: 1px solid var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: var(--frontier-ui-blue-raised) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card-head {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__portrait {
  width: 44px !important;
  height: 44px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__name {
  font-size: clamp(14px, 0.86vw, 17px) !important;
  line-height: 1.08 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__stats {
  gap: 5px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__stats span {
  padding: 4px 6px !important;
  font-size: 9.5px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__meta {
  font-size: 10px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind {
  min-height: 34px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-help-tooltip {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help] {
  position: relative !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::before {
  content: none !important;
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::after {
  content: attr(data-help) !important;
  display: block !important;
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: calc(100% + 8px) !important;
  top: auto !important;
  z-index: 2147483647 !important;
  width: min(340px, 78vw) !important;
  min-height: 0 !important;
  padding: 9px 11px !important;
  border: 1px solid rgba(214, 169, 79, 0.48) !important;
  border-radius: 6px !important;
  background: rgba(3, 8, 17, 0.98) !important;
  color: rgba(244, 232, 208, 0.94) !important;
  font: 650 11.5px/1.38 var(--font-body, inherit) !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
  white-space: normal !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transform: translate(-50%, 4px) !important;
  transition: opacity 0.12s ease, transform 0.12s ease !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.58), 0 0 18px rgba(214, 169, 79, 0.1) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]::after {
  left: auto !important;
  right: 0 !important;
  transform: translateY(4px) !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]:hover,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-visible,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-within {
  z-index: 2147483600 !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-within::after {
  opacity: 1 !important;
  transform: translate(-50%, 0) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:focus-within::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:focus-within::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal [data-help]:focus-within::after {
  transform: translateY(0) !important;
}

@media (max-width: 1380px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer--sweep .frontier-command-offer__row {
    grid-template-columns: 50px minmax(0, 1fr) 118px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy {
    grid-template-columns: minmax(138px, 0.72fr) minmax(214px, 1.28fr) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

.frontier-node-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0.5rem;
  min-width: 0;
}

.frontier-combat-blocked-message {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 0.48rem 0.62rem;
  border: 1px solid rgba(225, 119, 92, 0.42);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(91, 27, 28, 0.7), rgba(38, 13, 18, 0.78));
  color: #ffd7bd;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.frontier-auto-combat-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  min-width: 104px;
  white-space: nowrap;
}

.frontier-auto-combat-button__icon {
  width: 1.35rem;
  height: 1.35rem;
  flex: 0 0 1.35rem;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 232, 170, 0.22);
}

.frontier-auto-combat-button--on {
  border-color: rgba(72, 190, 176, 0.68) !important;
  background:
    linear-gradient(180deg, rgba(74, 155, 140, 0.94), rgba(26, 91, 89, 0.98)) !important;
  color: #f0fffa !important;
  box-shadow:
    inset 0 1px 0 rgba(212, 255, 244, 0.2),
    0 0 16px rgba(72, 190, 176, 0.24) !important;
}

@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-briefing-height: clamp(174px, 20vh, 196px);
    --frontier-panel-bg:
      linear-gradient(180deg, rgba(10, 12, 17, 0.97), rgba(5, 5, 8, 0.93));
    --frontier-panel-inner:
      linear-gradient(180deg, rgba(22, 18, 16, 0.62), rgba(8, 7, 9, 0.46));
    --frontier-panel-border: rgba(217, 184, 129, 0.36);
    --frontier-panel-border-soft: rgba(217, 184, 129, 0.18);
    height: calc(100dvh - 4.35rem) !important;
    padding: 4px 8px 8px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
    height: 100% !important;
    gap: 8px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    border-color: rgba(217, 184, 129, 0.3) !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 240, 210, 0.035),
      inset 0 0 78px rgba(0, 0, 0, 0.28),
      0 18px 48px rgba(0, 0, 0, 0.46) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage::before {
    background:
      radial-gradient(circle at 50% 46%, rgba(217, 184, 129, 0.12), transparent 36%),
      linear-gradient(180deg, rgba(19, 12, 8, 0.08), rgba(5, 5, 8, 0.34)) !important;
    mix-blend-mode: normal !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
    border-color: var(--frontier-panel-border) !important;
    background: var(--frontier-panel-bg) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 240, 210, 0.07),
      0 14px 28px rgba(0, 0, 0, 0.32) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__arrow,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
    border-color: var(--frontier-panel-border-soft) !important;
    background: var(--frontier-panel-inner) !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    top: 0 !important;
    height: var(--frontier-briefing-height) !important;
    max-height: var(--frontier-briefing-height) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 0.45rem !important;
    overflow: hidden !important;
    padding: 0.72rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(var(--frontier-briefing-height) + 6px) !important;
    bottom: 0 !important;
    max-height: none !important;
    gap: 0.52rem !important;
    padding: 0.72rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
    font-size: clamp(1.08rem, 1.08vw, 1.32rem) !important;
    line-height: 1.04 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-subtitle {
    font-size: 0.74rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0.58rem !important;
    margin-top: 0 !important;
    min-height: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
    width: 58px !important;
    height: 58px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body .space-y-3 {
    display: grid !important;
    grid-template-rows: auto auto;
    gap: 0.35rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
    gap: 0.35rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip {
    min-height: 2.15rem !important;
    padding: 0.32rem 0.42rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip__value {
    font-size: 0.84rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip__label,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip__label {
    font-size: 0.5rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip {
    flex: 1 1 0;
    min-width: 0;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button,
  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button {
    min-height: 2.25rem !important;
    font-size: 0.78rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
    min-width: 0 !important;
    min-height: 2.1rem !important;
    font-size: 0.72rem !important;
    font-style: normal !important;
    text-transform: uppercase !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-stack {
    max-height: none !important;
    min-height: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign button {
    min-height: 2.25rem !important;
    font-size: 0.84rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    max-height: 96px !important;
    padding: 0.56rem 0.64rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
    min-height: 3.15rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    inset: auto 16px 106px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    top: clamp(154px, 25%, 220px) !important;
  }
}

@media (max-width: 1180px) {
  .frontier-node-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .frontier-auto-combat-button {
    width: 100%;
  }
}

/* Frontier HUD phase a - shared primitives and warm palette sweep. */
.frontier-region-expedition.frontier-page-shell--open {
  --frontier-hud-hairline: rgba(217, 184, 129, 0.28);
  --frontier-hud-hairline-strong: rgba(236, 203, 132, 0.48);
  --frontier-hud-surface: rgba(0, 0, 0, 0.45);
  --frontier-hud-surface-raised: rgba(15, 12, 16, 0.74);
  --frontier-hud-gold: #e2c270;
  --frontier-hud-parchment: #f4e8d0;
  --frontier-hud-crimson: #c74235;
  --frontier-hud-teal: #7edfc8;
  --frontier-hud-ember: #f29d55;
  --frontier-hud-violet: #b9a1ff;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip {
  display: inline-flex;
  min-height: 1.9rem;
  align-items: center;
  gap: 0.42rem;
  border: 1px solid var(--frontier-hud-hairline) !important;
  border-radius: 6px !important;
  padding: 0.28rem 0.48rem;
  background:
    radial-gradient(circle at 10% 0%, rgba(217, 184, 129, 0.12), transparent 36%),
    var(--frontier-hud-surface) !important;
  color: var(--frontier-hud-parchment);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 216, 0.06),
    0 8px 18px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-radius: 3px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(217, 184, 129, 0.28), 0 0 10px rgba(217, 184, 129, 0.18);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__body {
  display: grid;
  gap: 0.04rem;
  min-width: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  color: var(--frontier-hud-gold);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__label {
  color: rgba(244, 232, 208, 0.66);
  font-family: var(--font-body);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--cost .frontier-hud-chip__value {
  color: #f1c98d;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--gain .frontier-hud-chip__value {
  color: #f4da91;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--stat-hp .frontier-hud-chip__value {
  color: var(--frontier-hud-teal);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--stat-dmg .frontier-hud-chip__value {
  color: var(--frontier-hud-ember);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--stat-def .frontier-hud-chip__value {
  color: rgba(244, 232, 208, 0.86);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--missing .frontier-hud-chip__value {
  color: #ff8f81;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip-arrow {
  color: rgba(217, 184, 129, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  font-weight: 800;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-meter {
  display: grid;
  gap: 0.34rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-meter__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: rgba(244, 232, 208, 0.66);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-meter__head strong {
  color: var(--frontier-hud-parchment);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-meter__track {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.72);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-meter__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(126, 83, 33, 0.95), rgba(231, 192, 100, 0.95));
  box-shadow: 0 0 12px rgba(231, 192, 100, 0.38);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-fight-button {
  border: 1px solid rgba(236, 203, 132, 0.48) !important;
  border-radius: 6px !important;
  background:
    linear-gradient(180deg, rgba(148, 36, 31, 0.96), rgba(79, 17, 18, 0.98)) !important;
  color: #fff0d2 !important;
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 221, 168, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.42),
    0 13px 28px rgba(90, 20, 18, 0.34) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-fight-button:not(:disabled):hover {
  background:
    linear-gradient(180deg, rgba(190, 55, 44, 0.98), rgba(93, 20, 21, 0.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 221, 168, 0.28),
    0 0 0 1px rgba(0, 0, 0, 0.46),
    0 0 24px rgba(199, 66, 53, 0.34) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-fight-button:disabled {
  filter: grayscale(0.25);
  opacity: 0.5 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign button {
  min-height: 2.2rem !important;
  border: 1px solid rgba(217, 184, 129, 0.42) !important;
  border-radius: 6px !important;
  background:
    linear-gradient(180deg, rgba(83, 61, 30, 0.96), rgba(38, 29, 19, 0.98)) !important;
  color: #f6df9d !important;
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 174, 0.16),
    0 10px 22px rgba(0, 0, 0, 0.28) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign button:disabled {
  background: linear-gradient(180deg, rgba(45, 38, 29, 0.72), rgba(20, 18, 16, 0.84)) !important;
  color: rgba(244, 232, 208, 0.52) !important;
  opacity: 0.58 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
  border-color: rgba(217, 184, 129, 0.24) !important;
  background: rgba(0, 0, 0, 0.5) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
  min-height: 1.8rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent !important;
  color: rgba(244, 232, 208, 0.68) !important;
  font-weight: 900;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button[class*="bg-celestial-gold"] {
  border-color: rgba(217, 184, 129, 0.4);
  background: rgba(217, 184, 129, 0.14) !important;
  color: #f4da91 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div {
  border-color: rgba(217, 184, 129, 0.24) !important;
  background:
    radial-gradient(circle at 20% 0%, rgba(217, 184, 129, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(24, 19, 20, 0.84), rgba(8, 7, 9, 0.82)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div > div:last-child {
  color: #f4e8d0 !important;
  text-shadow: 0 0 12px rgba(217, 184, 129, 0.18) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward {
  border-color: rgba(217, 184, 129, 0.28) !important;
  background:
    radial-gradient(circle at 94% 50%, rgba(147, 113, 255, 0.16), transparent 44%),
    linear-gradient(180deg, rgba(23, 18, 26, 0.84), rgba(6, 5, 9, 0.86)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__value {
  color: #f4da91 !important;
  text-shadow: 0 0 12px rgba(185, 161, 255, 0.18) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__bonus {
  color: rgba(244, 232, 208, 0.74) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__mark {
  border-color: rgba(217, 184, 129, 0.34) !important;
  background: linear-gradient(180deg, rgba(64, 48, 89, 0.84), rgba(22, 16, 34, 0.92)) !important;
  color: #efe4ff !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel .frontier-seal-socket {
  display: grid;
  min-height: 5.4rem !important;
  place-items: center;
  border: 1px solid rgba(217, 184, 129, 0.24) !important;
  border-radius: 8px !important;
  background:
    radial-gradient(circle at 50% 42%, rgba(217, 184, 129, 0.09), transparent 44%),
    linear-gradient(180deg, rgba(9, 8, 9, 0.92), rgba(2, 2, 3, 0.96)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.58),
    inset 0 10px 22px rgba(0, 0, 0, 0.46),
    0 10px 22px rgba(0, 0, 0, 0.25);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket::before {
  border-color: rgba(217, 184, 129, 0.22) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket--selected {
  border-color: rgba(236, 203, 132, 0.58) !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.54),
    0 0 20px rgba(217, 184, 129, 0.2) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-rank-pips {
  display: inline-flex;
  justify-content: center;
  gap: 0.18rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-rank-pip {
  width: 0.38rem;
  height: 0.38rem;
  border: 1px solid rgba(217, 184, 129, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-rank-pip--filled {
  background: #e2c270;
  box-shadow: 0 0 8px rgba(226, 194, 112, 0.34);
}

/* Frontier HUD phase b - Node Briefing dock rebuild. */
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-eyebrow {
  color: #e2c270 !important;
  font-family: var(--font-serif);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
  color: #f4e8d0 !important;
  font-size: 1.25rem !important;
  line-height: 1.08 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-subtitle {
  color: rgba(244, 232, 208, 0.72) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-number-chip {
  display: inline-flex;
  min-height: 1.75rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 184, 129, 0.32);
  border-radius: 6px;
  padding: 0.28rem 0.55rem;
  background: rgba(0, 0, 0, 0.45);
  color: #f4da91;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-number-chip--boss {
  border-color: rgba(199, 66, 53, 0.58);
  background: linear-gradient(180deg, rgba(93, 20, 21, 0.78), rgba(20, 6, 7, 0.88));
  color: #ffd8c6;
  box-shadow: 0 0 16px rgba(199, 66, 53, 0.24);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
  align-items: center !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
  width: 72px !important;
  height: 72px !important;
  border: 1px solid rgba(217, 184, 129, 0.34);
  border-radius: 6px !important;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45),
    0 14px 30px rgba(0, 0, 0, 0.46) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats.frontier-hud-chip-row {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip {
  min-width: 0;
  padding-inline: 0.4rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip__label {
  font-size: 0.52rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-reward.frontier-aether-reward {
  min-height: auto !important;
  align-items: center;
  border-radius: 6px !important;
  padding: 0.55rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-reward.frontier-aether-reward::before {
  content: "";
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip {
  flex: 1 1 9rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .frontier-fight-button {
  width: 100%;
  justify-content: center;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-fight-button--boss {
  background:
    linear-gradient(180deg, rgba(190, 55, 44, 0.98), rgba(85, 12, 18, 0.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 221, 168, 0.28),
    0 0 0 1px rgba(0, 0, 0, 0.46),
    0 0 28px rgba(199, 66, 53, 0.42) !important;
}

/* Frontier HUD phase c - Command panel tabs and row cards. */
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
  gap: 0.62rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.22rem;
  width: 100%;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
  width: 100%;
  justify-content: center;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body {
  min-width: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress.frontier-progress-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card {
  border-color: rgba(217, 184, 129, 0.22) !important;
  border-radius: 6px !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 184, 129, 0.1), transparent 38%),
    rgba(0, 0, 0, 0.36) !important;
  box-shadow: inset 0 1px 0 rgba(255, 244, 216, 0.04);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__label {
  color: rgba(244, 232, 208, 0.68) !important;
  font-family: var(--font-serif);
  letter-spacing: 0.16em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-reward-row {
  margin-top: 0.42rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-reward-row .frontier-hud-chip:first-child {
  flex: 1 1 11rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-title {
  color: #e2c270 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-costs {
  margin-top: 0.45rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop {
  gap: 0.42rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-note {
  margin-bottom: 0.1rem;
  color: rgba(244, 232, 208, 0.58) !important;
  font-size: 0.66rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
  border-color: rgba(217, 184, 129, 0.2) !important;
  border-radius: 6px !important;
  background:
    radial-gradient(circle at 0% 0%, rgba(217, 184, 129, 0.09), transparent 34%),
    rgba(0, 0, 0, 0.34) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer + .frontier-command-offer {
  border-top-color: rgba(217, 184, 129, 0.3) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row {
  display: grid;
  grid-template-columns: 2.15rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.62rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__icon {
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid rgba(217, 184, 129, 0.3);
  border-radius: 6px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 216, 0.06),
    0 0 12px rgba(217, 184, 129, 0.14);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__title {
  color: #f4e8d0;
  font-size: 0.82rem !important;
  line-height: 1.1;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__desc {
  color: rgba(244, 232, 208, 0.64) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta {
  align-items: center;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--reason {
  border-color: rgba(199, 66, 53, 0.34) !important;
  background:
    radial-gradient(circle at 10% 0%, rgba(199, 66, 53, 0.18), transparent 40%),
    rgba(34, 8, 9, 0.5) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--reason .frontier-hud-chip__value {
  color: #ffad91;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--reason .frontier-hud-chip__label {
  max-width: 13rem;
  color: rgba(255, 214, 190, 0.78);
  font-size: 0.62rem;
  letter-spacing: 0;
  line-height: 1.12;
  text-transform: none;
  white-space: normal;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer--sweep .frontier-command-offer__row {
  align-items: center;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-sweep-pips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-top: 0.48rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-sweep-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-sweep-status > span {
  padding: 0.24rem 0.42rem;
  border: 1px solid rgba(214, 169, 79, 0.22);
  border-radius: 0.3rem;
  background: rgba(3, 9, 18, 0.68);
  color: rgba(242, 220, 171, 0.88);
  font-size: 0.66rem;
  font-weight: 800;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-sweep-pip {
  width: 0.55rem;
  height: 0.55rem;
  border: 1px solid rgba(217, 184, 129, 0.3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.54);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-sweep-pip--complete {
  background: #e2c270;
  box-shadow: 0 0 10px rgba(226, 194, 112, 0.35);
}

@media (max-width: 900px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-card {
    grid-template-columns: 2.15rem minmax(0, 1fr);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row > button,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-card > button {
    grid-column: 1 / -1;
  }
}

/* Factions command-map V2. Scoped so the legacy screen returns when the JS rollback flag is off. */
.faction-page-shell--v2 {
  --faction-command-width: clamp(350px, 29vw, 448px);
  --faction-command-edge: 14px;
  background:
    radial-gradient(circle at 42% 44%, rgba(92, 117, 171, 0.13), transparent 34%),
    #02060f;
}

.faction-page-shell--v2 .faction-map-scrim--top {
  right: calc(var(--faction-command-width) + 34px);
  padding: 16px 20px 72px;
  background: linear-gradient(180deg, rgba(2, 6, 14, 0.94), rgba(2, 6, 14, 0.52) 56%, transparent);
}

.faction-page-shell--v2 .faction-map-scrim--bottom {
  display: none;
}

.faction-command-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.faction-command-strip > span {
  display: grid;
  grid-template-columns: auto auto;
  gap: 7px;
  align-items: center;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid rgba(217, 184, 129, 0.2);
  border-radius: 5px;
  background: rgba(2, 8, 18, 0.68);
  color: rgba(244, 232, 208, 0.88);
  font: 800 11px/1.1 var(--font-body, inherit);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.faction-command-strip b {
  color: rgba(217, 184, 129, 0.7);
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.faction-page-shell--v2 .faction-detail-panel {
  top: var(--faction-command-edge) !important;
  right: var(--faction-command-edge) !important;
  bottom: var(--faction-command-edge) !important;
  width: var(--faction-command-width) !important;
  grid-template-rows: clamp(88px, 14dvh, 126px) minmax(0, 1fr) !important;
  border-radius: 10px !important;
  border-color: color-mix(in srgb, var(--faction-accent, #d9b881) 38%, rgba(217, 184, 129, 0.22)) !important;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--faction-accent, #d9b881) 14%, transparent), transparent 30%),
    linear-gradient(180deg, rgba(7, 15, 29, 0.97), rgba(2, 7, 16, 0.96)) !important;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.62),
    0 0 30px color-mix(in srgb, var(--faction-accent, #d9b881) 12%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035) !important;
}

.faction-page-shell--v2 .faction-detail-hero {
  background-position: center 43%;
}

.faction-page-shell--v2 .faction-detail-body {
  display: flex;
  flex-direction: column;
  padding: 13px !important;
  scrollbar-color: rgba(217, 184, 129, 0.5) rgba(0, 0, 0, 0.24);
}

.faction-page-shell--v2 .faction-detail-body > * {
  order: 4;
}

.faction-page-shell--v2 .faction-detail-heading {
  order: 0;
}

.faction-page-shell--v2 .faction-detail-pledge-status {
  order: 1;
  align-self: flex-start;
}

.faction-page-shell--v2 .faction-command-tabs {
  order: 2;
}

.faction-command-tabs,
.world-boss-modal-tabs {
  display: grid;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
}

.faction-command-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.faction-command-tabs.has-chat {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.world-boss-modal-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faction-command-tabs button,
.world-boss-modal-tabs button {
  min-height: 32px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: rgba(216, 207, 188, 0.68);
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  cursor: pointer;
}

.faction-command-tabs button:disabled {
  border-color: transparent;
  color: rgba(216, 207, 188, 0.3);
  cursor: not-allowed;
  filter: saturate(0.35);
}

.faction-command-tabs button.is-chat {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.faction-command-tabs button.is-chat.has-unread:not(:disabled) {
  border-color: rgba(255, 202, 83, 0.72);
  background: linear-gradient(180deg, rgba(114, 77, 19, 0.42), rgba(2, 8, 18, 0.72));
  color: #fff2ba;
  box-shadow: 0 0 16px rgba(255, 190, 54, 0.18);
  animation: faction-chat-tab-attention 1.8s ease-in-out infinite;
}

.faction-chat-tab-badge {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(255, 231, 166, 0.68);
  border-radius: 999px;
  background: #b72f3d;
  color: #fff7e2;
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0;
  box-shadow: 0 0 10px rgba(212, 48, 66, 0.38);
}

@keyframes faction-chat-tab-attention {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 190, 54, 0.12); }
  50% { box-shadow: 0 0 22px rgba(255, 190, 54, 0.28); }
}

@media (prefers-reduced-motion: reduce) {
  .faction-command-tabs button.is-chat.has-unread {
    animation: none;
  }
}

.faction-command-tabs button:not(:disabled):hover,
.faction-command-tabs button:not(:disabled):focus-visible,
.world-boss-modal-tabs button:hover,
.world-boss-modal-tabs button:focus-visible {
  border-color: rgba(217, 184, 129, 0.32);
  color: #fff2ba;
}

.faction-command-tabs button.is-active,
.world-boss-modal-tabs button.is-active {
  border-color: color-mix(in srgb, var(--faction-accent, var(--boss-accent, #d9b881)) 58%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--faction-accent, var(--boss-accent, #d9b881)) 22%, transparent), rgba(2, 8, 18, 0.72));
  color: #fff4d6;
  box-shadow: 0 0 16px color-mix(in srgb, var(--faction-accent, var(--boss-accent, #d9b881)) 13%, transparent);
}

.faction-activity-panel {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--faction-accent, #d9b881) 30%, transparent);
  border-radius: 7px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--faction-accent, #d9b881) 9%, transparent), transparent 52%),
    rgba(2, 9, 20, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.faction-activity-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(217, 184, 129, 0.14);
}

.faction-activity-panel__header span {
  color: color-mix(in srgb, var(--faction-accent, #d9b881) 84%, #ffffff);
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.faction-activity-panel__header strong {
  overflow: hidden;
  color: rgba(244, 232, 208, 0.76);
  font: 800 11px/1 var(--font-serif, inherit);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faction-activity-panel__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.faction-activity-panel__metric {
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid rgba(244, 232, 208, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  text-align: center;
}

.faction-activity-panel__metric span,
.faction-activity-panel__metric strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faction-activity-panel__roster {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(217, 184, 129, 0.14);
}

.faction-activity-panel__roster-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.faction-activity-panel__roster-title span {
  color: rgba(224, 190, 112, 0.86);
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.faction-activity-panel__roster-title strong {
  color: rgba(129, 226, 194, 0.8);
  font: 800 9px/1 var(--font-ui, inherit);
}

.faction-activity-panel__roster-list {
  display: grid;
  gap: 4px;
}

.faction-activity-panel__member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid rgba(244, 232, 208, 0.08);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
}

.faction-activity-panel__member-light {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9b15f;
  box-shadow: 0 0 7px rgba(217, 177, 95, 0.42);
}

.faction-activity-panel__member strong {
  overflow: hidden;
  color: #e9dfca;
  font: 800 10px/1.1 var(--font-ui, inherit);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faction-activity-panel__member > span:not(.faction-activity-panel__member-light) {
  color: rgba(188, 200, 218, 0.68);
  font: 700 9px/1 var(--font-ui, inherit);
  white-space: nowrap;
}

.faction-activity-panel__member em {
  color: #f0c976;
  font: 900 10px/1 var(--font-serif, inherit);
  font-style: normal;
}

.faction-activity-panel__roster-empty {
  margin: 0;
  padding: 8px;
  color: rgba(188, 200, 218, 0.58);
  font: 700 10px/1.35 var(--font-ui, inherit);
  text-align: center;
}

.faction-activity-panel__metric span {
  color: rgba(216, 207, 188, 0.62);
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.faction-activity-panel__metric strong {
  margin-top: 6px;
  color: #fff2ba;
  font: 900 15px/1 var(--font-serif, inherit);
}

@media (max-width: 640px) {
  .faction-activity-panel__grid {
    grid-template-columns: 1fr;
  }
}

.faction-overview-command {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.faction-overview-command > div {
  order: 3;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(217, 184, 129, 0.17);
  border-radius: 8px;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--faction-accent, #d9b881) 9%, transparent), transparent 52%),
    rgba(1, 7, 16, 0.72);
}

.faction-overview-command > .faction-overview-command__primary {
  order: 1;
  border-color: color-mix(in srgb, var(--faction-accent, #d9b881) 42%, transparent);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--faction-accent, #d9b881) 20%, transparent), transparent 46%),
    rgba(3, 10, 21, 0.84);
}

.faction-overview-command span {
  color: color-mix(in srgb, var(--faction-accent, #d9b881) 80%, #fff);
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.faction-overview-command strong {
  color: #fff4d6;
  font: 900 13px/1.2 var(--font-serif, inherit);
}

.faction-overview-command .faction-doctrine-bonus {
  color: color-mix(in srgb, var(--faction-accent, #d9b881) 72%, #fff);
  font: 800 11px/1.3 var(--font-ui, inherit);
}

.faction-overview-command p {
  margin: 0;
  color: rgba(216, 207, 188, 0.72);
  font: 700 11px/1.3 var(--font-body, inherit);
}

.faction-overview-command > .faction-overview-drop {
  order: 2;
  border-color: color-mix(in srgb, var(--boss-accent, #d9b881) 48%, transparent);
  background:
    radial-gradient(circle at 0% 50%, color-mix(in srgb, var(--boss-accent, #d9b881) 18%, transparent), transparent 38%),
    linear-gradient(110deg, rgba(3, 10, 21, 0.92), rgba(1, 7, 16, 0.76));
}

.faction-overview-drop__item {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 2px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.faction-overview-drop__item:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--boss-accent, #d9b881) 78%, #fff);
  outline-offset: 4px;
  border-radius: 5px;
}

.faction-overview-drop__icon {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #d9b881) 72%, #fff);
  border-radius: 7px;
  background: rgba(2, 7, 16, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 16px color-mix(in srgb, var(--boss-accent, #d9b881) 24%, transparent);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.faction-overview-drop__item:hover .faction-overview-drop__icon,
.faction-overview-drop__item:focus-visible .faction-overview-drop__icon {
  transform: translateY(-1px) scale(1.03);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 22px color-mix(in srgb, var(--boss-accent, #d9b881) 38%, transparent);
}

.faction-overview-drop__copy {
  min-width: 0;
}

.faction-overview-drop__copy strong {
  display: block;
  overflow: hidden;
  color: #fff4d6;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faction-overview-drop__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.faction-overview-command .faction-overview-drop__meta span {
  color: color-mix(in srgb, var(--boss-accent, #d9b881) 74%, #fff);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.faction-overview-drop__meta i {
  color: rgba(216, 207, 188, 0.38);
  font-style: normal;
}

.faction-overview-drop__copy p {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faction-overview-drop__action {
  align-self: center;
  min-width: 144px;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--boss-accent-2, #d9b881) 42%, transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--boss-accent, #d9b881) 9%, rgba(0, 0, 0, 0.34));
  color: color-mix(in srgb, var(--boss-accent-2, #d9b881) 76%, #fff);
  font: 900 11px/1.15 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.faction-overview-drop__action.is-post-fight {
  animation: faction-drop-details-pulse 1.5s ease-in-out infinite;
}

@keyframes faction-drop-details-pulse {
  0%,
  100% {
    border-color: color-mix(in srgb, var(--boss-accent-2, #d9b881) 42%, transparent);
    box-shadow: 0 0 0 transparent;
    transform: scale(1);
  }

  50% {
    border-color: color-mix(in srgb, var(--boss-accent-2, #d9b881) 82%, #fff);
    box-shadow: 0 0 18px color-mix(in srgb, var(--boss-accent, #d9b881) 42%, transparent);
    transform: scale(1.035);
  }
}

@media (prefers-reduced-motion: reduce) {
  .faction-overview-drop__action.is-post-fight {
    animation: none;
    border-color: color-mix(in srgb, var(--boss-accent-2, #d9b881) 78%, #fff);
    box-shadow: 0 0 12px color-mix(in srgb, var(--boss-accent, #d9b881) 32%, transparent);
  }
}

@media (max-width: 1120px) {
  .faction-overview-drop__item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .faction-overview-drop__icon {
    width: 44px;
    height: 44px;
  }

  .faction-overview-drop__action {
    display: none;
  }
}

.faction-rank-rewards {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.faction-rank-rewards > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid rgba(217, 184, 129, 0.13);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.23);
  opacity: 0.65;
}

.faction-rank-rewards > div > span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(217, 184, 129, 0.28);
  border-radius: 50%;
  color: rgba(244, 232, 208, 0.76);
  font: 900 11px/1 var(--font-mono, monospace);
}

.faction-rank-rewards > div.is-earned {
  border-color: color-mix(in srgb, var(--faction-accent, #d9b881) 34%, transparent);
  background: color-mix(in srgb, var(--faction-accent, #d9b881) 8%, rgba(0, 0, 0, 0.3));
  opacity: 1;
}

.faction-rank-rewards > div.is-earned > span {
  border-color: color-mix(in srgb, var(--faction-accent, #d9b881) 64%, #fff);
  background: color-mix(in srgb, var(--faction-accent, #d9b881) 26%, rgba(2, 8, 18, 0.86));
  color: #fff4d6;
  box-shadow: 0 0 12px color-mix(in srgb, var(--faction-accent, #d9b881) 24%, transparent);
}

.faction-rank-rewards strong,
.faction-rank-rewards p {
  display: block;
}

.faction-rank-rewards strong {
  color: rgba(244, 232, 208, 0.92);
  font: 900 11px/1.15 var(--font-serif, inherit);
}

.faction-rank-rewards p {
  margin: 2px 0 0;
  color: rgba(216, 207, 188, 0.68);
  font: 700 10px/1.25 var(--font-body, inherit);
}

.faction-page-shell--v2 .faction-command-action {
  position: static !important;
  order: 3 !important;
  z-index: 8;
  margin: 9px 0 0 !important;
  padding: 9px;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-radius: 7px;
  background:
    linear-gradient(110deg, color-mix(in srgb, var(--faction-accent, #d9b881) 10%, transparent), transparent 58%),
    rgba(2, 7, 16, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 10px 24px rgba(0, 0, 0, 0.24);
}

.faction-page-shell--v2 .faction-world-boss-summon {
  top: 14px !important;
  right: calc(var(--faction-command-width) + 28px) !important;
  min-width: 286px !important;
  min-height: 58px;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  transform: none !important;
}

.faction-page-shell--v2 .faction-world-boss-summon--inactive {
  cursor: help;
  filter: saturate(0.74) brightness(0.9);
}

.faction-page-shell--v2 .faction-world-boss-summon--inactive:hover,
.faction-page-shell--v2 .faction-world-boss-summon--inactive:focus-visible {
  filter: saturate(0.9) brightness(1);
}

.faction-world-boss-summon__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  text-align: left;
  padding-right: 54px;
}

.faction-world-boss-summon__action {
  position: absolute;
  top: -1px;
  right: -1px;
  z-index: 3;
  color: #07111a;
  font: 1000 9px/1 var(--font-mono, monospace);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

.faction-world-boss-summon__action.is-joined {
  color: #064e3b;
}

.faction-world-boss-summon__inner > img {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(8, 17, 30, 0.28);
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.32);
}

.faction-world-boss-summon__inner > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.faction-world-boss-summon__inner small,
.faction-world-boss-summon__inner strong,
.faction-world-boss-summon__inner em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faction-world-boss-summon__inner small {
  font: 1000 8px/1 var(--font-ui, inherit);
  letter-spacing: 0.16em;
}

.faction-world-boss-summon__inner strong {
  font: 1000 12px/1.05 var(--font-serif, inherit);
}

.faction-world-boss-summon__inner em {
  font: 900 10px/1 var(--font-mono, monospace);
  font-style: normal;
}

.faction-page-shell--v2 .faction-map-node--active .faction-map-node__image {
  filter:
    saturate(1.18)
    brightness(1.08)
    drop-shadow(0 0 24px color-mix(in srgb, var(--faction-accent, #d9b881) 58%, transparent));
}

.faction-page-shell--v2 .faction-map-node--active .faction-map-node__banner {
  border-color: rgba(255, 242, 186, 0.86);
  background: linear-gradient(180deg, #f3dfac, #b98e43);
  color: #07111a;
  box-shadow: 0 0 22px rgba(242, 209, 138, 0.36);
}

.faction-page-shell--v2 .faction-map-node--skyvein,
.faction-page-shell--v2 .faction-map-node--cinderfall {
  left: 54% !important;
}

/* World Boss briefing V2. */
.world-boss-modal-shell--v2 {
  width: min(1144px, calc(100vw - 20px));
  height: min(629px, calc(100dvh - 20px));
  max-height: min(760px, calc(100dvh - 20px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.world-boss-modal-shell--v2 .world-boss-modal-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 8px 10px 0;
  flex: 0 0 auto;
}

.world-boss-modal-shell--v2 .world-boss-war-chest-panel,
.world-boss-modal-shell--v2 .world-boss-result-panel {
  flex: 0 0 auto;
}

.world-boss-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.world-boss-modal-shell--v2 .world-boss-war-chest-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.world-boss-modal-shell--v2 .world-boss-war-chest-row {
  min-width: 0;
  gap: 6px;
  padding: 4px 5px;
}

.world-boss-modal-shell--v2 .world-boss-war-chest-row__icon {
  width: 28px;
  height: 28px;
}

.world-boss-modal-shell--v2 .world-boss-war-chest-row__actions {
  gap: 3px;
}

.world-boss-modal-shell--v2 .world-boss-war-chest-row__actions button {
  min-width: 60px;
  padding: 6px 6px;
  font-size: 9px;
}

.world-boss-modal-shell--v2 .world-boss-modal-grid {
  min-height: min-content;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-content: start;
  overflow: visible;
}

.world-boss-modal-shell--v2 .world-boss-panel--abilities {
  grid-column: 1 / -1;
}

.world-boss-modal-shell--v2 .world-boss-ability-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.world-boss-modal-shell--v2 .world-boss-modal-footer {
  position: relative;
  z-index: 4;
  flex: 0 0 auto;
  border-top: 1px solid rgba(214, 169, 79, 0.22);
  background: linear-gradient(180deg, rgba(5, 12, 24, 0.95), rgba(2, 7, 16, 1));
  box-shadow: 0 -14px 34px rgba(0, 0, 0, 0.34);
}

/* World Boss live spectator V2. */
.world-boss-fight-arena--v2 .world-boss-fight-top {
  min-height: 94px;
  padding: 14px 18px 4px;
}

.world-boss-fight-arena--v2 .world-boss-fight-title {
  padding-left: 0;
}

.world-boss-fight-arena--v2 .world-boss-fight-title h2 {
  font-size: clamp(28px, 3vw, 48px);
}

.world-boss-fight-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
}

.world-boss-fight-arena--v2 .world-boss-fight-close,
.world-boss-fight-log-toggle {
  position: static;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(244, 232, 208, 0.24);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: rgba(244, 232, 208, 0.88);
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.36);
}

.world-boss-fight-log-toggle.is-active,
.world-boss-fight-log-toggle:hover,
.world-boss-fight-log-toggle:focus-visible {
  border-color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 58%, #fff);
  color: #fff4d6;
}

.world-boss-fight-arena--v2 .world-boss-fight-layout {
  padding: 0 18px 12px;
}

@media (max-width: 1500px) {
  .world-boss-fight-arena--v2 .world-boss-fight-main {
    width: min(1160px, calc(100vw - 36px));
  }
}

.world-boss-fight-arena--v2 .world-boss-fight-main {
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  gap: 7px;
}

.world-boss-fight-arena--v2 .world-boss-fight-stage {
  width: min(1040px, 100%);
  height: min(51dvh, 550px);
}

.world-boss-fight-arena--v2 .world-boss-fight-abilities {
  top: -30px;
  width: min(660px, calc(100% - 36px));
}

.world-boss-fight-arena--v2 .world-boss-fight-ability {
  width: 205px;
  height: 62px;
  grid-template-columns: 46px minmax(0, 1fr);
}

.world-boss-fight-ability__counter {
  display: inline-flex !important;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 5px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font: 1000 7px/1 var(--font-ui, inherit) !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.world-boss-fight-ability__counter--countered,
.world-boss-fight-telegraph em.is-countered {
  color: #86efac;
}

.world-boss-fight-ability__counter--partial,
.world-boss-fight-telegraph em.is-partial {
  color: #fde68a;
}

.world-boss-fight-ability__counter--exposed,
.world-boss-fight-telegraph em.is-exposed {
  color: #fca5a5;
}

.world-boss-fight-arena--v2 .world-boss-fight-boss-health {
  top: 48px;
  width: min(620px, calc(100% - 70px));
}

.world-boss-fight-telegraph {
  position: absolute;
  top: 116px;
  left: 50%;
  z-index: 5;
  width: min(620px, calc(100% - 70px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  padding: 8px 10px;
  border: 1px solid rgba(244, 232, 208, 0.16);
  border-radius: 8px;
  background: rgba(1, 6, 14, 0.72);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
}

.world-boss-fight-telegraph > span {
  color: color-mix(in srgb, var(--boss-accent, #facc15) 82%, #fff);
  font: 1000 8px/1 var(--font-ui, inherit);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.world-boss-fight-telegraph > strong {
  color: #fff4d6;
  font: 900 11px/1.1 var(--font-ui, inherit);
  text-align: right;
}

.world-boss-fight-telegraph > em {
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 800 9px/1.2 var(--font-body, inherit);
  font-style: normal;
}

.world-boss-fight-arena--v2 .world-boss-fight-team-panel,
.world-boss-player-contribution {
  width: min(960px, 100%);
  justify-self: center;
}

.world-boss-player-contribution {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 2fr);
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--boss-accent-2, #60a5fa) 34%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--boss-accent-2, #60a5fa) 12%, transparent), transparent),
    rgba(2, 7, 16, 0.72);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.world-boss-player-contribution.is-spectating {
  opacity: 0.74;
}

.world-boss-player-contribution > div {
  display: grid;
  gap: 3px;
}

.world-boss-player-contribution > div span {
  color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 80%, #fff);
  font: 1000 8px/1 var(--font-ui, inherit);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.world-boss-player-contribution > div strong {
  color: #fff4d6;
  font: 900 12px/1.15 var(--font-serif, inherit);
}

.world-boss-player-contribution__last {
  overflow: hidden;
  color: rgba(226, 232, 240, 0.76);
  font: 800 8px/1.2 var(--font-ui, inherit);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-player-contribution dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.world-boss-player-contribution dl > div {
  min-width: 0;
  padding: 5px 7px;
  border: 1px solid rgba(244, 232, 208, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.26);
}

.world-boss-player-contribution dt,
.world-boss-player-contribution dd {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-player-contribution dt {
  color: rgba(216, 207, 188, 0.58);
  font: 900 7px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.world-boss-player-contribution dd {
  margin: 4px 0 0;
  color: #fff2ba;
  font: 900 9px/1 var(--font-mono, monospace);
}

.world-boss-fight-arena--v2 .world-boss-fight-lineup {
  width: min(1040px, 100%);
  gap: 6px;
  padding: 7px 8px;
  overflow-x: hidden;
}

.world-boss-fight-arena--v2 .world-boss-fight-ally {
  width: 76px;
  min-width: 0;
  flex: 1 1 76px;
  max-width: 88px;
  gap: 4px;
  padding: 5px 4px 6px;
}

.world-boss-fight-arena--v2 .world-boss-fight-ally__avatar {
  width: clamp(46px, 4.1vw, 60px);
  height: clamp(46px, 4.1vw, 60px);
}

.world-boss-fight-arena--v2 .world-boss-fight-ally__copy span {
  font-size: 8.5px;
}

.world-boss-fight-arena--v2 .world-boss-fight-ally__copy strong {
  font-size: 7.5px;
}

.world-boss-fight-arena--v2 .world-boss-combat-log {
  top: 64px;
  right: 14px;
  bottom: 14px;
  z-index: 40;
  width: min(330px, calc(100vw - 28px));
  background: linear-gradient(180deg, rgba(2, 7, 16, 0.96), rgba(0, 0, 0, 0.92));
  box-shadow: -18px 20px 60px rgba(0, 0, 0, 0.62);
}

@media (max-width: 1100px) {
  .faction-page-shell--v2 {
    --faction-command-width: 350px;
  }

  .faction-page-shell--v2 .faction-map-node__art {
    transform: scale(0.88);
  }

  .world-boss-fight-arena--v2 .world-boss-fight-lineup {
    overflow-x: auto;
    justify-content: flex-start;
  }

  .world-boss-fight-arena--v2 .world-boss-fight-ally {
    flex: 0 0 72px;
  }
}

@media (max-width: 900px) {
  .faction-page-shell--v2 .faction-map-scrim--top {
    right: 0;
    padding-right: 12px;
  }

  .faction-command-strip {
    max-width: calc(100% - 12px);
  }

  .faction-page-shell--v2 .faction-world-boss-summon {
    top: 108px !important;
    right: 12px !important;
    min-width: 250px !important;
  }

  .faction-page-shell--v2 .faction-detail-panel {
    top: 42% !important;
    left: 10px !important;
    right: 10px !important;
    bottom: 8px !important;
    width: auto !important;
    grid-template-rows: 72px minmax(0, 1fr) !important;
  }

  .world-boss-modal-shell--v2 .world-boss-ability-list {
    grid-template-columns: 1fr;
  }

  .world-boss-player-contribution {
    grid-template-columns: 1fr;
  }

  .world-boss-player-contribution dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Account guidance v1. Disable VESPERA_ACCOUNT_GUIDANCE_ENABLED in
   GameView-Bdbw4Cpc.js for an instant one-line rollback. */
.vespera-guidance-veil {
  position: fixed;
  z-index: 120000;
  pointer-events: none;
  background: rgba(126, 132, 144, 0.2);
  backdrop-filter: grayscale(0.42) saturate(0.7) contrast(0.94);
}

.vespera-guidance-spotlight {
  position: fixed;
  z-index: 120001;
  pointer-events: none;
  border: 2px solid rgba(230, 199, 123, 0.96);
  border-radius: 8px;
  box-shadow:
    0 0 0 4px rgba(217, 184, 129, 0.2),
    0 0 30px rgba(217, 184, 129, 0.38),
    inset 0 0 18px rgba(255, 232, 164, 0.1);
  animation: vespera-guidance-focus 1.8s ease-in-out infinite;
}

.vespera-guidance-action-ring {
  position: fixed;
  z-index: 120002;
  pointer-events: none;
  border: 2px solid rgba(255, 231, 158, 1);
  border-radius: 7px;
  box-shadow:
    0 0 0 4px rgba(255, 218, 124, 0.26),
    0 0 22px rgba(255, 218, 124, 0.72),
    inset 0 0 10px rgba(255, 243, 202, 0.15);
  animation: vespera-guidance-action 1.25s ease-in-out infinite;
}

.vespera-guidance-card {
  position: fixed;
  z-index: 120003;
  width: min(350px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow-y: auto;
  padding: 15px;
  color: var(--color-parchment);
  pointer-events: auto;
  border: 1px solid rgba(217, 184, 129, 0.58);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(21, 31, 49, 0.98), rgba(6, 12, 23, 0.985) 64%),
    radial-gradient(circle at 84% 0%, rgba(217, 184, 129, 0.16), transparent 36%);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 205, 0.13),
    inset 0 0 0 1px rgba(94, 134, 176, 0.1),
    0 22px 58px rgba(0, 0, 0, 0.68),
    0 0 24px rgba(217, 184, 129, 0.12);
  scrollbar-width: thin;
}

.vespera-guidance-card::before,
.vespera-guidance-card::after {
  position: absolute;
  top: 9px;
  width: 18px;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(217, 184, 129, 0.8));
}

.vespera-guidance-card::before {
  left: 9px;
}

.vespera-guidance-card::after {
  right: 9px;
  transform: scaleX(-1);
}

.vespera-guidance-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.vespera-guidance-card__eyebrow {
  color: var(--color-celestial-gold);
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.19em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(217, 184, 129, 0.34);
}

.vespera-guidance-card__step {
  margin-top: 5px;
  color: rgba(184, 176, 202, 0.76);
  font: 700 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.vespera-guidance-card__location {
  width: fit-content;
  margin-top: 12px;
  padding: 5px 8px;
  color: rgba(231, 221, 195, 0.88);
  font: 800 9px/1.2 var(--font-ui, inherit);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-radius: 999px;
  background: rgba(217, 184, 129, 0.07);
}

.vespera-guidance-card__minimize {
  width: 28px;
  height: 25px;
  flex: 0 0 28px;
  color: rgba(232, 223, 201, 0.72);
  font: 800 16px/1 var(--font-ui, inherit);
  border: 1px solid rgba(217, 184, 129, 0.24);
  border-radius: 4px;
  background: rgba(3, 8, 17, 0.5);
  transition: 150ms ease;
}

.vespera-guidance-card__minimize:hover {
  color: var(--color-parchment);
  border-color: rgba(217, 184, 129, 0.55);
  background: rgba(217, 184, 129, 0.12);
}

.vespera-guidance-card__progress {
  display: grid;
  grid-template-columns: repeat(var(--guidance-steps, 5), minmax(0, 1fr));
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 4px;
  margin-top: 11px;
}

.vespera-guidance-card__progress span {
  height: 3px;
  border-radius: 999px;
  background: rgba(111, 104, 128, 0.25);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.55);
}

.vespera-guidance-card__progress span.is-complete {
  background: linear-gradient(90deg, #84a56e, #d9b881);
  box-shadow: 0 0 8px rgba(217, 184, 129, 0.3);
}

.vespera-guidance-card__title {
  margin: 13px 0 0;
  color: var(--color-parchment);
  font: italic 800 20px/1.08 var(--font-serif, serif);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.vespera-guidance-card__copy {
  margin: 9px 0 0;
  color: rgba(220, 214, 226, 0.88);
  font: 600 13px/1.55 var(--font-body, serif);
}

.vespera-guidance-card__instruction {
  margin-top: 11px;
  padding: 8px 10px;
  color: #dff2d8;
  font: 800 11px/1.35 var(--font-ui, inherit);
  letter-spacing: 0.04em;
  border-left: 2px solid #84a56e;
  border-radius: 3px;
  background: rgba(77, 111, 73, 0.16);
}

.vespera-guidance-card__lock-note {
  margin-top: 8px;
  color: rgba(195, 188, 207, 0.72);
  font: 650 10px/1.4 var(--font-ui, inherit);
}

.vespera-guidance-card__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid rgba(217, 184, 129, 0.14);
}

.vespera-guidance-card__skip,
.vespera-guidance-card__back,
.vespera-guidance-card__primary {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 4px;
  font: 800 10px/1.15 var(--font-ui, inherit);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: 150ms ease;
}

.vespera-guidance-card__skip {
  margin-right: auto;
  color: rgba(184, 176, 202, 0.72);
  border: 1px solid transparent;
  background: transparent;
}

.vespera-guidance-card__skip:hover {
  color: var(--color-parchment);
  border-color: rgba(144, 136, 168, 0.28);
  background: rgba(144, 136, 168, 0.08);
}

.vespera-guidance-card__back {
  color: rgba(231, 221, 195, 0.86);
  border: 1px solid rgba(217, 184, 129, 0.3);
  background: rgba(217, 184, 129, 0.07);
}

.vespera-guidance-card__back:hover {
  color: var(--color-parchment);
  border-color: rgba(217, 184, 129, 0.58);
  background: rgba(217, 184, 129, 0.13);
}

.vespera-guidance-card__primary {
  color: #132418;
  border: 1px solid rgba(209, 244, 196, 0.84);
  background: linear-gradient(180deg, #d9f8c9, #9ee6a8);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    0 5px 14px rgba(75, 180, 96, 0.17);
}

.vespera-guidance-card__primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.vespera-menu-tutorial-launcher {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 119990;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 7px 13px 7px 8px;
  color: var(--color-parchment);
  border: 1px solid rgba(126, 203, 167, 0.44);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(13, 27, 38, 0.97), rgba(6, 13, 24, 0.98)),
    radial-gradient(circle at 0% 50%, rgba(126, 203, 167, 0.16), transparent 48%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(220, 255, 237, 0.08);
  transition: 150ms ease;
}

.vespera-menu-tutorial-launcher:hover {
  border-color: rgba(158, 230, 168, 0.78);
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.58), 0 0 18px rgba(126, 203, 167, 0.13);
}

.vespera-menu-tutorial-launcher.is-new {
  border-color: rgba(217, 184, 129, 0.62);
}

.vespera-menu-tutorial-launcher__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  flex: 0 0 29px;
  color: #10231a;
  font: 900 15px/1 var(--font-ui, inherit);
  border: 1px solid rgba(226, 249, 214, 0.8);
  border-radius: 50%;
  background: linear-gradient(180deg, #d9f8c9, #8bd79b);
  box-shadow: 0 0 14px rgba(139, 215, 155, 0.24);
}

.vespera-menu-tutorial-launcher small,
.vespera-menu-tutorial-launcher strong {
  display: block;
  text-align: left;
  font-family: var(--font-ui, inherit);
  text-transform: uppercase;
}

.vespera-menu-tutorial-launcher small {
  margin-bottom: 3px;
  color: rgba(158, 230, 168, 0.72);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.vespera-menu-tutorial-launcher strong {
  color: var(--color-parchment);
  font-size: 10px;
  letter-spacing: 0.07em;
}

.vespera-guidance-observer {
  position: fixed;
  top: 82px;
  right: 22px;
  z-index: 120003;
  width: min(340px, calc(100vw - 28px));
  padding: 13px 14px 12px;
  color: var(--color-parchment);
  pointer-events: auto;
  border: 1px solid rgba(126, 203, 167, 0.52);
  border-radius: 7px;
  background:
    linear-gradient(145deg, rgba(17, 30, 39, 0.96), rgba(6, 15, 24, 0.97)),
    radial-gradient(circle at 92% 0%, rgba(126, 203, 167, 0.18), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(221, 255, 238, 0.1),
    0 14px 36px rgba(0, 0, 0, 0.46),
    0 0 20px rgba(126, 203, 167, 0.11);
}

.vespera-guidance-observer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #9ee6a8;
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.vespera-guidance-observer__header strong {
  color: rgba(218, 227, 224, 0.68);
  font-size: 9px;
}

.vespera-guidance-observer__location {
  margin-top: 8px;
  color: rgba(187, 207, 201, 0.7);
  font: 750 9px/1.2 var(--font-ui, inherit);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.vespera-guidance-observer h2 {
  margin: 8px 0 0;
  color: var(--color-parchment);
  font: italic 800 17px/1.1 var(--font-serif, serif);
}

.vespera-guidance-observer p {
  margin: 6px 0 0;
  color: rgba(220, 226, 224, 0.83);
  font: 600 11px/1.45 var(--font-body, serif);
}

.vespera-guidance-observer button {
  margin-top: 8px;
  padding: 3px 0;
  color: rgba(184, 196, 193, 0.62);
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
}

.vespera-guidance-observer button:hover {
  color: var(--color-parchment);
}

.vespera-guidance-card__skip.vespera-guidance-skip--first-steps,
.vespera-guidance-card__skip.vespera-guidance-skip--first-steps:hover,
.vespera-guidance-observer button.vespera-guidance-skip--first-steps,
.vespera-guidance-observer button.vespera-guidance-skip--first-steps:hover {
  color: var(--color-red-400);
}

@keyframes vespera-guidance-focus {
  0%,
  100% {
    box-shadow:
      0 0 0 4px rgba(217, 184, 129, 0.18),
      0 0 24px rgba(217, 184, 129, 0.3),
      inset 0 0 14px rgba(255, 232, 164, 0.08);
  }
  50% {
    box-shadow:
      0 0 0 8px rgba(217, 184, 129, 0.08),
      0 0 38px rgba(217, 184, 129, 0.46),
      inset 0 0 20px rgba(255, 232, 164, 0.13);
  }
}

@keyframes vespera-guidance-action {
  50% {
    box-shadow:
      0 0 0 7px rgba(255, 218, 124, 0.1),
      0 0 30px rgba(255, 218, 124, 0.86),
      inset 0 0 14px rgba(255, 243, 202, 0.2);
  }
}

@media (max-width: 760px) {
  .vespera-guidance-card {
    top: auto !important;
    right: 10px !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    left: 10px !important;
    width: auto;
    max-height: min(54vh, 430px);
    transform: none !important;
  }

  .vespera-guidance-card__copy {
    font-size: 12px;
  }

  .vespera-guidance-card__actions {
    align-items: stretch;
  }

  .vespera-guidance-card__skip,
  .vespera-guidance-card__back,
  .vespera-guidance-card__primary {
    flex: 1;
  }

  .vespera-menu-tutorial-launcher {
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .vespera-guidance-observer {
    top: auto;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 10px;
    width: auto;
  }
}

/* Illustrated living-area maps */
.world-map-zone-grid {
  transform-origin: top center;
  transition: filter 320ms ease, transform 320ms ease;
}

.world-map-zone-grid--focus {
  filter: saturate(0.72) brightness(0.76);
  transform: scale(0.985);
}

.world-map-zone-grid--focus .world-map-zone-card {
  opacity: 0.32 !important;
  transform: translateY(7px) scale(0.975);
  pointer-events: none;
}

.world-map-zone-grid--focus .world-map-zone-card--expanded-origin {
  opacity: 0.68 !important;
  filter: saturate(0.78) !important;
}

.world-map-expand-area-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  margin: 0;
  padding: 7px 12px;
  border: 1px solid rgb(var(--brass-rgb) / 0.52);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgb(var(--brass-rgb) / 0.15), rgb(var(--brass-rgb) / 0.06)),
    rgb(var(--indigo-rgb) / 0.88);
  backdrop-filter: blur(6px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 7px 18px rgba(0, 0, 0, 0.24);
  color: var(--color-parchment);
  font: 700 12px/1 var(--font-serif);
  font-style: italic;
  letter-spacing: 0.04em;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.world-map-expand-area-button span {
  color: var(--color-celestial-gold);
  font: 800 15px/1 var(--font-ui);
}

.world-map-expand-area-button:hover,
.world-map-expand-area-button:focus-visible,
.world-map-expand-area-button.is-expanded {
  border-color: rgb(var(--brass-rgb) / 0.88);
  background:
    linear-gradient(180deg, rgb(var(--brass-rgb) / 0.24), rgb(var(--brass-rgb) / 0.1)),
    rgb(var(--indigo-rgb) / 0.82);
  color: var(--color-celestial-gold);
  transform: translateY(-1px);
  outline: none;
}

.world-map-expand-area-button:disabled {
  cursor: not-allowed;
  border-color: rgba(116, 121, 119, 0.26);
  background: rgba(34, 40, 43, 0.56);
  box-shadow: none;
  color: rgba(165, 171, 168, 0.52);
  filter: grayscale(0.72);
  opacity: 0.66;
  transform: none;
}

.world-map-expand-area-button:disabled span {
  color: rgba(165, 171, 168, 0.48);
}

.glimmerroot-living-map {
  --living-accent-rgb: 158 230 194;
  --living-surface-rgb: 13 36 39;
  --living-mist-rgb: 154 218 213;
  --living-light-rgb: 235 211 120;
  --living-inspector-rgb: 57 111 105;
  position: relative;
  z-index: 5;
  scroll-margin-top: 76px;
  margin: 0 0 26px;
  overflow: hidden;
  border: 1px solid rgb(var(--brass-rgb) / 0.58);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgb(var(--living-accent-rgb) / 0.16), transparent 32%),
    linear-gradient(155deg, rgba(7, 21, 27, 0.98), rgba(7, 11, 22, 0.99));
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(219, 188, 110, 0.08),
    inset 0 1px 0 rgba(255, 244, 204, 0.08);
  animation: glimmerroot-panel-arrive 420ms cubic-bezier(0.22, 0.82, 0.2, 1) both;
}

.glimmerroot-living-map.living-map--cinderlow {
  --living-accent-rgb: 232 130 78;
  --living-surface-rgb: 48 24 23;
  --living-mist-rgb: 179 93 63;
  --living-light-rgb: 255 127 50;
  --living-inspector-rgb: 151 77 43;
}

.glimmerroot-living-map.living-map--embercrag {
  --living-accent-rgb: 101 202 239;
  --living-surface-rgb: 35 24 34;
  --living-mist-rgb: 104 162 204;
  --living-light-rgb: 255 133 61;
  --living-inspector-rgb: 76 103 139;
}

.glimmerroot-living-map.living-map--katatonia {
  --living-accent-rgb: 190 159 255;
  --living-surface-rgb: 25 25 61;
  --living-mist-rgb: 143 119 222;
  --living-light-rgb: 182 155 255;
  --living-inspector-rgb: 93 72 155;
}

.glimmerroot-living-map::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 72px rgba(0, 0, 0, 0.34);
  content: "";
  pointer-events: none;
}

.glimmerroot-living-map__header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px 16px;
  border-bottom: 1px solid rgb(var(--brass-rgb) / 0.22);
  background:
    linear-gradient(90deg, rgb(var(--living-surface-rgb) / 0.96), rgba(10, 17, 31, 0.9)),
    rgb(var(--surface-rgb) / 0.9);
}

.glimmerroot-living-map__eyebrow {
  margin-bottom: 5px;
  color: rgb(var(--living-accent-rgb));
  font: 800 9px/1 var(--font-ui);
  letter-spacing: 0.2em;
}

.glimmerroot-living-map__header h2 {
  margin: 0;
  color: var(--color-parchment);
  font: italic 700 clamp(22px, 2vw, 30px)/1.05 var(--font-serif);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.75);
}

.glimmerroot-living-map__header p {
  margin: 7px 0 0;
  color: var(--color-lavender-grey);
  font: 400 12px/1.45 var(--font-body);
}

.glimmerroot-living-map__header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.glimmerroot-living-map__motion-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgb(var(--living-accent-rgb) / 0.82);
  font: 700 9px/1 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.glimmerroot-living-map__motion-note i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--living-accent-rgb));
  box-shadow: 0 0 10px rgb(var(--living-accent-rgb) / 0.82);
  animation: glimmerroot-status-pulse 2.2s ease-in-out infinite;
}

.glimmerroot-living-map__collapse {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgb(var(--brass-rgb) / 0.46);
  border-radius: 5px;
  background: rgb(var(--indigo-rgb) / 0.62);
  color: var(--color-parchment);
  font: italic 700 11px/1 var(--font-serif);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.glimmerroot-living-map__collapse:hover,
.glimmerroot-living-map__collapse:focus-visible {
  border-color: rgb(var(--brass-rgb) / 0.88);
  background: rgb(var(--brass-rgb) / 0.13);
  color: var(--color-celestial-gold);
  outline: none;
}

.glimmerroot-living-map__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
  gap: 0;
  min-width: 0;
}

.glimmerroot-living-map__stage {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  background: #06131b;
  cursor: default;
}

.glimmerroot-living-map__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.glimmerroot-living-map__stage::after {
  position: absolute;
  inset: 0;
  z-index: 900;
  border: 1px solid rgba(223, 199, 132, 0.12);
  box-shadow:
    inset 0 0 58px rgba(0, 0, 0, 0.58),
    inset 0 -52px 72px rgba(3, 11, 18, 0.42);
  content: "";
  pointer-events: none;
}

.glimmerroot-living-map__light {
  position: absolute;
  z-index: 1;
  left: 39%;
  top: 27%;
  width: 28%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--living-light-rgb) / 0.17), transparent 67%);
  mix-blend-mode: screen;
  pointer-events: none;
  animation: glimmerroot-light-breathe 5.4s ease-in-out infinite;
}

.glimmerroot-living-map__mist {
  position: absolute;
  z-index: 880;
  width: 38%;
  height: 14%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgb(var(--living-mist-rgb) / 0.12), transparent 72%);
  filter: blur(11px);
  opacity: 0.62;
  pointer-events: none;
}

.glimmerroot-living-map__mist--one {
  left: 4%;
  bottom: 8%;
  animation: glimmerroot-mist-drift 12s ease-in-out infinite alternate;
}

.glimmerroot-living-map__mist--two {
  right: 2%;
  top: 31%;
  animation: glimmerroot-mist-drift 15s ease-in-out -5s infinite alternate-reverse;
}

.glimmerroot-map-enemy {
  position: absolute;
  display: block;
  aspect-ratio: 1;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translate(-50%, -54%);
  transform-origin: 50% 82%;
  transition-property: left, top;
  transition-timing-function: cubic-bezier(0.4, 0.05, 0.25, 1);
  will-change: left, top;
  cursor: pointer;
}

.glimmerroot-map-enemy:focus-visible {
  border-radius: 50%;
  outline: 2px solid rgba(238, 208, 122, 0.94);
  outline-offset: 4px;
}

.glimmerroot-map-enemy__sprite {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 4px 3px rgba(0, 0, 0, 0.94))
    drop-shadow(0 0 4px rgba(120, 198, 185, 0.12));
  transform-origin: 50% 82%;
  transition: filter 180ms ease, transform 180ms ease;
  user-select: none;
  pointer-events: none;
}

.glimmerroot-map-enemy__shadow {
  position: absolute;
  z-index: 0;
  left: 17%;
  right: 17%;
  bottom: 11%;
  height: 19%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.68);
  filter: blur(4px);
  transform: scaleX(1.1);
  pointer-events: none;
}

.glimmerroot-map-enemy__ring {
  position: absolute;
  z-index: 1;
  left: 15%;
  right: 15%;
  bottom: 7%;
  height: 27%;
  border: 1px solid transparent;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.74);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
  pointer-events: none;
}

.glimmerroot-map-enemy:hover .glimmerroot-map-enemy__sprite,
.glimmerroot-map-enemy:focus-visible .glimmerroot-map-enemy__sprite,
.glimmerroot-map-enemy.is-selected .glimmerroot-map-enemy__sprite {
  filter:
    drop-shadow(0 5px 4px rgba(0, 0, 0, 0.95))
    drop-shadow(0 0 8px rgba(206, 182, 104, 0.65));
  transform: translateY(-3px) scale(1.06);
}

.glimmerroot-map-enemy:hover .glimmerroot-map-enemy__ring,
.glimmerroot-map-enemy:focus-visible .glimmerroot-map-enemy__ring,
.glimmerroot-map-enemy.is-selected .glimmerroot-map-enemy__ring {
  border-color: rgba(230, 204, 130, 0.85);
  box-shadow: 0 0 13px rgba(225, 197, 111, 0.56);
  opacity: 1;
  transform: scale(1);
}

.glimmerroot-map-enemy.is-boss .glimmerroot-map-enemy__ring {
  border-color: rgba(224, 137, 88, 0.88);
  box-shadow: 0 0 16px rgba(217, 108, 61, 0.64);
}

.glimmerroot-map-enemy.is-floating .glimmerroot-map-enemy__sprite {
  animation: glimmerroot-enemy-hover 2.7s ease-in-out infinite;
}

.glimmerroot-map-enemy__label {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: -27px;
  display: grid;
  min-width: max-content;
  padding: 6px 9px 5px;
  border: 1px solid rgb(var(--brass-rgb) / 0.48);
  border-radius: 4px;
  background: rgba(4, 13, 22, 0.94);
  box-shadow: 0 7px 17px rgba(0, 0, 0, 0.55);
  color: var(--color-parchment);
  opacity: 1;
  transform: translate(-50%, 0);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
  white-space: nowrap;
}

.glimmerroot-map-enemy__label strong {
  font: 700 11px/1.1 var(--font-serif);
}

.glimmerroot-map-enemy__label small {
  margin-top: 4px;
  color: rgb(var(--living-accent-rgb));
  font: 900 11px/1 var(--font-ui);
  letter-spacing: 0.1em;
}

.glimmerroot-map-enemy:hover .glimmerroot-map-enemy__label,
.glimmerroot-map-enemy:focus-visible .glimmerroot-map-enemy__label,
.glimmerroot-map-enemy.is-selected .glimmerroot-map-enemy__label {
  opacity: 1;
  transform: translate(-50%, 0);
}

.glimmerroot-enemy-inspector {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: visible;
  border-left: 1px solid rgb(var(--brass-rgb) / 0.26);
  background:
    radial-gradient(circle at 50% 14%, rgb(var(--living-inspector-rgb) / 0.2), transparent 32%),
    linear-gradient(180deg, rgba(10, 25, 31, 0.98), rgba(7, 12, 23, 0.99));
}

.glimmerroot-enemy-inspector.is-boss {
  background:
    radial-gradient(circle at 50% 13%, rgba(151, 77, 43, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(26, 20, 24, 0.98), rgba(9, 11, 20, 0.99));
}

.glimmerroot-enemy-inspector__portrait {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border-bottom: 1px solid rgb(var(--brass-rgb) / 0.22);
  background: #08121d;
}

.glimmerroot-enemy-inspector__portrait img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 21%;
  filter: saturate(1.06) contrast(1.05);
}

.glimmerroot-enemy-inspector__portrait > div {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 24%, rgba(5, 13, 21, 0.18) 51%, rgba(5, 13, 21, 0.96) 100%),
    radial-gradient(circle at 50% 30%, transparent 35%, rgba(4, 11, 18, 0.36) 100%);
}

.glimmerroot-enemy-inspector__portrait span,
.glimmerroot-enemy-inspector__portrait strong {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 5px 7px;
  border: 1px solid rgba(213, 196, 145, 0.34);
  border-radius: 3px;
  background: rgba(3, 10, 17, 0.82);
  font: 800 8px/1 var(--font-ui);
  letter-spacing: 0.15em;
}

.glimmerroot-enemy-inspector__portrait span {
  left: 12px;
  color: #d6d2bd;
}

.glimmerroot-enemy-inspector__portrait strong {
  right: 12px;
  border-color: rgba(221, 143, 87, 0.56);
  color: #efae79;
}

.glimmerroot-enemy-inspector__body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  padding: 17px 18px 18px;
}

.glimmerroot-enemy-inspector__kicker {
  color: #84cbb4;
  font: 800 8px/1 var(--font-ui);
  letter-spacing: 0.18em;
}

.glimmerroot-enemy-inspector.is-boss .glimmerroot-enemy-inspector__kicker {
  color: #e69b6d;
}

.glimmerroot-enemy-inspector h3 {
  margin: 6px 0 13px;
  color: var(--color-parchment);
  font: italic 700 20px/1.1 var(--font-serif);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.glimmerroot-enemy-inspector__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.glimmerroot-enemy-inspector__stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(159, 180, 171, 0.13);
  border-radius: 4px;
  background: rgba(2, 10, 18, 0.42);
}

.glimmerroot-enemy-inspector__stats span {
  color: #77958f;
  font: 800 8px/1 var(--font-ui);
  letter-spacing: 0.1em;
}

.glimmerroot-enemy-inspector__stats strong {
  color: #d9dfd5;
  font: 700 11px/1 var(--font-mono);
}

.glimmerroot-enemy-inspector__loot {
  min-height: 82px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid rgba(219, 192, 119, 0.16);
  overflow: visible;
}

.glimmerroot-enemy-inspector__loot > div:first-child {
  margin-bottom: 8px;
  color: #819991;
  font: 800 8px/1 var(--font-ui);
  letter-spacing: 0.16em;
}

.glimmerroot-enemy-inspector__fight {
  width: min(100%, 184px);
  min-height: 38px;
  margin: auto auto 0;
  border: 1px solid rgba(199, 245, 184, 0.95);
  border-radius: 999px;
  background: linear-gradient(180deg, #d9f8c9 0%, #9ee6a8 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 8px 18px rgba(75, 180, 96, 0.22);
  color: #17301c;
  font: italic 800 13px/1 var(--font-serif);
  transition: filter 160ms ease, transform 160ms ease;
}

.glimmerroot-enemy-inspector__fight:hover:not(:disabled),
.glimmerroot-enemy-inspector__fight:focus-visible:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
  outline: none;
}

.glimmerroot-enemy-inspector__fight:disabled {
  cursor: not-allowed;
  border-color: rgba(133, 151, 126, 0.32);
  background: rgba(54, 69, 59, 0.72);
  box-shadow: none;
  color: #879386;
}

@keyframes glimmerroot-panel-arrive {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes glimmerroot-status-pulse {
  0%,
  100% {
    opacity: 0.52;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}

@keyframes glimmerroot-light-breathe {
  0%,
  100% {
    opacity: 0.62;
    transform: scale(0.94);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes glimmerroot-mist-drift {
  from {
    opacity: 0.34;
    transform: translate3d(-4%, 0, 0) scaleX(0.92);
  }
  to {
    opacity: 0.7;
    transform: translate3d(11%, -7%, 0) scaleX(1.08);
  }
}

@keyframes glimmerroot-enemy-hover {
  0%,
  100% {
    transform: translateY(0) rotate(-0.7deg);
  }
  50% {
    transform: translateY(-4px) rotate(0.9deg);
  }
}

@media (max-width: 1040px) {
  .glimmerroot-living-map__layout {
    grid-template-columns: minmax(0, 1fr) 258px;
  }

  .glimmerroot-enemy-inspector__portrait {
    min-height: 142px;
  }

  .glimmerroot-enemy-inspector__body {
    padding: 13px 14px 14px;
  }
}

@media (max-width: 820px) {
  .glimmerroot-living-map__header {
    align-items: flex-start;
  }

  .glimmerroot-living-map__header-actions {
    align-items: flex-end;
    flex-direction: column-reverse;
  }

  .glimmerroot-living-map__layout {
    grid-template-columns: 1fr;
  }

  .glimmerroot-enemy-inspector {
    display: grid;
    grid-template-columns: minmax(150px, 32%) 1fr;
    border-top: 1px solid rgb(var(--brass-rgb) / 0.26);
    border-left: 0;
  }

  .glimmerroot-enemy-inspector__portrait {
    min-height: 220px;
    border-right: 1px solid rgb(var(--brass-rgb) / 0.22);
    border-bottom: 0;
  }
}

/* Reforge inspection and exact rarity previews */
.reforge-item-choice {
  appearance: none;
  color: inherit;
  font: inherit;
}

.reforge-item-choice:focus-visible,
.reforge-outcome-card:focus-visible {
  outline: 2px solid rgb(var(--brass-rgb) / 0.9);
  outline-offset: 2px;
}

.reforge-engraving-signature {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  margin-top: 0.35rem;
  color: #d9c7ff;
  font-size: 0.75rem;
  line-height: 1.2;
}

.reforge-engraving-signature__mark {
  flex: 0 0 auto;
  color: #a98bc9;
  text-shadow: 0 0 8px rgb(169 139 201 / 0.65);
}

.reforge-engraving-signature__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reforge-engraving-signature__more {
  flex: 0 0 auto;
  border: 1px solid rgb(169 139 201 / 0.38);
  border-radius: 999px;
  padding: 0.05rem 0.35rem;
  background: rgb(91 75 138 / 0.25);
  color: #efe6ff;
  font-weight: 800;
}

.reforge-selected-engravings {
  min-width: 0;
  margin: 0;
  border-left: 1px solid rgb(169 139 201 / 0.2);
  padding-left: 0.85rem;
}

.reforge-selected-summary {
  display: grid;
  grid-template-columns: minmax(10rem, 0.85fr) minmax(13rem, 1.15fr);
  align-items: start;
  gap: 0.9rem;
}

.reforge-selected-engravings__header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
  color: #cbbce3;
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reforge-preserved-badge {
  border: 1px solid rgb(52 211 153 / 0.38);
  border-radius: 999px;
  padding: 0.1rem 0.45rem;
  background: rgb(6 78 59 / 0.26);
  color: #a7f3d0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.reforge-selected-engravings__list {
  display: grid;
  gap: 0.25rem;
}

.reforge-selected-engravings__line {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  color: #eadfff;
  font-size: 0.78rem;
  line-height: 1.3;
}

.reforge-selected-engravings__line > span:first-child {
  color: #a98bc9;
  text-shadow: 0 0 8px rgb(169 139 201 / 0.55);
}

.reforge-selected-engravings__empty {
  color: var(--color-lavender-grey);
  font-size: 0.75rem;
  font-style: italic;
}

.reforge-outcome-card {
  position: relative;
  min-height: 4.6rem;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.reforge-outcome-card:not(.is-locked):hover {
  transform: translateY(-2px);
  background: rgb(var(--indigo-rgb) / 0.52);
  box-shadow:
    0 9px 24px rgb(0 0 0 / 0.28),
    inset 0 1px 0 rgb(255 255 255 / 0.04);
}

.reforge-outcome-card__batch {
  margin-top: 0.15rem;
  border-top: 1px solid rgb(var(--brass-rgb) / 0.18);
  padding-top: 0.25rem;
  color: #e8dba7;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .reforge-selected-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.55rem;
  }

  .reforge-selected-engravings {
    border-top: 1px solid rgb(169 139 201 / 0.2);
    border-left: 0;
    padding-top: 0.55rem;
    padding-left: 0;
  }

  .reforge-selected-engravings__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }

  .reforge-outcome-card {
    min-height: 5rem;
  }
}

@media (max-width: 560px) {
  .glimmerroot-living-map__header {
    flex-direction: column;
    padding: 15px;
  }

  .glimmerroot-living-map__header-actions {
    width: 100%;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
  }

  .glimmerroot-living-map__stage {
    aspect-ratio: 16 / 10;
  }

  .glimmerroot-map-enemy {
    min-width: 40px;
    min-height: 40px;
  }

  .glimmerroot-map-enemy__label {
    padding: 4px 6px;
  }

  .glimmerroot-map-enemy__label strong {
    font-size: 9px;
  }

  .glimmerroot-map-enemy__label small {
    font-size: 10px;
  }

  .glimmerroot-enemy-inspector {
    display: flex;
  }

  .glimmerroot-enemy-inspector__portrait {
    min-height: 170px;
    border-right: 0;
    border-bottom: 1px solid rgb(var(--brass-rgb) / 0.22);
  }
}

/* Optional, batched item-gain feed. Kept deliberately compact so it never
   competes with combat, gathering, or crafting controls. */
.loot-stream {
  position: fixed;
  right: 16px;
  bottom: 176px;
  z-index: 120;
  display: flex;
  width: min(220px, calc(100vw - 16px));
  flex-direction: column;
  gap: 4px;
  opacity: 0.82;
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: opacity 140ms ease;
}

.loot-stream:hover,
.loot-stream.is-dragging {
  opacity: 0.98;
}

.loot-stream.is-dragging {
  cursor: grabbing;
}

.loot-stream__grip {
  position: absolute;
  top: -18px;
  right: 3px;
  display: grid;
  width: 26px;
  height: 18px;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(var(--brass-rgb) / 0.32);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: rgba(8, 13, 24, 0.9);
  color: rgba(222, 231, 241, 0.82);
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.2);
  font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif !important;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  opacity: 0.72;
  pointer-events: auto;
  cursor: grab;
  transition: opacity 140ms ease;
}

.loot-stream:hover .loot-stream__grip,
.loot-stream.is-dragging .loot-stream__grip {
  opacity: 1;
  cursor: grabbing;
}

.loot-stream__close {
  position: absolute;
  top: -18px;
  left: 3px;
  display: grid;
  width: 22px;
  height: 18px;
  place-items: center;
  padding: 0;
  border: 1px solid rgb(var(--brass-rgb) / 0.3);
  border-bottom: 0;
  border-radius: 5px 5px 0 0;
  background: rgba(8, 13, 24, 0.9);
  color: rgba(232, 184, 184, 0.82);
  box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.2);
  font: 700 13px/1 var(--font-ui, sans-serif);
  opacity: 0.72;
  pointer-events: auto;
  transition:
    opacity 140ms ease,
    color 140ms ease,
    border-color 140ms ease;
}

.loot-stream__close:hover,
.loot-stream__close:focus-visible {
  opacity: 1;
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.58);
  outline: none;
}

#root .loot-stream,
#root .loot-stream * {
  cursor: grab !important;
}

#root .loot-stream.is-dragging,
#root .loot-stream.is-dragging * {
  cursor: grabbing !important;
}

#root .loot-stream .loot-stream__close {
  cursor: pointer !important;
}

.loot-stream__row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 5px 8px;
  border-width: 1px;
  border-style: solid;
  border-radius: 6px;
  background: rgba(8, 13, 24, 0.78);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(5px);
  animation: loot-stream-enter 160ms ease-out both;
}

.loot-stream__row--idle {
  grid-template-columns: 10px minmax(0, 1fr);
  color: rgba(200, 192, 208, 0.66);
}

.loot-stream__idle-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(200, 192, 208, 0.45);
  box-shadow: 0 0 6px rgba(200, 192, 208, 0.18);
}

.loot-stream__icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  pointer-events: none;
}

.loot-stream__icon--text {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.loot-stream__name {
  overflow: hidden;
  color: currentColor;
  font: 600 11px/1.2 var(--font-body, sans-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loot-stream__amount {
  color: rgba(222, 231, 241, 0.68);
  font: 700 10px/1 var(--font-mono, monospace);
  white-space: nowrap;
}

@keyframes loot-stream-enter {
  from {
    opacity: 0;
    transform: translateX(6px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

html.reduce-motion .loot-stream,
html.reduce-motion .loot-stream__grip,
html.reduce-motion .loot-stream__row {
  transition: none;
  animation: none;
}

@media (max-width: 640px) {
  .loot-stream {
    right: 8px;
    bottom: 92px;
    width: min(190px, calc(100vw - 16px));
  }
}

/* Codex: live, player-specific combat mathematics. */
.combat-math-codex {
  --math-gold: #e7bd68;
  --math-teal: #61d7c1;
  --math-ink: rgba(5, 14, 25, 0.94);
  display: grid;
  gap: 0.85rem;
  color: #e8e2d4;
}

.combat-math-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  overflow: hidden;
  padding: 1.35rem 1.5rem;
  border: 1px solid rgba(231, 189, 104, 0.34);
  background:
    radial-gradient(circle at 82% 20%, rgba(91, 215, 193, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(12, 25, 42, 0.98), rgba(9, 15, 29, 0.98));
  box-shadow: inset 0 1px rgba(255, 242, 205, 0.06), 0 16px 34px rgba(0, 0, 0, 0.24);
}

.combat-math-hero::after {
  content: "Σ";
  position: absolute;
  right: 28%;
  top: -3.3rem;
  color: rgba(231, 189, 104, 0.035);
  font: 700 12rem/1 Georgia, serif;
  pointer-events: none;
}

.combat-math-kicker {
  color: var(--math-teal);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.combat-math-hero h3 {
  margin: 0.24rem 0 0.35rem;
  color: #fff0c7;
  font: 700 clamp(2rem, 4vw, 3rem)/1 var(--font-serif, Georgia, serif);
}

.combat-math-hero p {
  max-width: 45rem;
  margin: 0;
  color: rgba(220, 225, 220, 0.78);
  font-size: 0.86rem;
  line-height: 1.6;
}

.combat-math-identity {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 12rem;
  gap: 0.18rem;
  padding: 0.85rem 1rem;
  border-left: 2px solid var(--math-gold);
  background: rgba(2, 10, 20, 0.56);
  text-align: right;
}

.combat-math-identity small,
.combat-math-identity span {
  color: rgba(196, 207, 207, 0.67);
  font-size: 0.68rem;
}

.combat-math-identity strong {
  color: #fff0c7;
  font: 700 1.15rem/1.2 var(--font-serif, Georgia, serif);
}

.combat-math-inputs,
.combat-math-metrics,
.combat-math-inline-stats {
  display: grid;
  gap: 0.7rem;
}

.combat-math-inputs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0.75rem;
  border: 1px solid rgba(96, 135, 143, 0.28);
  background: rgba(6, 18, 31, 0.78);
}

.combat-math-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7rem;
  align-items: center;
  gap: 0.65rem;
  color: rgba(213, 220, 216, 0.72);
  font-size: 0.76rem;
  font-weight: 700;
}

.combat-math-input input,
.combat-math-ability-select select {
  width: 100%;
  border: 1px solid rgba(231, 189, 104, 0.36);
  background: rgba(2, 10, 19, 0.9);
  color: #fff0c7;
  outline: none;
}

.combat-math-input input {
  padding: 0.55rem 0.65rem;
  text-align: right;
  font: 700 0.82rem/1 var(--font-mono, Consolas, monospace);
}

.combat-math-input input:focus,
.combat-math-ability-select select:focus {
  border-color: var(--math-teal);
  box-shadow: 0 0 0 2px rgba(97, 215, 193, 0.1);
}

.combat-math-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.combat-math-metric {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(113, 142, 151, 0.23);
  border-left: 2px solid rgba(97, 215, 193, 0.72);
  background: linear-gradient(140deg, rgba(7, 22, 35, 0.94), rgba(9, 17, 31, 0.92));
}

.combat-math-metric span {
  color: rgba(198, 208, 208, 0.66);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.combat-math-metric strong {
  overflow: hidden;
  color: #ffe5a7;
  font: 700 1.15rem/1.15 var(--font-serif, Georgia, serif);
  text-overflow: ellipsis;
}

.combat-math-metric small {
  overflow: hidden;
  color: rgba(192, 204, 205, 0.55);
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.combat-math-section {
  border: 1px solid rgba(107, 136, 146, 0.26);
  background: rgba(6, 17, 30, 0.82);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

.combat-math-section[open] {
  border-color: rgba(231, 189, 104, 0.28);
}

.combat-math-section > summary {
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 3.15rem;
  padding: 0.7rem 0.9rem;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(90deg, rgba(11, 28, 44, 0.96), rgba(10, 19, 33, 0.94));
}

.combat-math-section > summary::-webkit-details-marker { display: none; }

.combat-math-section > summary > span {
  color: var(--math-teal);
  font: 800 0.72rem/1 var(--font-mono, Consolas, monospace);
  letter-spacing: 0.08em;
}

.combat-math-section > summary > strong {
  color: #f2dec0;
  font: 700 1rem/1.2 var(--font-serif, Georgia, serif);
}

.combat-math-section > summary > small {
  color: rgba(231, 189, 104, 0.76);
  font-size: 0.68rem;
}

.combat-math-section__body {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
  border-top: 1px solid rgba(231, 189, 104, 0.15);
}

.combat-math-lead,
.combat-math-footnote,
.combat-math-empty {
  margin: 0;
  color: rgba(205, 214, 212, 0.72);
  font-size: 0.78rem;
  line-height: 1.55;
}

.combat-math-footnote {
  padding-left: 0.75rem;
  border-left: 2px solid rgba(231, 189, 104, 0.5);
}

.combat-math-formula-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.combat-math-formula {
  display: grid;
  min-width: 0;
  gap: 0.48rem;
  padding: 0.8rem;
  border: 1px solid rgba(94, 129, 141, 0.25);
  background: rgba(2, 11, 21, 0.66);
}

.combat-math-formula__head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
}

.combat-math-formula__head span {
  color: rgba(218, 224, 218, 0.78);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.combat-math-formula__head strong {
  color: var(--math-gold);
  font: 700 0.95rem/1 var(--font-mono, Consolas, monospace);
}

.combat-math-formula code,
.combat-math-callout code {
  overflow-wrap: anywhere;
  color: #8fe1d1;
  font: 600 0.76rem/1.55 var(--font-mono, Consolas, monospace);
}

.combat-math-formula p {
  margin: 0;
  color: rgba(196, 207, 207, 0.58);
  font: 0.67rem/1.45 var(--font-mono, Consolas, monospace);
}

.combat-math-inline-stats {
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
}

.combat-math-inline-stats .combat-math-metric {
  padding: 0.65rem 0.75rem;
}

.combat-math-callout {
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--math-gold);
  background: linear-gradient(90deg, rgba(81, 57, 21, 0.24), rgba(11, 20, 33, 0.48));
}

.combat-math-callout > div {
  display: grid;
  gap: 0.35rem;
}

.combat-math-callout strong { color: #ffe0a0; }
.combat-math-callout p {
  margin: 0;
  color: rgba(217, 219, 208, 0.72);
  font-size: 0.75rem;
  line-height: 1.5;
}

.combat-math-callout--class { border-left-color: var(--math-teal); }

.combat-math-ability-select {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  color: rgba(210, 218, 215, 0.72);
  font-size: 0.74rem;
  font-weight: 800;
}

.combat-math-ability-select select { padding: 0.65rem 0.75rem; }

.combat-math-cap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.combat-math-cap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 0.7rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(109, 139, 148, 0.24);
  background: rgba(4, 13, 24, 0.66);
}

.combat-math-cap > span {
  color: rgba(214, 220, 215, 0.78);
  font-size: 0.73rem;
  font-weight: 700;
}

.combat-math-cap > strong {
  display: grid;
  color: #ffe0a0;
  font: 700 1rem/1 var(--font-mono, Consolas, monospace);
  text-align: right;
}

.combat-math-cap > strong small {
  color: rgba(97, 215, 193, 0.7);
  font-size: 0.45rem;
  letter-spacing: 0.1em;
}

.combat-math-cap > em {
  grid-column: 1 / -1;
  color: rgba(188, 201, 201, 0.54);
  font-size: 0.62rem;
  font-style: normal;
}

.combat-math-source-table {
  overflow-x: auto;
  border: 1px solid rgba(101, 133, 143, 0.25);
}

.combat-math-source-row {
  display: grid;
  grid-template-columns: minmax(8rem, 1.3fr) repeat(7, minmax(6.4rem, 1fr));
  min-width: 58rem;
  border-top: 1px solid rgba(104, 132, 142, 0.14);
}

.combat-math-source-row:first-child { border-top: 0; }

.combat-math-source-row > * {
  padding: 0.62rem 0.7rem;
  border-left: 1px solid rgba(104, 132, 142, 0.12);
  color: rgba(201, 210, 208, 0.66);
  font-size: 0.68rem;
  text-align: right;
}

.combat-math-source-row > *:first-child {
  border-left: 0;
  color: #e7dfd1;
  font-weight: 700;
  text-align: left;
}

.combat-math-source-row > strong { color: #ffe0a0; }

.combat-math-source-row--head {
  position: sticky;
  top: 0;
  background: #0b1e30;
}

.combat-math-source-row--head > * {
  color: rgba(97, 215, 193, 0.75);
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.combat-math-disclaimer {
  padding: 0.8rem 1rem;
  border: 1px solid rgba(97, 215, 193, 0.25);
  background: rgba(8, 29, 39, 0.62);
  color: rgba(190, 219, 212, 0.72);
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: center;
}

/* Full-room Codex scale: the Codex is a primary game room, not a narrow article. */
.codex-full-room {
  min-width: 0;
  font-size: 1.2rem;
}

.codex-full-room__title { font-size: 2.25rem !important; }
.codex-full-room__subtitle { font-size: 1.2rem !important; line-height: 1.65; }
.codex-full-room__topics { gap: 0.35rem; }
.codex-full-room__topics button {
  padding: 0.6rem 0.9rem;
  font-size: 1.02rem !important;
  line-height: 1.25;
}

.codex-topic-discovery-highlight {
  position: relative;
  z-index: 1;
  border-color: rgba(255, 221, 116, 0.92) !important;
  background: linear-gradient(
    135deg,
    rgba(130, 82, 15, 0.58),
    rgba(58, 38, 8, 0.82)
  ) !important;
  color: #fff1b0 !important;
  outline: 2px solid rgba(255, 220, 107, 0.72);
  outline-offset: 2px;
  text-shadow: 0 0 0.75rem rgba(255, 224, 125, 0.92);
  animation: codex-topic-discovery-pulse 1.25s ease-in-out infinite;
}

@keyframes codex-topic-discovery-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 2px rgba(255, 215, 95, 0.28),
      0 0 1rem rgba(255, 189, 49, 0.42),
      inset 0 0 0.7rem rgba(255, 226, 135, 0.12);
    filter: brightness(1.04);
  }

  50% {
    box-shadow:
      0 0 0 4px rgba(255, 226, 126, 0.58),
      0 0 2rem rgba(255, 191, 45, 0.82),
      inset 0 0 1rem rgba(255, 230, 145, 0.26);
    filter: brightness(1.22);
  }
}

.codex-search-shell {
  position: relative;
  margin: -0.2rem 0 1.35rem;
  padding: 0.8rem;
  border: 1px solid rgba(221, 177, 84, 0.38);
  border-radius: 0.8rem;
  background:
    radial-gradient(circle at 8% 0%, rgba(210, 158, 61, 0.11), transparent 36%),
    linear-gradient(135deg, rgba(8, 22, 35, 0.98), rgba(4, 14, 25, 0.96));
  box-shadow:
    inset 0 1px rgba(255, 232, 180, 0.055),
    0 12px 32px rgba(0, 0, 0, 0.2);
}

.codex-search-input-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 3.25rem;
  padding: 0.4rem 0.5rem 0.4rem 0.9rem;
  border: 1px solid rgba(129, 159, 171, 0.32);
  border-radius: 0.58rem;
  background: rgba(1, 9, 18, 0.76);
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.codex-search-input-row:focus-within {
  border-color: rgba(239, 194, 99, 0.78);
  background: rgba(2, 12, 23, 0.94);
  box-shadow: 0 0 0 3px rgba(239, 194, 99, 0.1);
}

.codex-search-icon {
  color: #efc86e;
  font: 700 1.8rem/1 var(--font-serif, Georgia, serif);
  transform: rotate(-18deg);
}

.codex-search-input-row input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff1cb;
  font: 600 1.02rem/1.3 var(--font-body, sans-serif);
}

.codex-search-input-row input::placeholder {
  color: rgba(184, 200, 202, 0.52);
  font-weight: 500;
}

.codex-search-input-row input::-webkit-search-cancel-button { display: none; }

.codex-search-clear {
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(221, 177, 84, 0.28);
  border-radius: 0.42rem;
  background: rgba(108, 74, 24, 0.2);
  color: #e6c779;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.codex-search-clear:hover,
.codex-search-clear:focus-visible {
  border-color: rgba(246, 207, 116, 0.72);
  background: rgba(147, 98, 26, 0.34);
  color: #fff0bc;
  outline: none;
}

.codex-search-hint {
  margin: 0.48rem 0 0 2.75rem;
  color: rgba(164, 188, 192, 0.62);
  font-size: 0.78rem;
  line-height: 1.35;
}

.codex-search-results {
  max-height: min(68vh, 46rem);
  margin-bottom: 1.5rem;
  overflow: hidden auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(116, 151, 162, 0.3);
  border-radius: 0.85rem;
  background: rgba(3, 13, 24, 0.92);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
  scrollbar-color: rgba(218, 174, 81, 0.48) rgba(4, 17, 28, 0.9);
}

.codex-search-results__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(109, 145, 157, 0.25);
  background: rgba(4, 18, 30, 0.98);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.18);
}

.codex-search-results__header strong {
  min-width: 0;
  color: #f7dfaa;
  font: 700 1.08rem/1.3 var(--font-serif, Georgia, serif);
  overflow-wrap: anywhere;
}

.codex-search-results__header span {
  flex: 0 0 auto;
  color: rgba(176, 199, 200, 0.68);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.codex-search-results__list {
  display: grid;
  gap: 0.55rem;
  padding: 0.7rem;
}

.codex-search-result {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.28rem 1rem;
  width: 100%;
  padding: 0.9rem 1rem;
  overflow: hidden;
  border: 1px solid rgba(103, 136, 148, 0.27);
  border-radius: 0.62rem;
  background: linear-gradient(110deg, rgba(10, 28, 42, 0.88), rgba(5, 19, 31, 0.78));
  color: inherit;
  text-align: left;
  box-shadow: inset 3px 0 rgba(219, 174, 78, 0.24);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.codex-search-result:hover,
.codex-search-result:focus-visible {
  z-index: 1;
  transform: translateY(-1px);
  border-color: rgba(236, 191, 95, 0.66);
  background: linear-gradient(110deg, rgba(22, 43, 53, 0.96), rgba(8, 24, 38, 0.92));
  box-shadow:
    inset 3px 0 #e8b958,
    0 8px 24px rgba(0, 0, 0, 0.25);
  outline: none;
}

.codex-search-result__topic,
.codex-search-result__heading,
.codex-search-result__answer {
  grid-column: 1;
  min-width: 0;
}

.codex-search-result__topic {
  width: max-content;
  max-width: 100%;
  padding: 0.16rem 0.48rem;
  border: 1px solid rgba(88, 195, 178, 0.28);
  border-radius: 999px;
  background: rgba(24, 107, 96, 0.15);
  color: #7ed5c4;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.075em;
  line-height: 1.25;
  text-transform: uppercase;
}

.codex-search-result__heading {
  color: #ffe4a3;
  font: 700 1.08rem/1.3 var(--font-serif, Georgia, serif);
}

.codex-search-result__answer {
  color: rgba(211, 221, 216, 0.76);
  font-size: 0.92rem;
  line-height: 1.52;
}

.codex-search-result__open {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  color: rgba(235, 190, 95, 0.58);
  font-size: 1.12rem;
  transition: color 140ms ease, transform 140ms ease;
}

.codex-search-result:hover .codex-search-result__open,
.codex-search-result:focus-visible .codex-search-result__open {
  color: #ffd77d;
  transform: translate(2px, -2px);
}

.codex-search-mark {
  padding: 0 0.08em;
  border-radius: 0.15em;
  background: rgba(240, 188, 69, 0.24);
  color: #ffe092;
  box-shadow: inset 0 -1px rgba(255, 220, 137, 0.45);
}

.codex-search-empty {
  display: grid;
  min-height: 10rem;
  place-items: center;
  padding: 2rem;
  color: rgba(185, 203, 202, 0.72);
  font-size: 0.95rem;
  text-align: center;
}

.codex-search-empty--loading { color: #dfbd6e; }
.codex-search-index { display: none !important; }

.codex-search-hit {
  scroll-margin-block: 7rem;
  border-radius: 0.35rem;
  outline: 2px solid rgba(255, 205, 101, 0.9);
  outline-offset: 0.42rem;
  animation: codex-search-pulse 760ms ease-in-out 2;
}

@keyframes codex-search-pulse {
  0%, 100% {
    background-color: transparent;
    box-shadow: 0 0 0 rgba(255, 194, 67, 0);
  }
  50% {
    background-color: rgba(212, 157, 47, 0.14);
    box-shadow: 0 0 1.7rem rgba(255, 194, 67, 0.28);
  }
}

@media (max-width: 720px) {
  .codex-search-shell { padding: 0.6rem; }
  .codex-search-input-row {
    gap: 0.45rem;
    padding-left: 0.65rem;
  }
  .codex-search-icon { font-size: 1.45rem; }
  .codex-search-input-row input { font-size: 0.92rem; }
  .codex-search-clear {
    padding-inline: 0.55rem;
    font-size: 0.74rem;
  }
  .codex-search-hint { margin-left: 0.2rem; }
  .codex-search-results { max-height: 64vh; }
  .codex-search-results__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }
  .codex-search-result {
    gap: 0.24rem 0.55rem;
    padding: 0.8rem;
  }
  .codex-search-result__answer { font-size: 0.84rem; }
}

@media (prefers-reduced-motion: reduce) {
  .codex-search-result,
  .codex-search-result__open { transition: none; }
  .codex-search-hit { animation: none; }
  .codex-topic-discovery-highlight {
    animation: none;
    box-shadow:
      0 0 0 3px rgba(255, 222, 113, 0.54),
      0 0 1.5rem rgba(255, 190, 48, 0.68),
      inset 0 0 0.8rem rgba(255, 229, 139, 0.2);
    filter: brightness(1.14);
  }
}

.codex-full-room .text-xs { font-size: 0.9rem !important; }
.codex-full-room .text-sm { font-size: 1.05rem !important; }
.codex-full-room .text-base { font-size: 1.2rem !important; }
.codex-full-room .text-lg { font-size: 1.35rem !important; }
.codex-full-room .text-xl { font-size: 1.5rem !important; }
.codex-full-room .text-2xl { font-size: 1.8rem !important; }
.codex-full-room .text-3xl { font-size: 2.25rem !important; }

.combat-math-codex {
  width: 100%;
  max-width: none;
  gap: 1rem;
}

.combat-math-kicker { font-size: 0.82rem; }
.combat-math-hero h3 { font-size: clamp(2.4rem, 4vw, 3.6rem); }
.combat-math-hero p { max-width: 64rem; font-size: 1.03rem; }
.combat-math-identity small,
.combat-math-identity span { font-size: 0.82rem; }
.combat-math-identity strong { font-size: 1.38rem; }
.combat-math-input { font-size: 0.91rem; }
.combat-math-input input { font-size: 0.98rem; }
.combat-math-metric span { font-size: 0.74rem; }
.combat-math-metric strong { font-size: 1.38rem; }
.combat-math-metric small { font-size: 0.73rem; }
.combat-math-section > summary > span { font-size: 0.86rem; }
.combat-math-section > summary > strong { font-size: 1.2rem; }
.combat-math-section > summary > small { font-size: 0.82rem; }
.combat-math-lead,
.combat-math-footnote,
.combat-math-empty { font-size: 0.94rem; }
.combat-math-formula__head span { font-size: 0.82rem; }
.combat-math-formula__head strong { font-size: 1.14rem; }
.combat-math-formula code,
.combat-math-callout code { font-size: 0.91rem; }
.combat-math-formula p { font-size: 0.8rem; }
.combat-math-callout strong { font-size: 1.05rem; }
.combat-math-callout p { font-size: 0.9rem; }
.combat-math-ability-select { font-size: 0.89rem; }
.combat-math-ability-select select { font-size: 0.95rem; }
.combat-math-cap > span { font-size: 0.88rem; }
.combat-math-cap > strong { font-size: 1.2rem; }
.combat-math-cap > strong small { font-size: 0.6rem; }
.combat-math-cap > em { font-size: 0.74rem; }
.combat-math-source-row > * { font-size: 0.82rem; }
.combat-math-source-row--head > * { font-size: 0.71rem; }
.combat-math-disclaimer { font-size: 0.86rem; }

.combat-math-workshop {
  display: grid;
  gap: 1rem;
}

.combat-math-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.55rem;
  border: 1px solid rgba(105, 139, 148, 0.3);
  background: rgba(4, 13, 24, 0.9);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035);
}

.combat-math-mode-tab {
  display: grid;
  gap: 0.2rem;
  min-height: 4.7rem;
  padding: 0.85rem 1rem;
  border: 1px solid transparent;
  background: rgba(11, 27, 42, 0.72);
  color: rgba(211, 220, 217, 0.66);
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.combat-math-mode-tab:hover {
  border-color: rgba(231, 189, 104, 0.28);
  color: #f2e3c7;
}

.combat-math-mode-tab.is-active {
  border-color: rgba(231, 189, 104, 0.68);
  background:
    linear-gradient(120deg, rgba(113, 74, 24, 0.32), rgba(9, 26, 39, 0.94));
  color: #ffe4a6;
  box-shadow: inset 3px 0 var(--math-gold), 0 7px 24px rgba(0, 0, 0, 0.2);
}

.combat-math-mode-tab strong {
  font: 700 1.12rem/1.15 var(--font-serif, Georgia, serif);
}

.combat-math-mode-tab span {
  color: rgba(193, 206, 205, 0.62);
  font-size: 1rem;
  line-height: 1.35;
}

.combat-math-resolution {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  gap: 0.9rem 1.2rem;
  align-items: center;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(97, 215, 193, 0.25);
  background: linear-gradient(100deg, rgba(8, 29, 39, 0.78), rgba(6, 17, 30, 0.88));
}

.combat-math-resolution > header { display: grid; gap: 0.18rem; }
.combat-math-resolution > header span {
  color: var(--math-teal);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.combat-math-resolution > header strong {
  color: #fff0c7;
  font: 700 1.34rem/1.25 var(--font-serif, Georgia, serif);
}
.combat-math-resolution > div {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
}
.combat-math-resolution > div > div {
  position: relative;
  display: grid;
  min-height: 3.6rem;
  gap: 0.25rem;
  align-content: center;
  padding: 0.55rem 0.7rem;
  border-left: 2px solid rgba(231, 189, 104, 0.48);
  background: rgba(2, 11, 21, 0.62);
}
.combat-math-resolution > div span {
  color: rgba(97, 215, 193, 0.78);
  font: 800 0.82rem/1 var(--font-mono, Consolas, monospace);
}
.combat-math-resolution > div strong {
  color: rgba(232, 226, 212, 0.84);
  font-size: 0.96rem;
  line-height: 1.25;
}
.combat-math-resolution > p {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(201, 214, 211, 0.68);
  font-size: 1.03rem;
  line-height: 1.55;
}

.combat-math-theory-panel {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  border: 1px solid rgba(231, 189, 104, 0.3);
  background:
    radial-gradient(circle at 82% 0%, rgba(97, 215, 193, 0.08), transparent 28rem),
    linear-gradient(145deg, rgba(7, 19, 32, 0.98), rgba(4, 12, 23, 0.98));
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.combat-math-theory-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(231, 189, 104, 0.18);
}
.combat-math-theory-header > div:first-child { display: grid; gap: 0.28rem; }
.combat-math-theory-header > div:first-child > span,
.combat-math-live-projection > span {
  color: var(--math-teal);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}
.combat-math-theory-header h4 {
  margin: 0;
  color: #fff0c7;
  font: 700 clamp(1.55rem, 2.2vw, 2.15rem)/1.1 var(--font-serif, Georgia, serif);
}
.combat-math-theory-header p {
  max-width: 70rem;
  margin: 0;
  color: rgba(205, 215, 212, 0.72);
  font-size: 1.14rem;
  line-height: 1.55;
}

.combat-math-budget {
  display: grid;
  min-width: 9.5rem;
  padding: 0.8rem 1rem;
  border-left: 3px solid var(--math-gold);
  background: rgba(2, 10, 19, 0.7);
  text-align: right;
}
.combat-math-budget strong {
  color: #ffe1a0;
  font: 800 1.65rem/1 var(--font-mono, Consolas, monospace);
}
.combat-math-budget span { color: rgba(202, 212, 209, 0.62); font-size: 0.94rem; }

.combat-math-budget-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}
.combat-math-budget-bars > div { display: grid; gap: 0.38rem; }
.combat-math-budget-bars span {
  color: rgba(225, 226, 216, 0.8);
  font-size: 1rem;
  font-weight: 800;
}
.combat-math-budget-bars i {
  display: block;
  height: 0.48rem;
  overflow: hidden;
  border: 1px solid rgba(96, 131, 141, 0.34);
  background: rgba(0, 7, 14, 0.85);
}
.combat-math-budget-bars b {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--math-teal), var(--math-gold));
  box-shadow: 0 0 12px rgba(97, 215, 193, 0.3);
}

.combat-math-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.combat-math-toolbar button,
.combat-math-comparison-card > button {
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(123, 158, 168, 0.32);
  background: rgba(9, 25, 39, 0.9);
  color: rgba(226, 226, 215, 0.82);
  font-size: 1rem;
  font-weight: 800;
}
.combat-math-toolbar button:hover,
.combat-math-comparison-card > button:hover { border-color: rgba(231, 189, 104, 0.7); color: #ffe4a6; }
.combat-math-toolbar button.is-primary {
  border-color: rgba(231, 189, 104, 0.68);
  background: linear-gradient(180deg, rgba(157, 108, 35, 0.48), rgba(86, 58, 20, 0.45));
  color: #fff0c7;
}

.combat-math-subclass-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.combat-math-subclass-picker button {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid rgba(109, 139, 148, 0.28);
  background: rgba(5, 15, 27, 0.82);
  color: rgba(219, 222, 214, 0.7);
  text-align: left;
}
.combat-math-subclass-picker button.is-active {
  border-color: var(--subclass-accent);
  background: linear-gradient(110deg, color-mix(in srgb, var(--subclass-accent) 18%, transparent), rgba(5, 17, 29, 0.94));
  box-shadow: inset 3px 0 var(--subclass-accent);
  color: #fff0c7;
}
.combat-math-subclass-picker img {
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid rgba(231, 189, 104, 0.3);
  object-fit: cover;
}
.combat-math-subclass-picker span { display: grid; gap: 0.12rem; min-width: 0; }
.combat-math-subclass-picker strong { font: 700 1.2rem/1.15 var(--font-serif, Georgia, serif); }
.combat-math-subclass-picker small { color: rgba(197, 207, 205, 0.58); font-size: 0.9rem; }

.combat-math-sandbox-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(19rem, 24rem);
  gap: 1rem;
  align-items: start;
}
.combat-math-talent-groups { display: grid; gap: 1rem; min-width: 0; }
.combat-math-talent-groups > section {
  display: grid;
  gap: 0.7rem;
  padding: 0.8rem;
  border: 1px solid rgba(101, 132, 141, 0.22);
  background: rgba(3, 12, 22, 0.66);
}
.combat-math-talent-groups > section > header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.combat-math-talent-groups h5,
.combat-math-live-projection h5 {
  margin: 0;
  color: #f3dfbd;
  font: 700 1.44rem/1.2 var(--font-serif, Georgia, serif);
}
.combat-math-talent-groups > section > header span {
  color: var(--math-gold);
  font: 800 0.9rem/1 var(--font-mono, Consolas, monospace);
}
.combat-math-tree-lock {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-left: 3px solid #c66b4a;
  background: rgba(97, 39, 26, 0.18);
  color: rgba(232, 199, 180, 0.78);
  font-size: 0.98rem;
}

.combat-math-talent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.combat-math-talent-card {
  display: grid;
  grid-template-columns: 3.35rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-width: 0;
  padding: 0.58rem;
  border: 1px solid rgba(100, 130, 139, 0.22);
  background: rgba(7, 20, 32, 0.76);
  transition: border-color 130ms ease, background 130ms ease;
}
.combat-math-talent-card.is-ranked {
  border-color: color-mix(in srgb, var(--talent-accent) 58%, transparent);
  background: linear-gradient(105deg, color-mix(in srgb, var(--talent-accent) 12%, transparent), rgba(7, 20, 32, 0.86));
}
.combat-math-talent-card.is-locked:not(.is-ranked) { opacity: 0.56; }
.combat-math-talent-card__icon {
  width: 3.35rem;
  height: 3.35rem;
  border: 1px solid rgba(231, 189, 104, 0.24);
  background: #020a13;
  object-fit: cover;
}
.combat-math-talent-card__copy { display: grid; min-width: 0; gap: 0.24rem; }
.combat-math-talent-card__copy > div {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: baseline;
}
.combat-math-talent-card__copy strong {
  overflow: hidden;
  color: #eee2cc;
  font-size: 1.06rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.combat-math-talent-card__copy > div span {
  flex: none;
  color: var(--math-gold);
  font: 700 0.82rem/1 var(--font-mono, Consolas, monospace);
}
.combat-math-talent-card__copy p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: rgba(197, 207, 205, 0.64);
  font-size: 0.9rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.combat-math-talent-card__copy small {
  overflow: hidden;
  color: rgba(97, 215, 193, 0.76);
  font-size: 0.83rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.combat-math-rank-controls { display: grid; gap: 0.35rem; }
.combat-math-rank-controls button {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(231, 189, 104, 0.38);
  background: rgba(2, 9, 17, 0.9);
  color: #ffe0a0;
  font: 800 1rem/1 var(--font-mono, Consolas, monospace);
}
.combat-math-rank-controls button:hover:not(:disabled) { border-color: var(--math-teal); color: #9ce9da; }
.combat-math-rank-controls button:disabled { cursor: not-allowed; opacity: 0.25; }

.combat-math-live-projection {
  position: sticky;
  top: 0.7rem;
  display: grid;
  gap: 0.55rem;
  padding: 0.9rem;
  border: 1px solid rgba(231, 189, 104, 0.3);
  border-top: 3px solid var(--math-gold);
  background: rgba(4, 14, 25, 0.96);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.25);
}
.combat-math-live-projection > p {
  margin: 0;
  color: rgba(201, 211, 208, 0.68);
  font-size: 0.94rem;
  line-height: 1.45;
}
.combat-math-live-projection > div { display: grid; }
.combat-math-live-projection > div > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: baseline;
  padding: 0.52rem 0;
  border-top: 1px solid rgba(102, 132, 141, 0.16);
}
.combat-math-live-projection > div span { color: rgba(209, 215, 210, 0.7); font-size: 0.94rem; }
.combat-math-live-projection > div strong { color: #ffe2a3; font: 700 1.03rem/1 var(--font-mono, Consolas, monospace); }
.combat-math-live-projection em { min-width: 4.5rem; color: rgba(190, 202, 201, 0.52); font: 700 0.84rem/1 var(--font-mono, Consolas, monospace); text-align: right; }
.combat-math-live-projection em.is-positive { color: #74d8a7; }
.combat-math-live-projection em.is-negative { color: #de806b; }
.combat-math-live-projection > small { color: rgba(194, 204, 202, 0.54); font-size: 0.82rem; line-height: 1.45; }

.combat-math-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}
.combat-math-comparison-card {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--subclass-accent) 45%, rgba(103, 133, 142, 0.25));
  border-top: 3px solid var(--subclass-accent);
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--subclass-accent) 9%, transparent), rgba(3, 12, 23, 0.9));
}
.combat-math-comparison-card > header {
  display: grid;
  grid-template-columns: 5.3rem minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
}
.combat-math-comparison-card > header img {
  width: 5.3rem;
  height: 5.3rem;
  border: 1px solid color-mix(in srgb, var(--subclass-accent) 62%, transparent);
  object-fit: cover;
}
.combat-math-comparison-card > header div { display: grid; gap: 0.16rem; }
.combat-math-comparison-card > header span {
  color: var(--math-teal);
  font: 800 0.68rem/1 var(--font-mono, Consolas, monospace);
}
.combat-math-comparison-card h5 {
  margin: 0;
  color: #fff0c7;
  font: 700 1.42rem/1.1 var(--font-serif, Georgia, serif);
}
.combat-math-comparison-card > header small { color: rgba(201, 211, 208, 0.62); font-size: 0.86rem; }
.combat-math-comparison-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.42rem; }
.combat-math-comparison-stats > div {
  position: relative;
  display: grid;
  gap: 0.16rem;
  min-height: 3.75rem;
  align-content: center;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(101, 132, 141, 0.2);
  background: rgba(2, 10, 19, 0.72);
}
.combat-math-comparison-stats > div.is-best {
  border-color: rgba(97, 215, 193, 0.48);
  background: rgba(17, 54, 53, 0.34);
}
.combat-math-comparison-stats span { color: rgba(199, 209, 206, 0.62); font-size: 0.84rem; font-weight: 800; text-transform: uppercase; }
.combat-math-comparison-stats strong { color: #ffe2a3; font: 800 1.13rem/1.1 var(--font-mono, Consolas, monospace); }
.combat-math-comparison-stats small {
  position: absolute;
  right: 0.4rem;
  top: 0.35rem;
  color: var(--math-teal);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}
.combat-math-comparison-card > section { display: grid; gap: 0.45rem; }
.combat-math-comparison-card h6 { margin: 0; color: rgba(230, 222, 205, 0.82); font-size: 0.98rem; }
.combat-math-subclass-bonuses { display: grid; gap: 0.32rem; }
.combat-math-subclass-bonuses > div {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.4rem 0.5rem;
  background: rgba(5, 17, 28, 0.72);
}
.combat-math-subclass-bonuses span { color: rgba(199, 208, 205, 0.65); font-size: 0.86rem; }
.combat-math-subclass-bonuses strong { color: var(--subclass-accent); font: 800 0.91rem/1 var(--font-mono, Consolas, monospace); }
.combat-math-comparison-card > button { width: 100%; border-color: color-mix(in srgb, var(--subclass-accent) 55%, transparent); }
.combat-math-comparison-note {
  margin: 0;
  padding: 0.8rem 0.95rem;
  border-left: 3px solid var(--math-gold);
  background: rgba(65, 46, 20, 0.18);
  color: rgba(211, 213, 202, 0.7);
  font-size: 1rem;
  line-height: 1.5;
}

.combat-math-contract-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}
.combat-math-contract-grid article {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 0.38rem;
  align-content: start;
  padding: 0.8rem 0.85rem 0.75rem 3rem;
  border: 1px solid rgba(100, 131, 141, 0.23);
  background: rgba(2, 11, 21, 0.68);
}
.combat-math-contract-grid article > span {
  position: absolute;
  left: 0.75rem;
  top: 0.8rem;
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border: 1px solid rgba(97, 215, 193, 0.42);
  color: var(--math-teal);
  font: 800 0.86rem/1 var(--font-mono, Consolas, monospace);
}
.combat-math-contract-grid h5 {
  margin: 0;
  color: #f2dec0;
  font: 700 1.2rem/1.2 var(--font-serif, Georgia, serif);
}
.combat-math-contract-grid p {
  margin: 0;
  color: rgba(202, 211, 208, 0.68);
  font-size: 0.94rem;
  line-height: 1.48;
}
.combat-math-contract-grid code {
  overflow-wrap: anywhere;
  color: rgba(231, 189, 104, 0.82);
  font: 700 0.86rem/1.4 var(--font-mono, Consolas, monospace);
}

@media (max-width: 1400px) {
  .combat-math-talent-grid { grid-template-columns: 1fr; }
  .combat-math-contract-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .combat-math-hero { grid-template-columns: 1fr; }
  .combat-math-identity { min-width: 0; text-align: left; }
  .combat-math-inputs { grid-template-columns: 1fr; }
  .combat-math-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .combat-math-cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .combat-math-sandbox-layout { grid-template-columns: 1fr; }
  .combat-math-live-projection { position: static; }
  .combat-math-comparison { grid-template-columns: 1fr; }
  .combat-math-resolution { grid-template-columns: 1fr; }
  .combat-math-resolution > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .combat-math-contract-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .combat-math-hero { padding: 1rem; }
  .combat-math-formula-grid,
  .combat-math-metrics,
  .combat-math-cap-grid { grid-template-columns: 1fr; }
  .combat-math-input { grid-template-columns: minmax(0, 1fr) 6rem; }
  .combat-math-ability-select { grid-template-columns: 1fr; }
  .combat-math-section > summary { grid-template-columns: 1.8rem minmax(0, 1fr); }
  .combat-math-section > summary > small { display: none; }
  .combat-math-mode-tabs,
  .combat-math-subclass-picker,
  .combat-math-budget-bars,
  .combat-math-talent-grid { grid-template-columns: 1fr; }
  .combat-math-mode-tab { min-height: 0; }
  .combat-math-theory-header { align-items: stretch; flex-direction: column; }
  .combat-math-budget { text-align: left; }
  .combat-math-resolution > div { grid-template-columns: 1fr; }
  .combat-math-talent-card { grid-template-columns: 3rem minmax(0, 1fr) auto; }
}

.glimmerroot-living-map.is-reduced-motion,
.glimmerroot-living-map.is-reduced-motion * {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  .glimmerroot-living-map,
  .glimmerroot-living-map *,
  .world-map-zone-grid,
  .world-map-zone-card,
  .world-map-expand-area-button {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* Map cursors keep the normal caret and disabled-state feedback where those matter. */
.zone-themed-shell[data-zone-cursor] {
  cursor: var(--zone-cursor, auto);
}

.zone-themed-shell[data-zone-cursor] button:not(:disabled),
.zone-themed-shell[data-zone-cursor] a,
.zone-themed-shell[data-zone-cursor] [role="button"]:not([aria-disabled="true"]) {
  cursor: var(--zone-cursor, pointer);
}

.zone-themed-shell[data-zone-cursor] .world-map-expand-area-button:disabled {
  cursor: not-allowed;
}

.zone-themed-shell[data-zone-cursor] input,
.zone-themed-shell[data-zone-cursor] textarea,
.zone-themed-shell[data-zone-cursor] [contenteditable="true"] {
  cursor: text !important;
}

@media (prefers-reduced-motion: reduce) {
  .vespera-guidance-spotlight,
  .vespera-guidance-action-ring {
    animation: none !important;
  }

  .vespera-guidance-card__primary {
    transition: none !important;
  }

}

/* Frontier round-marker correction: one circular footprint, regardless of region or state. */
.frontier-scenic-steps.frontier-page-shell--open.frontier-region-expedition .frontier-route-node:not(.frontier-route-node--boss) {
  border-radius: 50% !important;
  clip-path: none !important;
  transform: none !important;
}

.frontier-scenic-steps.frontier-page-shell--open.frontier-region-expedition .frontier-route-node:not(.frontier-route-node--boss)::before {
  border-radius: 50% !important;
  clip-path: none !important;
}

.frontier-scenic-steps.frontier-page-shell--open.frontier-region-expedition .frontier-route-node--boss {
  border-radius: 50% !important;
  clip-path: none !important;
  transform: none !important;
}

.frontier-scenic-steps.frontier-page-shell--open.frontier-region-expedition .frontier-route-node--boss > .frontier-route-node__portrait {
  border-radius: 50% !important;
  clip-path: none !important;
}

/* Frontier HUD phase d - sockets, region plate, switcher, and map-node material. */
.frontier-region-expedition.frontier-page-shell--open .frontier-seals-eyebrow {
  color: #e2c270 !important;
  font-family: var(--font-serif);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seals-header-chips {
  margin-top: 0.42rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip--seal-status .frontier-hud-chip__value {
  color: #f4da91;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action {
  background: rgba(0, 0, 0, 0.46) !important;
  color: rgba(244, 232, 208, 0.72) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel .frontier-seal-socket {
  min-height: 5rem !important;
  padding: 0.48rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket .sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__frame {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(217, 184, 129, 0.38);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 42%, rgba(217, 184, 129, 0.16), transparent 58%),
    rgba(0, 0, 0, 0.55);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    inset 0 8px 18px rgba(0, 0, 0, 0.46),
    0 0 16px rgba(217, 184, 129, 0.14);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__icon {
  width: 31px;
  height: 31px;
  border-radius: 7px;
  object-fit: cover;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__pips {
  margin-top: 0.34rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-radius: 10px;
  background:
    linear-gradient(135deg, transparent 41%, rgba(217, 184, 129, 0.22) 42%, rgba(217, 184, 129, 0.22) 58%, transparent 59%),
    linear-gradient(45deg, transparent 41%, rgba(217, 184, 129, 0.16) 42%, rgba(217, 184, 129, 0.16) 58%, transparent 59%),
    rgba(0, 0, 0, 0.48);
  opacity: 0.72;
  box-shadow:
    inset 0 8px 18px rgba(0, 0, 0, 0.52),
    0 0 12px rgba(217, 184, 129, 0.08);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  border-color: rgba(217, 184, 129, 0.24) !important;
  border-radius: 6px !important;
  background: rgba(0, 0, 0, 0.48) !important;
  color: rgba(244, 232, 208, 0.84) !important;
  box-shadow: inset 0 1px 0 rgba(255, 244, 216, 0.05);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__chip::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border: 1px solid rgba(217, 184, 129, 0.42);
  border-radius: 999px;
  background: #e2c270;
  box-shadow: 0 0 8px rgba(226, 194, 112, 0.28);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__chip--terrain {
  width: fit-content;
  max-width: 100%;
  padding: 0.28rem 0.42rem;
  color: #f29d55 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__chip--terrain::before {
  border-color: rgba(242, 157, 85, 0.5);
  background: #f29d55;
  box-shadow: 0 0 8px rgba(242, 157, 85, 0.34);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__chip--nodes::before {
  border-color: rgba(126, 223, 200, 0.45);
  background: #7edfc8;
  box-shadow: 0 0 8px rgba(126, 223, 200, 0.24);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__main {
  align-items: center;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__gem {
  width: 0.38rem;
  height: 0.38rem;
  flex: 0 0 0.38rem;
  border: 1px solid rgba(217, 184, 129, 0.35);
  border-radius: 999px;
  background: rgba(126, 223, 200, 0.55);
  box-shadow: 0 0 8px rgba(126, 223, 200, 0.18);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__gem--active {
  border-color: rgba(246, 223, 157, 0.72);
  background: #f4da91;
  box-shadow:
    0 0 0 2px rgba(244, 218, 145, 0.18),
    0 0 12px rgba(244, 218, 145, 0.34);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__progress {
  height: 6px !important;
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__progress span {
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(126, 83, 33, 0.95), rgba(226, 194, 112, 0.95)) !important;
  box-shadow: 0 0 10px rgba(226, 194, 112, 0.28);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared {
  border-color: rgba(226, 194, 112, 0.9) !important;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 236, 167, 0.98), rgba(179, 126, 43, 0.96) 58%, rgba(48, 27, 8, 0.98) 100%) !important;
  color: #2b1808 !important;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.42),
    0 0 20px rgba(226, 194, 112, 0.36),
    inset 0 0 13px rgba(255, 255, 255, 0.18) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared .frontier-route-node__mark {
  font-size: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared .frontier-route-node__mark::before {
  content: "SEAL";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2b1808;
  font-family: var(--font-serif);
  font-size: 0.46rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--boss {
  border-color: rgba(236, 203, 132, 0.72) !important;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.5),
    0 0 0 8px rgba(199, 66, 53, 0.22),
    0 0 34px rgba(199, 66, 53, 0.42),
    inset 0 0 14px rgba(255, 221, 168, 0.18) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--boss::after {
  content: "\2620";
  position: absolute;
  right: -0.3rem;
  top: -0.32rem;
  display: grid;
  width: 1.15rem;
  height: 1.15rem;
  place-items: center;
  border: 1px solid rgba(236, 203, 132, 0.54);
  border-radius: 999px;
  background: rgba(45, 7, 10, 0.95);
  color: #ffd8c6;
  font-size: 0.72rem;
  line-height: 1;
  box-shadow: 0 0 12px rgba(199, 66, 53, 0.38);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected:not(.frontier-route-node--boss) {
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.46),
    0 0 0 7px rgba(244, 212, 122, 0.26),
    0 0 34px rgba(244, 212, 122, 0.5),
    inset 0 0 14px rgba(255, 255, 255, 0.18) !important;
}

.frontier-seal-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.frontier-seal-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 7, 18, 0.72);
  backdrop-filter: blur(3px);
}

.frontier-seal-modal {
  position: relative;
  z-index: 1;
  width: min(980px, calc(100vw - 3rem));
  max-height: min(760px, calc(100vh - 3rem));
  overflow: hidden;
  border: 1px solid rgb(var(--brass-rgb) / 0.34) !important;
  border-radius: 8px;
  padding: 1.1rem;
  background:
    linear-gradient(180deg, rgb(var(--indigo-rgb) / 0.98), rgb(var(--surface-rgb) / 0.96)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.07),
    0 26px 70px rgba(0, 0, 0, 0.66) !important;
}

.frontier-seal-modal__header,
.frontier-seal-modal__card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.frontier-seal-modal__kicker,
.frontier-seal-modal__section-title,
.frontier-seal-modal__region,
.frontier-seal-modal__state,
.frontier-seal-modal__meta {
  color: var(--color-celestial-gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.frontier-seal-modal__title {
  margin-top: 0.2rem;
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-size: 1.65rem;
  font-style: italic;
  line-height: 1;
}

.frontier-seal-modal__close {
  min-width: 5.8rem;
  min-height: 2.2rem;
  border: 1px solid #9b6f24a6;
  border-radius: 4px;
  background: linear-gradient(#d9c8a0, #bfa679);
  color: var(--color-painted-indigo);
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 800;
}

.frontier-seal-modal__equipped {
  margin-top: 1rem;
  border: 1px solid rgb(var(--brass-rgb) / 0.18);
  border-radius: 6px;
  padding: 0.8rem;
  background: linear-gradient(180deg, rgb(var(--indigo-rgb) / 0.64), rgb(var(--surface-rgb) / 0.44));
}

.frontier-seal-modal__slot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.55rem;
}

.frontier-seal-modal__slot {
  min-height: 2.65rem;
  border: 1px solid rgba(123, 190, 255, 0.24);
  border-radius: 5px;
  background: rgba(4, 20, 43, 0.72);
  color: rgba(229, 240, 252, 0.82);
  font-family: var(--font-serif);
  font-size: 0.86rem;
}

.frontier-seal-modal__slot--selected {
  border-color: rgba(255, 224, 138, 0.74);
  background: linear-gradient(180deg, rgba(37, 103, 160, 0.82), rgba(9, 32, 70, 0.92));
  color: #fff5d3;
  box-shadow: 0 0 18px rgba(82, 177, 255, 0.22);
}

.frontier-seal-modal__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.8rem;
  max-height: min(470px, calc(100vh - 270px));
  overflow-y: auto;
  padding-right: 0.25rem;
}

.frontier-seal-modal__card {
  border: 1px solid rgba(123, 190, 255, 0.20);
  border-radius: 6px;
  padding: 0.85rem;
  background: linear-gradient(180deg, rgba(5, 26, 52, 0.76), rgba(2, 12, 28, 0.82));
}

.frontier-seal-modal__card--kept {
  border-color: rgba(255, 224, 138, 0.55);
}

.frontier-seal-modal__card--earned {
  border-color: rgba(113, 211, 154, 0.38);
}

.frontier-seal-modal__card--locked {
  opacity: 0.52;
}

.frontier-seal-modal__name {
  margin-top: 0.15rem;
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 800;
}

.frontier-seal-modal__stats {
  margin-top: 0.7rem;
}

.frontier-seal-modal__meta {
  margin-top: 0.65rem;
  color: rgba(209, 224, 240, 0.7);
}

.frontier-seal-modal__bind {
  width: 100%;
  min-height: 2.25rem;
  margin-top: 0.75rem;
  border-radius: 4px !important;
  font-size: 0.78rem !important;
}

@media (max-width: 760px) {
  .frontier-seal-modal-layer {
    padding: 0.9rem;
  }

  .frontier-seal-modal__slot-grid,
  .frontier-seal-modal__grid {
    grid-template-columns: 1fr;
  }
}
.ascension-panel .bg-animation {
  opacity: 0.15;
}
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #0003;
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: linear-gradient(
    to bottom,
    var(--color-desert-sand),
    var(--color-celestial-gold)
  );
  border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--color-celestial-gold);
}

.tower-followup-shell {
  isolation: isolate;
}

.tower-followup-shell .btn-primary {
  color: #120b03;
  background: linear-gradient(90deg, #fff0b8 0%, #d8ab4f 34%, #ffdc6a 68%, #fff0b8 100%);
  background-size: 220% 100%;
  border-color: rgba(255, 220, 106, 0.88);
  font-weight: 900;
  font-style: normal;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 218, 0.5),
    inset 0 -2px 0 rgba(84, 49, 9, 0.36),
    0 0 18px rgba(255, 214, 102, 0.22),
    0 2px 6px rgba(0, 0, 0, 0.38);
  animation: towerGoldButtonPulse 2.1s ease-in-out infinite;
}

.tower-followup-shell .btn-primary:hover:not(:disabled) {
  border-color: rgba(255, 237, 150, 1);
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 250, 218, 0.62),
    inset 0 -2px 0 rgba(84, 49, 9, 0.32),
    0 0 26px rgba(255, 214, 102, 0.34),
    0 4px 10px rgba(0, 0, 0, 0.42);
}

.tower-followup-shell .btn-primary:disabled {
  animation: none;
}

.tower-followup-shell .btn-secondary {
  border-color: rgba(214, 169, 79, 0.46);
  background: linear-gradient(180deg, rgba(214, 169, 79, 0.12), rgba(5, 9, 18, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 232, 176, 0.08);
}

.tower-followup-shell .btn-secondary:hover:not(:disabled) {
  border-color: rgba(255, 214, 102, 0.74);
  background: linear-gradient(180deg, rgba(214, 169, 79, 0.2), rgba(5, 9, 18, 0.26));
}

@keyframes towerGoldButtonPulse {
  0%,
  100% {
    background-position: 0% 50%;
    box-shadow:
      inset 0 1px 0 rgba(255, 250, 218, 0.5),
      inset 0 -2px 0 rgba(84, 49, 9, 0.36),
      0 0 16px rgba(255, 214, 102, 0.2),
      0 2px 6px rgba(0, 0, 0, 0.38);
  }
  50% {
    background-position: 100% 50%;
    box-shadow:
      inset 0 1px 0 rgba(255, 250, 218, 0.58),
      inset 0 -2px 0 rgba(84, 49, 9, 0.32),
      0 0 26px rgba(255, 214, 102, 0.34),
      0 2px 8px rgba(0, 0, 0, 0.42);
  }
}

.tower-followup-shell > * {
  position: relative;
  z-index: 2;
}

.tower-followup-shell--tower.panel-glass {
  border-color: rgba(214, 169, 79, 0.3);
  background: #02060f;
  box-shadow: inset 0 1px 0 rgba(255, 232, 176, 0.08), 0 24px 70px rgba(0, 0, 0, 0.42);
}

.tower-followup-shell--tower::before,
.tower-followup-shell--tower::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tower-followup-shell--tower::before {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(2, 7, 18, 0.14) 26%, rgba(2, 7, 18, 0.28) 58%, rgba(0, 0, 0, 0.74)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.76), transparent 18%, transparent 82%, rgba(0, 0, 0, 0.76)),
    url("./celestial/tower/tower-background.webp?v=tower-final-1") center 42% / cover no-repeat;
  opacity: 0.9;
}

.tower-followup-shell--tower::after {
  z-index: 1;
  background:
    radial-gradient(circle at 50% 18%, rgba(139, 92, 246, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(1, 5, 13, 0.18), rgba(1, 5, 13, 0.82));
}

.tower-section-body--tower {
  position: relative;
  margin-inline: -4px;
  padding: 4px;
  border-radius: 10px;
}

.tower-tab-stage,
.tower-tab-content {
  position: relative;
  min-height: 100%;
}

.tower-tab-stage {
  display: grid;
  gap: 14px;
}

.tower-tab-content .combat-zone-panel {
  backdrop-filter: blur(3px);
}

.tower-tab-content--combat {
  gap: 12px;
}

.tower-control-dock {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(520px, 1.18fr);
  gap: 10px;
  align-items: stretch;
}

.tower-control-dock__tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
}

.tower-control-dock .tower-nameplate-panel.combat-zone-panel {
  height: 100%;
  min-width: 0;
  padding: 12px;
}

.tower-control-dock .tower-nameplate-panel__titlebar {
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.tower-control-dock .tower-nameplate-panel__heading h3 {
  font-size: 22px;
}

.tower-control-dock .tower-nameplate-panel__zone {
  min-width: 136px;
}

.tower-control-dock .tower-nameplate-chip-row {
  gap: 6px;
}

.tower-control-dock .tower-nameplate-chip {
  min-width: 104px;
  padding: 7px 8px;
  border-radius: 6px;
}

.tower-control-dock .tower-nameplate-chip span {
  font-size: 10px;
  letter-spacing: 0.08em;
}

.tower-control-dock .tower-nameplate-chip strong {
  font-size: 12px;
}

.tower-mode-toggle--compact {
  min-width: 0;
  height: 100%;
  padding: 10px;
  border: 1px solid rgba(214, 169, 79, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 18, 33, 0.76), rgba(3, 9, 18, 0.84)),
    radial-gradient(circle at 50% 0%, rgba(214, 169, 79, 0.08), transparent 38%);
}

.tower-mode-toggle--compact > div:last-child {
  grid-template-columns: 1fr;
  gap: 7px;
}

.tower-mode-toggle--compact .tower-mode-toggle__button {
  min-height: 52px;
  padding: 9px 10px;
  border-width: 1px;
}

.tower-mode-toggle--compact .tower-mode-toggle__button > div:first-child {
  margin-bottom: 2px;
}

.tower-mode-toggle--compact .tower-mode-toggle__button span:first-child {
  font-size: 12px;
  line-height: 1.1;
  letter-spacing: 0.05em;
}

.tower-mode-toggle--compact .tower-mode-toggle__button > div:last-child {
  font-size: 11px;
  line-height: 1.2;
}

.tower-live-combat-panel {
  min-height: clamp(820px, calc(100vh - 72px), 1060px) !important;
  height: auto !important;
  overflow: visible !important;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 232, 176, 0.04);
}

.tower-live-combat-panel > div:first-child,
.tower-live-combat-panel .combat-screen-root--embedded,
.tower-live-combat-panel .combat-screen-layout,
.tower-live-combat-panel .combat-screen-field-column,
.tower-live-combat-panel .combat-screen-fight-card {
  min-height: 100%;
  height: auto;
  overflow: visible !important;
}

.tower-live-combat-panel .combat-screen-feed-dock {
  height: 300px !important;
  min-height: 300px !important;
  max-height: 300px !important;
  overflow: hidden;
}

.tower-live-combat-panel .combat-screen-info-body {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: contain;
}

.tower-live-combat-panel .combat-feed-panel {
  flex: 1 1 0 !important;
  width: 100%;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
}

.tower-live-combat-panel .combat-feed-panel > div:last-child {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (min-width: 1024px) {
  .tower-followup-shell--tower:has(.tower-tab-content--combat),
  .tower-followup-shell--tower:has(.tower-tab-content--combat) .tower-section-body--tower {
    height: auto !important;
    overflow: visible !important;
  }

  .tower-live-combat-panel .combat-screen-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) !important;
    grid-template-rows: minmax(420px, 1fr) minmax(300px, auto) !important;
    min-height: inherit !important;
  }

  .tower-live-combat-panel .combat-screen-fight-card {
    position: relative !important;
  }

  .tower-live-combat-panel .combat-screen-field-column {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    width: 100%;
  }

  .tower-live-combat-panel .combat-screen-fight-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) !important;
    grid-template-rows: minmax(420px, 1fr) minmax(300px, auto) !important;
    gap: 0.75rem !important;
    min-height: inherit !important;
  }

  .tower-live-combat-panel .combat-stage-shell {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 420px !important;
    height: auto !important;
  }

  .tower-live-combat-panel .combat-screen-hud-dock {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    min-height: 300px;
  }

  .tower-live-combat-panel .combat-screen-feed-dock {
    grid-column: 2;
    grid-row: 2;
    position: absolute;
    inset: auto 0 var(--tower-combat-info-bottom, 0px) auto;
    top: auto;
    z-index: 70;
    width: min(520px, 100%);
    align-self: start;
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    margin-top: 0;
    overflow: hidden;
  }
}

@media (max-width: 1180px) {
  .tower-control-dock {
    grid-template-columns: 1fr;
  }

  .tower-control-dock__tools {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  .tower-control-dock__tools {
    grid-template-columns: 1fr;
  }

  .tower-control-dock .tower-nameplate-panel__titlebar {
    flex-direction: column;
  }

  .tower-control-dock .tower-nameplate-panel__zone {
    text-align: left;
  }
}

.tower-ascent-panel.combat-zone-panel {
  display: block;
  padding: 14px;
  overflow: visible;
  border-color: rgba(214, 169, 79, 0.28);
  background:
    linear-gradient(180deg, rgba(8, 13, 26, 0.82), rgba(3, 7, 15, 0.72)),
    radial-gradient(circle at 50% 0%, rgba(214, 169, 79, 0.1), transparent 38%);
}

.frontier-page-shell {
  width: 100%;
  background: #000;
}

.frontier-page-shell--open {
  min-height: calc(100dvh - 4rem);
}

.frontier-page-shell--locked {
  height: calc(100dvh - 4rem);
  min-height: 0;
  overflow: hidden;
}

main:has(.frontier-page-shell--locked) {
  overflow-y: hidden !important;
}

main:has(.frontier-page-shell--locked) > .relative.z-10 {
  min-height: 0 !important;
  padding-bottom: 0 !important;
}

.frontier-page-shell--locked .frontier-stage-rail {
  height: 100%;
  min-height: 0;
  place-items: center;
  overflow: hidden;
}

.frontier-page-shell--locked .frontier-map-stage {
  width: min(100%, calc(177.777dvh - 7.111rem)) !important;
  max-height: 100%;
  margin-inline: auto;
}

.frontier-stage-rail {
  display: grid;
  gap: 0;
  background: #000;
}

.frontier-map-stage {
  box-shadow:
    inset 0 0 0 1px rgba(217, 184, 129, 0.14),
    0 18px 70px rgba(0, 0, 0, 0.5);
}

.frontier-stage-rail__support {
  min-width: 0;
  padding: 0.85rem clamp(0.85rem, 1.6vw, 1.4rem) 1.4rem;
  border-top: 1px solid rgba(217, 184, 129, 0.14);
  background:
    radial-gradient(circle at 18% 0%, rgba(217, 184, 129, 0.1), transparent 34%),
    radial-gradient(circle at 86% 0%, rgba(88, 116, 161, 0.14), transparent 38%),
    linear-gradient(180deg, rgba(3, 7, 14, 0.98), rgba(2, 5, 11, 1));
}

.frontier-bottom-dock {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
}

.frontier-bottom-dock .combat-zone-panel {
  border-color: rgba(217, 184, 129, 0.18) !important;
  background:
    linear-gradient(180deg, rgba(9, 15, 28, 0.88), rgba(4, 8, 17, 0.84)),
    radial-gradient(circle at 0% 0%, rgba(217, 184, 129, 0.08), transparent 34%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 44px rgba(0, 0, 0, 0.28);
}

.frontier-briefing-panel,
.frontier-socket-panel,
.frontier-command-panel {
  min-width: 0;
}

.frontier-socket-panel .frontier-seal-socket {
  min-height: 96px;
}

.frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress {
  stroke-dasharray: 170;
  animation: frontierRouteDraw 420ms ease-out both;
}

.frontier-command-panel {
  box-shadow:
    inset 0 1px 0 rgba(244, 212, 122, 0.09),
    0 20px 56px rgba(0, 0, 0, 0.34);
}

.frontier-seal-socket {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(244, 212, 122, 0.08), inset 0 -16px 34px rgba(0, 0, 0, 0.22);
}

.frontier-seal-socket::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: -1;
  border: 1px solid rgba(244, 212, 122, 0.16);
  transform: rotate(45deg);
  background: radial-gradient(circle, rgba(244, 212, 122, 0.1), rgba(0, 0, 0, 0));
}

.frontier-seal-socket--filled::before {
  border-color: rgba(244, 212, 122, 0.32);
  background: radial-gradient(circle, rgba(244, 212, 122, 0.16), rgba(0, 0, 0, 0));
}

.frontier-seal-socket--selected {
  animation: frontierSocketFlash 420ms ease-out both;
}

.frontier-stage-rail [data-help],
.spire-tab [data-help],
.spire-status[data-help] {
  overflow: visible;
}

.frontier-stage-rail [data-help]:not(.absolute),
.spire-tab [data-help],
.spire-status[data-help] {
  position: relative;
}

.frontier-stage-rail [data-help]:hover,
.frontier-stage-rail [data-help]:focus-visible,
.spire-tab [data-help]:hover,
.spire-tab [data-help]:focus-visible,
.spire-status[data-help]:hover,
.spire-status[data-help]:focus-visible {
  z-index: 2147483600;
}

.frontier-stage-rail [data-help]::after,
.spire-tab [data-help]::after,
.spire-status[data-help]::after {
  content: attr(data-help);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.5rem);
  z-index: 2147483647;
  width: max-content;
  max-width: 17rem;
  transform: translate(-50%, 0.25rem);
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(217, 184, 129, 0.52);
  border-radius: 0.35rem;
  background:
    linear-gradient(180deg, rgba(10, 14, 25, 0.98), rgba(4, 7, 15, 0.98));
  color: rgba(255, 247, 214, 0.96);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.5);
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  text-transform: none;
  white-space: normal;
  transition: opacity 140ms ease, transform 140ms ease;
}

.frontier-stage-rail [data-help]:hover::after,
.frontier-stage-rail [data-help]:focus-visible::after,
.spire-tab [data-help]:hover::after,
.spire-tab [data-help]:focus-visible::after,
.spire-status[data-help]:hover::after,
.spire-status[data-help]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes frontierRouteDraw {
  from {
    stroke-dashoffset: 170;
    opacity: 0.2;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 0.72;
  }
}

@keyframes frontierSocketFlash {
  0% {
    box-shadow: 0 0 0 0 rgba(244, 212, 122, 0), inset 0 0 0 1px rgba(244, 212, 122, 0.08);
  }
  45% {
    box-shadow: 0 0 28px rgba(244, 212, 122, 0.26), inset 0 0 0 1px rgba(244, 212, 122, 0.24);
  }
  100% {
    box-shadow: 0 0 18px rgba(218, 180, 97, 0.16), inset 0 0 0 1px rgba(244, 212, 122, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress,
  .frontier-seal-socket--selected {
    animation: none;
  }
}

@media (min-width: 1536px) {
  .frontier-bottom-dock {
    grid-template-columns:
      minmax(280px, 0.82fr)
      minmax(420px, 1.08fr)
      minmax(440px, 1.16fr);
  }
}

/* Frontier compact map pass: fit the whole route view and make selected path points readable */
.frontier-page-shell--open {
  height: calc(100dvh - 4rem);
  min-height: 0;
  overflow: hidden;
}

.frontier-page-shell--open .frontier-stage-rail {
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
}

.frontier-page-shell--open .frontier-map-stage {
  width: min(100%, calc((100dvh - 15.8rem) * 1.777));
  max-height: calc(100dvh - 15.8rem);
  margin-inline: auto;
}

.frontier-page-shell--open .frontier-stage-rail__support {
  padding: 0.5rem clamp(0.55rem, 1vw, 0.9rem) 0.65rem;
}

.frontier-page-shell--open .frontier-bottom-dock {
  gap: 0.55rem;
}

.frontier-page-shell--open .frontier-bottom-dock .combat-zone-panel {
  padding: 0.7rem !important;
  border-radius: 0.38rem !important;
}

.frontier-region-plate {
  width: min(340px, calc(100vw - 2rem)) !important;
  padding: 0.8rem 0.9rem !important;
  border-color: rgba(217, 184, 129, 0.38) !important;
  background:
    linear-gradient(110deg, rgba(5, 8, 14, 0.92), rgba(7, 12, 22, 0.72)) !important;
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.46),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035) !important;
}

.frontier-region-plate__eyebrow {
  color: #d6a94f !important;
}

.frontier-region-plate__name {
  font-size: 1.28rem !important;
  line-height: 1.04 !important;
  text-transform: uppercase;
}

.frontier-region-plate__modifier-label {
  color: #d6a94f !important;
}

.frontier-region-plate__modifier-value {
  color: #ff8f4b !important;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.78);
}

.frontier-region-plate__meta span {
  padding: 0.25rem 0.45rem !important;
}

.frontier-map-topbar {
  pointer-events: none;
}

.frontier-map-topbar > * {
  pointer-events: auto;
}

.frontier-map-bottombar {
  justify-content: center;
  padding-bottom: 0.7rem !important;
  padding-top: 0 !important;
  pointer-events: none;
}

.frontier-map-bottombar > * {
  pointer-events: auto;
}

.frontier-region-dock {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  order: -1;
  width: 100%;
  justify-content: center;
}

.frontier-region-dock__list {
  display: inline-flex;
  max-width: min(520px, calc(100vw - 10rem));
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 12, 0.72);
  backdrop-filter: blur(6px);
}

.frontier-region-dock__arrow,
.frontier-region-dock__item {
  min-height: 1.9rem;
  border: 1px solid rgba(217, 184, 129, 0.24);
  background: rgba(4, 9, 17, 0.84);
  color: rgba(239, 231, 208, 0.78);
  font: 900 0.58rem/1 var(--font-ui, var(--font-body, sans-serif));
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.frontier-region-dock__arrow {
  width: 1.9rem;
  border-radius: 999px;
  color: #d9b881;
}

.frontier-region-dock__item {
  min-width: 4.5rem;
  padding: 0 0.72rem;
  border-width: 0 1px 0 0;
}

.frontier-region-dock__item:last-child {
  border-right-width: 0;
}

.frontier-region-dock__item--active {
  background:
    linear-gradient(180deg, rgba(224, 178, 79, 0.96), rgba(146, 91, 32, 0.96));
  color: #07111a;
}

.frontier-region-dock__item--locked {
  color: rgba(148, 163, 184, 0.48);
  opacity: 0.58;
}

.frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-shadow {
  stroke: rgba(0, 0, 0, 0.92) !important;
  stroke-width: 1.12 !important;
  opacity: 0.82 !important;
}

.frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-full {
  stroke: #d9b55e !important;
  stroke-width: 0.26 !important;
  opacity: 0.78 !important;
  filter: drop-shadow(0 0 6px rgba(218, 180, 97, 0.34));
}

.frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress {
  stroke: #ffe08a !important;
  stroke-width: 0.42 !important;
  opacity: 0.92 !important;
  filter: drop-shadow(0 0 9px rgba(255, 224, 138, 0.42));
  stroke-dasharray: 170;
  animation: frontierRouteDraw 420ms ease-out both;
}

.frontier-route-node {
  z-index: 14;
  border: 1px solid rgba(217, 184, 129, 0.62) !important;
  background:
    radial-gradient(circle at 50% 35%, rgba(244, 212, 122, 0.34), rgba(33, 24, 16, 0.94) 62%),
    #070b12 !important;
  color: #f7e6b0 !important;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.42),
    0 0 12px rgba(217, 184, 129, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  opacity: 0.92;
}

.frontier-route-node::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(244, 212, 122, 0.18);
  border-radius: 4px;
  pointer-events: none;
  transform: rotate(45deg);
}

.frontier-route-node::after {
  content: "X";
  position: relative;
  z-index: 2;
  color: rgba(255, 241, 196, 0.86);
  font: 950 0.78rem/1 var(--font-ui, var(--font-body, sans-serif));
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.86);
}

.frontier-route-node > span:not(.frontier-route-node__keep) {
  display: none !important;
}

.frontier-route-node--available {
  border-color: rgba(255, 224, 128, 0.95) !important;
  background:
    radial-gradient(circle at 50% 38%, #ffe28a, #9d6c22 57%, #120b08 100%) !important;
  box-shadow:
    0 0 0 3px rgba(244, 212, 122, 0.12),
    0 0 20px rgba(244, 212, 122, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
}

.frontier-route-node--available::after {
  content: "!";
  color: #1f1407;
  text-shadow: 0 1px 0 rgba(255, 245, 190, 0.34);
}

.frontier-route-node--selected {
  z-index: 22;
  border-color: #fff0a8 !important;
  background:
    radial-gradient(circle at 50% 38%, #fff1a8, #d59b2f 54%, #2b1509 100%) !important;
  box-shadow:
    0 0 0 5px rgba(244, 212, 122, 0.16),
    0 0 34px rgba(255, 226, 128, 0.58),
    inset 0 0 14px rgba(255, 255, 255, 0.24) !important;
}

.frontier-route-node--selected::before {
  inset: 3px;
  border-color: rgba(48, 24, 6, 0.42);
  background: rgba(255, 244, 196, 0.12);
}

.frontier-route-node--selected::after {
  content: "!";
  color: #120a02;
  font-size: 0.9rem;
  text-shadow: 0 1px 0 rgba(255, 245, 190, 0.42);
}

.frontier-route-node--cleared {
  background:
    radial-gradient(circle at 50% 35%, rgba(231, 202, 128, 0.9), rgba(83, 64, 34, 0.95)) !important;
  opacity: 0.84;
}

.frontier-route-node--cleared::after {
  content: "";
  color: #16100a;
}

.frontier-route-node--locked {
  border-color: rgba(176, 185, 202, 0.24) !important;
  background:
    radial-gradient(circle at 50% 35%, rgba(117, 90, 62, 0.36), rgba(12, 17, 25, 0.92) 64%) !important;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  opacity: 0.58;
}

.frontier-route-node--locked::after {
  content: "";
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 999px;
  background: rgba(176, 185, 202, 0.42);
}

.frontier-route-node--boss {
  border: 2px solid rgba(244, 99, 72, 0.82) !important;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 112, 82, 0.52), rgba(67, 13, 12, 0.98) 68%) !important;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(244, 99, 72, 0.36),
    inset 0 0 14px rgba(255, 255, 255, 0.12) !important;
}

.frontier-route-node--boss::before,
.frontier-route-node--boss::after {
  content: none;
}

.frontier-route-node--boss > span {
  display: block !important;
}

.frontier-route-node--boss > span:first-child {
  inset: 5px !important;
  border-radius: 50%;
  filter: contrast(1.08) saturate(0.95) brightness(0.82);
}

.frontier-route-node--boss > span:last-child {
  bottom: -1.15rem !important;
}

/* Frontier marker safety: ASCII symbols and boss portrait visibility win over generic crest rules. */
.frontier-route-node::after {
  content: "X" !important;
}

.frontier-route-node--available::after,
.frontier-route-node--selected::after {
  content: "!" !important;
}

.frontier-route-node--cleared::after {
  content: "" !important;
  width: 0.46rem;
  height: 0.26rem;
  border-left: 2px solid #171008;
  border-bottom: 2px solid #171008;
  transform: rotate(-45deg) translateY(-1px);
}

.frontier-route-node.frontier-route-node--boss::before,
.frontier-route-node.frontier-route-node--boss::after {
  content: none !important;
}

.frontier-route-node--locked::after {
  content: "" !important;
}

.frontier-route-node.frontier-route-node--boss > span {
  display: block !important;
}

@media (min-width: 1260px) {
  .frontier-page-shell--open .frontier-bottom-dock {
    grid-template-columns:
      minmax(240px, 0.78fr)
      minmax(320px, 1fr)
      minmax(320px, 1fr);
  }
}

@media (min-width: 1536px) {
  .frontier-page-shell--open .frontier-map-stage {
    width: min(100%, calc((100dvh - 14.8rem) * 1.777));
    max-height: calc(100dvh - 14.8rem);
  }
}

/* Frontier pass 2: compact active seals and action panel */
.frontier-page-shell--open .frontier-socket-panel {
  order: 1;
}

.frontier-page-shell--open .frontier-briefing-panel {
  order: 2;
}

.frontier-page-shell--open .frontier-command-panel {
  order: 3;
}

.frontier-fight-button {
  min-width: 118px;
  height: 42px;
  padding: 0 1.25rem !important;
  border: 1px solid rgba(255, 232, 153, 0.82) !important;
  border-radius: 6px !important;
  background:
    radial-gradient(circle at 50% -30%, rgba(255, 255, 255, 0.75), transparent 42%),
    linear-gradient(180deg, #f2ca72, #b9792d) !important;
  color: #09111b !important;
  font: 950 0.78rem/1 var(--font-ui, var(--font-body, sans-serif)) !important;
  letter-spacing: 0.12em !important;
  text-shadow: none !important;
  box-shadow:
    0 10px 22px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 247, 208, 0.45) !important;
}

.frontier-fight-button:not(:disabled):hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.frontier-fight-button--disabled,
.frontier-fight-button:disabled {
  border-color: rgba(151, 159, 174, 0.24) !important;
  background:
    linear-gradient(180deg, rgba(52, 59, 70, 0.92), rgba(18, 23, 32, 0.92)) !important;
  color: rgba(220, 225, 235, 0.58) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
  transform: none !important;
}

.frontier-node-title {
  font-size: 1.22rem !important;
  line-height: 1.06 !important;
}

.frontier-node-body {
  margin-top: 0.55rem !important;
  grid-template-columns: 64px minmax(0, 1fr) !important;
  gap: 0.55rem !important;
  align-items: stretch;
}

.frontier-node-art {
  width: 64px !important;
  height: 64px !important;
  border: 1px solid rgba(217, 184, 129, 0.28);
  border-radius: 6px !important;
}

.frontier-node-stats {
  gap: 0.35rem !important;
}

.frontier-node-stats > div {
  padding: 0.42rem 0.45rem !important;
}

.frontier-node-stats > div > div:first-child {
  font-size: 0.48rem !important;
  letter-spacing: 0.13em !important;
}

.frontier-node-stats > div > div:last-child {
  font-size: 0.72rem !important;
}

.frontier-node-reward {
  margin-top: 0.45rem !important;
  padding: 0.48rem 0.55rem !important;
  font-size: 0.68rem !important;
}

.frontier-socket-panel p {
  display: none;
}

.frontier-socket-panel .rounded.border.border-white\/10 {
  padding: 0.42rem 0.55rem !important;
  font-size: 0.72rem !important;
}

.frontier-socket-panel .mt-3.grid {
  margin-top: 0.55rem !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.45rem !important;
}

.frontier-socket-panel .frontier-seal-socket {
  min-height: 58px !important;
  padding: 0.48rem 0.5rem 0.48rem 2rem !important;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  border-radius: 6px !important;
  text-align: left !important;
  background:
    linear-gradient(180deg, rgba(11, 19, 31, 0.88), rgba(4, 8, 16, 0.94)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 0 0 1px rgba(217, 184, 129, 0.06) !important;
}

.frontier-seal-socket::before {
  content: "";
  position: absolute;
  left: 0.55rem;
  top: 50%;
  z-index: 0;
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid rgba(217, 184, 129, 0.52);
  border-radius: 3px;
  background:
    radial-gradient(circle at 50% 35%, rgba(217, 184, 129, 0.55), rgba(38, 26, 13, 0.82));
  transform: translateY(-50%) rotate(45deg);
  box-shadow: 0 0 10px rgba(217, 184, 129, 0.14);
}

.frontier-seal-socket--filled::before {
  border-color: rgba(167, 243, 208, 0.62);
  background:
    radial-gradient(circle at 50% 35%, rgba(132, 204, 22, 0.75), rgba(27, 56, 28, 0.9));
}

.frontier-seal-socket > div {
  position: relative;
  z-index: 1;
}

.frontier-seal-socket > div:first-child {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.74rem !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-seal-socket > div:nth-child(2) {
  margin-top: 0.18rem !important;
  font-size: 0.54rem !important;
  line-height: 1 !important;
}

.frontier-seal-socket > div:nth-child(n + 3) {
  display: none !important;
}

.frontier-seal-socket--selected {
  border-color: rgba(255, 232, 153, 0.78) !important;
  background:
    linear-gradient(180deg, rgba(42, 32, 15, 0.94), rgba(7, 10, 16, 0.95)) !important;
}

@media (max-width: 1179px) {
  .frontier-node-body {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .frontier-node-art {
    display: none;
  }
}

/* Frontier pass 3: compact right-side progress / reward / Bastion rail */
.frontier-command-panel {
  max-height: 13.5rem;
  overflow: auto;
}

.frontier-command-panel > .flex:first-child {
  margin-bottom: 0.45rem;
}

.frontier-command-tabs {
  width: 100%;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.32rem;
  flex: 1 1 auto;
  align-self: stretch;
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

.frontier-command-tabs button {
  min-width: 0;
  padding: 0.38rem 0.42rem !important;
  border: 1px solid rgba(217, 184, 129, 0.16);
  border-radius: 4px !important;
  background: rgba(3, 8, 16, 0.54);
  font-size: 0.54rem !important;
  letter-spacing: 0.08em !important;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.frontier-progress-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.frontier-progress-card {
  min-width: 0;
  padding: 0.55rem 0.6rem;
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 6px;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 184, 129, 0.08), transparent 38%),
    rgba(2, 6, 12, 0.42);
}

.frontier-progress-card--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
}

.frontier-progress-card__label {
  color: rgba(217, 184, 129, 0.86);
  font: 900 0.5rem/1 var(--font-ui, var(--font-body, sans-serif));
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.frontier-region-mastery {
  display: grid;
  gap: 0.42rem;
  margin-top: 0.55rem;
  padding: 0.58rem 0.65rem;
  border: 1px solid rgba(101, 214, 176, 0.22);
  border-radius: 0.4rem;
  background: rgba(16, 83, 67, 0.14);
}

.frontier-region-mastery__label {
  color: rgba(174, 242, 218, 0.82);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.frontier-region-mastery__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.frontier-region-mastery__stats > span {
  padding: 0.3rem 0.48rem;
  border: 1px solid rgba(101, 214, 176, 0.24);
  border-radius: 0.3rem;
  background: rgba(5, 30, 28, 0.62);
  color: rgb(195, 246, 226);
  font-size: 0.72rem;
  font-weight: 800;
}

.frontier-progress-card__value {
  min-width: 0;
  margin-top: 0.22rem;
  overflow: hidden;
  color: var(--color-parchment);
  font: 900 0.86rem/1.05 var(--font-serif, serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-progress-card__note {
  margin-top: 0.25rem;
  overflow: hidden;
  color: rgba(202, 213, 225, 0.78);
  font: 700 0.62rem/1.15 var(--font-ui, var(--font-body, sans-serif));
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-progress-card__track {
  height: 0.42rem;
  margin-top: 0.45rem;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.14);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
}

.frontier-progress-card__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, #9b6d2d, #e2ba62);
  box-shadow: 0 0 10px rgba(217, 184, 129, 0.28);
}

/* Frontier pass 9: final bottom dock compression */
.frontier-page-shell--open .frontier-stage-rail__support {
  padding-top: 0.38rem;
  padding-bottom: 0.48rem;
}

.frontier-page-shell--open .frontier-bottom-dock {
  gap: 0.42rem;
}

.frontier-page-shell--open .frontier-bottom-dock .combat-zone-panel {
  padding: 0.55rem !important;
}

.frontier-briefing-panel > .flex:first-child,
.frontier-socket-panel > .flex:first-child {
  gap: 0.45rem !important;
}

.frontier-briefing-panel .text-\[10px\],
.frontier-socket-panel .text-\[10px\] {
  letter-spacing: 0.16em !important;
}

.frontier-node-title {
  font-size: 1.05rem !important;
}

.frontier-node-body {
  margin-top: 0.42rem !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  gap: 0.45rem !important;
}

.frontier-node-art {
  width: 52px !important;
  height: 52px !important;
}

.frontier-node-stats > div {
  padding: 0.32rem 0.38rem !important;
}

.frontier-node-reward {
  margin-top: 0.32rem !important;
  padding: 0.36rem 0.46rem !important;
}

.frontier-socket-panel .rounded.border.border-white\/10 {
  padding: 0.32rem 0.45rem !important;
}

.frontier-socket-panel .mt-3.grid {
  margin-top: 0.42rem !important;
}

.frontier-socket-panel .frontier-seal-socket {
  min-height: 48px !important;
  padding-top: 0.36rem !important;
  padding-bottom: 0.36rem !important;
}

.frontier-command-panel {
  max-height: 12.25rem;
}

.frontier-command-panel > .flex:first-child {
  margin-bottom: 0.34rem;
}

.frontier-progress-stack {
  gap: 0.34rem;
}

.frontier-progress-card {
  padding: 0.43rem 0.48rem;
}

.frontier-progress-card__value {
  font-size: 0.76rem;
}

.frontier-progress-card__track {
  margin-top: 0.32rem;
}

.frontier-bastion-upgrade {
  min-width: 4.8rem;
  height: 2rem;
  padding-inline: 0.65rem !important;
  border-radius: 5px !important;
}

.frontier-command-tab-body {
  margin-top: 0.5rem;
  padding: 0.55rem 0.6rem !important;
}

/* Frontier pass 15: remove the bad halo and make the page read as one compact map screen. */
.frontier-page-shell--open {
  height: calc(100dvh - 4rem);
  overflow: hidden;
  background: #02050b !important;
}

.frontier-page-shell--open .frontier-stage-rail {
  grid-template-rows: minmax(0, 1fr) 11.8rem;
  background: #02050b;
}

.frontier-page-shell--open .frontier-map-stage {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  margin: 0 !important;
  border-color: rgba(217, 184, 129, 0.2) !important;
  border-radius: 0 !important;
}

.frontier-map-stage > .absolute.inset-0.z-0 {
  background-size: cover !important;
}

.frontier-map-topbar {
  padding: 0.75rem 1rem !important;
}

.frontier-region-plate {
  width: min(320px, 31vw) !important;
  padding: 0.68rem 0.78rem !important;
  border-color: rgba(217, 184, 129, 0.42) !important;
  background:
    linear-gradient(120deg, rgba(3, 7, 14, 0.92), rgba(8, 13, 22, 0.66)) !important;
}

.frontier-region-plate__name {
  font-size: 1.12rem !important;
}

.frontier-region-plate__modifier-value {
  color: #ffb05f !important;
}

.frontier-map-bottombar {
  bottom: 0.18rem;
  padding: 0.25rem 1rem 0.55rem !important;
}

.frontier-region-dock__list {
  max-width: min(500px, 52vw);
  border-radius: 5px;
  background: rgba(2, 6, 12, 0.84);
}

.frontier-region-dock__arrow,
.frontier-region-dock__item {
  min-height: 1.65rem;
  border-color: rgba(217, 184, 129, 0.22);
  border-radius: 4px;
  background: rgba(4, 9, 17, 0.86);
}

.frontier-region-dock__arrow {
  width: 1.75rem;
}

.frontier-region-dock__item {
  min-width: 4.15rem;
  padding: 0 0.55rem;
}

.frontier-region-dock__item--active {
  background:
    linear-gradient(180deg, rgba(218, 180, 97, 0.98), rgba(150, 93, 31, 0.98)) !important;
  color: #060b12 !important;
}

.frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-shadow {
  stroke: rgba(0, 0, 0, 0.9) !important;
  stroke-width: 0.9 !important;
  opacity: 0.78 !important;
  filter: none !important;
}

.frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-full {
  stroke: #846a37 !important;
  stroke-width: 0.23 !important;
  opacity: 0.38 !important;
  filter: drop-shadow(0 0 4px rgba(218, 180, 97, 0.16)) !important;
  stroke-dasharray: none !important;
  animation: none !important;
}

.frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress {
  stroke: #ffe39a !important;
  stroke-width: 0.34 !important;
  opacity: 0.9 !important;
  filter: drop-shadow(0 0 7px rgba(255, 224, 138, 0.36)) !important;
}

.frontier-route-node {
  border-radius: 50% !important;
  border-color: rgba(217, 184, 129, 0.5) !important;
  background:
    radial-gradient(circle at 50% 38%, rgba(222, 188, 107, 0.42), rgba(16, 20, 29, 0.94) 64%) !important;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.48),
    0 0 10px rgba(217, 184, 129, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

.frontier-route-node::before {
  inset: 3px;
  border-radius: 50%;
  transform: none;
}

.frontier-route-node::after {
  content: "" !important;
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 999px;
  background: rgba(234, 210, 145, 0.7);
  box-shadow: 0 0 8px rgba(217, 184, 129, 0.24);
}

.frontier-route-node--locked::after {
  width: 0.24rem;
  height: 0.24rem;
  background: rgba(165, 174, 191, 0.36);
  box-shadow: none;
}

.frontier-route-node--available,
.frontier-route-node--selected {
  border-color: rgba(255, 230, 150, 0.96) !important;
  background:
    radial-gradient(circle at 50% 38%, #ffe59a, #946321 58%, #130b07 100%) !important;
}

.frontier-route-node--available::after,
.frontier-route-node--selected::after {
  content: "" !important;
  width: 0.44rem;
  height: 0.44rem;
  background: #180f05;
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 172, 0.34),
    0 0 10px rgba(255, 224, 138, 0.42);
}

.frontier-route-node--selected {
  transform: scale(1.06) !important;
  box-shadow:
    0 0 0 4px rgba(244, 212, 122, 0.16),
    0 0 24px rgba(255, 226, 128, 0.5),
    inset 0 0 12px rgba(255, 255, 255, 0.2) !important;
}

.frontier-route-node--cleared::after {
  content: "" !important;
  width: 0.42rem;
  height: 0.24rem;
  border-left: 2px solid #171008;
  border-bottom: 2px solid #171008;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: rotate(-45deg) translateY(-1px);
}

.frontier-route-node.frontier-route-node--boss {
  border-color: rgba(245, 116, 85, 0.82) !important;
}

.frontier-route-node.frontier-route-node--boss::before,
.frontier-route-node.frontier-route-node--boss::after {
  content: none !important;
}

.frontier-route-node.frontier-route-node--boss > span {
  display: block !important;
}

.frontier-page-shell--open .frontier-stage-rail__support {
  height: 11.8rem;
  padding: 0.4rem 0.5rem 0.5rem;
  overflow: hidden;
  border-top: 1px solid rgba(217, 184, 129, 0.2);
  background:
    linear-gradient(180deg, rgba(3, 7, 14, 0.94), rgba(2, 5, 10, 0.98)) !important;
}

.frontier-page-shell--open .frontier-bottom-dock {
  height: 100%;
  gap: 0.45rem;
  align-items: stretch;
}

@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-bottom-dock {
    grid-template-columns:
      minmax(250px, 0.82fr)
      minmax(420px, 1.24fr)
      minmax(340px, 1fr) !important;
  }
}

.frontier-page-shell--open .frontier-bottom-dock .combat-zone-panel {
  height: 100%;
  min-height: 0;
  padding: 0.52rem !important;
  overflow: hidden;
  border-color: rgba(217, 184, 129, 0.2) !important;
  background:
    linear-gradient(180deg, rgba(7, 13, 24, 0.9), rgba(3, 7, 14, 0.95)) !important;
}

.frontier-command-panel {
  overflow: auto !important;
}

.frontier-fight-button {
  min-width: 6.7rem;
  height: 2.15rem;
  border-radius: 4px !important;
  background:
    linear-gradient(180deg, #d8ad57, #8b5b22) !important;
  color: #070b12 !important;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 242, 198, 0.36) !important;
}

.frontier-node-title {
  font-size: 1rem !important;
  max-width: 19rem;
}

.frontier-node-body {
  grid-template-columns: 46px minmax(0, 1fr) !important;
}

.frontier-node-art {
  width: 46px !important;
  height: 46px !important;
}

.frontier-node-reward {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.frontier-socket-panel .mt-3.grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.35rem !important;
}

.frontier-socket-panel .frontier-seal-socket {
  min-height: 44px !important;
  padding: 0.35rem 0.42rem 0.35rem 1.65rem !important;
  border-radius: 4px !important;
}

.frontier-seal-socket::before {
  left: 0.48rem;
  width: 0.68rem;
  height: 0.68rem;
  border-radius: 2px;
}

.frontier-seal-socket > div:first-child {
  font-size: 0.66rem !important;
}

.frontier-progress-card {
  border-radius: 4px;
}

.frontier-command-tab-body {
  max-height: 4.3rem;
  overflow: auto;
}

/* Frontier pass 16: turn the lower controls into an overlay HUD instead of a heavy footer. */
.frontier-page-shell--open .frontier-stage-rail {
  position: relative;
  grid-template-rows: minmax(0, 1fr);
}

.frontier-page-shell--open .frontier-stage-rail__support {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.45rem;
  z-index: 35;
  height: 9.35rem;
  padding: 0.38rem;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(3, 7, 14, 0.88), rgba(2, 5, 10, 0.96)) !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(6px);
}

.frontier-map-bottombar {
  bottom: 10rem;
}

.frontier-page-shell--open .frontier-map-stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 4;
  height: 12rem;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.frontier-page-shell--open .frontier-bottom-dock {
  grid-template-columns:
    minmax(320px, 1.14fr)
    minmax(220px, 0.68fr)
    minmax(320px, 1fr) !important;
}

.frontier-page-shell--open .frontier-bottom-dock .combat-zone-panel {
  border-color: rgba(217, 184, 129, 0.16) !important;
  background: rgba(4, 9, 17, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.frontier-briefing-panel,
.frontier-socket-panel,
.frontier-command-panel {
  backdrop-filter: none !important;
}

.frontier-node-body {
  grid-template-columns: 40px minmax(0, 1fr) !important;
  gap: 0.35rem !important;
}

.frontier-node-art {
  width: 40px !important;
  height: 40px !important;
}

.frontier-node-stats {
  gap: 0.28rem !important;
}

.frontier-node-stats > div {
  padding: 0.25rem 0.32rem !important;
}

.frontier-node-reward {
  margin-top: 0.25rem !important;
  padding: 0.28rem 0.36rem !important;
}

.frontier-socket-panel .frontier-seal-socket {
  min-height: 38px !important;
  padding: 0.28rem 0.34rem 0.28rem 1.45rem !important;
}

.frontier-seal-socket::before {
  left: 0.42rem;
  width: 0.56rem;
  height: 0.56rem;
}

.frontier-command-panel {
  max-height: 8.5rem !important;
}

.frontier-progress-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.28rem !important;
}

.frontier-progress-card--wide {
  grid-column: auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.28rem;
}

.frontier-progress-card {
  padding: 0.34rem 0.4rem !important;
}

.frontier-progress-card__value {
  font-size: 0.7rem !important;
}

.frontier-progress-card__note {
  font-size: 0.56rem !important;
}

.frontier-bastion-upgrade {
  width: 100%;
  min-width: 0;
  height: 1.55rem;
}

.frontier-command-tab-body {
  max-height: 2.7rem;
}

@media (max-width: 1179px) {
  .frontier-page-shell--open .frontier-stage-rail {
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .frontier-page-shell--open .frontier-stage-rail__support {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    height: auto;
    border-radius: 0;
  }

  .frontier-page-shell--open .frontier-bottom-dock {
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto;
  }

  .frontier-page-shell--open .frontier-bottom-dock .combat-zone-panel {
    height: auto;
    overflow: visible;
  }

  .frontier-map-bottombar {
    bottom: 0.18rem;
  }

  .frontier-page-shell--open .frontier-map-stage::after {
    height: 4rem;
  }
}

/* Frontier pass 17: clean full-screen composition after the map/HUD rebuild. */
main:has(.frontier-page-shell--open) {
  overflow: hidden !important;
}

main:has(.frontier-page-shell--open) > .relative.z-10 {
  min-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.frontier-page-shell--open {
  height: calc(100dvh - 4rem);
  min-height: 0;
  overflow: hidden;
  background: #02050b !important;
}

.frontier-page-shell--open .frontier-stage-rail {
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  grid-template-rows: minmax(0, 1fr) !important;
}

.frontier-page-shell--open .frontier-map-stage {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: auto !important;
  margin: 0 !important;
  border: 1px solid rgba(217, 184, 129, 0.18) !important;
  border-radius: 0 !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 215, 0.03),
    inset 0 -11rem 8rem rgba(0, 0, 0, 0.5) !important;
}

.frontier-page-shell--open .frontier-map-stage > .absolute.inset-0.z-0 {
  inset: 0 !important;
  background-size: 100% 100% !important;
  background-position: center center !important;
}

.frontier-page-shell--open .frontier-map-topbar {
  padding: 0.85rem 1.05rem !important;
}

.frontier-page-shell--open .frontier-region-plate {
  width: min(360px, 28vw) !important;
  min-width: 270px;
  padding: 0.72rem 0.82rem !important;
  border-radius: 4px !important;
  background:
    linear-gradient(115deg, rgba(3, 7, 14, 0.9), rgba(6, 11, 20, 0.62)) !important;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 244, 215, 0.035) !important;
}

.frontier-page-shell--open .frontier-region-plate__name {
  font-size: 1.08rem !important;
  line-height: 1.08 !important;
}

.frontier-page-shell--open .frontier-region-plate__modifier-value {
  color: #ff9a55 !important;
  line-height: 1.15;
}

.frontier-page-shell--open .frontier-stage-rail__support {
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.55rem;
  height: 8.65rem;
  padding: 0.4rem;
  border-radius: 4px;
  border-color: rgba(217, 184, 129, 0.18);
  background:
    linear-gradient(180deg, rgba(4, 9, 17, 0.76), rgba(2, 5, 10, 0.93)) !important;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.46),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(4px);
}

.frontier-page-shell--open .frontier-bottom-dock {
  height: 100%;
  gap: 0.4rem;
  grid-template-columns:
    minmax(260px, 0.78fr)
    minmax(420px, 1.18fr)
    minmax(330px, 0.98fr) !important;
}

.frontier-page-shell--open .frontier-bottom-dock .combat-zone-panel {
  padding: 0.46rem !important;
  border-radius: 4px !important;
  background:
    linear-gradient(180deg, rgba(7, 13, 24, 0.62), rgba(3, 7, 14, 0.82)) !important;
  border-color: rgba(217, 184, 129, 0.14) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

.frontier-map-bottombar {
  bottom: 9.15rem !important;
  z-index: 42;
  padding: 0 !important;
}

.frontier-region-dock__list {
  max-width: min(480px, 42vw);
  border-radius: 4px;
  background: rgba(3, 7, 14, 0.78);
  backdrop-filter: blur(4px);
}

.frontier-region-dock__arrow,
.frontier-region-dock__item {
  min-height: 1.55rem;
  border-radius: 3px;
}

.frontier-region-dock__item {
  min-width: 3.95rem;
  padding-inline: 0.5rem;
}

.frontier-region-dock__item--active {
  background:
    linear-gradient(180deg, rgba(218, 180, 97, 0.92), rgba(151, 97, 36, 0.92)) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 242, 198, 0.18);
}

.frontier-route-node--selected {
  transform: none !important;
  box-shadow:
    0 0 0 2px rgba(255, 230, 150, 0.22),
    0 0 14px rgba(255, 224, 138, 0.42),
    inset 0 0 10px rgba(255, 255, 255, 0.18) !important;
}

.frontier-stage-rail svg[aria-label="Frontier Route"] path {
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-shadow {
  stroke: rgba(0, 0, 0, 0.9) !important;
  stroke-width: 0.82 !important;
  opacity: 0.7 !important;
}

.frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-full {
  stroke: rgba(217, 184, 129, 0.62) !important;
  stroke-width: 0.26 !important;
  opacity: 0.48 !important;
}

.frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress {
  stroke: #ffe39a !important;
  stroke-width: 0.34 !important;
  stroke-dasharray: 170;
  opacity: 0.9 !important;
  filter: drop-shadow(0 0 7px rgba(255, 224, 138, 0.34)) !important;
  animation: frontierRouteDraw 420ms ease-out both;
}

.frontier-route-node--selected::before {
  background: transparent !important;
  border-color: rgba(255, 232, 160, 0.34) !important;
}

.frontier-route-node--available {
  box-shadow:
    0 0 0 2px rgba(244, 212, 122, 0.1),
    0 0 12px rgba(244, 212, 122, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
}

.frontier-page-shell--open .frontier-route-node {
  border-radius: 999px !important;
  background:
    radial-gradient(circle at 50% 36%, rgba(217, 184, 129, 0.34), rgba(14, 19, 27, 0.94) 68%) !important;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.48),
    0 0 9px rgba(217, 184, 129, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.frontier-page-shell--open .frontier-route-node::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(217, 184, 129, 0.2);
  border-radius: 999px;
  transform: none !important;
  background: transparent !important;
}

.frontier-page-shell--open .frontier-route-node::after {
  content: "" !important;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.34rem;
  height: 0.34rem;
  border: 0;
  border-radius: 999px;
  background: rgba(217, 184, 129, 0.62);
  box-shadow: 0 0 7px rgba(217, 184, 129, 0.22);
  transform: translate(-50%, -50%) !important;
}

.frontier-page-shell--open .frontier-route-node--available,
.frontier-page-shell--open .frontier-route-node--selected {
  border-color: rgba(255, 232, 153, 0.92) !important;
  background:
    radial-gradient(circle at 50% 36%, rgba(255, 226, 138, 0.95), rgba(127, 83, 24, 0.86) 64%, rgba(16, 10, 7, 0.96)) !important;
}

.frontier-page-shell--open .frontier-route-node--available::after,
.frontier-page-shell--open .frontier-route-node--selected::after {
  width: 0.46rem;
  height: 0.46rem;
  background: rgba(28, 17, 6, 0.94);
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 181, 0.34),
    0 0 10px rgba(255, 224, 138, 0.38);
}

.frontier-page-shell--open .frontier-route-node--cleared::after {
  width: 0.42rem;
  height: 0.42rem;
  background: rgba(22, 16, 10, 0.88);
  box-shadow: inset 0 0 0 1px rgba(255, 239, 181, 0.26);
}

.frontier-page-shell--open .frontier-route-node--locked::after {
  width: 0.24rem;
  height: 0.24rem;
  background: rgba(169, 178, 194, 0.36);
  box-shadow: none;
}

.frontier-page-shell--open .frontier-route-node--boss::before,
.frontier-page-shell--open .frontier-route-node--boss::after {
  content: none !important;
}

.frontier-fight-button {
  min-width: 7.2rem;
  height: 2rem;
  border-radius: 4px !important;
}

.frontier-page-shell--open .frontier-fight-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 6.4rem;
  height: 1.95rem;
  padding: 0 0.9rem !important;
  border: 1px solid rgba(255, 212, 128, 0.58) !important;
  border-radius: 4px !important;
  background:
    linear-gradient(180deg, rgba(118, 28, 28, 0.96), rgba(42, 11, 15, 0.98)) !important;
  color: #ffe9b8 !important;
  font-weight: 950 !important;
  letter-spacing: 0.12em !important;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 232, 176, 0.16),
    0 8px 16px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(0, 0, 0, 0.22) !important;
}

.frontier-page-shell--open .frontier-fight-button:not(:disabled):hover {
  border-color: rgba(255, 232, 153, 0.82) !important;
  background:
    linear-gradient(180deg, rgba(148, 38, 34, 0.98), rgba(58, 13, 16, 0.98)) !important;
  filter: brightness(1.04);
}

.frontier-page-shell--open .frontier-fight-button--disabled,
.frontier-page-shell--open .frontier-fight-button:disabled {
  border-color: rgba(151, 159, 174, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(42, 48, 58, 0.84), rgba(14, 18, 25, 0.9)) !important;
  color: rgba(220, 225, 235, 0.58) !important;
  text-shadow: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.frontier-node-title {
  font-size: 0.96rem !important;
  max-width: 18rem;
}

.frontier-node-body {
  margin-top: 0.36rem !important;
  grid-template-columns: 40px minmax(0, 1fr) !important;
}

.frontier-node-art {
  width: 40px !important;
  height: 40px !important;
}

.frontier-node-stats {
  gap: 0.25rem !important;
}

.frontier-node-stats > div {
  padding: 0.22rem 0.3rem !important;
}

.frontier-node-reward {
  margin-top: 0.22rem !important;
  padding: 0.24rem 0.34rem !important;
}

.frontier-socket-panel > .flex:first-child p {
  display: none;
}

.frontier-page-shell--open .frontier-seal-actions {
  flex: 0 0 auto;
}

.frontier-page-shell--open .frontier-seal-rank-action {
  min-height: 1.75rem;
  min-width: 4.9rem;
  padding: 0 0.48rem !important;
  border-radius: 3px !important;
}

.frontier-socket-panel .mt-3.grid {
  margin-top: 0.36rem !important;
}

.frontier-page-shell--open .frontier-socket-panel .frontier-seal-socket {
  min-height: 34px !important;
  padding: 0.24rem 0.32rem 0.24rem 1.36rem !important;
  align-items: flex-start !important;
  justify-content: center !important;
  border-color: rgba(217, 184, 129, 0.16) !important;
  background:
    linear-gradient(180deg, rgba(5, 10, 18, 0.78), rgba(2, 6, 12, 0.88)) !important;
  text-align: left !important;
}

.frontier-page-shell--open .frontier-seal-socket::before {
  left: 0.42rem;
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 2px;
  opacity: 0.9;
}

.frontier-page-shell--open .frontier-seal-socket--filled::before {
  border-color: rgba(217, 184, 129, 0.74);
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 224, 138, 0.75), rgba(85, 58, 20, 0.9));
}

.frontier-page-shell--open .frontier-seal-socket > div:first-child {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  color: var(--color-parchment) !important;
  font-size: 0.62rem !important;
  line-height: 1.05 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-page-shell--open .frontier-seal-socket > div:nth-child(2) {
  margin-top: 0.08rem !important;
  color: rgba(217, 184, 129, 0.88) !important;
  font-size: 0.5rem !important;
  line-height: 1 !important;
}

.frontier-page-shell--open .frontier-seal-socket > div:nth-child(n + 3) {
  display: none !important;
}

.frontier-page-shell--open .frontier-seal-socket--selected {
  border-color: rgba(255, 232, 153, 0.62) !important;
  background:
    linear-gradient(180deg, rgba(42, 31, 13, 0.82), rgba(3, 7, 14, 0.92)) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 242, 198, 0.12),
    0 0 12px rgba(217, 184, 129, 0.16) !important;
}

.frontier-command-panel {
  max-height: 7.95rem !important;
  overflow: hidden !important;
}

.frontier-command-tabs button {
  min-height: 1.5rem;
  padding: 0.28rem 0.34rem !important;
}

.frontier-page-shell--open .frontier-command-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.frontier-progress-stack {
  gap: 0.24rem !important;
}

.frontier-progress-card {
  padding: 0.28rem 0.34rem !important;
}

.frontier-progress-card__value {
  font-size: 0.66rem !important;
}

.frontier-command-tab-body {
  max-height: 2.15rem !important;
}

.frontier-page-shell--open .frontier-command-tab-body {
  margin-top: 0.22rem !important;
  max-height: 2.45rem !important;
  overflow: hidden !important;
}

.frontier-page-shell--open .frontier-command-tab-body--shop {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.18rem !important;
}

.frontier-page-shell--open .frontier-command-note,
.frontier-page-shell--open .frontier-command-offer__desc {
  display: none !important;
}

.frontier-page-shell--open .frontier-command-offer {
  padding: 0.22rem 0.32rem !important;
  border-radius: 3px !important;
}

.frontier-page-shell--open .frontier-command-offer__row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  align-items: center !important;
  gap: 0.16rem !important;
}

.frontier-page-shell--open .frontier-command-offer__row .font-serif {
  overflow: hidden;
  font-size: 0.66rem !important;
  line-height: 1 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-page-shell--open .frontier-command-offer__meta {
  margin-top: 0.12rem !important;
  gap: 0.18rem !important;
  font-size: 0.48rem !important;
  letter-spacing: 0.06em !important;
}

.frontier-page-shell--open .frontier-command-offer__meta span {
  padding: 0.1rem 0.2rem !important;
}

.frontier-page-shell--open .frontier-command-action {
  min-height: 1.28rem;
  width: 100%;
  min-width: 0;
  padding: 0 0.42rem !important;
  border-radius: 3px !important;
}

.frontier-page-shell--open .frontier-command-tab-body--campaign {
  padding: 0.3rem 0.36rem !important;
}

.frontier-page-shell--open .frontier-command-tab-body--campaign .mt-3.grid {
  display: none;
}

@media (max-width: 1179px) {
  main:has(.frontier-page-shell--open) {
    overflow: auto !important;
  }

  .frontier-page-shell--open {
    height: auto;
    min-height: calc(100dvh - 4rem);
    overflow: visible;
  }

  .frontier-page-shell--open .frontier-stage-rail {
    grid-template-rows: minmax(360px, 56dvh) auto !important;
    overflow: visible;
  }

  .frontier-page-shell--open .frontier-stage-rail__support {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    height: auto;
    border-radius: 0;
  }

  .frontier-page-shell--open .frontier-bottom-dock {
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto;
  }

  .frontier-page-shell--open .frontier-bottom-dock .combat-zone-panel {
    height: auto;
    overflow: visible;
  }

  .frontier-map-bottombar {
    bottom: 0.5rem !important;
  }

  .frontier-page-shell--open .frontier-region-plate {
    width: min(340px, calc(100vw - 2rem)) !important;
  }
}

/* Frontier pass 18: repair the open map layout after the cramped full-screen HUD pass. */
@media (min-width: 1180px) {
  main:has(.frontier-page-shell--open) {
    overflow: hidden !important;
  }

  main:has(.frontier-page-shell--open) > .relative.z-10 {
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .frontier-page-shell--open {
    box-sizing: border-box;
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100dvh - 4rem);
    min-height: 0;
    overflow: hidden;
    padding: 0.35rem 0;
    background: #02050b !important;
  }

  .frontier-page-shell--open::before {
    content: "";
    position: absolute;
    inset: -1.25rem;
    z-index: 0;
    background:
      linear-gradient(90deg, rgba(2, 5, 11, 0.72), rgba(2, 5, 11, 0.18) 32%, rgba(2, 5, 11, 0.18) 68%, rgba(2, 5, 11, 0.72)),
      url("frontier/the-frontier-map.webp") center / cover no-repeat;
    filter: blur(10px) brightness(0.46) saturate(0.82);
    pointer-events: none;
    transform: scale(1.03);
  }

  .frontier-page-shell--open .frontier-stage-rail {
    position: relative;
    z-index: 1;
    width: min(100%, calc(177.777dvh - 8.355rem), 1510px);
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: calc(100dvh - 4.7rem);
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
    grid-template-rows: minmax(0, 1fr) !important;
    background: #02050b;
  }

  .frontier-page-shell--open .frontier-map-stage {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 16 / 9 !important;
    margin: 0 !important;
    border: 1px solid rgba(217, 184, 129, 0.2) !important;
    border-radius: 0 !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 244, 215, 0.035),
      0 18px 58px rgba(0, 0, 0, 0.48) !important;
  }

  .frontier-page-shell--open .frontier-map-stage > .absolute.inset-0.z-0 {
    inset: 0 !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
  }

  .frontier-page-shell--open .frontier-map-stage::after {
    height: 13.5rem;
    background:
      linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.42) 54%, rgba(0, 0, 0, 0.84) 100%) !important;
  }

  .frontier-page-shell--open .frontier-map-topbar {
    padding: 0.75rem 0.85rem !important;
  }

  .frontier-page-shell--open .frontier-region-plate {
    width: min(330px, 30vw) !important;
    min-width: 255px;
    padding: 0.72rem 0.78rem !important;
    border-radius: 4px !important;
    background:
      linear-gradient(115deg, rgba(3, 7, 14, 0.88), rgba(6, 11, 20, 0.58)) !important;
    box-shadow:
      0 12px 28px rgba(0, 0, 0, 0.36),
      inset 0 0 0 1px rgba(255, 244, 215, 0.035) !important;
  }

  .frontier-page-shell--open .frontier-region-plate__name {
    font-size: 1.05rem !important;
    line-height: 1.1 !important;
  }

  .frontier-page-shell--open .frontier-region-plate__modifier-value {
    color: #ff9a55 !important;
    line-height: 1.15;
  }

  .frontier-page-shell--open .frontier-stage-rail__support {
    position: absolute;
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.6rem;
    z-index: 45;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
    backdrop-filter: none;
    pointer-events: none;
  }

  .frontier-page-shell--open .frontier-bottom-dock {
    display: grid;
    height: auto;
    grid-template-columns:
      minmax(250px, 0.82fr)
      minmax(410px, 1fr)
      minmax(300px, 0.9fr) !important;
    gap: 0.48rem;
    align-items: end;
    pointer-events: none;
  }

  .frontier-page-shell--open .frontier-bottom-dock .combat-zone-panel {
    width: 100%;
    max-height: 10.25rem;
    overflow: hidden !important;
    padding: 0.58rem !important;
    border-radius: 4px !important;
    border-color: rgba(217, 184, 129, 0.18) !important;
    background:
      linear-gradient(180deg, rgba(5, 10, 19, 0.76), rgba(2, 6, 12, 0.9)) !important;
    box-shadow:
      0 12px 28px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
    pointer-events: auto;
  }

  .frontier-page-shell--open .frontier-socket-panel {
    order: 1;
    max-width: 390px;
    justify-self: start;
  }

  .frontier-page-shell--open .frontier-briefing-panel {
    order: 2;
    max-width: 545px;
    justify-self: center;
  }

  .frontier-page-shell--open .frontier-command-panel {
    order: 3;
    max-width: 470px;
    justify-self: end;
  }

  .frontier-map-bottombar {
    bottom: 11.15rem !important;
    z-index: 50;
    padding: 0 !important;
    pointer-events: none;
  }

  .frontier-region-dock__list {
    max-width: min(410px, 38vw);
    border-radius: 4px;
    background: rgba(3, 7, 14, 0.74);
    backdrop-filter: blur(4px);
  }

  .frontier-region-dock__arrow,
  .frontier-region-dock__item {
    min-height: 1.55rem;
    border-radius: 3px;
  }

  .frontier-region-dock__item {
    min-width: 3.95rem;
    padding-inline: 0.5rem;
  }

  .frontier-region-dock__item--active {
    border-color: rgba(255, 232, 153, 0.58) !important;
    background: rgba(217, 184, 129, 0.18) !important;
    color: #ffe7aa !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 242, 198, 0.08),
      0 0 12px rgba(217, 184, 129, 0.12);
  }

  .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-shadow {
    stroke-width: 0.72 !important;
    opacity: 0.56 !important;
  }

  .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-full {
    stroke: rgba(217, 184, 129, 0.48) !important;
    stroke-width: 0.22 !important;
    opacity: 0.44 !important;
  }

  .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress {
    stroke: rgba(255, 224, 138, 0.9) !important;
    stroke-width: 0.28 !important;
    opacity: 0.82 !important;
    filter: drop-shadow(0 0 5px rgba(255, 224, 138, 0.26)) !important;
  }

  .frontier-page-shell--open .frontier-route-node--available {
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, 0.4),
      0 0 12px rgba(244, 212, 122, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
  }

  .frontier-page-shell--open .frontier-route-node--selected {
    transform: none !important;
    box-shadow:
      0 0 0 2px rgba(255, 230, 150, 0.18),
      0 0 14px rgba(255, 224, 138, 0.34),
      inset 0 0 10px rgba(255, 255, 255, 0.16) !important;
  }

  .frontier-page-shell--open .frontier-route-node--selected::before {
    border-color: rgba(255, 232, 160, 0.24) !important;
    background: transparent !important;
  }

  .frontier-page-shell--open .frontier-route-node--available,
  .frontier-page-shell--open .frontier-route-node--selected {
    border-color: rgba(255, 232, 153, 0.78) !important;
    background:
      radial-gradient(circle at 50% 36%, rgba(255, 226, 138, 0.88), rgba(116, 74, 22, 0.84) 64%, rgba(16, 10, 7, 0.94)) !important;
  }

  .frontier-page-shell--open .frontier-fight-button {
    min-width: 7.1rem;
    height: 2.1rem;
  }

  .frontier-node-title {
    max-width: 20rem;
  }

  .frontier-command-panel {
    max-height: 10.25rem !important;
  }

  .frontier-page-shell--open .frontier-command-tab-body {
    max-height: 3rem !important;
  }
}

/* Frontier pass 19: make kept Seal sockets read as sockets, not cramped text rows. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-socket-panel .mt-3.grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.42rem !important;
  }

  .frontier-page-shell--open .frontier-socket-panel .frontier-seal-socket {
    display: grid !important;
    grid-template-columns: 1.05rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 0.46rem;
    row-gap: 0.08rem;
    min-height: 42px !important;
    padding: 0.42rem 0.5rem 0.38rem 0.55rem !important;
    overflow: hidden;
  }

  .frontier-page-shell--open .frontier-seal-socket::before {
    inset: auto !important;
    left: 0.58rem;
    top: 50%;
    z-index: 0;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 2px;
    transform: translateY(-50%) rotate(45deg);
    opacity: 0.92;
  }

  .frontier-page-shell--open .frontier-seal-socket::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: transparent;
  }

  .frontier-page-shell--open .frontier-seal-socket > div {
    position: relative;
    z-index: 1;
    grid-column: 2;
  }

  .frontier-page-shell--open .frontier-seal-socket > div:first-child {
    align-self: end;
    font-size: 0.68rem !important;
    line-height: 1.02 !important;
  }

  .frontier-page-shell--open .frontier-seal-socket > div:nth-child(2) {
    align-self: start;
    margin-top: 0 !important;
    font-size: 0.52rem !important;
  }

  .frontier-page-shell--open .frontier-seal-socket--selected {
    border-color: rgba(255, 232, 153, 0.72) !important;
    background:
      linear-gradient(180deg, rgba(34, 27, 13, 0.86), rgba(3, 7, 14, 0.9)) !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 242, 198, 0.1),
      0 0 10px rgba(217, 184, 129, 0.12) !important;
  }

  .frontier-page-shell--open .frontier-seal-socket--selected::after {
    background: rgba(255, 224, 138, 0.86);
    box-shadow: 0 0 8px rgba(255, 224, 138, 0.22);
  }
}

/* Frontier pass 20: compact the node briefing and make the combat CTA read cleanly. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-briefing-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.42rem;
  }

  .frontier-page-shell--open .frontier-briefing-panel > .flex:first-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .frontier-page-shell--open .frontier-node-title {
    max-width: 100%;
    font-size: 0.92rem !important;
    line-height: 1.05 !important;
  }

  .frontier-page-shell--open .frontier-node-body {
    margin-top: 0 !important;
    grid-template-columns: 46px minmax(0, 1fr) !important;
    gap: 0.48rem !important;
    min-height: 0;
  }

  .frontier-page-shell--open .frontier-node-art {
    width: 46px !important;
    height: 46px !important;
    border: 1px solid rgba(217, 184, 129, 0.18);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34) !important;
  }

  .frontier-page-shell--open .frontier-node-body > div:last-child {
    display: grid;
    gap: 0.34rem;
    min-width: 0;
  }

  .frontier-page-shell--open .frontier-node-stats {
    gap: 0.28rem !important;
  }

  .frontier-page-shell--open .frontier-node-stats > div {
    min-width: 0;
    padding: 0.24rem 0.36rem !important;
    border-color: rgba(217, 184, 129, 0.18) !important;
    background: rgba(2, 6, 12, 0.58) !important;
  }

  .frontier-page-shell--open .frontier-node-reward {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    margin-top: 0 !important;
    padding: 0.3rem 0.42rem !important;
  }

  .frontier-page-shell--open .frontier-node-reward .mt-1 {
    margin-top: 0 !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .frontier-page-shell--open .frontier-fight-button {
    min-width: 5.9rem;
    height: 2.05rem;
    padding: 0 0.72rem !important;
    border-color: rgba(255, 198, 116, 0.7) !important;
    background:
      linear-gradient(180deg, rgba(132, 30, 29, 0.98), rgba(48, 10, 14, 0.98)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 232, 176, 0.14),
      0 8px 16px rgba(0, 0, 0, 0.34) !important;
  }
}

/* Frontier pass 21: make the command panel a compact progress/control strip. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-command-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0.36rem;
  }

  .frontier-page-shell--open .frontier-command-panel > .flex:first-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .frontier-page-shell--open .frontier-command-panel > .flex:first-child > div:first-child {
    display: block !important;
    min-width: 0;
  }

  .frontier-page-shell--open .frontier-command-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 8.8rem;
    padding: 0.12rem !important;
    border-radius: 3px !important;
  }

  .frontier-page-shell--open .frontier-command-tabs button {
    min-height: 1.42rem;
    padding: 0.16rem 0.42rem !important;
    border-radius: 2px !important;
    letter-spacing: 0.1em !important;
  }

  .frontier-page-shell--open .frontier-progress-stack {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.3rem !important;
  }

  .frontier-page-shell--open .frontier-progress-card {
    min-width: 0;
    padding: 0.32rem 0.4rem !important;
    border-color: rgba(217, 184, 129, 0.16) !important;
    background: rgba(2, 6, 12, 0.56) !important;
  }

  .frontier-page-shell--open .frontier-progress-card--wide {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
  }

  .frontier-page-shell--open .frontier-progress-card__label {
    font-size: 0.5rem !important;
    letter-spacing: 0.12em !important;
  }

  .frontier-page-shell--open .frontier-progress-card__value {
    overflow: hidden;
    font-size: 0.68rem !important;
    line-height: 1.05 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .frontier-page-shell--open .frontier-progress-card__note {
    overflow: hidden;
    font-size: 0.58rem !important;
    line-height: 1.1 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-page-shell--open .frontier-command-action,
  .frontier-page-shell--open .frontier-command-tab-body--campaign button {
    min-height: 1.42rem;
    border-radius: 3px !important;
  }

  .frontier-page-shell--open .frontier-command-tab-body {
    margin-top: 0 !important;
    max-height: 2.75rem !important;
  }
}

/* Frontier pass 22: make region selection readable without loud map highlights. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-region-dock {
    gap: 0.28rem;
  }

  .frontier-page-shell--open .frontier-region-dock__list {
    gap: 0.08rem;
    max-width: min(460px, 40vw);
    padding: 0.14rem;
    border: 1px solid rgba(217, 184, 129, 0.2);
    border-radius: 4px;
    background:
      linear-gradient(180deg, rgba(3, 7, 14, 0.82), rgba(1, 4, 9, 0.86));
    box-shadow:
      0 10px 24px rgba(0, 0, 0, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.035);
  }

  .frontier-page-shell--open .frontier-region-dock__arrow,
  .frontier-page-shell--open .frontier-region-dock__item {
    position: relative;
    min-height: 1.62rem;
    border: 1px solid rgba(217, 184, 129, 0.16);
    border-radius: 3px;
    background: rgba(5, 10, 18, 0.74);
    color: rgba(239, 231, 208, 0.72);
    font-size: 0.55rem;
  }

  .frontier-page-shell--open .frontier-region-dock__arrow {
    width: 1.62rem;
    color: rgba(217, 184, 129, 0.86);
  }

  .frontier-page-shell--open .frontier-region-dock__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 4.25rem;
    padding-inline: 0.48rem 0.58rem;
  }

  .frontier-page-shell--open .frontier-region-dock__item::before {
    content: "";
    flex: 0 0 auto;
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 999px;
    background: rgba(217, 184, 129, 0.45);
    box-shadow: 0 0 6px rgba(217, 184, 129, 0.14);
  }

  .frontier-page-shell--open .frontier-region-dock__item--active {
    border-color: rgba(255, 232, 153, 0.55) !important;
    background:
      linear-gradient(180deg, rgba(49, 37, 16, 0.94), rgba(9, 13, 20, 0.92)) !important;
    color: #ffe8ae !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 242, 198, 0.08),
      0 0 12px rgba(217, 184, 129, 0.12);
  }

  .frontier-page-shell--open .frontier-region-dock__item--active::before {
    background: #ffe08a;
    box-shadow: 0 0 9px rgba(255, 224, 138, 0.42);
  }

  .frontier-page-shell--open .frontier-region-dock__item--active::after {
    content: "";
    position: absolute;
    left: 0.35rem;
    right: 0.35rem;
    bottom: 0.16rem;
    height: 1px;
    background: rgba(255, 224, 138, 0.72);
  }

  .frontier-page-shell--open .frontier-region-dock__item--locked {
    color: rgba(148, 163, 184, 0.38) !important;
    opacity: 0.72;
  }

  .frontier-page-shell--open .frontier-region-dock__item--locked::before {
    background: rgba(148, 163, 184, 0.26);
    box-shadow: none;
  }
}

/* Frontier pass 23: calm the open map composition after the first compact HUD pass. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-stage-rail {
    width: min(calc(100vw - 1rem), calc((100dvh - 4.7rem) * 1.7777), 1540px);
    max-height: calc(100dvh - 4.7rem);
  }

  .frontier-page-shell--open .frontier-map-stage::after {
    height: 11rem;
    background:
      linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.34) 48%, rgba(0, 0, 0, 0.72) 100%) !important;
  }

  .frontier-page-shell--open .frontier-stage-rail__support {
    left: 0.55rem;
    right: 0.55rem;
    bottom: 0.48rem;
  }

  .frontier-page-shell--open .frontier-bottom-dock {
    grid-template-columns:
      minmax(235px, 0.72fr)
      minmax(410px, 1fr)
      minmax(270px, 0.78fr) !important;
    gap: 0.42rem;
  }

  .frontier-page-shell--open .frontier-bottom-dock .combat-zone-panel {
    max-height: 9rem;
    padding: 0.5rem !important;
    background:
      linear-gradient(180deg, rgba(5, 10, 18, 0.68), rgba(2, 6, 12, 0.84)) !important;
    border-color: rgba(217, 184, 129, 0.14) !important;
    box-shadow:
      0 10px 22px rgba(0, 0, 0, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
  }

  .frontier-page-shell--open .frontier-socket-panel p {
    display: none !important;
  }

  .frontier-map-bottombar {
    bottom: 9.65rem !important;
  }

  .frontier-page-shell--open .frontier-region-dock__list {
    max-width: min(400px, 34vw);
  }

  .frontier-page-shell--open .frontier-route-node--selected {
    border-color: rgba(255, 232, 153, 0.86) !important;
    box-shadow:
      0 0 0 2px rgba(255, 230, 150, 0.18),
      0 0 12px rgba(255, 224, 138, 0.24),
      inset 0 0 8px rgba(255, 255, 255, 0.14) !important;
  }

  .frontier-page-shell--open .frontier-route-node--selected::before {
    display: none !important;
  }

  .frontier-page-shell--open .frontier-route-node--available,
  .frontier-page-shell--open .frontier-route-node--selected {
    background:
      radial-gradient(circle at 50% 38%, rgba(255, 226, 138, 0.82), rgba(108, 73, 28, 0.82) 62%, rgba(14, 10, 8, 0.96)) !important;
  }

  .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress {
    filter: drop-shadow(0 0 3px rgba(255, 224, 138, 0.22)) !important;
  }
}

/* Frontier pass 24: make the bottom controls read like compact game HUD controls. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-bottom-dock {
    grid-template-columns:
      minmax(220px, 0.66fr)
      minmax(390px, 0.95fr)
      minmax(260px, 0.72fr) !important;
    gap: 0.36rem;
  }

  .frontier-page-shell--open .frontier-bottom-dock .combat-zone-panel {
    max-height: 8.15rem;
    padding: 0.46rem !important;
    background:
      linear-gradient(180deg, rgba(5, 10, 18, 0.58), rgba(2, 6, 12, 0.78)) !important;
    backdrop-filter: blur(7px);
  }

  .frontier-map-bottombar {
    bottom: 8.8rem !important;
  }

  .frontier-page-shell--open .frontier-node-title {
    font-size: 0.84rem !important;
  }

  .frontier-page-shell--open .frontier-node-body {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 0.38rem !important;
  }

  .frontier-page-shell--open .frontier-node-art {
    width: 40px !important;
    height: 40px !important;
    border-radius: 3px !important;
  }

  .frontier-page-shell--open .frontier-fight-button {
    min-width: 6.4rem;
    height: 1.9rem;
    border: 1px solid rgba(255, 219, 143, 0.72) !important;
    border-radius: 3px !important;
    background:
      linear-gradient(180deg, rgba(159, 43, 38, 0.98), rgba(71, 13, 18, 0.98)) !important;
    color: #fff1c0 !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.1em !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 236, 188, 0.2),
      0 0 0 1px rgba(0, 0, 0, 0.34),
      0 8px 16px rgba(0, 0, 0, 0.32) !important;
  }

  .frontier-page-shell--open .frontier-fight-button:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgba(255, 236, 188, 0.24),
      0 0 12px rgba(255, 103, 84, 0.24),
      0 10px 18px rgba(0, 0, 0, 0.36) !important;
  }

  .frontier-page-shell--open .frontier-socket-panel {
    max-width: 335px;
  }

  .frontier-page-shell--open .frontier-socket-panel .flex:first-child {
    align-items: center !important;
    gap: 0.5rem !important;
  }

  .frontier-page-shell--open .frontier-seal-actions > div:first-child {
    padding: 0.32rem 0.5rem !important;
    font-size: 0.62rem !important;
  }

  .frontier-page-shell--open .frontier-seal-rank-action {
    min-height: 1.55rem;
    padding: 0 0.52rem !important;
    border-radius: 3px !important;
    font-size: 0.56rem !important;
  }

  .frontier-page-shell--open .frontier-socket-panel .mt-3.grid {
    margin-top: 0.42rem !important;
    gap: 0.3rem !important;
  }

  .frontier-page-shell--open .frontier-socket-panel .frontier-seal-socket {
    grid-template-columns: 0.78rem minmax(0, 1fr);
    min-height: 34px !important;
    padding: 0.32rem 0.38rem 0.3rem 0.45rem !important;
    text-align: left !important;
  }

  .frontier-page-shell--open .frontier-seal-socket::before {
    left: 0.45rem;
    width: 0.5rem;
    height: 0.5rem;
  }

  .frontier-page-shell--open .frontier-seal-socket > div:first-child {
    overflow: hidden;
    font-size: 0.58rem !important;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .frontier-page-shell--open .frontier-seal-socket > div:nth-child(2) {
    font-size: 0.45rem !important;
    letter-spacing: 0.08em !important;
  }

  .frontier-page-shell--open .frontier-seal-socket > div:nth-child(n + 3) {
    display: none !important;
  }
}

/* Frontier pass 25: move selected-region emphasis into the card and dock, not the map halo. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-region-plate {
    position: relative;
    width: min(315px, 28vw) !important;
    min-width: 250px;
    padding: 0.66rem 0.74rem 0.68rem 0.9rem !important;
    border-color: rgba(255, 224, 138, 0.34) !important;
    background:
      linear-gradient(90deg, rgba(255, 138, 70, 0.1), transparent 1.9rem),
      linear-gradient(115deg, rgba(3, 7, 14, 0.9), rgba(6, 11, 20, 0.62)) !important;
  }

  .frontier-page-shell--open .frontier-region-plate::before {
    content: "";
    position: absolute;
    left: 0.42rem;
    top: 0.68rem;
    bottom: 0.68rem;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffe08a, #ff7b38);
    box-shadow: 0 0 9px rgba(255, 132, 64, 0.28);
  }

  .frontier-page-shell--open .frontier-region-plate__eyebrow,
  .frontier-page-shell--open .frontier-region-plate__modifier-label {
    color: rgba(255, 224, 138, 0.82) !important;
  }

  .frontier-page-shell--open .frontier-region-plate__modifier-value {
    color: #ff9f5f !important;
    font-size: 0.78rem !important;
  }

  .frontier-page-shell--open .frontier-region-plate__meta span {
    border-color: rgba(255, 224, 138, 0.18) !important;
    background: rgba(0, 0, 0, 0.34) !important;
    color: rgba(255, 242, 204, 0.78) !important;
  }

  .frontier-page-shell--open .frontier-region-dock__item--active {
    border-color: rgba(255, 224, 138, 0.72) !important;
    background:
      linear-gradient(180deg, rgba(73, 47, 18, 0.92), rgba(14, 14, 19, 0.94)) !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 242, 198, 0.1),
      0 0 10px rgba(255, 180, 88, 0.14) !important;
  }

  .frontier-page-shell--open .frontier-region-dock__item--active::after {
    left: 0.48rem;
    right: 0.48rem;
    bottom: 0.22rem;
    background: rgba(255, 150, 82, 0.86);
  }

  .frontier-page-shell--open .frontier-route-node {
    border-width: 1px !important;
  }

  .frontier-page-shell--open .frontier-route-node--selected {
    border-width: 1px !important;
    box-shadow:
      0 0 0 2px rgba(255, 230, 150, 0.14),
      0 0 10px rgba(255, 224, 138, 0.2),
      inset 0 0 7px rgba(255, 255, 255, 0.12) !important;
  }
}

/* Frontier pass 26: tighten the command panel into a HUD control cluster. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-command-panel {
    max-width: 405px;
    gap: 0.26rem;
  }

  .frontier-page-shell--open .frontier-command-panel > .flex:first-child {
    grid-template-columns: auto minmax(9rem, 1fr) !important;
    gap: 0.42rem !important;
  }

  .frontier-page-shell--open .frontier-command-panel > .flex:first-child > div:first-child {
    align-self: center;
  }

  .frontier-page-shell--open .frontier-command-tabs {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    padding: 0.1rem !important;
    background: rgba(0, 0, 0, 0.28) !important;
  }

  .frontier-page-shell--open .frontier-command-tabs button {
    min-height: 1.34rem;
    padding: 0.12rem 0.34rem !important;
    font-size: 0.52rem !important;
  }

  .frontier-page-shell--open .frontier-progress-stack {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 0.24rem !important;
  }

  .frontier-page-shell--open .frontier-progress-card {
    padding: 0.24rem 0.34rem !important;
    background: rgba(0, 0, 0, 0.28) !important;
  }

  .frontier-page-shell--open .frontier-progress-card--wide {
    padding-block: 0.26rem !important;
  }

  .frontier-page-shell--open .frontier-progress-card__label {
    font-size: 0.46rem !important;
  }

  .frontier-page-shell--open .frontier-progress-card__value {
    font-size: 0.62rem !important;
  }

  .frontier-page-shell--open .frontier-command-note,
  .frontier-page-shell--open .frontier-command-offer__desc {
    display: none !important;
  }

  .frontier-page-shell--open .frontier-command-tab-body {
    max-height: 2.35rem !important;
    overflow: hidden !important;
  }

  .frontier-page-shell--open .frontier-command-offer,
  .frontier-page-shell--open .frontier-command-tab-body--campaign {
    padding: 0.34rem !important;
  }

  .frontier-page-shell--open .frontier-command-offer__row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center !important;
    gap: 0.38rem !important;
  }

  .frontier-page-shell--open .frontier-command-offer__meta {
    margin-top: 0.18rem !important;
    gap: 0.22rem !important;
  }

  .frontier-page-shell--open .frontier-command-offer__meta span {
    padding: 0.18rem 0.34rem !important;
    font-size: 0.48rem !important;
  }

  .frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-page-shell--open .frontier-command-action,
  .frontier-page-shell--open .frontier-command-tab-body--campaign button {
    min-height: 1.32rem;
    padding-inline: 0.48rem !important;
    font-size: 0.52rem !important;
  }
}

/* Frontier pass 27: make the node briefing read as a compact encounter strip. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-briefing-panel {
    max-width: 455px;
    gap: 0.26rem;
  }

  .frontier-page-shell--open .frontier-briefing-panel > .flex:first-child {
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 0.38rem !important;
    padding-bottom: 0.22rem;
    border-bottom: 1px solid rgba(217, 184, 129, 0.12);
  }

  .frontier-page-shell--open .frontier-briefing-panel > .flex:first-child > div:first-child {
    display: grid;
    gap: 0.04rem;
  }

  .frontier-page-shell--open .frontier-briefing-panel > .flex:first-child > div:first-child > div:last-child {
    margin-top: 0 !important;
    font-size: 0.56rem !important;
    color: rgba(218, 226, 238, 0.72) !important;
  }

  .frontier-page-shell--open .frontier-node-title {
    margin-top: 0.04rem !important;
    font-size: 0.78rem !important;
    line-height: 1.02 !important;
  }

  .frontier-page-shell--open .frontier-node-body {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    align-items: center;
    gap: 0.32rem !important;
  }

  .frontier-page-shell--open .frontier-node-art {
    width: 34px !important;
    height: 34px !important;
    border-color: rgba(217, 184, 129, 0.14);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28) !important;
  }

  .frontier-page-shell--open .frontier-node-body > div:last-child {
    gap: 0.22rem;
  }

  .frontier-page-shell--open .frontier-node-stats {
    gap: 0.2rem !important;
  }

  .frontier-page-shell--open .frontier-node-stats > div {
    padding: 0.18rem 0.28rem !important;
    background: rgba(0, 0, 0, 0.26) !important;
  }

  .frontier-page-shell--open .frontier-node-stats > div > div:first-child {
    font-size: 0.46rem !important;
    letter-spacing: 0.1em !important;
  }

  .frontier-page-shell--open .frontier-node-stats > div > div:last-child {
    font-size: 0.62rem !important;
  }

  .frontier-page-shell--open .frontier-node-reward {
    padding: 0.22rem 0.32rem !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    background: rgba(0, 0, 0, 0.2) !important;
    font-size: 0.58rem !important;
  }

  .frontier-page-shell--open .frontier-node-reward > div:first-child {
    font-size: 0.52rem !important;
  }
}

/* Frontier pass 28: make the region selector feel like a compact map pager. */
@media (min-width: 1180px) {
  .frontier-map-bottombar {
    justify-content: center;
    padding-inline: 0 !important;
  }

  .frontier-page-shell--open .frontier-region-dock {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
    padding: 0.12rem;
    border: 1px solid rgba(217, 184, 129, 0.16);
    border-radius: 4px;
    background: rgba(2, 5, 11, 0.62);
    box-shadow:
      0 8px 18px rgba(0, 0, 0, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(6px);
  }

  .frontier-page-shell--open .frontier-region-dock__list {
    max-width: min(360px, 30vw);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .frontier-page-shell--open .frontier-region-dock__arrow,
  .frontier-page-shell--open .frontier-region-dock__item {
    min-height: 1.38rem;
    border-radius: 2px;
    background: rgba(4, 9, 17, 0.76);
  }

  .frontier-page-shell--open .frontier-region-dock__arrow {
    width: 1.38rem;
    padding: 0;
    font-size: 0.82rem;
    line-height: 1;
  }

  .frontier-page-shell--open .frontier-region-dock__item {
    min-width: 3.65rem;
    padding-inline: 0.38rem 0.46rem;
    font-size: 0.5rem;
    letter-spacing: 0.1em;
  }

  .frontier-page-shell--open .frontier-region-dock__item::before {
    width: 0.28rem;
    height: 0.28rem;
  }

  .frontier-page-shell--open .frontier-region-dock__item--active::after {
    left: 0.42rem;
    right: 0.42rem;
    bottom: 0.16rem;
    height: 1px;
  }
}

/* Frontier pass 29: make region pager arrows read as icon controls. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-region-dock__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.08rem;
    font-weight: 700;
    color: rgba(255, 224, 138, 0.9);
    text-shadow: 0 0 8px rgba(255, 180, 88, 0.22);
  }

  .frontier-page-shell--open .frontier-region-dock__arrow:hover {
    border-color: rgba(255, 224, 138, 0.42);
    background: rgba(50, 34, 15, 0.78);
  }

  .frontier-page-shell--open .frontier-region-dock__arrow:disabled,
  .frontier-page-shell--open .frontier-region-dock__arrow:disabled:hover {
    cursor: default;
    opacity: 0.35;
    border-color: rgba(217, 184, 129, 0.16);
    background: rgba(5, 10, 18, 0.74);
    color: rgba(217, 184, 129, 0.52);
    text-shadow: none;
  }
}

/* Frontier pass 30: match compact region labels to compact pager pills. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-region-dock__list {
    max-width: min(260px, 24vw);
  }

  .frontier-page-shell--open .frontier-region-dock__item {
    min-width: 2.42rem;
    padding-inline: 0.34rem;
    justify-content: center;
  }
}

/* Frontier pass 31: remove legacy pseudo-symbol clutter from open map pips. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss)::before,
  .frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss)::after {
    content: none !important;
    display: none !important;
  }

  .frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) > span:not(.frontier-route-node__keep) {
    display: block !important;
  }

  .frontier-page-shell--open .frontier-route-node--cleared:not(.frontier-route-node--boss) > span {
    color: #171008 !important;
    font-size: 0.58rem !important;
    line-height: 1;
  }

  .frontier-page-shell--open .frontier-route-node--locked:not(.frontier-route-node--boss) > span {
    width: 0.28rem !important;
    height: 0.28rem !important;
    background: rgba(169, 178, 194, 0.36) !important;
    box-shadow: none !important;
  }

  .frontier-page-shell--open .frontier-route-node--available:not(.frontier-route-node--boss) > span,
  .frontier-page-shell--open .frontier-route-node--selected:not(.frontier-route-node--boss) > span {
    width: 0.42rem !important;
    height: 0.42rem !important;
    background: rgba(28, 17, 6, 0.94) !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 239, 181, 0.34),
      0 0 8px rgba(255, 224, 138, 0.28) !important;
  }
}

/* Frontier pass 32: quiet the route line so it sits inside the map art. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-shadow {
    stroke: rgba(0, 0, 0, 0.58) !important;
    stroke-width: 0.38 !important;
    opacity: 0.34 !important;
  }

  .frontier-page-shell--open .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-full {
    stroke: rgba(180, 148, 85, 0.46) !important;
    stroke-width: 0.15 !important;
    opacity: 0.46 !important;
    filter: none !important;
  }

  .frontier-page-shell--open .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress {
    stroke: rgba(255, 224, 138, 0.78) !important;
    stroke-width: 0.18 !important;
    opacity: 0.7 !important;
    filter: drop-shadow(0 0 2px rgba(255, 224, 138, 0.18)) !important;
  }
}

/* Frontier pass 33: tighten the boss endpoint marker. */
@media (min-width: 1180px) {
  .frontier-page-shell--open .frontier-route-node--boss {
    border-width: 1px !important;
    border-color: rgba(255, 118, 88, 0.7) !important;
    background:
      radial-gradient(circle at 50% 38%, rgba(168, 47, 35, 0.92), rgba(33, 10, 12, 0.96) 68%) !important;
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, 0.44),
      0 0 12px rgba(244, 99, 72, 0.24),
      inset 0 0 9px rgba(255, 255, 255, 0.1) !important;
  }

  .frontier-page-shell--open .frontier-route-node--boss > span:first-child {
    inset: 4px !important;
    opacity: 0.82 !important;
    filter: contrast(1.03) saturate(0.9) brightness(0.78);
  }

  .frontier-page-shell--open .frontier-route-node--boss > span:last-child {
    bottom: -0.92rem !important;
    padding: 0.08rem 0.32rem !important;
    border-color: rgba(255, 160, 116, 0.28) !important;
    background: rgba(8, 4, 5, 0.78) !important;
    color: rgba(255, 202, 151, 0.9) !important;
    font-size: 0.46rem !important;
    letter-spacing: 0.08em !important;
  }
}

/* Frontier pass 34: code-drawn expedition board and large medallion nodes. */
.frontier-region-expedition.frontier-page-shell--open {
  --frontier-region-bg-size: cover;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--frontier-region-accent) 16%, transparent), transparent 43%),
    linear-gradient(135deg, rgba(7, 15, 25, 0.98), rgba(2, 5, 10, 0.98));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-map-art--atmosphere {
  opacity: 0.06;
  filter: saturate(1.15) contrast(0.82) brightness(0.76) blur(1.2px) !important;
  transform: scale(1.015);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-svg {
  inset: 7% 4.5% 12%;
  z-index: 7;
  overflow: visible;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-base {
  fill: rgba(3, 8, 15, 0.84);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-plate {
  stroke: color-mix(in srgb, var(--frontier-region-accent) 34%, rgba(217, 184, 129, 0.26));
  stroke-width: 0.18;
  vector-effect: non-scaling-stroke;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-plate--outer {
  fill: color-mix(in srgb, var(--frontier-region-accent) 12%, rgba(9, 18, 27, 0.88));
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.42));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-plate--inner {
  fill: color-mix(in srgb, var(--frontier-region-accent) 20%, rgba(10, 20, 31, 0.82));
  opacity: 0.72;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-plate--stronghold {
  fill: color-mix(in srgb, var(--frontier-region-accent) 28%, rgba(29, 19, 16, 0.86));
  opacity: 0.78;
  stroke-width: 0.24;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif {
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--frost-water,
.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--tide-pool {
  fill: rgba(22, 77, 113, 0.36);
  stroke: rgba(122, 207, 244, 0.5);
  stroke-width: 0.28;
  filter: drop-shadow(0 0 12px rgba(96, 177, 232, 0.18));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--moon-well,
.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--star-sigil {
  fill: rgba(116, 199, 238, 0.16);
  stroke: rgba(184, 230, 255, 0.62);
  stroke-width: 0.42;
  filter: drop-shadow(0 0 14px rgba(120, 194, 245, 0.36));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--deadwood {
  stroke: rgba(91, 112, 123, 0.7);
  stroke-width: 0.52;
  opacity: 0.72;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--root-ring {
  fill: rgba(42, 79, 40, 0.32);
  stroke: rgba(144, 188, 109, 0.56);
  stroke-width: 0.34;
  filter: drop-shadow(0 0 12px rgba(121, 176, 80, 0.2));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--root-line {
  stroke: rgba(135, 178, 98, 0.7);
  stroke-width: 1.02;
  opacity: 0.72;
  filter: drop-shadow(0 0 10px rgba(104, 164, 71, 0.22));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--earth-ward {
  fill: rgba(102, 150, 74, 0.16);
  stroke: rgba(194, 226, 137, 0.58);
  stroke-width: 0.48;
  filter: drop-shadow(0 0 15px rgba(142, 205, 92, 0.3));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--ash-field {
  fill: rgba(107, 60, 38, 0.34);
  stroke: rgba(229, 138, 72, 0.42);
  stroke-width: 0.3;
  filter: drop-shadow(0 0 10px rgba(218, 91, 40, 0.16));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--glass-shard {
  fill: rgba(231, 154, 86, 0.12);
  stroke: rgba(255, 188, 109, 0.7);
  stroke-width: 0.46;
  filter: drop-shadow(0 0 12px rgba(242, 133, 50, 0.32));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--ember-crack,
.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--lava-crack {
  stroke: rgba(255, 112, 47, 0.76);
  stroke-width: 0.72;
  filter: drop-shadow(0 0 12px rgba(255, 83, 30, 0.44));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--star-current {
  stroke: rgba(105, 219, 225, 0.72);
  stroke-width: 0.72;
  opacity: 0.78;
  filter: drop-shadow(0 0 12px rgba(75, 190, 210, 0.34));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--lava-shelf {
  fill: rgba(120, 41, 28, 0.34);
  stroke: rgba(239, 109, 55, 0.54);
  stroke-width: 0.34;
  filter: drop-shadow(0 0 12px rgba(222, 74, 29, 0.22));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--aerie-spike {
  fill: rgba(196, 72, 38, 0.2);
  stroke: rgba(255, 153, 78, 0.68);
  stroke-width: 0.38;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--null-rift {
  fill: rgba(70, 39, 120, 0.3);
  stroke: rgba(190, 153, 255, 0.54);
  stroke-width: 0.36;
  filter: drop-shadow(0 0 14px rgba(142, 92, 230, 0.28));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--void-line {
  stroke: rgba(176, 126, 255, 0.72);
  stroke-width: 0.72;
  filter: drop-shadow(0 0 14px rgba(147, 86, 235, 0.36));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-motif--crownless-core {
  fill: rgba(127, 83, 202, 0.18);
  stroke: rgba(222, 194, 255, 0.62);
  stroke-width: 0.5;
  filter: drop-shadow(0 0 16px rgba(164, 103, 255, 0.42));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-road--shadow {
  stroke: rgba(0, 0, 0, 0.56);
  stroke-width: 7.4;
  filter: blur(0.08px);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-road--main {
  stroke: color-mix(in srgb, var(--frontier-region-accent) 46%, rgba(214, 169, 79, 0.82));
  stroke-width: 4.7;
  opacity: 0.62;
  filter: drop-shadow(0 0 12px var(--frontier-region-glow));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-boss-gate {
  fill: color-mix(in srgb, var(--frontier-region-accent) 36%, rgba(87, 14, 16, 0.82));
  stroke: rgba(255, 223, 145, 0.72);
  stroke-width: 0.34;
  filter: drop-shadow(0 0 16px rgba(244, 99, 72, 0.42));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-board-boss-gate-core {
  fill: rgba(255, 229, 166, 0.88);
  filter: drop-shadow(0 0 10px rgba(255, 210, 117, 0.52));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
  inset: 7% 4.5% 12%;
  z-index: 13;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-shadow {
  stroke-width: 1.15 !important;
  opacity: 0.42 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-full {
  stroke-width: 0.46 !important;
  opacity: 0.66 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress {
  stroke-width: 0.72 !important;
  opacity: 0.95 !important;
  filter: drop-shadow(0 0 8px rgba(255, 224, 138, 0.42)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
  z-index: 16;
  overflow: visible;
  transform: scale(1);
  transform-origin: center;
  border-radius: 999px;
  cursor: pointer;
  isolation: isolate;
  backdrop-filter: blur(3px);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node:hover,
.frontier-region-expedition.frontier-page-shell--open .frontier-route-node:focus-visible {
  transform: scale(1.18);
  outline: 0;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.5),
    0 0 0 8px color-mix(in srgb, var(--frontier-region-accent) 32%, transparent),
    0 0 36px color-mix(in srgb, var(--frontier-region-accent) 72%, rgba(255, 224, 138, 0.4)),
    inset 0 0 16px rgba(255, 255, 255, 0.2) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
  outline: 0;
  transform: scale(1.08);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--locked {
  opacity: 0.74;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) > .frontier-route-node__pip,
.frontier-region-expedition.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) > .frontier-route-node__mark {
  display: flex !important;
  width: 1.55rem !important;
  height: 1.55rem !important;
  min-width: 1.55rem !important;
  min-height: 1.55rem !important;
  border-radius: 999px;
  background:
    radial-gradient(circle at 42% 32%, rgba(255, 255, 255, 0.8), transparent 0.25rem),
    radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--frontier-region-accent) 78%, #f4d47a), rgba(31, 20, 8, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 199, 0.44),
    0 0 16px var(--frontier-region-glow) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) > .frontier-route-node__pip--locked {
  width: 1.12rem !important;
  height: 1.12rem !important;
  min-width: 1.12rem !important;
  min-height: 1.12rem !important;
  background:
    radial-gradient(circle at 42% 32%, rgba(230, 236, 248, 0.35), transparent 0.18rem),
    radial-gradient(circle, rgba(111, 122, 142, 0.62), rgba(16, 21, 31, 0.92));
  box-shadow: inset 0 0 0 1px rgba(222, 230, 242, 0.14) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__mark {
  color: #07110b !important;
  font-size: 1.05rem !important;
  font-weight: 950;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__number {
  top: -1.62rem;
  min-width: 1.75rem !important;
  height: 1.24rem !important;
  border-radius: 999px;
  border-color: color-mix(in srgb, var(--frontier-region-accent) 50%, rgba(217, 184, 129, 0.4));
  background: rgba(3, 7, 13, 0.9) !important;
  color: #fff4c7 !important;
  font-size: 0.66rem !important;
  box-shadow:
    0 7px 16px rgba(0, 0, 0, 0.58),
    0 0 14px var(--frontier-region-glow);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected .frontier-route-node__number {
  top: -1.82rem;
  min-width: 2rem !important;
  height: 1.36rem !important;
  color: #080f18 !important;
  background: linear-gradient(180deg, #fff0ad, var(--frontier-region-accent)) !important;
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.52),
    0 0 24px var(--frontier-region-glow);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__portrait {
  inset: 8px !important;
  opacity: 0.92;
  filter: saturate(1.08) contrast(1.08) brightness(0.96);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__boss-label {
  bottom: -1.32rem !important;
  padding: 0.14rem 0.48rem !important;
  border-color: rgba(255, 198, 128, 0.42) !important;
  background: rgba(8, 4, 5, 0.86) !important;
  color: rgba(255, 220, 162, 0.95) !important;
  font-size: 0.54rem !important;
}

/* Frontier pass 35: put route numbers inside the board medallions. */
.frontier-region-expedition.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) .frontier-route-node__number {
  top: 50% !important;
  left: 50%;
  width: auto !important;
  min-width: 1.25rem !important;
  height: 1.25rem !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  color: rgba(255, 244, 199, 0.96) !important;
  font-size: 0.72rem !important;
  font-weight: 950;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.92),
    0 0 8px rgba(255, 224, 138, 0.42);
  transform: translate(-50%, -50%);
  box-shadow: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--available:not(.frontier-route-node--boss) .frontier-route-node__number,
.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected:not(.frontier-route-node--boss) .frontier-route-node__number {
  color: #1a1004 !important;
  text-shadow:
    0 1px 0 rgba(255, 244, 199, 0.36),
    0 0 9px rgba(255, 244, 199, 0.5);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected:not(.frontier-route-node--boss) .frontier-route-node__number {
  min-width: 1.46rem !important;
  height: 1.46rem !important;
  font-size: 0.8rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--locked:not(.frontier-route-node--boss) .frontier-route-node__number {
  color: rgba(222, 230, 242, 0.72) !important;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.92),
    0 0 7px rgba(180, 190, 210, 0.18);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared:not(.frontier-route-node--boss) .frontier-route-node__number {
  top: auto !important;
  bottom: -1.35rem !important;
  min-width: 1.4rem !important;
  height: 1.05rem !important;
  border: 1px solid rgba(113, 211, 154, 0.38) !important;
  background: rgba(3, 12, 9, 0.86) !important;
  color: rgba(177, 245, 204, 0.94) !important;
  font-size: 0.56rem !important;
  transform: translateX(-50%);
}

/* Frontier pass 36: force the selected-region right rail into one tidy column. */
.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail__support {
  overflow: hidden !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(186px, 0.62fr) minmax(300px, 1fr) minmax(128px, 0.42fr) !important;
  align-items: stretch;
  gap: 7px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  grid-column: 1 !important;
  justify-self: stretch !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
  grid-row: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
  grid-row: 2 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  grid-row: 3 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel > .flex:first-child {
  grid-template-columns: minmax(0, auto) minmax(8.5rem, 1fr) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
  min-width: 0 !important;
  width: 100% !important;
}

@media (max-width: 900px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-board-svg,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    inset: 10% 5% 15%;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
    transform: scale(0.82);
  }
}

.tower-ascent-panel__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.tower-ascent-panel__eyebrow,
.tower-ascent-panel__meta,
.tower-ascent-panel__summary,
.tower-ascent-tile__floor,
.tower-ascent-waystone-marker {
  font: 800 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tower-ascent-panel__eyebrow {
  color: rgba(214, 169, 79, 0.86);
}

.tower-ascent-panel__title {
  margin: 4px 0 0;
  color: var(--color-parchment, #f4e8d0);
  font: 800 24px/1.05 var(--font-serif, serif);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.tower-ascent-panel__selected {
  align-self: end;
  max-width: min(420px, 52vw);
  border: 1px solid rgba(214, 169, 79, 0.28);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(8, 18, 33, 0.82), rgba(3, 9, 18, 0.92));
  padding: 7px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(244, 232, 208, 0.9);
  font: 800 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 176, 0.04);
}

.tower-ascent-panel__meta,
.tower-ascent-panel__summary {
  color: rgba(216, 207, 188, 0.82);
}

.tower-ascent-panel__meta,
.tower-ascent-panel__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tower-ascent-panel__meta span,
.tower-ascent-panel__summary span {
  border: 1px solid rgba(214, 169, 79, 0.2);
  border-radius: 6px;
  background: rgba(3, 12, 23, 0.58);
  padding: 6px 8px;
}

.tower-ascent-track__rail {
  display: grid;
  grid-template-columns: minmax(118px, 1.2fr) repeat(6, minmax(84px, 1fr));
  gap: 8px;
  align-items: end;
  animation: towerAscentSlide 300ms ease-out;
}

.tower-ascent-tile {
  appearance: none;
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  position: relative;
  min-width: 0;
  border: 1px solid rgba(214, 169, 79, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 18, 33, 0.86), rgba(3, 9, 18, 0.88));
  box-shadow: inset 0 0 0 1px rgba(255, 244, 215, 0.025);
  opacity: 0.72;
  transition: transform 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.tower-ascent-tile:hover {
  border-color: rgba(214, 169, 79, 0.44);
  opacity: 1;
  transform: translateY(-2px);
}

.tower-ascent-tile:focus-visible {
  outline: 2px solid rgba(255, 214, 102, 0.88);
  outline-offset: 3px;
}

.tower-ascent-tile--selected {
  border-color: rgba(134, 239, 172, 0.82);
  opacity: 1;
  box-shadow:
    0 0 0 1px rgba(134, 239, 172, 0.18),
    0 0 22px rgba(134, 239, 172, 0.16),
    inset 0 0 0 1px rgba(255, 244, 215, 0.07);
}

.tower-ascent-tile--current {
  border-color: rgba(243, 201, 109, 0.86);
  opacity: 1;
  box-shadow: 0 0 22px rgba(214, 169, 79, 0.18), inset 0 0 0 1px rgba(255, 244, 215, 0.08);
}

.tower-ascent-tile--boss {
  border-color: rgba(239, 68, 68, 0.5);
  background: linear-gradient(180deg, rgba(77, 20, 25, 0.86), rgba(13, 12, 22, 0.9));
}

.tower-ascent-tile--guardian {
  border-color: rgba(243, 201, 109, 0.78);
  background: linear-gradient(180deg, rgba(77, 61, 23, 0.74), rgba(12, 17, 31, 0.92));
  transform: translateY(-4px);
}

.tower-ascent-tile__portrait {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 7px 7px 0 0;
  background: radial-gradient(circle at 50% 28%, rgba(214, 169, 79, 0.22), rgba(7, 12, 22, 0.92) 68%);
}

.tower-ascent-tile__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.tower-ascent-tile__fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(214, 169, 79, 0.72);
  font: 900 30px/1 var(--font-serif, serif);
}

.tower-ascent-tile__copy {
  padding: 8px;
  min-height: 58px;
}

.tower-ascent-tile__floor {
  display: block;
  color: rgba(214, 169, 79, 0.72);
}

.tower-ascent-tile__copy strong {
  display: -webkit-box;
  margin-top: 4px;
  color: rgba(244, 232, 208, 0.92);
  font: 800 13px/1.15 var(--font-serif, serif);
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tower-ascent-waystone-marker {
  position: absolute;
  left: 50%;
  top: -13px;
  z-index: 2;
  transform: translateX(-50%);
  border: 1px solid rgba(96, 165, 250, 0.45);
  border-radius: 999px;
  background: rgba(3, 12, 23, 0.96);
  color: #bfdbfe;
  padding: 4px 8px;
  white-space: nowrap;
}

.tower-ascent-panel__summary {
  margin-top: 12px;
}

@keyframes towerAscentSlide {
  from {
    opacity: 0.82;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 900px) {
  .tower-ascent-track__rail {
    grid-template-columns: repeat(7, minmax(88px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .tower-ascent-panel__header {
    align-items: flex-start;
    flex-direction: column;
  }
}

.tower-ascent-panel__header {
  align-items: flex-start;
}

.tower-ascent-track__rail {
  grid-template-columns: minmax(154px, 1.55fr) repeat(6, minmax(92px, 1fr));
  align-items: end;
  gap: 10px;
}

.tower-ascent-tile {
  isolation: isolate;
  min-height: 142px;
  overflow: hidden;
  border-color: rgba(214, 169, 79, 0.3);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(18, 19, 30, 0.88), rgba(4, 7, 15, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(214, 169, 79, 0.12), transparent 44%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 176, 0.05),
    inset 0 -24px 44px rgba(0, 0, 0, 0.28);
  opacity: 0.82;
}

.tower-ascent-tile--selected::after {
  border-color: rgba(134, 239, 172, 0.42);
  box-shadow: inset 0 0 22px rgba(134, 239, 172, 0.1);
}

.tower-ascent-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border: 1px solid rgba(255, 232, 176, 0.08);
  border-radius: inherit;
}

.tower-ascent-tile--current {
  min-height: 174px;
  transform: translateY(-6px);
}

.tower-ascent-tile--current:hover {
  transform: translateY(-8px);
}

.tower-ascent-tile--boss {
  border-color: rgba(239, 68, 68, 0.74);
  background:
    linear-gradient(180deg, rgba(62, 16, 22, 0.92), rgba(8, 8, 15, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(239, 68, 68, 0.18), transparent 46%);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.12), 0 0 18px rgba(127, 29, 29, 0.2);
}

.tower-ascent-tile--guardian {
  border-color: rgba(255, 214, 102, 0.88);
  background:
    linear-gradient(180deg, rgba(74, 55, 18, 0.86), rgba(8, 10, 18, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(255, 214, 102, 0.2), transparent 46%);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 176, 0.14), 0 0 22px rgba(214, 169, 79, 0.2);
}

.tower-ascent-tile--selected:not(.tower-ascent-tile--current) {
  border-color: rgba(134, 239, 172, 0.86);
  box-shadow:
    0 0 0 1px rgba(134, 239, 172, 0.18),
    0 0 24px rgba(134, 239, 172, 0.18),
    inset 0 0 0 1px rgba(255, 244, 215, 0.07);
}

.tower-ascent-tile__portrait {
  min-height: 98px;
  border-bottom: 1px solid rgba(214, 169, 79, 0.14);
  border-radius: 8px 8px 0 0;
}

.tower-ascent-tile--current .tower-ascent-tile__portrait {
  height: 100%;
  min-height: 174px;
  border-radius: 8px;
  border-bottom: 0;
}

.tower-ascent-tile--current .tower-ascent-tile__copy {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  min-height: 0;
  padding: 8px 9px;
  border: 1px solid rgba(214, 169, 79, 0.34);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(5, 9, 18, 0.58), rgba(0, 0, 0, 0.78));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(4px);
}

.tower-ascent-tile--current .tower-ascent-tile__copy strong {
  font-size: 15px;
}

.tower-ascent-tile__fallback {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 26%, rgba(139, 92, 246, 0.28), transparent 38%),
    linear-gradient(180deg, rgba(20, 18, 29, 0.92), rgba(2, 4, 10, 0.98));
  color: transparent;
}

.tower-ascent-tile__silhouette i {
  position: absolute;
  left: 50%;
  bottom: 16%;
  width: 48%;
  height: 58%;
  transform: translateX(-50%);
  clip-path: polygon(50% 0, 72% 22%, 84% 58%, 64% 100%, 36% 100%, 16% 58%, 28% 22%);
  background: linear-gradient(180deg, rgba(11, 16, 28, 0.98), rgba(0, 0, 0, 0.98));
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.28), inset 0 0 10px rgba(255, 214, 102, 0.08);
}

.tower-ascent-tile__silhouette i::before,
.tower-ascent-tile__silhouette i::after {
  content: "";
  position: absolute;
  top: 11%;
  width: 34%;
  height: 24%;
  background: rgba(0, 0, 0, 0.95);
  clip-path: polygon(0 100%, 100% 0, 78% 100%);
}

.tower-ascent-tile__silhouette i::before {
  left: -18%;
}

.tower-ascent-tile__silhouette i::after {
  right: -18%;
  transform: scaleX(-1);
}

.tower-ascent-tile__silhouette b {
  position: absolute;
  right: 8px;
  bottom: 7px;
  z-index: 2;
  color: rgba(255, 214, 102, 0.94);
  font: 900 14px/1 var(--font-ui, inherit);
  text-shadow: 0 0 12px rgba(255, 214, 102, 0.34);
}

.tower-ascent-tile__copy {
  position: relative;
  z-index: 3;
}

.tower-ascent-waystone-marker {
  border-color: rgba(96, 165, 250, 0.58);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(7, 12, 22, 0.98));
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.18);
}

.tower-ascent-panel__summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tower-ascent-panel__summary span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-color: rgba(214, 169, 79, 0.28);
  background: linear-gradient(180deg, rgba(8, 18, 33, 0.82), rgba(3, 9, 18, 0.9));
  color: rgba(244, 232, 208, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 176, 0.04);
}

@media (max-width: 900px) {
  .tower-ascent-track__rail {
    grid-template-columns: repeat(7, minmax(116px, 1fr));
  }
}


.tower-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
}

.tower-section-title h2 {
  margin: 0;
  font-family: var(--font-serif, serif);
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  font-style: italic;
  letter-spacing: 0;
  color: var(--color-parchment);
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}

.tower-section-title p {
  margin: 2px 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-silver-mist, #aab4c8);
}

.tower-section-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(201, 168, 92, 0.22);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(9, 14, 28, 0.92), rgba(4, 8, 18, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 239, 181, 0.08), 0 12px 28px rgba(0, 0, 0, 0.22);
}

.tower-section-tab {
  position: relative;
  min-height: 38px;
  min-width: 0;
  padding: 0 14px;
  border: 1px solid rgba(201, 168, 92, 0.16);
  border-radius: 4px;
  background: rgba(8, 15, 30, 0.72);
  color: var(--color-silver-mist, #aab4c8);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.tower-section-tab:hover {
  border-color: rgba(217, 184, 129, 0.42);
  color: var(--color-parchment);
  background: rgba(20, 28, 50, 0.82);
}

.tower-section-tab--active {
  border-color: rgba(255, 214, 102, 0.64);
  color: var(--color-celestial-gold, #ffd666);
  background: linear-gradient(180deg, rgba(201, 168, 92, 0.22), rgba(47, 34, 14, 0.38));
  box-shadow: inset 0 0 18px rgba(255, 214, 102, 0.08), 0 0 18px rgba(201, 168, 92, 0.16);
}

.tower-section-tab--pulse {
  animation: towerTabPulse 1.45s ease-in-out infinite;
}

.tower-section-tab__dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #ffd666;
  box-shadow: 0 0 10px rgba(255, 214, 102, 0.86);
}

.tower-section-body {
  min-height: 0;
}

@keyframes towerTabPulse {
  0%, 100% { box-shadow: inset 0 0 18px rgba(255, 214, 102, 0.08), 0 0 10px rgba(201, 168, 92, 0.1); }
  50% { box-shadow: inset 0 0 24px rgba(255, 214, 102, 0.18), 0 0 24px rgba(255, 214, 102, 0.38); }
}

@media (max-width: 860px) {
  .tower-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .tower-section-tabs {
    width: 100%;
  }

  .tower-section-tab {
    flex: 1 1 calc(50% - 6px);
    padding-inline: 10px;
  }
}

.tower-awakening-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 16px;
  overflow: hidden;
  border-color: rgba(255, 214, 102, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 214, 102, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(27, 21, 38, 0.9), rgba(5, 8, 18, 0.88));
}

.tower-awakening-panel--ready {
  animation: towerAwakeningPulse 1.55s ease-in-out infinite;
}

.tower-awakening-panel--focus {
  box-shadow: 0 0 0 1px rgba(255, 214, 102, 0.7), 0 0 34px rgba(255, 214, 102, 0.32);
}

.tower-awakening-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.tower-awakening-panel__eyebrow {
  display: block;
  color: rgba(255, 214, 102, 0.9);
  font: 800 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tower-awakening-panel h3 {
  margin: 4px 0 0;
  color: var(--color-parchment, #f4e8d0);
  font: 800 24px/1.08 var(--font-serif, serif);
}

.tower-awakening-panel p {
  margin: 6px 0 0;
  max-width: 720px;
  color: rgba(203, 213, 225, 0.84);
  font: 500 12px/1.45 var(--font-ui, inherit);
}

.tower-awakening-panel__button {
  min-height: 38px;
  min-width: 150px;
  font-size: 12px;
}

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

.tower-awakening-requirement {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(201, 168, 92, 0.18);
  border-radius: 7px;
  background: rgba(3, 8, 18, 0.58);
  padding: 10px;
}

.tower-awakening-requirement--complete {
  border-color: rgba(103, 232, 167, 0.28);
  background: rgba(16, 81, 73, 0.18);
}

.tower-awakening-requirement__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tower-awakening-requirement__top span {
  color: rgba(224, 194, 132, 0.82);
  font: 800 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tower-awakening-requirement__top strong {
  color: var(--color-parchment, #f4e8d0);
  font: 800 13px/1 var(--font-ui, inherit);
}

.tower-awakening-requirement__meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
}

.tower-awakening-requirement__meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7dd3fc, #ffd666);
  box-shadow: 0 0 12px rgba(255, 214, 102, 0.32);
}

.vital-card--cap-link {
  cursor: pointer;
  border-color: rgba(255, 214, 102, 0.58) !important;
  box-shadow: 0 0 18px rgba(255, 214, 102, 0.18), inset 0 0 14px rgba(255, 214, 102, 0.05);
}

.vital-card--cap-link:focus-visible {
  outline: 2px solid rgba(255, 214, 102, 0.74);
  outline-offset: 2px;
}

.vital-cap-chevron {
  display: inline-flex;
  margin-left: 6px;
  color: #ffd666;
  font-size: 18px;
  line-height: 1;
}

@keyframes towerAwakeningPulse {
  0%, 100% { box-shadow: inset 0 0 20px rgba(255, 214, 102, 0.06), 0 0 14px rgba(255, 214, 102, 0.1); }
  50% { box-shadow: inset 0 0 28px rgba(255, 214, 102, 0.16), 0 0 28px rgba(255, 214, 102, 0.34); }
}

@media (max-width: 900px) {
  .tower-awakening-panel__header {
    flex-direction: column;
  }

  .tower-awakening-requirements {
    grid-template-columns: 1fr;
  }
}

.tower-tab-content > .tower-cta-panel.combat-zone-panel:first-child {
  border-color: rgba(255, 214, 102, 0.4);
  background:
    linear-gradient(90deg, rgba(58, 40, 14, 0.78), rgba(6, 11, 23, 0.76)),
    radial-gradient(circle at 12% 12%, rgba(255, 214, 102, 0.18), transparent 36%);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 176, 0.08), 0 18px 46px rgba(0, 0, 0, 0.28);
}

.tower-tab-content > .tower-cta-panel:first-child .tower-cta-panel__eyebrow,
.tower-tab-content > .tower-cta-panel:first-child h3 {
  white-space: nowrap;
}

.tower-awakening-panel {
  grid-template-rows: auto auto auto;
  border-color: rgba(255, 214, 102, 0.3);
  background:
    linear-gradient(180deg, rgba(27, 21, 38, 0.82), rgba(5, 8, 18, 0.78)),
    radial-gradient(circle at 94% 10%, rgba(255, 214, 102, 0.18), transparent 32%);
}

.tower-awakening-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.tower-awakening-panel__title {
  min-width: 0;
}

.tower-awakening-panel h3 {
  white-space: nowrap;
}

.tower-awakening-panel__description {
  max-width: none;
  margin: 0;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

.tower-awakening-panel__status {
  flex: 0 0 auto;
  min-height: 34px;
  min-width: 156px;
  border: 1px solid rgba(214, 169, 79, 0.28);
  border-radius: 999px;
  background: rgba(3, 9, 18, 0.72);
  color: rgba(244, 232, 208, 0.84);
  font: 900 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  padding: 0 14px;
  text-transform: uppercase;
}

.tower-awakening-panel__status--ready {
  cursor: pointer;
  border-color: rgba(255, 214, 102, 0.76);
  background: linear-gradient(180deg, rgba(255, 214, 102, 0.24), rgba(76, 54, 16, 0.62));
  color: #fff3c4;
  box-shadow: 0 0 18px rgba(255, 214, 102, 0.24), inset 0 0 0 1px rgba(255, 232, 176, 0.1);
}

.tower-awakening-panel__status:disabled {
  cursor: default;
}

.tower-awakening-requirements {
  grid-template-columns: repeat(auto-fit, minmax(154px, 1fr));
}

.tower-awakening-requirement {
  min-width: 0;
  border-color: rgba(214, 169, 79, 0.24);
  background: linear-gradient(180deg, rgba(8, 18, 33, 0.76), rgba(3, 9, 18, 0.82));
}

.tower-awakening-requirement__top {
  align-items: flex-start;
  min-width: 0;
}

.tower-awakening-requirement__top span,
.tower-awakening-requirement__top strong {
  white-space: nowrap;
}

.tower-awakening-requirement__top strong {
  margin-left: auto;
  text-align: right;
}

.tower-awakening-requirement__top span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tower-awakening-requirement__meter {
  height: 9px;
  border: 1px solid rgba(255, 232, 176, 0.08);
  background: rgba(0, 0, 0, 0.46);
}

.tower-awakening-requirement--complete {
  display: none;
}

.tower-awakening-requirements {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-items: stretch;
  gap: 12px;
}

.tower-awakening-requirement {
  min-height: 76px;
  padding: 12px;
}

.tower-awakening-requirement__top {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.tower-awakening-requirement__top span,
.tower-awakening-requirement__top strong {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tower-awakening-requirement__top strong {
  margin-left: 0;
  text-align: left;
}

.tower-awakening-requirement__top span {
  overflow: visible;
  text-overflow: clip;
}

@media (max-width: 1120px) {
  .tower-awakening-requirements {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.talent-page-header__side {
  flex: 0 0 min(420px, 42vw);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  min-width: 280px;
}

.talent-page-header__class {
  align-self: flex-end;
}

.talent-page-header__side .tower-awakening-panel--compact {
  width: min(390px, 100%);
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 10px 12px;
  overflow: visible;
  border-radius: 8px;
}

.talent-page-header__side .tower-awakening-panel--compact .tower-awakening-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.talent-page-header__side .tower-awakening-panel--compact .tower-awakening-panel__title {
  flex: 1 1 auto;
  min-width: 0;
}

.talent-page-header__side .tower-awakening-panel--compact .tower-awakening-panel__eyebrow {
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.11em;
}

.talent-page-header__side .tower-awakening-panel--compact h3 {
  margin: 2px 0 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  font-size: 16px;
  line-height: 1.05;
}

.talent-page-header__side .tower-awakening-panel--compact .tower-awakening-panel__status {
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 26px;
  padding: 0 10px;
  font-size: 9px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.talent-page-header__side .tower-awakening-panel--compact .tower-awakening-panel__description {
  margin: 0;
  max-width: none;
  font-size: 12px;
  line-height: 1.4;
  text-align: left;
}

.tower-awakening-compact-requirements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.tower-awakening-compact-requirements > span {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid rgba(214, 169, 79, 0.24);
  border-radius: 5px;
  background: rgba(3, 9, 18, 0.68);
  color: rgba(244, 232, 208, 0.82);
  font: 800 12px/1.3 var(--font-ui, inherit);
}

.tower-awakening-compact-requirements > span > b {
  flex: 0 0 auto;
  color: #d6a94f;
}

.tower-awakening-compact-requirements > span.is-complete {
  border-color: rgba(103, 232, 163, 0.34);
  background: rgba(14, 74, 53, 0.26);
  color: #d6ffe9;
}

.tower-awakening-compact-requirements > span.is-complete > b {
  color: #67e8a3;
}

@media (max-width: 900px) {
  .talent-page-header__top {
    flex-direction: column;
  }

  .talent-page-header__side {
    align-items: flex-start;
    width: 100%;
    min-width: 0;
    flex-basis: auto;
  }
}

@media (max-width: 500px) {
  .tower-awakening-compact-requirements {
    grid-template-columns: 1fr;
  }
}

.tower-nameplate-panel.combat-zone-panel {
  display: block;
  padding: 16px;
  overflow: visible;
}

.tower-nameplate-panel__titlebar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.tower-nameplate-panel__eyebrow,
.tower-nameplate-panel__zone span,
.tower-nameplate-chip span {
  font: 800 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tower-nameplate-panel__eyebrow,
.tower-nameplate-chip span {
  color: rgba(214, 169, 79, 0.82);
}

.tower-nameplate-panel__heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.tower-nameplate-panel__heading h3 {
  margin: 0;
  color: var(--color-parchment, #f4e8d0);
  font: 800 28px/1.05 var(--font-serif, serif);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.tower-nameplate-panel__zone {
  display: grid;
  gap: 4px;
  min-width: 190px;
  text-align: right;
}

.tower-nameplate-panel__zone span {
  color: rgba(148, 163, 184, 0.76);
}

.tower-nameplate-panel__zone strong {
  color: rgba(244, 232, 208, 0.92);
  font: 700 14px/1.2 var(--font-ui, inherit);
}

.tower-nameplate-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tower-nameplate-chip {
  display: grid;
  gap: 4px;
  min-width: 132px;
  border: 1px solid rgba(214, 169, 79, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 18, 33, 0.82), rgba(3, 9, 18, 0.78));
  box-shadow: inset 0 0 0 1px rgba(255, 244, 215, 0.025);
  padding: 9px 10px;
}

.tower-nameplate-chip strong {
  color: rgba(244, 232, 208, 0.96);
  font: 800 14px/1.15 var(--font-ui, inherit);
}

.tower-nameplate-chip--pressure {
  border-color: rgba(217, 184, 129, 0.36);
  background: linear-gradient(180deg, rgba(62, 39, 18, 0.68), rgba(11, 15, 24, 0.86));
}

.tower-nameplate-chip--extra {
  border-color: rgba(217, 112, 214, 0.32);
  background: linear-gradient(180deg, rgba(58, 24, 64, 0.58), rgba(11, 15, 24, 0.86));
}

.tower-nameplate-chip--boss {
  border-color: rgba(239, 68, 68, 0.52);
  color: #fca5a5;
}

.tower-nameplate-chip--guardian {
  border-color: rgba(196, 181, 253, 0.58);
  color: #ddd6fe;
}

.tower-nameplate-chip--calm {
  border-color: rgba(52, 211, 153, 0.28);
}

.tower-nameplate-chip--timer {
  min-width: 112px;
}

@media (max-width: 900px) {
  .tower-nameplate-panel__titlebar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tower-nameplate-panel__zone {
    text-align: left;
  }
}

.tower-corruption-altar.combat-zone-panel {
  position: relative;
  display: block;
  padding: 16px;
  overflow: visible;
}

.tower-corruption-altar--sealed {
  opacity: 0.72;
}

.tower-corruption-altar--collapsed.combat-zone-panel {
  padding: 12px 14px;
}

.tower-corruption-altar--collapsed .tower-corruption-altar__header {
  margin-bottom: 0;
}

.tower-corruption-toggle {
  margin-top: 10px;
  min-height: 32px;
  min-width: 170px;
  font-size: 11px;
}

.tower-corruption-altar__ribbon {
  position: absolute;
  right: 14px;
  top: -10px;
  z-index: 2;
  border: 1px solid rgba(244, 114, 182, 0.42);
  border-radius: 999px;
  background: rgba(10, 5, 18, 0.96);
  color: #fbcfe8;
  font: 800 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  padding: 6px 10px;
  text-transform: uppercase;
}

.tower-corruption-altar__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: 16px;
  margin-bottom: 14px;
}

.tower-corruption-altar__eyebrow {
  color: rgba(244, 114, 182, 0.84);
  font: 800 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tower-corruption-altar__header h3 {
  margin: 4px 0 0;
  color: var(--color-parchment, #f4e8d0);
  font: 800 24px/1.08 var(--font-serif, serif);
}

.tower-corruption-altar__header p {
  margin: 6px 0 0;
  max-width: 720px;
  color: rgba(203, 213, 225, 0.82);
  font: 500 12px/1.45 var(--font-ui, inherit);
}

.tower-corruption-meter {
  border: 1px solid rgba(244, 114, 182, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(58, 24, 64, 0.46), rgba(7, 10, 18, 0.86));
  padding: 10px;
}

.tower-corruption-meter__line,
.tower-corruption-meter__cap,
.tower-corruption-meter__headline,
.tower-corruption-meter__next {
  color: rgba(244, 232, 208, 0.92);
  font: 800 12px/1.25 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tower-corruption-meter__headline {
  color: #fbcfe8;
}

.tower-corruption-meter__segments {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  margin: 9px 0;
}

.tower-corruption-meter__segments span {
  position: relative;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(244, 114, 182, 0.18);
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.78);
}

.tower-corruption-meter__segments span::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #a855f7, #f97316);
  box-shadow: 0 0 12px rgba(244, 114, 182, 0.4);
}

.tower-corruption-meter__segments span.is-filled::before {
  width: 100%;
}

.tower-corruption-meter__segments span.is-partial::before {
  width: var(--segment-fill, 0%);
}

.tower-corruption-selected-effects {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.tower-corruption-selected-effects span,
.tower-corruption-selected-effects em {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(249, 115, 22, 0.38);
  border-radius: 6px;
  background: rgba(249, 115, 22, 0.12);
  color: #fed7aa;
  font: 900 12px/1 var(--font-serif, serif);
  font-style: normal;
}

.tower-corruption-selected-effects em {
  min-width: auto;
  padding: 0 8px;
  color: rgba(203, 213, 225, 0.72);
  font: 700 12px/1 var(--font-ui, inherit);
}

.tower-corruption-meter__track {
  height: 8px;
  margin: 9px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.78);
}

.tower-corruption-meter__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a855f7, #f97316);
  box-shadow: 0 0 16px rgba(244, 114, 182, 0.38);
}

.tower-corruption-card-rack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.tower-corruption-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  border: 1px solid rgba(214, 169, 79, 0.18);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 18, 33, 0.84), rgba(3, 9, 18, 0.86));
  color: rgba(203, 213, 225, 0.86);
  padding: 11px;
  text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tower-corruption-card:hover:not(:disabled) {
  border-color: rgba(244, 114, 182, 0.46);
  transform: translateY(-1px);
}

.tower-corruption-card:disabled {
  cursor: not-allowed;
}

.tower-corruption-card--active {
  border-color: rgba(249, 115, 22, 0.62);
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.16), inset 0 0 0 1px rgba(244, 114, 182, 0.12);
}

.tower-corruption-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tower-corruption-card__mark {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(244, 114, 182, 0.28);
  border-radius: 7px;
  color: #f9a8d4;
  font: 900 14px/1 var(--font-serif, serif);
}

.tower-corruption-card__pips {
  display: flex;
  gap: 3px;
}

.tower-corruption-card__pips span {
  width: 7px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(180deg, #facc15, #f97316);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.35);
}

.tower-corruption-card strong {
  color: rgba(244, 232, 208, 0.96);
  font: 800 15px/1.15 var(--font-serif, serif);
}

.tower-corruption-card > span:not(.tower-corruption-card__mark):not(.tower-corruption-card__pips) {
  color: rgba(203, 213, 225, 0.82);
  font: 500 12px/1.35 var(--font-ui, inherit);
}

@media (max-width: 900px) {
  .tower-corruption-altar__header {
    grid-template-columns: 1fr;
  }
}

.tower-corruption-altar.combat-zone-panel {
  border-color: rgba(249, 115, 22, 0.28);
  background:
    linear-gradient(180deg, rgba(27, 12, 17, 0.76), rgba(3, 7, 15, 0.8)),
    radial-gradient(circle at 94% 0%, rgba(249, 115, 22, 0.12), transparent 36%);
}

.tower-corruption-altar--sealed {
  opacity: 1;
}

.tower-corruption-altar--sealed::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(3, 7, 15, 0.24), rgba(3, 7, 15, 0.52));
}

.tower-corruption-altar--sealed > * {
  position: relative;
  z-index: 2;
}

.tower-corruption-altar--sealed .tower-corruption-card {
  filter: grayscale(0.45);
  opacity: 0.58;
}

.tower-corruption-altar__header {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  align-items: start;
}

.tower-corruption-meter {
  border-color: rgba(249, 115, 22, 0.32);
  background:
    linear-gradient(180deg, rgba(58, 24, 20, 0.62), rgba(7, 10, 18, 0.88)),
    radial-gradient(circle at 100% 0%, rgba(249, 115, 22, 0.16), transparent 38%);
}

.tower-corruption-meter__headline {
  color: #fed7aa;
}

.tower-corruption-meter__segments {
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
}

.tower-corruption-selected-effects span {
  border-color: rgba(249, 115, 22, 0.52);
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 214, 102, 0.22), transparent 48%),
    rgba(249, 115, 22, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 176, 0.08);
}

.tower-corruption-card-rack {
  grid-template-columns: repeat(5, minmax(158px, 1fr));
}

.tower-corruption-card {
  position: relative;
  isolation: isolate;
  min-height: 136px;
  overflow: hidden;
  border-color: rgba(214, 169, 79, 0.26);
  background:
    linear-gradient(180deg, rgba(15, 17, 27, 0.9), rgba(4, 7, 14, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(214, 169, 79, 0.1), transparent 42%);
  box-shadow: inset 0 0 0 1px rgba(255, 232, 176, 0.04);
}

.tower-corruption-card::before,
.tower-corruption-card::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.tower-corruption-card::before {
  inset: auto 14px -28px;
  z-index: -1;
  height: 64px;
  border-radius: 999px 999px 0 0;
  background: radial-gradient(circle at 50% 100%, rgba(249, 115, 22, 0.42), transparent 72%);
  opacity: 0.16;
  transition: opacity 160ms ease, transform 160ms ease;
}

.tower-corruption-card::after {
  inset: 7px;
  border: 1px solid rgba(255, 232, 176, 0.07);
  border-radius: 6px;
}

.tower-corruption-card--active {
  border-color: rgba(249, 115, 22, 0.74);
  background:
    linear-gradient(180deg, rgba(52, 22, 18, 0.94), rgba(8, 8, 14, 0.94)),
    radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.2), transparent 46%);
  box-shadow: 0 0 22px rgba(249, 115, 22, 0.2), inset 0 0 0 1px rgba(255, 232, 176, 0.1);
}

.tower-corruption-card--active::before {
  opacity: 0.74;
  transform: translateY(-8px);
}

.tower-corruption-card__mark {
  position: relative;
  border-color: rgba(249, 115, 22, 0.36);
  background: rgba(3, 8, 18, 0.74);
  color: #fed7aa;
  box-shadow: inset 0 0 0 1px rgba(255, 232, 176, 0.06);
}

.tower-corruption-card--active .tower-corruption-card__mark {
  border-color: rgba(255, 214, 102, 0.62);
  color: #fff3c4;
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.26), inset 0 0 0 1px rgba(255, 232, 176, 0.12);
}

.tower-corruption-card strong,
.tower-corruption-card > span:not(.tower-corruption-card__mark):not(.tower-corruption-card__pips) {
  position: relative;
  z-index: 2;
}

.tower-corruption-altar--collapsed .tower-corruption-altar__header {
  align-items: center;
}

.tower-corruption-altar--collapsed .tower-corruption-meter {
  padding: 8px;
}

.tower-corruption-altar--collapsed .tower-corruption-meter__segments {
  margin: 7px 0;
}

.tower-corruption-altar--collapsed .tower-corruption-selected-effects {
  margin-top: 6px;
}

@media (max-width: 1280px) {
  .tower-corruption-card-rack {
    grid-template-columns: repeat(auto-fit, minmax(176px, 1fr));
  }
}

@media (max-width: 700px) {
  .tower-awakening-requirements {
    grid-template-columns: 1fr;
  }
}

/* Steam Character Grade dossier */
.leaderboard-class-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--leaderboard-class-color, #b7a687) 70%, transparent);
  border-radius: 0.25rem;
  color: var(--leaderboard-class-color, #d8c7a7);
  background: color-mix(in srgb, var(--leaderboard-class-color, #b7a687) 13%, rgba(5, 10, 20, 0.92));
  box-shadow: inset 0 0 10px color-mix(in srgb, var(--leaderboard-class-color, #b7a687) 8%, transparent);
  font: 900 0.62rem/1 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.leaderboard-class-badge.is-pending {
  border-style: dashed;
  color: rgba(198, 190, 176, 0.68);
}
.leaderboard-subclass-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 1.15rem;
  padding: 0.18rem 0.45rem;
  border: 1px solid rgba(168, 139, 235, 0.42);
  border-radius: 999px;
  color: #c9b6f5;
  background: linear-gradient(135deg, rgba(83, 52, 139, 0.3), rgba(11, 15, 28, 0.88));
  box-shadow: inset 0 0 9px rgba(140, 101, 215, 0.1), 0 0 8px rgba(120, 82, 190, 0.08);
  font: 850 0.52rem/1 var(--font-ui, sans-serif);
  letter-spacing: 0.065em;
  text-transform: uppercase;
  white-space: nowrap;
}
.leaderboard-character-inspect {
  cursor: pointer;
  outline: none;
}
.leaderboard-character-inspect:hover,
.leaderboard-character-inspect:focus-visible {
  border-color: rgba(225, 185, 105, 0.68) !important;
  box-shadow: 0 0 0 1px rgba(225, 185, 105, 0.16), 0 14px 34px rgba(0, 0, 0, 0.42), inset 0 0 28px rgba(190, 137, 56, 0.08) !important;
  transform: translateY(-2px);
}
.leaderboard-inspect-cue {
  margin-top: 0.55rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid rgba(218, 174, 92, 0.34);
  border-radius: 999px;
  color: #e8c57f;
  background: rgba(73, 45, 14, 0.32);
  font: 800 0.48rem/1 var(--font-ui, sans-serif);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.leaderboard-inspect-cue.is-row { margin: 0 0 0 0.2rem; white-space: nowrap; }
.steam-profile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow: auto;
  background: radial-gradient(circle at 50% 20%, rgba(55, 44, 77, 0.38), transparent 46%), rgba(1, 4, 10, 0.9);
  backdrop-filter: blur(12px) saturate(0.8);
}
.steam-profile-modal {
  position: relative;
  width: min(75rem, 96vw);
  max-height: 94vh;
  overflow: auto;
  border: 1px solid rgba(218, 174, 92, 0.45);
  border-radius: 0.8rem;
  color: #eee7dc;
  background:
    linear-gradient(125deg, rgba(218, 174, 92, 0.05), transparent 23%),
    radial-gradient(circle at 88% 3%, rgba(91, 62, 131, 0.2), transparent 30%),
    linear-gradient(155deg, #07101e 0%, #090d18 48%, #050911 100%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8), 0 0 55px rgba(163, 111, 42, 0.14), inset 0 0 0 1px rgba(255, 230, 182, 0.035);
}
.steam-profile-modal::before,
.steam-profile-modal::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.steam-profile-modal::before { inset: 0.45rem; border: 1px solid rgba(218, 174, 92, 0.1); border-radius: 0.55rem; }
.steam-profile-modal::after { top: 0; left: 8%; width: 84%; height: 1px; background: linear-gradient(90deg, transparent, #e5be73, transparent); box-shadow: 0 0 14px rgba(229, 190, 115, 0.6); }
.steam-profile-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid rgba(218, 174, 92, 0.16);
  background: rgba(4, 9, 17, 0.91);
  backdrop-filter: blur(16px);
}
.steam-profile-kicker { color: #dfb96f; font: 900 0.58rem/1 var(--font-serif, Georgia, serif); letter-spacing: 0.25em; text-transform: uppercase; }
.steam-profile-header-copy { margin-top: 0.25rem; color: rgba(205, 198, 189, 0.48); font-size: 0.58rem; }
.steam-profile-close {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border: 1px solid rgba(218, 174, 92, 0.25);
  border-radius: 50%;
  color: #d7c4a3;
  background: rgba(22, 26, 38, 0.78);
  font-size: 1.4rem;
  transition: 130ms ease;
}
.steam-profile-close:hover,
.steam-profile-close:focus-visible { border-color: #e0b86c; color: #fff0ce; box-shadow: 0 0 16px rgba(218, 174, 92, 0.2); }
.steam-profile-content { padding: 1.2rem; }
.steam-profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.35rem;
  min-height: 11.5rem;
  padding: 1.2rem 1.4rem;
  overflow: hidden;
  border: 1px solid rgba(218, 174, 92, 0.22);
  border-radius: 0.65rem;
  background: linear-gradient(100deg, rgba(32, 26, 47, 0.88), rgba(8, 16, 28, 0.88) 62%, rgba(61, 38, 14, 0.38));
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.35);
}
.steam-profile-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 25%, rgba(235, 200, 128, 0.035) 25.5%, transparent 26%, transparent 72%, rgba(235, 200, 128, 0.03) 72.5%, transparent 73%); }
.steam-profile-portrait { position: relative; display: grid; place-items: center; width: 9rem; height: 9rem; }
.steam-profile-portrait::before { content: ""; position: absolute; inset: 0.7rem; border-radius: 50%; background: rgba(203, 153, 71, 0.16); filter: blur(18px); }
.steam-profile-portrait-render { filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.65)); }
.steam-profile-identity { position: relative; min-width: 0; }
.steam-profile-title { color: #c7ad80; font: italic 600 0.7rem/1 var(--font-serif, Georgia, serif); letter-spacing: 0.08em; }
.steam-profile-identity h2 { margin: 0.3rem 0 0.45rem; overflow: hidden; color: #f7ebd6; font: 800 clamp(1.5rem, 3.5vw, 2.6rem)/1 var(--font-serif, Georgia, serif); letter-spacing: 0.025em; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 3px 16px rgba(0, 0, 0, 0.8); }
.steam-profile-classline { display: flex; flex-wrap: wrap; gap: 0.5rem; color: #d8cbb6; font: 800 0.67rem/1.2 var(--font-ui, sans-serif); letter-spacing: 0.08em; text-transform: uppercase; }
.steam-profile-classline > span:nth-child(2) { color: rgba(216, 203, 182, 0.3); }
.steam-profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem; margin-top: 1rem; }
.steam-profile-actions > span { color: rgba(198, 196, 195, 0.45); font-size: 0.54rem; }
.steam-profile-steam-button {
  padding: 0.48rem 0.75rem;
  border: 1px solid rgba(116, 178, 228, 0.42);
  border-radius: 0.35rem;
  color: #bfe3ff;
  background: linear-gradient(135deg, rgba(33, 95, 143, 0.42), rgba(17, 44, 71, 0.48));
  font: 800 0.55rem/1 var(--font-ui, sans-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.steam-profile-steam-button:hover,
.steam-profile-steam-button:focus-visible { border-color: #8fcaff; color: white; box-shadow: 0 0 18px rgba(68, 150, 216, 0.2); }
.steam-profile-grade { position: relative; display: grid; min-width: 9rem; text-align: center; }
.steam-profile-grade > span { color: rgba(225, 204, 169, 0.58); font: 800 0.5rem/1 var(--font-ui, sans-serif); letter-spacing: 0.14em; text-transform: uppercase; }
.steam-profile-grade > strong { margin: 0.25rem 0; color: #f0c66f; font: 900 clamp(3.2rem, 8vw, 5.3rem)/0.9 var(--font-serif, Georgia, serif); letter-spacing: -0.08em; text-shadow: 0 0 18px rgba(230, 174, 72, 0.35), 0 4px 0 rgba(0, 0, 0, 0.45); }
.steam-profile-grade > small { color: rgba(225, 211, 187, 0.5); font-size: 0.53rem; }
.steam-profile-progress { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.65rem; }
.steam-profile-progress > div { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.52rem 0.65rem; border: 1px solid rgba(126, 143, 175, 0.18); background: rgba(9, 17, 30, 0.72); }
.steam-profile-progress span { color: rgba(193, 199, 211, 0.58); font-size: 0.53rem; text-transform: uppercase; letter-spacing: 0.05em; }
.steam-profile-progress strong { color: #e6c886; font: 800 0.78rem/1 var(--font-mono, monospace); }
.steam-profile-columns { display: grid; grid-template-columns: minmax(18rem, 0.72fr) minmax(31rem, 1.28fr); gap: 0.7rem; margin-top: 0.7rem; }
.steam-profile-section { min-width: 0; padding: 0.75rem; border: 1px solid rgba(138, 151, 177, 0.17); border-radius: 0.55rem; background: rgba(6, 12, 23, 0.68); }
.steam-profile-section-heading { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.65rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(218, 174, 92, 0.13); }
.steam-profile-section-heading > span { display: grid; place-items: center; width: 1.45rem; height: 1.45rem; border: 1px solid rgba(218, 174, 92, 0.28); border-radius: 50%; color: #dcb777; font: 700 0.45rem/1 var(--font-serif, Georgia, serif); }
.steam-profile-section-heading h3 { margin: 0; color: #e9d7b8; font: 800 0.72rem/1 var(--font-serif, Georgia, serif); letter-spacing: 0.12em; text-transform: uppercase; }
.steam-profile-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.38rem; }
.steam-profile-stat-grid > div { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.58rem; border-left: 2px solid rgba(197, 154, 83, 0.35); background: linear-gradient(90deg, rgba(55, 42, 22, 0.22), rgba(15, 23, 37, 0.48)); }
.steam-profile-stat-grid span { color: rgba(191, 197, 210, 0.58); font-size: 0.54rem; }
.steam-profile-stat-grid strong { color: #eee2ce; font: 800 0.7rem/1 var(--font-mono, monospace); }
.steam-profile-gear-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; }
.steam-profile-gear-card { min-width: 0; padding: 0.48rem; border: 1px solid rgba(125, 145, 177, 0.14); border-radius: 0.4rem; background: rgba(12, 20, 34, 0.64); }
.steam-profile-gear-card.is-equipped { border-color: rgba(194, 151, 79, 0.22); background: linear-gradient(135deg, rgba(48, 34, 18, 0.22), rgba(12, 20, 34, 0.68)); }
.steam-profile-gear-card.is-empty { opacity: 0.48; }
.steam-profile-gear-slot { margin-bottom: 0.33rem; color: rgba(215, 185, 132, 0.55); font: 800 0.45rem/1 var(--font-ui, sans-serif); letter-spacing: 0.12em; text-transform: uppercase; }
.steam-profile-gear-main { display: flex; align-items: center; gap: 0.5rem; }
.steam-profile-gear-icon { display: grid; flex: 0 0 auto; place-items: center; width: 2.7rem; height: 2.7rem; overflow: hidden; border: 1px solid rgba(210, 173, 105, 0.22); border-radius: 0.32rem; color: rgba(211, 199, 180, 0.4); background: rgba(3, 8, 16, 0.78); }
.steam-profile-gear-icon img { width: 100%; height: 100%; object-fit: cover; }
.steam-profile-gear-name { overflow: hidden; font: 800 0.61rem/1.2 var(--font-serif, Georgia, serif); text-overflow: ellipsis; white-space: nowrap; }
.steam-profile-gear-upgrades { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-top: 0.25rem; }
.steam-profile-gear-upgrades span { padding: 0.12rem 0.25rem; border: 1px solid rgba(107, 143, 183, 0.2); color: #9fc0df; background: rgba(32, 70, 107, 0.16); font-size: 0.42rem; }
.steam-profile-gems { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-top: 0.35rem; padding-top: 0.32rem; border-top: 1px solid rgba(125, 145, 177, 0.09); }
.steam-profile-gem { display: inline-flex; align-items: center; gap: 0.2rem; padding: 0.12rem 0.25rem; border: 1px solid; border-radius: 999px; color: rgba(224, 220, 214, 0.7); background: rgba(2, 7, 14, 0.55); font-size: 0.4rem; }
.steam-profile-gem i { width: 0.35rem; height: 0.35rem; border-radius: 50%; box-shadow: 0 0 5px currentColor; }
.steam-profile-no-gems { color: rgba(179, 186, 198, 0.35); font-size: 0.43rem; font-style: italic; }
.steam-profile-loading,
.steam-profile-unavailable { display: grid; justify-items: center; gap: 0.75rem; padding: 5rem 1.2rem; text-align: center; }
.steam-profile-loading p,
.steam-profile-unavailable p { max-width: 34rem; margin: 0; color: rgba(202, 201, 201, 0.58); font-size: 0.68rem; line-height: 1.6; }
.steam-profile-unavailable h2 { margin: 0; color: #e8d7b9; font: 800 1.4rem/1 var(--font-serif, Georgia, serif); }
.steam-profile-unavailable-mark { color: #ddb66e; font-size: 3rem; text-shadow: 0 0 20px rgba(221, 182, 110, 0.35); }
.steam-profile-spinner { width: 2.5rem; height: 2.5rem; border: 2px solid rgba(218, 174, 92, 0.18); border-top-color: #deb76e; border-radius: 50%; animation: spin 0.9s linear infinite; }
@media (max-width: 980px) {
  .steam-profile-columns { grid-template-columns: 1fr; }
  .steam-profile-progress { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .steam-profile-backdrop { padding: 0.4rem; }
  .steam-profile-modal { width: 100%; max-height: 98vh; }
  .steam-profile-content { padding: 0.7rem; }
  .steam-profile-hero { grid-template-columns: auto minmax(0, 1fr); gap: 0.7rem; padding: 0.8rem; }
  .steam-profile-portrait { width: 6.4rem; height: 6.4rem; transform: scale(0.78); transform-origin: center; }
  .steam-profile-grade { grid-column: 1 / -1; grid-template-columns: auto auto auto; align-items: center; justify-content: center; gap: 0.6rem; }
  .steam-profile-grade > strong { font-size: 2.6rem; }
  .steam-profile-progress,
  .steam-profile-stat-grid,
  .steam-profile-gear-grid { grid-template-columns: 1fr; }
  .leaderboard-inspect-cue.is-row { padding-inline: 0.38rem; font-size: 0.43rem; }
}

@media (max-width: 1180px), (max-height: 720px) {
  :root {
    font-size: clamp(12px, min(1.35vw, 2.15vh), 16px);
  }
}

@media (max-width: 900px), (max-height: 560px) {
  :root {
    font-size: 12px;
  }
}

.vespera-hero-picker,
.vespera-hero-picker * {
  box-sizing: border-box;
}

.vespera-hero-picker__grid,
.vespera-hero-picker__card,
.vespera-hero-picker__body {
  min-width: 0;
}

.vespera-hero-picker__card {
  overflow: hidden !important;
}

.vespera-hero-picker__body {
  overflow: hidden !important;
}

.vespera-hero-picker__description,
.vespera-hero-picker__focus {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vespera-hero-picker__description {
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.vespera-hero-picker__focus {
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.vespera-hero-picker__world-role {
  min-width: 0;
  max-width: 100%;
  padding: 6px 8px;
  border-left: 2px solid rgb(var(--brass-rgb) / 0.62);
  background: linear-gradient(90deg, rgb(var(--brass-rgb) / 0.1), transparent);
  color: rgb(var(--parchment-rgb) / 0.88);
  font-family: var(--font-body, Lato, sans-serif);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
}

.vespera-hero-picker__world-role p {
  display: -webkit-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

@media (max-width: 1180px), (max-height: 720px) {
  .vespera-hero-picker__frame {
    gap: 8px !important;
    padding-top: 10px !important;
    padding-bottom: 8px !important;
  }

  .vespera-hero-picker__header {
    gap: 10px !important;
  }

  .vespera-hero-picker__header h1 {
    font-size: clamp(1.65rem, 4.4vh, 2.25rem) !important;
    line-height: 1 !important;
  }

  .vespera-hero-picker__header p {
    margin-top: 2px !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  .vespera-hero-picker__grid {
    flex: 1 1 auto !important;
    width: min(96vw, 1500px) !important;
    max-height: none !important;
    gap: clamp(8px, 1vw, 12px) !important;
    padding-top: 2px !important;
  }

  .vespera-hero-picker__card {
    min-width: 0 !important;
    transform: none !important;
  }

  .vespera-hero-picker__image {
    flex-basis: 44% !important;
  }

  .vespera-hero-picker__body {
    padding: 10px !important;
  }

  .vespera-hero-picker__body h2 {
    font-size: clamp(1.05rem, 3.35vh, 1.45rem) !important;
  }

  .vespera-hero-picker__description {
    margin-top: 6px !important;
    font-size: 12px !important;
    line-height: 1.32 !important;
  }

  .vespera-hero-picker__focus {
    display: none !important;
  }

  .vespera-hero-picker__world-role {
    margin-top: 6px !important;
    padding: 4px 6px !important;
    font-size: 10px !important;
    line-height: 1.22 !important;
  }

  .vespera-hero-picker__traits {
    gap: 6px !important;
    padding-top: 8px !important;
  }

  .vespera-hero-picker__traits > span {
    padding: 3px 7px !important;
    font-size: 9px !important;
  }

  .vespera-hero-picker__actions {
    flex: 0 0 auto !important;
    grid-template-columns: minmax(180px, 260px) minmax(220px, 280px) 0 !important;
    gap: 10px !important;
    padding-top: 8px !important;
  }

  .vespera-hero-picker__actions input,
  .vespera-hero-picker__actions button {
    height: 44px !important;
  }
}

@media (max-width: 980px) {
  .vespera-hero-picker {
    overflow-y: auto !important;
    overscroll-behavior: contain;
  }

  .vespera-hero-picker__frame {
    height: auto !important;
    min-height: 100dvh !important;
    padding-bottom: 142px !important;
    overflow: visible !important;
  }

  .vespera-hero-picker__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    flex: 0 0 auto !important;
    width: min(94vw, 760px) !important;
    min-height: 0 !important;
  }

  .vespera-hero-picker__card {
    min-height: 440px !important;
  }

  .vespera-hero-picker__actions {
    position: fixed !important;
    left: 50% !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: min(94vw, 360px) !important;
    margin: 0 auto !important;
    max-height: calc(100dvh - 16px) !important;
    padding: 8px !important;
    overflow-y: auto !important;
    border: 1px solid rgb(var(--brass-rgb) / 0.55) !important;
    border-radius: 9px !important;
    background: linear-gradient(180deg, rgba(10, 22, 41, 0.98), rgba(4, 11, 23, 0.99)) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 238, 190, 0.08) !important;
    backdrop-filter: blur(8px);
  }

  .vespera-hero-picker__actions > div {
    display: none !important;
  }
}

@media (min-width: 981px) and (max-height: 720px) {
  .vespera-hero-picker__frame {
    padding-bottom: 78px !important;
  }

  .vespera-hero-picker__grid {
    flex: 0 0 calc(100dvh - 164px) !important;
    height: calc(100dvh - 164px) !important;
    max-height: calc(100dvh - 164px) !important;
    min-height: 0 !important;
  }

  .vespera-hero-picker__actions {
    position: fixed !important;
    left: 50% !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    transform: translateX(-50%) !important;
    grid-template-columns: minmax(180px, 260px) minmax(220px, 280px) !important;
    width: min(96vw, 570px) !important;
    margin: 0 auto !important;
    padding: 8px !important;
    border: 1px solid rgb(var(--brass-rgb) / 0.55) !important;
    border-radius: 9px !important;
    background: linear-gradient(180deg, rgba(10, 22, 41, 0.98), rgba(4, 11, 23, 0.99)) !important;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 238, 190, 0.08) !important;
    backdrop-filter: blur(8px);
  }

  .vespera-hero-picker__actions > div {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .vespera-hero-picker__header-spacer {
    width: 44px !important;
  }

  .vespera-hero-picker__back,
  .vespera-hero-picker__settings {
    min-width: 44px !important;
    padding-inline: 8px !important;
  }

  .vespera-hero-picker__settings-label {
    display: none !important;
  }
}


.tower-vanguard-tab {
  display: grid;
  gap: 16px;
}

.tower-vanguard-tab .combat-zone-panel {
  border-color: rgba(201, 168, 92, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 13, 27, 0.92), rgba(4, 8, 18, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 239, 181, 0.06), 0 18px 46px rgba(0, 0, 0, 0.24);
}

.tower-vanguard-tab .tower-vanguard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 5px;
  min-width: 220px;
  padding: 18px;
}

.tower-vanguard-eyebrow,
.tower-vanguard-card__header > div > span {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-celestial-gold, #ffd666);
}

.tower-vanguard-hero h3 {
  margin: 0;
  display: block;
  white-space: normal;
  font-family: var(--font-serif, serif);
  font-size: clamp(1.55rem, 2.05vw, 2.05rem);
  letter-spacing: 0;
  line-height: 1.05;
  color: var(--color-parchment);
}

.tower-vanguard-hero p,
.tower-vanguard-card__header p {
  margin: 0;
  max-width: 780px;
  min-width: 220px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(203, 213, 230, 0.82);
}

.tower-vanguard-grid {
  display: grid;
  grid-template-columns: minmax(360px, 380px) minmax(460px, 1fr) minmax(420px, 0.95fr);
  gap: 16px;
  align-items: stretch;
}

.tower-vanguard-tab .tower-vanguard-center {
  display: grid;
  gap: 16px;
  min-width: 420px;
}

.tower-vanguard-tab .tower-vanguard-card,
.tower-vanguard-tab .tower-vanguard-claim-panel {
  min-width: 0;
  padding: 14px;
  overflow: hidden;
}

.tower-vanguard-tab .tower-vanguard-card {
  display: block;
  grid-template-columns: none;
  align-items: initial;
}

.tower-vanguard-card__header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-height: 54px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(201, 168, 92, 0.12);
}

.tower-vanguard-card__header > div {
  min-width: 0;
}

.tower-vanguard-link {
  min-height: 34px;
  white-space: nowrap;
  font-size: 12px;
}

.tower-vanguard-tab .tower-vanguard-claim-panel {
  display: grid;
  grid-template-columns: none;
  align-items: initial;
  gap: 12px;
}

.tower-vanguard-claim-panel__top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tower-vanguard-claim-panel__meter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.tower-vanguard-claim-chip,
.tower-vanguard-rune,
.tower-vanguard-card__header strong {
  min-width: 220px;
  border: 1px solid rgba(201, 168, 92, 0.24);
  border-radius: 4px;
  background: rgba(201, 168, 92, 0.1);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-celestial-gold, #ffd666);
}

.tower-vanguard-claim-posts {
  color: #6ee7b7;
  border-color: rgba(110, 231, 183, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

.tower-vanguard-rune,
.tower-vanguard-card__header strong {
  min-width: 0;
  white-space: nowrap;
}

.tower-vanguard-claim__button {
  min-height: 38px;
  min-width: 220px;
  font-size: 12px;
}

.tower-vanguard-roster__list,
.tower-vanguard-post-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.tower-vanguard-post-list {
  grid-template-columns: 1fr;
}

.tower-vanguard-merc,
.tower-vanguard-post {
  min-width: 260px;
  border: 1px solid rgba(201, 168, 92, 0.16);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(10, 17, 33, 0.92), rgba(5, 8, 17, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 239, 181, 0.05);
}

.tower-vanguard-merc {
  display: grid;
  grid-template-columns: 72px minmax(220px, 1fr);
  gap: 14px;
  padding: 10px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tower-vanguard-merc--locked,
.tower-vanguard-merc--blocked {
  opacity: 0.55;
}

.tower-vanguard-merc--pickable {
  border-color: rgba(110, 231, 183, 0.52);
  box-shadow: inset 0 0 18px rgba(110, 231, 183, 0.06), 0 0 18px rgba(110, 231, 183, 0.12);
}

.tower-vanguard-merc img {
  width: 72px;
  height: 88px;
  border: 1px solid rgba(201, 168, 92, 0.26);
  border-radius: 4px;
  object-fit: cover;
  object-position: top center;
}

.tower-vanguard-merc__body {
  display: grid;
  align-content: center;
  min-width: 220px;
  gap: 7px;
}

.tower-vanguard-merc__top,
.tower-vanguard-merc__meta,
.tower-vanguard-merc__footer,
.tower-vanguard-post__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 220px;
  flex-wrap: wrap;
}

.tower-vanguard-merc__top strong,
.tower-vanguard-post__assigned-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-serif, serif);
  color: var(--color-parchment);
}

.tower-vanguard-merc__top strong {
  font-size: 16px;
}

.tower-vanguard-post__assigned-name {
  display: block;
  font-size: 17px;
}

.tower-vanguard-merc__top span,
.tower-vanguard-post__meta span {
  border: 1px solid rgba(201, 168, 92, 0.28);
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-celestial-gold, #ffd666);
}

.tower-vanguard-merc__meta span,
.tower-vanguard-merc__state,
.tower-vanguard-post__title span,
.tower-vanguard-post__copy > span,
.tower-vanguard-capacity > div:first-child {
  font-size: 12px;
  color: rgba(203, 213, 230, 0.82);
}

.tower-vanguard-merc__state {
  flex: 1 1 220px;
}

.tower-vanguard-post__meta {
  min-width: 0;
}

.tower-vanguard-post-here,
.tower-vanguard-assign {
  min-height: 32px;
  min-width: 124px;
  font-size: 12px;
}

.tower-vanguard-condition {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.tower-vanguard-condition i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #67e8a7;
  box-shadow: 0 0 8px rgba(103, 232, 167, 0.72);
}

.tower-vanguard-condition--strained i {
  background: #ffd666;
  box-shadow: 0 0 8px rgba(255, 214, 102, 0.72);
}

.tower-vanguard-condition--worn i {
  background: #f87171;
  box-shadow: 0 0 8px rgba(248, 113, 113, 0.72);
}

.tower-vanguard-empty {
  margin-top: 12px;
  min-width: 220px;
  border: 1px dashed rgba(201, 168, 92, 0.18);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.18);
  padding: 18px;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(224, 194, 132, 0.82);
}

.tower-vanguard-post {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
}

.tower-vanguard-post--active {
  border-color: rgba(255, 214, 102, 0.34);
  box-shadow: inset 0 0 18px rgba(255, 214, 102, 0.05), 0 0 16px rgba(201, 168, 92, 0.08);
}

.tower-vanguard-post--locked {
  border-style: dashed;
  opacity: 0.72;
}

.tower-vanguard-post--picking {
  border-color: rgba(110, 231, 183, 0.52);
  box-shadow: 0 0 18px rgba(110, 231, 183, 0.12);
}

.tower-vanguard-post__title,
.tower-vanguard-capacity > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tower-vanguard-post__title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.tower-vanguard-post__assignment {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.tower-vanguard-post__title > div {
  min-width: 0;
}

.tower-vanguard-post__title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-serif, serif);
  font-size: clamp(16px, 1.05vw, 18px);
  color: var(--color-parchment);
}

.tower-vanguard-post__clear {
  min-height: 32px;
  min-width: 90px;
  font-size: 12px;
}

.tower-vanguard-post__portrait,
.tower-vanguard-post__empty-portrait {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 82px;
  border: 1px solid rgba(201, 168, 92, 0.26);
  border-radius: 5px;
  overflow: hidden;
  background: rgba(4, 8, 18, 0.86);
}

.tower-vanguard-post__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.tower-vanguard-post__portrait span {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  background: rgba(4, 8, 18, 0.86);
  padding: 3px 2px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-celestial-gold, #ffd666);
}

.tower-vanguard-post__empty-portrait {
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: rgba(224, 194, 132, 0.58);
}

.tower-vanguard-post__copy {
  display: grid;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
}

.tower-vanguard-rate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.tower-vanguard-rate-grid > div {
  min-width: 0;
  border: 1px solid rgba(201, 168, 92, 0.14);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.2);
  padding: 8px;
}

.tower-vanguard-rate-grid span {
  display: block;
  font-size: 12px;
  color: rgba(203, 213, 230, 0.7);
}

.tower-vanguard-rate-grid strong {
  display: block;
  margin-top: 4px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  color: var(--color-celestial-gold, #ffd666);
}

.tower-vanguard-capacity {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.tower-vanguard-capacity strong {
  color: var(--color-parchment);
}

.tower-vanguard-capacity__bar {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 92, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
}

.tower-vanguard-capacity__bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6ee7b7, #ffd666);
  box-shadow: 0 0 12px rgba(255, 214, 102, 0.42);
}

.tower-vanguard-tab .tower-vanguard-art-panel {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto;
  grid-template-columns: none;
  align-items: stretch;
  min-width: 420px;
}

.tower-vanguard-art {
  position: relative;
  width: 100%;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 92, 0.2);
  border-radius: 7px;
  background: #02050d;
}

.tower-vanguard-art--image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 5, 12, 0.06), rgba(2, 5, 12, 0.24)),
    radial-gradient(circle at 50% 20%, rgba(255, 214, 102, 0.16), transparent 24%);
}

.tower-vanguard-art__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.02) contrast(1.04);
}

.tower-vanguard-art__windows {
  position: absolute;
  inset: 14% 0 auto;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 34px;
  pointer-events: none;
}

.tower-vanguard-art__windows span {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(201, 168, 92, 0.18);
  border-radius: 999px;
  background: rgba(2, 5, 12, 0.86);
}

.tower-vanguard-art__windows span.is-lit {
  border-color: rgba(255, 214, 102, 0.75);
  background: #ffd666;
  box-shadow: 0 0 20px rgba(255, 214, 102, 0.86), 0 0 48px rgba(255, 214, 102, 0.38);
}

.tower-vanguard-art__caption {
  min-width: 220px;
  padding-top: 10px;
  white-space: nowrap;
  text-align: center;
  font-size: 12px;
  color: rgba(203, 213, 230, 0.82);
}

@media (min-width: 1440px) {
  .tower-vanguard-post-list {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (max-width: 1439px) {
  .tower-vanguard-grid {
    grid-template-columns: minmax(360px, 380px) minmax(420px, 1fr);
  }

  .tower-vanguard-art-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 920px) {
  .tower-vanguard-grid,
  .tower-vanguard-claim-panel__meter-row {
    grid-template-columns: 1fr;
  }

  .tower-vanguard-center,
  .tower-vanguard-art-panel {
    min-width: 420px;
  }
}

.tower-ascent-tile--approach {
  animation: towerApproachPulse 1.35s ease-in-out infinite;
}

.tower-nameplate-panel--boss-approach {
  border-color: rgba(239, 68, 68, 0.44);
  background:
    linear-gradient(135deg, rgba(54, 14, 22, 0.9), rgba(13, 25, 48, 0.78)),
    radial-gradient(circle at 82% 18%, rgba(239, 68, 68, 0.16), transparent 34%);
}

.tower-nameplate-panel--guardian-approach {
  border-color: rgba(243, 201, 109, 0.58);
  background:
    linear-gradient(135deg, rgba(47, 38, 18, 0.92), rgba(13, 25, 48, 0.78)),
    radial-gradient(circle at 82% 18%, rgba(243, 201, 109, 0.2), transparent 34%);
}

.tower-waystone-panel.combat-zone-panel,
.tower-locked-card.combat-zone-panel,
.tower-cta-panel.combat-zone-panel {
  display: block;
  padding: 16px;
  overflow: visible;
}

.tower-waystone-panel__header,
.tower-cta-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.tower-waystone-panel__eyebrow,
.tower-locked-card__eyebrow,
.tower-cta-panel__eyebrow {
  display: block;
  color: rgba(214, 169, 79, 0.84);
  font: 800 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tower-waystone-panel h3,
.tower-locked-card h3,
.tower-cta-panel h3 {
  margin: 4px 0 0;
  color: var(--color-parchment, #f4e8d0);
  font: 800 24px/1.08 var(--font-serif, serif);
}

.tower-waystone-panel p,
.tower-locked-card p,
.tower-cta-panel p {
  margin: 6px 0 0;
  color: rgba(203, 213, 225, 0.82);
  font: 500 12px/1.45 var(--font-ui, inherit);
}

.tower-waystone-manual {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.tower-waystone-manual input {
  width: 158px;
  border: 1px solid rgba(214, 169, 79, 0.28);
  border-radius: 7px;
  background: rgba(3, 9, 18, 0.72);
  color: rgba(244, 232, 208, 0.94);
  font: 700 12px/1 var(--font-ui, inherit);
  padding: 0 10px;
  outline: none;
}

.tower-waystone-manual input:focus {
  border-color: rgba(243, 201, 109, 0.72);
}

.tower-waystone-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  padding: 2px 2px 8px;
}

.tower-waystone-panel--compact.combat-zone-panel {
  min-width: 0;
  padding: 10px;
}

.tower-waystone-panel--compact .tower-waystone-panel__header {
  align-items: flex-start;
  gap: 10px;
}

.tower-waystone-panel--compact .tower-waystone-panel__eyebrow {
  font-size: 10px;
  letter-spacing: 0.08em;
}

.tower-waystone-panel--compact h3 {
  font-size: 16px;
  line-height: 1.05;
}

.tower-waystone-panel--compact p {
  display: none;
}

.tower-waystone-panel--compact .tower-waystone-manual {
  flex: 0 0 auto;
  min-height: 32px;
}

.tower-waystone-panel--compact .tower-waystone-manual input {
  width: 122px;
  min-height: 32px;
  font-size: 11px;
}

.tower-waystone-panel--compact .tower-waystone-manual .btn-secondary {
  min-height: 32px;
  padding: 0 12px;
  font-size: 11px;
}

.tower-waystone-panel--compact .tower-waystone-row {
  gap: 6px;
  margin-top: 8px;
  padding-bottom: 3px;
}

.tower-waystone-panel--compact .tower-waystone-button {
  grid-template-columns: 1fr;
  min-width: 58px;
  min-height: 42px;
  gap: 0;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 10px;
}

.tower-waystone-panel--compact .tower-waystone-button__stone {
  display: none;
}

.tower-waystone-panel--compact .tower-waystone-button__label {
  gap: 1px;
}

.tower-waystone-panel--compact .tower-waystone-button__offset {
  right: 4px;
  top: 3px;
  padding: 2px 4px;
  font-size: 9px;
}

.tower-waystone-button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 5px;
  min-width: 76px;
  min-height: 78px;
  border: 1px solid rgba(214, 169, 79, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 18, 33, 0.84), rgba(3, 9, 18, 0.9));
  color: rgba(216, 207, 188, 0.86);
  font: 800 12px/1.1 var(--font-ui, inherit);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.tower-waystone-button:not(:disabled):hover {
  border-color: rgba(243, 201, 109, 0.68);
  transform: translateY(-1px);
}

.tower-waystone-button--current {
  border-color: rgba(243, 201, 109, 0.86);
  color: #f8d48b;
  box-shadow: 0 0 18px rgba(214, 169, 79, 0.18), inset 0 0 0 1px rgba(255, 244, 215, 0.08);
}

.tower-waystone-button--locked {
  opacity: 0.48;
  filter: grayscale(0.75);
}

.tower-waystone-button--boss:not(.tower-waystone-button--locked) {
  border-color: rgba(239, 68, 68, 0.42);
}

.tower-waystone-button--guardian:not(.tower-waystone-button--locked) {
  border-color: rgba(196, 181, 253, 0.52);
}

.tower-waystone-button__stone {
  width: 22px;
  height: 28px;
  clip-path: polygon(50% 0, 92% 24%, 78% 100%, 22% 100%, 8% 24%);
  background: linear-gradient(180deg, rgba(243, 201, 109, 0.92), rgba(67, 48, 22, 0.86));
  box-shadow: 0 0 12px rgba(214, 169, 79, 0.22);
}

.tower-waystone-button--locked .tower-waystone-button__stone {
  background: linear-gradient(180deg, rgba(71, 85, 105, 0.8), rgba(15, 23, 42, 0.92));
  box-shadow: none;
}

.tower-waystone-button__label {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
  line-height: 1;
  text-align: center;
}

.tower-waystone-button__floor {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tower-waystone-button__type {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
  justify-content: center;
  overflow: hidden;
  color: rgba(244, 232, 208, 0.88);
  font-size: 9px;
  letter-spacing: 0.04em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tower-waystone-panel--compact .tower-waystone-button__label {
  flex-direction: column;
}

.tower-waystone-panel--compact .tower-waystone-button__type {
  width: 100%;
  font-size: 7px;
  letter-spacing: 0;
}

.tower-waystone-button__offset {
  position: absolute;
  right: 7px;
  top: 6px;
  border: 1px solid rgba(249, 115, 22, 0.48);
  border-radius: 999px;
  background: rgba(34, 12, 5, 0.9);
  color: #fdba74;
  font: 900 12px/1 var(--font-ui, inherit);
  padding: 4px 5px;
}

.tower-locked-state {
  position: relative;
  min-height: 520px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
}

.tower-locked-state__fog {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 12%, rgba(214, 169, 79, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(3, 8, 16, 0.48), rgba(3, 8, 16, 0.94));
  z-index: 1;
}

.tower-locked-state__track {
  position: absolute;
  inset: 18px;
  opacity: 0.28;
  filter: grayscale(0.75) blur(0.5px);
  pointer-events: none;
}

.tower-locked-card.combat-zone-panel {
  position: relative;
  z-index: 2;
  width: min(560px, calc(100% - 24px));
  text-align: left;
}

.tower-locked-checklist {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.tower-locked-check {
  border: 1px solid rgba(214, 169, 79, 0.22);
  border-radius: 8px;
  background: rgba(3, 9, 18, 0.72);
  padding: 10px;
}

.tower-locked-check--complete {
  border-color: rgba(52, 211, 153, 0.34);
}

.tower-locked-check__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(244, 232, 208, 0.92);
  font: 800 12px/1.2 var(--font-ui, inherit);
}

.tower-locked-check__meter {
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
}

.tower-locked-check__meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #d6a94f, #34d399);
}

.tower-locked-link {
  min-width: 180px;
}

.tower-cta-panel__copy {
  min-width: 0;
}

.tower-cta-panel__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.tower-cta-button {
  min-width: 160px;
  font-size: 12px;
}

@keyframes towerApproachPulse {
  0%, 100% {
    box-shadow: 0 0 18px rgba(214, 169, 79, 0.14), inset 0 0 0 1px rgba(255, 244, 215, 0.05);
  }
  50% {
    box-shadow: 0 0 28px rgba(243, 201, 109, 0.28), inset 0 0 0 1px rgba(255, 244, 215, 0.12);
  }
}

@media (max-width: 900px) {
  .tower-waystone-panel__header,
  .tower-cta-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .tower-waystone-manual {
    width: 100%;
  }

  .tower-waystone-manual input {
    flex: 1;
    width: auto;
  }
}

.inventory-buy-slot {
  position: relative;
  width: 48px;
  height: 48px;
  overflow: visible;
  border: 1px dashed rgba(214, 169, 79, 0.42);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 18%, rgba(214, 169, 79, 0.16), transparent 58%),
    rgba(10, 20, 36, 0.48);
  color: rgba(248, 212, 139, 0.92);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.inventory-buy-slot:hover,
.inventory-buy-slot:focus-visible {
  border-color: rgba(248, 212, 139, 0.86);
  background:
    radial-gradient(circle at 50% 18%, rgba(248, 212, 139, 0.26), transparent 60%),
    rgba(17, 29, 50, 0.7);
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, 0.45),
    0 0 16px rgba(214, 169, 79, 0.18);
  transform: translateY(-1px);
}

.inventory-buy-slot.is-expensive {
  border-color: rgba(239, 118, 118, 0.42);
  color: rgba(255, 190, 190, 0.88);
}

.inventory-buy-slot__plus,
.inventory-buy-slot__cost {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.inventory-buy-slot__plus {
  top: 7px;
  font: 800 20px/1 var(--font-serif, serif);
}

.inventory-buy-slot__cost {
  bottom: 6px;
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inventory-buy-slot[data-help]::after {
  content: attr(data-help);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 2147483647;
  width: min(240px, 76vw);
  padding: 8px 10px;
  border: 1px solid rgba(214, 169, 79, 0.48);
  border-radius: 6px;
  background: rgba(3, 8, 17, 0.97);
  color: rgba(244, 232, 208, 0.94);
  font: 700 11px/1.35 var(--font-body, inherit);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.58),
    0 0 18px rgba(214, 169, 79, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.inventory-buy-slot[data-help]:hover::after,
.inventory-buy-slot[data-help]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.world-resource-chip {
  position: relative;
  cursor: help;
  z-index: 1;
}

.world-resource-chip:hover {
  z-index: 2147483647;
}

.combat-enemy-card {
  z-index: 1;
}

.combat-enemy-card:hover {
  z-index: 1200;
}

[data-area-combat-item] {
  cursor: context-menu !important;
}

.world-resource-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 2147483647;
  width: 224px;
  padding: 8px 10px;
  border: 1px solid rgb(var(--brass-rgb) / 0.38);
  border-radius: 6px;
  background: rgba(7, 18, 33, 0.96);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  color: var(--color-lavender-grey);
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(2px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.world-resource-chip:hover .world-resource-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.world-resource-tooltip--start {
  left: 0;
  right: auto;
  transform: translateY(2px);
}

.world-resource-chip:hover .world-resource-tooltip--start {
  transform: translateY(0);
}

.world-resource-tooltip--end {
  left: auto;
  right: 0;
  transform: translateY(2px);
}

.world-resource-chip:hover .world-resource-tooltip--end {
  transform: translateY(0);
}

.world-resource-tooltip__title {
  display: block;
  color: var(--color-brass);
  font-family: var(--font-serif);
  font-size: 11px;
  line-height: 1.2;
}

.world-resource-tooltip__body {
  display: block;
  margin-top: 4px;
  color: var(--color-lavender-grey);
  font-size: 10px;
  line-height: 1.35;
}

.world-resource-tooltip__meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.world-resource-tooltip__meta-line + .world-resource-tooltip__meta-line {
  margin-top: 2px;
}

.world-resource-tooltip__meta-line strong,
.world-resource-tooltip__stat-row strong {
  color: var(--color-parchment);
  font-weight: 800;
}

.world-resource-tooltip__stats {
  display: block;
  margin-top: 6px;
  padding-top: 5px;
  border-top: 1px solid rgb(var(--brass-rgb) / 0.18);
}

.world-resource-tooltip__stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.world-resource-tooltip__stat-row + .world-resource-tooltip__stat-row {
  margin-top: 2px;
}

.quest-objective-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  flex: 0 1 auto !important;
  color: #7dffae !important;
  font-size: 12px !important;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgba(125, 255, 174, 0.42);
  text-underline-offset: 3px;
}

.quest-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(217, 184, 129, 0.16);
}

.quest-section__header h2 {
  margin: 0;
  color: var(--color-parchment, #f4e8d0);
  font-family: var(--font-serif, serif);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.quest-section__header span {
  color: rgba(217, 184, 129, 0.7);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.quest-card-title {
  display: -webkit-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.quest-card-description {
  min-height: 0;
  max-height: none;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.quest-requirement-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.quest-requirement-chip {
  max-width: 100%;
  padding: 0.22rem 0.42rem;
  border: 1px solid;
  border-radius: 0.2rem;
  font-family: var(--font-ui, Lato, sans-serif);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.035em;
  text-align: left;
  transition:
    border-color 120ms ease,
    filter 120ms ease;
}
.quest-requirement-chip:not(:disabled):hover {
  filter: brightness(1.18);
}
.quest-requirement-chip--met {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(20, 83, 45, 0.2);
  color: rgba(187, 247, 208, 0.82);
}
.quest-requirement-chip--blocked {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.22);
  color: rgba(254, 202, 202, 0.9);
}

.skill-engraving-layout {
  height: clamp(440px, calc(100vh - 280px), 620px);
  max-height: 100%;
  overflow: hidden;
}

.skill-engraving-resource-bar {
  width: 100% !important;
}

.skill-engraving-resource {
  flex: 1 1 11rem;
  min-width: 10.5rem;
  border: 1px solid rgba(217, 184, 129, 0.12);
}

.skill-engraving-resource__purpose,
.skill-engraving-resource__source {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.58rem;
  line-height: 1.15;
}

.skill-engraving-resource__purpose {
  color: rgba(232, 220, 190, 0.76);
}

.skill-engraving-resource__source {
  margin-top: 0.12rem;
  color: rgba(217, 184, 129, 0.72);
  font-weight: 800;
}

.skill-engraving-column,
.skill-engraving-scroll {
  min-height: 0;
}

.skill-engraving-scroll {
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.skill-engraving-action {
  position: relative;
  z-index: 4;
  isolation: isolate;
  min-width: 4.4rem;
  min-height: 2.45rem;
  pointer-events: auto;
  touch-action: manipulation;
}

.skill-engraving-action::before,
.skill-engraving-action::after {
  pointer-events: none;
}

@media (max-width: 1023px) {
  .skill-engraving-layout {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .skill-engraving-column {
    min-height: 28rem;
    max-height: min(70vh, 620px);
  }
}

.quest-objective-link__label {
  min-width: 0;
}

.quest-objective-link__arrow {
  display: inline-grid;
  flex: 0 0 16px;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(125, 255, 174, 0.46);
  border-radius: 4px;
  background: rgba(34, 197, 94, 0.12);
  color: #b7ffd0;
  font-size: 10px;
  line-height: 1;
  text-decoration: none;
  transform: translateY(-1px);
}

.quest-objective-link:hover {
  color: #d4ffe4 !important;
  text-decoration-color: rgba(212, 255, 228, 0.82);
}

.quest-objective-link:hover .quest-objective-link__arrow {
  border-color: rgba(212, 255, 228, 0.82);
  background: rgba(34, 197, 94, 0.22);
}

.quest-objective-link--complete {
  color: #7dffae !important;
}

.gather-header-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.gather-sort-select {
  flex: 0 1 180px;
  width: 180px;
}

.gather-sort-select__trigger {
  height: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border-color: rgba(226, 185, 98, 0.5);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(24, 43, 38, 0.92), rgba(8, 18, 24, 0.92));
  color: #f3d899;
  font-family: var(--font-ui, var(--font-body, sans-serif));
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.gather-sort-select__trigger:hover:not(:disabled),
.gather-sort-select__trigger:focus-visible,
.gather-sort-select__trigger[aria-expanded="true"] {
  border-color: rgba(226, 185, 98, 0.82);
  background:
    linear-gradient(180deg, rgba(34, 58, 48, 0.98), rgba(11, 24, 31, 0.98));
  color: #ffe8ae;
}

.gather-layout-toggle,
.gather-map-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(226, 185, 98, 0.5);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(24, 43, 38, 0.92), rgba(8, 18, 24, 0.92));
  color: #f3d899;
  font-family: var(--font-ui, var(--font-body, sans-serif));
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.24);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.gather-layout-toggle:hover,
.gather-map-trigger:hover,
.gather-map-trigger.is-open {
  border-color: rgba(226, 185, 98, 0.82);
  background:
    linear-gradient(180deg, rgba(34, 58, 48, 0.98), rgba(11, 24, 31, 0.98));
  color: #ffe8ae;
  transform: translateY(-1px);
}

.gather-map-trigger {
  justify-content: flex-start;
  gap: 10px;
  min-width: 220px;
  padding: 7px 11px;
  text-align: left;
  text-transform: none;
}

.gather-map-trigger__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid rgba(226, 185, 98, 0.32);
  border-radius: 50%;
  background: rgba(4, 13, 21, 0.72);
  color: #e2b962;
  font-size: 18px;
  line-height: 1;
}

.gather-map-trigger__copy {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.gather-map-trigger__label {
  color: rgba(199, 214, 194, 0.62);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gather-map-trigger__copy strong {
  overflow: hidden;
  color: #f6e5b5;
  font-family: var(--font-serif, serif);
  font-size: 12px;
  font-style: italic;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gather-map-trigger__hint {
  overflow: hidden;
  color: rgba(166, 224, 184, 0.82);
  font: 700 9px/1.2 var(--font-body, sans-serif);
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gather-map-trigger__chevron {
  color: rgba(226, 185, 98, 0.72);
  font-size: 16px;
  transition: transform 0.16s ease;
}

.gather-map-trigger.is-open .gather-map-trigger__chevron {
  transform: rotate(180deg);
}

.gather-map-menu {
  position: fixed;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 185, 98, 0.56);
  border-radius: 8px;
  background:
    linear-gradient(155deg, rgba(5, 16, 25, 0.995), rgba(2, 8, 15, 0.995));
  box-shadow:
    0 24px 58px rgba(0, 0, 0, 0.72),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(8px);
}

.gather-map-menu__header {
  flex: 0 0 auto;
  padding: 14px 15px 12px;
  border-bottom: 1px solid rgba(226, 185, 98, 0.18);
  background:
    radial-gradient(circle at 15% 0%, rgba(102, 153, 101, 0.18), transparent 52%),
    rgba(8, 20, 27, 0.82);
}

.gather-map-menu__eyebrow {
  margin-bottom: 3px;
  color: rgba(226, 185, 98, 0.75);
  font: 900 8px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.gather-map-menu__title {
  color: #fff0c6;
  font: italic 800 18px/1.2 var(--font-serif, serif);
}

.gather-map-menu__description {
  margin-top: 5px;
  color: rgba(205, 215, 205, 0.68);
  font: 500 10px/1.35 var(--font-body, sans-serif);
}

.area-selector-coachmark {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(116, 204, 147, 0.4);
  border-radius: 6px;
  background:
    linear-gradient(110deg, rgba(31, 83, 59, 0.34), rgba(8, 27, 29, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.area-selector-coachmark__icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(166, 224, 184, 0.45);
  border-radius: 50%;
  color: #b7e9c6;
  font: italic 900 12px/1 var(--font-serif, serif);
}

.area-selector-coachmark__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  color: rgba(211, 232, 216, 0.8);
  font: 500 9px/1.35 var(--font-body, sans-serif);
}

.area-selector-coachmark__copy strong {
  color: #d8f3df;
  font: 800 10px/1.2 var(--font-ui, sans-serif);
}

.area-selector-coachmark__dismiss {
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(226, 185, 98, 0.48);
  border-radius: 5px;
  background: rgba(39, 32, 20, 0.72);
  color: #f3d899;
  font: 900 9px/1 var(--font-ui, sans-serif);
  white-space: nowrap;
}

.area-selector-coachmark__dismiss:hover {
  border-color: rgba(226, 185, 98, 0.82);
  background: rgba(63, 48, 25, 0.88);
  color: #ffe8ae;
}

.gather-map-menu__list {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-color: rgba(226, 185, 98, 0.4) rgba(4, 12, 18, 0.8);
}

.gather-map-option {
  display: flex;
  width: 100%;
  min-height: 68px;
  align-items: center;
  gap: 10px;
  padding: 7px;
  border: 1px solid rgba(120, 164, 132, 0.24);
  border-radius: 6px;
  background: rgba(8, 22, 29, 0.82);
  color: #e8ddbf;
  text-align: left;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.gather-map-option:not(:disabled):hover {
  border-color: rgba(226, 185, 98, 0.68);
  background: rgba(25, 48, 43, 0.94);
  transform: translateX(2px);
}

.gather-map-option.is-current {
  border-color: rgba(226, 185, 98, 0.58);
  background:
    linear-gradient(90deg, rgba(69, 77, 42, 0.48), rgba(10, 25, 30, 0.88));
}

.gather-map-option.is-locked {
  cursor: not-allowed;
  border-color: rgba(114, 123, 126, 0.16);
  background: rgba(9, 14, 19, 0.76);
  color: rgba(179, 185, 183, 0.54);
}

.gather-map-option__image {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border: 1px solid rgba(226, 185, 98, 0.25);
  border-radius: 5px;
  object-fit: cover;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.7);
}

.area-selector-option__all-icon {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(226, 185, 98, 0.2), transparent 58%),
    rgba(12, 35, 38, 0.92);
  color: #e2b962;
}

.area-selector-option__all-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  filter: drop-shadow(0 0 5px rgba(226, 185, 98, 0.38));
}

.gather-map-option.is-locked .gather-map-option__image {
  filter: grayscale(1) brightness(0.48);
  opacity: 0.7;
}

.gather-map-option__body {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
}

.gather-map-option__heading {
  display: flex;
  min-width: 0;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.gather-map-option__heading strong {
  overflow: hidden;
  color: #f5e7c4;
  font: italic 800 13px/1.2 var(--font-serif, serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gather-map-option.is-locked .gather-map-option__heading strong {
  color: rgba(190, 195, 190, 0.58);
}

.gather-map-option__level {
  flex: 0 0 auto;
  color: rgba(226, 185, 98, 0.72);
  font: 900 8px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
}

.gather-map-option__resources {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 9px;
  color: rgba(184, 205, 186, 0.68);
  font: 700 8px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gather-map-option__resources > span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.gather-map-option__resource-icon,
.gather-map-option__resource-icon svg {
  width: 10px;
  height: 10px;
}

.gather-map-option__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(226, 185, 98, 0.78);
  font: 900 8px/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gather-map-option.is-locked .gather-map-option__status {
  color: rgba(168, 175, 176, 0.62);
}

.gather-map-option__status svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.gather-map-option__arrow {
  padding-right: 3px;
  color: #e2b962;
  font-size: 24px;
  line-height: 1;
}

.combat-map-zone-panel .area-selector-trigger {
  width: min(100%, 310px);
  min-width: 0;
  justify-self: end;
}

.area-selector-option__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: rgba(184, 205, 186, 0.7);
  font: 800 8px/1.25 var(--font-ui, sans-serif);
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.area-selector-option__meta > span {
  position: relative;
}

.area-selector-option__meta > span + span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -6px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(226, 185, 98, 0.55);
  transform: translateY(-50%);
}

.area-selector-option__meta .is-boss {
  color: rgba(236, 183, 111, 0.9);
}

.area-selector-option.is-locked .area-selector-option__meta {
  color: rgba(168, 175, 176, 0.48);
}

.area-selector-notice {
  flex: 0 0 auto;
  margin: 8px 8px 0;
  padding: 8px 10px;
  border: 1px solid rgba(116, 204, 147, 0.28);
  border-radius: 5px;
  background: rgba(31, 83, 59, 0.2);
  color: rgba(194, 239, 208, 0.86);
  font: 700 10px/1.35 var(--font-body, sans-serif);
}

.area-selector-notice.is-warning {
  border-color: rgba(222, 145, 94, 0.34);
  background: rgba(110, 48, 27, 0.22);
  color: rgba(246, 200, 165, 0.9);
}

.area-selector-confirm {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-top: 1px solid rgba(226, 185, 98, 0.22);
  background: rgba(18, 13, 12, 0.98);
}

.area-selector-confirm p {
  margin: 0 0 8px;
  color: rgba(244, 224, 193, 0.88);
  font: 700 10px/1.35 var(--font-body, sans-serif);
}

.area-selector-confirm > div {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.area-selector-confirm button {
  min-height: 30px;
  padding: 6px 12px;
  font-size: 10px;
}

.gather-layout-horizontal {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  width: 100%;
}

.gather-skill-panel--horizontal {
  min-width: 0;
}

.gather-skill-panel--horizontal {
  margin-bottom: 0;
}

.gather-skill-heading {
  min-height: 36px;
}

.gather-skill-collapse-toggle {
  width: 100%;
  justify-content: space-between;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  background: transparent;
  text-align: left;
}

.gather-skill-collapse-toggle:hover {
  color: #ffe8ae;
}

.gather-skill-collapse-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 4px 8px;
  border: 1px solid rgba(214, 169, 79, 0.22);
  border-radius: 999px;
  background: rgba(3, 12, 23, 0.58);
  color: rgba(217, 184, 129, 0.86);
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.gather-horizontal-card-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-width: 0;
  padding: 0;
}

.gather-horizontal-card-row .gather-node-card {
  width: 100%;
}

@media (max-width: 900px) {
  .gather-header-actions {
    width: 100%;
    justify-content: center;
  }

  .gather-map-trigger {
    min-width: 0;
    flex: 1 1 210px;
  }

  .gather-sort-select {
    flex: 0 1 180px;
  }

  .gather-layout-toggle {
    flex: 0 1 auto;
  }

  .combat-map-zone-panel .area-selector-trigger {
    width: 100%;
    grid-column: 1 / -1;
  }
}

@media (min-width: 521px) and (max-width: 1200px) {
  .gather-layout-horizontal {
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    overflow-x: auto;
    padding-bottom: 8px;
  }
}

@media (max-width: 520px) {
  .gather-layout-horizontal {
    grid-template-columns: minmax(0, 1fr);
  }

  .gather-header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gather-map-trigger,
  .gather-sort-select,
  .gather-layout-toggle {
    flex: 0 0 auto;
    width: 100%;
  }

  .area-selector-coachmark {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .area-selector-coachmark__dismiss {
    grid-column: 2;
    justify-self: start;
  }
}

.gather-node-card {
  isolation: isolate;
  overflow: hidden;
  border-radius: 8px !important;
  background:
    linear-gradient(145deg, rgba(3, 12, 20, 0.98), rgba(17, 27, 35, 0.94)) !important;
  border: 1px solid rgba(125, 164, 132, 0.32) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 18px 34px rgba(0, 0, 0, 0.34) !important;
}

.gather-node-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  z-index: 2;
  border: 1px solid rgba(215, 194, 143, 0.16);
  border-radius: 5px;
  pointer-events: none;
}

.gather-node-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  width: 5px;
  background: linear-gradient(180deg, #83d29c, #d5aa55 48%, #264a54);
  opacity: 0.78;
  pointer-events: none;
}

.gather-node-card:hover {
  transform: translateY(-2px);
  border-color: rgba(215, 194, 143, 0.55) !important;
}

.gather-node-card--active {
  border-color: rgba(226, 185, 98, 0.72) !important;
  box-shadow:
    inset 0 0 0 1px rgba(226, 185, 98, 0.18),
    0 0 0 1px rgba(226, 185, 98, 0.08),
    0 18px 38px rgba(0, 0, 0, 0.42) !important;
}

.gather-node-card--locked {
  filter: saturate(0.66) brightness(0.82) !important;
}

.gather-node-media {
  border-radius: 8px;
}

.gather-node-image {
  opacity: 0.45 !important;
  filter: saturate(0.9) contrast(1.06);
  transform: scale(1.04);
}

.gather-node-card:hover .gather-node-image {
  opacity: 0.62 !important;
  transform: scale(1.08);
}

.gather-node-image--locked {
  opacity: 0.26 !important;
  filter: grayscale(1) contrast(0.9);
}

.gather-node-image--active {
  opacity: 0.64 !important;
}

.gather-node-scrim {
  background:
    linear-gradient(90deg, rgba(2, 8, 14, 0.94) 0%, rgba(2, 8, 14, 0.78) 48%, rgba(2, 8, 14, 0.5) 100%),
    linear-gradient(0deg, rgba(2, 8, 14, 0.98) 0%, rgba(2, 8, 14, 0.4) 58%, rgba(255, 255, 255, 0.04) 100%) !important;
}

.gather-node-active-glow {
  background:
    radial-gradient(circle at 84% 18%, rgba(132, 245, 161, 0.18), transparent 26%),
    linear-gradient(90deg, rgba(226, 185, 98, 0.08), transparent 55%) !important;
  animation: none !important;
}

.gather-node-shell {
  padding: 16px 16px 14px 20px !important;
}

.gather-node-shell::before {
  content: "FIELD SITE";
  position: absolute;
  top: 17px;
  left: 20px;
  z-index: 1;
  color: rgba(168, 194, 181, 0.78);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gather-node-card--active .gather-node-shell::before {
  content: "ACTIVE SITE";
  color: #aef5bd;
}

.gather-node-topline {
  min-height: 24px;
  margin-bottom: 8px !important;
}

.gather-node-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  margin-left: auto;
}

.gather-node-level {
  margin-left: auto;
  border-radius: 999px !important;
  border-color: rgba(132, 245, 161, 0.32) !important;
  background: rgba(4, 25, 19, 0.72) !important;
  color: #aef5bd !important;
  font-size: 10px !important;
  letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.gather-node-card--locked .gather-node-level {
  border-color: rgba(218, 89, 89, 0.36) !important;
  background: rgba(36, 13, 17, 0.72) !important;
  color: #e98686 !important;
}

.gather-node-title {
  margin: 0 0 9px !important;
  color: var(--color-parchment) !important;
  font-family: var(--font-ui) !important;
  font-size: 19px !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  letter-spacing: 0 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.gather-node-metrics {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px !important;
}

.gather-node-metrics > :not([hidden]) ~ :not([hidden]) {
  margin-top: 0 !important;
}

.gather-node-metric {
  position: relative;
  min-height: 37px;
  padding: 6px 8px 6px 31px;
  border: 1px solid rgba(215, 194, 143, 0.16);
  border-radius: 5px;
  background: rgba(4, 13, 20, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.028);
  display: flex !important;
  flex-direction: column;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 1px;
}

.gather-node-metric::before {
  position: absolute;
  left: 8px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(215, 194, 143, 0.28);
  border-radius: 4px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  color: #0b1720;
  font-size: 7px;
  font-weight: 900;
}

.gather-node-metric--xp::before {
  content: "XP";
  background: #96dda2;
}

.gather-node-metric--time::before {
  content: "T";
  background: #e0b969;
}

.gather-node-metric--drop {
  grid-column: 1 / -1;
  min-height: 35px;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.gather-node-metric--drop::before {
  content: "D";
  background: #9bb7e8;
}

.gather-node-label {
  color: rgba(168, 194, 181, 0.74);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.gather-node-value {
  max-width: 100%;
  color: #eadfc7 !important;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.15;
}

.gather-node-value--boosted {
  color: #90eea7 !important;
}

.gather-node-drop {
  min-width: 0;
  max-width: 66%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gather-node-breakdown {
  border-color: rgba(226, 185, 98, 0.32) !important;
  background: rgba(3, 10, 16, 0.96) !important;
}

.gather-node-link {
  width: fit-content;
  min-height: 22px;
  margin-bottom: 8px !important;
  padding: 4px 8px 4px 22px;
  border: 1px solid rgba(226, 185, 98, 0.22);
  border-radius: 999px;
  background: rgba(3, 10, 16, 0.64);
  color: rgba(226, 185, 98, 0.86) !important;
  font-size: 10px !important;
  font-weight: 800;
  letter-spacing: 0.02em;
  position: relative;
}

.gather-node-meta .gather-node-link {
  min-height: auto;
  margin-bottom: 0 !important;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1;
  text-align: right;
}

.gather-node-link::before {
  content: "+";
  position: absolute;
  left: 8px;
  top: 50%;
  color: #96dda2;
  font-size: 12px;
  font-weight: 900;
  transform: translateY(-52%);
}

.gather-node-link:hover {
  border-color: rgba(226, 185, 98, 0.5);
  background: rgba(226, 185, 98, 0.12);
}

.gather-node-footer {
  display: grid;
  gap: 8px;
}

.gather-node-progress {
  position: relative;
  overflow: hidden;
  height: 13px !important;
  margin-bottom: 0 !important;
  border-color: rgba(226, 185, 98, 0.28) !important;
  border-radius: 999px !important;
  background: rgba(2, 8, 14, 0.72) !important;
}

.gather-node-progress-fill {
  display: block;
  position: relative;
  z-index: 1;
  height: 100% !important;
  min-height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6db879, #e0b969) !important;
}

.gather-node-progress-fill--lane-two {
  background: linear-gradient(90deg, #7e6ddf, #d6a6ff) !important;
}

.gather-node-progress-label {
  z-index: 2;
  pointer-events: none;
  color: #fff7df !important;
  font-size: 8px !important;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.gather-node-action {
  min-height: 38px;
  padding: 9px 12px !important;
  border: 1px solid rgba(226, 185, 98, 0.58) !important;
  border-radius: 5px !important;
  background: linear-gradient(180deg, #dfc686, #a87e3c) !important;
  color: #07111a !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 8px 18px rgba(0, 0, 0, 0.26);
}

.gather-node-action:hover:not(:disabled) {
  filter: brightness(1.08);
}

.gather-node-action--stop {
  border-color: rgba(226, 118, 96, 0.55) !important;
  background: linear-gradient(180deg, #9e4b44, #5d2527) !important;
  color: #ffe8dc !important;
}

.gather-node-action:disabled {
  border-color: rgba(115, 124, 132, 0.3) !important;
  background: linear-gradient(180deg, #34414a, #202932) !important;
  color: #9aa7ad !important;
  cursor: not-allowed;
}

.gather-node-card {
  background: rgba(4, 12, 18, 0.2) !important;
  border-color: rgba(135, 176, 140, 0.28) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 16px 34px rgba(0, 0, 0, 0.26) !important;
}

.gather-node-card::before,
.gather-node-card::after {
  display: none;
}

.gather-node-card:hover {
  border-color: rgba(214, 190, 132, 0.42) !important;
}

.gather-node-card--active {
  border-color: rgba(226, 185, 98, 0.58) !important;
}

.gather-node-quest-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(226, 185, 98, 0.52);
  border-radius: 4px;
  background: rgba(4, 10, 16, 0.78);
  color: #ffe4a1;
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  cursor: pointer;
  pointer-events: auto;
}

.gather-node-quest-chip:hover,
.gather-node-quest-chip:focus-visible {
  border-color: rgba(255, 220, 130, 0.82);
  background: rgba(42, 31, 10, 0.88);
  color: #fff0bd;
  outline: none;
}

.gather-node-image {
  opacity: 0.6 !important;
  filter: saturate(1.04) contrast(1.02);
  object-position: center top;
  transform: scale(1);
}

.gather-node-card:hover .gather-node-image {
  opacity: 0.9 !important;
  transform: scale(1.05);
}

.gather-node-image--locked {
  opacity: 0.42 !important;
}

.gather-node-image--active {
  opacity: 0.75 !important;
}

.gather-node-scrim {
  background:
    radial-gradient(ellipse at 50% 30%, transparent 35%, rgb(var(--indigo-rgb) / 0.55) 70%, rgb(var(--indigo-rgb) / 0.90) 100%),
    linear-gradient(to bottom, rgb(var(--indigo-rgb) / 0) 0%, rgb(var(--indigo-rgb) / 0.05) 30%, rgb(var(--indigo-rgb) / 0.70) 58%, rgb(var(--indigo-rgb) / 0.96) 80%, rgb(var(--indigo-rgb) / 1) 100%) !important;
}

.gather-node-active-glow {
  background: radial-gradient(circle at 82% 18%, rgba(151, 239, 169, 0.16), transparent 30%) !important;
}

.gather-node-shell {
  padding: 16px 20px 14px !important;
  background: transparent;
}

.gather-node-shell::before {
  content: none !important;
}

.gather-node-topline {
  min-height: 22px;
  margin-bottom: 14px !important;
}

.gather-node-meta {
  gap: 5px;
}

.gather-node-level {
  padding: 4px 8px !important;
  border: 1px solid rgba(170, 222, 170, 0.36) !important;
  background: rgba(2, 18, 13, 0.42) !important;
  color: #b9f3be !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  box-shadow: none;
}

.gather-node-title {
  margin: 0 0 16px !important;
  font-size: 20px !important;
  line-height: 1.05 !important;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.86);
}

.gather-node-metrics {
  display: flex !important;
  flex-direction: column;
  gap: 6px;
  width: min(280px, 100%);
  margin-bottom: 10px !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.gather-node-metric {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  justify-content: space-between !important;
  gap: 14px;
}

.gather-node-metric::before {
  content: none !important;
  display: none;
}

.gather-node-metric--drop {
  grid-column: auto;
  min-height: 0;
}

.gather-node-label {
  color: rgba(207, 218, 197, 0.74);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.gather-node-value {
  color: #f0e4c7 !important;
  font-size: 12px;
  font-weight: 800;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

.gather-node-drop {
  max-width: 62%;
}

.gather-node-link {
  margin-bottom: 0 !important;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(231, 198, 126, 0.86) !important;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0;
}

.gather-node-link::before {
  content: none;
}

.gather-node-link:hover {
  background: transparent;
  text-decoration: underline;
}

.gather-node-meta .gather-node-link {
  color: rgba(231, 198, 126, 0.9) !important;
  font-size: 10px !important;
  font-weight: 800;
}

.gather-node-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.gather-node-progress {
  width: 100%;
}

.gather-node-action {
  width: auto !important;
  min-width: 116px;
  min-height: 34px;
  padding: 0.42rem 1.2rem !important;
  border: 1px solid rgba(199, 245, 184, 0.95) !important;
  border-radius: 999px !important;
  background: linear-gradient(180deg, #d9f8c9 0%, #9ee6a8 100%) !important;
  color: #17301c !important;
  font-family: var(--font-ui, var(--font-body, sans-serif)) !important;
  font-size: 0.875rem !important;
  font-style: normal !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  text-transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 6px 14px rgba(75, 180, 96, 0.2);
}

.gather-node-action:hover:not(:disabled) {
  background: linear-gradient(180deg, #e5ffd8 0%, #aef0b6 100%) !important;
  border-color: rgba(222, 255, 211, 0.98) !important;
  color: #17301c !important;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 8px 16px rgba(75, 180, 96, 0.24);
}

.gather-node-action--stop {
  border-color: rgba(226, 118, 96, 0.55) !important;
  background: linear-gradient(180deg, #9e4b44, #5d2527) !important;
  color: #ffe8dc !important;
}

.gather-node-action--stop:hover:not(:disabled) {
  border-color: rgba(255, 154, 126, 0.72) !important;
  background: linear-gradient(180deg, #b65c52, #6d2d30) !important;
  color: #ffe8dc !important;
}

.gather-node-card {
  --gather-accent-rgb: 126 213 137;
  --gather-accent: rgb(var(--gather-accent-rgb));
  --gather-accent-strong: #d7f8ca;
  --gather-button-top: #d9f8c9;
  --gather-button-bottom: #9ee6a8;
  --gather-button-text: #102615;
  --gather-rail: linear-gradient(180deg, #d7f8ca, #6cc878 48%, #244f34);
  border-color: rgb(var(--gather-accent-rgb) / 0.36) !important;
}

.gather-node-card--wood {
  --gather-accent-rgb: 120 214 128;
  --gather-accent: #78d680;
  --gather-accent-strong: #d5fac8;
  --gather-button-top: #dcfacd;
  --gather-button-bottom: #74cf7c;
  --gather-button-text: #102713;
  --gather-rail: linear-gradient(180deg, #d7facb, #78d680 50%, #244f34);
}

.gather-node-card--ore {
  --gather-accent-rgb: 232 173 91;
  --gather-accent: #e8ad5b;
  --gather-accent-strong: #ffe0a1;
  --gather-button-top: #f6d28b;
  --gather-button-bottom: #b97837;
  --gather-button-text: #241406;
  --gather-rail: linear-gradient(180deg, #ffe0a1, #d99343 48%, #4f3524);
}

.gather-node-card--hunt {
  --gather-accent-rgb: 235 107 92;
  --gather-accent: #eb6b5c;
  --gather-accent-strong: #ffc2b4;
  --gather-button-top: #ffc0ae;
  --gather-button-bottom: #bc5048;
  --gather-button-text: #260907;
  --gather-rail: linear-gradient(180deg, #ffc2b4, #d75b50 48%, #542522);
}

.gather-node-card--fish {
  --gather-accent-rgb: 94 194 228;
  --gather-accent: #5ec2e4;
  --gather-accent-strong: #c8f4ff;
  --gather-button-top: #bdf1ff;
  --gather-button-bottom: #4da7d6;
  --gather-button-text: #061927;
  --gather-rail: linear-gradient(180deg, #c8f4ff, #55badf 48%, #1f4a61);
}

.gather-node-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 16%, rgb(var(--gather-accent-rgb) / 0.24), transparent 32%),
    linear-gradient(90deg, rgb(var(--gather-accent-rgb) / 0.16), transparent 58%);
  opacity: 0.95;
}

.gather-node-card::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 16;
  display: block;
  width: 7px;
  background: var(--gather-rail);
  box-shadow: 0 0 18px rgb(var(--gather-accent-rgb) / 0.42);
  pointer-events: none;
}

.gather-node-card:hover {
  border-color: rgb(var(--gather-accent-rgb) / 0.72) !important;
}

.gather-node-card--active {
  border-color: rgb(var(--gather-accent-rgb) / 0.84) !important;
  box-shadow:
    inset 0 0 0 1px rgb(var(--gather-accent-rgb) / 0.22),
    0 0 0 1px rgb(var(--gather-accent-rgb) / 0.18),
    0 18px 38px rgba(0, 0, 0, 0.42) !important;
}

.gather-node-card .gather-node-scrim {
  background:
    radial-gradient(ellipse at 50% 28%, transparent 26%, rgb(var(--gather-accent-rgb) / 0.16) 42%, rgb(var(--indigo-rgb) / 0.64) 68%, rgb(var(--indigo-rgb) / 0.94) 100%),
    linear-gradient(to bottom, rgb(var(--indigo-rgb) / 0) 0%, rgb(var(--indigo-rgb) / 0.14) 30%, rgb(var(--indigo-rgb) / 0.74) 58%, rgb(var(--indigo-rgb) / 0.96) 80%, rgb(var(--indigo-rgb) / 1) 100%) !important;
}

.gather-node-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: min(190px, 58%);
  min-height: 30px;
  padding: 4px 9px 4px 5px;
  border: 1px solid rgb(var(--gather-accent-rgb) / 0.48);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgb(var(--gather-accent-rgb) / 0.18), rgba(4, 12, 20, 0.78));
  color: var(--gather-accent-strong);
  box-shadow:
    0 10px 20px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gather-node-type-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgb(var(--gather-accent-rgb) / 0.22);
  color: var(--gather-accent-strong);
  box-shadow: inset 0 0 0 1px rgb(var(--gather-accent-rgb) / 0.34);
}

.gather-node-type-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

.gather-node-type-label {
  min-width: 0;
  overflow: hidden;
  font: 900 10px/1 var(--font-ui, var(--font-body, sans-serif));
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.gather-node-lock-ribbon {
  position: absolute;
  left: 20px;
  bottom: 62px;
  z-index: 18;
  max-width: calc(100% - 40px);
  padding: 6px 9px;
  border: 1px solid rgba(244, 123, 123, 0.42);
  border-radius: 999px;
  background: rgba(20, 8, 12, 0.82);
  color: #ffd0c9;
  font: 900 10px/1 var(--font-ui, var(--font-body, sans-serif));
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.42);
  pointer-events: none;
}

.gather-node-drop-chip {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  max-width: 72% !important;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgb(var(--gather-accent-rgb) / 0.38);
  border-radius: 999px;
  background: rgba(3, 10, 16, 0.74);
  color: #fff7e6 !important;
  text-align: left;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.gather-node-drop-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gather-accent);
  box-shadow: 0 0 10px rgb(var(--gather-accent-rgb) / 0.7);
}

.gather-node-drop-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gather-node-card:not(.gather-node-card--locked) .gather-node-action:not(.gather-node-action--stop):not(:disabled) {
  border-color: rgb(var(--gather-accent-rgb) / 0.72) !important;
  background: linear-gradient(180deg, var(--gather-button-top), var(--gather-button-bottom)) !important;
  color: var(--gather-button-text) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 8px 18px rgb(var(--gather-accent-rgb) / 0.22);
}

.gather-node-card:not(.gather-node-card--locked) .gather-node-action:hover:not(.gather-node-action--stop):not(:disabled) {
  border-color: rgb(var(--gather-accent-rgb) / 0.9) !important;
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 10px 22px rgb(var(--gather-accent-rgb) / 0.28);
}

.gather-node-card {
  border-color: rgba(135, 176, 140, 0.28) !important;
  background: rgba(4, 12, 18, 0.2) !important;
}

.gather-node-card::before,
.gather-node-card::after {
  display: none !important;
}

.gather-node-card:hover {
  border-color: rgba(214, 190, 132, 0.42) !important;
}

.gather-node-card--active {
  border-color: rgba(226, 185, 98, 0.58) !important;
  box-shadow:
    inset 0 0 0 1px rgba(226, 185, 98, 0.16),
    0 18px 38px rgba(0, 0, 0, 0.36) !important;
}

.gather-node-card .gather-node-scrim {
  background:
    radial-gradient(ellipse at 50% 30%, transparent 35%, rgb(var(--indigo-rgb) / 0.55) 70%, rgb(var(--indigo-rgb) / 0.90) 100%),
    linear-gradient(to bottom, rgb(var(--indigo-rgb) / 0) 0%, rgb(var(--indigo-rgb) / 0.05) 30%, rgb(var(--indigo-rgb) / 0.70) 58%, rgb(var(--indigo-rgb) / 0.96) 80%, rgb(var(--indigo-rgb) / 1) 100%) !important;
}

.gather-node-topline {
  position: relative;
  min-height: 52px;
}

.gather-node-type-chip {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 18;
  max-width: 142px;
  min-height: 26px;
  padding: 3px 8px 3px 4px;
  border-color: rgba(217, 184, 129, 0.36);
  background: rgba(4, 10, 16, 0.72);
  color: rgba(245, 225, 178, 0.94);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.gather-node-type-icon {
  width: 20px;
  height: 20px;
  background: rgba(217, 184, 129, 0.12);
  color: rgba(245, 225, 178, 0.96);
  box-shadow: inset 0 0 0 1px rgba(217, 184, 129, 0.24);
}

.gather-node-type-icon svg {
  width: 13px;
  height: 13px;
}

.gather-node-type-label {
  font-size: 9px;
  letter-spacing: 0.06em;
}

.gather-node-meta {
  padding-top: 31px;
}

.gather-node-drop-chip {
  border-color: rgba(217, 184, 129, 0.24);
  background: rgba(3, 10, 16, 0.68);
  color: #f0e4c7 !important;
  box-shadow: none;
}

.gather-node-drop-dot {
  background: rgba(217, 184, 129, 0.86);
  box-shadow: 0 0 8px rgba(217, 184, 129, 0.34);
}

.academy-page-shell {
  width: 100%;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: clamp(8px, 1vw, 14px);
  padding-right: clamp(8px, 1vw, 14px);
}

main:has(.academy-page-shell) {
  scrollbar-gutter: stable;
}

.academy-tab-strip {
  position: relative;
  width: 100%;
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: visible;
  border: 1px solid rgba(217, 184, 129, 0.42);
  border-radius: 8px;
  background: rgba(4, 11, 22, 0.76);
  z-index: 80;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 14px 32px rgba(0, 0, 0, 0.28);
}

.academy-tab-button {
  position: relative;
  min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  border: 0;
  border-color: rgba(217, 184, 129, 0.22);
  background: linear-gradient(180deg, rgba(12, 24, 42, 0.9), rgba(5, 12, 24, 0.92));
  color: rgba(230, 209, 163, 0.88);
  font: 900 13px/1.15 var(--font-ui, var(--font-body, sans-serif));
  letter-spacing: 0.02em;
  text-align: center;
  transition: none;
}

.academy-tab-button {
  border-right: 1px solid rgba(217, 184, 129, 0.22);
  border-bottom: 0;
}

.academy-tab-button:last-child {
  border-right: 0;
}

.academy-tab-button:hover {
  background: linear-gradient(180deg, rgba(35, 47, 63, 0.98), rgba(12, 22, 39, 0.98));
  color: #fff0bd;
}

.academy-tab-button--active {
  background: linear-gradient(180deg, #e0b24f, #bd8432);
  color: #08111d;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 205, 0.42),
    inset 0 -1px 0 rgba(70, 38, 8, 0.24);
}

.academy-tab-button > .inline-flex {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.academy-tab-button > .inline-flex > .inline-flex.min-w-5,
.academy-tab-button > .inline-flex > .academy-tab-notification-dot {
  position: absolute;
  top: 50%;
  right: 12px;
  margin: 0;
  transform: translateY(-50%);
}

.academy-tab-button > .inline-flex > .inline-flex.min-w-5 {
  min-width: 20px;
  min-height: 20px;
}

.academy-tab-notification-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border: 1px solid rgba(255, 225, 198, 0.9);
  border-radius: 50%;
  background: #ef654d;
  box-shadow:
    0 0 0 2px rgba(58, 12, 13, 0.46),
    0 0 9px rgba(239, 101, 77, 0.72);
}

.academy-tab-button--active .academy-tab-notification-dot {
  border-color: #4f130f;
  box-shadow: 0 0 0 2px rgba(255, 235, 184, 0.52);
}

.academy-tab-button[data-help]::after {
  content: attr(data-help);
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 2147483647;
  width: min(340px, calc(100vw - 32px));
  padding: 10px 12px;
  border: 1px solid rgba(214, 169, 79, 0.48);
  border-radius: 6px;
  background: rgba(3, 8, 17, 0.98);
  color: rgba(244, 232, 208, 0.94);
  font: 700 11px/1.4 var(--font-body, inherit);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.62),
    0 0 22px rgba(214, 169, 79, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.academy-tab-button[data-help]:hover,
.academy-tab-button[data-help]:focus-visible {
  z-index: 2147483647;
}

.academy-tab-button[data-help]:hover::after,
.academy-tab-button[data-help]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.academy-tab-button:first-child[data-help]::after {
  left: 0;
  transform: translateY(4px);
}

.academy-tab-button:first-child[data-help]:hover::after,
.academy-tab-button:first-child[data-help]:focus-visible::after {
  transform: translateY(0);
}

.academy-tab-button:last-child[data-help]::after {
  right: 0;
  left: auto;
  transform: translateY(4px);
}

.academy-tab-button:last-child[data-help]:hover::after,
.academy-tab-button:last-child[data-help]:focus-visible::after {
  transform: translateY(0);
}

.academy-building-card {
  position: relative;
  min-height: 470px;
  background-color: rgba(5, 10, 18, 0.96);
  background-repeat: no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.04),
    0 16px 34px rgba(0, 0, 0, 0.24);
}

.academy-building-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.06),
    0 20px 42px rgba(0, 0, 0, 0.34),
    0 0 24px rgba(217, 184, 129, 0.06);
}

.academy-atelier-page {
  --atelier-line: rgba(144, 126, 168, 0.18);
  --atelier-line-strong: rgba(202, 166, 96, 0.34);
  --atelier-surface: rgba(4, 11, 22, 0.82);
  --atelier-surface-raised: rgba(8, 16, 30, 0.9);
  --atelier-violet: #b8a5ef;
  --atelier-gold: #ddb461;
}

.academy-atelier-intro {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  padding: 22px 24px;
  border: 1px solid rgba(180, 150, 91, 0.16);
  border-radius: 9px;
  background:
    linear-gradient(100deg, rgba(4, 10, 21, 0.97), rgba(13, 13, 31, 0.9) 62%, rgba(33, 20, 54, 0.74)),
    url("/assets/academy/buildings/mana-well.webp") center 46% / cover no-repeat;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 218, 0.025),
    0 16px 38px rgba(0, 0, 0, 0.2);
}

.academy-atelier-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 58%, rgba(130, 86, 172, 0.09));
}

.academy-atelier-intro__copy,
.academy-atelier-intro__status {
  position: relative;
  z-index: 1;
}

.academy-atelier-intro__copy {
  max-width: 760px;
}

.academy-atelier-eyebrow,
.academy-atelier-panel-label {
  color: rgba(207, 187, 235, 0.72);
  font: 900 11px/1.2 var(--font-ui, var(--font-body, sans-serif));
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.academy-atelier-intro h2 {
  margin: 5px 0 0;
  color: var(--color-ivory-beige, #f1e6c8);
  font: 800 30px/1.1 var(--font-serif, serif);
}

.academy-atelier-intro p {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(203, 197, 213, 0.76);
  font-size: 13px;
  line-height: 1.6;
}

.academy-atelier-intro__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(137, 190, 169, 0.2);
  border-radius: 999px;
  background: rgba(4, 18, 22, 0.7);
  color: rgba(185, 223, 207, 0.86);
  font: 800 10px/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.academy-atelier-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #70d7ae;
  box-shadow: 0 0 10px rgba(112, 215, 174, 0.6);
}

.academy-atelier-intro__status.is-pending {
  border-color: rgba(221, 180, 97, 0.42);
  background: rgba(51, 35, 12, 0.76);
  color: #f2cd80;
}

.academy-atelier-intro__status.is-pending .academy-atelier-status-dot {
  background: #e3b75d;
  box-shadow: 0 0 10px rgba(227, 183, 93, 0.62);
}

.academy-atelier-console {
  padding: clamp(12px, 1.3vw, 18px);
  border: 1px solid rgba(180, 150, 91, 0.16);
  border-radius: 9px;
  background:
    radial-gradient(circle at 10% 0%, rgba(100, 76, 150, 0.1), transparent 34%),
    linear-gradient(145deg, rgba(4, 11, 22, 0.9), rgba(2, 8, 18, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 215, 0.02),
    0 18px 42px rgba(0, 0, 0, 0.2);
}

.academy-atelier-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.academy-atelier-mana-panel,
.academy-atelier-channel-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--atelier-line);
  border-radius: 8px;
  background: var(--atelier-surface);
}

.academy-atelier-mana-panel {
  display: flex;
  min-height: 454px;
  flex-direction: column;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(4, 10, 22, 0.78), rgba(4, 10, 22, 0.96)),
    url("/assets/academy/buildings/mana-well.webp") center / cover no-repeat;
}

.academy-atelier-mana-panel__glow {
  position: absolute;
  top: 44px;
  left: 50%;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(142, 112, 214, 0.22), rgba(72, 47, 129, 0.08) 46%, transparent 72%);
  filter: blur(5px);
  transform: translateX(-50%);
  pointer-events: none;
}

.academy-atelier-mana-value {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-top: 48px;
  color: rgba(205, 193, 225, 0.64);
  font: 800 16px/1 var(--font-ui, sans-serif);
  font-variant-numeric: tabular-nums;
}

.academy-atelier-mana-value strong {
  color: #eee7ff;
  font-size: clamp(42px, 4vw, 58px);
  text-shadow: 0 0 28px rgba(154, 121, 221, 0.34);
}

.academy-atelier-mana-track,
.academy-atelier-slot-track {
  overflow: hidden;
  border-radius: 999px;
  background: rgba(1, 5, 12, 0.8);
  box-shadow: inset 0 0 0 1px rgba(153, 132, 181, 0.13);
}

.academy-atelier-mana-track {
  position: relative;
  height: 9px;
  margin-top: 18px;
}

.academy-atelier-mana-fill,
.academy-atelier-slot-track > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6650c8, #ae96ef 66%, #d8b661);
  box-shadow: 0 0 14px rgba(153, 126, 226, 0.36);
  transition: width 160ms ease;
}

.academy-atelier-mana-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 18px;
}

.academy-atelier-mana-metrics > div {
  min-width: 0;
  padding: 9px 7px;
  border-radius: 6px;
  background: rgba(3, 9, 19, 0.68);
  box-shadow: inset 0 0 0 1px rgba(151, 132, 173, 0.12);
  text-align: center;
}

.academy-atelier-mana-metrics span,
.academy-atelier-mana-metrics strong {
  display: block;
}

.academy-atelier-mana-metrics span {
  overflow: hidden;
  color: rgba(180, 174, 192, 0.58);
  font: 800 8px/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.academy-atelier-mana-metrics strong {
  margin-top: 5px;
  color: rgba(235, 225, 249, 0.9);
  font: 900 14px/1 var(--font-ui, sans-serif);
  font-variant-numeric: tabular-nums;
}

.academy-atelier-mana-actions {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding-top: 22px;
}

.academy-atelier-mana-actions button {
  width: 100%;
}

.academy-atelier-channel-panel {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 16px;
  background: linear-gradient(180deg, rgba(8, 16, 30, 0.92), rgba(4, 11, 22, 0.96));
}

.academy-atelier-channel-header,
.academy-atelier-channel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.academy-atelier-channel-header {
  padding: 2px 2px 14px;
}

.academy-atelier-channel-header p {
  margin: 5px 0 0;
  color: rgba(187, 181, 196, 0.58);
  font-size: 11px;
}

.academy-atelier-channel-count {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(87, 66, 125, 0.2);
  box-shadow: inset 0 0 0 1px rgba(166, 137, 204, 0.18);
  color: rgba(214, 197, 237, 0.82);
  font: 900 10px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.academy-atelier-slot-list {
  display: grid;
  gap: 9px;
}

.academy-atelier-slot {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 164px;
  gap: 12px;
  align-items: center;
  min-height: 106px;
  padding: 11px 12px;
  border: 1px solid rgba(125, 139, 158, 0.13);
  border-radius: 7px;
  background: linear-gradient(105deg, rgba(4, 12, 24, 0.78), rgba(8, 15, 29, 0.7));
  box-shadow: inset 0 1px 0 rgba(233, 239, 246, 0.015);
}

.academy-atelier-slot--configured {
  border-color: rgba(157, 131, 189, 0.24);
  background: linear-gradient(105deg, rgba(11, 14, 31, 0.88), rgba(14, 16, 37, 0.72));
}

.academy-atelier-slot-icon,
.academy-atelier-slot-lock {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(2, 8, 17, 0.82);
  box-shadow:
    inset 0 0 0 1px rgba(170, 148, 196, 0.16),
    0 7px 18px rgba(0, 0, 0, 0.18);
  color: rgba(167, 143, 202, 0.46);
  font-size: 26px;
}

.academy-atelier-slot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.academy-atelier-slot-main {
  min-width: 0;
}

.academy-atelier-slot-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.academy-atelier-slot-topline label {
  color: rgba(221, 205, 239, 0.72);
  font: 900 11px/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.academy-atelier-slot-topline span {
  color: rgba(239, 195, 105, 0.96);
  font: 900 13px/1 var(--font-ui, sans-serif);
  font-variant-numeric: tabular-nums;
}

.academy-atelier-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 35px;
  padding: 7px 30px 7px 10px;
  border: 1px solid rgba(151, 132, 177, 0.2);
  border-radius: 5px;
  outline: none;
  background: rgba(2, 8, 17, 0.9);
  color: rgba(239, 231, 245, 0.92);
  font: 800 14px/1.2 var(--font-body, sans-serif);
  text-align: left;
  cursor: pointer;
}

.academy-atelier-select:hover,
.academy-atelier-select:focus-visible,
.academy-atelier-select.is-open {
  border-color: rgba(212, 174, 100, 0.52);
  box-shadow: 0 0 0 2px rgba(212, 174, 100, 0.08);
}

.academy-atelier-picker {
  min-width: 0;
}

.academy-atelier-select__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academy-atelier-select__chevron {
  flex: 0 0 auto;
  color: rgba(239, 195, 105, 0.82);
  font: 900 16px/1 var(--font-ui, sans-serif);
  transition: transform 120ms ease;
}

.academy-atelier-select.is-open .academy-atelier-select__chevron {
  transform: rotate(180deg);
}

.academy-atelier-select-menu {
  position: fixed;
  z-index: 2147483000;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(222, 180, 97, 0.54);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(13, 24, 40, 0.99), rgba(4, 10, 20, 0.995));
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 238, 194, 0.08);
  color: #eee6d5;
  scrollbar-color: rgba(203, 163, 91, 0.55) rgba(3, 8, 16, 0.8);
}

.academy-atelier-select-group + .academy-atelier-select-group {
  margin-top: 5px;
}

.academy-atelier-select-group__label {
  position: sticky;
  top: -6px;
  z-index: 1;
  margin: 0 -2px 3px;
  padding: 7px 9px 5px;
  background: rgba(7, 16, 29, 0.98);
  color: rgba(202, 174, 222, 0.76);
  font: 900 10px/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.academy-atelier-select-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: rgba(238, 230, 213, 0.9);
  font: 750 13px/1.25 var(--font-body, sans-serif);
  text-align: left;
}

.academy-atelier-select-option img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.academy-atelier-select-option:hover:not(:disabled),
.academy-atelier-select-option:focus-visible:not(:disabled),
.academy-atelier-select-option.is-selected {
  outline: none;
  border-color: rgba(222, 180, 97, 0.42);
  background: rgba(89, 62, 105, 0.38);
  color: #f5d994;
}

.academy-atelier-select-option:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.academy-atelier-select-option--clear {
  display: block;
  min-height: 32px;
  margin-bottom: 4px;
  color: rgba(216, 205, 225, 0.72);
}

.academy-atelier-slot-caption {
  min-height: 16px;
  margin-top: 7px;
  color: rgba(205, 199, 215, 0.78);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  white-space: normal;
}

.academy-atelier-slot-track {
  height: 4px;
  margin-top: 7px;
}

.academy-atelier-allocation {
  display: grid;
  grid-template-columns: 36px minmax(68px, 1fr) 36px;
  gap: 6px;
  align-items: center;
}

.academy-atelier-allocation button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(173, 146, 203, 0.22);
  border-radius: 5px;
  background: rgba(20, 15, 35, 0.72);
  color: var(--atelier-violet);
  font: 800 20px/1 var(--font-ui, sans-serif);
}

.academy-atelier-allocation button:hover:not(:disabled),
.academy-atelier-allocation button:focus-visible:not(:disabled) {
  border-color: rgba(222, 180, 97, 0.54);
  outline: none;
  background: rgba(48, 33, 57, 0.82);
  color: #f2cd80;
}

.academy-atelier-allocation button:disabled {
  cursor: not-allowed;
  opacity: 0.24;
}

.academy-atelier-allocation > div {
  min-width: 0;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.academy-atelier-allocation-value {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.academy-atelier-allocation-number {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  white-space: nowrap;
}

.academy-atelier-allocation strong {
  color: #eee8fb;
  font: 900 24px/1 var(--font-ui, sans-serif);
}

.academy-atelier-allocation span {
  color: rgba(205, 197, 218, 0.68);
  font: 800 11px/1 var(--font-ui, sans-serif);
}

.academy-atelier-allocation .academy-atelier-max {
  width: auto;
  min-width: 54px;
  height: 22px;
  padding: 0 10px;
  border-color: rgba(221, 180, 97, 0.34);
  background: rgba(73, 49, 17, 0.5);
  color: #eac675;
  font: 900 10px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
}

.academy-atelier-slot--locked {
  grid-template-columns: 54px minmax(0, 1fr);
  border-style: dashed;
  border-color: rgba(111, 121, 136, 0.11);
  background: rgba(2, 8, 17, 0.42);
  opacity: 0.62;
}

.academy-atelier-slot-lock {
  color: rgba(125, 135, 151, 0.34);
}

.academy-atelier-locked-copy {
  display: grid;
  gap: 5px;
}

.academy-atelier-locked-copy strong {
  color: rgba(190, 187, 199, 0.62);
  font: 900 12px/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.academy-atelier-locked-copy span {
  color: rgba(157, 151, 169, 0.48);
  font-size: 10px;
}

.academy-atelier-channel-footer {
  margin-top: auto;
  padding: 14px 2px 2px;
}

.academy-atelier-channel-footer > span {
  max-width: 560px;
  color: rgba(205, 198, 214, 0.76);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}

.academy-atelier-channel-footer button {
  flex: 0 0 auto;
}

@media (max-width: 1050px) {
  .academy-atelier-layout {
    grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  }

  .academy-atelier-slot {
    grid-template-columns: 48px minmax(0, 1fr) 152px;
    gap: 9px;
  }

  .academy-atelier-slot-icon,
  .academy-atelier-slot-lock {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 820px) {
  .academy-atelier-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .academy-atelier-mana-panel {
    min-height: 0;
  }

  .academy-atelier-mana-value {
    margin-top: 28px;
  }

  .academy-atelier-mana-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 16px;
    padding-top: 0;
  }
}

@media (max-width: 620px) {
  .academy-atelier-intro {
    align-items: flex-start;
    flex-direction: column;
    padding: 18px;
  }

  .academy-atelier-slot {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .academy-atelier-slot-icon,
  .academy-atelier-slot-lock {
    width: 46px;
    height: 46px;
  }

  .academy-atelier-allocation {
    grid-column: 1 / -1;
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    padding-left: 55px;
  }

  .academy-atelier-allocation button {
    width: 38px;
  }

  .academy-atelier-slot--locked {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .academy-atelier-channel-header,
  .academy-atelier-channel-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .academy-atelier-channel-footer button {
    width: 100%;
  }
}

/* Crownroad reward expansion */
.caravan-target-card header {
  grid-template-columns: 4.25rem minmax(0, 1fr);
  align-items: center;
}

.caravan-target-card header > img {
  width: 4.25rem;
  height: 4.25rem;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
  border: 2px solid rgba(244, 203, 106, 0.68);
  box-shadow: 0 0 0 3px rgba(6, 24, 37, 0.76), 0 8px 20px rgba(0, 0, 0, 0.28);
}

.caravan-manifest-preview {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr) minmax(15rem, 18rem);
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(245, 202, 104, 0.44);
  background:
    radial-gradient(circle at 11% 48%, rgba(255, 194, 77, 0.16), transparent 25%),
    linear-gradient(135deg, rgba(15, 53, 64, 0.94), rgba(7, 27, 43, 0.96));
  box-shadow: inset 0 1px rgba(255, 238, 183, 0.08), 0 10px 28px rgba(0, 0, 0, 0.2);
}

.caravan-manifest-chest {
  width: 100%;
  max-height: 8.5rem;
  object-fit: contain;
  filter: drop-shadow(0 13px 12px rgba(0, 0, 0, 0.34)) drop-shadow(0 0 14px rgba(255, 186, 66, 0.18));
}

.caravan-manifest-copy { min-width: 0; }
.caravan-manifest-copy > strong { display: block; margin: 0.25rem 0; color: #fff0c3; font: 700 1.06rem/1.2 var(--font-serif, Georgia, serif); }
.caravan-manifest-copy > small { display: block; color: rgba(221, 230, 220, 0.73); font-size: 0.66rem; line-height: 1.45; }
.caravan-manifest-materials { display: flex; flex-wrap: wrap; gap: 0.38rem; margin-top: 0.65rem; }
.caravan-manifest-materials > span { display: inline-flex; align-items: center; gap: 0.34rem; max-width: 10rem; padding: 0.3rem 0.45rem; border: 1px solid rgba(117, 201, 184, 0.35); background: rgba(4, 20, 31, 0.66); color: #dff1e7; }
.caravan-manifest-materials > span.is-locked { opacity: 0.45; filter: grayscale(0.55); }
.caravan-manifest-materials img { width: 1.55rem; height: 1.55rem; object-fit: contain; }
.caravan-manifest-materials b { overflow: hidden; font-size: 0.57rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }

.caravan-manifest-legendary,
.caravan-wayfarer-preview {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(204, 124, 255, 0.55);
  background: radial-gradient(circle at 50% 30%, rgba(176, 79, 255, 0.2), transparent 52%), linear-gradient(160deg, rgba(36, 19, 69, 0.96), rgba(11, 18, 39, 0.97));
  box-shadow: inset 0 0 25px rgba(152, 70, 232, 0.12), 0 8px 22px rgba(0, 0, 0, 0.22);
}

.caravan-manifest-legendary { display: grid; gap: 0.55rem; align-self: stretch; padding: 0.7rem; text-align: left; }
.caravan-manifest-legendary > header { display: grid; grid-template-columns: 5.3rem minmax(0, 1fr); gap: 0.55rem; align-items: center; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(220, 175, 255, 0.2); }
.caravan-manifest-legendary > header img { width: 5.3rem; height: 4.5rem; object-fit: contain; filter: drop-shadow(0 0 12px rgba(236, 181, 71, 0.3)); }
.caravan-manifest-legendary > header div { display: grid; gap: 0.12rem; min-width: 0; }
.caravan-manifest-legendary span,
.caravan-wayfarer-preview span { color: #d49cff; font-size: 0.53rem; font-weight: 900; letter-spacing: 0.13em; }
.caravan-manifest-legendary strong,
.caravan-wayfarer-preview strong { color: #ffe7ae; font-family: var(--font-serif, Georgia, serif); }
.caravan-manifest-legendary small,
.caravan-wayfarer-preview small { color: rgba(229, 214, 239, 0.72); font-size: 0.58rem; }
.caravan-wayfarer-stats { display: grid; gap: 0.24rem; padding: 0.12rem 0; }
.caravan-wayfarer-stats > div { display: flex; align-items: baseline; justify-content: space-between; gap: 0.65rem; }
.caravan-wayfarer-stats > div span { color: rgba(224, 220, 232, 0.76); font-size: 0.64rem; font-weight: 500; letter-spacing: 0; }
.caravan-wayfarer-stats > div strong { color: #65e59b; font: 800 0.72rem/1.2 var(--font-sans, sans-serif); }
.caravan-manifest-legendary > footer { display: grid; gap: 0.35rem; padding-top: 0.5rem; border-top: 1px solid rgba(220, 175, 255, 0.2); }
.caravan-manifest-legendary > footer small { line-height: 1.35; }
.caravan-manifest-legendary > footer b { color: #f4c967; font-size: 0.61rem; }

.caravan-wayfarer-preview { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: 0.6rem; align-items: center; margin: 0.85rem 0; padding: 0.65rem; }
.caravan-wayfarer-preview img { width: 6rem; height: 5rem; object-fit: contain; filter: drop-shadow(0 0 12px rgba(240, 182, 63, 0.26)); }
.caravan-wayfarer-preview div { display: grid; gap: 0.16rem; }

.caravan-reward-bundle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.55rem;
}

.caravan-reward-item {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  min-height: 4.2rem;
  padding: 0.55rem;
  border: 1px solid rgba(119, 201, 184, 0.34);
  background: rgba(5, 24, 36, 0.72);
}

.caravan-reward-item > img,
.caravan-reward-item > span { width: 3rem; height: 3rem; object-fit: contain; }
.caravan-reward-item > span { display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, #f9d071, #9d641c); color: #1d1508; font-weight: 1000; }
.caravan-reward-item div { display: grid; gap: 0.12rem; min-width: 0; }
.caravan-reward-item small { color: rgba(191, 220, 211, 0.62); font-size: 0.52rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; }
.caravan-reward-item strong { overflow: hidden; color: #f7e5b2; font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }
.caravan-reward-item.is-legendary { border-color: rgba(206, 124, 255, 0.62); background: linear-gradient(145deg, rgba(43, 20, 76, 0.82), rgba(8, 26, 42, 0.84)); }
.caravan-reward-item.is-legendary > img { filter: drop-shadow(0 0 10px rgba(236, 179, 67, 0.33)); }

.caravan-reward-bundle.is-compact { grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin-top: 0.45rem; }
.caravan-reward-bundle.is-compact .caravan-reward-item { grid-template-columns: 2rem minmax(0, 1fr); min-height: 3rem; padding: 0.35rem; }
.caravan-reward-bundle.is-compact .caravan-reward-item > img,
.caravan-reward-bundle.is-compact .caravan-reward-item > span { width: 2rem; height: 2rem; }

.caravan-report-list article > b.is-loss { border-color: rgba(221, 101, 98, 0.5); color: #f2a09b; }

.caravan-empty-state--board { display: grid; place-items: center; min-height: 17rem; text-align: center; background: radial-gradient(circle at 50% 45%, rgba(67, 131, 139, 0.13), transparent 42%), rgba(5, 22, 34, 0.56); }
.caravan-empty-state--board strong { color: #f5dfaa; font: 700 1.35rem/1.2 var(--font-serif, Georgia, serif); }
.caravan-empty-state--board p { max-width: 34rem; margin: 0.5rem auto 0; color: rgba(204, 220, 216, 0.7); }

.caravan-chest-backdrop {
  position: fixed;
  z-index: 2147483200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow: auto;
  background: radial-gradient(circle at 50% 35%, rgba(18, 88, 96, 0.28), transparent 45%), rgba(1, 8, 15, 0.88);
  backdrop-filter: blur(9px);
}

.caravan-chest-modal {
  position: relative;
  width: min(64rem, 96vw);
  max-height: 92vh;
  overflow: auto;
  padding: 1.2rem 1.35rem 1.35rem;
  border: 1px solid rgba(247, 204, 103, 0.66);
  background: linear-gradient(155deg, rgba(13, 54, 66, 0.98), rgba(5, 22, 38, 0.99) 58%, rgba(27, 20, 53, 0.98));
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.72), inset 0 1px rgba(255, 240, 191, 0.12);
}

.caravan-chest-modal > .caravan-close-button { position: absolute; z-index: 4; top: 0.8rem; right: 0.8rem; }
.caravan-chest-hero { position: relative; display: grid; place-items: center; min-height: 20rem; overflow: hidden; margin: -1.2rem -1.35rem 0; background: radial-gradient(ellipse at 50% 74%, rgba(255, 188, 59, 0.28), transparent 40%), url("./caravan/crownroad-backdrop-v2.webp") center 58% / cover; }
.caravan-chest-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 20, 30, 0.06), rgba(5, 24, 37, 0.16) 55%, rgba(8, 34, 47, 0.95)); }
.caravan-chest-glow { position: absolute; z-index: 1; width: 28rem; height: 13rem; bottom: 1.3rem; border-radius: 50%; background: rgba(255, 183, 45, 0.2); filter: blur(32px); }
.caravan-chest-hero > img:not(.caravan-chest-weapon) { position: relative; z-index: 2; width: min(28rem, 65vw); max-height: 19rem; object-fit: contain; transform: translateY(1.25rem); filter: drop-shadow(0 20px 23px rgba(0, 0, 0, 0.48)); }
.caravan-chest-weapon { position: absolute; z-index: 3; right: 10%; bottom: 0.9rem; width: 18rem; height: 14rem; object-fit: contain; transform: rotate(4deg); filter: drop-shadow(0 0 18px rgba(255, 199, 76, 0.48)); animation: caravan-wayfarer-reveal 2.2s ease-in-out infinite alternate; }
.caravan-chest-modal > header { margin: 0.25rem 0 1rem; text-align: center; }
.caravan-chest-modal > header h2 { margin: 0.22rem 0; color: #fff0c8; font: 700 clamp(1.8rem, 4vw, 2.75rem)/1.05 var(--font-serif, Georgia, serif); }
.caravan-chest-modal > header p { max-width: 48rem; margin: 0.5rem auto 0; color: rgba(214, 229, 221, 0.76); line-height: 1.55; }
.caravan-chest-footer { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-top: 1rem; padding-top: 0.85rem; border-top: 1px solid rgba(242, 205, 118, 0.23); }
.caravan-chest-footer > span { color: rgba(217, 229, 222, 0.72); font-size: 0.72rem; }
.caravan-chest-footer strong { color: #ffda80; }

@keyframes caravan-wayfarer-reveal {
  from { transform: rotate(3deg) translateY(2px); }
  to { transform: rotate(5deg) translateY(-5px); }
}

@media (max-width: 900px) {
  .caravan-manifest-preview { grid-template-columns: 7rem minmax(0, 1fr); }
  .caravan-manifest-legendary { grid-column: 1 / -1; grid-template-columns: 6rem minmax(0, 1fr); justify-items: start; text-align: left; }
  .caravan-manifest-legendary img { grid-row: 1 / span 3; }
  .caravan-chest-weapon { right: 2%; width: 13rem; }
}

@media (max-width: 620px) {
  .caravan-manifest-preview { grid-template-columns: 1fr; }
  .caravan-manifest-chest { max-height: 7rem; }
  .caravan-manifest-legendary { grid-column: auto; }
  .caravan-chest-backdrop { padding: 0.35rem; }
  .caravan-chest-modal { width: 100%; max-height: 96vh; padding: 0.9rem; }
  .caravan-chest-hero { min-height: 15rem; margin: -0.9rem -0.9rem 0; }
  .caravan-chest-hero > img:not(.caravan-chest-weapon) { width: 19rem; max-height: 14rem; }
  .caravan-chest-weapon { right: -1.5rem; width: 9rem; height: 9rem; }
  .caravan-chest-footer { align-items: stretch; flex-direction: column; }
  .caravan-reward-bundle { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .caravan-chest-weapon { animation: none; }
}

@media (max-width: 440px) {
  .academy-atelier-console,
  .academy-atelier-channel-panel,
  .academy-atelier-mana-panel {
    padding: 12px;
  }

  .academy-atelier-mana-metrics,
  .academy-atelier-mana-actions {
    grid-template-columns: 1fr;
  }

  .academy-atelier-allocation {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .academy-atelier-mana-fill,
  .academy-atelier-slot-track > div {
    transition: none;
  }
}

.academy-bestiary-panel {
  border-color: rgba(183, 151, 91, 0.16) !important;
  background:
    linear-gradient(180deg, rgba(6, 15, 28, 0.78), rgba(3, 10, 21, 0.82)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 216, 0.025),
    0 12px 28px rgba(0, 0, 0, 0.16);
}

.academy-bestiary-study-panel,
.academy-bestiary-study-entry,
.academy-bestiary-rank-badge {
  border-color: rgba(145, 121, 174, 0.18) !important;
  background-color: rgba(18, 13, 32, 0.42) !important;
  box-shadow: inset 0 1px 0 rgba(232, 218, 247, 0.025);
}

.academy-bestiary-family-card {
  border-color: rgba(133, 119, 151, 0.16) !important;
  background:
    linear-gradient(180deg, rgba(15, 18, 34, 0.56), rgba(7, 13, 26, 0.62)) !important;
  box-shadow: inset 0 1px 0 rgba(237, 226, 248, 0.02);
  transition:
    border-color 0.12s ease,
    background 0.12s ease;
}

.academy-bestiary-family-card:hover {
  border-color: rgba(182, 151, 102, 0.3) !important;
  background:
    linear-gradient(180deg, rgba(22, 26, 43, 0.72), rgba(9, 16, 29, 0.76)) !important;
}

.academy-bestiary-creature-card {
  border-color: rgba(131, 144, 158, 0.14) !important;
  background:
    linear-gradient(135deg, rgba(4, 12, 24, 0.72), rgba(7, 15, 29, 0.64)) !important;
  box-shadow:
    inset 0 1px 0 rgba(232, 239, 245, 0.018),
    0 8px 22px rgba(0, 0, 0, 0.13);
}

.academy-bestiary-creature-card--known {
  border-color: rgba(182, 151, 91, 0.18) !important;
  background:
    linear-gradient(135deg, rgba(8, 18, 31, 0.78), rgba(11, 18, 34, 0.66)) !important;
}

.academy-bestiary-panel,
.academy-bestiary-panel * {
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif !important;
}

.academy-bestiary-panel [class*="text-[9px]"] {
  font-size: 11px !important;
  line-height: 1.35 !important;
}

.academy-bestiary-panel [class*="text-[10px]"] {
  font-size: 12px !important;
  line-height: 1.4 !important;
}

.academy-bestiary-panel .text-xs {
  font-size: 12.5px !important;
  line-height: 1.35 !important;
}

.academy-bestiary-family-card > div:first-child,
.academy-bestiary-creature-card [class*="text-lavender-grey/50"],
.academy-bestiary-creature-card [class*="text-lavender-grey/65"] {
  color: rgba(220, 228, 230, 0.86) !important;
}

.academy-bestiary-creature-card [class*="text-green-300/70"] {
  color: rgba(134, 239, 172, 0.9) !important;
}

.academy-bestiary-creature-card .font-serif {
  font-size: 16px !important;
  line-height: 1.25 !important;
}

.academy-bestiary-creature-card > div:last-child[class*="border-white/7"] {
  border-color: rgba(171, 181, 190, 0.1) !important;
}

.academy-bestiary-queue-overlay {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10080 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  isolation: isolate;
}

.academy-bestiary-queue-dialog,
.academy-bestiary-queue-dialog * {
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", Arial, sans-serif !important;
}

.academy-bestiary-queue-dialog {
  background:
    radial-gradient(circle at 18% 0%, rgba(87, 55, 132, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(13, 17, 31, 0.99), rgba(6, 10, 21, 0.99)) !important;
  border-color: rgba(191, 148, 78, 0.48) !important;
}

.academy-bestiary-queue-dialog > header,
.academy-bestiary-queue-dialog > footer {
  border-color: rgba(191, 148, 78, 0.2) !important;
}

.academy-bestiary-queue-dialog > header button {
  border-color: rgba(141, 104, 171, 0.38) !important;
  box-shadow: none !important;
}

.academy-bestiary-queue-dialog [class*="text-[10px]"],
.academy-bestiary-queue-dialog [class*="text-[11px]"] {
  font-size: 12px !important;
  line-height: 1.4 !important;
}

.academy-bestiary-queue-list {
  scrollbar-color: rgba(206, 172, 107, 0.48) rgba(255, 255, 255, 0.04);
  scrollbar-width: thin;
}

.academy-bestiary-queue-entry {
  min-width: 0;
  border-color: rgba(126, 91, 160, 0.34) !important;
  background:
    linear-gradient(100deg, rgba(34, 20, 53, 0.46), rgba(7, 11, 22, 0.82)) !important;
  box-shadow: none !important;
}

.academy-bestiary-queue-entry__actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.academy-bestiary-queue-move-button {
  min-width: 30px;
  border: 1px solid rgba(132, 94, 169, 0.38) !important;
  background: rgba(48, 27, 69, 0.5) !important;
  box-shadow: none !important;
  outline: none;
}

.academy-bestiary-queue-move-button:hover:not(:disabled) {
  border-color: rgba(206, 170, 105, 0.64) !important;
  background: rgba(71, 40, 94, 0.68) !important;
  color: rgba(251, 231, 187, 0.96) !important;
}

.academy-bestiary-queue-move-button:focus-visible {
  outline: 2px solid rgba(179, 116, 221, 0.78);
  outline-offset: 2px;
}

.academy-bestiary-queue-entry__actions button:last-child,
.academy-bestiary-queue-dialog > footer button:first-child {
  border-color: rgba(191, 68, 86, 0.46) !important;
  background: rgba(89, 19, 34, 0.28) !important;
  box-shadow: none !important;
  color: rgba(246, 153, 164, 0.92) !important;
}

.academy-bestiary-queue-entry__actions button:last-child:hover,
.academy-bestiary-queue-dialog > footer button:first-child:hover {
  border-color: rgba(231, 91, 108, 0.72) !important;
  background: rgba(114, 25, 44, 0.42) !important;
  color: rgba(255, 190, 198, 0.98) !important;
}

.academy-bestiary-queue-dialog > footer .btn-secondary {
  border-color: rgba(191, 148, 78, 0.38) !important;
  box-shadow: none !important;
}

.academy-bestiary-study-timer,
.academy-bestiary-queue-entry__duration {
  color: rgba(244, 210, 145, 0.98) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.35 !important;
}

.academy-bestiary-study-timer {
  font-size: 15px !important;
  margin-top: 2px;
}

.academy-bestiary-queue-feedback {
  border-color: rgba(79, 214, 154, 0.42) !important;
  background: rgba(7, 67, 49, 0.42) !important;
  color: rgba(147, 255, 205, 0.96) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

@media (max-width: 620px) {
  .academy-bestiary-queue-dialog {
    max-height: 92vh !important;
  }

  .academy-bestiary-queue-entry {
    flex-wrap: wrap;
  }

  .academy-bestiary-queue-entry__actions {
    width: 100%;
    justify-content: flex-end;
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  .academy-tab-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .academy-tab-button {
    border-bottom: 1px solid rgba(217, 184, 129, 0.22);
  }

  .academy-tab-button:nth-child(2n) {
    border-right: 0;
  }

  .academy-tab-button:last-child {
    grid-column: 1 / -1;
    border-bottom: 0;
  }

  .academy-tab-button:nth-child(odd):not(:last-child)[data-help]::after {
    left: 0;
    right: auto;
    transform: translateY(4px);
  }

  .academy-tab-button:nth-child(odd):not(:last-child)[data-help]:hover::after,
  .academy-tab-button:nth-child(odd):not(:last-child)[data-help]:focus-visible::after {
    transform: translateY(0);
  }

  .academy-tab-button:nth-child(even)[data-help]::after {
    right: 0;
    left: auto;
    transform: translateY(4px);
  }

  .academy-tab-button:nth-child(even)[data-help]:hover::after,
  .academy-tab-button:nth-child(even)[data-help]:focus-visible::after {
    transform: translateY(0);
  }
}

@media (max-width: 520px) {
  .academy-page-shell {
    padding-right: 4px;
    padding-left: 4px;
  }

  .academy-tab-strip {
    grid-template-columns: minmax(0, 1fr);
  }

  .academy-tab-button,
  .academy-tab-button:nth-child(2n),
  .academy-tab-button:last-child {
    grid-column: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(217, 184, 129, 0.22);
  }

  .academy-tab-button:last-child {
    border-bottom: 0;
  }

  .academy-tab-button[data-help]::after,
  .academy-tab-button:nth-child(even)[data-help]::after,
  .academy-tab-button:nth-child(odd):not(:last-child)[data-help]::after,
  .academy-tab-button:last-child[data-help]::after {
    right: auto;
    left: 0;
    width: calc(100vw - 24px);
    transform: translateY(4px);
  }

  .academy-tab-button[data-help]:hover::after,
  .academy-tab-button[data-help]:focus-visible::after,
  .academy-tab-button:nth-child(even)[data-help]:hover::after,
  .academy-tab-button:nth-child(even)[data-help]:focus-visible::after,
  .academy-tab-button:nth-child(odd):not(:last-child)[data-help]:hover::after,
  .academy-tab-button:nth-child(odd):not(:last-child)[data-help]:focus-visible::after,
  .academy-tab-button:last-child[data-help]:hover::after,
  .academy-tab-button:last-child[data-help]:focus-visible::after {
    transform: translateY(0);
  }

  .academy-building-card {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .academy-building-card,
  .academy-tab-button,
  .academy-tab-button[data-help]::after {
    transition: none !important;
  }

  .academy-building-card:hover {
    transform: none;
  }
}

/* TBD Academy readability and construction queue */
.academy-page-shell {
  padding-top: 14px;
  padding-bottom: 18px;
  border: 1px solid rgba(191, 160, 102, 0.2);
  border-radius: 10px;
  background:
    radial-gradient(circle at 18% 0%, rgba(53, 82, 111, 0.2), transparent 36%),
    linear-gradient(145deg, rgba(13, 27, 45, 0.92), rgba(8, 20, 36, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 244, 211, 0.04);
}

.academy-tab-strip {
  background: rgba(13, 28, 47, 0.94);
}

.academy-tab-button {
  background: linear-gradient(180deg, rgba(29, 49, 69, 0.98), rgba(17, 34, 53, 0.98));
  color: rgba(246, 229, 192, 0.94);
}

.academy-tab-button:hover {
  background: linear-gradient(180deg, rgba(44, 63, 82, 0.99), rgba(23, 42, 61, 0.99));
}

.academy-tab-button--active {
  background: linear-gradient(180deg, #ddb866, #b98338);
  color: #091522;
}

.academy-building-card {
  background-color: rgba(10, 23, 39, 0.98);
}

.academy-building-card p,
.academy-section-header__description,
.academy-atelier-channel-header p,
.academy-atelier-channel-footer > span {
  color: rgba(231, 224, 209, 0.86) !important;
}

.academy-building-card__description {
  min-height: 3.75em;
  color: #ece7dc !important;
  font-size: 13px !important;
  font-style: normal !important;
  font-weight: 560;
  line-height: 1.5 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.92);
}

.academy-building-tier-bonuses {
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(112, 190, 215, 0.48);
  border-left: 3px solid #d9b464;
  border-radius: 6px;
  background:
    linear-gradient(115deg, rgba(20, 48, 67, 0.9), rgba(7, 20, 35, 0.94) 62%),
    rgba(5, 15, 27, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(223, 244, 255, 0.08),
    0 8px 20px rgba(0, 0, 0, 0.18);
}

.academy-building-tier-bonuses__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.academy-building-tier-bonuses__header strong {
  flex: 0 0 auto;
  color: #f1cf80;
  font: 900 11px/1.25 var(--font-ui, sans-serif);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.academy-building-tier-bonuses__header span {
  max-width: 15rem;
  color: #b8dceb;
  font: 700 10.5px/1.35 var(--font-body, sans-serif);
  text-align: right;
}

.academy-building-tier-bonuses__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 6px;
}

.academy-building-tier-bonuses__item {
  display: flex;
  min-width: 0;
  min-height: 52px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 7px 8px;
  border: 1px solid rgba(120, 176, 198, 0.28);
  border-radius: 4px;
  background: rgba(3, 13, 24, 0.78);
}

.academy-building-tier-bonuses__item.is-next {
  border-color: rgba(239, 193, 91, 0.8);
  background: linear-gradient(145deg, rgba(88, 61, 15, 0.72), rgba(19, 35, 48, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(255, 236, 174, 0.12),
    0 0 14px rgba(230, 178, 66, 0.13);
}

.academy-building-tier-bonuses__item.is-unlocked {
  border-color: rgba(103, 198, 143, 0.42);
  background: rgba(8, 39, 34, 0.66);
}

.academy-building-tier-bonuses__item.is-recurring {
  border-color: rgba(152, 128, 222, 0.42);
  background: rgba(31, 24, 60, 0.58);
}

.academy-building-tier-bonuses__tier {
  color: #9bdcf2;
  font: 900 10.5px/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.academy-building-tier-bonuses__item.is-next .academy-building-tier-bonuses__tier {
  color: #ffd77e;
}

.academy-building-tier-bonuses__item.is-unlocked .academy-building-tier-bonuses__tier {
  color: #91e5b7;
}

.academy-building-tier-bonuses__reward {
  overflow-wrap: anywhere;
  color: #fff0c9;
  font: 800 12.5px/1.28 var(--font-body, sans-serif);
}

.academy-building-tier-bonuses__capstone {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(217, 180, 100, 0.28);
}

.academy-building-tier-bonuses__capstone > span {
  color: #e9bd5f;
  font-size: 10px;
  line-height: 1.55;
  text-shadow: 0 0 8px rgba(233, 189, 95, 0.32);
}

.academy-building-tier-bonuses__capstone p {
  min-width: 0;
  margin: 0;
  color: #dce7ec !important;
  font: 650 11.5px/1.42 var(--font-body, sans-serif);
}

.academy-building-bonus {
  padding: 8px 9px;
  border: 1px solid rgba(130, 160, 178, 0.28);
  border-radius: 5px;
  background: rgba(4, 15, 27, 0.72);
}

.academy-building-bonus--current {
  border-color: rgba(91, 189, 132, 0.32);
}

.academy-building-bonus--next {
  border-color: rgba(225, 181, 82, 0.52);
  background: linear-gradient(105deg, rgba(65, 45, 12, 0.56), rgba(5, 18, 31, 0.78));
  box-shadow: inset 3px 0 0 rgba(233, 188, 86, 0.72);
}

.academy-building-bonus__label {
  margin-bottom: 6px;
  color: #c5d8e3;
  font: 900 11px/1.25 var(--font-ui, sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.academy-building-bonus--current .academy-building-bonus__label {
  color: #91dfb2;
}

.academy-building-bonus--next .academy-building-bonus__label {
  color: #f5cf78;
}

.academy-building-bonus__chip {
  min-height: 30px;
  padding: 4px 8px !important;
}

.academy-building-bonus__stat {
  color: #d7e2e7;
  font: 800 10.5px/1.2 var(--font-body, sans-serif);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.academy-building-bonus__value {
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

@media (max-width: 1280px) {
  .academy-building-tier-bonuses__header {
    display: block;
  }

  .academy-building-tier-bonuses__header span {
    display: block;
    max-width: none;
    margin-top: 4px;
    text-align: left;
  }

  .academy-building-tier-bonuses__grid {
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  }
}

.academy-building-schedule-badge {
  width: max-content;
  margin: -2px 0 9px;
  padding: 4px 8px;
  border: 1px solid rgba(109, 198, 232, 0.38);
  border-radius: 999px;
  background: rgba(9, 35, 51, 0.82);
  color: #aee9ff;
  font: 900 9px/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.academy-building-schedule-badge.is-active {
  border-color: rgba(240, 185, 77, 0.52);
  background: rgba(58, 39, 10, 0.84);
  color: #f7d582;
}

.academy-building-fully-scheduled {
  background: rgba(8, 37, 53, 0.72);
  color: #b8e8f6;
  font: 800 11px/1.3 var(--font-ui, sans-serif);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.academy-construction-queue {
  margin-bottom: 14px;
  padding: 13px;
  border: 1px solid rgba(218, 179, 100, 0.36);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(21, 39, 58, 0.96), rgba(11, 27, 45, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 245, 215, 0.06), 0 12px 28px rgba(0, 0, 0, 0.18);
}

.academy-construction-queue > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.academy-construction-queue > header span {
  color: #f0cd7d;
  font: 900 12px/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.academy-construction-queue > header p {
  margin: 4px 0 0;
  color: rgba(229, 222, 207, 0.76);
  font-size: 11px;
}

.academy-construction-queue > header > strong {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(218, 179, 100, 0.36);
  border-radius: 50%;
  color: #f5d58c;
  background: rgba(5, 16, 29, 0.72);
}

.academy-construction-queue__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px;
}

.academy-construction-queue__list article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(145, 175, 194, 0.24);
  border-radius: 6px;
  background: rgba(8, 22, 38, 0.82);
}

.academy-construction-queue__list article.is-active {
  border-color: rgba(230, 181, 82, 0.48);
  background: linear-gradient(135deg, rgba(57, 39, 11, 0.64), rgba(13, 28, 44, 0.88));
}

.academy-construction-queue__position {
  color: #79cde8;
  font: 900 10px/1 var(--font-ui, sans-serif);
  text-transform: uppercase;
}

.academy-construction-queue__list article.is-active .academy-construction-queue__position {
  color: #f2c96c;
}

.academy-construction-queue__list article > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.academy-construction-queue__list article > div strong {
  overflow: hidden;
  color: #fff0c9;
  font: 800 13px/1.2 var(--font-serif, serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.academy-construction-queue__list article > div span,
.academy-construction-queue__list time {
  color: rgba(222, 225, 222, 0.72);
  font: 800 10px/1.2 var(--font-ui, sans-serif);
}

.academy-atelier-intro,
.academy-atelier-console,
.academy-atelier-mana-panel,
.academy-atelier-channel-panel,
.academy-bestiary-panel {
  border-color: rgba(188, 157, 100, 0.28) !important;
  background-color: rgba(13, 28, 46, 0.95) !important;
}

.academy-atelier-console {
  background:
    radial-gradient(circle at 10% 0%, rgba(111, 91, 156, 0.15), transparent 34%),
    linear-gradient(145deg, rgba(15, 31, 50, 0.96), rgba(10, 24, 41, 0.97));
}

.academy-atelier-channel-panel {
  background: linear-gradient(180deg, rgba(20, 38, 58, 0.98), rgba(11, 27, 45, 0.98));
}

.academy-atelier-slot {
  border-color: rgba(149, 169, 188, 0.28);
  background: linear-gradient(105deg, rgba(13, 31, 50, 0.94), rgba(17, 34, 53, 0.9));
}

.academy-atelier-slot--configured {
  border-color: rgba(185, 157, 210, 0.36);
  background: linear-gradient(105deg, rgba(23, 29, 55, 0.95), rgba(21, 31, 56, 0.92));
}

.academy-atelier-mana-fill,
.academy-atelier-slot-track > div {
  box-shadow: none;
}

.academy-atelier-mana-fill.is-active,
.academy-atelier-slot-track > div.is-active,
.academy-atelier-slot--active .academy-atelier-slot-track > div {
  background: linear-gradient(90deg, #705ee0, #b6a1ff 62%, #f2ca67);
  box-shadow: 0 0 8px rgba(174, 146, 244, 0.95), 0 0 18px rgba(221, 180, 97, 0.5);
}

.academy-atelier-slot--active {
  border-color: rgba(179, 147, 235, 0.64);
  box-shadow: inset 0 0 18px rgba(143, 105, 216, 0.12), 0 0 14px rgba(121, 88, 190, 0.14);
}

.academy-atelier-intro__status.is-inactive:not(.is-pending) {
  border-color: rgba(157, 169, 178, 0.28);
  background: rgba(20, 29, 38, 0.82);
  color: rgba(217, 222, 224, 0.78);
}

.academy-atelier-intro__status.is-inactive:not(.is-pending) .academy-atelier-status-dot {
  background: #8d9ba3;
  box-shadow: none;
}

.academy-bestiary-panel {
  background: linear-gradient(180deg, rgba(18, 36, 55, 0.96), rgba(10, 25, 43, 0.97)) !important;
}

.academy-bestiary-family-card {
  border-color: rgba(176, 157, 196, 0.34) !important;
  background: linear-gradient(180deg, rgba(31, 40, 62, 0.9), rgba(18, 32, 51, 0.94)) !important;
}

.academy-bestiary-creature-card,
.academy-bestiary-creature-card--known {
  border: 1px solid rgba(190, 164, 112, 0.4) !important;
  border-left-width: 3px !important;
  background: linear-gradient(135deg, rgba(18, 38, 58, 0.98), rgba(12, 29, 49, 0.96)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 245, 218, 0.04), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.academy-bestiary-creature-card--unknown {
  border-color: rgba(135, 148, 159, 0.28) !important;
  opacity: 0.88;
}

.academy-bestiary-creature-card img {
  border: 1px solid rgba(224, 194, 130, 0.42) !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28);
}

.academy-bestiary-family-card--selected,
.academy-bestiary-family-card[aria-pressed="true"] {
  border-color: rgba(224, 190, 124, 0.72) !important;
  background:
    radial-gradient(circle at 88% 0%, rgba(144, 106, 204, 0.24), transparent 48%),
    linear-gradient(180deg, rgba(44, 46, 75, 0.98), rgba(21, 37, 58, 0.98)) !important;
  box-shadow:
    inset 3px 0 0 rgba(225, 187, 111, 0.92),
    0 8px 20px rgba(0, 0, 0, 0.28);
}

.academy-bestiary-family-card__progress {
  min-height: 1.35em;
  margin-top: 2px;
  color: rgba(225, 192, 128, 0.88) !important;
}

.academy-bestiary-family-card__bonus {
  margin-top: 7px;
  padding-top: 6px;
  border-top: 1px solid rgba(220, 190, 130, 0.16);
  color: rgba(153, 232, 184, 0.94);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.25;
}

.academy-bestiary-family-detail {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) minmax(360px, 1.18fr);
  gap: 16px;
  align-items: center;
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid rgba(214, 178, 109, 0.4);
  border-left: 3px solid rgba(221, 181, 103, 0.88);
  border-radius: 7px;
  background:
    radial-gradient(circle at 100% 0%, rgba(133, 93, 190, 0.18), transparent 42%),
    linear-gradient(135deg, rgba(16, 31, 49, 0.98), rgba(14, 20, 39, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 215, 0.05),
    0 10px 24px rgba(0, 0, 0, 0.24);
}

.academy-bestiary-family-detail__heading {
  min-width: 0;
}

.academy-bestiary-family-detail__eyebrow {
  color: rgba(221, 183, 109, 0.9);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.academy-bestiary-family-detail__title {
  margin-top: 3px;
  color: rgba(246, 237, 216, 0.98);
  font-family: var(--font-serif) !important;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.academy-bestiary-family-detail__rule,
.academy-bestiary-family-detail__overview {
  margin-top: 6px;
  color: rgba(211, 220, 226, 0.82);
  font-size: 12px;
  line-height: 1.45;
}

.academy-bestiary-family-detail__thresholds {
  color: rgba(223, 191, 130, 0.86);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.academy-bestiary-family-detail__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.academy-bestiary-family-detail__stat {
  display: flex;
  min-width: 0;
  min-height: 66px;
  flex-direction: column;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(158, 143, 185, 0.28);
  border-radius: 6px;
  background: rgba(8, 15, 29, 0.58);
}

.academy-bestiary-family-detail__stat > span {
  color: rgba(178, 190, 202, 0.82);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.academy-bestiary-family-detail__stat > strong {
  margin-top: 4px;
  color: rgba(157, 234, 187, 0.96);
  font-size: 12px;
  line-height: 1.35;
}

.academy-bestiary-family-detail__stat--mastered {
  border-color: rgba(216, 179, 106, 0.42);
}

.academy-bestiary-family-detail__stat--mastered > strong {
  color: rgba(239, 207, 143, 0.96);
}

@media (max-width: 980px) {
  .academy-bestiary-family-detail {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .academy-bestiary-family-detail {
    padding: 12px;
  }

  .academy-bestiary-family-detail__stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .academy-bestiary-family-card__bonus {
    font-size: 9.5px;
  }
}

@media (max-width: 620px) {
  .academy-construction-queue__list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.world-map-zone-card {
  container-type: inline-size;
  overflow: visible !important;
  isolation: isolate;
}

@container (max-width: 280px) {
  .world-map-zone-card--current .world-map-expand-area-button {
    top: 48px;
  }
}

.world-map-zone-card:hover {
  z-index: 5000;
}

.world-map-zone-card .world-resource-chip:hover {
  z-index: 6000;
}

.world-map-zone-card__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  gap: 6px;
}

.world-map-zone-card__title {
  grid-row: 2;
  min-width: 0;
  width: 100%;
}

.world-map-zone-card__badges {
  grid-row: 1;
  justify-self: end;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.world-map-zone-card--current {
  isolation: isolate;
}

.world-map-zone-card--current::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 1px solid rgb(var(--brass-rgb) / 0.68);
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgb(var(--brass-rgb) / 0.22),
    0 0 18px rgb(var(--brass-rgb) / 0.22);
  animation: world-map-current-glow 3.2s ease-in-out infinite;
}

.world-map-zone-card--current::after {
  content: "";
  position: absolute;
  inset: -28% -18%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 40%, rgba(246, 178, 79, 0.2), transparent 10%),
    radial-gradient(circle at 82% 62%, rgba(255, 220, 139, 0.16), transparent 9%);
  opacity: 0.75;
  animation: world-map-ember-drift 5.4s linear infinite;
}

.world-map-level-badge {
  position: relative;
  z-index: 12;
  flex: 0 0 auto;
  border-radius: 4px;
  padding: 5px 8px;
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  cursor: help;
  user-select: none;
  outline: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.world-map-level-badge__state {
  display: inline-grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border-radius: 50%;
  background: rgba(137, 55, 40, 0.78);
  color: #ffd5c0;
  font-size: 9px;
  line-height: 1;
}

.world-map-level-badge--unlocked .world-map-level-badge__state {
  background: rgba(62, 142, 77, 0.86);
  color: #efffe7;
}

.world-map-level-badge--unlocked {
  background: linear-gradient(180deg, rgba(255, 232, 151, 0.28), rgba(88, 176, 108, 0.28));
  border: 1px solid rgba(255, 224, 135, 0.72);
  color: #fff0b8;
  box-shadow:
    0 0 16px rgba(226, 185, 98, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.world-map-level-badge--locked {
  background: rgba(27, 31, 42, 0.7);
  border: 1px solid rgba(132, 122, 102, 0.34);
  color: rgba(196, 186, 170, 0.7);
}

.world-map-level-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 7000;
  display: grid;
  width: 230px;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(226, 185, 98, 0.5);
  border-radius: 6px;
  background: rgba(5, 11, 18, 0.96);
  color: var(--color-parchment);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  pointer-events: none;
}

.world-map-level-badge:hover .world-map-level-tooltip,
.world-map-level-badge:focus-visible .world-map-level-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.world-map-level-tooltip__title {
  color: #ffd782;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-map-level-tooltip__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(226, 220, 208, 0.78);
  font-size: 11px;
  line-height: 1.25;
  text-transform: none;
  letter-spacing: 0;
}

.world-map-level-tooltip__row strong {
  color: var(--color-parchment);
  font-weight: 800;
  text-align: right;
}

.world-map-level-tooltip__row.is-met strong {
  color: #b8f4a9;
}

.world-map-level-tooltip__row.is-missing strong {
  color: #ffb08e;
}

.world-map-heroic-badge {
  position: relative;
  z-index: 12;
  flex: 0 0 auto;
  cursor: help;
  user-select: none;
  outline: none;
}

.world-map-heroic-badge[data-help]::after {
  content: attr(data-help);
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 7000;
  width: 250px;
  padding: 10px;
  border: 1px solid rgba(157, 230, 168, 0.5);
  border-radius: 6px;
  background: rgba(5, 11, 18, 0.97);
  color: var(--color-parchment);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font: 800 11px/1.35 var(--font-ui, inherit);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  pointer-events: none;
}

.world-map-heroic-badge:hover::after,
.world-map-heroic-badge:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.world-map-current-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  padding: 7px 18px;
  border: 1px solid rgba(255, 210, 126, 0.72);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(23, 16, 8, 0.78), rgba(6, 15, 28, 0.82)),
    radial-gradient(circle at 50% 0%, rgba(240, 185, 88, 0.2), transparent 60%);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 180, 0.26),
    0 0 16px rgba(240, 177, 73, 0.26),
    0 4px 14px rgba(0, 0, 0, 0.45);
  color: #f8d48b;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-shadow: 0 0 8px rgba(245, 186, 84, 0.45);
  transform: none;
  pointer-events: none;
}

.world-map-current-badge::before,
.world-map-current-badge::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 14px;
  border-radius: 999px 999px 999px 0;
  background: radial-gradient(circle at 45% 30%, #fff4c7 0 8%, #f5b653 22%, rgba(226, 87, 46, 0.15) 70%);
  filter: blur(0.1px);
  opacity: 0.82;
  transform-origin: 50% 85%;
  animation: world-map-marker-flame 1.85s ease-in-out infinite;
}

.world-map-current-badge::before {
  left: 10px;
  transform: translateY(-50%) rotate(-18deg);
}

.world-map-current-badge::after {
  right: 10px;
  transform: translateY(-50%) scaleX(-1) rotate(-18deg);
  animation-delay: 0.45s;
}

.talent-current-subclass-badge {
  position: absolute;
  right: 14px;
  top: 12px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 138px;
  padding: 7px 18px;
  border: 1px solid rgba(255, 210, 126, 0.72);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(23, 16, 8, 0.82), rgba(6, 15, 28, 0.86)),
    radial-gradient(circle at 50% 0%, rgba(240, 185, 88, 0.22), transparent 60%);
  box-shadow:
    inset 0 1px 0 rgba(255, 235, 180, 0.26),
    0 0 16px rgba(240, 177, 73, 0.26),
    0 4px 14px rgba(0, 0, 0, 0.45);
  color: #f8d48b;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(245, 186, 84, 0.45);
  pointer-events: none;
  animation: world-map-current-glow 3.2s ease-in-out infinite;
}

.talent-current-subclass-badge::before,
.talent-current-subclass-badge::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 7px;
  height: 14px;
  border-radius: 999px 999px 999px 0;
  background: radial-gradient(circle at 45% 30%, #fff4c7 0 8%, #f5b653 22%, rgba(226, 87, 46, 0.15) 70%);
  filter: blur(0.1px);
  opacity: 0.82;
  transform-origin: 50% 85%;
  animation: world-map-marker-flame 1.85s ease-in-out infinite;
}

.talent-current-subclass-badge::before {
  left: 10px;
  transform: translateY(-50%) rotate(-18deg);
}

.talent-current-subclass-badge::after {
  right: 10px;
  transform: translateY(-50%) scaleX(-1) rotate(-18deg);
  animation-delay: 0.45s;
}

.talent-page-header__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

.talent-page-header__title {
  flex: 1 1 320px;
  min-width: 240px;
}

.talent-help-button {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 22px;
  border: 1px solid rgba(200, 165, 114, 0.4);
  border-radius: 50%;
  background: rgba(7, 20, 38, 0.74);
  color: #c8a572;
  font: 900 12px/1 var(--font-ui, sans-serif);
  cursor: help;
  overflow: visible;
}

.talent-help-button:hover,
.talent-help-button:focus-visible {
  border-color: rgba(232, 223, 201, 0.72);
  color: #e8dfc9;
  outline: 0;
}

.talent-help-button[data-help]::after {
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  bottom: auto;
  z-index: 2147483647;
  width: min(420px, 82vw);
  min-height: 0;
  padding: 10px 12px;
  border: 1px solid rgba(217, 184, 129, 0.72);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(7, 14, 27, 0.99), rgba(3, 8, 17, 0.99)),
    radial-gradient(circle at 18% 0%, rgba(217, 184, 129, 0.18), transparent 42%);
  color: rgba(255, 244, 220, 0.98);
  font: 800 11px/1.42 var(--font-body, sans-serif);
  text-align: left;
  white-space: normal;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 244, 210, 0.05) inset,
    0 0 22px rgba(217, 184, 129, 0.16);
  backdrop-filter: blur(3px);
}

.talent-page-header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  min-width: 0;
}

.talent-page-header__tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  overflow-x: auto;
}

.talent-subclasses-ready-tab {
  position: relative;
  border-color: rgba(248, 212, 139, 0.88) !important;
  background:
    linear-gradient(180deg, rgba(72, 48, 17, 0.92), rgba(13, 25, 39, 0.96)),
    radial-gradient(circle at 50% 0%, rgba(248, 212, 139, 0.28), transparent 68%) !important;
  color: #ffe7ad !important;
  text-shadow: 0 0 9px rgba(248, 212, 139, 0.52);
  animation: talent-subclasses-ready-pulse 1.65s ease-in-out infinite;
}

.talent-foundation-progress {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition:
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.talent-foundation-progress--complete {
  color: #baf8d1;
  border-color: rgba(132, 216, 194, 0.62);
  background:
    linear-gradient(180deg, rgba(24, 78, 68, 0.48), rgba(7, 28, 33, 0.72)),
    radial-gradient(circle at 50% 0%, rgba(186, 248, 209, 0.18), transparent 72%);
  box-shadow:
    inset 0 1px 0 rgba(221, 255, 235, 0.14),
    0 0 15px rgba(102, 213, 181, 0.18);
  text-shadow: 0 0 9px rgba(132, 216, 194, 0.42);
}

@keyframes talent-subclasses-ready-pulse {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 241, 198, 0.16),
      0 0 0 0 rgba(248, 212, 139, 0.34),
      0 0 12px rgba(240, 177, 73, 0.24);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 241, 198, 0.3),
      0 0 0 4px rgba(248, 212, 139, 0.08),
      0 0 24px rgba(240, 177, 73, 0.52);
  }
}

.reduce-motion .talent-subclasses-ready-tab {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .talent-subclasses-ready-tab {
    animation: none;
  }
}

.talent-subclass-overview--arrival {
  animation: talent-subclass-overview-arrival 1.15s ease-in-out 3;
}

.talent-subclass-card--arrival {
  animation: talent-subclass-card-arrival 1.15s ease-in-out 3;
}

@keyframes talent-subclass-overview-arrival {
  0%,
  100% {
    border-color: rgb(var(--brass-rgb) / 0.24);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  }
  50% {
    border-color: rgb(var(--brass-warm-rgb) / 0.82);
    box-shadow:
      0 0 0 2px rgb(var(--brass-rgb) / 0.12),
      0 0 34px rgb(var(--brass-warm-rgb) / 0.38),
      0 12px 28px rgba(0, 0, 0, 0.42);
  }
}

@keyframes talent-subclass-card-arrival {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.12);
    box-shadow:
      0 0 0 2px rgb(var(--brass-warm-rgb) / 0.46),
      0 0 26px rgb(var(--brass-warm-rgb) / 0.34),
      0 10px 24px rgba(0, 0, 0, 0.46);
  }
}

.subclass-unlock-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 38%, rgb(var(--brass-rgb) / 0.12), transparent 42%),
    rgba(2, 7, 16, 0.82);
  backdrop-filter: blur(8px);
}

.subclass-unlock-modal {
  position: relative;
  isolation: isolate;
  width: min(560px, calc(100vw - 28px));
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: 26px 28px 24px;
  border: 1px solid rgb(var(--brass-rgb) / 0.58);
  border-radius: 10px;
  outline: none;
  color: var(--color-parchment);
  text-align: center;
  background:
    linear-gradient(145deg, rgb(var(--surface-rgb) / 0.98), rgb(var(--indigo-rgb) / 0.99)),
    var(--color-painted-indigo);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 218, 0.10),
    0 0 0 1px rgba(0, 0, 0, 0.72),
    0 28px 80px rgba(0, 0, 0, 0.72),
    0 0 44px rgb(var(--brass-rgb) / 0.20);
  animation: subclass-unlock-modal-enter 320ms ease-out both;
}

.subclass-unlock-modal::before,
.subclass-unlock-modal::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  height: 1px;
  z-index: -1;
  background: linear-gradient(90deg, transparent, rgb(var(--brass-warm-rgb) / 0.66), transparent);
}

.subclass-unlock-modal::before {
  top: 10px;
}

.subclass-unlock-modal::after {
  bottom: 10px;
}

.subclass-unlock-modal__halo {
  position: absolute;
  z-index: -1;
  top: -100px;
  left: 50%;
  width: 360px;
  height: 260px;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgb(var(--brass-warm-rgb) / 0.22), transparent 68%);
}

.subclass-unlock-modal__sigil {
  position: relative;
  width: 126px;
  height: 72px;
  margin: 0 auto 8px;
}

.subclass-unlock-modal__sigil::before {
  content: "";
  position: absolute;
  top: 25px;
  left: 18px;
  right: 18px;
  height: 1px;
  background: linear-gradient(90deg, rgb(var(--brass-rgb) / 0.28), rgb(var(--brass-warm-rgb) / 0.92), rgb(var(--brass-rgb) / 0.28));
  box-shadow: 0 0 10px rgb(var(--brass-warm-rgb) / 0.42);
}

.subclass-unlock-modal__sigil::after {
  content: "";
  position: absolute;
  top: 25px;
  left: calc(50% - 0.5px);
  width: 1px;
  height: 28px;
  background: rgb(var(--brass-warm-rgb) / 0.82);
  box-shadow: 0 0 10px rgb(var(--brass-warm-rgb) / 0.42);
}

.subclass-unlock-modal__core,
.subclass-unlock-modal__path {
  position: absolute;
  display: block;
  border: 1px solid rgb(var(--brass-warm-rgb) / 0.82);
  background: var(--color-painted-indigo);
  box-shadow:
    inset 0 0 8px rgb(var(--brass-rgb) / 0.28),
    0 0 12px rgb(var(--brass-warm-rgb) / 0.32);
}

.subclass-unlock-modal__core {
  left: calc(50% - 10px);
  bottom: 0;
  width: 20px;
  height: 20px;
  transform: rotate(45deg);
}

.subclass-unlock-modal__path {
  top: 14px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  animation: subclass-unlock-path-pulse 1.8s ease-in-out infinite;
}

.subclass-unlock-modal__path--one {
  left: 7px;
}

.subclass-unlock-modal__path--two {
  left: calc(50% - 11px);
  animation-delay: 160ms;
}

.subclass-unlock-modal__path--three {
  right: 7px;
  animation-delay: 320ms;
}

.subclass-unlock-modal h2 {
  margin: 0;
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-size: clamp(25px, 4vw, 36px);
  font-style: italic;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.62), 0 0 22px rgb(var(--brass-rgb) / 0.22);
}

.subclass-unlock-modal__description {
  max-width: 470px;
  margin: 15px auto 0;
  color: rgb(var(--parchment-rgb) / 0.82);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.55;
}

.subclass-unlock-modal__actions {
  display: grid;
  grid-template-columns: minmax(110px, 0.72fr) minmax(190px, 1.4fr);
  gap: 10px;
  margin-top: 18px;
}

.subclass-unlock-modal__actions button {
  min-height: 44px;
  border-radius: 5px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.13em;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.subclass-unlock-modal__actions button:hover {
  transform: translateY(-1px);
}

.subclass-unlock-modal__later {
  border: 1px solid rgb(var(--brass-rgb) / 0.30);
  color: rgb(var(--parchment-rgb) / 0.70);
  background: rgb(var(--surface-rgb) / 0.72);
}

.subclass-unlock-modal__later:hover,
.subclass-unlock-modal__later:focus-visible {
  border-color: rgb(var(--brass-rgb) / 0.68);
  color: var(--color-parchment);
}

.subclass-unlock-modal__primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #fff0b8;
  color: #071426;
  background: linear-gradient(105deg, rgb(var(--brass-warm-rgb)), #b9f0b4);
  box-shadow: 0 0 22px rgb(var(--brass-warm-rgb) / 0.24);
}

.subclass-unlock-modal__primary:hover,
.subclass-unlock-modal__primary:focus-visible {
  box-shadow: 0 0 30px rgb(var(--brass-warm-rgb) / 0.42);
}

.subclass-unlock-modal__hint {
  display: block;
  margin-top: 9px;
  color: rgb(var(--parchment-rgb) / 0.48);
  font-family: var(--font-body);
  font-size: 10px;
}

@keyframes subclass-unlock-modal-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes subclass-unlock-path-pulse {
  0%,
  100% {
    transform: scale(0.94);
    filter: brightness(0.9);
  }
  50% {
    transform: scale(1.08);
    filter: brightness(1.25);
  }
}

.reduce-motion .talent-subclass-overview--arrival,
.reduce-motion .talent-subclass-card--arrival,
.reduce-motion .subclass-unlock-modal,
.reduce-motion .subclass-unlock-modal__path,
.subclass-unlock-backdrop.is-reduced-motion .subclass-unlock-modal,
.subclass-unlock-backdrop.is-reduced-motion .subclass-unlock-modal__path {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .talent-subclass-overview--arrival,
  .talent-subclass-card--arrival,
  .subclass-unlock-modal,
  .subclass-unlock-modal__path {
    animation: none;
  }
}

@media (max-width: 560px) {
  .subclass-unlock-backdrop {
    padding: 10px;
  }

  .subclass-unlock-modal {
    width: calc(100vw - 20px);
    padding: 20px 16px 18px;
  }

  .subclass-unlock-modal__sigil {
    transform: scale(0.86);
    margin-bottom: 2px;
  }

  .subclass-unlock-modal__actions {
    grid-template-columns: 1fr;
  }

  .subclass-unlock-modal__primary {
    grid-row: 1;
  }
}

.academy-unlock-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 34%, rgba(112, 79, 177, 0.24), transparent 44%),
    radial-gradient(circle at 18% 82%, rgb(var(--brass-rgb) / 0.10), transparent 34%),
    rgba(2, 7, 16, 0.88);
  backdrop-filter: blur(9px);
}

.academy-unlock-modal {
  position: relative;
  isolation: isolate;
  width: min(760px, calc(100vw - 28px));
  max-height: min(92vh, 780px);
  overflow-y: auto;
  padding: 30px;
  border: 1px solid rgb(var(--brass-rgb) / 0.62);
  border-radius: 11px;
  outline: none;
  color: var(--color-parchment);
  background:
    linear-gradient(145deg, rgba(11, 25, 43, 0.98), rgba(14, 11, 31, 0.99)),
    var(--color-painted-indigo);
  box-shadow:
    inset 0 1px 0 rgba(255, 247, 218, 0.11),
    inset 0 0 64px rgba(87, 54, 137, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.76),
    0 34px 100px rgba(0, 0, 0, 0.78),
    0 0 52px rgba(116, 81, 179, 0.20);
  animation: academy-unlock-modal-enter 320ms ease-out both;
}

.academy-unlock-modal::before,
.academy-unlock-modal::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  height: 1px;
  z-index: -1;
  background: linear-gradient(
    90deg,
    transparent,
    rgb(var(--brass-warm-rgb) / 0.72),
    transparent
  );
}

.academy-unlock-modal::before {
  top: 11px;
}

.academy-unlock-modal::after {
  bottom: 11px;
}

.academy-unlock-modal__glow {
  position: absolute;
  z-index: -1;
  top: -190px;
  right: -100px;
  width: 480px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(112, 79, 177, 0.28), transparent 68%);
}

.academy-unlock-modal__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding-bottom: 21px;
  border-bottom: 1px solid rgb(var(--brass-rgb) / 0.24);
}

.academy-unlock-modal__seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  flex: none;
  color: #f8df96;
  clip-path: polygon(50% 0, 88% 12%, 100% 50%, 88% 88%, 50% 100%, 12% 88%, 0 50%, 12% 12%);
  background:
    radial-gradient(circle, rgba(138, 95, 203, 0.34), transparent 54%),
    linear-gradient(145deg, rgba(24, 44, 68, 0.98), rgba(18, 11, 35, 0.98));
  box-shadow: 0 0 30px rgba(136, 92, 199, 0.28);
}

.academy-unlock-modal__seal::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgb(var(--brass-warm-rgb) / 0.72);
  clip-path: inherit;
}

.academy-unlock-modal__seal::after {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px solid rgba(164, 123, 220, 0.72);
  transform: rotate(45deg);
  box-shadow: inset 0 0 14px rgba(112, 79, 177, 0.28);
}

.academy-unlock-modal__seal span {
  position: relative;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 900;
  text-shadow: 0 0 14px rgba(252, 216, 124, 0.45);
}

.academy-unlock-modal__eyebrow {
  margin: 0 0 5px;
  color: rgb(var(--brass-warm-rgb));
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.19em;
}

.academy-unlock-modal h2 {
  margin: 0;
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-size: clamp(26px, 4.2vw, 40px);
  font-style: italic;
  line-height: 1.08;
  letter-spacing: 0.045em;
  text-shadow:
    0 2px 8px rgba(0, 0, 0, 0.65),
    0 0 22px rgba(112, 79, 177, 0.25);
}

.academy-unlock-modal__description {
  margin: 8px 0 0;
  color: rgb(var(--parchment-rgb) / 0.78);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.academy-unlock-modal__systems {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.academy-unlock-modal__system {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid rgba(138, 104, 188, 0.32);
  border-left-color: rgb(var(--brass-rgb) / 0.70);
  border-radius: 6px;
  background:
    linear-gradient(105deg, rgba(73, 49, 110, 0.16), transparent 58%),
    rgba(5, 18, 31, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 247, 218, 0.04);
}

.academy-unlock-modal__system:last-child {
  grid-column: 1 / -1;
}

.academy-unlock-modal__number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgb(var(--brass-rgb) / 0.54);
  border-radius: 50%;
  color: rgb(var(--brass-warm-rgb));
  background: rgba(5, 14, 27, 0.86);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  box-shadow: 0 0 14px rgba(112, 79, 177, 0.16);
}

.academy-unlock-modal__system h3 {
  margin: 0;
  color: #f1d98e;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0.09em;
}

.academy-unlock-modal__system p {
  margin: 4px 0 0;
  color: rgb(var(--parchment-rgb) / 0.70);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.42;
}

.academy-unlock-modal__primary {
  position: sticky;
  z-index: 2;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  border: 1px solid #fff0b8;
  border-radius: 6px;
  color: #071426;
  background: linear-gradient(105deg, rgb(var(--brass-warm-rgb)), #b9f0b4);
  box-shadow:
    0 -8px 22px rgba(8, 13, 26, 0.88),
    0 0 24px rgb(var(--brass-warm-rgb) / 0.24);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.15em;
  transition:
    box-shadow 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
}

.academy-unlock-modal__primary:hover,
.academy-unlock-modal__primary:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow:
    0 -8px 22px rgba(8, 13, 26, 0.88),
    0 0 32px rgb(var(--brass-warm-rgb) / 0.42);
}

@keyframes academy-unlock-modal-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reduce-motion .academy-unlock-modal,
.academy-unlock-backdrop.is-reduced-motion .academy-unlock-modal {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .academy-unlock-modal {
    animation: none;
  }
}

@media (max-width: 650px) {
  .academy-unlock-backdrop {
    align-items: flex-start;
    padding: 10px;
    overflow-y: auto;
  }

  .academy-unlock-modal {
    width: calc(100vw - 20px);
    max-height: none;
    margin: auto 0;
    padding: 22px 16px 18px;
  }

  .academy-unlock-modal__header {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 13px;
    padding-bottom: 16px;
  }

  .academy-unlock-modal__seal {
    width: 58px;
    height: 58px;
  }

  .academy-unlock-modal__seal::after {
    inset: 13px;
  }

  .academy-unlock-modal__seal span {
    font-size: 16px;
  }

  .academy-unlock-modal__systems {
    grid-template-columns: 1fr;
  }

  .academy-unlock-modal__system:last-child {
    grid-column: auto;
  }
}

.talent-page-header__overview {
  padding: 0.42rem 0.85rem !important;
  font-size: 10px !important;
  white-space: nowrap;
}

.talent-page-header__subclass-switcher {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 180px;
}

@media (max-width: 900px) {
  .talent-page-header__top,
  .talent-page-header__nav {
    flex-wrap: wrap;
  }

  .talent-page-header__subclass-switcher {
    flex-basis: 100%;
    justify-content: flex-start;
  }
}

/*
 * Selected-subclass focus layout.
 * Revert by setting TALENT_SUBCLASS_FOCUS_LAYOUT to false in GameView-Bdbw4Cpc.js;
 * all selectors below become inert and the previous stacked layout returns.
 */
.talent-page-shell {
  container: talent-page / inline-size;
}

@container talent-page (min-width: 930px) {
  .talent-page-header--focus {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 48px;
    margin-bottom: 8px !important;
    padding: 7px 12px !important;
  }

  .talent-page-header--focus .talent-page-header__top {
    flex: 0 0 auto;
    align-items: center;
    gap: 0;
  }

  .talent-page-header--focus .talent-page-header__title {
    flex: 0 0 auto;
    min-width: 0 !important;
  }

  .talent-page-header--focus .talent-page-header__title > div {
    gap: 6px;
  }

  .talent-page-header--focus .talent-page-header__title h1 {
    font-size: 12px !important;
    font-style: normal !important;
    font-weight: 800;
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .talent-page-header--focus .talent-page-header__title > p,
  .talent-page-header--focus .talent-page-header__side {
    display: none;
  }

  .talent-page-header--focus .talent-page-header__nav {
    flex: 1 1 auto;
    margin-top: 0;
    gap: 8px;
  }

  .talent-page-header--focus .talent-page-header__tabs button {
    padding: 0.42rem 0.72rem;
    font-size: 10px;
  }

  .talent-page-header--focus .talent-page-header__overview {
    padding: 0.38rem 0.72rem !important;
    font-size: 10px !important;
  }

  .talent-page-header--focus .talent-page-header__subclass-switcher {
    justify-content: flex-end;
  }

  .talent-subclass-focus-layout {
    display: grid;
    grid-template-columns:
      minmax(195px, 210px)
      minmax(520px, 1fr)
      minmax(215px, 225px);
    grid-template-rows: minmax(0, 1fr) auto;
    isolation: isolate;
  }

  .talent-subclass-focus-layout::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -18%;
    bottom: -18%;
    left: 26%;
    right: 26%;
    border-radius: 50%;
    background: radial-gradient(
      ellipse at center,
      rgba(232, 223, 201, 0.055),
      rgba(200, 165, 114, 0.025) 36%,
      transparent 72%
    );
    filter: blur(10px);
    pointer-events: none;
  }

  .talent-subclass-focus-layout > .talent-subclass-focus__header,
  .talent-subclass-focus-layout .talent-subclass-focus__header-inner {
    display: contents;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity {
    position: relative;
    z-index: 2;
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    min-width: 0 !important;
    padding: 24px 18px;
    border-right: 1px solid rgba(200, 165, 114, 0.18);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 42%),
      linear-gradient(90deg, rgba(7, 20, 38, 0.86), rgba(7, 20, 38, 0.42));
    box-shadow: 12px 0 30px rgba(0, 0, 0, 0.16);
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity h2 {
    font-size: 28px !important;
    line-height: 1.05;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity p {
    max-width: 26ch !important;
    margin-top: 12px !important;
    color: rgba(232, 223, 201, 0.88) !important;
    font-size: 14px !important;
    line-height: 1.45;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity > div:last-child {
    align-items: flex-start;
    gap: 6px;
    margin-top: 14px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__identity > div:last-child span {
    padding: 4px 7px !important;
    font-size: 10px !important;
    letter-spacing: 0.1em !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__sidebar {
    position: relative;
    z-index: 2;
    grid-column: 3;
    grid-row: 1 / -1;
    align-self: stretch;
    width: auto !important;
    min-width: 0;
    padding: 18px 14px;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 12px;
    border-left: 1px solid rgba(200, 165, 114, 0.18);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 42%),
      linear-gradient(270deg, rgba(7, 20, 38, 0.86), rgba(7, 20, 38, 0.42));
    box-shadow: -12px 0 30px rgba(0, 0, 0, 0.16);
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses,
  .talent-subclass-focus-layout .talent-subclass-focus__points {
    flex: 0 0 auto !important;
    width: 100%;
    min-width: 0 !important;
    border-color: rgba(200, 165, 114, 0.22) !important;
    border-radius: 7px !important;
    background: rgba(4, 12, 24, 0.58) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.04),
      0 10px 24px rgba(0, 0, 0, 0.2) !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses {
    padding: 12px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses > div:first-child {
    padding-bottom: 8px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses > div:first-child > div {
    font-size: 11px !important;
    letter-spacing: 0.12em !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__growth-note,
  .talent-subclass-focus-layout .talent-subclass-focus__bonus-invested {
    display: none !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses > div:last-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0 !important;
    margin-top: 3px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses > div:last-child > div {
    min-width: 0 !important;
    padding: 9px 2px !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(200, 165, 114, 0.13) !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses > div:last-child > div:last-child {
    border-bottom: 0 !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses > div:last-child > div > div:first-child {
    font-size: 10px !important;
    letter-spacing: 0.06em !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__bonuses .font-mono {
    font-size: 13px !important;
    font-weight: 800;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__points {
    padding: 11px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__points .grid {
    gap: 7px;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__points .grid > div {
    padding: 9px 5px !important;
    border-color: rgba(200, 165, 114, 0.2) !important;
    background: rgba(7, 20, 38, 0.72) !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__points .grid > div > div:first-child {
    font-size: 9px !important;
    letter-spacing: 0.08em !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__points .grid > div > div:last-child {
    font-size: 24px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__points .btn-danger {
    margin-top: 8px !important;
    padding: 7px 9px !important;
    border-color: rgba(198, 107, 74, 0.48) !important;
    background: rgba(84, 28, 30, 0.5) !important;
    color: #e5a081 !important;
    font-size: 11px !important;
  }

  .talent-subclass-focus-layout .talent-subclass-focus__tree {
    position: relative;
    z-index: 1;
    grid-column: 2;
    grid-row: 1 / -1;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: hidden;
    background:
      linear-gradient(90deg, rgba(7, 20, 38, 0.28), transparent 18%, transparent 82%, rgba(7, 20, 38, 0.28)),
      radial-gradient(ellipse at 50% 42%, rgba(200, 165, 114, 0.04), transparent 68%);
  }

  .talent-subclass-focus-layout > .combat-talent-loadout-toolbar {
    position: relative;
    z-index: 3;
    grid-column: 1;
    grid-row: 2;
    align-self: stretch;
    width: 100%;
    min-width: 0;
    padding: 12px 14px 16px;
    border-right: 1px solid rgba(200, 165, 114, 0.18);
    border-bottom: 0;
    background: linear-gradient(0deg, rgba(4, 11, 23, 0.94), rgba(4, 11, 23, 0.7));
  }

  .talent-subclass-focus-layout
    > .combat-talent-loadout-toolbar
    .mastery-loadout-title-row {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .talent-subclass-focus-layout
    > .combat-talent-loadout-toolbar
    .mastery-loadout-presets {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .talent-subclass-focus-layout
    > .combat-talent-loadout-toolbar
    .mastery-loadout-card {
    width: 100%;
  }

  .talent-subclass-focus-layout .talent-node-v2-state--unreachable .talent-node-v2__face {
    filter: grayscale(0.55) opacity(0.55) !important;
  }

  .talent-subclass-focus-layout .talent-node-v2-state--unreachable .talent-node-v2__label span {
    color: #9295a8 !important;
  }

  .talent-subclass-focus-layout .talent-node-v2__state-lock {
    opacity: 0.72;
    transform: scale(0.86);
  }
}

.world-boss-summon-button {
  isolation: isolate;
  overflow: hidden;
  color: #07111a !important;
  border: 1px solid rgba(255, 238, 177, 0.88) !important;
  background:
    radial-gradient(circle at 50% -35%, rgba(255, 255, 255, 0.78), transparent 38%),
    linear-gradient(110deg, var(--boss-accent, #facc15), var(--boss-accent-2, #60a5fa), #f8e4a0) !important;
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.55),
    0 0 22px color-mix(in srgb, var(--boss-accent, #facc15) 56%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.48) !important;
  animation: world-boss-button-pulse 2.45s ease-in-out infinite, world-boss-button-hue 8s linear infinite;
}

.world-boss-summon-button::before {
  content: "";
  position: absolute;
  inset: -90% -35%;
  z-index: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.52), transparent);
  transform: translateX(-70%) rotate(18deg);
  animation: world-boss-button-sweep 3.4s ease-in-out infinite;
}

.world-boss-summon-button > span {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

.world-boss-summon-button__gear,
.vital-worldboss__gear {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 54%, transparent);
  border-radius: 6px;
  background: rgba(3, 8, 17, 0.78);
  box-shadow:
    0 0 14px color-mix(in srgb, var(--boss-accent, #facc15) 18%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  cursor: help;
}

.world-boss-summon-button__gear {
  width: 46px;
  height: 30px;
  margin-top: 6px;
  background: rgba(3, 8, 17, 0.72);
}

.vital-worldboss__gear {
  width: 30px;
  height: 30px;
}

.world-boss-summon-button__gear:focus-visible,
.vital-worldboss__gear:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--boss-accent-2, #60a5fa) 72%, #ffffff);
  outline-offset: 2px;
}

.world-boss-summon-button__gear img,
.vital-worldboss__gear img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
}

.vital-worldboss__state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid rgba(110, 231, 183, 0.42);
  border-radius: 999px;
  background: rgba(6, 78, 59, 0.42);
  color: #d1fae5;
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.vital-worldboss__state.is-live {
  border-color: rgba(252, 165, 165, 0.6);
  background:
    linear-gradient(90deg, rgba(153, 27, 27, 0.68), rgba(69, 10, 10, 0.7));
  color: #fee2e2;
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.22);
}

.vital-worldboss__state.is-complete {
  border-color: rgba(134, 239, 172, 0.52);
  background: rgba(20, 83, 45, 0.58);
  color: #dcfce7;
}

.world-boss-summon-button:hover {
  transform: translateY(-1px) scale(1.02) !important;
}

.world-boss-summon-button--live {
  color: #fee2e2 !important;
  border-color: rgba(254, 202, 202, 0.88) !important;
  background:
    radial-gradient(circle at 50% -35%, rgba(255, 255, 255, 0.28), transparent 38%),
    linear-gradient(110deg, #7f1d1d, #dc2626, #f97316) !important;
  box-shadow:
    0 16px 42px rgba(0, 0, 0, 0.58),
    0 0 28px rgba(239, 68, 68, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.world-boss-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 8%, color-mix(in srgb, var(--boss-accent, #facc15) 22%, transparent), transparent 32%),
    rgba(1, 5, 13, 0.86);
  backdrop-filter: blur(8px) saturate(0.88);
  overflow: hidden;
}

.world-boss-fight-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: #02050d;
  color: var(--color-parchment);
}

.world-boss-fight-open .vital-edge-actions,
.world-boss-fight-open .faction-chat-dock {
  visibility: hidden !important;
  pointer-events: none !important;
}

#root:has(.world-boss-fight-backdrop) .zone-themed-sidebar .absolute {
  visibility: hidden;
  pointer-events: none;
}

#root:has(.world-boss-fight-backdrop) .sidebar-character-card__stats-chip,
#root:has(.world-boss-fight-backdrop) .sidebar-character-card__stats-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.world-boss-fight-arena {
  position: relative;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}

.world-boss-fight-arena::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.44), transparent 22%, transparent 70%, rgba(0, 0, 0, 0.74)),
    radial-gradient(circle at 50% 50%, transparent 0 36%, rgba(0, 0, 0, 0.2) 66%, rgba(0, 0, 0, 0.72));
}

.world-boss-fight-top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px 6px;
  pointer-events: none;
}

.world-boss-fight-title span {
  color: color-mix(in srgb, var(--boss-accent, #facc15) 84%, #ffffff);
  font: 900 11px/1 var(--font-ui, inherit);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.world-boss-fight-title h2 {
  margin: 5px 0 2px;
  color: #fff7df;
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.4vw, 54px);
  font-style: italic;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 4px 26px rgba(0, 0, 0, 0.86);
}

.world-boss-fight-title div {
  color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 72%, #f4e8d0);
  font: 800 12px/1.2 var(--font-ui, inherit);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.world-boss-fight-title__meta {
  display: inline-flex;
  margin-top: 9px;
  padding: 6px 9px;
  border: 1px solid rgba(244, 232, 208, 0.13);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  color: rgba(244, 232, 208, 0.86);
  font: 900 11px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.world-boss-fight-title {
  padding-left: 72px;
}

.world-boss-fight-close {
  position: absolute;
  top: 12px;
  left: 18px;
  pointer-events: auto;
  padding: 6px 8px;
  border: 1px solid rgba(244, 232, 208, 0.24);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.82);
  color: rgba(244, 232, 208, 0.86);
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.56);
}

.world-boss-fight-bar {
  border: 1px solid rgba(244, 232, 208, 0.16);
  border-radius: 8px;
  background: rgba(2, 7, 16, 0.72);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  padding: 9px 10px;
}

.world-boss-fight-bar__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: rgba(244, 232, 208, 0.92);
  font: 900 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.world-boss-fight-bar__topline strong {
  font-family: var(--font-mono, monospace);
  color: #fff2ba;
}

.world-boss-fight-bar__track {
  height: clamp(18px, 2.6vh, 28px);
  margin-top: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.56);
  overflow: hidden;
}

.world-boss-fight-bar__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--boss-accent, #facc15), var(--boss-accent-2, #60a5fa));
  box-shadow: 0 0 20px color-mix(in srgb, var(--boss-accent, #facc15) 34%, transparent);
  transition: width 220ms linear;
}

.world-boss-fight-bar--team .world-boss-fight-bar__fill {
  background: linear-gradient(90deg, #22c55e, #a7f3d0);
}

.world-boss-fight-bar--team-routed .world-boss-fight-bar__fill {
  background: linear-gradient(90deg, #7f1d1d, #ef4444);
}

.world-boss-fight-bar__meta {
  margin-top: 5px;
  color: rgba(216, 207, 188, 0.72);
  font: 700 11px/1.2 var(--font-body, inherit);
}

.world-boss-fight-layout {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: block;
  padding: 0 22px 18px;
}

.world-boss-damage-rank {
  position: fixed;
  top: 146px;
  left: 14px;
  bottom: auto;
  z-index: 40;
  width: min(268px, calc(100vw - 28px));
  height: min(660px, calc(100dvh - 164px));
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  align-content: start;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 34%, rgba(244, 232, 208, 0.16));
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(2, 7, 16, 0.96), rgba(0, 0, 0, 0.92));
  box-shadow: 18px 20px 60px rgba(0, 0, 0, 0.62);
  overflow: hidden;
}

.world-boss-damage-rank__header {
  display: grid;
  gap: 5px;
  padding: 11px 12px 10px;
  border-bottom: 1px solid rgba(244, 232, 208, 0.1);
  background: linear-gradient(90deg, color-mix(in srgb, var(--boss-accent, #facc15) 14%, transparent), transparent);
}

.world-boss-damage-rank__header span {
  color: color-mix(in srgb, var(--boss-accent, #facc15) 84%, #fff);
  font: 900 12px/1.1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-boss-damage-rank__header strong,
.world-boss-damage-rank__columns {
  color: rgba(244, 232, 208, 0.58);
  font: 800 9px/1.2 var(--font-ui, inherit);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.world-boss-damage-rank__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 8px;
  border-bottom: 1px solid rgba(244, 232, 208, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.world-boss-damage-rank__tabs button {
  min-width: 0;
  padding: 7px 5px;
  border: 1px solid rgba(244, 232, 208, 0.12);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(244, 232, 208, 0.64);
  font: 900 8px/1.15 var(--font-ui, inherit);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.world-boss-damage-rank__tabs button:hover,
.world-boss-damage-rank__tabs button:focus-visible,
.world-boss-damage-rank__tabs button.is-active {
  border-color: color-mix(in srgb, var(--boss-accent, #facc15) 58%, transparent);
  background: color-mix(in srgb, var(--boss-accent, #facc15) 12%, rgba(0, 0, 0, 0.32));
  color: #fff2ba;
}

.world-boss-damage-rank__columns,
.world-boss-damage-rank__row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.world-boss-damage-rank__columns {
  padding: 10px 12px 6px;
}

.world-boss-damage-rank__body {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.world-boss-damage-rank__columns span:last-child {
  text-align: right;
}

.world-boss-damage-rank__list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 0 8px 9px;
  overflow-y: auto;
}

.world-boss-damage-rank__row {
  padding: 9px 8px;
  border: 1px solid rgba(244, 232, 208, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(244, 232, 208, 0.82);
  font: 800 11px/1.1 var(--font-ui, inherit);
}

.world-boss-damage-rank__row.is-current {
  border-color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 62%, transparent);
  background: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 12%, rgba(0, 0, 0, 0.28));
  color: #fff7d6;
}

.world-boss-damage-rank__position {
  color: color-mix(in srgb, var(--boss-accent, #facc15) 78%, #fff);
}

.world-boss-damage-rank__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-damage-rank__row strong {
  color: #f8e9bd;
  font-variant-numeric: tabular-nums;
}

.world-boss-damage-rank__current-outside {
  display: grid;
  gap: 6px;
  padding: 9px 8px 10px;
  border-top: 1px solid rgba(244, 232, 208, 0.12);
  color: rgba(244, 232, 208, 0.64);
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.world-boss-damage-rank__empty {
  margin: 10px;
  padding: 14px 12px;
  border: 1px dashed rgba(244, 232, 208, 0.16);
  border-radius: 8px;
  color: rgba(244, 232, 208, 0.66);
  font: 700 11px/1.45 var(--font-body, inherit);
}

.world-boss-fight-arena--v2 .world-boss-fight-main {
  width: min(1120px, calc(100vw - 580px));
  margin-right: auto;
  margin-left: auto;
}

.world-boss-fight-layout:has(.world-boss-combat-log) .world-boss-fight-main {
  width: min(1040px, calc(100vw - 700px));
}

.world-boss-fight-main {
  width: min(1180px, calc(100vw - 64px));
  height: 100%;
  margin: 0 auto;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: end;
}

.world-boss-fight-stage {
  position: relative;
  width: min(1120px, 100%);
  height: min(56dvh, 610px);
  justify-self: center;
  align-self: center;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

.world-boss-signature-effect {
  --signature-color: var(--boss-accent, #facc15);
  --signature-color-2: var(--boss-accent-2, #60a5fa);
  position: absolute;
  inset: -8% -7%;
  z-index: 4;
  overflow: hidden;
  border-radius: 28px;
  pointer-events: none;
  animation: world-boss-signature-life 3s ease-out both;
}

.world-boss-signature-effect__visual,
.world-boss-signature-effect__visual::before,
.world-boss-signature-effect__visual::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.world-boss-signature-effect__callout {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  min-width: min(350px, 72vw);
  gap: 7px;
  padding: 14px 26px 16px;
  transform: translate(-50%, -50%);
  border: 1px solid color-mix(in srgb, var(--signature-color) 68%, #f4e8d0);
  border-radius: 10px;
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--signature-color) 18%, transparent), transparent 52%),
    rgba(2, 6, 14, 0.88);
  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.72),
    0 0 34px color-mix(in srgb, var(--signature-color) 28%, transparent),
    inset 0 0 22px rgba(255, 255, 255, 0.035);
  text-align: center;
  text-transform: uppercase;
  animation: world-boss-signature-callout 3s cubic-bezier(0.2, 0.78, 0.22, 1) both;
}

.world-boss-signature-effect__callout span {
  color: color-mix(in srgb, var(--signature-color-2) 72%, #ffffff);
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.24em;
}

.world-boss-signature-effect__callout strong {
  color: #fff8df;
  font: 900 clamp(24px, 3vw, 42px)/0.95 var(--font-serif, serif);
  letter-spacing: 0.025em;
  text-shadow:
    0 3px 14px rgba(0, 0, 0, 0.92),
    0 0 18px color-mix(in srgb, var(--signature-color) 48%, transparent);
}

.world-boss-signature-effect--last-bell {
  --signature-color: #a855f7;
  --signature-color-2: #d8b4fe;
}

.world-boss-signature-effect--last-bell .world-boss-signature-effect__visual {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 13%, rgba(216, 180, 254, 0.72) 13.5% 14.1%, transparent 14.7% 25%, rgba(168, 85, 247, 0.46) 25.5% 26.1%, transparent 26.8% 38%, rgba(126, 34, 206, 0.32) 38.5% 39.2%, transparent 40%),
    radial-gradient(circle at 50% 52%, rgba(88, 28, 135, 0.32), transparent 58%);
  animation: world-boss-bell-wave 3s ease-out both;
}

.world-boss-signature-effect--magma-verdict {
  --signature-color: #f97316;
  --signature-color-2: #fde047;
}

.world-boss-signature-effect--magma-verdict .world-boss-signature-effect__visual {
  background:
    radial-gradient(ellipse at 50% 110%, rgba(255, 237, 94, 0.8) 0 7%, rgba(249, 115, 22, 0.5) 20%, rgba(127, 29, 29, 0.18) 42%, transparent 70%),
    linear-gradient(0deg, rgba(127, 29, 29, 0.38), transparent 62%);
  animation: world-boss-magma-rise 3s ease-out both;
}

.world-boss-signature-effect--magma-verdict .world-boss-signature-effect__visual::before {
  background:
    radial-gradient(circle at 12% 84%, #fed7aa 0 2px, transparent 3px),
    radial-gradient(circle at 28% 94%, #fb923c 0 3px, transparent 4px),
    radial-gradient(circle at 66% 88%, #fde047 0 2px, transparent 3px),
    radial-gradient(circle at 84% 96%, #f97316 0 3px, transparent 4px),
    radial-gradient(circle at 48% 80%, #ffedd5 0 2px, transparent 3px);
  animation: world-boss-embers 2.5s ease-out both;
}

.world-boss-signature-effect--undertow {
  --signature-color: #06b6d4;
  --signature-color-2: #bae6fd;
}

.world-boss-signature-effect--undertow .world-boss-signature-effect__visual {
  background:
    repeating-radial-gradient(ellipse at 50% 115%, transparent 0 12%, rgba(34, 211, 238, 0.22) 12.5% 13.5%, transparent 14% 22%),
    linear-gradient(0deg, rgba(8, 47, 73, 0.46), transparent 72%);
  transform-origin: 50% 100%;
  animation: world-boss-undertow-pull 3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.world-boss-signature-effect--eye-of-storm {
  --signature-color: #38bdf8;
  --signature-color-2: #e0f2fe;
}

.world-boss-signature-effect--eye-of-storm .world-boss-signature-effect__visual {
  background:
    radial-gradient(circle at 50% 48%, transparent 0 20%, rgba(2, 6, 23, 0.18) 34%, rgba(2, 6, 23, 0.72) 72%),
    conic-gradient(from 30deg at 50% 48%, transparent, rgba(56, 189, 248, 0.18), transparent 30%, rgba(147, 197, 253, 0.12), transparent 66%);
  animation: world-boss-storm-eye 3s ease-in-out both;
}

.world-boss-signature-effect--eye-of-storm .world-boss-signature-effect__visual::after {
  inset: -20%;
  background:
    linear-gradient(112deg, transparent 47.8%, rgba(255, 255, 255, 0.88) 48.2% 48.6%, rgba(56, 189, 248, 0.82) 49% 49.35%, transparent 49.7%);
  opacity: 0;
  animation: world-boss-lightning-flash 3s ease-out both;
}

.world-boss-signature-effect--rootquake {
  --signature-color: #84cc16;
  --signature-color-2: #d9f99d;
}

.world-boss-signature-effect--rootquake .world-boss-signature-effect__visual {
  background:
    repeating-conic-gradient(from 9deg at 50% 78%, transparent 0deg 9deg, rgba(190, 242, 100, 0.34) 9.3deg 9.8deg, transparent 10.2deg 20deg),
    radial-gradient(ellipse at 50% 105%, rgba(101, 67, 33, 0.64), rgba(63, 98, 18, 0.18) 42%, transparent 68%);
  clip-path: polygon(0 35%, 100% 35%, 100% 100%, 0 100%);
  animation: world-boss-root-cracks 3s ease-out both;
}

.world-boss-fight-stage.has-signature-effect--rootquake:not(.is-reduced-motion) {
  animation: world-boss-rootquake-shake 680ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.world-boss-signature-effect--fate-snare {
  --signature-color: #c084fc;
  --signature-color-2: #f0abfc;
}

.world-boss-signature-effect--fate-snare .world-boss-signature-effect__visual {
  background:
    repeating-linear-gradient(26deg, transparent 0 54px, rgba(216, 180, 254, 0.28) 55px 56px, transparent 57px 108px),
    repeating-linear-gradient(-34deg, transparent 0 68px, rgba(192, 132, 252, 0.22) 69px 70px, transparent 71px 136px),
    radial-gradient(circle, rgba(88, 28, 135, 0.3), transparent 62%);
  animation: world-boss-fate-snare 3s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.world-boss-signature-effect--dawn-without-mercy {
  --signature-color: #facc15;
  --signature-color-2: #fef3c7;
}

.world-boss-signature-effect--dawn-without-mercy .world-boss-signature-effect__visual {
  background:
    radial-gradient(circle at 50% 49%, rgba(255, 255, 255, 0.82) 0 2%, rgba(254, 240, 138, 0.64) 7%, transparent 22%),
    repeating-conic-gradient(from 0deg at 50% 49%, rgba(250, 204, 21, 0.28) 0deg 3deg, transparent 4deg 18deg),
    radial-gradient(circle at 50% 49%, transparent 20%, rgba(250, 204, 21, 0.36) 21% 22%, transparent 23% 42%, rgba(253, 230, 138, 0.18) 43% 44%, transparent 45%);
  animation: world-boss-dawn-flare 3s ease-out both;
}

.world-boss-signature-effect--final-eclipse {
  --signature-color: #8b5cf6;
  --signature-color-2: #ddd6fe;
}

.world-boss-signature-effect--final-eclipse .world-boss-signature-effect__visual {
  background:
    radial-gradient(circle at 50% 48%, #010107 0 15%, rgba(2, 2, 12, 0.98) 16%, rgba(91, 33, 182, 0.72) 17% 18%, rgba(139, 92, 246, 0.28) 21%, transparent 34%),
    radial-gradient(circle at 50% 48%, rgba(8, 3, 25, 0.76), transparent 70%);
  animation: world-boss-eclipse 3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes world-boss-signature-life {
  0%, 100% { opacity: 0; }
  8%, 78% { opacity: 1; }
}

@keyframes world-boss-signature-callout {
  0% { opacity: 0; transform: translate(-50%, -42%) scale(0.92); }
  13%, 76% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -55%) scale(0.98); }
}

@keyframes world-boss-bell-wave {
  0% { opacity: 0; transform: scale(0.38); filter: blur(5px); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.5); filter: blur(0); }
}

@keyframes world-boss-magma-rise {
  0% { opacity: 0; transform: translateY(22%); }
  18%, 64% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-4%); }
}

@keyframes world-boss-embers {
  0% { opacity: 0; transform: translateY(20%); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-46%) scale(0.82); }
}

@keyframes world-boss-undertow-pull {
  0% { opacity: 0; transform: scaleY(0.78) translateY(12%); }
  22%, 72% { opacity: 1; transform: scaleY(1) translateY(0); }
  100% { opacity: 0; transform: scale(0.84, 1.08) translateY(-5%); }
}

@keyframes world-boss-storm-eye {
  0% { opacity: 0; transform: rotate(-7deg) scale(1.12); }
  20%, 72% { opacity: 1; }
  100% { opacity: 0; transform: rotate(10deg) scale(0.94); }
}

@keyframes world-boss-lightning-flash {
  0%, 27%, 100% { opacity: 0; }
  31% { opacity: 0.9; }
  38% { opacity: 0; }
}

@keyframes world-boss-root-cracks {
  0% { opacity: 0; transform: scale(0.45, 0.7); transform-origin: 50% 82%; }
  18%, 70% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.12); }
}

@keyframes world-boss-rootquake-shake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  14% { transform: translate3d(-5px, 2px, 0) rotate(-0.2deg); }
  28% { transform: translate3d(5px, -2px, 0) rotate(0.18deg); }
  42% { transform: translate3d(-4px, 1px, 0) rotate(-0.12deg); }
  58% { transform: translate3d(3px, -1px, 0) rotate(0.1deg); }
  74% { transform: translate3d(-2px, 1px, 0); }
}

@keyframes world-boss-fate-snare {
  0% { opacity: 0; transform: scale(1.35) rotate(-4deg); }
  24%, 72% { opacity: 1; transform: scale(0.94) rotate(0); }
  100% { opacity: 0; transform: scale(0.82) rotate(2deg); }
}

@keyframes world-boss-dawn-flare {
  0% { opacity: 0; transform: scale(0.35) rotate(-8deg); }
  20% { opacity: 0.92; }
  62% { opacity: 0.72; }
  100% { opacity: 0; transform: scale(1.42) rotate(5deg); }
}

@keyframes world-boss-eclipse {
  0% { opacity: 0; transform: scale(0.3); filter: blur(5px); }
  24%, 68% { opacity: 1; transform: scale(1); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.25); filter: blur(2px); }
}

.world-boss-fight-stage.is-reduced-motion .world-boss-signature-effect,
.world-boss-fight-stage.is-reduced-motion .world-boss-signature-effect__visual,
.world-boss-fight-stage.is-reduced-motion .world-boss-signature-effect__visual::before,
.world-boss-fight-stage.is-reduced-motion .world-boss-signature-effect__visual::after,
.world-boss-fight-stage.is-reduced-motion .world-boss-signature-effect__callout {
  animation: none !important;
}

.world-boss-fight-stage.is-reduced-motion .world-boss-signature-effect {
  opacity: 1;
}

.world-boss-fight-stage.is-reduced-motion .world-boss-signature-effect__visual {
  opacity: 0.28;
}

@media (prefers-reduced-motion: reduce) {
  .world-boss-fight-stage.has-signature-effect,
  .world-boss-signature-effect,
  .world-boss-signature-effect__visual,
  .world-boss-signature-effect__visual::before,
  .world-boss-signature-effect__visual::after,
  .world-boss-signature-effect__callout {
    animation: none !important;
  }

  .world-boss-signature-effect {
    opacity: 1;
  }

  .world-boss-signature-effect__visual {
    opacity: 0.28;
  }
}

.world-boss-fight-boss-art {
  display: none;
}

.world-boss-fight-float-anchor {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.world-boss-fight-abilities {
  position: absolute;
  top: -42px;
  left: 50%;
  z-index: 5;
  display: flex;
  width: min(620px, calc(100% - 48px));
  transform: translateX(-50%);
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.world-boss-fight-ability {
  position: relative;
  min-width: 0;
  width: 188px;
  height: 58px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(127, 29, 29, 0.32), rgba(2, 7, 16, 0.68)),
    rgba(0, 0, 0, 0.46);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.44);
  overflow: visible;
}

.world-boss-fight-ability[data-help]::after,
.world-boss-fight-ally[data-help]::after {
  content: attr(data-help);
  position: absolute;
  z-index: 60;
  left: 50%;
  bottom: calc(100% + 9px);
  width: min(310px, 78vw);
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 42%, rgba(244, 232, 208, 0.2));
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--boss-accent-2, #60a5fa) 18%, transparent), transparent 48%),
    linear-gradient(180deg, rgba(5, 10, 22, 0.99), rgba(0, 0, 0, 0.98));
  color: #fff4d6;
  font: 800 11px/1.35 var(--font-body, inherit);
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  white-space: pre-line;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.72),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.world-boss-fight-ability[data-help]:hover::after,
.world-boss-fight-ability[data-help]:focus-visible::after,
.world-boss-fight-ally[data-help]:hover::after,
.world-boss-fight-ally[data-help]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.world-boss-fight-ability--ready {
  border-color: rgba(252, 165, 165, 0.46);
}

.world-boss-fight-ability--casting {
  border-color: rgba(254, 202, 202, 0.86);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.44),
    0 0 22px rgba(248, 113, 113, 0.42);
}

.world-boss-fight-ability__icon {
  position: relative;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(254, 202, 202, 0.25);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.46);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.world-boss-fight-ability__icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.world-boss-fight-ability--cooling .world-boss-fight-ability__icon img {
  filter: saturate(0.72) brightness(0.68);
}

.world-boss-fight-ability__icon::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(rgba(0, 0, 0, 0.72) 0deg var(--cooldown-angle, 0deg), transparent var(--cooldown-angle, 0deg) 360deg);
  opacity: 0;
  pointer-events: none;
}

.world-boss-fight-ability--cooling .world-boss-fight-ability__icon::after {
  opacity: 1;
}

.world-boss-fight-ability__cooldown {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fee2e2;
  font: 1000 13px/1 var(--font-ui, inherit);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.world-boss-fight-ability__copy {
  min-width: 0;
  display: block;
}

.world-boss-fight-ability__copy strong,
.world-boss-fight-ability__copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-fight-ability__copy strong {
  color: #fff1d4;
  font: 900 11px/1.1 var(--font-ui, inherit);
}

.world-boss-fight-ability__copy em {
  margin-top: 4px;
  color: #fca5a5;
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-style: normal;
}

.world-boss-fight-boss-health {
  position: absolute;
  top: clamp(10px, 4%, 24px);
  left: 50%;
  z-index: 4;
  width: min(560px, calc(100% - 96px));
  transform: translateX(-50%);
}

.world-boss-fight-boss-health .world-boss-fight-bar {
  background: rgba(1, 6, 14, 0.78);
  border-color: rgba(248, 113, 113, 0.46);
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.48),
    0 0 24px rgba(239, 68, 68, 0.2);
}

.world-boss-fight-boss-health .world-boss-fight-bar__track {
  height: 15px;
}

.world-boss-fight-bar--boss-head .world-boss-fight-bar__fill {
  background: linear-gradient(90deg, #7f1d1d, #dc2626, #fb7185);
  box-shadow: 0 0 22px rgba(248, 113, 113, 0.38);
}

.world-boss-fight-team-panel {
  z-index: 4;
  width: min(980px, 100%);
  justify-self: center;
}

.world-boss-fight-lineup {
  position: relative;
  z-index: 12;
  width: min(1180px, 100%);
  justify-self: center;
  display: flex;
  justify-content: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(244, 232, 208, 0.14);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(2, 7, 16, 0.34), rgba(0, 0, 0, 0.58));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  overflow: visible;
}

.world-boss-combat-log {
  position: fixed;
  top: 16px;
  right: 22px;
  bottom: 18px;
  width: min(340px, 23vw);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(244, 232, 208, 0.14);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(2, 7, 16, 0.62), rgba(0, 0, 0, 0.5));
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.36);
  overflow: hidden;
}

.world-boss-combat-log__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(244, 232, 208, 0.1);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--boss-accent, #facc15) 12%, transparent), transparent),
    rgba(0, 0, 0, 0.22);
}

.world-boss-combat-log__header span,
.world-boss-combat-log__header strong {
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.world-boss-combat-log__header span {
  color: color-mix(in srgb, var(--boss-accent, #facc15) 82%, #ffffff);
}

.world-boss-combat-log__header strong {
  color: rgba(244, 232, 208, 0.58);
}

.world-boss-combat-log__list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 9px;
  overflow-y: auto;
}

.world-boss-combat-log__entry {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(244, 232, 208, 0.08);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.24);
}

@media (max-width: 1100px) {
  .world-boss-damage-rank {
    width: 228px;
    max-height: calc(100dvh - 164px);
  }

  .world-boss-fight-arena--v2 .world-boss-fight-main {
    width: calc(100vw - 520px);
    margin-right: auto;
    margin-left: auto;
  }

  .world-boss-fight-layout:has(.world-boss-combat-log) .world-boss-fight-main {
    width: calc(100vw - 560px);
  }

  .world-boss-fight-arena--v2 .world-boss-combat-log {
    width: min(260px, calc(100vw - 28px));
  }
}

@media (max-width: 780px) {
  .world-boss-damage-rank {
    top: 132px;
    left: 8px;
    bottom: auto;
    width: 210px;
    max-height: 34dvh;
  }

  .world-boss-fight-arena--v2 .world-boss-fight-main,
  .world-boss-fight-layout:has(.world-boss-combat-log) .world-boss-fight-main {
    width: 100%;
    margin-left: auto;
  }
}

.world-boss-combat-log__meta {
  min-width: 0;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 5px;
}

.world-boss-combat-log__entry--damage,
.world-boss-combat-log__entry--critical {
  border-color: color-mix(in srgb, var(--boss-accent, #facc15) 26%, transparent);
}

.world-boss-combat-log__entry--critical {
  background:
    linear-gradient(90deg, rgba(250, 204, 21, 0.1), transparent),
    rgba(0, 0, 0, 0.24);
}

.world-boss-combat-log__entry--boss,
.world-boss-combat-log__entry--danger {
  border-color: rgba(248, 113, 113, 0.28);
}

.world-boss-combat-log__entry--heal {
  border-color: rgba(134, 239, 172, 0.26);
}

.world-boss-combat-log__entry--buff,
.world-boss-combat-log__entry--shield {
  border-color: rgba(125, 211, 252, 0.28);
}

.world-boss-combat-log__entry--dot {
  border-color: rgba(192, 132, 252, 0.3);
  background:
    linear-gradient(90deg, rgba(126, 34, 206, 0.1), transparent),
    rgba(0, 0, 0, 0.24);
}

.world-boss-combat-log__time {
  color: rgba(244, 232, 208, 0.46);
  font: 900 10px/1.2 var(--font-mono, monospace);
}

.world-boss-combat-log__type {
  display: inline-grid;
  min-width: 40px;
  height: 15px;
  place-items: center;
  border: 1px solid rgba(244, 232, 208, 0.12);
  border-radius: 999px;
  background: rgba(3, 8, 17, 0.82);
  color: rgba(244, 232, 208, 0.72);
  font: 1000 8px/1 var(--font-ui, inherit);
  letter-spacing: 0.06em;
}

.world-boss-combat-log__type--damage {
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.24);
}

.world-boss-combat-log__type--critical {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.5);
}

.world-boss-combat-log__type--dot {
  color: #d8b4fe;
  border-color: rgba(192, 132, 252, 0.38);
}

.world-boss-combat-log__type--heal {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.34);
}

.world-boss-combat-log__type--buff,
.world-boss-combat-log__type--shield {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.34);
}

.world-boss-combat-log__type--boss,
.world-boss-combat-log__type--danger {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.4);
}

.world-boss-combat-log__copy {
  min-width: 0;
}

.world-boss-combat-log__copy strong,
.world-boss-combat-log__copy span {
  display: block;
}

.world-boss-combat-log__copy strong {
  color: rgba(244, 232, 208, 0.92);
  font: 900 11px/1.15 var(--font-ui, inherit);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-combat-log__copy span {
  margin-top: 3px;
  color: rgba(216, 207, 188, 0.74);
  font: 700 11px/1.28 var(--font-body, inherit);
}

.world-boss-combat-log__entry--critical .world-boss-combat-log__copy strong {
  color: #facc15;
}

.world-boss-combat-log__entry--danger .world-boss-combat-log__copy strong,
.world-boss-combat-log__entry--boss .world-boss-combat-log__copy strong {
  color: #fca5a5;
}

.world-boss-combat-log__entry--heal .world-boss-combat-log__copy strong {
  color: #86efac;
}

.world-boss-combat-log__entry--buff .world-boss-combat-log__copy strong,
.world-boss-combat-log__entry--shield .world-boss-combat-log__copy strong {
  color: #7dd3fc;
}

.world-boss-combat-log__entry--dot .world-boss-combat-log__copy strong {
  color: #d8b4fe;
}

.world-boss-combat-log__empty {
  padding: 10px;
  color: rgba(216, 207, 188, 0.62);
  font: 800 11px/1.35 var(--font-body, inherit);
  text-align: center;
}

.world-boss-fight-ally {
  position: relative;
  width: 94px;
  min-width: 94px;
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 7px 6px 8px;
  border: 1px solid rgba(244, 232, 208, 0.1);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(7, 16, 32, 0.58), rgba(0, 0, 0, 0.5)),
    rgba(3, 8, 17, 0.58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  opacity: 0.95;
}

.world-boss-fight-ally:hover,
.world-boss-fight-ally:focus-within {
  z-index: 2147483646;
}

.world-boss-fight-ally[data-help]::after {
  z-index: 2147483647;
  bottom: calc(100% + 12px);
  background:
    radial-gradient(circle at 18% 0%, color-mix(in srgb, var(--boss-accent-2, #60a5fa) 18%, transparent), transparent 48%),
    linear-gradient(180deg, rgba(5, 10, 22, 1), rgba(0, 0, 0, 0.99));
  box-shadow:
    0 24px 54px rgba(0, 0, 0, 0.86),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.world-boss-fight-ally--player {
  opacity: 1;
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 46%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--boss-accent-2, #60a5fa) 18%, transparent), rgba(0, 0, 0, 0.52)),
    rgba(3, 8, 17, 0.68);
}

.world-boss-fight-ally--routed {
  filter: grayscale(1);
  opacity: 0.42;
}

.world-boss-fight-ally__avatar {
  width: 76px;
  height: 76px;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 42%, transparent);
  border-radius: 8px;
  object-fit: cover;
  background: rgba(3, 8, 17, 0.86);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.48);
}

.world-boss-fight-ally--player .world-boss-fight-ally__avatar {
  border-color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 72%, #ffffff);
  box-shadow: 0 0 18px color-mix(in srgb, var(--boss-accent-2, #60a5fa) 34%, transparent);
}

.world-boss-fight-ally__copy {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.world-boss-fight-ally__copy span,
.world-boss-fight-ally__copy strong,
.world-boss-fight-ally__copy em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-fight-ally__copy span {
  color: rgba(244, 232, 208, 0.9);
  font: 900 10.5px/1.08 var(--font-ui, inherit);
}

.world-boss-fight-ally__copy strong {
  margin-top: 2px;
  color: rgba(244, 232, 208, 0.76);
  font: 900 9.5px/1.08 var(--font-body, inherit);
}

.world-boss-fight-ally__copy em {
  margin-top: 2px;
  color: color-mix(in srgb, var(--boss-accent, #facc15) 82%, #ffffff);
  font: 900 8px/1.05 var(--font-ui, inherit);
  font-style: normal;
}

.world-boss-fight-ally__role {
  display: inline-grid;
  min-width: 34px;
  height: 15px;
  margin: 3px 3px 0 0;
  padding: 0 5px;
  place-items: center;
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 999px;
  background: rgba(30, 64, 175, 0.2);
  color: #bfdbfe;
  font: 1000 7px/1 var(--font-ui, inherit);
  font-style: normal;
  vertical-align: top;
}

.world-boss-fight-ally__role--healer {
  border-color: rgba(74, 222, 128, 0.46);
  background: rgba(22, 101, 52, 0.22);
  color: #bbf7d0;
}

.world-boss-fight-ally__role--tank {
  border-color: rgba(250, 204, 21, 0.44);
  background: rgba(133, 77, 14, 0.22);
  color: #fef08a;
}

.world-boss-fight-ally__copy small {
  display: inline-grid;
  min-width: 22px;
  height: 16px;
  margin-top: 3px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--boss-accent-2, #60a5fa) 48%, transparent);
  border-radius: 999px;
  background: rgba(3, 8, 17, 0.72);
  color: #e0f2fe;
  font: 1000 8.5px/1 var(--font-ui, inherit);
}

.world-boss-fight-backdrop,
.world-boss-fight-backdrop *,
.world-boss-ally-profile-overlay,
.world-boss-ally-profile-overlay * {
  -webkit-user-select: none;
  user-select: none;
}

.world-boss-fight-backdrop img,
.world-boss-ally-profile-overlay img {
  -webkit-user-drag: none;
}

.world-boss-fight-ally[data-profile-open="true"],
.world-boss-fight-ally:focus-visible {
  z-index: 20;
  outline: none;
  border-color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 76%, #ffffff);
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.06),
    0 0 24px color-mix(in srgb, var(--boss-accent-2, #60a5fa) 32%, transparent);
}

.world-boss-ally-profile-overlay {
  position: fixed;
  z-index: 2147483647;
  width: min(360px, calc((100vw / var(--vespera-ui-scale, 1)) - 24px));
  pointer-events: none;
  cursor: var(--vespera-cursor-default) !important;
  filter: drop-shadow(0 26px 54px rgba(0, 0, 0, 0.78));
}

.world-boss-ally-profile {
  position: relative;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ally-role-accent, #60a5fa) 58%, rgba(244, 232, 208, 0.24));
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--ally-role-accent, #60a5fa) 19%, transparent), transparent 40%),
    linear-gradient(155deg, rgba(8, 17, 33, 0.995), rgba(1, 5, 13, 0.995) 62%, rgba(0, 0, 0, 0.995));
  color: #f8ecd2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.world-boss-ally-profile::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--ally-role-accent, #60a5fa), transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--ally-role-accent, #60a5fa) 46%, transparent);
}

.world-boss-ally-profile__header {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px 14px 12px;
  border-bottom: 1px solid rgba(244, 232, 208, 0.11);
}

.world-boss-ally-profile__header img {
  width: 58px;
  height: 58px;
  border: 1px solid color-mix(in srgb, var(--ally-role-accent, #60a5fa) 70%, #ffffff);
  border-radius: 9px;
  object-fit: cover;
  background: rgba(2, 7, 16, 0.9);
  box-shadow:
    0 0 0 3px rgba(0, 0, 0, 0.44),
    0 0 18px color-mix(in srgb, var(--ally-role-accent, #60a5fa) 26%, transparent);
}

.world-boss-ally-profile__identity {
  min-width: 0;
}

.world-boss-ally-profile__identity > span {
  display: block;
  color: var(--ally-role-accent, #60a5fa);
  font: 1000 8px/1 var(--font-ui, inherit);
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.world-boss-ally-profile__identity h3 {
  overflow: hidden;
  margin: 5px 0 0;
  color: #fff3d4;
  font: 1000 16px/1.08 var(--font-ui, inherit);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-ally-profile__identity p {
  overflow: hidden;
  margin: 5px 0 0;
  color: rgba(226, 232, 240, 0.72);
  font: 800 10px/1.15 var(--font-body, inherit);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-ally-profile__origin {
  align-self: start;
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--ally-role-accent, #60a5fa) 48%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ally-role-accent, #60a5fa) 12%, rgba(0, 0, 0, 0.4));
  color: color-mix(in srgb, var(--ally-role-accent, #60a5fa) 76%, #ffffff);
  font: 1000 7px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.world-boss-ally-profile__summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid rgba(244, 232, 208, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.world-boss-ally-profile__summary > div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 9px 11px;
  border-right: 1px solid rgba(244, 232, 208, 0.08);
}

.world-boss-ally-profile__summary > div:last-child {
  border-right: 0;
}

.world-boss-ally-profile__summary span,
.world-boss-ally-profile__section dt {
  color: rgba(216, 207, 188, 0.54);
  font: 1000 7px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.world-boss-ally-profile__summary strong {
  overflow: hidden;
  color: #fff2ba;
  font: 1000 12px/1 var(--font-ui, inherit);
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.world-boss-ally-profile__role {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin: 10px 12px 0;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--ally-role-accent, #60a5fa) 28%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--ally-role-accent, #60a5fa) 7%, rgba(0, 0, 0, 0.3));
}

.world-boss-ally-profile__role span {
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--ally-role-accent, #60a5fa) 48%, transparent);
  border-radius: 5px;
  color: color-mix(in srgb, var(--ally-role-accent, #60a5fa) 78%, #ffffff);
  font: 1000 8px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.world-boss-ally-profile__role p {
  margin: 0;
  color: rgba(226, 232, 240, 0.72);
  font: 700 9px/1.35 var(--font-body, inherit);
}

.world-boss-ally-profile__section {
  padding: 11px 12px 0;
}

.world-boss-ally-profile__section:last-child {
  padding-bottom: 12px;
}

.world-boss-ally-profile__section h4 {
  margin: 0 0 7px;
  color: color-mix(in srgb, var(--ally-role-accent, #60a5fa) 76%, #ffffff);
  font: 1000 8px/1 var(--font-ui, inherit);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.world-boss-ally-profile__section dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 0;
}

.world-boss-ally-profile__section dl > div {
  min-width: 0;
  padding: 7px;
  border: 1px solid rgba(244, 232, 208, 0.09);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
}

.world-boss-ally-profile__section dd {
  overflow: hidden;
  margin: 5px 0 0;
  color: #fff2ba;
  font: 1000 11px/1 var(--font-mono, monospace);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-ally-profile__section--profile {
  opacity: 0.88;
}

html[lang="th"] .world-boss-ally-profile__identity > span,
html[lang="th"] .world-boss-ally-profile__origin,
html[lang="th"] .world-boss-ally-profile__summary span,
html[lang="th"] .world-boss-ally-profile__section dt,
html[lang="th"] .world-boss-ally-profile__role span,
html[lang="th"] .world-boss-ally-profile__section h4 {
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.04em;
}

html[lang="th"] .world-boss-ally-profile__role p,
html[lang="th"] .world-boss-ally-profile__identity p {
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 500px) {
  .world-boss-ally-profile__header {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .world-boss-ally-profile__header img {
    width: 52px;
    height: 52px;
  }

  .world-boss-ally-profile__origin {
    display: none;
  }

  .world-boss-ally-profile__section dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.world-boss-fight-enrage {
  position: absolute;
  top: clamp(58px, 15%, 82px);
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  padding: 9px 16px;
  border: 1px solid rgba(254, 202, 202, 0.64);
  border-radius: 999px;
  background: rgba(127, 29, 29, 0.68);
  color: #fee2e2;
  font: 1000 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 0 26px rgba(239, 68, 68, 0.42);
}

@media (max-width: 1500px) {
  .world-boss-fight-layout {
    padding: 0 16px 16px;
  }

  .world-boss-fight-main {
    width: min(820px, calc(100vw - 380px));
  }

  .world-boss-combat-log {
    position: fixed;
    top: 12px;
    right: 12px;
    bottom: 16px;
    width: min(300px, 23vw);
    margin: 0;
    min-height: 150px;
  }

  .world-boss-fight-stage {
    width: min(720px, 100%);
    height: min(52dvh, 420px);
  }

  .world-boss-fight-abilities {
    width: min(560px, calc(100% - 24px));
    gap: 6px;
  }

  .world-boss-fight-ability {
    width: 168px;
  }

  .world-boss-fight-team-panel,
  .world-boss-fight-lineup {
    width: min(720px, 100%);
  }

  .world-boss-fight-lineup {
    justify-content: flex-start;
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  .world-boss-fight-top {
    padding: 12px 12px 6px;
  }

  .world-boss-fight-title h2 {
    font-size: clamp(25px, 9vw, 38px);
  }

  .world-boss-fight-layout {
    padding: 0 10px 10px;
  }

  .world-boss-fight-main {
    width: 100%;
  }

  .world-boss-combat-log {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    margin: 8px auto 0;
    max-height: 20dvh;
  }

  .world-boss-fight-boss-health {
    width: min(460px, calc(100% - 24px));
  }

  .world-boss-fight-abilities {
    top: -38px;
    width: min(420px, calc(100% - 12px));
  }

  .world-boss-fight-ability {
    width: 132px;
    grid-template-columns: 38px minmax(0, 1fr);
    height: 50px;
    padding: 5px;
  }

  .world-boss-fight-ability__icon {
    width: 38px;
    height: 38px;
  }

  .world-boss-fight-ability__copy strong {
    font-size: 10px;
  }

  .world-boss-fight-ability__copy em {
    font-size: 8px;
  }

  .world-boss-fight-stage {
    width: min(620px, 100%);
    height: min(44dvh, 360px);
  }

  .world-boss-fight-lineup {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .world-boss-fight-ally {
    flex: 0 0 94px;
  }
}

@media (max-height: 760px) {
  .world-boss-fight-top {
    padding-top: 10px;
  }

  .world-boss-fight-title h2 {
    font-size: clamp(26px, 3vw, 42px);
  }

  .world-boss-fight-title__meta {
    margin-top: 6px;
    padding: 5px 8px;
  }

  .world-boss-fight-stage {
    width: min(720px, 100%);
    height: min(46dvh, 350px);
  }

  .world-boss-fight-boss-health .world-boss-fight-bar {
    padding: 7px 8px;
  }

  .world-boss-fight-abilities {
    top: -34px;
  }

  .world-boss-fight-ability {
    height: 50px;
  }

  .world-boss-fight-team-panel .world-boss-fight-bar {
    padding: 7px 8px;
  }

  .world-boss-fight-lineup {
    padding: 8px;
  }

  .world-boss-fight-ally__avatar {
    width: 68px;
    height: 68px;
  }
}

/* Dungeon defeat: keep the full result, report, and actions in one desktop viewport. */
.dungeon-defeat-summary {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(13rem, 0.72fr) minmax(22rem, 1.28fr);
  grid-template-areas:
    "title title"
    "meta meta"
    "flavor flavor"
    "xp report"
    "encouragement report"
    "action report";
  align-content: center;
  align-items: start;
  gap: 0.65rem 1.5rem;
  width: min(100%, 72rem);
  height: calc(100% - 0.5rem);
  max-height: calc(100dvh - 0.75rem);
  padding: clamp(0.9rem, 2.4vh, 1.5rem);
}

.dungeon-defeat-summary__title {
  grid-area: title;
  margin: 0;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem);
  line-height: 1.05;
}

.dungeon-defeat-summary__meta {
  grid-area: meta;
  margin: 0;
}

.dungeon-defeat-summary__flavor {
  grid-area: flavor;
  width: 100%;
  max-width: 54rem;
  margin: 0 auto 0.2rem;
  line-height: 1.35;
}

.dungeon-defeat-summary__xp {
  grid-area: xp;
  align-self: start;
  min-width: 0;
  margin: 0;
}

.dungeon-defeat-summary__report {
  grid-area: report;
  align-self: start;
  min-width: 0;
  margin: 0;
}

.dungeon-defeat-summary__report > div > h3 {
  margin: 0 0 0.65rem;
  padding-bottom: 0.45rem;
  font-size: 1.15rem;
}

.dungeon-defeat-summary__report > div > div {
  padding: 0.8rem;
}

.dungeon-defeat-summary__encouragement {
  grid-area: encouragement;
  align-self: start;
  width: 100%;
  max-width: none;
  margin: 0;
}

.dungeon-defeat-summary__action {
  grid-area: action;
  align-self: start;
  justify-self: start;
}

@media (max-height: 740px) and (min-width: 701px) {
  .dungeon-defeat-summary {
    gap: 0.45rem 1.1rem;
    padding: 0.75rem 1rem;
  }

  .dungeon-defeat-summary__flavor {
    font-size: 0.9rem;
  }

  .dungeon-defeat-summary__xp,
  .dungeon-defeat-summary__encouragement {
    padding: 0.65rem;
  }

  .dungeon-defeat-summary__report > div > h3 {
    margin-bottom: 0.45rem;
    padding-bottom: 0.35rem;
    font-size: 1rem;
  }

  .dungeon-defeat-summary__report > div > div {
    padding: 0.65rem;
  }
}

@media (max-width: 700px) {
  .dungeon-defeat-summary {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.75rem;
    height: auto;
    max-height: none;
    padding: 1rem;
    overflow: visible;
  }

  .dungeon-defeat-summary__action {
    align-self: center;
  }
}

.world-boss-modal-shell {
  width: min(1144px, calc(100vw - 16px));
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 58%, transparent);
  border-radius: 10px;
  background:
    radial-gradient(circle at 72% 0%, color-mix(in srgb, var(--boss-accent-2, #60a5fa) 18%, transparent), transparent 30%),
    linear-gradient(145deg, rgba(4, 11, 23, 0.98), rgba(9, 18, 33, 0.96) 54%, rgba(3, 8, 18, 0.98));
  box-shadow:
    0 28px 110px rgba(0, 0, 0, 0.74),
    0 0 48px color-mix(in srgb, var(--boss-accent, #facc15) 16%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.world-boss-modal-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(214, 169, 79, 0.2);
  overflow: hidden;
}

.world-boss-modal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--boss-accent, #facc15) 16%, transparent), transparent 54%),
    radial-gradient(circle at 82% 50%, color-mix(in srgb, var(--boss-accent-2, #60a5fa) 24%, transparent), transparent 34%);
  pointer-events: none;
}

.world-boss-modal-hero > * {
  position: relative;
  z-index: 1;
}

.world-boss-war-chest-panel {
  margin: 8px 10px 0;
  margin-bottom: 0;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 28%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--boss-accent, #facc15) 9%, transparent), transparent),
    rgba(2, 9, 20, 0.68);
}

.world-boss-war-chest-panel__header,
.world-boss-war-chest-meter__topline,
.world-boss-war-chest-meter__stats,
.world-boss-war-chest-row,
.world-boss-war-chest-row__actions,
.world-boss-war-chest-mini {
  display: flex;
  align-items: center;
}

.world-boss-war-chest-panel__header,
.world-boss-war-chest-meter__topline,
.world-boss-war-chest-meter__stats {
  justify-content: space-between;
  gap: 10px;
}

.world-boss-war-chest-battles {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(117, 177, 219, 0.24);
}

.world-boss-war-chest-battles__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.world-boss-war-chest-battles__header strong {
  color: #8ff0b3;
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.13em;
}

.world-boss-war-chest-battles__header span {
  color: rgba(216, 224, 224, 0.72);
  font: 700 11px/1.3 var(--font-body, inherit);
  text-align: right;
}

.world-boss-war-chest-battles__tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.world-boss-war-chest-battles__tabs button {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(117, 177, 219, 0.26);
  border-radius: 7px;
  background: rgba(8, 25, 41, 0.78);
  color: #d7dce0;
  font: 800 10px/1.2 var(--font-ui, inherit);
  text-align: left;
}

.world-boss-war-chest-battles__tabs button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-war-chest-battles__tabs button strong {
  flex: 0 0 auto;
  color: #ffe9a8;
  font-size: 9px;
  white-space: nowrap;
}

.world-boss-war-chest-battles__tabs button.is-active {
  border-color: rgba(110, 231, 162, 0.64);
  background: linear-gradient(135deg, rgba(25, 88, 60, 0.72), rgba(8, 35, 31, 0.9));
  color: #f2fff6;
  box-shadow: inset 0 0 0 1px rgba(110, 231, 162, 0.12);
}

.world-boss-war-chest-panel__round {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(216, 207, 188, 0.68);
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-boss-war-chest-panel__counts {
  color: #fff2ba;
  font-family: var(--font-mono, monospace);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.world-boss-war-chest-meter {
  min-width: 0;
  flex: 1;
  margin-top: 6px;
}

.world-boss-war-chest-meter__topline {
  color: rgba(244, 232, 208, 0.88);
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-boss-war-chest-meter__topline strong {
  color: #fff2ba;
  font-family: var(--font-mono, monospace);
}

.world-boss-war-chest-meter__track {
  height: 9px;
  margin-top: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.world-boss-war-chest-meter__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, var(--boss-accent-2, #60a5fa), var(--boss-accent, #facc15));
  box-shadow: 0 0 16px color-mix(in srgb, var(--boss-accent, #facc15) 24%, transparent);
  transition: width 220ms ease;
}

.world-boss-war-chest-meter__stats {
  margin-top: 4px;
  color: rgba(216, 207, 188, 0.66);
  font: 700 10px/1.15 var(--font-body, inherit);
}

.world-boss-war-chest-meter__lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 8px;
}

.world-boss-war-chest-lane {
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.12), rgba(0, 0, 0, 0.28));
}

.world-boss-war-chest-lane--sustain {
  border-color: rgba(74, 222, 128, 0.3);
  background: linear-gradient(135deg, rgba(21, 128, 61, 0.13), rgba(0, 0, 0, 0.28));
}

.world-boss-war-chest-lane.is-full {
  border-color: rgba(250, 204, 21, 0.48);
  box-shadow: inset 0 0 18px rgba(250, 204, 21, 0.06);
}

.world-boss-war-chest-lane__topline,
.world-boss-war-chest-lane__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.world-boss-war-chest-lane__topline {
  color: var(--color-parchment);
  font: 900 11px/1.1 var(--font-ui, inherit);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.world-boss-war-chest-lane__topline strong {
  color: #fff2ba;
  font-family: var(--font-mono, monospace);
  white-space: nowrap;
}

.world-boss-war-chest-lane__track {
  height: 6px;
  margin-top: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  overflow: hidden;
}

.world-boss-war-chest-lane__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #60a5fa);
  box-shadow: 0 0 10px rgba(96, 165, 250, 0.35);
  transition: width 220ms ease;
}

.world-boss-war-chest-lane--sustain .world-boss-war-chest-lane__fill {
  background: linear-gradient(90deg, #15803d, #4ade80);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.32);
}

.world-boss-war-chest-lane.is-full .world-boss-war-chest-lane__fill {
  background: linear-gradient(90deg, #ca8a04, #fde68a);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.4);
}

.world-boss-war-chest-lane__footer {
  margin-top: 5px;
  color: rgba(216, 207, 188, 0.62);
  font: 700 10px/1.2 var(--font-body, inherit);
}

.world-boss-war-chest-lane__footer strong {
  color: rgba(244, 232, 208, 0.88);
  text-align: right;
}

.world-boss-war-chest-lane.is-full .world-boss-war-chest-lane__footer strong {
  color: #fde68a;
}

.world-boss-war-chest-panel__cap-note {
  margin: 6px 0 0;
  padding: 5px 7px;
  border-left: 2px solid color-mix(in srgb, var(--boss-accent, #facc15) 58%, transparent);
  border-radius: 0 5px 5px 0;
  background: color-mix(in srgb, var(--boss-accent, #facc15) 7%, transparent);
  color: rgba(232, 221, 199, 0.72);
  font: 700 11px/1.4 var(--font-body, inherit);
}

.world-boss-war-chest-panel__empty {
  margin-top: 7px;
  padding: 7px;
  border: 1px dashed rgba(244, 232, 208, 0.14);
  border-radius: 7px;
  color: rgba(216, 207, 188, 0.72);
  font: 700 12px/1.35 var(--font-body, inherit);
  text-align: center;
}

.world-boss-war-chest-lane-missing-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.world-boss-war-chest-lane-missing {
  display: grid;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 7px;
  background: rgba(30, 64, 175, 0.1);
}

.world-boss-war-chest-lane-missing--sustain {
  border-color: rgba(74, 222, 128, 0.24);
  background: rgba(21, 128, 61, 0.1);
}

.world-boss-war-chest-lane-missing strong {
  color: #f0e6cf;
  font: 900 11px/1.25 var(--font-ui, inherit);
}

.world-boss-war-chest-lane-missing span {
  color: rgba(216, 224, 224, 0.7);
  font: 700 10px/1.3 var(--font-body, inherit);
}

.world-boss-war-chest-donations {
  display: flex;
  min-height: 0;
  flex-direction: column;
}

.world-boss-war-chest-list {
  display: grid;
  gap: 5px;
  max-height: 126px;
  margin-top: 7px;
  overflow-y: auto;
  padding-right: 4px;
}

.world-boss-war-chest-row {
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(244, 232, 208, 0.1);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.24);
}

.world-boss-war-chest-row__icon {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(214, 169, 79, 0.24);
  border-radius: 6px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.32);
}

.world-boss-war-chest-row__copy {
  min-width: 0;
  flex: 1;
}

.world-boss-war-chest-row__copy strong,
.world-boss-war-chest-row__copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-war-chest-row__copy strong {
  color: var(--color-parchment);
  font: 900 12px/1.1 var(--font-serif, inherit);
}

.world-boss-war-chest-row__lane-picker {
  display: inline-flex;
  gap: 4px;
  margin-top: 5px;
  padding: 2px;
  border: 1px solid rgba(117, 177, 219, 0.22);
  border-radius: 999px;
  background: rgba(2, 10, 19, 0.7);
}

.world-boss-war-chest-row__lane-picker button {
  padding: 4px 7px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(216, 224, 224, 0.66);
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.world-boss-war-chest-row__lane-picker button.is-active {
  background: rgba(96, 165, 250, 0.24);
  color: #e7f3ff;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.32);
}

.world-boss-war-chest-row__lane-picker button:first-child.is-active {
  background: rgba(34, 197, 94, 0.22);
  color: #dcfce7;
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.3);
}

.world-boss-war-chest-row__copy span {
  margin-top: 2px;
  color: rgba(216, 207, 188, 0.7);
  font: 700 10px/1.1 var(--font-body, inherit);
}

.world-boss-war-chest-row__meta-line--counts {
  color: #fff2ba !important;
  font-family: var(--font-mono, monospace) !important;
}

.world-boss-war-chest-row__status {
  margin-top: 4px !important;
  color: #fbbf24 !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  white-space: normal !important;
}

.world-boss-war-chest-row.can-fill .world-boss-war-chest-row__status {
  color: #86efac !important;
}

.world-boss-war-chest-row.is-full {
  border-color: rgba(250, 204, 21, 0.35);
  background: rgba(113, 63, 18, 0.12);
}

.world-boss-war-chest-row.is-full .world-boss-war-chest-row__status {
  color: #fde68a !important;
}

.world-boss-war-chest-row__actions {
  gap: 5px;
}

.world-boss-war-chest-row__actions button,
.world-boss-war-chest-mini__button {
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 34%, transparent);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  color: #fff2ba;
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.world-boss-war-chest-row__actions button {
  padding: 7px 8px;
  min-width: 74px;
}

.world-boss-war-chest-row__commit {
  min-width: 112px !important;
  white-space: nowrap;
}

.world-boss-war-chest-row__commit.is-fill {
  border-color: rgba(74, 222, 128, 0.52);
  background: rgba(21, 128, 61, 0.24);
  color: #dcfce7;
}

.world-boss-war-chest-row__commit.is-all {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(146, 64, 14, 0.22);
  color: #fef3c7;
}

@media (max-width: 720px) {
  .world-boss-war-chest-meter__lanes {
    grid-template-columns: 1fr;
  }

  .world-boss-war-chest-lane__footer {
    align-items: flex-start;
  }
}

.world-boss-war-chest-row__actions button:disabled,
.world-boss-war-chest-mini__button:disabled {
  opacity: 0.45;
  cursor: default;
}

.world-boss-war-chest-mini {
  gap: 6px;
  flex-wrap: wrap;
  min-width: 220px;
  padding: 6px;
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 13, 25, 0.76), rgba(2, 7, 16, 0.66)),
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--boss-accent, #facc15) 10%, transparent), transparent 36%);
}

.world-boss-war-chest-mini .world-boss-war-chest-meter {
  margin-top: 0;
}

.world-boss-war-chest-mini__button {
  flex: 0 0 auto;
  padding: 7px 8px;
  white-space: nowrap;
}

.world-boss-test-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 34%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--boss-accent, #facc15) 12%, transparent), transparent),
    rgba(2, 9, 20, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.world-boss-test-panel__header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}

.world-boss-test-panel__icon {
  width: 36px;
  height: 36px;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 42%, transparent);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.28);
  object-fit: cover;
}

.world-boss-test-panel__kicker,
.world-boss-test-panel__label {
  color: color-mix(in srgb, var(--boss-accent, #facc15) 82%, #ffffff);
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.world-boss-test-panel__name {
  margin-top: 4px;
  color: var(--color-parchment);
  font: 800 13px/1.1 var(--font-serif, inherit);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-test-panel__select {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(244, 232, 208, 0.18);
  border-radius: 7px;
  background: rgba(3, 8, 17, 0.88);
  color: rgba(244, 232, 208, 0.92);
  font: 800 12px/1 var(--font-body, inherit);
  outline: none;
}

.world-boss-test-panel__select:focus {
  border-color: color-mix(in srgb, var(--boss-accent, #facc15) 62%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--boss-accent, #facc15) 18%, transparent);
}

.world-boss-test-panel__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.world-boss-test-panel__choice {
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid rgba(244, 232, 208, 0.14);
  border-radius: 7px;
  background: rgba(3, 8, 17, 0.62);
  color: rgba(244, 232, 208, 0.74);
  font: 900 10px/1.05 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
  overflow-wrap: anywhere;
}

.world-boss-test-panel__choice:hover,
.world-boss-test-panel__choice:focus-visible {
  border-color: color-mix(in srgb, var(--boss-choice-accent, #facc15) 54%, transparent);
  color: #fff2ba;
}

.world-boss-test-panel__choice.is-active {
  border-color: color-mix(in srgb, var(--boss-choice-accent, #facc15) 72%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--boss-choice-accent, #facc15) 24%, transparent), rgba(3, 8, 17, 0.72));
  color: #fff7d2;
  box-shadow: 0 0 14px color-mix(in srgb, var(--boss-choice-accent, #facc15) 18%, transparent);
}

.world-boss-test-panel__button {
  min-height: 36px;
  border: 1px solid rgba(255, 238, 177, 0.72);
  border-radius: 999px;
  background: linear-gradient(110deg, var(--boss-accent, #facc15), var(--boss-accent-2, #60a5fa), #f8e4a0);
  color: #07111a;
  font: 900 11px/1 var(--font-ui, inherit);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--boss-accent, #facc15) 16%, transparent);
}

.world-boss-test-panel__button:hover {
  filter: brightness(1.08);
}

.world-boss-test-panel__note {
  color: rgba(216, 207, 188, 0.7);
  font: 700 11px/1.35 var(--font-body, inherit);
}

.world-boss-result-panel {
  margin: 8px 10px 0;
  margin-bottom: 0;
  padding: 8px;
  border: 1px solid rgba(134, 239, 172, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(20, 83, 45, 0.24), rgba(2, 9, 20, 0.7));
}

.world-boss-result-panel--rout {
  border-color: rgba(248, 113, 113, 0.34);
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.24), rgba(2, 9, 20, 0.72));
}

.world-boss-result-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.world-boss-result-panel__tier {
  color: #fff2ba;
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-boss-result-panel__summary {
  margin-top: 8px;
  color: rgba(244, 232, 208, 0.82);
  font: 800 12px/1.35 var(--font-body, inherit);
}

.world-boss-result-panel__legendary-roll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(250, 204, 21, 0.2);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(244, 232, 208, 0.68);
  font: 800 9px/1.2 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.world-boss-result-panel__legendary-roll strong {
  color: #fde68a;
  font-size: 12px;
}

.world-boss-result-panel__legendary-roll b {
  color: rgba(244, 232, 208, 0.72);
}

.world-boss-result-panel__legendary-roll.is-won {
  border-color: rgba(250, 204, 21, 0.56);
  box-shadow: 0 0 14px rgba(250, 204, 21, 0.12);
}

.world-boss-result-panel__legendary-roll.is-won b {
  color: #fde68a;
}

.world-boss-result-cache {
  display: grid;
  gap: 7px;
  margin-top: 9px;
  padding: 9px;
  border: 1px solid rgba(96, 165, 250, 0.34);
  border-radius: 7px;
  background: linear-gradient(100deg, rgba(37, 99, 235, 0.12), rgba(5, 12, 24, 0.72));
}

.world-boss-result-cache__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #dbeafe;
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.world-boss-result-cache__header span {
  color: #86efac;
  font-size: 9px;
}

.world-boss-result-cache p {
  margin: 0;
  color: rgba(216, 207, 188, 0.78);
  font: 600 11px/1.35 var(--font-body, inherit);
}

.world-boss-result-cache__contents {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.world-boss-result-cache__contents > span {
  padding: 4px 6px;
  border: 1px solid rgba(147, 197, 253, 0.2);
  border-radius: 5px;
  background: rgba(3, 10, 20, 0.55);
  color: rgba(219, 234, 254, 0.86);
  font: 700 10px/1.2 var(--font-body, inherit);
}

.world-boss-result-cache__open {
  justify-self: start;
  padding: 7px 12px;
  border: 1px solid rgba(96, 165, 250, 0.55);
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(30, 64, 175, 0.88));
  color: #eff6ff;
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  transition: filter 0.15s ease, opacity 0.15s ease;
}

.world-boss-result-cache__open:not(:disabled):hover {
  filter: brightness(1.16);
}

.world-boss-result-cache__open:disabled {
  cursor: default;
  opacity: 0.55;
}

.world-boss-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.world-boss-result-grid h4 {
  margin: 0 0 4px;
  color: rgba(216, 207, 188, 0.7);
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-boss-result-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 5px;
  border: 1px solid rgba(244, 232, 208, 0.08);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(244, 232, 208, 0.78);
  font: 800 10px/1.1 var(--font-body, inherit);
}

.world-boss-result-row--player {
  border-color: color-mix(in srgb, var(--boss-accent, #facc15) 34%, transparent);
  color: #fff2ba;
}

.world-boss-result-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-result-row strong {
  flex: 0 0 auto;
  color: inherit;
  font-family: var(--font-mono, monospace);
}

.world-boss-performance-details {
  margin: 0 10px 12px;
  border: 1px solid rgba(214, 169, 79, 0.2);
  border-radius: 8px;
  background: rgba(2, 9, 20, 0.72);
  overflow: hidden;
}

.world-boss-performance-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  cursor: pointer;
  list-style: none;
  color: rgba(244, 232, 208, 0.82);
}

.world-boss-performance-details > summary::-webkit-details-marker {
  display: none;
}

.world-boss-performance-details > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: #fff2ba;
  font: 950 16px/1 var(--font-ui, inherit);
}

.world-boss-performance-details[open] > summary::after {
  content: "−";
}

.world-boss-performance-details > summary strong {
  color: #fff2ba;
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-boss-performance-details > summary span {
  margin-left: auto;
  color: rgba(216, 207, 188, 0.62);
  font: 700 10px/1.25 var(--font-body, inherit);
}

.world-boss-performance-details .world-boss-result-grid {
  margin: 0;
  padding: 0 10px 10px;
}

.world-boss-modal-kicker,
.world-boss-panel__title {
  color: color-mix(in srgb, var(--boss-accent, #facc15) 86%, #ffffff);
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.world-boss-modal-title {
  margin: 4px 0 0;
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.4vw, 30px);
  font-style: italic;
  line-height: 0.95;
  letter-spacing: 0;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.72);
}

.world-boss-modal-epithet {
  margin-top: 4px;
  color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 74%, #f4e8d0);
  font: 700 12px/1.2 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.world-boss-modal-copy {
  max-width: 660px;
  margin: 5px 0 0;
  color: rgba(216, 207, 188, 0.84);
  font: 600 12px/1.35 var(--font-body, inherit);
}

.world-boss-modal-copy strong {
  color: #fff2ba;
}

.world-boss-modal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.world-boss-modal-chips span {
  padding: 4px 7px;
  border: 1px solid rgba(244, 232, 208, 0.16);
  border-radius: 999px;
  background: rgba(2, 9, 20, 0.58);
  color: rgba(244, 232, 208, 0.86);
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.world-boss-modal-prize {
  display: grid;
  justify-items: center;
  gap: 5px;
  border-radius: 8px;
  cursor: help;
}

.world-boss-modal-prize:focus-visible,
.world-boss-gear-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--boss-accent, #facc15) 76%, #ffffff);
  outline-offset: 3px;
}

.world-boss-modal-prize__icon,
.world-boss-gear-card__icon {
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 48%, transparent);
  border-radius: 8px;
  background: rgba(3, 8, 17, 0.78);
  box-shadow:
    0 0 24px color-mix(in srgb, var(--boss-accent, #facc15) 22%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.world-boss-modal-prize__icon {
  width: 48px;
  height: 48px;
  object-fit: cover;
  animation: world-boss-prize-glow 2.8s ease-in-out infinite;
}

.world-boss-modal-prize__label {
  max-width: 118px;
  color: #fff2ba;
  font: 800 12px/1.2 var(--font-serif, inherit);
  text-align: center;
}

.world-boss-modal-prize__icon,
.world-boss-gear-card__icon {
  border-color: rgba(250, 204, 21, 0.72);
  box-shadow:
    0 0 24px rgba(250, 204, 21, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.world-boss-modal-close {
  position: sticky;
  top: 8px;
  z-index: 8;
  align-self: start;
  justify-self: end;
  padding: 7px 9px;
  border: 1px solid rgba(244, 232, 208, 0.34);
  border-radius: 6px;
  background: rgba(3, 8, 17, 0.92);
  color: rgba(244, 232, 208, 0.9);
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

.world-boss-modal-close:hover {
  border-color: rgba(255, 242, 186, 0.72);
  color: #fff2ba;
}

.world-boss-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.86fr) minmax(240px, 0.9fr);
  gap: 8px;
  align-items: start;
  padding: 8px 10px;
}

.world-boss-panel {
  border: 1px solid rgba(214, 169, 79, 0.18);
  border-radius: 8px;
  background: rgba(2, 9, 20, 0.66);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
  padding: 8px;
}

.world-boss-panel--abilities {
  grid-row: auto;
}

.world-boss-panel--drops {
  grid-column: auto;
  grid-row: auto;
}

.world-boss-ability-list,
.world-boss-drop-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.world-boss-panel--drops .world-boss-drop-list {
  grid-template-columns: 1fr;
}

.world-boss-ability-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 7px;
  padding: 6px;
  border: 1px solid rgba(244, 232, 208, 0.1);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(10, 24, 44, 0.84), rgba(3, 10, 20, 0.64));
}

.world-boss-ability-card__sigil {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 42%, transparent);
  border-radius: 7px;
  color: color-mix(in srgb, var(--boss-accent, #facc15) 84%, #ffffff);
  font: 900 11px/1 var(--font-mono, monospace);
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--boss-accent, #facc15) 12%, transparent);
}

.world-boss-ability-card__icon-frame {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 55%, transparent);
  border-radius: 8px;
  background: rgba(2, 8, 18, 0.8);
  box-shadow:
    inset 0 0 12px color-mix(in srgb, var(--boss-accent, #facc15) 12%, transparent),
    0 3px 10px rgba(0, 0, 0, 0.28);
}

.world-boss-ability-card__icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.world-boss-ability-card__number {
  position: absolute;
  right: 2px;
  bottom: 2px;
  display: grid;
  min-width: 15px;
  height: 15px;
  padding: 0 2px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 64%, transparent);
  border-radius: 4px;
  background: rgba(2, 8, 18, 0.92);
  color: color-mix(in srgb, var(--boss-accent, #facc15) 82%, #ffffff);
  font: 900 8px/1 var(--font-mono, monospace);
}

.world-boss-inline-help {
  display: inline-grid;
  width: 14px;
  height: 14px;
  margin-left: 5px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 55%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--boss-accent, #facc15) 12%, transparent);
  color: color-mix(in srgb, var(--boss-accent, #facc15) 82%, #ffffff);
  font: 900 9px/1 var(--font-ui, inherit);
  vertical-align: 1px;
}

.world-boss-war-chest-meter__topline[data-help],
.world-boss-war-chest-lane[data-help],
.world-boss-war-chest-lane__footer [data-help] {
  cursor: help;
}

.world-boss-war-chest-meter__topline[data-help]:focus-visible,
.world-boss-war-chest-lane[data-help]:focus-visible,
.world-boss-war-chest-lane__footer [data-help]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--boss-accent, #facc15) 70%, #ffffff);
  outline-offset: 2px;
}

.world-boss-ability-card__name,
.world-boss-gear-card__name,
.world-boss-drop-row__name {
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-weight: 800;
  line-height: 1.15;
}

.world-boss-ability-card__text,
.world-boss-gear-card__rule,
.world-boss-drop-row__meta {
  margin-top: 2px;
  color: rgba(216, 207, 188, 0.74);
  font: 600 11px/1.28 var(--font-body, inherit);
}

.world-boss-cache-contents {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.world-boss-cache-contents__label {
  color: #93c5fd;
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.world-boss-cache-contents__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.world-boss-cache-contents__item {
  min-width: 0;
  padding: 4px 5px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 4px;
  background: rgba(3, 10, 20, 0.52);
  color: rgba(219, 234, 254, 0.78);
  font: 700 9px/1.25 var(--font-body, inherit);
}

.world-boss-ability-card__counter {
  margin-top: 3px;
  color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 68%, #f4e8d0);
  font: 700 11px/1.35 var(--font-body, inherit);
}

.world-boss-gear-card {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  margin-top: 7px;
  border-radius: 8px;
  cursor: help;
}

.world-boss-modal-prize:hover .world-boss-modal-prize__icon,
.world-boss-modal-prize:focus-visible .world-boss-modal-prize__icon,
.world-boss-gear-card:hover .world-boss-gear-card__icon,
.world-boss-gear-card:focus-visible .world-boss-gear-card__icon {
  border-color: color-mix(in srgb, var(--boss-accent, #facc15) 88%, #ffffff);
  box-shadow:
    0 0 30px color-mix(in srgb, var(--boss-accent, #facc15) 32%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.world-boss-gear-card__icon {
  width: 62px;
  height: 62px;
  object-fit: cover;
}

.world-boss-gear-card__slot {
  color: color-mix(in srgb, var(--boss-accent, #facc15) 78%, #ffffff);
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-boss-gear-card__power {
  margin-top: 5px;
  color: #facc15;
  font: 800 11px/1.25 var(--font-ui, inherit);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.world-boss-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.world-boss-stat {
  padding: 7px;
  border: 1px solid rgba(244, 232, 208, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.22);
}

.world-boss-stat--scaled {
  border-color: color-mix(in srgb, var(--boss-accent, #facc15) 28%, transparent);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--boss-accent, #facc15) 10%, transparent), transparent),
    rgba(0, 0, 0, 0.24);
}

.world-boss-stat span {
  display: block;
  color: rgba(216, 207, 188, 0.62);
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.world-boss-stat strong {
  display: block;
  margin-top: 4px;
  color: #fff2ba;
  font: 900 14px/1 var(--font-mono, monospace);
}

.world-boss-drop-row,
.world-boss-loot-card {
  position: relative;
}

.world-boss-drop-row {
  --drop-rarity-color: rgba(216, 207, 188, 0.78);
  --drop-rarity-border: rgba(244, 232, 208, 0.1);
  --drop-rarity-bg: rgba(7, 16, 30, 0.72);
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px;
  border: 1px solid var(--drop-rarity-border);
  border-radius: 7px;
  background: var(--drop-rarity-bg);
}

.world-boss-drop-row[data-rarity="legendary"] {
  --drop-rarity-color: #facc15;
  --drop-rarity-border: rgba(250, 204, 21, 0.38);
  --drop-rarity-bg: linear-gradient(90deg, rgba(250, 204, 21, 0.08), rgba(7, 16, 30, 0.74) 42%);
}

.world-boss-drop-row[data-rarity="epic"] {
  --drop-rarity-color: #c084fc;
  --drop-rarity-border: rgba(192, 132, 252, 0.36);
  --drop-rarity-bg: linear-gradient(90deg, rgba(147, 51, 234, 0.1), rgba(7, 16, 30, 0.74) 42%);
}

.world-boss-drop-row[data-rarity="rare"] {
  --drop-rarity-color: #60a5fa;
  --drop-rarity-border: rgba(96, 165, 250, 0.34);
  --drop-rarity-bg: linear-gradient(90deg, rgba(37, 99, 235, 0.1), rgba(7, 16, 30, 0.74) 42%);
}

.world-boss-drop-row[data-rarity="faction"] {
  --drop-rarity-color: #86efac;
  --drop-rarity-border: rgba(134, 239, 172, 0.3);
}

.world-boss-drop-row[data-rarity="currency"] {
  --drop-rarity-color: #fbbf24;
  --drop-rarity-border: rgba(251, 191, 36, 0.3);
}

.world-boss-drop-row[data-rarity="materials"] {
  --drop-rarity-color: #e879f9;
  --drop-rarity-border: rgba(232, 121, 249, 0.3);
}

.world-boss-drop-row__icon,
.world-boss-loot-card__icon {
  width: 32px;
  height: 32px;
  border: 1px solid var(--drop-rarity-border, rgba(214, 169, 79, 0.28));
  border-radius: 6px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.28);
}

.world-boss-drop-row__rarity {
  color: var(--drop-rarity-color);
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.world-boss-drop-row[data-help]::after,
.world-boss-loot-card::after {
  content: attr(data-help);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 2147483647;
  width: min(330px, 82vw);
  padding: 9px 11px;
  border: 1px solid rgba(214, 169, 79, 0.42);
  border-radius: 6px;
  background: rgba(3, 8, 17, 0.97);
  color: rgba(244, 232, 208, 0.92);
  font: 600 11px/1.38 var(--font-body, inherit);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.world-boss-drop-row:hover,
.world-boss-loot-card:hover {
  z-index: 2147483647;
}

.world-boss-drop-row[data-help]:hover::after,
.world-boss-loot-card:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.offline-world-boss-loot {
  position: relative;
  z-index: 5;
  overflow: visible;
}

.offline-world-boss-loot:hover,
.offline-world-boss-loot:focus-within {
  z-index: 2147483647;
}

.offline-world-boss-loot .world-boss-loot-card {
  overflow: visible;
}

.offline-world-boss-loot .world-boss-loot-card::after {
  top: calc(100% + 8px);
  right: 0;
  bottom: auto;
  transform: translateY(-4px);
}

.offline-world-boss-loot .world-boss-loot-card:hover::after {
  transform: translateY(0);
}

.offline-return-modal {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: calc(100% - 2rem);
}

.offline-return-viewport {
  z-index: 2147483647 !important;
  pointer-events: auto !important;
  isolation: isolate;
}

.offline-return-modal > .vespera-modal-frame__header,
.offline-return-modal > .vespera-modal-frame__footer {
  flex: 0 0 auto;
}

.offline-return-modal > .vespera-modal-frame__footer {
  position: relative;
  z-index: 20;
  pointer-events: auto !important;
}

.offline-return-modal [data-offline-return-continue="true"] {
  position: relative;
  z-index: 21;
  pointer-events: auto !important;
  cursor: pointer;
  touch-action: manipulation;
}

.offline-return-modal > .vespera-modal-frame__body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.offline-ledger-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
}

.offline-ledger-overview__metric {
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(214, 169, 79, 0.18);
  border-radius: 0.4rem;
  background: linear-gradient(180deg, rgba(33, 31, 48, 0.82), rgba(16, 18, 31, 0.76));
  text-align: center;
}

.offline-ledger-overview__metric span {
  display: block;
  overflow: hidden;
  color: rgba(216, 207, 188, 0.62);
  font: 800 0.58rem/1.1 var(--font-ui, sans-serif);
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
}

.offline-ledger-overview__metric strong {
  display: block;
  margin-top: 0.3rem;
  color: var(--color-parchment);
  font: 800 1rem/1 var(--font-mono, monospace);
}

.offline-ledger-overview__metric--gained strong { color: #9bc58b; }
.offline-ledger-overview__metric--consumed strong { color: #e09a88; }
.offline-ledger-overview__metric--xp strong { color: var(--color-lilac-painted); }

.offline-ledger-section {
  border: 1px solid rgba(214, 169, 79, 0.2);
  border-radius: 0.45rem;
  background: rgba(17, 18, 31, 0.62);
  overflow: hidden;
}

.offline-ledger-section > summary {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
  color: var(--color-brass);
  cursor: pointer;
  font: 800 0.68rem/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.15em;
  list-style: none;
  text-transform: uppercase;
}

.offline-ledger-section > summary::-webkit-details-marker { display: none; }
.offline-ledger-section > summary::before {
  content: "+";
  width: 1rem;
  color: rgba(216, 207, 188, 0.68);
  font: 700 0.9rem/1 var(--font-mono, monospace);
  text-align: center;
}
.offline-ledger-section[open] > summary::before { content: "−"; }
.offline-ledger-section > summary:focus-visible {
  outline: 2px solid rgba(214, 169, 79, 0.72);
  outline-offset: -2px;
}

.offline-ledger-detail-list,
.offline-ledger-progress-list {
  display: grid;
  gap: 0.4rem;
  padding: 0 0.65rem 0.65rem;
}

.offline-ledger-detail-row,
.offline-ledger-progress-row,
.offline-ledger-consumed-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.35rem;
  background: rgba(36, 33, 49, 0.7);
}

.offline-ledger-detail-row strong,
.offline-ledger-consumed-row strong,
.offline-ledger-progress-row span {
  display: block;
  color: var(--color-parchment);
  font: 700 0.78rem/1.2 var(--font-body, serif);
}

.offline-ledger-detail-row span,
.offline-ledger-consumed-row span {
  display: block;
  margin-top: 0.14rem;
  color: rgba(216, 207, 188, 0.58);
  font: 700 0.58rem/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.offline-ledger-detail-value {
  flex: 0 0 auto;
  text-align: right;
}

.offline-ledger-detail-value strong {
  color: inherit;
  font-family: var(--font-mono, monospace);
}

.offline-ledger-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.28rem;
}

.offline-ledger-source-list span {
  padding: 0.16rem 0.3rem;
  border: 1px solid rgba(132, 165, 110, 0.22);
  border-radius: 999px;
  background: rgba(45, 78, 50, 0.16);
  color: rgba(186, 213, 170, 0.78);
  font: 700 0.54rem/1 var(--font-ui, sans-serif);
  letter-spacing: 0.04em;
}

.offline-ledger-section--consumed {
  border-color: rgba(198, 107, 74, 0.28);
}

.offline-ledger-section--consumed > summary { color: #e0a090; }
.offline-ledger-section--consumed > .grid { padding: 0 0.65rem 0.65rem; }
.offline-ledger-consumed-count {
  flex: 0 0 auto;
  color: #e09a88 !important;
  font-family: var(--font-mono, monospace) !important;
}

.offline-ledger-progress-row strong {
  flex: 0 0 auto;
  color: var(--color-lilac-painted);
  font: 800 0.72rem/1.1 var(--font-mono, monospace);
}

@media (max-width: 640px) {
  .offline-ledger-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offline-ledger-detail-row,
  .offline-ledger-progress-row { align-items: flex-start; }
  .offline-ledger-detail-value { max-width: 45%; }
  .offline-ledger-section > summary { padding-inline: 0.7rem; }
}

.world-boss-loot-card {
  padding: 12px;
  border: 1px solid rgba(214, 169, 79, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(8, 17, 32, 0.82), rgba(8, 14, 26, 0.66));
}

.world-boss-loot-card__eyebrow {
  color: var(--color-brass);
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.world-boss-loot-card__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.world-boss-loot-card__name {
  color: var(--color-parchment);
}

.world-boss-loot-card__meta,
.world-boss-loot-card__summary {
  margin-top: 3px;
  color: rgba(216, 207, 188, 0.72);
  font: 600 11px/1.25 var(--font-body, inherit);
}

.world-boss-loot-card__summary--won {
  color: #fde68a;
}

.world-boss-modal-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(214, 169, 79, 0.18);
  background: rgba(1, 6, 14, 0.52);
}

.world-boss-modal-footer__note {
  color: rgba(216, 207, 188, 0.74);
  font: 600 12px/1.35 var(--font-body, inherit);
}

.world-boss-modal-footer__note strong {
  color: #fff2ba;
}

.world-boss-join-button {
  min-width: 210px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 238, 177, 0.86);
  border-radius: 999px;
  background: linear-gradient(110deg, var(--boss-accent, #facc15), var(--boss-accent-2, #60a5fa), #f8e4a0);
  color: #07111a;
  font: 900 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  box-shadow: 0 10px 26px color-mix(in srgb, var(--boss-accent, #facc15) 18%, transparent);
}

.world-boss-join-button[aria-busy="true"],
.world-boss-auto-register-toggle[aria-busy="true"] {
  cursor: wait;
  opacity: 0.86;
}

.world-boss-join-button--joined {
  border-color: rgba(134, 239, 172, 0.48);
  background: rgba(34, 197, 94, 0.14);
  color: #9df3b7;
}

.world-boss-join-button--cancel {
  border-color: rgba(248, 113, 113, 0.62);
  background: rgba(127, 29, 29, 0.26);
  color: #fecaca;
  box-shadow: 0 10px 26px rgba(127, 29, 29, 0.18);
}

.world-boss-join-button--secondary {
  min-width: 190px;
  padding-inline: 12px;
  font-size: 10px;
}

.world-boss-join-button--cancel:hover,
.world-boss-join-button--cancel:focus-visible {
  border-color: rgba(254, 202, 202, 0.9);
  background: rgba(153, 27, 27, 0.38);
}

.world-boss-join-button--test {
  border-color: rgba(248, 113, 113, 0.62);
  background: linear-gradient(110deg, #fca5a5, #f97316, #fde68a);
  color: #1a0808;
}

.world-boss-gear-preview {
  position: fixed;
  top: 92px;
  right: 22px;
  z-index: 2147483647;
  width: min(340px, calc((100vw / var(--vespera-ui-scale, 1)) - 24px));
  max-height: calc((100dvh / var(--vespera-ui-scale, 1)) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
  box-sizing: border-box;
}

.world-boss-gear-preview > .relative {
  background: #07111f !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.72),
    0 0 28px color-mix(in srgb, var(--boss-accent, #facc15) 16%, transparent);
}

.world-boss-gear-preview__drop-note {
  margin-bottom: 8px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 48%, transparent);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--boss-accent-2, #60a5fa) 12%, #07111f), #07111f 42%),
    #07111f;
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.52),
    0 0 24px color-mix(in srgb, var(--boss-accent, #facc15) 14%, transparent);
}

.world-boss-gear-preview__eyebrow {
  color: color-mix(in srgb, var(--boss-accent, #facc15) 86%, #ffffff);
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.world-boss-gear-preview__body {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.world-boss-gear-preview__icon {
  width: 58px;
  height: 58px;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 46%, transparent);
  border-radius: 7px;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 0 18px color-mix(in srgb, var(--boss-accent, #facc15) 18%, transparent);
}

.world-boss-gear-preview__name {
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 900;
  line-height: 1.05;
}

.world-boss-gear-preview__meta,
.world-boss-gear-preview__rule {
  margin-top: 4px;
  color: rgba(216, 207, 188, 0.74);
  font: 700 11px/1.3 var(--font-body, inherit);
}

.world-boss-gear-preview__rule {
  color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 72%, #f4e8d0);
}

.world-boss-gear-preview__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.world-boss-gear-preview__stat {
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 26%, transparent);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
}

.world-boss-gear-preview__stat span {
  display: block;
  color: rgba(216, 207, 188, 0.62);
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.world-boss-gear-preview__stat strong {
  display: block;
  margin-top: 4px;
  color: #fff2ba;
  font: 900 13px/1 var(--font-mono, monospace);
}

@keyframes world-boss-button-pulse {
  0%, 100% {
    box-shadow:
      0 16px 42px rgba(0, 0, 0, 0.55),
      0 0 18px color-mix(in srgb, var(--boss-accent, #facc15) 45%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.48);
  }
  50% {
    box-shadow:
      0 18px 46px rgba(0, 0, 0, 0.62),
      0 0 34px color-mix(in srgb, var(--boss-accent-2, #60a5fa) 60%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.55);
  }
}

@keyframes world-boss-button-sweep {
  0%, 52% {
    transform: translateX(-72%) rotate(18deg);
  }
  100% {
    transform: translateX(72%) rotate(18deg);
  }
}

@keyframes world-boss-button-hue {
  0%, 100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.28) hue-rotate(18deg);
  }
}

@keyframes world-boss-prize-glow {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
}

@media (max-width: 900px) {
  .world-boss-modal-hero,
  .world-boss-modal-grid,
  .world-boss-modal-footer {
    grid-template-columns: 1fr;
  }

  .world-boss-panel--drops {
    grid-column: auto;
  }

  .world-boss-panel--drops .world-boss-drop-list {
    grid-template-columns: 1fr;
  }

  .world-boss-cache-contents__list {
    grid-template-columns: 1fr;
  }

  .world-boss-result-cache__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .world-boss-performance-details > summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .world-boss-performance-details > summary span {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .world-boss-performance-details .world-boss-result-grid {
    grid-template-columns: 1fr;
  }

  .world-boss-modal-prize {
    justify-items: start;
  }

  .world-boss-modal-close {
    position: sticky;
    top: 8px;
    justify-self: end;
  }

  .world-boss-join-button {
    width: 100%;
  }

  .world-boss-modal-shell--v2 .world-boss-war-chest-list {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 720px) {
  .world-boss-modal-shell {
    max-height: calc(100dvh - 16px);
  }

  .world-boss-war-chest-panel,
  .world-boss-result-panel {
    margin: 8px;
    margin-bottom: 0;
  }

  .world-boss-modal-grid {
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .world-boss-summon-button,
  .world-boss-summon-button::before,
  .world-boss-modal-prize__icon,
  .talent-current-subclass-badge,
  .talent-current-subclass-badge::before,
  .talent-current-subclass-badge::after {
    animation: none;
  }
}

@keyframes world-map-current-glow {
  0%,
  100% {
    opacity: 0.78;
    box-shadow:
      inset 0 0 0 1px rgb(var(--brass-rgb) / 0.18),
      0 0 14px rgb(var(--brass-rgb) / 0.18);
  }
  50% {
    opacity: 1;
    box-shadow:
      inset 0 0 0 1px rgb(var(--brass-rgb) / 0.34),
      0 0 22px rgb(var(--brass-rgb) / 0.28);
  }
}

@keyframes world-map-ember-drift {
  0% {
    transform: translate3d(-1.5%, 0, 0);
  }
  50% {
    transform: translate3d(1.5%, -1%, 0);
  }
  100% {
    transform: translate3d(-1.5%, 0, 0);
  }
}

@keyframes world-map-marker-flame {
  0%,
  100% {
    opacity: 0.58;
    height: 11px;
  }
  50% {
    opacity: 0.95;
    height: 15px;
  }
}

.faction-page-shell {
  width: 100%;
  height: calc(100dvh - 132px);
  max-height: calc(100dvh - 132px);
  min-height: 0;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(72, 87, 126, 0.12), transparent 36%),
    #02060f;
}

main:has(.faction-page-shell) {
  min-height: 0 !important;
  overflow: hidden !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

main:has(.faction-page-shell) > .relative.z-10,
main:has(.faction-page-shell) > .relative.z-10 > .relative.opacity-100 {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding-top: 0 !important;
}

main:has(.faction-page-shell) .faction-page-shell {
  flex: 1 1 auto;
  height: 100% !important;
  max-height: 100% !important;
}

.faction-page-shell--locked {
  min-height: 0;
}

.faction-map-stage-shell {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  background: #02060f;
  box-shadow:
    0 28px 86px rgba(0, 0, 0, 0.56),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.faction-map-stage-bg {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.faction-map-stage-bg--locked {
  filter: brightness(0.62) saturate(0.68);
}

.faction-map-stage-bg > .absolute.inset-0.pointer-events-none {
  background:
    linear-gradient(180deg, rgba(2, 8, 20, 0.26), rgba(2, 8, 20, 0.16) 44%, rgba(2, 8, 20, 0.34)),
    radial-gradient(circle at 50% 50%, rgba(255, 238, 176, 0.055), transparent 38%) !important;
}

.faction-map-scrim {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 32;
  min-width: 220px;
  pointer-events: none;
}

.faction-map-scrim--top {
  top: 0;
  padding: 18px 22px 58px;
  background: linear-gradient(180deg, rgba(2, 6, 14, 0.9), rgba(2, 6, 14, 0.54) 54%, transparent);
}

.faction-map-scrim--bottom {
  bottom: 0;
  padding: 54px 22px 16px;
  background: linear-gradient(0deg, rgba(2, 6, 14, 0.9), rgba(2, 6, 14, 0.58) 56%, transparent);
}

.faction-map-scrim p,
.faction-map-scrim span {
  font-size: 12px;
  line-height: 1.35;
}

.faction-page-shell .text-\[9px\],
.faction-page-shell .text-\[10px\],
.faction-page-shell .faction-map-node .relative.mt-2.flex,
.faction-page-shell .faction-map-node__pledged-ribbon,
.faction-page-shell .faction-standing-panel__mark,
.faction-page-shell .faction-standing-panel__mark b,
.faction-page-shell .faction-standing-panel__mark em,
.faction-page-shell .faction-frontier-chip,
.faction-page-shell .faction-metric div,
.faction-page-shell .world-boss-war-chest-meter__topline,
.faction-page-shell .world-boss-war-chest-meter__stats,
.faction-page-shell .world-boss-war-chest-mini__button,
.faction-page-shell .world-boss-test-panel__kicker,
.faction-page-shell .world-boss-test-panel__label,
.faction-page-shell .world-boss-test-panel__choice,
.faction-page-shell .world-boss-test-panel__button {
  font-size: 12px !important;
}

.faction-page-shell .faction-map-node .relative.mt-2.flex {
  flex-wrap: wrap;
  row-gap: 2px;
  line-height: 1.15;
}

.faction-page-shell .faction-standing-panel__mark,
.faction-page-shell .world-boss-test-panel__choice,
.faction-page-shell .world-boss-test-panel__button {
  line-height: 1.12 !important;
}

.faction-map-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(229, 220, 202, 0.82);
  font-family: var(--font-serif);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.faction-map-status-row span {
  min-width: 220px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid rgba(217, 184, 129, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.faction-map-fog {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 18%, rgba(9, 15, 28, 0.28) 48%, rgba(2, 6, 14, 0.72) 100%),
    linear-gradient(90deg, rgba(160, 174, 206, 0.12), transparent 18%, transparent 82%, rgba(160, 174, 206, 0.12));
  backdrop-filter: blur(2px);
}

.faction-locked-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 34;
  width: min(560px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  background: rgba(7, 10, 18, 0.92);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.62);
}

.faction-detail-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: clamp(74px, 13.2dvh, 122px) minmax(0, 1fr) !important;
  align-items: stretch !important;
  padding: 0 !important;
  min-width: 220px;
  backdrop-filter: blur(14px);
}

.faction-detail-hero {
  position: relative;
  width: 100% !important;
  height: auto !important;
  min-width: 220px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid rgba(217, 184, 129, 0.24);
}

.faction-detail-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 8, 16, 0.14), rgba(4, 8, 16, 0.58) 58%, rgba(4, 8, 16, 0.96)),
    radial-gradient(circle at 68% 26%, rgba(255, 226, 168, 0.16), transparent 34%);
}

.faction-detail-body {
  width: 100% !important;
  height: auto !important;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.faction-detail-body,
.faction-detail-body p,
.faction-info-block,
.faction-info-block > div,
.world-boss-war-chest-mini,
.world-boss-test-panel__note {
  font-size: 12px;
}

.faction-metric,
.faction-info-block,
.faction-standing-panel.combat-zone-panel {
  min-width: 220px;
  border-color: rgba(217, 184, 129, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(7, 13, 25, 0.76), rgba(2, 7, 16, 0.7)),
    radial-gradient(circle at 0% 0%, color-mix(in srgb, var(--faction-accent, #d9b881) 12%, transparent), transparent 36%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 10px 24px rgba(0, 0, 0, 0.18);
}

.faction-metric div,
.faction-info-block div {
  overflow-wrap: anywhere;
}

.faction-detail-body .faction-perk-tip[data-help]::after {
  right: auto;
  left: 0;
  bottom: calc(100% + 10px);
  width: min(280px, calc(100vw - 44px));
  background: rgba(3, 8, 17, 0.99);
}

.faction-leave-confirm {
  display: grid;
  gap: 7px;
}

.faction-leave-confirm__panel {
  display: grid;
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(69, 10, 10, 0.62), rgba(7, 13, 25, 0.92));
  color: #fee2e2;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.faction-leave-confirm__panel span {
  font: 900 12px/1.2 var(--font-serif, inherit);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.faction-leave-confirm__panel div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.faction-leave-confirm__cancel,
.faction-leave-confirm__accept {
  min-height: 32px;
  border-radius: 6px;
  font: 900 11px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.faction-leave-confirm__cancel {
  border: 1px solid rgba(217, 184, 129, 0.3);
  background: rgba(7, 13, 25, 0.76);
  color: var(--color-parchment);
}

.faction-leave-confirm__accept {
  border: 1px solid rgba(248, 113, 113, 0.62);
  background: rgba(127, 29, 29, 0.64);
  color: #fee2e2;
}

.faction-standing-panel.combat-zone-panel {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 8px !important;
  align-items: stretch !important;
  margin-top: 8px;
  padding: 10px !important;
  border-radius: 8px !important;
}

.faction-standing-panel__header,
.faction-standing-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.faction-standing-panel__header > div,
.faction-standing-panel__sigils {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.faction-standing-panel__header span,
.faction-standing-panel__sigils span {
  color: rgba(216, 207, 188, 0.68);
  font: 900 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.faction-standing-panel__header strong,
.faction-standing-panel__sigils strong {
  color: color-mix(in srgb, var(--faction-accent, #d9b881) 82%, #fff);
  font: 900 16px/1 var(--font-serif, inherit);
}

.faction-standing-panel__sigils {
  justify-items: end;
}

.faction-standing-panel__meter {
  position: relative;
  height: 50px;
  margin: 4px 8px 0;
}

.faction-standing-panel__meter::before,
.faction-standing-panel__fill {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 22px;
  height: 7px;
  border-radius: 999px;
}

.faction-standing-panel__meter::before {
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: linear-gradient(180deg, rgba(3, 8, 17, 0.78), rgba(0, 0, 0, 0.55));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7);
}

.faction-standing-panel__fill {
  right: auto;
  width: var(--standing-progress, 0%);
  background: linear-gradient(90deg, var(--faction-accent, #d9b881), #f2d18a);
  box-shadow: 0 0 16px color-mix(in srgb, var(--faction-accent, #d9b881) 36%, transparent);
}

.faction-standing-panel__mark {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: grid;
  grid-template-rows: 16px 14px 13px;
  justify-items: center;
  align-items: center;
  gap: 2px;
  min-width: 26px;
  color: rgba(216, 207, 188, 0.58);
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.faction-standing-panel__mark:nth-child(2) {
  transform: translateX(0);
}

.faction-standing-panel__mark:last-child {
  transform: translateX(-100%);
}

.faction-standing-panel__mark i {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(217, 184, 129, 0.32);
  border-radius: 50%;
  background: #060b14;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.42);
  z-index: 2;
}

.faction-standing-panel__mark b,
.faction-standing-panel__mark em {
  font-style: normal;
  white-space: nowrap;
}

.faction-page-shell .faction-standing-panel__mark em {
  min-width: 26px;
  padding: 2px 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(216, 207, 188, 0.58);
  font-size: 10px !important;
  line-height: 1 !important;
  text-align: center;
}

.faction-page-shell .faction-standing-panel__mark b {
  color: rgba(216, 207, 188, 0.68);
  font-size: 10px !important;
  line-height: 1 !important;
}

.faction-standing-panel__mark.is-active {
  color: #fff2ba;
}

.faction-standing-panel__mark.is-active em,
.faction-standing-panel__mark.is-active b {
  color: #f8e7b4;
}

.faction-standing-panel__mark.is-active i {
  border-color: #f6d37a;
  background: radial-gradient(circle, #fff6c7 0 28%, var(--faction-accent, #d9b881) 35% 100%);
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.5),
    0 0 12px color-mix(in srgb, var(--faction-accent, #d9b881) 50%, transparent);
}

.faction-standing-panel__mark.is-current em {
  border-color: color-mix(in srgb, var(--faction-accent, #d9b881) 72%, #fff);
  background: color-mix(in srgb, var(--faction-accent, #d9b881) 24%, rgba(5, 10, 19, 0.9));
  color: #fff7d6;
  box-shadow: 0 0 12px color-mix(in srgb, var(--faction-accent, #d9b881) 28%, transparent);
}

.faction-standing-panel__mark.is-current i {
  transform: scale(1.12);
}

.faction-standing-panel__footer {
  margin-top: 1px;
  padding-top: 8px;
  border-top: 1px solid rgba(217, 184, 129, 0.12);
  color: rgba(216, 207, 188, 0.72);
  font: 700 12px/1.2 var(--font-body, inherit);
}

.faction-frontier-chip {
  justify-self: start;
  min-width: 220px;
  min-height: 32px;
  border: 1px solid rgba(134, 239, 172, 0.58);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(22, 101, 52, 0.72), rgba(5, 46, 22, 0.76)),
    radial-gradient(circle at 50% 0%, rgba(190, 242, 100, 0.22), transparent 58%);
  color: #dcfce7;
  font: 900 11px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.16);
}

.faction-switch-confirm {
  border-color: rgba(224, 82, 82, 0.58) !important;
  background:
    linear-gradient(180deg, rgba(104, 27, 24, 0.84), rgba(49, 13, 14, 0.92)) !important;
  color: #ffd9d2 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 226, 218, 0.16),
    0 0 18px rgba(224, 82, 82, 0.18) !important;
}

@media (max-width: 900px) {
  .faction-page-shell {
    height: calc(100dvh - 120px);
    max-height: calc(100dvh - 120px);
  }

  .faction-map-stage-shell {
    width: 100%;
    max-height: 100%;
  }

  .faction-map-scrim--top {
    padding: 14px 14px 48px;
  }

  .faction-map-scrim--bottom {
    padding: 48px 14px 12px;
  }
}

main[data-tutorial-page="spells"] {
  container-name: abilities-workspace;
  container-type: inline-size;
}

@media (min-width: 1241px) {
  main[data-tutorial-page="spells"] {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    overflow-y: hidden !important;
  }

  main[data-tutorial-page="spells"] > .relative.z-10,
  main[data-tutorial-page="spells"] > .relative.z-10 > .relative {
    height: 100%;
    min-height: 0;
  }

  main[data-tutorial-page="spells"] .spell-workshop-page {
    height: 100%;
    max-height: 100%;
  }
}

.spell-workshop-page {
  --ability-panel: rgba(14, 27, 49, 0.94);
  --ability-panel-soft: rgba(9, 20, 37, 0.88);
  --ability-line: rgba(214, 169, 79, 0.34);
  --ability-line-soft: rgba(144, 136, 168, 0.22);
  box-sizing: border-box;
  width: 100%;
  height: calc(100vh - 96px);
  height: calc(100dvh - 96px);
  max-height: calc(100vh - 96px);
  max-height: calc(100dvh - 96px);
  min-height: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(268px, 320px) minmax(280px, 1fr) minmax(280px, 1fr) minmax(280px, 330px);
  grid-template-rows: clamp(86px, 11dvh, 106px) clamp(170px, 23dvh, 204px) minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  color: var(--color-ivory-beige);
  overflow: hidden;
  overflow-x: hidden;
  background:
    linear-gradient(90deg, rgba(214, 169, 79, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(214, 169, 79, 0.035) 1px, transparent 1px),
    rgba(4, 13, 24, 0.38);
  background-size: 96px 96px;
}

.spell-workshop-page *,
.spell-workshop-page *::before,
.spell-workshop-page *::after {
  box-sizing: border-box;
}

.spell-workshop-header,
.spell-active-panel,
.spellbook-panel,
.spell-automation-header,
.spell-automation-panel,
.spell-auto-section,
.spell-rotation-box {
  border: 1px solid var(--ability-line);
  background: linear-gradient(180deg, var(--ability-panel), var(--ability-panel-soft));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 8px 28px rgba(0, 0, 0, 0.28);
}

.spell-workshop-header {
  grid-column: 2 / 4;
  grid-row: 1;
  min-height: 0;
  height: 100%;
  padding: 12px 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.spell-workshop-header::after {
  content: "";
  position: absolute;
  right: 24px;
  top: -58px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(168, 85, 247, 0.36);
  border-radius: 50%;
  opacity: 0.55;
  pointer-events: none;
}

.spell-build-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(118px, 1fr));
  gap: 8px;
  width: min(620px, 100%);
  position: relative;
  z-index: 1;
}

.spell-build-summary > span {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.spell-active-panel {
  grid-column: 2 / 4;
  grid-row: 2;
  padding: 10px 12px;
  border-radius: 8px;
  min-width: 0;
  min-height: 0;
  overflow: visible;
}

.spell-active-toolbar {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--ability-line-soft);
}

.spell-active-title-row {
  display: contents;
}

.spell-active-loadout-label {
  grid-column: 1;
  justify-self: start;
  white-space: nowrap;
}

.spell-active-remove-hint {
  grid-column: 3;
  justify-self: end;
  text-align: right;
}

.spell-active-lock-note {
  grid-column: 1 / -1;
  justify-self: center;
}

.spell-filter-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-content: flex-start;
  grid-column: 1;
  justify-self: stretch;
  gap: 6px;
  width: 100%;
  padding: 3px;
  border: 1px solid rgba(99, 213, 239, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 31, 51, 0.88), rgba(8, 14, 27, 0.86)),
    radial-gradient(circle at 50% 0%, rgba(123, 92, 246, 0.2), transparent 65%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 22px rgba(0, 0, 0, 0.24);
}

.spell-filter-tabs > button {
  width: 100%;
  min-width: 0;
  min-height: 30px;
  white-space: nowrap;
}

.spell-loadout-preset-button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 24px;
  padding: 0;
  border: 1px solid rgba(135, 150, 190, 0.34);
  border-radius: 999px;
  appearance: none;
  color: rgba(194, 219, 232, 0.78);
  background: linear-gradient(180deg, rgba(16, 24, 41, 0.96), rgba(5, 10, 20, 0.96));
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease;
}

.spell-loadout-preset-button:not(:disabled):hover {
  color: #dffbff;
  border-color: rgba(95, 231, 255, 0.64);
  background: linear-gradient(180deg, rgba(25, 43, 70, 0.98), rgba(8, 18, 34, 0.98));
  transform: translateY(-1px);
}

.spell-loadout-preset-button--active {
  color: #06111d;
  border-color: rgba(142, 244, 255, 0.95);
  background: linear-gradient(135deg, #5ee7ff 0%, #a78bfa 100%);
  box-shadow:
    0 0 16px rgba(94, 231, 255, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.spell-loadout-preset-button--disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.spell-loadout-presets {
  grid-column: 2;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(3, minmax(104px, 126px));
  gap: 7px;
  align-items: stretch;
}

.spell-loadout-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 34px;
  padding: 4px;
  border: 1px solid rgba(135, 150, 190, 0.34);
  border-radius: 7px;
  background:
    radial-gradient(circle at 20% 0%, rgba(95, 231, 255, 0.12), transparent 48%),
    linear-gradient(180deg, rgba(16, 24, 41, 0.96), rgba(5, 10, 20, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.spell-loadout-card--active {
  border-color: rgba(142, 244, 255, 0.95);
  background:
    radial-gradient(circle at 20% 0%, rgba(94, 231, 255, 0.28), transparent 52%),
    linear-gradient(135deg, rgba(37, 74, 103, 0.98), rgba(45, 35, 93, 0.98));
  box-shadow:
    0 0 16px rgba(94, 231, 255, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.spell-loadout-card--locked {
  border-color: rgba(248, 113, 113, 0.34);
}

.spell-loadout-card[data-help]::after {
  content: attr(data-help);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  z-index: 2147483647;
  width: max-content;
  max-width: 250px;
  padding: 8px 10px;
  border: 1px solid rgba(248, 113, 113, 0.46);
  border-radius: 6px;
  background: rgba(8, 12, 22, 0.98);
  color: rgba(255, 232, 232, 0.96);
  font: 700 11px/1.25 var(--font-body, inherit);
  letter-spacing: 0;
  text-align: center;
  text-transform: none;
  white-space: normal;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.54), 0 0 18px rgba(248, 113, 113, 0.16);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -2px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.spell-loadout-card[data-help]:hover::after,
.spell-loadout-card[data-help]:focus-within::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.spell-loadout-select,
.spell-loadout-edit-button {
  appearance: none;
  border: 0;
  color: inherit;
}

.spell-loadout-select {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  padding: 0 7px;
  border-radius: 5px;
  background: transparent;
  text-align: left;
}

.spell-loadout-select:not(:disabled):hover {
  background: rgba(255, 255, 255, 0.06);
}

.spell-loadout-select:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.spell-loadout-name {
  width: 100%;
  overflow: hidden;
  color: rgba(238, 247, 255, 0.94);
  font: 900 11px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.spell-loadout-count {
  color: rgba(216, 207, 188, 0.66);
  font: 800 9px/1 var(--font-mono, monospace);
}

.spell-loadout-edit-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(214, 169, 79, 0.32);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.26);
  color: rgba(245, 220, 164, 0.9);
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.spell-loadout-edit-button:hover,
.spell-loadout-edit-button:focus-visible {
  border-color: rgba(243, 201, 109, 0.78);
  background: rgba(214, 169, 79, 0.16);
  color: #fff1c7;
}

.spell-loadout-edit-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.spell-loadout-edit-button svg {
  width: 14px;
  height: 14px;
}

.spell-loadout-name-input {
  min-width: 0;
  width: 100%;
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(94, 231, 255, 0.42);
  border-radius: 5px;
  background: rgba(3, 8, 17, 0.92);
  color: #f6fbff;
  font: 900 11px/1 var(--font-ui, inherit);
  letter-spacing: 0.04em;
  outline: 0;
  text-transform: uppercase;
  user-select: text !important;
}

.mastery-loadout-toolbar {
  width: min(100%, 650px);
  margin-top: 12px;
}

.mastery-loadout-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mastery-loadout-label {
  flex: 0 0 auto;
  color: rgba(232, 223, 201, 0.82);
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mastery-loadout-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(112px, 1fr));
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.mastery-loadout-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-items: center;
  gap: 4px;
  min-width: 0;
  height: 38px;
  padding: 4px;
  border: 1px solid rgba(200, 165, 114, 0.3);
  border-radius: 7px;
  background:
    radial-gradient(circle at 20% 0%, rgba(200, 165, 114, 0.12), transparent 48%),
    linear-gradient(180deg, rgba(16, 24, 41, 0.96), rgba(5, 10, 20, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mastery-loadout-card--active {
  border-color: rgba(231, 195, 121, 0.92);
  background:
    radial-gradient(circle at 20% 0%, rgba(231, 195, 121, 0.27), transparent 54%),
    linear-gradient(135deg, rgba(68, 58, 46, 0.98), rgba(39, 31, 63, 0.98));
  box-shadow:
    0 0 16px rgba(200, 165, 114, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.mastery-loadout-select,
.mastery-loadout-edit-button {
  appearance: none;
  border: 0;
  color: inherit;
}

.mastery-loadout-select {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  padding: 0 7px;
  border-radius: 5px;
  background: transparent;
  text-align: left;
}

.mastery-loadout-select:hover,
.mastery-loadout-select:focus-visible {
  background: rgba(255, 255, 255, 0.06);
}

.mastery-loadout-name {
  width: 100%;
  overflow: hidden;
  color: rgba(244, 232, 208, 0.96);
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.07em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.mastery-loadout-count {
  width: 100%;
  overflow: hidden;
  color: rgba(216, 207, 188, 0.66);
  font: 800 8px/1 var(--font-mono, monospace);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mastery-loadout-edit-button {
  display: grid;
  place-items: center;
  width: 26px;
  height: 28px;
  border: 1px solid rgba(214, 169, 79, 0.32);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.26);
  color: rgba(245, 220, 164, 0.9);
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.mastery-loadout-edit-button:hover,
.mastery-loadout-edit-button:focus-visible {
  border-color: rgba(243, 201, 109, 0.78);
  background: rgba(214, 169, 79, 0.16);
  color: #fff1c7;
}

.mastery-loadout-edit-button svg {
  width: 14px;
  height: 14px;
}

.mastery-loadout-name-input {
  min-width: 0;
  width: 100%;
  height: 30px;
  padding: 0 7px;
  border: 1px solid rgba(231, 195, 121, 0.5);
  border-radius: 5px;
  background: rgba(3, 8, 17, 0.92);
  color: #f4e8d0;
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.04em;
  outline: 0;
  text-transform: uppercase;
  user-select: text !important;
}

.mastery-loadout-note {
  margin-top: 6px;
  color: rgba(144, 136, 168, 0.86);
  font: 500 10px/1.3 var(--font-body, inherit);
}

.combat-talent-loadout-toolbar {
  width: 100%;
  margin-top: 0;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(200, 165, 114, 0.2);
  background: rgba(4, 11, 23, 0.62);
}

@media (max-width: 820px) {
  .mastery-loadout-title-row {
    align-items: stretch;
    flex-direction: column;
  }

  .mastery-loadout-presets {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .mastery-loadout-presets {
    grid-template-columns: 1fr;
  }
}

.spell-loadout-name-input:focus {
  border-color: rgba(142, 244, 255, 0.95);
  box-shadow: 0 0 12px rgba(94, 231, 255, 0.24);
}

.spell-active-grid {
  height: clamp(104px, 13dvh, 122px);
  min-height: 0;
  padding: 8px 18px;
  border: 1px solid var(--ability-line-soft);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(6, minmax(78px, 1fr));
  align-items: center;
  gap: 14px;
  background:
    radial-gradient(circle at 48% 15%, rgba(130, 90, 230, 0.2), transparent 42%),
    radial-gradient(circle at 62% 82%, rgba(42, 153, 136, 0.16), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.24));
  overflow: hidden;
}

.spell-active-grid .contents {
  display: contents;
}

.spell-active-slot,
.spell-ulti-slot-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.spell-active-slot__label {
  display: block;
  width: 100%;
  text-align: center;
  color: rgba(216, 207, 188, 0.72);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.spell-slot-card {
  position: relative;
  width: 58px !important;
  height: 58px !important;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid rgba(214, 169, 79, 0.6);
  border-radius: 6px;
  flex: 0 0 auto;
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease,
    opacity 0.14s ease;
}

.spell-active-slot--drop-ready .spell-slot-card {
  border-color: rgba(103, 232, 249, 0.9) !important;
  box-shadow:
    0 0 0 1px rgba(103, 232, 249, 0.28),
    0 0 16px rgba(34, 211, 238, 0.34) !important;
}

.spell-active-slot--drop-hover .spell-slot-card {
  transform: translateY(-2px) scale(1.06);
  border-color: rgba(250, 204, 21, 0.96) !important;
  background: rgba(34, 42, 59, 0.96) !important;
  box-shadow:
    0 0 0 2px rgba(250, 204, 21, 0.28),
    0 0 22px rgba(250, 204, 21, 0.42) !important;
}

.spell-active-slot--drop-invalid .spell-slot-card {
  opacity: 0.38;
  filter: grayscale(0.8);
}

.spell-slot-card[draggable="true"],
.spellbook-grid > button[draggable="true"] {
  cursor: grab;
}

.spell-slot-card[draggable="true"]:active,
.spellbook-grid > button[draggable="true"]:active {
  cursor: grabbing;
}

.spell-slot-card--ulti {
  border-color: rgba(168, 85, 247, 0.88);
}

.spell-slot-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spell-slot-remove-button {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgba(217, 184, 129, 0.5);
  border-radius: 50%;
  appearance: none;
  color: rgba(250, 232, 190, 0.94);
  cursor: pointer;
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 241, 202, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(24, 31, 45, 0.96), rgba(7, 11, 20, 0.94));
  box-shadow:
    0 7px 16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 247, 219, 0.1);
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease,
    background 0.14s ease,
    box-shadow 0.14s ease;
}

.spell-slot-remove-button:hover,
.spell-slot-remove-button:focus-visible {
  color: #ffe3e3;
  border-color: rgba(248, 113, 113, 0.75);
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 218, 166, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(83, 28, 33, 0.98), rgba(19, 12, 22, 0.96));
  box-shadow:
    0 0 14px rgba(248, 113, 113, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.54),
    inset 0 1px 0 rgba(255, 247, 219, 0.12);
  transform: translateY(-1px) scale(1.05);
}

.spell-slot-remove-button:focus-visible {
  outline: 2px solid rgba(250, 204, 21, 0.6);
  outline-offset: 2px;
}

.spell-slot-remove-button svg {
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.spell-workshop-body {
  display: contents;
}

.spellbook-panel {
  grid-column: 1;
  grid-row: 1 / 4;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  padding: 12px;
  border-radius: 8px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.spellbook-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--ability-line-soft);
}

.spellbook-panel > div:not(.spellbook-toolbar) {
  margin-top: 10px;
}

.spellbook-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 53px);
  gap: 7px;
  align-items: start;
}

.spellbook-grid > button {
  width: 53px !important;
  height: 53px !important;
  aspect-ratio: 1 / 1;
  min-width: 53px;
  min-height: 53px;
  border-radius: 6px !important;
  flex: 0 0 auto;
}

.spellbook-grid > button.spellbook-card--new {
  outline: 2px solid rgba(255, 229, 145, 0.96);
  outline-offset: 2px;
  box-shadow:
    0 0 0 1px rgba(255, 247, 207, 0.72),
    0 0 16px rgba(240, 192, 64, 0.92),
    0 0 28px rgba(169, 139, 201, 0.52) !important;
  animation: spellbook-new-ability-glow 1.7s ease-in-out infinite;
}

@keyframes spellbook-new-ability-glow {
  0%,
  100% {
    outline-color: rgba(255, 229, 145, 0.9);
    filter: brightness(1.03);
  }
  50% {
    outline-color: rgba(255, 250, 224, 1);
    filter: brightness(1.26);
  }
}

.spellbook-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spell-automation-panel {
  display: contents;
}

.spell-automation-header {
  grid-column: 4;
  grid-row: 1;
  min-height: 0;
  height: 100%;
  padding: 12px 14px 54px;
  border-radius: 8px;
  display: flex;
  align-items: flex-start;
}

.spell-automation-body {
  display: contents;
}

.spell-auto-config {
  display: contents;
}

.spell-auto-switchbar {
  grid-column: 4;
  grid-row: 1;
  align-self: end;
  justify-self: stretch;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 36px;
  margin: 0 10px 8px;
  padding: 5px 8px;
  border: 1px solid rgba(214, 169, 79, 0.32);
  border-radius: 999px;
  background: rgba(3, 10, 20, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.spell-auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid rgba(214, 169, 79, 0.36);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
}

.spell-auto-switchbar--actions {
  justify-content: flex-end;
  padding-inline: 12px;
}

.spell-auto-switchbar--actions button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(214, 169, 79, 0.28);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  color: rgba(233, 211, 159, 0.82);
}

.spell-auto-switchbar--actions button:hover {
  border-color: rgba(237, 96, 96, 0.48);
  color: #ff9c9c;
  background: rgba(55, 16, 20, 0.24);
}

.spell-auto-section {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
}

.spell-auto-section--cast {
  grid-column: 4;
  grid-row: 2 / 4;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.spell-auto-damage-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(150px, 0.68fr) minmax(126px, 0.48fr);
  gap: 8px;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
}

.spell-rotation-box {
  min-height: 0;
  padding: 9px;
  border-radius: 7px;
  background: rgba(4, 12, 24, 0.62);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.spell-rotation-box--available {
  overflow-y: auto;
  overflow-x: hidden;
}

.spell-rotation-add-row {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  margin-top: 6px;
  border: 1px solid rgba(214, 169, 79, 0.22);
  border-radius: 7px;
  background: rgba(15, 30, 53, 0.88);
  color: inherit;
  text-align: left;
}

.spell-auto-section--recovery,
.spell-auto-section--ward {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.spell-auto-section--recovery {
  grid-column: 2;
  grid-row: 3;
}

.spell-auto-section--ward {
  grid-column: 3;
  grid-row: 3;
}

.spell-trigger-card {
  width: 100%;
  min-height: 122px;
  height: 122px;
  border-radius: 6px !important;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding-top: 13px !important;
}

.spell-trigger-card--inactive {
  opacity: 0.78;
}

.spell-trigger-card > div:first-child {
  min-height: 55px;
  height: 55px;
  flex: 0 0 55px;
  align-items: center;
}

.spell-trigger-card .pl-12 {
  padding-left: 48px;
  padding-top: 5px;
}

.spell-trigger-conditions {
  min-height: 34px;
  height: 34px;
  overflow: visible;
}

.spell-trigger-conditions .relative:hover,
.spell-trigger-conditions .relative:focus-within {
  z-index: 2147483000;
}

.spell-condition-menu,
.spell-condition-value-popover {
  position: fixed !important;
  z-index: 2147483000 !important;
  max-width: calc(100vw - 16px);
  max-height: min(440px, calc(100vh - 96px));
  overscroll-behavior: contain;
}

.spell-condition-menu {
  min-width: 16rem;
}

.spell-workshop-page [data-help] {
  overflow: visible;
}

.spell-workshop-page [data-help]:hover,
.spell-workshop-page [data-help]:focus-visible,
.spell-workshop-page [data-help]:focus-within {
  z-index: 2147483000 !important;
}

.spell-trigger-action {
  position: absolute !important;
  top: 12px;
  right: 12px;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.spell-trigger-range {
  min-width: 140px;
  height: 22px;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 999px;
  outline: none;
  background: linear-gradient(90deg, rgba(39, 190, 112, 0.85), rgba(91, 220, 146, 0.62));
  box-shadow: inset 0 0 0 1px rgba(195, 255, 217, 0.16), inset 0 2px 5px rgba(0, 0, 0, 0.42);
  accent-color: #57d78b;
}

.spell-trigger-range:disabled {
  cursor: default;
  opacity: 0.56;
  filter: saturate(0.55);
}

.spell-trigger-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.9), rgba(20, 83, 45, 0.72));
  border: 1px solid rgba(184, 255, 213, 0.18);
}

.spell-trigger-range:disabled::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, rgba(88, 104, 118, 0.72), rgba(42, 52, 64, 0.72));
}

.spell-trigger-range::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(20, 83, 45, 0.72);
  border: 1px solid rgba(184, 255, 213, 0.18);
}

.spell-trigger-range:disabled::-moz-range-track {
  background: rgba(58, 70, 82, 0.72);
}

.spell-trigger-range::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #86efac);
}

.spell-trigger-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -7px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ecfdf5 0 18%, #6ee7a0 20% 54%, #16a34a 56% 100%);
  border: 2px solid #d8ffe4;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18), 0 0 14px rgba(87, 215, 139, 0.75);
}

.spell-trigger-range:disabled::-webkit-slider-thumb {
  background: radial-gradient(circle at 34% 30%, #d7dde5 0 18%, #8a98a8 20% 54%, #4b5563 56% 100%);
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
}

.spell-trigger-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ecfdf5 0 18%, #6ee7a0 20% 54%, #16a34a 56% 100%);
  border: 2px solid #d8ffe4;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18), 0 0 14px rgba(87, 215, 139, 0.75);
}

.spell-trigger-range:disabled::-moz-range-thumb {
  background: radial-gradient(circle at 34% 30%, #d7dde5 0 18%, #8a98a8 20% 54%, #4b5563 56% 100%);
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
}

.combat-zone-panel {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(180px, 1fr) minmax(460px, 1.45fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(214, 169, 79, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(8, 20, 38, 0.9), rgba(13, 25, 48, 0.78)),
    radial-gradient(circle at 82% 18%, rgba(214, 169, 79, 0.12), transparent 32%);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 215, 0.035), 0 10px 26px rgba(0, 0, 0, 0.3);
}

.combat-zone-panel__copy {
  min-width: 0;
}

.combat-automation-dock {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  align-items: stretch;
  justify-self: end;
  width: 100%;
  max-width: none;
  padding-left: 0;
  border-left: 0;
}

.options-global-combat .combat-automation-dock {
  justify-content: flex-start;
}

.options-global-combat
  .combat-auto-toggle-card--combat[data-mode-note]::before {
  display: none;
}

.combat-zone-panel:has(.combat-automation-dock [data-help]:is(:hover, :focus-visible, :focus-within)) {
  z-index: 2147483000;
  overflow: visible;
}

.combat-automation-dock,
.combat-automation-dock [data-help] {
  overflow: visible !important;
}

html.tooltips-disabled [data-help]::before,
html.tooltips-disabled [data-help]::after,
html.tooltips-disabled .frontier-help-tooltip {
  content: none !important;
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.combat-automation-dock__title {
  align-self: center;
  color: rgba(214, 169, 79, 0.9);
  font: 700 10px/1 var(--font-ui, inherit);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.combat-auto-utility-slot,
.combat-auto-control,
.combat-auto-toggle-card,
.combat-auto-preset,
.auto-help-button,
.spell-auto-modal-toggle,
.follower-ability-tip,
.inventory-selection-salvage-tip,
.faction-perk-tip {
  position: relative;
}

.follower-ability-tip[data-help] {
  overflow: visible !important;
}

.combat-auto-utility-slot[data-help]::after,
.combat-auto-control[data-help]::after,
.combat-auto-toggle-card[data-help]::after,
.combat-auto-preset[data-help]::after,
.auto-help-button[data-help]::after,
.spell-auto-modal-toggle[data-help]::after,
.follower-ability-tip[data-help]::after,
.inventory-selection-salvage-tip[data-help]::after,
.faction-perk-tip[data-help]::after {
  content: attr(data-help);
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 2147483647;
  width: min(270px, 78vw);
  padding: 8px 10px;
  border: 1px solid rgba(214, 169, 79, 0.42);
  border-radius: 6px;
  background: rgba(3, 8, 17, 0.96);
  color: rgba(244, 232, 208, 0.92);
  font: 600 11px/1.35 var(--font-body, inherit);
  letter-spacing: 0;
  text-transform: none;
  white-space: pre-line;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5), 0 0 18px rgba(214, 169, 79, 0.1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.follower-ability-tip[data-help]::after {
  pointer-events: none;
  will-change: opacity, transform;
}

.combat-auto-utility-slot:hover,
.combat-auto-utility-slot:focus-within,
.combat-auto-control:hover,
.combat-auto-control:focus-within,
.combat-auto-toggle-card:hover,
.combat-auto-toggle-card:focus-within,
.combat-auto-preset:hover,
.combat-auto-preset:focus-within,
.auto-help-button:hover,
.auto-help-button:focus-within,
.spell-auto-modal-toggle:hover,
.spell-auto-modal-toggle:focus-within,
.follower-ability-tip:hover,
.follower-ability-tip:focus-within,
.inventory-selection-salvage-tip:hover,
.inventory-selection-salvage-tip:focus-within,
.faction-perk-tip:hover,
.faction-perk-tip:focus-within {
  z-index: 2147483647 !important;
}

.combat-auto-utility-slot[data-help]:hover::after,
.combat-auto-utility-slot[data-help]:focus-within::after,
.combat-auto-control[data-help]:hover::after,
.combat-auto-control[data-help]:focus-within::after,
.combat-auto-toggle-card[data-help]:hover::after,
.combat-auto-toggle-card[data-help]:focus-within::after,
.combat-auto-preset[data-help]:hover::after,
.combat-auto-preset[data-help]:focus-visible::after,
.auto-help-button[data-help]:hover::after,
.auto-help-button[data-help]:focus-visible::after,
.spell-auto-modal-toggle[data-help]:hover::after,
.spell-auto-modal-toggle[data-help]:focus-visible::after,
.follower-ability-tip[data-help]:hover::after,
.follower-ability-tip[data-help]:focus-visible::after,
.inventory-selection-salvage-tip[data-help]:hover::after,
.inventory-selection-salvage-tip[data-help]:focus-visible::after,
.faction-perk-tip[data-help]:hover::after,
.faction-perk-tip[data-help]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.combat-automation-dock [data-help]::after {
  top: calc(100% + 8px);
  bottom: auto;
}

@media (min-width: 1280px) {
  main:has(.combat-map-page) {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  main:has(.combat-map-page) > .relative.z-10,
  main:has(.combat-map-page) > .relative.z-10 > .transition-all,
  main:has(.combat-map-page) > .relative.z-10 > .transition-all > [class*="max-w-"][class*="mx-auto"] {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .combat-map-page {
    display: grid;
    grid-template-rows: auto auto;
    gap: 10px;
    align-content: start;
    height: auto;
    min-height: 0;
    overflow: visible;
    padding-bottom: 0 !important;
  }

  .combat-map-zone-panel {
    margin-bottom: 0 !important;
    min-height: 72px;
    padding: 10px 12px;
  }

  .combat-map-zone-panel .combat-zone-panel__copy h3 {
    font-size: 1.1rem;
    line-height: 1.1;
  }

  .combat-map-zone-panel .combat-zone-panel__copy p {
    font-size: 0.78rem;
    line-height: 1.25;
  }

  .combat-map-enemy-grid {
    min-height: 0;
    height: auto;
    align-content: start;
    align-items: start;
    overflow: visible;
    gap: 14px !important;
    grid-auto-rows: clamp(238px, 31dvh, 286px);
  }

  .combat-map-enemy-card {
    min-height: 0 !important;
    height: 100%;
    padding: 12px !important;
  }

  .combat-map-card-body {
    min-height: 0;
  }

  .combat-map-card-body > div:first-child {
    margin-bottom: 0.45rem !important;
  }

  .combat-map-card-body h3 {
    margin-bottom: 0.4rem !important;
    font-size: clamp(0.95rem, 1vw, 1.125rem) !important;
    line-height: 1.1 !important;
  }

  .combat-map-card-stats {
    margin-bottom: 0.45rem !important;
  }

  .combat-map-card-stats > div {
    line-height: 1.1;
  }

  .combat-map-card-loot {
    min-height: 42px !important;
    margin-bottom: 0.45rem !important;
    padding-top: 0.4rem !important;
  }

  .combat-map-fight-button {
    min-width: 104px !important;
    padding: 0.34rem 1.05rem !important;
    font-size: 0.8rem !important;
  }
}

@media (min-width: 1280px) and (max-height: 760px) {
  main:has(.combat-map-page) {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    padding-bottom: 0.5rem !important;
  }

  .combat-map-zone-panel {
    grid-template-columns: 44px minmax(170px, 1fr) minmax(360px, 1.3fr);
    gap: 10px;
    min-height: 62px;
    padding: 8px 10px;
  }

  .combat-map-zone-panel .combat-automation-dock {
    gap: 6px;
  }

  .combat-map-zone-panel .combat-auto-utility-slot--wide {
    flex-basis: 206px;
    min-width: 206px;
  }

  .combat-map-zone-panel .combat-auto-control {
    flex-basis: 132px;
    min-width: 132px;
    padding: 6px 7px;
  }

  .combat-map-enemy-grid {
    gap: 10px !important;
  }

  .combat-map-enemy-card {
    padding: 10px !important;
    border-radius: 8px !important;
  }

  .combat-map-card-body h3 {
    font-size: 0.95rem !important;
  }

  .combat-map-card-stats {
    margin-bottom: 0.35rem !important;
  }

  .combat-map-card-stats > div {
    font-size: 0.68rem !important;
  }

  .combat-map-card-loot {
    min-height: 36px !important;
  }
}

@media (min-width: 1280px) and (max-width: 2199px) {
  html[data-vespera-ui-scale="120"] .combat-map-enemy-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

.combat-boss-card .combat-map-card-loot {
  flex: 0 1 auto !important;
  max-height: 5.5rem;
  min-height: 4.1rem !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-right: 0.25rem;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}

.combat-boss-card .combat-map-card-loot .combat-map-loot-grid {
  grid-template-columns: repeat(6, 2rem) !important;
  gap: 0.3rem !important;
}

.combat-boss-card .combat-map-card-loot .combat-map-loot-chip {
  width: 2rem !important;
  height: 2rem !important;
}

.combat-boss-card .combat-map-card-loot .world-resource-tooltip {
  display: none !important;
}

.combat-boss-card .combat-map-fight-button {
  position: relative;
  z-index: 30;
  flex-shrink: 0;
}

.auto-spell-modal-close::after {
  top: calc(100% + 8px);
  bottom: auto;
  right: 0;
}

.combat-auto-utility-slot > * {
  height: 100%;
}

.combat-auto-utility-slot--wide {
  flex: 0 0 220px;
  min-width: 220px;
}

.faction-perk-tip::after {
  top: calc(100% + 8px);
  right: auto;
  bottom: auto;
  left: 0;
}

.auto-ability-chip {
  min-width: 220px;
  height: 100%;
  overflow: visible !important;
}

.auto-ability-chip > button:first-child {
  min-width: 0;
  flex: 1 1 auto;
}

.auto-ability-chip > button:first-child > span:first-child {
  display: inline-flex !important;
  min-width: max-content;
}

.auto-ability-settings-button {
  flex: 0 0 46px;
  width: 46px;
  min-width: 46px;
  display: inline-flex !important;
}

.combat-auto-control,
.combat-auto-toggle-card {
  min-width: 0;
  border: 1px solid rgba(214, 169, 79, 0.2);
  border-radius: 7px;
  background: rgba(3, 12, 23, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.combat-auto-control {
  flex: 0 0 146px;
  min-width: 146px;
  padding: 7px 9px;
}

.combat-auto-control--heal {
  border-color: rgba(91, 220, 146, 0.24);
}

.combat-auto-control--mana {
  border-color: rgba(96, 165, 250, 0.25);
}

.combat-recovery-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  min-width: 0;
}

.combat-recovery-controls .combat-auto-control {
  flex: 1 1 136px;
  min-width: 136px;
}

.combat-auto-control__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 5px;
}

.combat-auto-control__label,
.combat-auto-toggle-card__label {
  color: rgba(244, 232, 208, 0.82);
  font: 800 10px/1 var(--font-ui, inherit);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.combat-auto-control__value,
.combat-auto-toggle-card__state {
  color: #f3c96d;
  font: 800 10px/1 var(--font-mono, monospace);
}

.combat-auto-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.combat-auto-preset {
  min-width: 28px;
  height: 24px;
  border: 1px solid rgba(214, 169, 79, 0.2);
  border-radius: 5px;
  background: rgba(8, 18, 33, 0.82);
  color: rgba(216, 207, 188, 0.74);
  font: 800 10px/1 var(--font-mono, monospace);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.combat-auto-preset:hover {
  border-color: rgba(214, 169, 79, 0.52);
  color: #f4e8d0;
}

.combat-auto-preset--active {
  border-color: rgba(243, 201, 109, 0.85);
  background: linear-gradient(180deg, rgba(214, 169, 79, 0.32), rgba(108, 76, 30, 0.28));
  color: #fff0bf;
  box-shadow: 0 0 12px rgba(214, 169, 79, 0.18);
}

.combat-auto-toggle-card {
  display: grid;
  grid-template-columns: auto minmax(98px, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 8px 9px;
  cursor: pointer;
  flex: 0 0 172px;
  min-width: 172px;
  overflow: hidden;
}

.combat-auto-toggle-card--combat {
  grid-template-columns: auto minmax(64px, 1fr) auto;
  flex-basis: 200px;
  min-width: 200px;
  overflow: visible !important;
}

.combat-auto-toggle-card--combat[data-mode-note]::before {
  content: attr(data-mode-note);
  position: absolute;
  left: 0;
  bottom: calc(100% + 7px);
  z-index: 25;
  width: max-content;
  max-width: min(390px, 72vw);
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(3, 8, 17, 0.9);
  color: rgba(244, 232, 208, 0.9);
  font: 800 10px/1.25 var(--font-body, inherit);
  letter-spacing: 0;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
  opacity: 0.94;
}

.combat-auto-toggle-card--combat.combat-auto-toggle-card--active[data-mode-note]::before {
  background: rgba(10, 48, 32, 0.92);
  color: #d9f8c9;
}

.combat-auto-toggle-card__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.combat-auto-toggle-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(214, 169, 79, 0.26);
  color: rgba(214, 169, 79, 0.72);
  font: 900 12px/1 var(--font-ui, inherit);
}

.combat-auto-toggle-card__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.combat-auto-toggle-card--active {
  border-color: rgba(91, 220, 146, 0.42);
  background: linear-gradient(180deg, rgba(18, 71, 47, 0.45), rgba(3, 12, 23, 0.8));
}

.combat-auto-toggle-card--active .combat-auto-toggle-card__icon {
  border-color: rgba(91, 220, 146, 0.5);
  color: #86efac;
  box-shadow: 0 0 12px rgba(91, 220, 146, 0.18);
}

.combat-auto-toggle-card--active .combat-auto-toggle-card__state {
  color: #86efac;
}

.auto-spell-modal-overlay {
  background:
    radial-gradient(circle at 22% 18%, rgba(92, 117, 178, 0.12), transparent 28%),
    radial-gradient(circle at 78% 82%, rgba(214, 169, 79, 0.12), transparent 30%),
    rgba(1, 5, 12, 0.88) !important;
  backdrop-filter: blur(8px) saturate(0.9) !important;
}

.auto-spell-modal-card {
  border: 1px solid rgba(214, 169, 79, 0.44);
  background:
    linear-gradient(135deg, rgba(5, 13, 26, 0.98), rgba(12, 26, 48, 0.96)),
    radial-gradient(circle at 64% 8%, rgba(214, 169, 79, 0.11), transparent 34%) !important;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.78), inset 0 0 0 1px rgba(255, 255, 255, 0.035) !important;
}

.auto-spell-modal-card > .relative.h-\[2px\] {
  display: none;
}

.auto-spell-modal-header,
.auto-spell-modal-footer {
  border-color: rgba(214, 169, 79, 0.22);
  background: rgba(2, 8, 17, 0.48);
}

.auto-spell-modal-title {
  font-size: 18px !important;
  letter-spacing: 0.12em !important;
}

.auto-spell-modal-body {
  padding: 16px !important;
}

.auto-spell-modal-footer {
  display: none !important;
}

.spell-auto-config--modal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 0.72fr);
  grid-auto-rows: auto;
  gap: 12px;
}

.spell-auto-modal-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(220px, auto) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(214, 169, 79, 0.24);
  border-radius: 8px;
  background: rgba(3, 12, 23, 0.72);
}

.spell-auto-modal-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 12px;
  border: 1px solid rgba(214, 169, 79, 0.32);
  border-radius: 7px;
  background: rgba(11, 20, 36, 0.86);
  color: rgba(244, 232, 208, 0.86);
  text-align: left;
}

.spell-auto-modal-toggle--active {
  border-color: rgba(91, 220, 146, 0.44);
  background: linear-gradient(180deg, rgba(20, 83, 45, 0.54), rgba(11, 20, 36, 0.86));
}

.spell-auto-modal-toggle__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid rgba(214, 169, 79, 0.36);
  color: #f3c96d;
  font: 900 15px/1 var(--font-ui, inherit);
}

.spell-auto-modal-toggle__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font: 800 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spell-auto-modal-toggle__copy strong {
  color: #86efac;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.spell-auto-modal-summary__text {
  color: rgba(216, 207, 188, 0.68);
  font: 600 12px/1.45 var(--font-body, inherit);
}

.spell-auto-config--modal .spell-auto-section {
  background: rgba(5, 14, 27, 0.76);
}

.spell-auto-config--modal .spell-auto-section--cast {
  grid-column: 1 / -1;
  grid-row: auto;
}

.spell-auto-config--modal .spell-auto-damage-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(285px, 0.8fr);
  grid-template-rows: minmax(260px, auto);
  align-items: stretch;
}

.spell-auto-config--modal .spell-rotation-box {
  max-height: none;
  overflow: visible;
  position: relative;
  z-index: 2;
}

.spell-auto-config--modal .spell-rotation-box--available {
  border-color: rgba(96, 165, 250, 0.28);
  background: linear-gradient(180deg, rgba(10, 24, 44, 0.86), rgba(3, 10, 20, 0.78));
  max-height: 380px;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 1;
}

.spell-auto-config--modal .spell-rotation-box:not(.spell-rotation-box--available) {
  z-index: 8;
}

.spell-auto-config--modal .spell-auto-section--recovery {
  grid-column: 1;
  grid-row: auto;
}

.spell-auto-config--modal .spell-auto-section--ward {
  grid-column: 2;
  grid-row: auto;
}

.auto-spell-modal-card {
  min-height: 0 !important;
  max-height: min(90dvh, calc(100dvh - 32px)) !important;
  overflow: visible !important;
  isolation: isolate;
}

.auto-spell-modal-body {
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.spell-auto-config--modal,
.spell-auto-config--modal .spell-auto-section,
.spell-auto-config--modal .spell-rotation-box,
.spell-auto-config--modal .spell-trigger-card,
.spell-auto-config--modal .spell-trigger-conditions {
  overflow: visible !important;
}

.auto-spell-modal-body:has(.spell-condition-menu),
.auto-spell-modal-body:has(.spell-condition-value-popover) {
  overflow: visible !important;
}

.auto-spell-modal-card:has(.spell-condition-menu),
.auto-spell-modal-card:has(.spell-condition-value-popover),
.auto-spell-modal-card:has([data-help]:is(:hover, :focus-visible, :focus-within)) {
  z-index: 2147483000 !important;
}

.spell-auto-modal-summary {
  position: relative;
  z-index: 30;
}

.spell-auto-modal-summary .spell-auto-modal-toggle[data-help]::after {
  left: 0;
  right: auto;
  top: calc(100% + 8px);
  bottom: auto;
  width: min(340px, calc(100vw - 48px));
  transform: translateY(-4px);
}

.spell-auto-modal-summary .spell-auto-modal-toggle[data-help]:hover::after,
.spell-auto-modal-summary .spell-auto-modal-toggle[data-help]:focus-visible::after {
  transform: translateY(0);
}

.spell-auto-config--modal .auto-help-button[data-help]::after {
  left: 0;
  right: auto;
  bottom: calc(100% + 8px);
  background: rgba(3, 8, 17, 0.99);
}

.spell-auto-config--modal .spell-trigger-action[data-help]::after {
  left: auto;
  right: 0;
}

.spell-auto-config--modal .spell-auto-section--recovery .spell-condition-menu,
.spell-auto-config--modal .spell-auto-section--ward .spell-condition-menu,
.spell-auto-config--modal .spell-auto-section--recovery .spell-condition-value-popover,
.spell-auto-config--modal .spell-auto-section--ward .spell-condition-value-popover {
  top: auto !important;
  bottom: calc(100% + 8px) !important;
  max-height: min(360px, calc(100vh - 164px));
}

.spell-auto-config--modal .spell-condition-menu,
.spell-auto-config--modal .spell-condition-value-popover {
  z-index: 2147483647 !important;
  background: rgba(32, 27, 44, 0.99) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 244, 215, 0.04) !important;
}

.spell-condition-editor {
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid rgba(214, 169, 79, 0.58);
  border-radius: 10px;
  background:
    radial-gradient(circle at 88% 0%, rgba(113, 72, 166, 0.18), transparent 44%),
    linear-gradient(155deg, rgba(18, 24, 41, 0.995), rgba(11, 14, 26, 0.995));
  box-shadow:
    0 22px 52px rgba(0, 0, 0, 0.74),
    inset 0 1px rgba(255, 244, 215, 0.035);
  color: var(--color-parchment);
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 169, 79, 0.45) rgba(5, 8, 16, 0.65);
}

.spell-condition-editor__header {
  display: grid;
  gap: 3px;
  padding-bottom: 11px;
  border-bottom: 1px solid rgba(214, 169, 79, 0.16);
}

.spell-condition-editor__eyebrow,
.spell-condition-editor__quick-label {
  color: var(--color-brass-warm);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.spell-condition-editor__title {
  color: var(--color-parchment);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.35;
}

.spell-condition-editor__operators {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 11px;
}

.spell-condition-editor__operator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(142, 150, 173, 0.28);
  border-radius: 6px;
  background: rgba(5, 10, 22, 0.68);
  color: var(--color-lavender-grey);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.spell-condition-editor__operator span {
  color: rgba(214, 169, 79, 0.72);
  font-size: 15px;
  line-height: 1;
}

.spell-condition-editor__operator:is(:hover, :focus-visible),
.spell-condition-editor__operator.is-active {
  border-color: rgba(229, 185, 81, 0.75);
  background: linear-gradient(180deg, rgba(113, 79, 27, 0.58), rgba(57, 39, 13, 0.66));
  color: #fff4d7;
}

.spell-condition-editor__operator.is-active span {
  color: #ffd465;
}

.spell-condition-editor__value-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  margin: 13px 0 9px;
}

.spell-condition-editor__stepper {
  width: 36px;
  height: 34px;
  border: 1px solid rgba(214, 169, 79, 0.35);
  border-radius: 6px;
  background: rgba(5, 10, 22, 0.74);
  color: #e8bd59;
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 1;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.spell-condition-editor__stepper:not(:disabled):is(:hover, :focus-visible) {
  border-color: rgba(229, 185, 81, 0.82);
  background: rgba(77, 54, 19, 0.72);
  transform: translateY(-1px);
}

.spell-condition-editor__stepper:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.spell-condition-editor__current {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  color: #fff5d7;
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}

.spell-condition-editor__current strong {
  font-size: 24px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(229, 185, 81, 0.2);
}

.spell-condition-editor__current span {
  color: var(--color-brass-warm);
  font-size: 10px;
  font-weight: 800;
}

.spell-condition-editor__range {
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.spell-condition-editor__range::-webkit-slider-runnable-track {
  height: 5px;
  border: 1px solid rgba(214, 169, 79, 0.15);
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #d8a944 0%,
    #f0cb69 var(--condition-progress),
    rgba(92, 99, 122, 0.32) var(--condition-progress),
    rgba(92, 99, 122, 0.32) 100%
  );
}

.spell-condition-editor__range::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -7px;
  appearance: none;
  border: 2px solid #f2cf70;
  border-radius: 50%;
  background: #182033;
  box-shadow: 0 0 0 3px rgba(229, 185, 81, 0.13), 0 3px 8px rgba(0, 0, 0, 0.7);
}

.spell-condition-editor__range::-moz-range-track {
  height: 5px;
  border: 1px solid rgba(214, 169, 79, 0.15);
  border-radius: 999px;
  background: rgba(92, 99, 122, 0.32);
}

.spell-condition-editor__range::-moz-range-progress {
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d8a944, #f0cb69);
}

.spell-condition-editor__range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #f2cf70;
  border-radius: 50%;
  background: #182033;
  box-shadow: 0 0 0 3px rgba(229, 185, 81, 0.13), 0 3px 8px rgba(0, 0, 0, 0.7);
}

.spell-condition-editor__range:focus-visible {
  outline: 1px solid rgba(240, 203, 105, 0.75);
  outline-offset: 3px;
  border-radius: 999px;
}

.spell-condition-editor__bounds {
  display: flex;
  justify-content: space-between;
  margin-top: -2px;
  color: var(--color-text-muted);
  font-family: var(--font-ui);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.spell-condition-editor__quick {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.spell-condition-editor__quick-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.spell-condition-editor__quick-button {
  min-width: 0;
  min-height: 27px;
  padding: 4px 2px;
  border: 1px solid rgba(142, 150, 173, 0.22);
  border-radius: 5px;
  background: rgba(5, 10, 22, 0.62);
  color: var(--color-lavender-grey);
  font-family: var(--font-ui);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.spell-condition-editor__quick-button:is(:hover, :focus-visible),
.spell-condition-editor__quick-button.is-active {
  border-color: rgba(229, 185, 81, 0.68);
  background: rgba(91, 63, 20, 0.68);
  color: #ffe59c;
}

.spell-condition-editor__hint {
  margin: 11px 0 0;
  padding-top: 9px;
  border-top: 1px solid rgba(214, 169, 79, 0.12);
  color: var(--color-text-muted);
  font-family: var(--font-body);
  font-size: 9px;
  line-height: 1.45;
}

@media (max-width: 520px) {
  .spell-condition-editor {
    padding: 12px;
  }

  .spell-condition-editor__operator {
    gap: 5px;
    padding-inline: 5px;
  }
}

.spell-trigger-presets {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
}

.spell-trigger-preset {
  min-width: 0;
  height: 26px;
  padding-inline: 1px;
  border: 1px solid rgba(214, 169, 79, 0.22);
  border-radius: 5px;
  background: rgba(8, 18, 33, 0.82);
  color: rgba(216, 207, 188, 0.76);
  font: 800 9px/1 var(--font-mono, monospace);
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.spell-trigger-preset:last-child {
  font-size: 8px;
}

.spell-trigger-preset:hover {
  border-color: rgba(214, 169, 79, 0.55);
  color: #f4e8d0;
}

.spell-trigger-preset--active {
  border-color: rgba(243, 201, 109, 0.86);
  background: linear-gradient(180deg, rgba(214, 169, 79, 0.34), rgba(91, 66, 28, 0.28));
  color: #fff0bf;
  box-shadow: 0 0 12px rgba(214, 169, 79, 0.16);
}

@media (max-height: 820px) and (min-width: 1241px) {
  .spell-workshop-page {
    padding: 8px;
    grid-template-rows: 80px 160px minmax(0, 1fr);
    gap: 7px;
  }

  .spell-workshop-header {
    padding: 10px 14px;
  }

  .spell-workshop-header h2 {
    font-size: 20px !important;
  }

  .spell-build-summary {
    gap: 6px;
  }

  .spell-build-summary > span {
    padding-block: 4px !important;
    font-size: 10px !important;
  }

  .spell-active-panel {
    padding: 8px 10px;
  }

  .spell-active-toolbar {
    gap: 8px;
    padding-bottom: 5px;
    margin-bottom: 5px;
  }

  .spell-loadout-card {
    height: 30px;
  }

  .spell-active-grid {
    height: 96px;
    padding: 6px 14px;
    gap: 10px;
  }

  .spell-slot-card {
    width: 50px !important;
    height: 50px !important;
  }

  .spell-active-slot__label {
    font-size: 9px;
  }

  .spellbook-grid {
    grid-template-columns: repeat(5, 46px);
    gap: 5px;
  }

  .spellbook-grid > button {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px;
    min-height: 46px;
  }

  .spell-auto-section {
    padding: 9px;
  }

  .spell-automation-header {
    padding: 10px 12px 48px;
  }

  .spell-auto-switchbar {
    min-height: 32px;
    margin: 0 8px 7px;
  }

  .spell-rotation-add-row {
    min-height: 40px;
    margin-top: 5px;
    padding: 6px 7px;
  }

  .spell-trigger-card {
    min-height: 110px;
    height: 110px;
    padding-top: 10px !important;
  }

  .spell-trigger-card > div:first-child {
    min-height: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .spell-trigger-presets {
    gap: 4px;
  }

  .spell-trigger-preset {
    height: 24px;
  }
}

@media (min-width: 1241px) {
  @container abilities-workspace (max-width: 1320px) {
    .spell-workshop-page {
      grid-template-columns:
        minmax(214px, 235px)
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(248px, 260px);
      gap: 7px;
      padding: 8px;
    }

    .spell-workshop-header {
      display: grid;
      grid-template-columns: 92px minmax(0, 1fr);
      align-items: end;
      gap: 7px;
      padding: 8px 10px;
    }

    .spell-workshop-header h2 {
      font-size: 16px !important;
    }

    .spell-build-summary {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 4px;
      width: 100%;
    }

    .spell-build-summary > span {
      padding-inline: 4px !important;
      font-size: 8px !important;
      letter-spacing: 0.06em !important;
    }

    .spellbook-panel {
      padding: 9px;
    }

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

    .spellbook-grid > button {
      width: 46px !important;
      height: 46px !important;
      min-width: 46px;
      min-height: 46px;
      justify-self: center;
    }

    .spell-active-panel {
      padding: 8px;
    }

    .spell-active-toolbar {
      grid-template-columns: 104px minmax(0, 1fr);
      gap: 6px;
    }

    .spell-active-loadout-label {
      font-size: 10px !important;
      letter-spacing: 0.04em !important;
    }

    .spell-loadout-presets {
      width: 100%;
      min-width: 0;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 5px;
    }

    .spell-active-remove-hint {
      display: none;
    }

    .spell-active-grid {
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap: 6px;
      padding: 6px 8px;
    }

    .spell-slot-card {
      width: 46px !important;
      height: 46px !important;
    }

    .spell-active-slot__label {
      font-size: 8px;
      letter-spacing: 0.04em;
    }

    .spell-automation-header {
      padding: 9px 10px 46px;
    }

    .spell-auto-switchbar {
      min-height: 31px;
      margin: 0 7px 6px;
      padding: 4px 6px;
    }

    .spell-auto-section {
      padding: 8px;
    }

    .spell-auto-section--recovery > p,
    .spell-auto-section--ward > p {
      margin-bottom: 6px !important;
      font-size: 9px !important;
      line-height: 1.25;
    }

    .spell-rotation-box {
      padding: 7px;
    }

    .spell-trigger-card {
      min-height: 118px;
      height: 118px;
      padding-top: 8px !important;
      padding-right: 34px !important;
    }

    .spell-trigger-card > div:first-child {
      display: grid;
      grid-template-columns: 36px minmax(0, 1fr);
      gap: 7px;
      width: 100%;
    }

    .spell-trigger-card > div:first-child {
      min-height: 46px;
      height: 46px;
      flex-basis: 46px;
    }

    .spell-trigger-action {
      position: absolute;
      top: 8px;
      right: 8px;
      width: 24px;
      min-width: 24px;
      height: 24px;
      min-height: 24px;
    }

    .spell-trigger-conditions {
      min-height: 44px;
      height: 44px;
      padding-left: 0 !important;
    }

    .spell-trigger-conditions > .flex > span:first-child {
      display: none;
    }

    .spell-trigger-presets {
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 2px;
    }

    .spell-trigger-preset {
      min-width: 0;
      padding-inline: 1px;
      font-size: 8px;
      white-space: nowrap;
    }

    .spell-trigger-preset:last-child {
      font-size: 7px;
    }
  }
}

@media (min-width: 1500px) {
  @container abilities-workspace (min-width: 1321px) {
    .spell-workshop-page {
      grid-template-columns: minmax(320px, 350px) minmax(350px, 1fr) minmax(350px, 1fr) minmax(300px, 350px);
    }

    .spellbook-grid {
      grid-template-columns: repeat(5, 55px);
    }

    .spellbook-grid > button {
      width: 55px !important;
      height: 55px !important;
      min-width: 55px;
      min-height: 55px;
    }
  }
}

@media (max-width: 1240px) {
  .spell-workshop-page {
    height: auto;
    max-height: none;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    overflow-y: visible;
  }

  .spell-workshop-header,
  .spell-active-panel,
  .spellbook-panel,
  .spell-automation-header,
  .spell-auto-switchbar,
  .spell-auto-section--cast,
  .spell-auto-section--recovery,
  .spell-auto-section--ward {
    grid-column: 1;
    grid-row: auto;
  }

  .spellbook-panel,
  .spell-auto-section--cast {
    max-height: none;
    overflow-y: visible;
  }

  .combat-zone-panel {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .combat-automation-dock {
    grid-column: 1 / -1;
    justify-self: stretch;
    max-width: none;
    justify-content: flex-end;
    border-left: 0;
    border-top: 1px solid rgba(214, 169, 79, 0.26);
    padding-left: 0;
    padding-top: 10px;
  }

  .combat-automation-dock__title {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .spell-workshop-header,
  .spell-active-toolbar,
  .spellbook-toolbar,
  .spell-auto-switchbar {
    align-items: stretch;
    flex-direction: column;
  }

  .spell-active-toolbar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .spell-active-title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .spell-active-loadout-label,
  .spell-filter-tabs,
  .spell-loadout-presets,
  .spell-active-remove-hint,
  .spell-active-lock-note {
    grid-column: 1;
  }

  .spell-active-loadout-label,
  .spell-active-remove-hint {
    justify-self: center;
    text-align: center;
  }

  .spell-filter-tabs {
    justify-self: center;
    max-width: 100%;
  }

  .spell-loadout-presets {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    justify-self: stretch;
  }

  .spell-build-summary,
  .spell-auto-damage-grid {
    grid-template-columns: 1fr;
  }

  .spell-auto-config--modal,
  .spell-auto-config--modal .spell-auto-damage-grid,
  .spell-auto-modal-summary {
    grid-template-columns: 1fr;
  }

  .spell-auto-config--modal .spell-auto-section--recovery,
  .spell-auto-config--modal .spell-auto-section--ward {
    grid-column: 1;
  }

  .combat-zone-panel {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
  }

  .combat-automation-dock {
    justify-content: stretch;
  }

  .combat-auto-utility-slot--wide,
  .combat-auto-control,
  .combat-auto-toggle-card {
    flex: 1 1 100%;
  }

  .combat-auto-toggle-card--combat[data-mode-note]::before {
    left: 50%;
    max-width: calc(100vw - 32px);
    transform: translateX(-50%);
    text-align: center;
    white-space: normal;
  }

  .spell-active-grid {
    grid-template-columns: repeat(3, minmax(72px, 1fr));
    padding: 18px 14px;
  }
}

.achievement-panel {
  width: 100%;
  max-width: none;
  position: relative;
  box-sizing: border-box;
  min-height: calc(100vh + 180px);
  overflow-anchor: none;
}

@media (min-width: 768px) {
  .zone-themed-main {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .zone-themed-main > .relative.z-10,
  .zone-themed-main > .relative.z-10 > .transition-all,
  .zone-themed-main > .relative.z-10 > .transition-all > [class*="max-w-"][class*="mx-auto"] {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

.achievement-gallery-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}

.achievement-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  background: rgba(13, 28, 50, 0.86);
}

.achievement-card > div.relative {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.achievement-category-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
  width: 100%;
  max-width: 780px;
  min-height: 32px;
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.achievement-category-tabs > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 30px;
  padding-inline: 10px;
  text-align: center;
  line-height: 1;
  white-space: nowrap;
}

.achievement-card__rewards {
  flex-wrap: nowrap !important;
  overflow: hidden;
  min-height: 30px;
}

.achievement-card__rewards > span {
  min-width: 0;
  white-space: nowrap;
}

.achievement-card__rewards > span:first-child {
  flex: 0 0 auto;
}

.achievement-reward-chip {
  flex: 0 1 auto;
  max-width: 100%;
}

.achievement-reward-chip span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.achievement-card--claimed {
  border-color: rgba(34, 197, 94, 0.52) !important;
  background: linear-gradient(180deg, rgba(19, 44, 72, 0.86), rgba(13, 28, 50, 0.84));
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.14), 0 0 14px rgba(34, 197, 94, 0.08);
}

.achievement-card--claimable {
  border-color: rgba(214, 169, 79, 0.74) !important;
  background: linear-gradient(180deg, rgba(78, 55, 16, 0.88), rgba(13, 28, 50, 0.84));
  box-shadow: inset 0 0 0 1px rgba(214, 169, 79, 0.2), 0 0 18px rgba(214, 169, 79, 0.12);
}

.achievement-card--locked {
  border-color: rgba(144, 136, 168, 0.24) !important;
  background: rgba(7, 20, 38, 0.74);
  opacity: 0.78;
}

.achievement-card--locked:hover {
  opacity: 0.96;
  border-color: rgba(214, 169, 79, 0.34) !important;
}

.achievement-card__description {
  min-height: 2.75em;
}

@media (min-width: 640px) {
  .achievement-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .achievement-category-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .achievement-panel {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none;
  }

  .achievement-gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .achievement-category-tabs {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    max-width: 920px;
  }
}

@media (min-width: 1280px) {
  .achievement-gallery-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.talent-path-toggle-arrow {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transform-origin: 50% 55%;
  opacity: 0.9;
}

.talent-popover-v2 {
  padding: 0;
  border: 1px solid var(--talent-accent, rgba(200, 165, 114, 0.6));
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(6, 12, 22, 0.98), rgba(14, 24, 38, 0.98) 58%, rgba(6, 12, 22, 0.98)),
    rgb(var(--surface-rgb) / 0.98);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.72),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  overflow: hidden;
  z-index: 2147483647 !important;
}

.talent-popover-v2__content {
  --talent-accent-soft: color-mix(in srgb, var(--talent-accent, #c8a572) 24%, transparent);
  display: grid;
  gap: 10px;
  padding: 12px;
  color: #e8dfc9;
  font-family: var(--font-body);
}

.talent-popover-v2__top {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin: -12px -12px 0;
  padding: 12px 14px 11px 18px;
  background: linear-gradient(90deg, var(--talent-accent-soft), rgba(255, 255, 255, 0.03));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

.talent-popover-v2__top::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--talent-accent, #c8a572);
  box-shadow: 0 0 16px var(--talent-accent, #c8a572);
}

.talent-popover-v2__icon {
  width: 48px;
  height: 48px;
  border-radius: 6px !important;
  border: 1px solid color-mix(in srgb, var(--talent-accent, #c8a572) 60%, #ffffff 10%) !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.42);
}

.talent-popover-v2__title {
  font-size: 17px;
  line-height: 1.08;
  font-style: italic;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.talent-popover-v2__chip {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--talent-accent, #d9b881) 55%, transparent);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.28);
  color: #d9b881 !important;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.talent-popover-v2__summary {
  margin: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--talent-accent, #c8a572);
  background: rgba(255, 255, 255, 0.035);
  color: #d2c8d8;
  font-size: 12px;
  line-height: 1.45;
}

.talent-popover-v2__bonus {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  background: rgba(5, 10, 18, 0.62);
}

.talent-popover-v2__bonus--current {
  border-color: rgba(132, 165, 110, 0.28);
}

.talent-popover-v2__bonus--next {
  border-color: rgba(123, 158, 168, 0.28);
}

.talent-popover-v2__label {
  color: #9088a8;
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.talent-popover-v2__value {
  color: color-mix(in srgb, var(--talent-accent, #c8a572) 78%, #ffffff);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

.talent-popover-v2__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 1px -12px -12px;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
  color: #9088a8;
  font-size: 11px;
  font-weight: 700;
}

.talent-popover-v2__notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.talent-popover-v2__notice--ready {
  color: #94d37b;
  background: rgba(132, 165, 110, 0.14);
}

.talent-popover-v2__notice--choice {
  color: #d9b881;
  background: rgba(217, 184, 129, 0.12);
}

.talent-popover-v2__notice--locked {
  color: #a9a1ba;
  background: rgba(14, 11, 22, 0.45);
}

.talent-popover-v2__notice--blocked {
  color: #d98368;
  background: rgba(198, 107, 74, 0.12);
}

@media (min-width: 1024px) {
  .lg\:flex {
    display: flex;
  }
}

.combat-boss-card {
  outline: 2px solid rgba(239, 198, 107, 0.92);
  outline-offset: 0;
  box-shadow:
    0 0 0 1px rgba(255, 226, 155, 0.38),
    0 0 34px rgba(239, 173, 72, 0.32),
    inset 0 1px 0 rgba(255, 244, 215, 0.24);
}

.combat-boss-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 171, 0.38),
    inset 0 0 28px rgba(145, 47, 28, 0.12);
}

.combat-map-boss-badge {
  min-width: 82px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(65, 26, 18, 0.98), rgba(8, 9, 13, 0.98)) !important;
}

.combat-map-boss-badge::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(255, 222, 137, 0.26);
  border-radius: 2px;
  pointer-events: none;
}

.combat-fight-button {
  background: linear-gradient(90deg, #baf8b8 0%, #70e9c0 38%, #83cfff 68%, #baf8b8 100%) !important;
  background-size: 240% 100% !important;
  border-color: rgba(159, 242, 229, 0.95) !important;
  animation: combatFightButtonPulse 1.8s ease-in-out infinite;
}

@media (max-width: 1180px) {
  .talent-foundation-split {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .follower-adventure-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

.follower-dispatch-board {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.42fr);
  align-items: start;
}

.follower-dispatch-board > section:first-child {
  grid-column: 1 / -1;
}

.follower-dispatch-hero,
.follower-panel-soft {
  border-color: rgba(118, 91, 48, 0.34) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.04),
    0 16px 36px rgba(0, 0, 0, 0.18);
}

.follower-summary-chip,
.follower-route-chip,
.follower-result-note {
  border-color: rgba(118, 91, 48, 0.26) !important;
  box-shadow: inset 0 1px 0 rgba(255, 238, 190, 0.025);
}

.follower-ability-slot {
  border-color: rgba(217, 184, 129, 0.13) !important;
  background: rgba(3, 8, 17, 0.30) !important;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, 0.025);
}

.follower-ability-slot > span:first-child {
  border-color: rgba(217, 184, 129, 0.16) !important;
  background: rgba(3, 8, 17, 0.48) !important;
}

.follower-hero-card .follower-ability-slot::after {
  top: calc(100% + 6px);
  bottom: auto;
  left: 0;
  right: auto;
  width: min(240px, calc(100vw - 48px));
  border-color: rgba(214, 169, 79, 0.30);
  background: rgba(3, 8, 17, 0.94);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.38);
  white-space: normal;
}

.follower-unlock-badge {
  top: 12px !important;
  right: 12px !important;
  border-color: rgba(217, 184, 129, 0.28) !important;
  box-shadow: inset 0 1px 0 rgba(255, 238, 190, 0.035);
}

.follower-active-badge {
  top: 42px !important;
  right: 12px !important;
}

.follower-upgrade-cost-inline {
  line-height: 1;
  vertical-align: middle;
}

.follower-upgrade-cost-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.follower-readiness-tip {
  cursor: help;
}

.follower-readiness-tip::after {
  width: min(310px, calc(100vw - 48px));
}

.follower-hero-card:has(.follower-ability-tip:hover),
.follower-hero-card:has(.follower-ability-tip:focus-visible),
.follower-hero-card:has(.follower-ability-tip:focus-within),
.follower-queue-card:has(.follower-ability-tip:hover),
.follower-queue-card:has(.follower-ability-tip:focus-visible),
.follower-queue-card:has(.follower-ability-tip:focus-within),
.follower-expedition-card:has(.follower-ability-tip:hover),
.follower-expedition-card:has(.follower-ability-tip:focus-visible),
.follower-expedition-card:has(.follower-ability-tip:focus-within) {
  z-index: 2147483000 !important;
  overflow: visible !important;
}

.follower-hero-card:has(.follower-ability-tip:hover),
.follower-hero-card:has(.follower-ability-tip:focus-visible),
.follower-hero-card:has(.follower-ability-tip:focus-within) {
  transform: none !important;
}

.follower-hero-card:has(.follower-ability-tip:hover) .follower-hero-card__portrait,
.follower-hero-card:has(.follower-ability-tip:focus-visible) .follower-hero-card__portrait,
.follower-hero-card:has(.follower-ability-tip:focus-within) .follower-hero-card__portrait {
  transform: scale(1.035) !important;
}

.follower-hero-card:has(.follower-ability-tip:hover) .follower-hero-card__content,
.follower-hero-card:has(.follower-ability-tip:focus-visible) .follower-hero-card__content,
.follower-hero-card:has(.follower-ability-tip:focus-within) .follower-hero-card__content {
  z-index: 2147483000 !important;
}

.follower-card-action.follower-ability-tip:hover:not(:disabled),
.follower-card-action.follower-ability-tip:focus-visible:not(:disabled),
.follower-card-action.follower-ability-tip:focus-within:not(:disabled) {
  transform: none !important;
}

.follower-queue-card {
  border-color: rgba(118, 91, 48, 0.30) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.035),
    0 10px 26px rgba(0, 0, 0, 0.18);
}

.follower-queue-step {
  border: 0 !important;
  border-left: 2px solid var(--follower-step-color, rgba(217, 184, 129, 0.55)) !important;
  background: rgba(5, 10, 18, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 238, 190, 0.025);
}

.follower-queue-progress {
  position: relative;
  border: 1px solid color-mix(in srgb, var(--follower-step-color, #d9b881) 55%, rgba(255, 244, 214, 0.22));
  background:
    linear-gradient(180deg, rgba(3, 8, 17, 0.82), rgba(3, 8, 17, 0.96)) !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.72),
    0 0 14px color-mix(in srgb, var(--follower-step-color, #d9b881) 20%, transparent);
}

.follower-queue-progress::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.22), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.16));
  opacity: 0.62;
}

.follower-queue-progress__fill {
  min-width: 4px;
  box-shadow:
    0 0 12px color-mix(in srgb, var(--follower-step-color, #d9b881) 52%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.follower-roster-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
  align-content: start;
  gap: 0.75rem !important;
}

.follower-hero-card {
  isolation: isolate;
  min-height: 246px;
  background:
    radial-gradient(circle at 74% 10%, rgba(122, 167, 210, 0.18), transparent 34%),
    radial-gradient(circle at 92% 88%, rgba(70, 112, 166, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(16, 29, 50, 0.97), rgba(8, 22, 42, 0.92)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.08),
    0 14px 32px rgba(0, 0, 0, 0.24);
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.follower-hero-card:hover,
.follower-hero-card:focus-within {
  transform: translateY(-1px);
  border-color: rgba(217, 184, 129, 0.56) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.11),
    0 18px 42px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(217, 184, 129, 0.12);
}

.follower-hero-card.is-selected {
  background:
    radial-gradient(circle at 74% 10%, rgba(217, 184, 129, 0.14), transparent 32%),
    radial-gradient(circle at 92% 88%, rgba(122, 167, 210, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(20, 34, 58, 0.98), rgba(9, 25, 48, 0.94)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(217, 184, 129, 0.20),
    0 0 24px rgba(217, 184, 129, 0.12) !important;
}

.follower-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(255, 238, 190, 0.055), transparent 38%),
    linear-gradient(90deg, rgba(217, 184, 129, 0.10), transparent 22%, transparent 76%, rgba(122, 167, 210, 0.06));
  opacity: 0.9;
  z-index: 1;
}

.follower-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 232, 178, 0.08),
    inset 0 -36px 70px rgba(0, 0, 0, 0.25);
  z-index: 30;
}

.follower-hero-card__portrait {
  width: clamp(170px, 36%, 235px);
  transform: scale(1.035);
  transform-origin: center top;
  object-position: center top;
  transition:
    transform 0.22s ease,
    filter 0.22s ease,
    opacity 0.22s ease;
}

.follower-hero-card:hover .follower-hero-card__portrait {
  transform: scale(1.065);
}

.follower-hero-card__shade {
  background:
    linear-gradient(90deg, rgba(8, 18, 34, 0.08) 0%, rgba(10, 24, 45, 0.28) 28%, rgba(10, 25, 48, 0.78) 48%, rgba(9, 25, 48, 0.95) 100%),
    radial-gradient(circle at 74% 10%, rgba(122, 167, 210, 0.20), transparent 34%),
    radial-gradient(circle at 92% 88%, rgba(64, 118, 180, 0.18), transparent 30%);
  z-index: 2;
}

.follower-hero-card.is-locked .follower-hero-card__shade {
  background:
    linear-gradient(90deg, rgba(8, 18, 34, 0.34) 0%, rgba(10, 24, 45, 0.58) 38%, rgba(9, 25, 48, 0.88) 62%, rgba(8, 22, 42, 0.96) 100%),
    radial-gradient(circle at 76% 12%, rgba(91, 122, 154, 0.16), transparent 34%);
}

.follower-hero-card__content {
  min-height: 246px;
  margin-left: clamp(132px, 30%, 190px);
  padding: 1rem;
}

.follower-hero-card__title-row h3 {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72);
}

.follower-role-badge,
.follower-unlock-badge,
.follower-active-badge {
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
}

.follower-status-copy {
  max-width: 36rem;
  min-height: 1.05rem;
}

.follower-hero-card.is-active {
  animation: followerActivePulse 2.4s ease-in-out infinite;
}

.follower-card-abilities {
  align-items: stretch;
}

.follower-hero-card .follower-ability-slot {
  min-height: 72px;
  border-radius: 6px !important;
  background:
    linear-gradient(135deg, rgba(6, 10, 18, 0.82), rgba(18, 24, 40, 0.60)) !important;
  border-color: rgba(217, 184, 129, 0.20) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.05),
    0 10px 22px rgba(0, 0, 0, 0.16);
}

.follower-hero-card .follower-ability-slot:hover,
.follower-hero-card .follower-ability-slot:focus-within {
  border-color: rgba(217, 184, 129, 0.42) !important;
  background:
    linear-gradient(135deg, rgba(10, 15, 26, 0.92), rgba(28, 34, 50, 0.68)) !important;
}

.follower-hero-card .follower-ability-slot > span:first-child {
  width: 44px !important;
  height: 44px !important;
  border-radius: 6px !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.08),
    0 8px 18px rgba(0, 0, 0, 0.24);
}

.follower-hero-card .follower-ability-slot img {
  width: 38px;
  height: 38px;
}

.follower-rank-meter__tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 244, 214, 0.14);
  transform: translateX(-50%);
}

.follower-rank-meter {
  border-color: rgba(217, 184, 129, 0.13) !important;
  background: rgba(3, 8, 17, 0.48) !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 240, 200, 0.025);
}

.follower-readiness-meter {
  height: 10px !important;
  border: 1px solid rgba(168, 200, 181, 0.34);
  background:
    linear-gradient(180deg, rgba(2, 7, 15, 0.86), rgba(2, 7, 15, 0.96)) !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.68),
    0 0 14px rgba(168, 200, 181, 0.16);
}

.follower-readiness-meter > div {
  min-width: 4px;
  box-shadow:
    0 0 12px rgba(110, 231, 183, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.follower-talent-pip {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(217, 184, 129, 0.34);
  border-radius: 4px;
  background: rgba(3, 8, 17, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.08),
    0 0 0 rgba(217, 184, 129, 0);
}

.follower-talent-pip.is-spent {
  border-color: rgba(248, 212, 139, 0.86);
  background:
    radial-gradient(circle at 45% 35%, rgba(255, 248, 220, 0.82), transparent 22%),
    linear-gradient(135deg, #7aa7d2 0%, #d9b881 52%, #6f4f1f 100%);
  box-shadow: 0 0 10px rgba(217, 184, 129, 0.28);
}

.follower-talent-pip.is-available {
  border-color: rgba(217, 184, 129, 0.72);
  background:
    radial-gradient(circle at 50% 42%, rgba(217, 184, 129, 0.24), transparent 34%),
    rgba(7, 14, 26, 0.86);
  cursor: pointer;
}

.follower-talent-pip.is-available:hover {
  box-shadow: 0 0 12px rgba(217, 184, 129, 0.30);
  transform: translateY(-1px);
}

.follower-talent-pip.is-locked {
  border-color: rgba(140, 130, 154, 0.18);
  background: rgba(3, 8, 17, 0.58);
  opacity: 0.45;
}

.follower-upgrade-missing {
  border-color: rgba(207, 96, 96, 0.34) !important;
  color: rgba(255, 195, 185, 0.82) !important;
}

.follower-card-actions {
  margin-top: 0.15rem;
}

.inventory-assigned-mercenary {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 300px;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(217, 184, 129, 0.2);
}

.inventory-assigned-mercenary__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 0.42rem;
  padding: 0 0.15rem;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.inventory-assigned-mercenary__heading {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  min-width: 0;
}

.inventory-assigned-mercenary__heading > span:first-child {
  color: var(--color-celestial-gold);
  font-family: var(--font-serif);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(217, 184, 129, 0.2);
}

.inventory-assigned-mercenary__heading > span:last-child,
.inventory-assigned-mercenary__manage {
  color: rgb(var(--lavender-rgb) / 0.62);
  font-family: var(--font-ui);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inventory-assigned-mercenary__manage {
  color: rgb(var(--gold-rgb) / 0.78);
}

.inventory-assigned-mercenary__header:hover .inventory-assigned-mercenary__manage,
.inventory-assigned-mercenary__header:focus-visible .inventory-assigned-mercenary__manage {
  color: rgb(var(--gold-rgb));
}

.inventory-assigned-mercenary__header:focus-visible {
  border-radius: 3px;
  outline: 1px solid rgb(var(--gold-rgb) / 0.72);
  outline-offset: 3px;
}

.inventory-assigned-mercenary__card {
  position: relative;
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0.58rem;
  width: 100%;
  min-height: 7.25rem;
  padding: 0.55rem;
  overflow: visible;
  border: 1px solid rgba(217, 184, 129, 0.42);
  border-radius: 0.36rem;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 214, 102, 0.16), transparent 43%),
    radial-gradient(circle at 92% 85%, rgba(122, 167, 210, 0.12), transparent 42%),
    linear-gradient(145deg, rgba(12, 24, 42, 0.98), rgba(3, 9, 18, 0.98));
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow:
    inset 3px 0 0 rgba(255, 214, 102, 0.74),
    inset 0 1px 0 rgba(255, 245, 215, 0.07),
    0 10px 20px rgba(0, 0, 0, 0.24);
  transition:
    transform 0.14s ease,
    border-color 0.14s ease,
    box-shadow 0.14s ease;
}

.inventory-assigned-mercenary__card:hover,
.inventory-assigned-mercenary__card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 214, 102, 0.72);
  box-shadow:
    inset 3px 0 0 rgba(255, 214, 102, 0.9),
    inset 0 1px 0 rgba(255, 245, 215, 0.1),
    0 13px 24px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255, 214, 102, 0.08);
  outline: none;
}

.inventory-assigned-mercenary__card:focus-visible {
  box-shadow:
    0 0 0 1px rgb(var(--gold-rgb) / 0.76),
    0 13px 24px rgba(0, 0, 0, 0.32);
}

.inventory-assigned-mercenary__portrait {
  position: relative;
  display: block;
  width: 4rem;
  height: 5.45rem;
  overflow: hidden;
  align-self: start;
  border: 1px solid rgba(255, 214, 102, 0.6);
  border-radius: 0.3rem;
  background: rgba(1, 5, 11, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.58),
    0 7px 14px rgba(0, 0, 0, 0.32);
}

.inventory-assigned-mercenary__portrait > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-assigned-mercenary__hired {
  position: absolute;
  right: 0.22rem;
  bottom: 0.22rem;
  padding: 0.18rem 0.27rem;
  border: 1px solid rgba(255, 226, 144, 0.7);
  border-radius: 0.18rem;
  background: rgba(18, 13, 4, 0.92);
  color: #ffe28f;
  font-family: var(--font-ui);
  font-size: 0.42rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.38);
}

.inventory-assigned-mercenary__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
}

.inventory-assigned-mercenary__name {
  overflow: hidden;
  color: rgb(var(--parchment-rgb));
  font-family: var(--font-serif);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.55);
  white-space: nowrap;
}

.inventory-assigned-mercenary__meta {
  margin-top: 0.16rem;
  color: rgb(var(--gold-rgb) / 0.76);
  font-family: var(--font-ui);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inventory-assigned-mercenary__abilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.3rem;
  margin-top: 0.45rem;
}

.inventory-assigned-mercenary__ability {
  display: grid;
  grid-template-columns: 1.45rem minmax(0, 1fr);
  gap: 0.28rem;
  align-items: center;
  min-width: 0;
  padding: 0.25rem;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-radius: 0.25rem;
  background: rgba(1, 6, 13, 0.58);
}

.inventory-assigned-mercenary__ability > img {
  width: 1.45rem;
  height: 1.45rem;
  object-fit: cover;
  border: 1px solid rgba(217, 184, 129, 0.38);
  border-radius: 0.2rem;
  background: rgba(0, 0, 0, 0.46);
}

.inventory-assigned-mercenary__ability > span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.inventory-assigned-mercenary__ability small {
  color: rgb(var(--lavender-rgb) / 0.55);
  font-family: var(--font-ui);
  font-size: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.inventory-assigned-mercenary__ability strong {
  margin-top: 0.1rem;
  overflow: hidden;
  color: rgb(var(--parchment-rgb) / 0.88);
  font-family: var(--font-ui);
  font-size: 0.48rem;
  font-weight: 700;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-assigned-mercenary__talents {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-top: auto;
  padding-top: 0.4rem;
}

.inventory-assigned-mercenary__talent-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgb(var(--lavender-rgb) / 0.64);
  font-family: var(--font-ui);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inventory-assigned-mercenary__talent-copy strong {
  color: rgb(var(--gold-rgb) / 0.9);
  font-family: var(--font-mono);
}

.inventory-assigned-mercenary__talent-track {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 0.12rem;
  width: 100%;
}

.inventory-assigned-mercenary__talent-track > span {
  height: 0.24rem;
  border-radius: 1px;
  background: rgba(138, 145, 158, 0.2);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.55);
}

.inventory-assigned-mercenary__talent-track > span.is-filled {
  background: linear-gradient(90deg, #8aa7c7, #d9b881);
  box-shadow: 0 0 5px rgba(217, 184, 129, 0.28);
}


.follower-card-action {
  min-height: 38px;
  white-space: nowrap;
}

.follower-card-action.btn-primary,
.follower-card-action.btn-secondary {
  border-radius: 4px !important;
  border: 1px solid rgba(220, 184, 116, 0.34) !important;
  background:
    linear-gradient(180deg, rgba(17, 25, 38, 0.96), rgba(5, 8, 15, 0.98)) !important;
  color: rgba(255, 241, 204, 0.92) !important;
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.52),
    0 10px 22px rgba(0, 0, 0, 0.28) !important;
}

.follower-card-action.btn-primary {
  border-color: rgba(110, 231, 183, 0.42) !important;
  background:
    linear-gradient(180deg, rgba(25, 92, 77, 0.92), rgba(5, 15, 19, 0.98)) !important;
  color: rgba(218, 255, 239, 0.96) !important;
  box-shadow:
    inset 0 1px 0 rgba(202, 255, 231, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.55),
    0 0 18px rgba(42, 211, 151, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.32) !important;
}

.follower-card-action.btn-primary:hover:not(:disabled),
.follower-card-action.btn-secondary:hover:not(:disabled) {
  border-color: rgba(255, 222, 150, 0.58) !important;
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.follower-card-action.btn-primary:disabled,
.follower-card-action.btn-secondary:disabled {
  opacity: 0.58 !important;
  filter: grayscale(0.25);
  transform: none;
}

.follower-upgrade-missing.follower-card-action {
  border-color: rgba(176, 87, 87, 0.38) !important;
  background:
    linear-gradient(180deg, rgba(67, 31, 36, 0.78), rgba(8, 8, 13, 0.96)) !important;
  color: rgba(255, 206, 192, 0.86) !important;
}

.follower-card-action .follower-upgrade-cost-inline {
  color: inherit;
  opacity: 0.9;
}

.follower-expedition-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.follower-expedition-card {
  min-height: 112px;
}

@media (max-width: 1380px) {
  .follower-dispatch-board {
    grid-template-columns: minmax(0, 1fr);
  }

  .follower-dispatch-board > section:first-child,
  .follower-dispatch-board > section:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .follower-dispatch-board,
  .follower-roster-grid,
  .follower-expedition-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .follower-dispatch-board > section:last-child {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .follower-hero-card {
    min-height: 340px;
  }

  .follower-hero-card__portrait {
    inset: 0 0 auto 0;
    width: 100%;
    height: 145px !important;
    object-position: center 18%;
  }

  .follower-hero-card__shade {
    background:
      linear-gradient(180deg, rgba(8, 18, 34, 0.08) 0%, rgba(10, 24, 45, 0.42) 35%, rgba(10, 25, 48, 0.84) 50%, rgba(8, 22, 42, 0.96) 100%),
      radial-gradient(circle at 70% 8%, rgba(122, 167, 210, 0.18), transparent 32%);
  }

  .follower-hero-card__content {
    min-height: 340px;
    margin-left: 0;
    padding: 8.25rem 0.85rem 0.85rem;
  }

  .follower-hero-card__title-row {
    padding-right: 0 !important;
  }

  .follower-unlock-badge {
    top: 10px !important;
    right: 10px !important;
  }

  .follower-active-badge {
    top: 42px !important;
    right: 10px !important;
  }

  .follower-card-actions {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@keyframes followerActivePulse {
  0%,
  100% {
    box-shadow:
      0 0 0 1px rgba(217, 184, 129, 0.16),
      0 14px 32px rgba(0, 0, 0, 0.24),
      0 0 0 rgba(217, 184, 129, 0);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(217, 184, 129, 0.32),
      0 16px 36px rgba(0, 0, 0, 0.28),
      0 0 22px rgba(217, 184, 129, 0.22);
  }
}

@keyframes combatFightButtonPulse {
  0%,
  100% {
    background-position: 0% 50%;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.60),
      0 0 0 rgba(80, 210, 145, 0),
      0 6px 14px rgba(75, 180, 96, 0.18);
  }
  50% {
    background-position: 100% 50%;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.70),
      0 0 18px rgba(82, 196, 255, 0.42),
      0 8px 18px rgba(75, 180, 160, 0.25);
  }
}

.progress-bar > .progress-fill,
.progress-bar > div,
.gather-node-progress-fill,
.soulwake-fill,
.activity-progress-fill-fluid {
  transition: width 650ms cubic-bezier(0.22, 0.8, 0.22, 1);
  will-change: width;
}

.crafting-usage-scroll {
  --crafting-usage-row-height: 30px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: calc((var(--crafting-usage-row-height) * 8) + 42px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(217, 184, 129, 0.65) rgba(7, 12, 22, 0.64);
  scrollbar-width: thin;
}

.crafting-usage-scroll > button {
  min-height: var(--crafting-usage-row-height);
  flex: 0 0 auto;
}

.crafting-usage-scroll > button > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crafting-usage-scroll > button > span:nth-child(3) {
  flex-shrink: 0;
}

.crafting-usage-scroll::-webkit-scrollbar {
  width: 6px;
}

.crafting-usage-scroll::-webkit-scrollbar-track {
  background: rgba(7, 12, 22, 0.64);
  border-radius: 999px;
}

.crafting-usage-scroll::-webkit-scrollbar-thumb {
  background: rgba(217, 184, 129, 0.65);
  border-radius: 999px;
}

.crafting-workbench {
  --crafting-button-border: rgba(217, 184, 129, 0.24);
  --crafting-button-glow: rgba(96, 199, 255, 0.22);
}

.crafting-page-shell {
  padding-bottom: 0;
  min-height: 0;
}

main:has(.crafting-page-shell) {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  min-height: 0 !important;
  padding-bottom: 0.5rem !important;
}

main:has(.crafting-page-shell) > .relative.z-10 {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  padding-bottom: 0 !important;
}

main:has(.crafting-page-shell) > .relative.z-10 > .relative.opacity-100 {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  min-height: 0 !important;
  overflow: visible !important;
}

main:has(.crafting-page-shell) .crafting-page-shell {
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 0 0.75rem 0.5rem !important;
}

main:has(.crafting-page-shell) .crafting-page-shell > .crafting-workbench--stable {
  height: auto !important;
  max-height: none !important;
  min-height: 38rem !important;
  overflow: visible !important;
}

.crafting-workbench--stable {
  contain: none;
  grid-template-rows: auto !important;
  height: auto !important;
  min-height: 100% !important;
  overflow: visible !important;
  border-radius: 8px !important;
}

.crafting-category-rail {
  min-height: 0;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

@media (min-width: 1024px) {
  .crafting-category-rail {
    box-sizing: border-box;
    height: min(38rem, calc(100dvh - 12rem)) !important;
    max-height: min(38rem, calc(100dvh - 12rem)) !important;
  }
}

@media (max-width: 1023px) {
  .crafting-category-rail {
    max-height: min(22rem, 48vh) !important;
  }
}

.crafting-workbench-main {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  min-height: 100%;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  padding: 0.55rem 0.75rem !important;
}

.crafting-workbench-main > .mt-2.min-w-0.flex-1.min-h-0.overflow-hidden.pr-0 {
  aspect-ratio: auto !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 0 0 auto !important;
  min-height: 38rem !important;
  overflow: visible !important;
}

.crafting-workbench-main > .flex:first-child {
  margin-bottom: 0.35rem !important;
}

.crafting-workbench-main h3 {
  font-size: 1.25rem;
  line-height: 1.1;
}

.crafting-workbench-main .crafting-mode-button {
  min-height: 44px;
  padding-top: 0.45rem !important;
  padding-bottom: 0.45rem !important;
}

.crafting-workbench-main .crafting-chip-button {
  line-height: 1.15;
}

.crafting-recipe-list {
  flex: 0 1 auto !important;
  height: min(41rem, calc(100dvh - 10rem));
  min-height: 12rem;
  max-height: min(41rem, calc(100dvh - 10rem));
  min-width: 0;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  contain: layout paint;
}

.crafting-recipe-detail {
  min-width: 0;
  scrollbar-gutter: auto;
  contain: layout paint;
}

.crafting-recipe-row {
  content-visibility: auto;
  contain-intrinsic-size: auto 58px;
}

.crafting-recipe-detail {
  height: auto !important;
  min-height: 38rem;
  overflow: visible !important;
}

@media (min-width: 1024px) {
  .crafting-workbench-main {
    overflow: visible !important;
    scrollbar-gutter: auto;
  }

  .crafting-workbench-main > .mt-2.min-w-0.flex-1.min-h-0.overflow-hidden.pr-0 {
    flex: 0 0 auto !important;
    min-height: 38rem !important;
    overflow: visible !important;
  }
}

.crafting-progress-strip {
  position: sticky;
  top: 0;
  z-index: 90;
  display: grid;
  grid-template-columns: 52px minmax(220px, 0.32fr) minmax(0, 1.68fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-bottom: 0;
  min-height: 78px;
  padding: 12px 14px !important;
  border-color: rgba(217, 184, 129, 0.24);
  background:
    radial-gradient(circle at 8% 0%, rgba(217, 184, 129, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(15, 20, 35, 0.96), rgba(9, 18, 32, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.08),
    0 12px 28px rgba(0, 0, 0, 0.38);
}

.crafting-progress-strip--active {
  border-color: rgba(217, 184, 129, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.08),
    0 0 16px rgba(217, 184, 129, 0.12);
}

.crafting-progress-strip--paused {
  border-color: rgba(240, 208, 120, 0.48);
  background:
    radial-gradient(circle at 8% 0%, rgba(240, 208, 120, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(20, 23, 34, 0.97), rgba(11, 19, 30, 0.95));
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 210, 0.09),
    0 0 18px rgba(217, 184, 129, 0.1);
}

.crafting-progress-strip--paused .crafting-progress-strip__fill {
  background: linear-gradient(90deg, #8f7437 0%, #d7b86a 54%, #8f7437 100%);
  box-shadow: 0 0 9px rgba(217, 184, 129, 0.22);
}

.crafting-progress-strip--idle {
  border-color: rgba(120, 132, 160, 0.22);
  filter: saturate(0.72);
}

.crafting-progress-strip__icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid rgba(217, 184, 129, 0.25);
  background: rgba(9, 18, 32, 0.72);
  color: rgba(217, 184, 129, 0.72);
}

.crafting-progress-strip__body {
  min-width: 0;
}

.crafting-progress-strip__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 7px;
}

.crafting-progress-strip__label {
  min-width: 0;
  max-width: 30vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f0d078;
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}

.crafting-progress-strip__state,
.crafting-progress-strip__time {
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.045);
  color: rgba(224, 216, 196, 0.72);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.crafting-progress-strip__timings {
  display: grid;
  flex: 0 0 auto;
  gap: 4px;
}

.crafting-progress-strip__time {
  white-space: nowrap;
  text-align: left;
  text-transform: none;
}

.crafting-progress-strip__time b {
  margin-right: 3px;
  color: rgba(224, 216, 196, 0.52);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.crafting-progress-strip__time--total {
  border-color: rgba(240, 208, 120, 0.34);
  background: rgba(217, 184, 129, 0.1);
  color: #f0d078;
}

.crafting-progress-strip__track {
  position: relative;
  height: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 999px;
  background: rgba(5, 10, 20, 0.72);
}

.crafting-progress-strip__fill {
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transition: transform 80ms linear;
  background: linear-gradient(90deg, #c9a84c 0%, #f0d078 50%, #c9a84c 100%);
  box-shadow: 0 0 12px rgba(217, 184, 129, 0.35);
}

.crafting-progress-strip--idle .crafting-progress-strip__fill {
  background: linear-gradient(90deg, rgba(120, 132, 160, 0.34), rgba(180, 190, 210, 0.42));
  box-shadow: none;
}

.crafting-progress-strip__percent {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 248, 224, 0.78);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.crafting-progress-strip__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
  justify-content: flex-end;
}

.crafting-progress-strip .production-queue-controls {
  display: inline-flex;
  align-items: stretch;
  gap: 6px;
  flex: 0 0 auto;
}

.production-queue-toggle {
  min-height: 40px;
  min-width: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(240, 208, 120, 0.42);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(93, 75, 37, 0.88), rgba(49, 40, 24, 0.92));
  color: #f6dda0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 241, 198, 0.1);
}

.production-queue-toggle:hover,
.production-queue-toggle:focus-visible {
  border-color: rgba(255, 224, 143, 0.72);
  color: #fff1bd;
  outline: none;
}

.production-queue-toggle.is-resume {
  border-color: rgba(133, 222, 158, 0.58);
  background: linear-gradient(180deg, rgba(39, 116, 70, 0.88), rgba(21, 66, 45, 0.94));
  color: #d8f8df;
  box-shadow:
    inset 0 1px 0 rgba(218, 255, 226, 0.12),
    0 0 14px rgba(70, 174, 103, 0.12);
}

.production-pause-all {
  min-height: 40px;
  min-width: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(205, 126, 99, 0.46);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(104, 55, 42, 0.78), rgba(57, 31, 29, 0.9));
  color: #efc2aa;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.075em;
  line-height: 1;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 224, 199, 0.08);
}

.production-pause-all:hover,
.production-pause-all:focus-visible {
  border-color: rgba(235, 157, 121, 0.72);
  color: #ffe0ca;
  outline: none;
}

.production-pause-all.is-disabled,
.production-pause-all:disabled {
  cursor: default;
  opacity: 0.42;
  filter: saturate(0.55);
}

.production-paused-pill {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0.25rem 0.52rem;
  border: 1px solid rgba(240, 208, 120, 0.42);
  border-radius: 999px;
  background: rgba(104, 79, 30, 0.24);
  color: #f0d078;
  font: 850 0.54rem/1 var(--font-ui);
  letter-spacing: 0.045em;
  text-transform: uppercase;
  white-space: nowrap;
}

.crafting-progress-strip__stop {
  height: 40px;
  min-width: 72px;
  border-radius: 6px;
  border: 1px solid rgba(248, 113, 113, 0.42);
  background: rgba(110, 20, 28, 0.72);
  color: #fee2e2;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.crafting-progress-strip__stop.is-disabled {
  cursor: default;
  border-color: rgba(120, 132, 160, 0.22);
  background: rgba(15, 20, 35, 0.72);
  color: rgba(224, 216, 196, 0.45);
}

.crafting-progress-strip__queue {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.crafting-progress-strip__queue-list {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 4.5rem));
  grid-auto-flow: column;
  grid-auto-columns: 240px;
  align-items: stretch;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  height: 9.45rem;
  max-height: 9.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 0 4px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(217, 184, 129, 0.45) rgba(5, 10, 20, 0.45);
}

.crafting-progress-strip__queue-list::-webkit-scrollbar {
  height: 5px;
}

.crafting-progress-strip__queue-list::-webkit-scrollbar-track {
  background: rgba(5, 10, 20, 0.45);
  border-radius: 999px;
}

.crafting-progress-strip__queue-list::-webkit-scrollbar-thumb {
  background: rgba(217, 184, 129, 0.45);
  border-radius: 999px;
}

.crafting-progress-strip__queue-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(4, 24px);
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  padding: 6px 7px;
  border: 1px solid rgba(217, 184, 129, 0.16);
  border-radius: 5px;
  background: rgba(6, 12, 22, 0.66);
}

.crafting-progress-strip__queue-name {
  grid-column: 1 / -1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(226, 219, 202, 0.82);
  font-size: 11px;
  font-weight: 800;
}

.crafting-progress-strip__queue-count,
.crafting-progress-strip__queue-more {
  color: rgba(217, 184, 129, 0.72);
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.crafting-progress-strip__queue-amount {
  display: grid;
  grid-template-columns: 22px 42px 22px;
  align-items: center;
  gap: 3px;
}

.crafting-progress-strip__queue-amount--until-empty {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  grid-template-columns: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
  writing-mode: horizontal-tb;
}

.crafting-progress-strip__queue-count-input {
  width: 42px;
  height: 28px;
  min-width: 0;
  padding: 0 3px;
  border: 1px solid rgba(217, 184, 129, 0.26);
  border-radius: 4px;
  background: rgba(3, 8, 17, 0.82);
  color: rgba(255, 244, 204, 0.92);
  font: 900 10px/1 var(--font-mono, monospace);
  text-align: center;
  outline: 0;
}

.crafting-progress-strip__queue-count-input::placeholder {
  color: rgba(217, 184, 129, 0.58);
}

.crafting-progress-strip__queue-count-input:focus {
  border-color: rgba(240, 208, 120, 0.72);
  box-shadow: 0 0 0 1px rgba(240, 208, 120, 0.18);
}

.crafting-progress-strip__queue-count-input::-webkit-outer-spin-button,
.crafting-progress-strip__queue-count-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.crafting-progress-strip__queue-button,
.crafting-progress-strip__queue-mini {
  height: 28px;
  border: 1px solid rgba(217, 184, 129, 0.28);
  border-radius: 4px;
  background: rgba(15, 20, 35, 0.86);
  color: rgba(240, 208, 120, 0.92);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.crafting-progress-strip__queue-button {
  min-width: 64px;
  padding: 0 10px;
}

.crafting-progress-strip__queue-mini {
  min-width: 28px;
  padding: 0 4px;
}

.crafting-progress-strip__queue-button:hover,
.crafting-progress-strip__queue-mini:hover {
  border-color: rgba(240, 208, 120, 0.62);
  color: #fff4cc;
}

.crafting-progress-strip__queue-front {
  border-color: rgba(91, 184, 122, 0.42);
  color: rgba(188, 240, 201, 0.94);
  background: rgba(28, 79, 49, 0.34);
}

.crafting-progress-strip__queue-front:hover {
  border-color: rgba(133, 217, 156, 0.72);
  color: #dcffe5;
  background: rgba(28, 79, 49, 0.56);
}

.crafting-progress-strip__queue-remove {
  border-color: rgba(248, 113, 113, 0.28);
  color: rgba(254, 202, 202, 0.82);
}

.crafting-main-action--busy {
  cursor: default !important;
  border-color: rgba(217, 184, 129, 0.18) !important;
  background: rgba(15, 20, 35, 0.72) !important;
  color: rgba(226, 219, 202, 0.58) !important;
  box-shadow: none !important;
}

.crafting-level-badge {
  min-width: 160px !important;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 10px !important;
  text-align: left !important;
}

.crafting-level-badge > span {
  display: inline !important;
  margin-top: 0 !important;
  line-height: 1 !important;
}

.crafting-level-badge > span:first-child {
  font-size: 8px !important;
  letter-spacing: 0.16em !important;
}

.crafting-level-badge > span:last-child {
  font-size: 14px !important;
}

@media (max-width: 900px) {
  .crafting-progress-strip {
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 72px;
  }

  .crafting-progress-strip__icon {
    width: 44px;
    height: 44px;
  }

  .crafting-progress-strip__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .crafting-progress-strip__timings {
    display: flex;
    flex-wrap: wrap;
  }

  .crafting-progress-strip__queue {
    flex-basis: 100%;
    width: 100%;
  }

  .crafting-progress-strip__label {
    max-width: 55vw;
  }

  .crafting-level-badge {
    min-width: 140px !important;
  }
}

/* Live Crafting header promoted from the approved /newtalents preview. */
.crafting-progress-strip {
  grid-template-columns: 52px minmax(0, 0.48fr) minmax(0, 0.28fr) minmax(0, 1.24fr) !important;
  grid-template-areas:
    "icon active facts queue"
    "loadout loadout loadout queue"
    "controls controls controls queue";
  align-items: start;
  gap: 8px 12px;
  min-height: 0;
  padding: 12px 14px !important;
}

.crafting-progress-strip__icon {
  grid-area: icon;
}

.crafting-progress-strip__body {
  grid-area: active;
  align-self: center;
}

.crafting-progress-strip > .t2-mastery-quick-switcher--crafting {
  grid-area: loadout;
  width: 100%;
  max-width: none;
  min-height: 42px;
  justify-self: stretch;
}

.crafting-progress-strip__actions {
  display: contents;
}

.crafting-progress-strip__timings {
  grid-area: facts;
  align-self: center;
  width: 100%;
}

.crafting-progress-strip__time {
  width: 100%;
  box-sizing: border-box;
}

.crafting-progress-strip__time--batch {
  border-color: rgba(197, 139, 222, 0.34);
  background: rgba(197, 139, 222, 0.09);
  color: #e4b5f1;
}

.crafting-progress-strip__queue {
  grid-area: queue;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: stretch;
  align-self: stretch;
  gap: 8px;
  min-width: 0;
  overflow: visible;
}

.crafting-progress-strip__queue-button {
  height: auto;
  min-height: 40px;
}

.crafting-progress-strip__queue-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: none;
  grid-auto-flow: row;
  grid-auto-columns: auto;
  gap: 6px;
  width: 100%;
  height: 168px;
  max-height: 168px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1px 5px 1px 0;
  overscroll-behavior-x: auto;
  overscroll-behavior-y: contain;
}

.crafting-progress-strip__queue-list::-webkit-scrollbar {
  width: 5px;
  height: auto;
}

.crafting-progress-strip__queue-item {
  height: auto;
  min-height: 58px;
}

.production-queue-controls {
  grid-area: controls;
  justify-self: end;
  align-self: end;
}

.crafting-rail-button,
.crafting-mode-button,
.crafting-chip-button,
.crafting-qty-input {
  position: relative;
  overflow: hidden;
  border-color: var(--crafting-button-border) !important;
  background:
    radial-gradient(circle at 16% 0%, rgba(217, 184, 129, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(9, 18, 32, 0.88), rgba(20, 29, 55, 0.64)) !important;
  color: rgba(226, 219, 202, 0.72) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.045),
    0 6px 14px rgba(0, 0, 0, 0.16);
}

.crafting-rail-button::before,
.crafting-mode-button::before,
.crafting-chip-button::before {
  content: "";
  position: absolute;
  inset: -80% -35%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 244, 204, 0.22), transparent);
  opacity: 0;
  transform: translateX(-62%) rotate(16deg);
  transition: opacity 160ms ease, transform 320ms ease;
}

.crafting-rail-button:hover,
.crafting-mode-button:hover,
.crafting-chip-button:hover,
.crafting-qty-input:hover {
  color: var(--color-parchment) !important;
  border-color: rgba(217, 184, 129, 0.48) !important;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 190, 0.07),
    0 10px 20px rgba(0, 0, 0, 0.24),
    0 0 16px rgba(217, 184, 129, 0.08);
}

.crafting-rail-button:hover::before,
.crafting-mode-button:hover::before,
.crafting-chip-button:hover::before {
  opacity: 1;
  transform: translateX(48%) rotate(16deg);
}

.crafting-rail-button--active,
.crafting-mode-button--active,
.crafting-chip-button--active {
  color: #07111a !important;
  border-color: rgba(255, 238, 177, 0.84) !important;
  background:
    radial-gradient(circle at 50% -35%, rgba(255, 255, 255, 0.62), transparent 38%),
    linear-gradient(110deg, #facc15, #70e9c0 48%, #60a5fa 82%, #f8e4a0) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -2px 0 rgba(0, 0, 0, 0.12),
    0 10px 24px rgba(96, 165, 250, 0.16),
    0 0 18px rgba(250, 204, 21, 0.20) !important;
}

.crafting-rail-button--soulbound.crafting-rail-button--active {
  color: #06211f !important;
  border-color: rgba(94, 234, 212, 0.72) !important;
  background:
    radial-gradient(circle at 45% -20%, rgba(255, 255, 255, 0.34), transparent 36%),
    linear-gradient(120deg, #fde68a, #14b8a6 52%, #0e7490) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 20px rgba(20, 184, 166, 0.28) !important;
}

@keyframes crafting-quest-focus-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(245, 216, 119, 0.25), 0 0 14px rgba(245, 216, 119, 0.25);
  }
  50% {
    box-shadow: 0 0 0 3px rgba(245, 216, 119, 0.72), 0 0 28px rgba(245, 216, 119, 0.52);
  }
}

.crafting-rail-button--quest-focus {
  animation: crafting-quest-focus-pulse 900ms ease-in-out 3;
  border-color: rgba(245, 216, 119, 0.9) !important;
}

@media (prefers-reduced-motion: reduce) {
  .crafting-rail-button--quest-focus {
    animation: none;
    box-shadow: 0 0 0 3px rgba(245, 216, 119, 0.58), 0 0 20px rgba(245, 216, 119, 0.34) !important;
  }
}

.reduce-motion .crafting-rail-button--quest-focus {
  animation: none;
  box-shadow: 0 0 0 3px rgba(245, 216, 119, 0.58), 0 0 20px rgba(245, 216, 119, 0.34) !important;
}

.crafting-mode-button--active {
  color: #fff7ed !important;
  background:
    radial-gradient(circle at 22% -18%, rgba(255, 255, 255, 0.28), transparent 38%),
    linear-gradient(110deg, #b45309, #f97316 42%, #7c3aed 76%, #2563eb) !important;
  border-color: rgba(253, 186, 116, 0.65) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 10px 24px rgba(249, 115, 22, 0.16) !important;
}

.crafting-chip-button {
  border-radius: 5px !important;
  letter-spacing: 0.05em;
}

.crafting-chip-button--active,
.crafting-qty-input:focus {
  color: #07111a !important;
  border-color: rgba(255, 238, 177, 0.82) !important;
  background:
    radial-gradient(circle at 50% -34%, rgba(255, 255, 255, 0.52), transparent 38%),
    linear-gradient(100deg, #facc15, #86efac 48%, #67e8f9) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 0 14px rgba(103, 232, 249, 0.18) !important;
}

.crafting-qty-input:focus {
  outline: none;
}

.crafting-main-action {
  position: relative;
  overflow: hidden;
  border-radius: 6px !important;
}

.crafting-main-action:not(:disabled):not(.crafting-main-action--busy) {
  color: #07111a !important;
  border-color: rgba(255, 238, 177, 0.90) !important;
  background:
    radial-gradient(circle at 50% -32%, rgba(255, 255, 255, 0.68), transparent 38%),
    linear-gradient(90deg, #facc15 0%, #8bf4c6 42%, #62c7ff 72%, #f8e4a0 100%) !important;
  background-size: 220% 100% !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 -2px 0 rgba(0, 0, 0, 0.14),
    0 12px 26px rgba(96, 199, 255, 0.16),
    0 0 18px rgba(250, 204, 21, 0.18) !important;
  animation: craftingActionGlow 3.2s ease-in-out infinite;
}

.crafting-main-action:not(:disabled):not(.crafting-main-action--busy):hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.crafting-main-action--busy {
  color: #fee2e2 !important;
  border-color: rgba(254, 202, 202, 0.78) !important;
  background: linear-gradient(110deg, #7f1d1d, #dc2626, #f97316) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 22px rgba(239, 68, 68, 0.26) !important;
}

.crafting-main-action:disabled {
  color: rgba(216, 207, 188, 0.52) !important;
  border-color: rgba(148, 163, 184, 0.16) !important;
  background: rgba(7, 12, 22, 0.64) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}

@keyframes craftingActionGlow {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.zone-themed-sidebar {
  width: 230px !important;
  min-width: 230px !important;
  flex-basis: 230px !important;
}

.zone-themed-sidebar .sidebar-tower-section-button {
  border-color: rgba(217, 184, 129, 0.36) !important;
  background:
    linear-gradient(180deg, rgba(21, 30, 49, 0.92), rgba(9, 15, 28, 0.92)) !important;
}

.zone-themed-sidebar .sidebar-tower-section-button > span > span:first-child {
  color: #ffffff !important;
  font-size: 14.5px !important;
  letter-spacing: 0.08em !important;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.78),
    0 0 10px rgba(255, 255, 255, 0.14);
}

.zone-themed-sidebar .sidebar-tower-nav-list {
  margin-left: 0 !important;
  padding-left: 0 !important;
  border-left: 0 !important;
}

.zone-themed-sidebar .sidebar-tower-nav-item {
  position: relative;
  min-height: 38px;
  padding: 9px 12px 9px 18px !important;
  overflow: hidden;
  border: 1px solid rgba(168, 184, 216, 0.18) !important;
  border-radius: 4px !important;
  background:
    radial-gradient(circle at 0% 50%, rgba(255, 255, 255, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(24, 36, 58, 0.92), rgba(10, 17, 31, 0.94)) !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  letter-spacing: 0 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 6px 14px rgba(0, 0, 0, 0.22) !important;
}

.zone-themed-sidebar .sidebar-tower-nav-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 0;
  background: rgba(217, 184, 129, 0.55);
  box-shadow: none;
}

.zone-themed-sidebar .sidebar-tower-nav-item:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.34) !important;
  background:
    radial-gradient(circle at 0% 50%, rgba(255, 255, 255, 0.16), transparent 30%),
    linear-gradient(180deg, rgba(31, 48, 78, 0.96), rgba(12, 21, 38, 0.96)) !important;
  color: #ffffff !important;
}

.zone-themed-sidebar .sidebar-tower-nav-item.text-parchment {
  border-color: rgba(255, 255, 255, 0.46) !important;
  background:
    radial-gradient(circle at 0% 50%, rgba(255, 255, 255, 0.20), transparent 31%),
    linear-gradient(180deg, rgba(38, 57, 90, 0.98), rgba(13, 22, 42, 0.98)) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 14px rgba(255, 255, 255, 0.12) !important;
}

.zone-themed-sidebar .sidebar-tower-nav-item.text-parchment::before {
  width: 4px;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.44);
}

.zone-themed-sidebar .sidebar-tower-nav-item > span > span:first-child {
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 850 !important;
  line-height: 1.1;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.82),
    0 0 10px rgba(255, 255, 255, 0.12);
}

.zone-themed-sidebar .sidebar-nav-locked {
  cursor: help !important;
  opacity: 0.62;
  filter: grayscale(0.65) saturate(0.65);
}

.zone-themed-sidebar .sidebar-nav-locked:hover,
.zone-themed-sidebar .sidebar-nav-locked:focus-visible {
  opacity: 0.86;
  border-color: rgba(217, 184, 129, 0.32) !important;
  color: rgba(255, 255, 255, 0.88) !important;
  background:
    linear-gradient(180deg, rgba(22, 28, 42, 0.74), rgba(9, 13, 22, 0.86)) !important;
}

.sidebar-lock-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid rgba(217, 184, 129, 0.32);
  border-radius: 3px;
  background: rgba(3, 7, 14, 0.78);
  color: rgba(245, 228, 190, 0.82);
  font-family: var(--font-ui, inherit);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.advanced-page-help-anchor {
  position: absolute;
  top: 28px;
  left: min(calc(100vw - 380px), calc(24px + var(--advanced-help-title-width, 14ch) + 14px));
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
}

.advanced-page-help-anchor--cite {
  left: min(calc(100vw - 380px), 250px);
}

.advanced-page-help-anchor::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(240, 208, 120, 0.28), transparent 66%);
  opacity: 0;
  transform: scale(0.76);
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.advanced-page-help-anchor.is-open::before,
.advanced-page-help-anchor:hover::before,
.advanced-page-help-anchor:focus-within::before {
  opacity: 1;
  transform: scale(1);
}

.advanced-page-help-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 184, 129, 0.62);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 242, 198, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(15, 26, 44, 0.94), rgba(5, 9, 18, 0.96));
  color: #fff4d6;
  font-family: var(--font-ui, inherit);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 10px rgba(217, 184, 129, 0.45);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 22px rgba(0, 0, 0, 0.36);
}

.sidebar-advanced-help-button {
  position: relative;
  z-index: 3;
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 184, 129, 0.56);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 244, 214, 0.18), transparent 44%),
    linear-gradient(180deg, rgba(12, 22, 38, 0.96), rgba(4, 8, 16, 0.96));
  color: #fff4d6;
  font-family: var(--font-ui, inherit);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
  text-shadow: 0 0 8px rgba(217, 184, 129, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 10px rgba(217, 184, 129, 0.16);
}

.sidebar-advanced-help-button:hover,
.sidebar-advanced-help-button:focus-visible {
  border-color: rgba(255, 244, 214, 0.86);
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

.advanced-page-help-popover.combat-zone-panel {
  position: absolute;
  display: flex;
  grid-template-columns: none;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
  top: calc(100% + 8px);
  left: 0;
  z-index: 3;
  width: min(360px, calc(100vw - 64px));
  min-width: min(280px, calc(100vw - 64px));
  max-width: calc(100vw - 64px);
  gap: 0;
  padding: 12px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate(0, -6px);
  transition:
    opacity 150ms ease,
    transform 150ms ease;
  border-color: rgba(240, 208, 120, 0.46);
  border-radius: 6px;
  background:
    radial-gradient(circle at 0% 0%, rgba(240, 208, 120, 0.14), transparent 42%),
    linear-gradient(145deg, rgba(9, 16, 30, 0.97), rgba(4, 8, 17, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 16px 46px rgba(0, 0, 0, 0.52),
    0 0 26px rgba(240, 208, 120, 0.14);
}

.advanced-page-help-anchor.is-open .advanced-page-help-popover,
.advanced-page-help-anchor:hover .advanced-page-help-popover,
.advanced-page-help-anchor:focus-within .advanced-page-help-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, 0);
}

.advanced-page-help-popover__eyebrow {
  display: block;
  max-width: 100%;
  min-width: 0;
  color: rgb(var(--brass-rgb));
  font-family: var(--font-ui, inherit);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.advanced-page-help-popover h2 {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 4px 0 0;
  color: var(--color-parchment);
  font-family: var(--font-serif, serif);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.advanced-page-help-popover p {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 7px 0 0;
  color: rgba(226, 234, 248, 0.88);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.advanced-page-help-popover__list {
  display: grid;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 8px;
}

.advanced-page-help-popover__item {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 7px;
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.24);
}

.advanced-page-help-popover__item strong,
.advanced-page-help-popover__item span {
  display: block;
  max-width: 100%;
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.advanced-page-help-popover__item strong {
  color: #fff2c8;
  font-family: var(--font-ui, inherit);
  font-weight: 900;
}

.advanced-page-help-popover__item span {
  margin-top: 3px;
  color: rgba(185, 199, 222, 0.84);
}

.advanced-page-help-popover__actions {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(217, 184, 129, 0.16);
}

.advanced-page-help-popover__got-it {
  align-self: center;
  min-width: 86px;
  min-height: 30px;
  border: 1px solid rgba(240, 208, 120, 0.62);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(217, 184, 129, 0.95), rgba(173, 132, 57, 0.95));
  color: #120b03;
  font-family: var(--font-ui, inherit);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 8px 18px rgba(0, 0, 0, 0.28);
}

.advanced-page-help-popover__got-it:hover,
.advanced-page-help-popover__got-it:focus-visible {
  border-color: rgba(255, 244, 214, 0.9);
  filter: brightness(1.08);
  outline: none;
}

.advanced-page-help-button:hover,
.advanced-page-help-button:focus-visible {
  border-color: rgba(255, 244, 214, 0.86);
  color: #ffffff;
  outline: none;
  transform: translateY(-1px);
}

.advanced-feature-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(92, 72, 116, 0.22), transparent 34%),
    rgba(1, 3, 8, 0.78);
  backdrop-filter: blur(4px);
}

.advanced-feature-modal.combat-zone-panel {
  display: block;
  width: min(560px, calc(100vw - 32px));
  max-height: min(680px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px;
  border-color: rgba(217, 184, 129, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(10, 18, 32, 0.98), rgba(7, 12, 23, 0.98)),
    radial-gradient(circle at 82% 16%, rgba(217, 184, 129, 0.16), transparent 34%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 215, 0.04),
    0 28px 90px rgba(0, 0, 0, 0.62);
}

.advanced-feature-modal__eyebrow {
  color: rgb(var(--brass-rgb));
  font-family: var(--font-ui, inherit);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.advanced-feature-modal__header h2 {
  margin: 6px 0 0;
  color: var(--color-parchment);
  font-family: var(--font-serif, serif);
  font-size: 30px;
  font-weight: 800;
  line-height: 1.05;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.72);
}

.advanced-feature-modal__header p {
  margin: 12px 0 0;
  color: rgba(222, 232, 250, 0.84);
  font-size: 13px;
  line-height: 1.55;
}

.advanced-feature-modal__highlights,
.advanced-feature-modal__requirements {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.advanced-feature-highlight,
.advanced-feature-requirement {
  position: relative;
  padding: 12px;
  border: 1px solid rgba(217, 184, 129, 0.2);
  border-radius: 6px;
  background: rgba(5, 11, 22, 0.62);
}

.advanced-feature-requirement--complete {
  border-color: rgba(118, 232, 168, 0.36);
  background: rgba(30, 95, 61, 0.15);
}

.advanced-feature-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  color: var(--color-parchment);
  font-size: 13px;
}

.advanced-feature-row strong {
  min-width: 0;
  color: #fff6d8;
  font-family: var(--font-ui, inherit);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.advanced-feature-row span {
  flex: none;
  color: rgba(245, 228, 190, 0.82);
  font-family: var(--font-ui, inherit);
  font-size: 12px;
  font-weight: 800;
}

.advanced-feature-highlight p,
.advanced-feature-requirement p {
  margin: 6px 0 0;
  color: rgba(185, 199, 222, 0.82);
  font-size: 12px;
  line-height: 1.45;
}

.advanced-feature-meter {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.2);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
}

.advanced-feature-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(217, 184, 129, 0.92), rgba(153, 246, 228, 0.84));
}

.advanced-feature-action {
  width: 100%;
  margin-top: 10px;
  min-height: 34px;
}

.advanced-feature-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.leaderboard-paused-modal.combat-zone-panel {
  position: relative;
  width: min(640px, calc(100vw - 32px));
  border-color: rgba(217, 184, 129, 0.52);
  background:
    radial-gradient(circle at 16% 0%, rgba(217, 184, 129, 0.13), transparent 36%),
    linear-gradient(145deg, rgba(10, 18, 32, 0.99), rgba(7, 12, 23, 0.99));
}

.leaderboard-paused-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(217, 184, 129, 0.36);
  border-radius: 7px;
  background: rgba(4, 8, 16, 0.72);
  color: rgba(255, 246, 220, 0.86);
  font-size: 22px;
  line-height: 1;
}

.leaderboard-paused-modal__close:hover,
.leaderboard-paused-modal__close:focus-visible {
  border-color: rgba(255, 230, 174, 0.82);
  color: #fff7df;
  outline: none;
}

.leaderboard-paused-modal__lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  border: 1px solid rgba(217, 184, 129, 0.5);
  border-radius: 9px;
  background: rgba(217, 184, 129, 0.09);
  box-shadow:
    inset 0 0 18px rgba(217, 184, 129, 0.08),
    0 8px 24px rgba(0, 0, 0, 0.28);
  font-size: 22px;
}

.leaderboard-paused-modal__header {
  padding-right: 48px;
}

.leaderboard-paused-modal__facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
}

.leaderboard-paused-modal__fact {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px;
  border: 1px solid rgba(217, 184, 129, 0.2);
  border-radius: 6px;
  background: rgba(5, 11, 22, 0.68);
  color: rgba(236, 226, 203, 0.9);
  font-family: var(--font-ui, inherit);
  font-size: 11px;
  line-height: 1.3;
}

.leaderboard-paused-modal__fact > span {
  flex: none;
  color: rgb(var(--brass-rgb));
  font-size: 14px;
}

.leaderboard-paused-page {
  background:
    radial-gradient(circle at 50% 34%, rgba(217, 184, 129, 0.08), transparent 28%),
    linear-gradient(160deg, var(--color-obsidian-black), var(--color-painted-indigo));
}

.leaderboard-paused-page__card {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(420px, 100%);
  padding: 28px;
  border-color: rgba(217, 184, 129, 0.36);
  color: var(--color-parchment);
}

.leaderboard-paused-page__card > span {
  font-size: 26px;
}

.leaderboard-paused-page__card > strong {
  font-family: var(--font-serif, serif);
  font-size: 24px;
}

.leaderboard-paused-page__card > small {
  color: rgba(222, 232, 250, 0.72);
  font-family: var(--font-ui, inherit);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 767px) {
  .advanced-page-help-anchor {
    top: 16px;
    right: 14px;
    left: auto;
  }

  .advanced-page-help-popover.combat-zone-panel {
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    width: min(330px, calc(100vw - 28px));
  }

  .advanced-feature-modal-backdrop {
    align-items: flex-start;
    padding: 14px;
    padding-top: 72px;
  }

  .advanced-feature-modal.combat-zone-panel {
    max-height: calc(100vh - 92px);
  }

  .leaderboard-paused-modal__facts {
    grid-template-columns: 1fr;
  }

  .leaderboard-paused-modal__fact {
    min-height: 42px;
  }
}

.sidebar-character-card {
  position: relative;
  width: min(258px, calc(100% + 18px));
  margin: 0 auto;
  padding: 12px 12px 13px;
  overflow: hidden;
  border: 1px solid rgba(172, 195, 207, 0.34);
  border-radius: 9px;
  background:
    radial-gradient(circle at 22% 10%, rgba(151, 176, 188, 0.23), transparent 34%),
    radial-gradient(circle at 95% 92%, rgba(134, 82, 98, 0.18), transparent 44%),
    linear-gradient(145deg, rgba(24, 34, 52, 0.99) 0%, rgba(13, 19, 32, 0.99) 58%, rgba(20, 19, 34, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(235, 246, 250, 0.12),
    inset 0 -1px 0 rgba(88, 105, 124, 0.16),
    0 18px 38px rgba(0, 0, 0, 0.44);
}

.sidebar-character-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 24%);
  opacity: 0.9;
}

.sidebar-character-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border: 1px solid rgba(109, 130, 152, 0.25);
  border-radius: 8px;
}

.sidebar-character-card > * {
  position: relative;
  z-index: 1;
}

.sidebar-character-card__head {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.sidebar-character-card__portrait {
  position: relative;
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.50));
  overflow: visible;
}

.sidebar-character-card__portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: 8px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    inset 0 -24px 26px rgba(0, 0, 0, 0.24);
}

.sidebar-character-card__identity {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-character-card__name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.sidebar-character-card__name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: var(--color-parchment, #efe7d0);
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.08;
  text-overflow: ellipsis;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.78);
  white-space: nowrap;
}

.sidebar-character-card__meta {
  overflow: hidden;
  color: #9fc2cf;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.05;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-character-card__level-inline {
  display: none;
}

.sidebar-character-card__meta span {
  display: none;
}

.sidebar-character-card__level-badge {
  position: absolute;
  left: -5px;
  bottom: -7px;
  z-index: 6;
  display: flex;
  width: 54px;
  min-height: 34px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  border: 1px solid rgba(223, 190, 124, 0.92);
  border-radius: 7px 7px 11px 7px;
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 236, 170, 0.28), transparent 55%),
    linear-gradient(150deg, rgba(43, 32, 25, 0.99), rgba(8, 11, 17, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 205, 0.18),
    0 6px 18px rgba(0, 0, 0, 0.72),
    0 0 15px rgba(217, 184, 129, 0.30);
}

.sidebar-character-card__level-label {
  color: #d9b881;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.82);
}

.sidebar-character-card__level-number {
  color: #fff2c8;
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.82);
}

.sidebar-character-card__subclass {
  position: relative;
  flex: 0 0 auto;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(216, 183, 113, 0.66);
  border-radius: 5px;
  background: rgba(6, 10, 18, 0.94);
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 196, 0.16),
    0 0 13px rgba(217, 184, 129, 0.20);
}

.sidebar-character-card__subclass img {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
}

.sidebar-character-card__subclass::after {
  content: attr(data-subclass);
  position: absolute;
  right: 0;
  bottom: calc(100% + 7px);
  z-index: 12;
  max-width: 160px;
  padding: 6px 8px;
  pointer-events: none;
  border: 1px solid rgba(198, 107, 74, 0.70);
  border-radius: 5px;
  background: rgba(5, 10, 18, 0.98);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.62);
  color: #f5dfab;
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  opacity: 0;
  text-align: center;
  text-transform: uppercase;
  transform: translateY(3px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.sidebar-character-card__subclass:hover::after,
.sidebar-character-card__subclass:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.sidebar-character-card__title {
  overflow: hidden;
  color: rgba(229, 233, 238, 0.82);
  font-family: var(--font-serif);
  font-size: 12px;
  font-style: italic;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-character-card__divider {
  height: 1px;
  margin: 11px 0 10px;
  background: linear-gradient(90deg, transparent, rgba(156, 178, 196, 0.33), transparent);
}

.sidebar-character-card__vitals {
  display: grid;
  gap: 10px;
}

.sidebar-character-card__vital > div:last-child {
  height: 10px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(8, 12, 20, 0.98), rgba(2, 4, 8, 0.98)) !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.82),
    0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

.sidebar-character-card__vital:first-child > div:last-child {
  height: 13px;
}

.sidebar-character-card__split-vitals {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 8px;
}

.sidebar-character-card__split-vitals .sidebar-character-card__vital > div:first-child {
  font-size: 7px;
  letter-spacing: 0.08em;
}

.sidebar-character-card {
  width: min(268px, calc(100% + 18px));
  padding: 10px 10px 12px;
  overflow: visible;
  border: 1px solid rgba(126, 135, 153, 0.72);
  border-radius: 6px;
  background:
    radial-gradient(circle at 20% 12%, rgba(120, 154, 208, 0.18), transparent 34%),
    radial-gradient(circle at 92% 88%, rgba(148, 58, 110, 0.16), transparent 42%),
    linear-gradient(150deg, rgba(18, 25, 40, 0.98), rgba(8, 12, 22, 0.99) 58%, rgba(17, 18, 31, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(230, 238, 255, 0.16),
    inset 0 0 0 1px rgba(12, 16, 26, 0.9),
    0 0 0 2px rgba(4, 7, 13, 0.82),
    0 16px 34px rgba(0, 0, 0, 0.5);
}

.sidebar-character-card::before {
  inset: -1px;
  border-radius: 7px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%);
  opacity: 0.78;
}

.sidebar-character-card::after {
  inset: 4px;
  border-color: rgba(203, 213, 225, 0.13);
  border-radius: 4px;
}

.sidebar-character-card__head {
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.sidebar-character-card__portrait {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.64));
}

.sidebar-character-card__portrait::before {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  border: 1px solid rgba(210, 182, 126, 0.52);
  border-radius: 9px;
  background:
    linear-gradient(145deg, rgba(12, 16, 26, 0.96), rgba(31, 35, 48, 0.86)),
    radial-gradient(circle at 50% 8%, rgba(255, 235, 174, 0.18), transparent 48%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 245, 205, 0.08),
    0 0 14px rgba(0, 0, 0, 0.55);
}

.sidebar-character-card__portrait::after {
  inset: 3px;
  border-radius: 7px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -30px 28px rgba(0, 0, 0, 0.28);
}

.sidebar-character-card__level-badge {
  left: -6px;
  bottom: -7px;
  width: 50px;
  min-height: 34px;
  border-radius: 6px 6px 11px 6px;
}

.sidebar-character-card__level-number {
  font-size: 17px;
}

.sidebar-character-card__identity {
  gap: 6px;
  padding-top: 2px;
}

.sidebar-character-card__name {
  color: #fff0c4;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.01em;
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.9),
    0 0 10px rgba(217, 184, 129, 0.24);
}

.sidebar-character-card__meta {
  font-size: 9px;
  letter-spacing: 0.12em;
  text-shadow: 0 0 8px currentColor;
}

.sidebar-character-card__title {
  color: rgba(239, 231, 208, 0.88);
  font-size: 12px;
  font-style: normal;
}

.sidebar-character-card__divider {
  margin: 10px 0 9px;
  background: linear-gradient(90deg, transparent, rgba(217, 184, 129, 0.42), transparent);
}

.sidebar-character-card__vitals {
  gap: 7px;
}

.sidebar-character-card__vital-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar-character-card__vital-label span:last-child {
  color: rgba(245, 241, 222, 0.92);
  font-family: var(--font-serif);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.sidebar-character-card__vital-track {
  position: relative;
  height: 17px !important;
  overflow: hidden;
  border: 1px solid;
  border-radius: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(11, 16, 28, 0.98), rgba(3, 6, 12, 0.98)) !important;
}

.sidebar-character-card__vital-track::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.20), transparent 36%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
  mix-blend-mode: screen;
}

.sidebar-character-card__vital-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 520ms cubic-bezier(0.22, 0.8, 0.22, 1);
}

.sidebar-character-card__vital--hp .sidebar-character-card__vital-track,
.sidebar-character-card__vital--mana .sidebar-character-card__vital-track {
  height: 19px !important;
}

.sidebar-character-card__vital--meter {
  margin-top: 2px;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-label {
  justify-content: center;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-label span:first-child {
  color: var(--class-meter-color) !important;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-shadow:
    0 0 8px var(--class-meter-border),
    0 1px 6px rgba(0, 0, 0, 0.85);
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-label span:last-child {
  position: absolute;
  right: 12px;
  color: var(--class-meter-color);
  font-family: var(--font-ui);
  font-size: 9px;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-track {
  height: 28px !important;
  border-radius: 4px;
  border-color: var(--class-meter-border) !important;
  background:
    radial-gradient(circle at 10% 50%, color-mix(in srgb, var(--class-meter-color) 22%, transparent), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(180deg, rgba(22, 12, 37, 0.98), rgba(6, 5, 14, 0.99)) !important;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.82),
    0 0 18px var(--class-meter-border),
    0 0 34px color-mix(in srgb, var(--class-meter-color) 34%, transparent) !important;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-fill {
  transition: width 130ms linear;
}

.sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-track {
  animation: sidebar-meter-aura 1.35s ease-in-out infinite;
}

.sidebar-character-card__buff-chip {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin-top: 9px;
  padding: 6px 7px;
  border: 1px solid;
  border-radius: 4px;
  background:
    radial-gradient(circle at 8% 50%, rgba(255, 255, 255, 0.10), transparent 35%),
    linear-gradient(135deg, rgba(7, 10, 19, 0.96), rgba(20, 15, 31, 0.94));
}

.sidebar-character-card__buff-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid;
  border-radius: 3px;
  background: rgba(2, 5, 12, 0.92);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sidebar-character-card__buff-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-character-card__buff-text strong {
  overflow: hidden;
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-size: 12px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-character-card__buff-text small {
  overflow: hidden;
  color: rgba(203, 213, 225, 0.82);
  font-size: 9px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-character-card__buff-time {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 0 10px currentColor;
}

@keyframes sidebar-meter-aura {
  0%, 100% {
    filter: brightness(1);
    box-shadow:
      inset 0 1px 2px rgba(0, 0, 0, 0.82),
      0 0 16px var(--class-meter-border),
      0 0 28px color-mix(in srgb, var(--class-meter-color) 30%, transparent) !important;
  }
  50% {
    filter: brightness(1.18);
    box-shadow:
      inset 0 1px 2px rgba(0, 0, 0, 0.82),
      0 0 24px var(--class-meter-border),
      0 0 44px color-mix(in srgb, var(--class-meter-color) 48%, transparent) !important;
  }
}

.sidebar-character-card {
  display: grid;
  grid-template-columns: 98px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 7px;
  align-items: start;
}

.sidebar-character-card__head {
  display: contents;
}

.sidebar-character-card__portrait {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 98px;
  height: 98px;
  align-self: start;
}

.sidebar-character-card__identity {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  align-self: end;
}

.sidebar-character-card__divider {
  display: none;
}

.sidebar-character-card__vitals {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  gap: 5px;
}

.sidebar-character-card__portrait,
.sidebar-character-card__identity,
.sidebar-character-card__vitals,
.sidebar-character-card__buff-chip {
  position: relative;
  z-index: 1;
}

.sidebar-character-card__name {
  font-size: 16px;
}

.sidebar-character-card__title {
  font-size: 11px;
}

.sidebar-character-card__vital-label {
  margin-bottom: 1px;
  font-size: 7px;
  letter-spacing: 0.04em;
}

.sidebar-character-card__vital-label span:last-child {
  font-size: 8px;
}

.sidebar-character-card__vital-track,
.sidebar-character-card__vital--hp .sidebar-character-card__vital-track,
.sidebar-character-card__vital--mana .sidebar-character-card__vital-track {
  height: 13px !important;
}

.sidebar-character-card__vital--meter {
  margin-top: 1px;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-label {
  justify-content: space-between;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-label span:first-child {
  font-size: 10px;
  letter-spacing: 0.07em;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-label span:last-child {
  position: static;
  font-size: 8px;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-track {
  height: 17px !important;
}

.sidebar-character-card__buff-chip {
  grid-column: 1 / -1;
}

.sidebar-character-card {
  grid-template-columns: 82px minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 6px;
}

.sidebar-character-card__portrait {
  width: 82px;
  height: 82px;
}

.sidebar-character-card__portrait::before {
  inset: -3px;
}

.sidebar-character-card__portrait::after {
  inset: 2px;
}

.sidebar-character-card__level-badge {
  left: -5px;
  bottom: -6px;
  width: 43px;
  min-height: 30px;
}

.sidebar-character-card__level-label {
  font-size: 7px;
}

.sidebar-character-card__level-number {
  font-size: 15px;
}

.sidebar-character-card__identity {
  gap: 4px;
  padding-top: 0;
}

.sidebar-character-card__name {
  font-size: 15px;
}

.sidebar-character-card__title {
  display: none;
}

.sidebar-character-card__vitals {
  gap: 4px;
}

.sidebar-character-card__vital-label {
  font-size: 7px;
  margin-bottom: 1px;
}

.sidebar-character-card__vital-label span:last-child {
  font-size: 8px;
}

.sidebar-character-card__vital-track,
.sidebar-character-card__vital--hp .sidebar-character-card__vital-track,
.sidebar-character-card__vital--mana .sidebar-character-card__vital-track {
  height: 12px !important;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-label span:first-child {
  font-size: 9px;
  letter-spacing: 0.05em;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-track {
  height: 16px !important;
}

.sidebar-character-card__buff-chip {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 7px;
  margin-top: 4px;
  padding: 5px 6px;
}

.sidebar-character-card__subclass-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.42);
  border-radius: 3px;
  background: rgba(2, 5, 12, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 10px rgba(217, 184, 129, 0.18);
}

.sidebar-character-card__subclass-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-character-card__buff-text {
  flex: 1 1 auto;
}

.sidebar-character-card {
  grid-template-columns: 76px minmax(0, 1fr);
  row-gap: 7px;
  min-height: 174px;
}

.sidebar-character-card__portrait {
  width: 76px;
  height: 76px;
}

.sidebar-character-card__portrait::before {
  inset: -2px;
}

.sidebar-character-card__portrait::after {
  inset: 2px;
}

.sidebar-character-card__level-badge {
  left: 4px;
  bottom: 4px;
  width: 36px;
  height: 32px;
  min-height: 32px;
  border-radius: 5px;
  transform: none;
  z-index: 5;
}

.sidebar-character-card__level-label,
.sidebar-character-card__level-number {
  line-height: 1;
}

.sidebar-character-card__level-label {
  font-size: 7px;
  letter-spacing: 0.04em;
}

.sidebar-character-card__level-number {
  font-size: 15px;
}

.sidebar-character-card__vital-label,
.sidebar-character-card__vital--meter .sidebar-character-card__vital-label,
.sidebar-character-card__vital--meter .sidebar-character-card__vital-label span:first-child,
.sidebar-character-card__vital-label span:first-child,
.sidebar-character-card__vital-label span:last-child,
.sidebar-character-card__vital--meter .sidebar-character-card__vital-label span:last-child {
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.05em;
}

.sidebar-character-card__vital-track,
.sidebar-character-card__vital--hp .sidebar-character-card__vital-track,
.sidebar-character-card__vital--mana .sidebar-character-card__vital-track,
.sidebar-character-card__vital--meter .sidebar-character-card__vital-track {
  height: 12px !important;
}

.sidebar-character-card__buff-chip {
  height: 42px;
  min-height: 42px;
  box-sizing: border-box;
  overflow: hidden;
}

.sidebar-character-card__buff-chip.is-empty {
  opacity: 0;
  pointer-events: none;
}

.sidebar-character-card__buff-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-character-card {
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: 30px 76px 42px;
  column-gap: 10px;
  row-gap: 6px;
  min-height: 178px;
}

.sidebar-character-card__identity {
  grid-column: 1 / -1;
  grid-row: 1;
  align-self: center;
  gap: 2px;
  padding: 0 2px;
}

.sidebar-character-card__name {
  font-size: 14px;
  line-height: 1;
}

.sidebar-character-card__meta {
  font-size: 8px;
  line-height: 1.05;
  letter-spacing: 0.08em;
}

.sidebar-character-card__portrait {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
}

.sidebar-character-card__vitals {
  grid-column: 2;
  grid-row: 2;
  align-content: center;
  align-self: stretch;
  gap: 5px;
}

.sidebar-character-card__buff-chip {
  grid-column: 1 / -1;
  grid-row: 3;
  margin-top: 0;
}

.sidebar-character-card__buff-chip.is-active {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
}

.sidebar-character-card__buff-chip.is-quick {
  display: block;
  padding: 4px 5px;
  border-color: rgba(217, 184, 129, 0.24);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.08), transparent 35%),
    linear-gradient(135deg, rgba(4, 8, 16, 0.96), rgba(14, 18, 31, 0.94));
}

.sidebar-character-card .sidebar-character-card__identity {
  padding-right: 52px;
}

.sidebar-character-card__stats-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 18;
  display: inline-grid;
  min-width: 38px;
  height: 20px;
  place-items: center;
  border: 1px solid rgba(217, 184, 129, 0.42);
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 184, 129, 0.18), transparent 70%),
    rgba(5, 9, 18, 0.82);
  color: #d9b881;
  cursor: help;
  font: 900 8px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 242, 202, 0.08),
    0 0 10px rgba(217, 184, 129, 0.16);
}

.sidebar-character-card__stats-chip-label {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.sidebar-character-card__stats-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  width: 238px;
  max-width: calc(100vw - 32px);
  gap: 7px;
  padding: 9px;
  border: 1px solid rgba(217, 184, 129, 0.48);
  border-radius: 6px;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 184, 129, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(13, 19, 33, 0.99), rgba(3, 7, 15, 0.99) 74%);
  color: rgba(255, 247, 214, 0.94);
  font: 800 10px/1.2 var(--font-body, inherit);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 214, 0.08),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 18px 34px rgba(0, 0, 0, 0.64),
    0 0 20px rgba(217, 184, 129, 0.16);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(5px) scale(0.985);
  transform-origin: top right;
  transition:
    opacity 0.12s ease,
    visibility 0.12s ease,
    transform 0.12s ease;
}

.sidebar-character-card__stats-panel::before {
  content: "";
  position: absolute;
  top: -5px;
  right: 13px;
  width: 9px;
  height: 9px;
  border-left: 1px solid rgba(217, 184, 129, 0.42);
  border-top: 1px solid rgba(217, 184, 129, 0.42);
  background: rgba(13, 19, 33, 0.99);
  transform: rotate(45deg);
}

.sidebar-character-card__stats-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 1px 5px;
  border-bottom: 1px solid rgba(217, 184, 129, 0.22);
  color: #f4dfab;
  font-family: var(--font-ui, inherit);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar-character-card__stats-panel-head span:last-child {
  color: rgba(178, 198, 213, 0.68);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.sidebar-character-card__stats-section {
  display: grid;
  gap: 4px;
}

.sidebar-character-card__stats-section-title {
  color: rgba(217, 184, 129, 0.86);
  font-family: var(--font-ui, inherit);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.sidebar-character-card__stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
}

.sidebar-character-card__stats-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 4px 5px;
  border: 1px solid rgba(109, 130, 152, 0.24);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    rgba(5, 10, 20, 0.64);
}

.sidebar-character-card__stats-row span {
  min-width: 0;
  overflow: hidden;
  color: rgba(178, 198, 213, 0.78);
  font-family: var(--font-ui, inherit);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.sidebar-character-card__stats-row strong {
  flex-shrink: 0;
  color: #fff0b8;
  font-family: var(--font-body, inherit);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.sidebar-character-card__stats-chip:hover .sidebar-character-card__stats-panel,
.sidebar-character-card__stats-chip:focus-visible .sidebar-character-card__stats-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sidebar-character-card .sidebar-character-card__level-badge {
  position: absolute;
  top: 129px;
  left: 18px;
  z-index: 4;
  display: flex;
  width: 60px;
  height: 24px;
  min-height: 24px;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transform: none;
  border-radius: 4px;
}

.sidebar-character-card .sidebar-character-card__level-label {
  font-size: 7px;
  letter-spacing: 0.06em;
}

.sidebar-character-card .sidebar-character-card__level-number {
  font-size: 14px;
}

.sidebar-character-card__quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  height: 100%;
}

.sidebar-character-card__quick-slot {
  position: relative;
  display: grid;
  min-width: 0;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--quick-color) 58%, rgba(217, 184, 129, 0.22));
  border-radius: 4px;
  background:
    radial-gradient(circle at 50% 20%, color-mix(in srgb, var(--quick-color) 18%, transparent), transparent 45%),
    linear-gradient(180deg, rgba(10, 15, 27, 0.96), rgba(3, 6, 12, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 0 10px color-mix(in srgb, var(--quick-color) 20%, transparent);
}

.sidebar-character-card__quick-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  filter: saturate(1.08) contrast(1.05);
}

.sidebar-character-card__quick-glyph {
  color: var(--quick-color);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-shadow: 0 0 8px var(--quick-color);
}

.sidebar-character-card__quick-label,
.sidebar-character-card__quick-value {
  position: absolute;
  z-index: 2;
  display: block;
  font-family: var(--font-ui);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}

.sidebar-character-card__quick-label {
  top: 3px;
  left: 3px;
  color: color-mix(in srgb, var(--quick-color) 78%, white);
  font-size: 6px;
  letter-spacing: 0.05em;
}

.sidebar-character-card__quick-value {
  right: 3px;
  bottom: 3px;
  max-width: calc(100% - 6px);
  overflow: hidden;
  color: #fff7d6;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-fill {
  position: relative;
  overflow: hidden;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.78) 48%, transparent 100%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.34), transparent 56%);
  mix-blend-mode: screen;
  transform: translateX(-130%);
}

.sidebar-character-card,
.sidebar-character-card__buff-chip,
.sidebar-character-card__quick-slot {
  user-select: none;
}

.sidebar-character-card {
  grid-template-rows: 30px 84px 54px;
  min-height: 202px;
}

.sidebar-character-card__vitals {
  align-content: start;
  gap: 8px;
  padding-top: 2px;
}

.sidebar-character-card__vital-label {
  margin-bottom: 3px;
}

.sidebar-character-card__vital-track,
.sidebar-character-card__vital--hp .sidebar-character-card__vital-track,
.sidebar-character-card__vital--mana .sidebar-character-card__vital-track,
.sidebar-character-card__vital--meter .sidebar-character-card__vital-track {
  height: 10px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 38%),
    linear-gradient(180deg, rgba(18, 23, 36, 0.98), rgba(8, 11, 20, 0.99)) !important;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.9),
    0 0 7px color-mix(in srgb, currentColor 18%, transparent) !important;
}

.sidebar-character-card__vital-track::after {
  opacity: 0.45;
}

.sidebar-character-card__vital-fill {
  filter: saturate(0.78) brightness(0.84);
  opacity: 0.94;
}

.sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-fill {
  filter: saturate(0.92) brightness(0.96);
}

.sidebar-character-card__buff-chip {
  height: 54px;
  min-height: 54px;
}

.sidebar-character-card__buff-chip.is-active {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  min-height: 54px;
}

.sidebar-character-card__buff-chip.is-quick {
  padding: 5px 6px;
}

.sidebar-character-card__quick-grid {
  place-items: center;
  gap: 6px;
}

.sidebar-character-card__quick-slot {
  width: min(100%, 44px);
  aspect-ratio: 1;
  cursor: help;
}

.sidebar-character-card__quick-slot > * {
  pointer-events: none;
}

.sidebar-character-card__quick-slot.has-image {
  border-color: color-mix(in srgb, var(--quick-color) 42%, rgba(217, 184, 129, 0.28));
}

.sidebar-character-card__quick-slot.has-image img {
  opacity: 1;
  filter: saturate(1) contrast(1);
}

.sidebar-character-card__quick-glyph {
  font-size: 11px;
}

.sidebar-character-card {
  grid-template-rows: 30px 104px 54px;
  min-height: 222px;
}

.sidebar-character-card__vitals {
  align-content: center;
  gap: 7px;
  padding-top: 0;
}

.sidebar-character-card__vital {
  min-width: 0;
  padding: 4px 5px 5px;
  border: 1px solid rgba(109, 130, 152, 0.22);
  border-radius: 4px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 42%),
    linear-gradient(180deg, rgba(7, 11, 21, 0.78), rgba(3, 6, 13, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 1px 5px rgba(0, 0, 0, 0.22);
}

.sidebar-character-card__vital--hp {
  border-color: rgba(20, 184, 166, 0.26);
}

.sidebar-character-card__vital--mana {
  border-color: rgba(56, 143, 194, 0.24);
}

.sidebar-character-card__vital--meter {
  border-color: color-mix(in srgb, var(--class-meter-color) 28%, rgba(217, 184, 129, 0.20));
}

.sidebar-character-card__vital-label {
  margin-bottom: 4px;
}

.sidebar-character-card__vital-track,
.sidebar-character-card__vital--hp .sidebar-character-card__vital-track,
.sidebar-character-card__vital--mana .sidebar-character-card__vital-track,
.sidebar-character-card__vital--meter .sidebar-character-card__vital-track {
  height: 8px !important;
  border-color: rgba(217, 184, 129, 0.13) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 38%),
    linear-gradient(180deg, rgba(5, 8, 16, 0.98), rgba(1, 3, 8, 0.99)) !important;
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.92),
    0 0 5px rgba(0, 0, 0, 0.35) !important;
}

.sidebar-character-card__vital-fill {
  filter: saturate(0.68) brightness(0.74);
  opacity: 0.9;
  box-shadow: none !important;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-fill {
  overflow: visible;
}

.sidebar-character-card__vital--meter .sidebar-character-card__vital-fill::after {
  inset: -3px -6px -3px auto;
  width: 42px;
  opacity: 0;
  background:
    linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--class-meter-color) 22%, transparent) 42%, rgba(255, 255, 255, 0.72) 82%, transparent 100%);
  filter: blur(1px);
  transform: none;
}

.sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-fill {
  filter: saturate(0.82) brightness(0.86);
}

.sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-fill::after {
  opacity: 1;
  animation: sidebar-meter-comet-tail 0.72s ease-in-out infinite;
}

.sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-track {
  animation: sidebar-meter-active-track 1.1s ease-in-out infinite;
}

.sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-fill {
  animation: sidebar-meter-active-fill 0.9s ease-in-out infinite;
}

.sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-label span {
  text-shadow:
    0 0 7px var(--class-meter-border),
    0 0 14px var(--class-meter-color),
    0 1px 5px rgba(0, 0, 0, 0.9);
}

.sidebar-character-card__buff-time {
  animation: sidebar-meter-active-time 1.1s ease-in-out infinite;
}

@keyframes sidebar-meter-active-track {
  0%, 100% {
    filter: brightness(1.05);
    box-shadow:
      inset 0 1px 2px rgba(0, 0, 0, 0.82),
      0 0 13px var(--class-meter-border),
      0 0 23px color-mix(in srgb, var(--class-meter-color) 34%, transparent) !important;
  }
  50% {
    filter: brightness(1.14) saturate(1.06);
    box-shadow:
      inset 0 1px 2px rgba(0, 0, 0, 0.82),
      0 0 22px var(--class-meter-border),
      0 0 40px color-mix(in srgb, var(--class-meter-color) 58%, transparent) !important;
  }
}

@keyframes sidebar-meter-active-fill {
  0%, 100% {
    filter: brightness(1) saturate(1);
  }
  50% {
    filter: brightness(1.12) saturate(1.08);
  }
}

@keyframes sidebar-meter-active-sweep {
  from {
    transform: translateX(-130%);
  }
  to {
    transform: translateX(130%);
  }
}

@keyframes sidebar-meter-comet-tail {
  0%, 100% {
    opacity: 0.72;
    filter: blur(1px) brightness(0.95);
  }
  50% {
    opacity: 1;
    filter: blur(1.4px) brightness(1.16);
  }
}

.sidebar-character-card {
  border-color: rgba(125, 211, 252, 0.38);
  background:
    radial-gradient(circle at 16% 8%, rgba(45, 212, 191, 0.18), transparent 34%),
    radial-gradient(circle at 92% 86%, rgba(168, 85, 247, 0.18), transparent 44%),
    linear-gradient(145deg, rgba(28, 42, 66, 0.99) 0%, rgba(15, 28, 52, 0.99) 55%, rgba(28, 27, 58, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(235, 246, 250, 0.18),
    inset 0 -1px 0 rgba(125, 211, 252, 0.16),
    0 16px 34px rgba(0, 0, 0, 0.38),
    0 0 24px rgba(56, 189, 248, 0.10);
}

.sidebar-character-card::before {
  opacity: 1;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.11), transparent 35%),
    linear-gradient(180deg, rgba(125, 211, 252, 0.07), transparent 27%);
}

.sidebar-character-card__vital {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(180deg, rgba(16, 27, 48, 0.90), rgba(8, 15, 30, 0.86));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 1px 7px rgba(0, 0, 0, 0.24);
}

.sidebar-character-card__vital--hp {
  border-color: rgba(45, 212, 191, 0.36);
}

.sidebar-character-card__vital--mana {
  border-color: rgba(56, 189, 248, 0.36);
}

.sidebar-character-card__vital--meter {
  border-color: color-mix(in srgb, var(--class-meter-color) 44%, rgba(217, 184, 129, 0.24));
}

.sidebar-character-card__vital-track,
.sidebar-character-card__vital--hp .sidebar-character-card__vital-track,
.sidebar-character-card__vital--mana .sidebar-character-card__vital-track,
.sidebar-character-card__vital--meter .sidebar-character-card__vital-track {
  height: 9px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 40%),
    linear-gradient(180deg, rgba(10, 17, 32, 0.98), rgba(2, 5, 13, 0.99)) !important;
}

.sidebar-character-card__vital-fill {
  filter: saturate(0.98) brightness(0.92);
  opacity: 1;
}

.sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-fill {
  filter: saturate(1.08) brightness(1);
}

.sidebar-character-card__buff-chip.is-quick {
  background:
    radial-gradient(circle at 20% 0%, rgba(125, 211, 252, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(10, 18, 34, 0.97), rgba(20, 23, 45, 0.95));
}

.sidebar-character-card__buff-chip.is-active {
  background:
    radial-gradient(circle at 10% 50%, color-mix(in srgb, var(--class-meter-color) 24%, transparent), transparent 38%),
    linear-gradient(135deg, rgba(12, 18, 34, 0.97), rgba(28, 22, 48, 0.95));
}

.sidebar-character-card__quick-slot {
  background:
    radial-gradient(circle at 50% 12%, color-mix(in srgb, var(--quick-color) 26%, transparent), transparent 48%),
    linear-gradient(180deg, rgba(17, 29, 50, 0.98), rgba(6, 12, 25, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 13px color-mix(in srgb, var(--quick-color) 28%, transparent);
}

.sidebar-character-card__quick-slot.has-image img {
  filter: saturate(1.18) brightness(1.05) contrast(1.05);
}

.sidebar-character-card {
  border-color: rgba(103, 232, 249, 0.58);
  background:
    radial-gradient(circle at 14% 8%, rgba(45, 212, 191, 0.32), transparent 34%),
    radial-gradient(circle at 92% 86%, rgba(192, 132, 252, 0.28), transparent 44%),
    radial-gradient(circle at 48% 118%, rgba(251, 191, 36, 0.10), transparent 42%),
    linear-gradient(145deg, rgba(37, 58, 91, 0.99) 0%, rgba(18, 39, 75, 0.99) 54%, rgba(43, 36, 83, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -1px 0 rgba(103, 232, 249, 0.24),
    0 14px 30px rgba(0, 0, 0, 0.34),
    0 0 32px rgba(56, 189, 248, 0.18);
}

.sidebar-character-card__name {
  color: #fff7d6;
  text-shadow:
    0 0 10px rgba(251, 191, 36, 0.28),
    0 1px 6px rgba(0, 0, 0, 0.88);
}

.sidebar-character-card__vital {
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.13), transparent 42%),
    linear-gradient(180deg, rgba(25, 43, 76, 0.94), rgba(10, 23, 47, 0.90));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    0 1px 8px rgba(0, 0, 0, 0.22),
    0 0 12px rgba(125, 211, 252, 0.08);
}

.sidebar-character-card__vital-track,
.sidebar-character-card__vital--hp .sidebar-character-card__vital-track,
.sidebar-character-card__vital--mana .sidebar-character-card__vital-track,
.sidebar-character-card__vital--meter .sidebar-character-card__vital-track {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09), transparent 44%),
    linear-gradient(180deg, rgba(17, 29, 50, 0.98), rgba(4, 9, 22, 0.99)) !important;
}

.sidebar-character-card__vital-fill {
  filter: saturate(1.34) brightness(1.08);
}

.sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-fill {
  filter: saturate(1.48) brightness(1.14);
}

.sidebar-character-card__buff-chip.is-quick {
  background:
    radial-gradient(circle at 20% 0%, rgba(103, 232, 249, 0.24), transparent 38%),
    radial-gradient(circle at 88% 100%, rgba(251, 191, 36, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(18, 33, 63, 0.98), rgba(34, 37, 75, 0.96));
}

.sidebar-character-card__quick-slot {
  border-color: color-mix(in srgb, var(--quick-color) 70%, rgba(255, 255, 255, 0.24));
  background:
    radial-gradient(circle at 50% 10%, color-mix(in srgb, var(--quick-color) 42%, transparent), transparent 52%),
    linear-gradient(180deg, rgba(31, 54, 91, 0.99), rgba(9, 20, 43, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.20),
    0 0 18px color-mix(in srgb, var(--quick-color) 44%, transparent);
}

.sidebar-character-card__quick-slot.has-image img {
  filter: saturate(1.38) brightness(1.14) contrast(1.08);
}

.sidebar-character-card__quick-glyph {
  color: color-mix(in srgb, var(--quick-color) 80%, white);
  text-shadow:
    0 0 9px var(--quick-color),
    0 0 18px var(--quick-color);
}

.sidebar-character-card,
.sidebar-character-card__buff-chip.is-quick,
.sidebar-character-card__quick-grid,
.sidebar-character-card__quick-slot {
  overflow: visible;
}

.sidebar-character-card__quick-slot::after {
  content: attr(data-help);
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 2147483647;
  width: max-content;
  max-width: 176px;
  padding: 7px 9px;
  border: 1px solid rgba(217, 184, 129, 0.56);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(12, 18, 34, 0.98), rgba(4, 8, 18, 0.98));
  color: rgba(255, 247, 214, 0.96);
  font: 700 11px/1.25 var(--font-body, inherit);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: normal;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.58),
    0 0 18px color-mix(in srgb, var(--quick-color) 24%, transparent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.sidebar-character-card__quick-slot:nth-child(n + 3)::after {
  right: 0;
  left: auto;
}

.sidebar-character-card__quick-slot:hover::after,
.sidebar-character-card__quick-slot:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.sidebar-character-card__quick-slot.has-image img {
  border-radius: 3px;
}

.sidebar-character-card__quick-slot {
  isolation: isolate;
}

.sidebar-character-card__quick-slot::before {
  content: "";
  position: absolute;
  inset: 2px;
  z-index: 1;
  border-radius: 3px;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--quick-color) 42%, transparent), transparent 62%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.sidebar-character-card__quick-slot.is-active {
  border-color: color-mix(in srgb, var(--quick-color) 86%, rgba(255, 255, 255, 0.28));
  background:
    radial-gradient(circle at 50% 8%, color-mix(in srgb, var(--quick-color) 52%, transparent), transparent 54%),
    linear-gradient(180deg, rgba(34, 56, 94, 0.99), rgba(8, 19, 43, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 18px color-mix(in srgb, var(--quick-color) 56%, transparent);
}

.sidebar-character-card__quick-slot.is-active::before {
  opacity: 0.58;
  animation: sidebar-quick-card-pulse 1.35s ease-in-out infinite;
}

.sidebar-character-card__quick-slot.is-inactive,
.sidebar-character-card__quick-slot.is-consumed:not(.is-active) {
  border-color: rgba(132, 142, 158, 0.34);
  background:
    radial-gradient(circle at 50% 8%, rgba(160, 170, 188, 0.12), transparent 48%),
    linear-gradient(180deg, rgba(18, 25, 38, 0.94), rgba(7, 10, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 8px rgba(0, 0, 0, 0.42);
}

.sidebar-character-card__quick-slot.is-inactive img,
.sidebar-character-card__quick-slot.is-consumed:not(.is-active) img {
  filter: grayscale(1) saturate(0.12) brightness(0.52) contrast(0.94);
  opacity: 0.62;
}

.sidebar-character-card__quick-slot.is-inactive .sidebar-character-card__quick-glyph,
.sidebar-character-card__quick-slot.is-consumed:not(.is-active) .sidebar-character-card__quick-glyph,
.sidebar-character-card__quick-slot.is-inactive .sidebar-character-card__quick-value,
.sidebar-character-card__quick-slot.is-consumed:not(.is-active) .sidebar-character-card__quick-value {
  color: rgba(172, 181, 196, 0.78);
  text-shadow: none;
}

.sidebar-character-card__quick-slot.is-consumed:not(.is-active)::after {
  border-color: rgba(217, 184, 129, 0.42);
}

.sidebar-character-card__quick-value {
  position: absolute;
  right: 3px;
  bottom: 3px;
  left: 3px;
  z-index: 3;
  overflow: hidden;
  color: rgba(255, 247, 214, 0.98);
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0;
  text-align: center;
  text-shadow:
    0 0 8px color-mix(in srgb, var(--quick-color) 70%, transparent),
    0 1px 2px rgba(0, 0, 0, 0.8);
}

.sidebar-character-card__quick-slot.is-timer .sidebar-character-card__quick-glyph {
  position: absolute;
  top: 5px;
  z-index: 3;
  font-size: 7px;
  letter-spacing: 0.04em;
}

.sidebar-character-card__quick-slot.is-timer.is-active {
  background:
    radial-gradient(circle at 50% 12%, color-mix(in srgb, var(--quick-color) 46%, transparent), transparent 54%),
    linear-gradient(180deg, rgba(28, 39, 63, 0.99), rgba(7, 11, 22, 0.99));
}

/* Sidebar compact scale: 80% footprint for the rebuilt scc2 character card. */
.zone-themed-sidebar .sidebar-character-card.scc2 {
  width: min(206px, 100%) !important;
  min-height: 268px !important;
  padding: 7px !important;
  border-radius: 7px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-hero {
  height: 148px !important;
  border-radius: 6px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-level {
  top: 7px !important;
  right: 7px !important;
  min-width: 40px !important;
  min-height: 34px !important;
  padding: 4px 6px !important;
  border-radius: 5px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-level-label {
  font-size: 6px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-level-num {
  font-size: 14px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-stats-chip {
  top: 54px !important;
  right: 7px !important;
  min-width: 40px !important;
  height: 18px !important;
  border-radius: 5px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-stats-label {
  font-size: 6px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-stats-popover {
  width: 210px !important;
  max-height: min(420px, calc(100vh - 90px)) !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-medallion {
  display: none !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-id {
  left: 8px !important;
  right: 8px !important;
  bottom: 8px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-name {
  font-size: 17px !important;
  line-height: 1.02 !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-classline {
  gap: 6px !important;
  margin-top: 5px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-classline > .scc2-class,
.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-classline > .scc2-sub {
  min-height: 37px !important;
  justify-content: center !important;
  gap: 3px !important;
  padding: 5px 6px !important;
  border-color: rgba(217, 184, 129, 0.34) !important;
  border-radius: 6px !important;
  background: rgba(2, 6, 12, 0.72) !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  letter-spacing: 0.025em !important;
  line-height: 1.05 !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-class::before,
.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-sub::before {
  font-size: 7px !important;
  letter-spacing: 0.14em !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-body {
  gap: 6px !important;
  padding: 7px 6px 6px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-bar-top {
  margin-bottom: 3px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-bar-name {
  font-size: 8px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-bar-val {
  font-size: 9px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-track {
  height: 8px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-meter {
  padding-top: 5px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-slots {
  grid-template-columns: repeat(4, 28px) !important;
  gap: 5px !important;
  margin-top: 2px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-slot {
  width: 28px !important;
  min-width: 28px !important;
  height: 28px !important;
  flex-basis: 28px !important;
  border-radius: 5px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-slot img {
  width: 18px !important;
  height: 18px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-slot-glyph {
  max-width: 24px !important;
  font-size: 6px !important;
}

.zone-themed-sidebar .sidebar-character-card.scc2 .scc2-slot-value {
  right: 2px !important;
  bottom: 2px !important;
  font-size: 6px !important;
}

.talent-node-v2--keystone {
  isolation: isolate;
}

.talent-node-v2--keystone::before {
  content: "";
  position: absolute;
  inset: -7px;
  z-index: -2;
  background:
    conic-gradient(
      from 22deg,
      transparent 0 5deg,
      color-mix(in srgb, var(--keystone-accent, #d9b881) 82%, #f7d992) 5deg 12deg,
      transparent 12deg 24deg
    );
  border-radius: 50%;
  opacity: 0.92;
  filter:
    drop-shadow(0 0 10px color-mix(in srgb, var(--keystone-accent, #d9b881) 52%, transparent))
    drop-shadow(0 0 3px rgba(0, 0, 0, 0.9));
  clip-path: polygon(
    50% 0%,
    58% 14%,
    71% 8%,
    73% 24%,
    89% 23%,
    82% 37%,
    100% 50%,
    82% 63%,
    89% 77%,
    73% 76%,
    71% 92%,
    58% 86%,
    50% 100%,
    42% 86%,
    29% 92%,
    27% 76%,
    11% 77%,
    18% 63%,
    0% 50%,
    18% 37%,
    11% 23%,
    27% 24%,
    29% 8%,
    42% 14%
  );
}

.talent-node-v2--keystone::after {
  content: "";
  position: absolute;
  inset: -3px;
  z-index: 3;
  border: 1px solid color-mix(in srgb, var(--keystone-accent, #d9b881) 70%, #fff1b8);
  border-radius: 50%;
  box-shadow:
    inset 0 0 10px rgba(255, 236, 175, 0.22),
    0 0 14px color-mix(in srgb, var(--keystone-accent, #d9b881) 45%, transparent);
  pointer-events: none;
}

.talent-node-v2__image--keystone {
  border-radius: 50%;
  clip-path: circle(47% at 50% 50%);
}

.talent-node-v2__lock--keystone {
  top: 3px;
  right: 3px;
  border-color: rgba(217, 184, 129, 0.7);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.75);
}

/* Frontier v3.4.3 - hard-stop the route layer above the bottom controls. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    overflow: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage::after {
    display: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-board-base {
    fill: transparent !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-board-svg {
    top: 5% !important;
    left: 5% !important;
    right: auto !important;
    bottom: auto !important;
    width: 90% !important;
    height: 50% !important;
    max-height: calc(100% - 320px) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    top: 8% !important;
    left: 5% !important;
    right: auto !important;
    bottom: auto !important;
    width: 90% !important;
    height: 42% !important;
    max-height: calc(100% - 350px) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    z-index: 82;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    z-index: 83;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
    z-index: 20;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:focus-visible,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
    z-index: 85;
  }
}

.element-node-v2 {
  isolation: isolate;
  border-radius: 7px !important;
}

.element-node-v2::before {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -2;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--element-accent, #d9b881) 34%, transparent), transparent 70%);
  opacity: 0;
  filter:
    drop-shadow(0 0 10px color-mix(in srgb, var(--element-accent, #d9b881) 38%, transparent))
    drop-shadow(0 0 3px rgba(0, 0, 0, 0.9));
  pointer-events: none;
}

.element-node-v2::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border: 1px solid color-mix(in srgb, var(--element-accent, #d9b881) 62%, #fff1b8);
  border-radius: 6px;
  box-shadow:
    inset 0 0 12px rgba(255, 236, 175, 0.12),
    0 0 10px color-mix(in srgb, var(--element-accent, #d9b881) 22%, transparent);
  pointer-events: none;
}

.element-node-v2:hover,
.element-node-v2:focus-visible {
  outline: none;
  filter: brightness(1.1);
}

.element-node-v2.is-active::before,
.element-node-v2.is-selected::before {
  opacity: 0.96;
}

.element-node-v2.is-selected::after {
  border-color: color-mix(in srgb, var(--element-accent, #d9b881) 84%, #fff6d0);
  box-shadow:
    inset 0 0 13px rgba(255, 236, 175, 0.26),
    0 0 20px color-mix(in srgb, var(--element-accent, #d9b881) 58%, transparent);
}

.element-node-v2.is-locked::before {
  opacity: 0.22;
  filter:
    grayscale(0.9)
    drop-shadow(0 0 5px rgba(0, 0, 0, 0.9));
}

.element-node-v2__image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
  clip-path: none;
  user-select: none;
  filter: saturate(1.12) contrast(1.08);
}

.element-node-v2.is-locked .element-node-v2__image {
  filter: grayscale(0.88) brightness(0.44) contrast(0.94);
}

.element-node-v2__rank {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 4;
  padding: 2px 0 3px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.74));
  color: color-mix(in srgb, var(--element-accent, #d9b881) 82%, #ffffff);
  font: 1000 9px/1 var(--font-ui, inherit);
  text-shadow:
    0 1px 5px rgba(0, 0, 0, 0.95),
    0 0 8px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

.element-node-v2__label {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  z-index: 5;
  width: 104px;
  transform: translateX(-50%);
  color: var(--color-parchment);
  font: 900 9px/1.08 var(--font-body, inherit);
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 0.98),
    0 0 7px rgba(0, 0, 0, 0.96);
  pointer-events: none;
}

.element-node-v2.is-locked .element-node-v2__rank,
.element-node-v2.is-locked .element-node-v2__label {
  color: rgba(141, 132, 117, 0.78);
}

.element-node-v2--keystone::before {
  inset: -9px;
  opacity: 0.95;
  border-radius: 50%;
  background:
    conic-gradient(
      from 22deg,
      transparent 0 5deg,
      color-mix(in srgb, var(--element-accent, #d9b881) 82%, #f7d992) 5deg 12deg,
      transparent 12deg 24deg
    );
  clip-path: polygon(
    50% 0%,
    58% 14%,
    71% 8%,
    73% 24%,
    89% 23%,
    82% 37%,
    100% 50%,
    82% 63%,
    89% 77%,
    73% 76%,
    71% 92%,
    58% 86%,
    50% 100%,
    42% 86%,
    29% 92%,
    27% 76%,
    11% 77%,
    18% 63%,
    0% 50%,
    18% 37%,
    11% 23%,
    27% 24%,
    29% 8%,
    42% 14%
  );
}

.element-node-v2--keystone {
  border-radius: 50% !important;
}

.element-node-v2--keystone::after {
  inset: -4px;
  border-radius: 50%;
  border-color: color-mix(in srgb, var(--element-accent, #d9b881) 78%, #fff1b8);
  box-shadow:
    inset 0 0 16px rgba(255, 236, 175, 0.26),
    0 0 22px color-mix(in srgb, var(--element-accent, #d9b881) 55%, transparent);
}

.element-node-v2--keystone .element-node-v2__image {
  inset: 6px;
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: 50%;
  clip-path: circle(47% at 50% 50%);
}

.element-node-v2--keystone .element-node-v2__rank {
  inset-inline: 14px;
  bottom: 10px;
  font-size: 10px;
}

.element-node-v2--keystone .element-node-v2__label {
  width: 130px;
  font-size: 10px;
}

@keyframes sidebar-quick-card-pulse {
  0%,
  100% {
    opacity: 0.38;
    transform: scale(0.94);
  }
  50% {
    opacity: 0.72;
    transform: scale(1);
  }
}

@keyframes sidebar-meter-active-time {
  0%, 100% {
    text-shadow: 0 0 8px currentColor;
  }
  50% {
    text-shadow:
      0 0 11px currentColor,
      0 0 22px currentColor;
  }
}

@media (prefers-reduced-motion: reduce) {
  .combat-fight-button {
    animation: none !important;
  }

  .progress-bar > .progress-fill,
  .progress-bar > div,
  .gather-node-progress-fill,
  .soulwake-fill,
  .activity-progress-fill-fluid {
    transition: none !important;
  }

  .sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-track,
  .sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-fill,
  .sidebar-character-card__vital--meter.is-active .sidebar-character-card__vital-fill::after,
  .sidebar-character-card__buff-time {
    animation: none !important;
  }
}

.faction-map-node {
  overflow: visible;
  --faction-node-lift: 0px;
  --faction-node-scale: 1;
}

.faction-map-node:hover,
.faction-map-node:focus-visible {
  --faction-node-lift: -8px;
}

.faction-map-node:focus-visible {
  outline: none;
}

.faction-map-node:focus-visible .faction-map-node__banner {
  box-shadow:
    0 0 0 2px rgba(255, 238, 185, 0.62),
    0 8px 18px rgba(0, 0, 0, 0.34) !important;
}

.faction-map-node--unpledged:not(:hover):not(:focus-visible) .faction-map-node__banner {
  opacity: 0.88;
}

.faction-map-node--unpledged:not(:hover):not(:focus-visible) .faction-map-node__image {
  filter: brightness(0.86) saturate(0.64) contrast(1.02) drop-shadow(0 16px 16px rgba(0,0,0,0.30)) !important;
}

.faction-map-node--unpledged:hover .faction-map-node__image,
.faction-map-node--unpledged:focus-visible .faction-map-node__image {
  filter: brightness(1.16) saturate(1.08) contrast(1.04) drop-shadow(0 0 18px color-mix(in srgb, var(--faction-accent, #d9b881) 70%, transparent)) drop-shadow(0 18px 18px rgba(0,0,0,0.32)) !important;
}

.faction-map-node--locked:not(:hover):not(:focus-visible) .faction-map-node__image {
  filter: brightness(0.72) saturate(0.46) contrast(1.02) drop-shadow(0 16px 16px rgba(0,0,0,0.32)) !important;
}

.faction-map-node__art {
  --faction-accent: #d9b881;
  position: relative;
  display: block;
  width: 100%;
  pointer-events: none;
  isolation: isolate;
  animation: faction-island-float 6.4s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, var(--faction-node-lift), 0);
  transition: filter 180ms ease;
}

.faction-map-node__aura {
  transition:
    width 180ms ease,
    height 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.faction-map-node__banner {
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    box-shadow 180ms ease;
}

.faction-map-node__meta {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  align-items: center;
  justify-content: center;
  column-gap: 8px;
  width: min(100%, 232px);
  min-height: 16px;
  margin-inline: auto;
  font-size: 10px;
  line-height: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.78);
}

.faction-map-node__meta-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  line-height: 16px;
  vertical-align: middle;
}

@media (max-width: 1100px) {
  .faction-map-node__meta {
    column-gap: 6px;
    letter-spacing: 0.07em;
  }
}

.faction-map-node:hover .faction-map-node__banner,
.faction-map-node:focus-visible .faction-map-node__banner,
.faction-map-node--joined .faction-map-node__banner {
  transform: translateY(-2px);
}

.faction-map-node__pledged-ribbon {
  position: relative;
  z-index: 8;
  width: max-content;
  min-width: 96px;
  margin: -2px auto 0;
  padding: 3px 10px;
  border: 1px solid rgba(255, 226, 148, 0.78);
  border-radius: 0 0 7px 7px;
  background: linear-gradient(180deg, rgba(255, 206, 84, 0.95), rgba(175, 108, 26, 0.95));
  color: #160e08;
  font: 900 10px/1 var(--font-serif);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.32),
    0 0 18px rgba(255, 198, 69, 0.36);
}

.faction-map-node--skyvein .faction-map-node__art {
  animation-delay: -1.2s;
  animation-duration: 7s;
}

.faction-map-node--astral .faction-map-node__art {
  animation-delay: -2.1s;
  animation-duration: 6.8s;
}

.faction-map-node--tideglass .faction-map-node__art {
  animation-delay: -0.7s;
  animation-duration: 7.4s;
}

.faction-map-node--cinderfall .faction-map-node__art {
  animation-delay: -1.7s;
  animation-duration: 6.1s;
}

.faction-map-node__image {
  position: relative;
  z-index: 2;
  display: block;
  image-rendering: auto;
  transform: translateZ(0);
}

.faction-map-node__art::before,
.faction-map-node__art::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  mix-blend-mode: screen;
}

.faction-map-node__art::before {
  opacity: 0.62;
}

.faction-map-node__art::after {
  opacity: 0.38;
}

.faction-map-node__art--stonebloom::before {
  background:
    radial-gradient(circle at 39% 34%, rgba(135, 255, 153, 0.72) 0 2px, transparent 3px),
    radial-gradient(circle at 56% 42%, rgba(198, 255, 145, 0.56) 0 1px, transparent 3px),
    radial-gradient(circle at 48% 24%, rgba(103, 232, 149, 0.48) 0 1px, transparent 3px),
    radial-gradient(circle at 64% 54%, rgba(160, 255, 170, 0.42) 0 1px, transparent 3px);
  animation: faction-spores 4.8s ease-in-out infinite;
}

.faction-map-node__art--stonebloom::after {
  inset: 8% 0 12%;
  background: radial-gradient(ellipse at 50% 48%, rgba(72, 255, 116, 0.16), transparent 52%);
}

.faction-map-node__art--skyvein::before {
  background:
    radial-gradient(circle at 44% 22%, rgba(255, 255, 255, 0.70) 0 1px, transparent 3px),
    radial-gradient(circle at 59% 37%, rgba(186, 236, 255, 0.55) 0 1px, transparent 3px),
    radial-gradient(circle at 67% 55%, rgba(125, 211, 252, 0.44) 0 1px, transparent 4px),
    radial-gradient(ellipse at 53% 42%, rgba(220, 250, 255, 0.18), transparent 50%);
  animation: faction-sky-shimmer 5.2s ease-in-out infinite;
}

.faction-map-node__art--skyvein::after {
  background: radial-gradient(ellipse at 53% 45%, rgba(125, 211, 252, 0.14), transparent 52%);
}

.faction-map-node__art--astral::before {
  background:
    radial-gradient(circle at 46% 18%, rgba(255, 255, 255, 0.96) 0 1px, transparent 3px),
    radial-gradient(circle at 66% 38%, rgba(204, 184, 255, 0.82) 0 1px, transparent 3px),
    radial-gradient(circle at 34% 49%, rgba(181, 126, 255, 0.70) 0 2px, transparent 4px),
    radial-gradient(circle at 54% 60%, rgba(255, 255, 255, 0.62) 0 1px, transparent 3px);
  animation: faction-star-twinkle 3.6s ease-in-out infinite;
}

.faction-map-node__art--astral::after {
  inset: 11% 16% 7%;
  border: 1px solid rgba(206, 184, 255, 0.26);
  border-radius: 50%;
  box-shadow: 0 0 22px rgba(183, 156, 255, 0.38);
  animation: faction-astral-ring 7s linear infinite;
}

.faction-map-node__art--tideglass::before {
  background:
    radial-gradient(circle at 25% 31%, rgba(196, 252, 255, 0.72) 0 2px, transparent 4px),
    radial-gradient(circle at 41% 55%, rgba(125, 245, 255, 0.48) 0 2px, transparent 5px),
    radial-gradient(circle at 68% 42%, rgba(220, 255, 255, 0.64) 0 1px, transparent 4px),
    radial-gradient(circle at 58% 20%, rgba(125, 211, 252, 0.42) 0 1px, transparent 4px);
  animation: faction-bubbles 5.8s ease-in-out infinite;
}

.faction-map-node__art--tideglass::after {
  inset: 6% 4% 0;
  border: 1px solid rgba(125, 245, 255, 0.28);
  border-radius: 50%;
  filter: blur(0.3px);
  animation: faction-water-ring 4.9s ease-in-out infinite;
}

.faction-map-node__art--cinderfall::before {
  background:
    radial-gradient(circle at 49% 22%, rgba(255, 223, 128, 0.85) 0 1px, transparent 3px),
    radial-gradient(circle at 57% 45%, rgba(255, 90, 35, 0.72) 0 2px, transparent 4px),
    radial-gradient(circle at 41% 58%, rgba(255, 154, 59, 0.66) 0 1px, transparent 3px),
    radial-gradient(circle at 70% 61%, rgba(255, 70, 24, 0.54) 0 1px, transparent 3px);
  animation: faction-embers 3.4s ease-in-out infinite;
}

.faction-map-node__art--cinderfall::after {
  inset: 20% 6% 0;
  background: radial-gradient(ellipse at 52% 67%, rgba(255, 79, 24, 0.18), transparent 54%);
  animation: faction-fire-glow 2.8s ease-in-out infinite;
}

.faction-map-node__blink {
  display: none;
}

@keyframes faction-island-float {
  0%,
  100% {
    transform: translate3d(0, var(--faction-node-lift), 0);
  }
  50% {
    transform: translate3d(0, calc(var(--faction-node-lift) - 5px), 0);
  }
}

@keyframes faction-spores {
  0%,
  100% {
    opacity: 0.28;
    transform: translateY(3px);
  }
  50% {
    opacity: 0.72;
    transform: translateY(-8px);
  }
}

@keyframes faction-sky-shimmer {
  0%,
  100% {
    opacity: 0.22;
    transform: translateX(-5px);
  }
  50% {
    opacity: 0.68;
    transform: translateX(5px);
  }
}

@keyframes faction-star-twinkle {
  0%,
  100% {
    opacity: 0.24;
    transform: scale(0.98);
  }
  45% {
    opacity: 0.84;
    transform: scale(1.02);
  }
}

@keyframes faction-astral-ring {
  from {
    transform: rotate(0deg) scale(0.98);
  }
  to {
    transform: rotate(360deg) scale(0.98);
  }
}

@keyframes faction-bubbles {
  0%,
  100% {
    opacity: 0.22;
    transform: translateY(7px);
  }
  50% {
    opacity: 0.70;
    transform: translateY(-7px);
  }
}

@keyframes faction-water-ring {
  0%,
  100% {
    opacity: 0.16;
    transform: scale(0.90);
  }
  50% {
    opacity: 0.44;
    transform: scale(1.03);
  }
}

@keyframes faction-embers {
  0%,
  100% {
    opacity: 0.24;
    transform: translateY(8px);
  }
  45% {
    opacity: 0.82;
    transform: translateY(-7px);
  }
}

@keyframes faction-fire-glow {
  0%,
  100% {
    opacity: 0.28;
  }
  50% {
    opacity: 0.64;
  }
}

@keyframes faction-tortoise-blink {
  0%,
  88%,
  94%,
  100% {
    opacity: 0;
    transform: rotate(-8deg) scaleY(0.25);
  }
  90%,
  92% {
    opacity: 0.88;
    transform: rotate(-8deg) scaleY(1);
  }
}

.reduce-motion .faction-map-node__art,
.reduce-motion .faction-map-node__art::before,
.reduce-motion .faction-map-node__art::after,
.reduce-motion .faction-map-node__blink {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .faction-map-node__art,
  .faction-map-node__art::before,
  .faction-map-node__art::after,
  .faction-map-node__blink {
    animation: none !important;
  }
}
/* Character Grade replaces the old raw Equipment Power number. */
.character-grade-rank {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  overflow: visible;
  font-family: var(--font-serif, "Cinzel", Georgia, serif);
  font-size: 3.55rem;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
  font-style: italic;
  font-variant: small-caps;
  transform: skewX(-5deg);
  background: var(--grade-fill, linear-gradient(180deg, #f0d894 0%, #bd9654 52%, #6c4b25 100%));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: var(--grade-stroke-width, 0.8px) var(--grade-stroke, #24180c);
  text-shadow:
    1px 1px 0 var(--grade-ridge, rgba(255, 255, 255, 0.35)),
    -1px -1px 0 rgba(0, 0, 0, 0.78),
    3px 3px 0 var(--grade-shadow, rgba(0, 0, 0, 0.82));
}

.character-grade-rank--s-plus,
.character-grade-rank--s-2,
.character-grade-rank--s-3 {
  background-size: 220% 220%;
  filter: drop-shadow(0 0 var(--grade-aura-size, 10px) var(--grade-aura, rgba(255, 210, 74, 0.36)));
  text-shadow:
    1px 1px 0 var(--grade-ridge, rgba(255, 255, 255, 0.78)),
    -1px -1px 0 rgba(0, 0, 0, 0.88),
    3px 3px 0 rgba(0, 0, 0, 0.9),
    0 0 var(--grade-glow-size, 18px) var(--grade-glow, rgba(255, 202, 54, 0.42));
  animation: characterGradeApexShine var(--grade-shine-speed, 4.8s) ease-in-out infinite;
}

.character-grade-rank--s-plus::before,
.character-grade-rank--s-2::before,
.character-grade-rank--s-3::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -0.16em -0.24em -0.1em;
  border-radius: 999px;
  background:
    radial-gradient(circle at 28% 26%, var(--grade-halo-hot, rgba(255, 246, 196, 0.24)), transparent 34%),
    radial-gradient(circle at 72% 64%, var(--grade-halo-cool, rgba(100, 211, 255, 0.12)), transparent 48%),
    radial-gradient(ellipse at center, var(--grade-halo, rgba(255, 184, 44, 0.18)), transparent 70%);
  filter: blur(7px);
  opacity: var(--grade-halo-opacity, 0.72);
  pointer-events: none;
}

.character-grade-rank--s-2::after,
.character-grade-rank--s-3::after {
  content: "";
  position: absolute;
  right: -0.16em;
  top: -0.08em;
  width: 0.34em;
  height: 0.34em;
  background: radial-gradient(circle, #ffffff 0 18%, #fff2a8 19% 42%, transparent 45%);
  clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%);
  filter: drop-shadow(0 0 8px rgba(255, 236, 164, 0.82));
  pointer-events: none;
  animation: characterGradeCrownPulse 1.8s ease-in-out infinite;
}

.character-grade-rank--d {
  --grade-fill: linear-gradient(180deg, #c4c8cc 0%, #8a9299 48%, #50565d 100%);
  --grade-stroke: #252b31;
  --grade-ridge: rgba(255, 255, 255, 0.22);
}

.character-grade-rank--c {
  --grade-fill: linear-gradient(180deg, #f1f7ff 0%, #adbcc9 45%, #697b88 100%);
  --grade-stroke: #1e2a35;
  --grade-ridge: rgba(255, 255, 255, 0.34);
}

.character-grade-rank--b {
  --grade-fill: linear-gradient(180deg, #ddf6ff 0%, #50b9f0 46%, #1269a5 100%);
  --grade-stroke: #072842;
  --grade-ridge: rgba(236, 251, 255, 0.5);
}

.character-grade-rank--a {
  --grade-fill: linear-gradient(180deg, #fff8dc 0%, #ead177 46%, #906520 100%);
  --grade-stroke: #3f2b0e;
  --grade-ridge: rgba(255, 255, 255, 0.52);
}

.character-grade-rank--a-plus {
  --grade-fill: linear-gradient(180deg, #fffdf2 0%, #ffc83f 42%, #b76a12 100%);
  --grade-stroke: #4b2407;
  --grade-stroke-width: 1px;
  --grade-ridge: rgba(255, 255, 255, 0.58);
}

.character-grade-rank--s {
  --grade-fill: linear-gradient(180deg, #ffffff 0%, #ffe15d 35%, #d78910 68%, #6b3105 100%);
  --grade-stroke: #321300;
  --grade-stroke-width: 1.15px;
  --grade-ridge: rgba(255, 255, 255, 0.66);
}

.character-grade-rank--s-plus {
  min-width: 124px;
  --grade-fill: linear-gradient(135deg, #ffffff 0%, #fff8d7 18%, #ffd747 38%, #f28f18 63%, #7c2f00 100%);
  --grade-stroke: #1f0a00;
  --grade-stroke-width: 1.35px;
  --grade-ridge: rgba(255, 255, 255, 0.78);
  --grade-aura: rgba(255, 206, 72, 0.4);
  --grade-glow: rgba(255, 198, 42, 0.46);
  --grade-halo: rgba(255, 184, 44, 0.2);
  --grade-shine-speed: 5.6s;
}

.character-grade-rank--s-2 {
  min-width: 146px;
  --grade-fill: linear-gradient(130deg, #ffffff 0%, #f6fbff 12%, #ffe66d 30%, #ffad24 46%, #f5f0ff 61%, #66d9ff 76%, #8d3100 100%);
  --grade-stroke: #160600;
  --grade-stroke-width: 1.55px;
  --grade-ridge: rgba(255, 255, 255, 0.86);
  --grade-aura: rgba(255, 218, 87, 0.48);
  --grade-aura-size: 14px;
  --grade-glow: rgba(128, 216, 255, 0.34);
  --grade-glow-size: 24px;
  --grade-halo: rgba(255, 200, 68, 0.24);
  --grade-halo-cool: rgba(94, 213, 255, 0.2);
  --grade-halo-opacity: 0.86;
  --grade-shine-speed: 4.4s;
}

.character-grade-rank--s-3 {
  min-width: 168px;
  --grade-fill: linear-gradient(125deg, #ffffff 0%, #fff9c9 11%, #ffd84d 25%, #ff7a18 42%, #fff2a8 56%, #a7f3ff 70%, #f7ddff 83%, #5f1800 100%);
  --grade-stroke: #100300;
  --grade-stroke-width: 1.75px;
  --grade-ridge: rgba(255, 255, 255, 0.94);
  --grade-aura: rgba(255, 223, 103, 0.58);
  --grade-aura-size: 18px;
  --grade-glow: rgba(255, 246, 177, 0.54);
  --grade-glow-size: 30px;
  --grade-halo: rgba(255, 208, 72, 0.3);
  --grade-halo-hot: rgba(255, 255, 230, 0.34);
  --grade-halo-cool: rgba(113, 229, 255, 0.28);
  --grade-halo-opacity: 1;
  --grade-shine-speed: 3.6s;
}

.character-grade-rank--s-3 {
  transform: skewX(-6deg) scale(1.05, 1.03);
}

@keyframes characterGradeApexShine {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes characterGradeCrownPulse {
  0%,
  100% {
    opacity: 0.62;
    transform: scale(0.88) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.12) rotate(45deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .character-grade-rank--s-plus,
  .character-grade-rank--s-2,
  .character-grade-rank--s-3,
  .character-grade-rank--s-2::after,
  .character-grade-rank--s-3::after {
    animation: none;
  }
}

.character-grade-percentile {
  margin-top: 0.1rem;
  font-family: var(--font-body, system-ui, sans-serif);
  font-size: 0.72rem;
  line-height: 1.25;
  color: rgba(216, 226, 240, 0.78);
}

.character-grade-percentile strong {
  color: #fff3b0;
  font-family: var(--font-serif, Georgia, serif);
}

.inventory-desktop-grid {
  height: calc(100dvh - 126px) !important;
  max-height: calc(100dvh - 126px) !important;
  overflow: hidden !important;
  transition: grid-template-columns 340ms cubic-bezier(0.22, 1, 0.36, 1);
}

.inventory-desktop-grid > * {
  min-height: 0;
}

.inventory-main-panel {
  min-width: 0;
  transition:
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.inventory-combat-lock-notice {
  animation: inventory-loadout-sealed-pulse 950ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.inventory-equip-combat-toast {
  position: absolute;
  z-index: 80;
  top: 2.55rem;
  left: 50%;
  width: max-content;
  max-width: calc(100% - 1.5rem);
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(244, 184, 91, 0.78);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(65, 31, 20, 0.97), rgba(24, 16, 25, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 238, 188, 0.12),
    0 8px 24px rgba(0, 0, 0, 0.48),
    0 0 18px rgba(225, 153, 67, 0.15);
  color: #ffe6b0;
  font: 800 11px/1.25 var(--font-ui, sans-serif);
  letter-spacing: 0.025em;
  text-align: center;
  pointer-events: none;
  transform: translateX(-50%);
  animation: inventory-equip-combat-toast-in 180ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes inventory-loadout-sealed-pulse {
  0% {
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 0 0 rgba(245, 158, 11, 0);
    filter: brightness(0.9);
    transform: scale(0.995);
  }
  42% {
    border-color: rgba(253, 211, 77, 0.95);
    box-shadow:
      0 0 0 2px rgba(245, 158, 11, 0.22),
      0 0 24px rgba(245, 158, 11, 0.32);
    filter: brightness(1.13);
    transform: scale(1);
  }
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
}

@keyframes inventory-equip-combat-toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -7px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}

.inventory-main-panel--expanded {
  border-color: rgba(214, 169, 79, 0.52) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 200, 0.07),
    0 16px 34px rgba(0, 0, 0, 0.24),
    0 0 24px rgba(214, 169, 79, 0.06) !important;
}

.inventory-aux-panel-shell {
  min-width: 0;
  height: 100%;
  overflow: hidden;
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
  transition:
    opacity 180ms ease 90ms,
    transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.inventory-aux-panel-shell > * {
  width: 100%;
  height: 100%;
}

.inventory-desktop-grid--expanded .inventory-aux-panel-shell {
  opacity: 0;
  transform: translateX(32px);
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 140ms ease,
    transform 260ms cubic-bezier(0.4, 0, 1, 1),
    visibility 0s linear 260ms;
}

.inventory-expand-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(214, 169, 79, 0.38);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(214, 169, 79, 0.14), rgba(5, 12, 24, 0.78));
  color: rgba(244, 215, 151, 0.92);
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.inventory-expand-toggle:hover,
.inventory-expand-toggle:focus-visible {
  border-color: rgba(244, 205, 116, 0.78);
  background: linear-gradient(180deg, rgba(214, 169, 79, 0.24), rgba(8, 17, 32, 0.9));
  color: #fff0c7;
  transform: translateY(-1px);
}

.inventory-expand-toggle__icon {
  color: rgba(124, 211, 255, 0.9);
  font-size: 12px;
  line-height: 1;
}

.inventory-desktop-grid--expanded .inventory-item-slot,
.inventory-desktop-grid--expanded .inventory-buy-slot {
  box-shadow: 0 0 14px rgba(214, 169, 79, 0.08);
}

.inventory-item-slot {
  overflow: visible !important;
}

[data-gear-rarity] {
  box-sizing: border-box;
}

[data-gear-rarity="rare"] {
  border-width: 1px !important;
  border-style: solid !important;
  border-color: #7dd3fc !important;
}

[data-gear-rarity="epic"] {
  border-width: 2px !important;
  border-style: solid !important;
  border-color: #b56cff !important;
}

[data-gear-rarity="legendary"] {
  border-width: 3px !important;
  border-style: double !important;
  border-color: #f6c453 !important;
}

[data-gear-rarity="mythic"] {
  border-width: 3px !important;
  border-style: double !important;
  border-color: #f0445e !important;
}

[data-gear-rarity="soulbound"] {
  border-width: 3px !important;
  border-style: solid !important;
  border-color: #42e8db !important;
}

[data-gear-rarity="divine"] {
  border-width: 3px !important;
  border-style: double !important;
  border-color: #ff8a3d !important;
}

.gear-rarity-outline-fx {
  --gear-rarity-frame-color: rgba(255, 255, 255, 0.8);
  position: absolute;
  inset: 1px;
  z-index: 18;
  border-radius: inherit;
  pointer-events: none;
}

.gear-rarity-outline-fx::before {
  position: absolute;
  inset: 1px;
  border: 1px solid var(--gear-rarity-frame-color);
  border-radius: inherit;
  content: "";
  opacity: 0.84;
}

.gear-rarity-outline-fx--legendary {
  --gear-rarity-frame-color: rgba(255, 223, 112, 0.72);
}

.gear-rarity-outline-fx--mythic {
  --gear-rarity-frame-color: rgba(255, 139, 157, 0.7);
}

.gear-rarity-outline-fx--soulbound {
  --gear-rarity-frame-color: rgba(141, 255, 246, 0.84);
}

.gear-rarity-outline-fx--divine {
  --gear-rarity-frame-color: rgba(255, 172, 93, 0.82);
}

.inventory-item-slot--slot-match {
  z-index: 3;
  transform: translateY(-1px) scale(1.06);
  border-color: rgba(74, 222, 128, 0.96) !important;
  background: linear-gradient(145deg, rgba(20, 83, 45, 0.38), rgba(4, 20, 30, 0.94)) !important;
  box-shadow:
    inset 0 0 0 2px rgba(74, 222, 128, 0.24),
    inset 0 0 14px rgba(34, 197, 94, 0.18),
    0 0 18px rgba(74, 222, 128, 0.48) !important;
}

.inventory-item-upgrade-arrow {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 28;
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid rgba(134, 239, 172, 0.92);
  border-radius: 50%;
  background: rgba(5, 78, 52, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 0 9px rgba(74, 222, 128, 0.72);
  color: #dcfce7;
  font: 900 12px/1 var(--font-ui, inherit);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  animation: inventory-upgrade-arrow-float 1.8s ease-in-out infinite;
}

@keyframes inventory-upgrade-arrow-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }
}

.reduce-motion .inventory-item-upgrade-arrow {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .inventory-item-upgrade-arrow {
    animation: none;
  }
}

.inventory-item-slot--new::before {
  position: absolute;
  pointer-events: none;
  content: "";
}

.inventory-item-slot--new::before {
  top: 3px;
  left: 3px;
  z-index: 28;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(207, 250, 254, 0.96);
  border-radius: 50%;
  background: #22d3ee;
  box-shadow:
    0 0 0 2px rgba(4, 12, 24, 0.92),
    0 0 7px rgba(34, 211, 238, 0.85);
}

.inventory-item-slot__count,
.equipment-slot__count {
  box-sizing: border-box;
  min-width: 1.25rem;
  max-width: none;
  overflow: visible;
  line-height: 1.15;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.inventory-item-slot__count {
  right: 1px !important;
  bottom: 1px !important;
  padding-inline: 0.2rem !important;
  font-size: clamp(0.52rem, 0.64vw, 0.68rem) !important;
  font-variant-numeric: tabular-nums;
}

.inventory-item-slot.is-level-locked {
  border-color: rgba(248, 113, 113, 0.82) !important;
  box-shadow:
    inset 0 0 0 1px rgba(127, 29, 29, 0.44),
    0 0 10px rgba(239, 68, 68, 0.2) !important;
}

.inventory-item-slot.is-level-locked img {
  filter: saturate(0.34) brightness(0.58);
}

.equipment-level-lock-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 24;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid rgba(248, 113, 113, 0.88);
  border-radius: 50%;
  background: rgba(69, 10, 10, 0.96);
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.38);
  color: #fee2e2;
  font-size: 0.58rem;
  line-height: 1;
}

.equipment-level-lock-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(248, 113, 113, 0.62);
  border-radius: 0.4rem;
  background: linear-gradient(135deg, rgba(69, 10, 10, 0.82), rgba(26, 8, 18, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #fecaca;
  font-size: 0.7rem;
  line-height: 1.45;
}

.equipment-level-lock-callout strong {
  display: block;
  margin-bottom: 0.12rem;
  color: #fca5a5;
  font-family: var(--font-serif);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.equipment-level-lock-callout__icon {
  flex: 0 0 auto;
  margin-top: 0.05rem;
  font-size: 0.78rem;
}

.equipment-slot__count {
  top: 1px !important;
  right: 1px !important;
}

.equipment-slot--drop-active,
.equipment-slot--drop-valid {
  border-color: rgba(94, 234, 212, 0.92) !important;
  background: rgba(13, 148, 136, 0.2) !important;
  box-shadow:
    0 0 0 2px rgba(94, 234, 212, 0.2),
    0 0 18px rgba(45, 212, 191, 0.38) !important;
}

.equipment-slot--drop-invalid {
  border-color: rgba(248, 113, 113, 0.96) !important;
  background: rgba(127, 29, 29, 0.26) !important;
  box-shadow:
    0 0 0 2px rgba(248, 113, 113, 0.22),
    0 0 18px rgba(239, 68, 68, 0.42) !important;
}

.inventory-grid--equipment-drop-active {
  outline: 2px solid rgba(94, 234, 212, 0.9);
  outline-offset: -2px;
  background: rgba(13, 148, 136, 0.12);
  box-shadow: inset 0 0 24px rgba(45, 212, 191, 0.22);
}

.reduce-motion .inventory-desktop-grid,
.reduce-motion .inventory-main-panel,
.reduce-motion .inventory-aux-panel-shell,
.reduce-motion .inventory-expand-toggle,
.reduce-motion .inventory-combat-lock-notice,
.reduce-motion .inventory-equip-combat-toast {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .inventory-desktop-grid,
  .inventory-main-panel,
  .inventory-aux-panel-shell,
  .inventory-expand-toggle,
  .inventory-combat-lock-notice,
  .inventory-equip-combat-toast {
    transition: none !important;
    animation: none !important;
  }
}

.inventory-stat-panel,
.inventory-bonus-panel {
  padding: 8px !important;
}

.inventory-stat-panel {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(202, 156, 64, 0.72) rgba(4, 10, 22, 0.72);
}

.inventory-stat-panel::-webkit-scrollbar {
  width: 7px;
}

.inventory-stat-panel::-webkit-scrollbar-track {
  background: rgba(4, 10, 22, 0.72);
  border-radius: 999px;
}

.inventory-stat-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(232, 190, 94, 0.86), rgba(142, 101, 35, 0.86));
  border: 1px solid rgba(255, 225, 155, 0.24);
  border-radius: 999px;
}

.inventory-stat-panel::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(247, 209, 122, 0.96), rgba(174, 128, 46, 0.94));
}

.inventory-bonus-panel {
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
}

.inventory-bonus-panel__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(223, 180, 84, 0.72) rgba(7, 20, 38, 0.45);
}

.inventory-bonus-panel__list::-webkit-scrollbar {
  width: 5px;
}

.inventory-bonus-panel__list::-webkit-scrollbar-track {
  background: rgba(7, 20, 38, 0.45);
  border-radius: 999px;
}

.inventory-bonus-panel__list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(247, 209, 122, 0.88), rgba(174, 128, 46, 0.86));
  border-radius: 999px;
}

.inventory-stat-panel .character-grade-rank {
  min-width: 88px;
  font-size: 2.35rem;
  line-height: 0.9;
  --grade-glow-size: 12px;
  --grade-aura-size: 8px;
}

.inventory-stat-panel .character-grade-rank--s-plus,
.inventory-stat-panel .character-grade-rank--s-2,
.inventory-stat-panel .character-grade-rank--s-3 {
  min-width: 104px;
}

.inventory-stat-panel .character-grade-rank--s-3 {
  min-width: 136px;
  font-size: 3.055rem;
  transform: skewX(-6deg) scale(1.02, 1);
}

.inventory-stat-panel .character-grade-rank--s-plus::before,
.inventory-stat-panel .character-grade-rank--s-2::before,
.inventory-stat-panel .character-grade-rank--s-3::before {
  inset: -0.1em -0.18em -0.08em;
  filter: blur(4px);
}

.inventory-stat-panel .character-grade-rank--s-2::after,
.inventory-stat-panel .character-grade-rank--s-3::after {
  right: -0.08em;
  top: -0.02em;
  width: 0.26em;
  height: 0.26em;
}

.inventory-stat-panel .character-grade-percentile {
  font-size: 0.64rem;
  line-height: 1.1;
}

.inventory-stat-panel__grade {
  margin-bottom: 6px !important;
  padding-bottom: 6px !important;
}

.inventory-stat-panel__grade [class*="mt-2"] {
  margin-top: 5px !important;
}

.inventory-stat-panel__grade [class*="mt-3"] {
  margin-top: 6px !important;
}

.inventory-stat-panel__grade [class*="py-2"] {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

.inventory-stat-panel__primary {
  margin-bottom: 6px !important;
}

.inventory-stat-panel__primary > div:first-child,
.inventory-stat-panel__secondary > div:first-child {
  margin-bottom: 5px !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
}

.inventory-stat-panel__primary > div:last-child {
  gap: 3px !important;
}

.inventory-stat-panel__primary > div:last-child > div {
  min-height: 28px;
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

.inventory-stat-panel__primary > div:last-child span:last-child {
  font-size: 13px !important;
}

.inventory-stat-panel__primary > div:last-child span:first-child {
  font-size: 10px !important;
  color: rgba(226, 219, 202, 0.78) !important;
}

.inventory-stat-panel__secondary > div:last-child > * + * {
  margin-top: 4px !important;
}

.inventory-stat-panel__secondary button {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
}

.inventory-bonus-panel__list > * + * {
  margin-top: 5px !important;
}

.inventory-bonus-panel__list > div {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

.inventory-bonus-panel__list > div > div:last-child {
  font-size: 14px !important;
}

.inventory-bonus-panel__list > div > div:first-child {
  font-size: 10px !important;
  line-height: 1.25 !important;
}

.combat-screen-layout {
  position: relative;
  grid-template-columns: minmax(0, 1fr);
}

.combat-screen-field-column,
.combat-screen-fight-card,
.combat-screen-fight-field {
  min-height: 0;
}

.combat-screen-field-column {
  position: relative;
}

.combat-screen-fight-card {
  height: 100%;
}

.combat-screen-fight-field {
  width: 100%;
  height: 100%;
}

.combat-quest-status {
  position: absolute;
  top: 8px;
  left: auto;
  right: calc(50% + 52px);
  z-index: 45;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: min(270px, calc(50% - 24px));
  min-height: 2rem;
  padding: 0.42rem 0.66rem;
  border: 1px solid rgba(217, 184, 129, 0.58);
  border-radius: 0.32rem;
  background: rgba(5, 9, 17, 0.86);
  color: rgba(255, 235, 180, 0.94);
  font-family: var(--font-ui, inherit);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 20px rgba(0, 0, 0, 0.32);
}

@media (max-width: 700px) {
  .combat-quest-status {
    top: 48px;
    left: 12px;
    right: auto;
    max-width: calc(100% - 24px);
  }
}

.combat-quest-status > span {
  color: rgba(232, 220, 190, 0.68);
}

.combat-quest-status > strong {
  color: #ffe8a3;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

.combat-quest-status:hover,
.combat-quest-status:focus-visible {
  border-color: rgba(255, 220, 130, 0.88);
  background: rgba(40, 30, 12, 0.9);
  outline: none;
}

.combat-quest-status--complete {
  animation: combatQuestCompletePulse 1.2s ease-in-out infinite;
  border-color: rgba(127, 222, 145, 0.78);
  color: #dfffdc;
}

.combat-quest-status--complete > strong {
  color: #9eefad;
}

@keyframes combatQuestCompletePulse {
  0%,
  100% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 10px 20px rgba(0, 0, 0, 0.32),
      0 0 0 rgba(127, 222, 145, 0);
  }
  50% {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.18),
      0 10px 20px rgba(0, 0, 0, 0.32),
      0 0 22px rgba(127, 222, 145, 0.38);
  }
}

.combat-screen-info-drawer {
  color: inherit;
  min-height: 0;
}

.combat-screen-info-summary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  width: 100%;
  min-height: 2rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgb(var(--brass-rgb) / 0.35);
  border-radius: 0.35rem;
  background: rgba(7, 10, 18, 0.86);
  color: rgb(var(--parchment-rgb) / 0.88);
  cursor: default;
  list-style: none;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.combat-screen-info-summary::-webkit-details-marker {
  display: none;
}

.combat-screen-info-summary > span:first-child {
  color: rgb(var(--gold-rgb));
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.combat-screen-info-summary > span:last-child {
  color: rgb(var(--lavender-rgb) / 0.72);
  font-size: 0.66rem;
}

.combat-screen-info-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.combat-screen-info-drawer[open] .combat-screen-info-body {
  display: flex;
  flex-direction: column;
}

.combat-screen-info-body > div {
  min-height: 0 !important;
  height: 100% !important;
  max-height: 100% !important;
  border-radius: 0.35rem !important;
}

.combat-screen-mercenary-panel {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.5rem;
  min-height: 3.6rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgb(var(--brass-rgb) / 0.22);
  border-radius: 0.35rem;
  background: rgba(7, 10, 18, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.combat-screen-mercenary-portrait {
  width: 2.55rem !important;
  height: 2.55rem !important;
  border-color: rgba(217, 184, 129, 0.48) !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    0 8px 14px rgba(0, 0, 0, 0.24);
}

.combat-screen-hud-dock,
.combat-screen-mercenary-panel {
  position: relative;
  z-index: 70;
  isolation: isolate;
  overflow: visible !important;
}

.combat-screen-hud-dock {
  z-index: 1200;
}

.combat-screen-mercenary-abilities {
  position: relative;
  z-index: 80;
  display: flex;
  align-items: stretch;
  gap: 0.42rem;
  margin-left: auto;
  overflow: visible;
}

.combat-screen-mercenary-ability {
  position: relative;
  display: block;
  width: 2.55rem;
  height: 2.55rem;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.36);
  border-radius: 0.28rem;
  background: rgba(0, 0, 0, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 6px 12px rgba(0, 0, 0, 0.24);
}

.combat-screen-mercenary-ability.combat-help-tip {
  overflow: visible;
}

.combat-screen-mercenary-ability.combat-help-tip > img {
  border-radius: 0.25rem;
}

.combat-screen-mercenary-ability-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 0.08rem 0.1rem;
  background: rgba(3, 6, 10, 0.84);
  color: rgba(255, 246, 220, 0.86);
  font-family: var(--font-ui);
  font-size: 0.46rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0;
}

.combat-screen-mercenary-cooldown {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 0.5rem;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 1),
    0 0 8px rgba(0, 0, 0, 0.95);
}

.combat-screen-proc-row {
  position: relative;
  z-index: 80;
  min-height: 1.18rem;
  margin-bottom: 0.25rem !important;
  overflow: visible !important;
}

.combat-screen-status-row {
  position: relative;
  z-index: 1300;
  overflow: visible !important;
}

.combat-screen-status-row .combat-help-tip {
  overflow: visible !important;
}

.combat-screen-mercenary-chip {
  display: none !important;
}

.combat-screen-unit-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.46rem;
  padding: 0.72rem 0.88rem;
  border: 2px solid rgba(217, 184, 129, 0.54);
  border-radius: 0.42rem;
  background:
    linear-gradient(180deg, rgba(22, 20, 25, 0.96), rgba(4, 6, 10, 0.9)),
    radial-gradient(circle at 12% 0%, rgba(217, 184, 129, 0.2), transparent 34%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 246, 210, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.72),
    0 14px 30px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(2px);
  overflow: visible;
}

.combat-screen-unit-frame::before {
  content: "";
  position: absolute;
  inset: 0.24rem;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-radius: 0.26rem;
  pointer-events: none;
}

.combat-screen-unit-frame h3 {
  font-size: 1.18rem !important;
  line-height: 1.02 !important;
  letter-spacing: 0 !important;
}

.combat-screen-unit-title {
  display: flex !important;
  align-items: baseline;
  gap: 1.15rem;
  min-width: 0;
}

.combat-screen-unit-title > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.combat-screen-unit-level {
  flex: 0 0 auto;
  color: rgba(232, 220, 190, 0.72);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.combat-screen-enemy-frame .combat-screen-unit-title {
  justify-content: flex-end;
}

.combat-screen-enemy-frame--boss {
  padding: 0.45rem 0.55rem 0.5rem;
  border: 1px solid rgba(239, 190, 93, 0.72);
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(83, 31, 24, 0.28), rgba(5, 10, 19, 0.78) 58%, rgba(109, 69, 21, 0.2));
  box-shadow: 0 0 0 1px rgba(255, 222, 143, 0.13), 0 0 24px rgba(225, 139, 54, 0.2), inset 0 1px 0 rgba(255, 238, 196, 0.12);
}

.combat-screen-enemy-frame--boss .combat-screen-enemy-hp-bar {
  border-color: rgba(244, 185, 86, 0.72) !important;
  box-shadow: 0 0 10px rgba(225, 118, 49, 0.25);
}

.combat-screen-boss-badge {
  flex: 0 0 auto;
  margin-left: 0.45rem;
  padding: 0.2rem 0.48rem;
  border: 1px solid rgba(246, 199, 94, 0.82);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(93, 35, 24, 0.94), rgba(16, 10, 14, 0.96));
  color: #f5cc71;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(235, 153, 56, 0.28);
}

.combat-screen-unit-frame p {
  font-size: 0.58rem !important;
  line-height: 1.1 !important;
  letter-spacing: 0 !important;
}

.combat-screen-unit-frame > div:first-child {
  align-items: center !important;
  margin-bottom: 0.18rem !important;
}

.combat-screen-unit-frame > div:first-child > span {
  display: none !important;
}

.combat-screen-unit-frame .combat-screen-hp-bar,
.combat-screen-meter-bar {
  position: relative;
  height: 1.28rem !important;
  border: 2px solid rgba(217, 184, 129, 0.5) !important;
  border-radius: 0.2rem !important;
  background:
    linear-gradient(180deg, rgba(5, 5, 8, 0.98), rgba(16, 12, 11, 0.9)) !important;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(0, 0, 0, 0.35);
}

.combat-screen-unit-frame .combat-screen-hp-bar::before,
.combat-screen-unit-frame .combat-screen-hp-bar::after {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  pointer-events: none;
  color: rgba(255, 246, 220, 0.92);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.combat-screen-unit-frame .combat-screen-hp-bar::before,
.combat-screen-meter-label {
  left: 0.48rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.combat-screen-unit-frame .combat-screen-hp-bar::before {
  content: attr(data-meter-label);
}

.combat-screen-class-meter .combat-screen-meter-label {
  color: var(--combat-class-meter-color, rgba(255, 246, 220, 0.92));
  min-width: 0;
  justify-content: flex-start;
}

.combat-screen-class-meter {
  border-color: color-mix(in srgb, var(--combat-class-meter-color, #d9b881) 58%, rgba(217, 184, 129, 0.34)) !important;
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.78),
    0 0 0 1px rgba(0, 0, 0, 0.36),
    0 0 16px color-mix(in srgb, var(--combat-class-meter-color, #d9b881) 24%, transparent);
}

.combat-screen-class-meter > div {
  position: relative;
  overflow: hidden;
}

.combat-screen-class-meter > div::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--combat-class-meter-color, #d9b881) 20%, transparent) 44%, rgba(255, 255, 255, 0.72) 82%, transparent 100%);
  opacity: 0.46;
  transform: translateX(-105%);
  pointer-events: none;
}

.combat-screen-class-meter.is-ready,
.combat-screen-class-meter.is-active {
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, 0.78),
    0 0 0 1px color-mix(in srgb, var(--combat-class-meter-color, #d9b881) 40%, rgba(0, 0, 0, 0.36)),
    0 0 20px color-mix(in srgb, var(--combat-class-meter-color, #d9b881) 46%, transparent),
    0 0 38px color-mix(in srgb, var(--combat-class-meter-color, #d9b881) 28%, transparent);
}

.combat-screen-class-meter.is-active > div::after,
.combat-screen-class-meter.is-ready > div::after {
  animation: sidebar-meter-comet-tail 0.78s ease-in-out infinite;
  opacity: 0.82;
}

.combat-screen-unit-frame .combat-screen-hp-bar::after,
.combat-screen-meter-value {
  right: 0.42rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.combat-screen-unit-frame .combat-screen-hp-bar::after {
  content: attr(data-meter-value);
}

.combat-screen-meter-label,
.combat-screen-meter-value {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: flex;
  max-width: calc(50% - 0.55rem);
  transform: translateY(-50%);
  align-items: center;
  overflow: hidden;
  pointer-events: none;
  color: rgba(255, 246, 220, 0.92);
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}

.combat-screen-meter-label {
  left: 0.48rem;
  text-transform: uppercase;
}

@media (min-width: 1024px) {
  .combat-screen-player-side .combat-screen-meter-value {
    right: clamp(3rem, 4vw, 3.6rem);
  }
}

.combat-screen-player-hp-bar > div:first-child {
  background: linear-gradient(180deg, #84F3A8 0%, #1FBF71 54%, #0D6F45 100%) !important;
  box-shadow: inset 0 1px 0 rgba(220, 255, 232, 0.45) !important;
}

.combat-screen-enemy-hp-bar > div:first-child {
  background: linear-gradient(180deg, #f08d74 0%, #c72f2f 54%, #6f1722 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 231, 210, 0.42) !important;
}

.nightblade-slash-anchor {
  position: relative;
  width: 100%;
  isolation: isolate;
}

.nightblade-slash-vfx {
  position: absolute;
  inset: 0;
  z-index: 24;
  overflow: visible;
  pointer-events: none !important;
}

.nightblade-slash-vfx__stroke {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: min(var(--nightblade-slash-length), 62vw);
  height: var(--nightblade-slash-thickness);
  border-radius: 999px;
  opacity: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(148, 8, 20, 0.18) 8%,
    rgba(255, 42, 50, 0.95) 24%,
    #fff8ef 48%,
    #ffffff 56%,
    rgba(255, 35, 43, 0.96) 76%,
    transparent 100%
  );
  box-shadow:
    0 0 calc(3px * var(--nightblade-slash-flare)) rgba(255, 244, 224, 0.96),
    0 0 calc(8px * var(--nightblade-slash-flare)) rgba(255, 34, 45, 0.9),
    0 0 calc(15px * var(--nightblade-slash-flare)) rgba(156, 0, 18, 0.65);
  transform-origin: center;
  animation: nightblade-slash-strike var(--nightblade-slash-duration)
    cubic-bezier(0.16, 0.78, 0.18, 1) both;
  will-change: transform, opacity, filter;
}

.nightblade-slash-vfx__stroke::before,
.nightblade-slash-vfx__stroke::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.nightblade-slash-vfx__stroke::before {
  inset: -3px -5px;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 17, 31, 0.04) 12%,
    rgba(255, 31, 42, 0.74) 48%,
    rgba(255, 89, 54, 0.18) 84%,
    transparent
  );
  filter: blur(3px);
}

.nightblade-slash-vfx__stroke::after {
  top: 50%;
  left: 14%;
  right: 8%;
  height: max(1px, calc(var(--nightblade-slash-thickness) * 0.28));
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, #ffffff 42%, #fff3df 72%, transparent);
  transform: translateY(-50%);
  filter: drop-shadow(0 0 2px #ffffff);
}

@keyframes nightblade-slash-strike {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--nightblade-slash-angle)) scaleX(0.08) scaleY(0.7);
    filter: blur(2px) brightness(1.25);
  }
  24% {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--nightblade-slash-angle)) scaleX(1) scaleY(1.08);
    filter: blur(0) brightness(1.45);
  }
  58% {
    opacity: 0.92;
    transform: translate(-50%, -50%) rotate(var(--nightblade-slash-angle)) scaleX(1.04) scaleY(0.9);
    filter: blur(0) brightness(1.12);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--nightblade-slash-angle)) scaleX(1.12) scaleY(0.52);
    filter: blur(1.4px) brightness(0.82);
  }
}

html.reduce-motion .nightblade-slash-vfx__stroke {
  animation-name: nightblade-slash-reduced;
  animation-duration: 150ms;
}

@keyframes nightblade-slash-reduced {
  0%,
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--nightblade-slash-angle));
  }
  45% {
    opacity: 0.72;
    transform: translate(-50%, -50%) rotate(var(--nightblade-slash-angle));
  }
}

@media (prefers-reduced-motion: reduce) {
  .nightblade-slash-vfx__stroke {
    animation-name: nightblade-slash-reduced;
    animation-duration: 150ms;
  }
}

.combat-screen-resource-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: repeat(2, 1.28rem);
  gap: 0.38rem 0.58rem !important;
  align-items: stretch !important;
}

.combat-screen-resource-row > div:first-child,
.combat-screen-resource-row > div:nth-child(2) {
  width: 100% !important;
  height: 1.28rem !important;
  border-radius: 0.16rem !important;
}

.combat-screen-resource-row > .combat-screen-mana-meter {
  grid-column: 1;
  grid-row: 1;
}

.combat-screen-resource-row > .combat-screen-class-meter {
  grid-column: 1;
  grid-row: 2;
}

.combat-screen-resource-row > .combat-help-tip {
  align-self: center;
  justify-self: center;
  width: 2.35rem !important;
  height: 2.35rem !important;
  border: 2px solid rgba(217, 184, 129, 0.52) !important;
  border-radius: 0.28rem !important;
  background:
    linear-gradient(180deg, rgba(18, 18, 23, 0.94), rgba(4, 6, 10, 0.88)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.08),
    0 6px 12px rgba(0, 0, 0, 0.28);
}

.combat-screen-resource-row > .combat-help-tip img {
  width: 1.78rem !important;
  height: 1.78rem !important;
}

.combat-screen-resource-row > .combat-help-tip:nth-child(3) {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.combat-screen-resource-row > .combat-help-tip:nth-child(4) {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.combat-screen-class-effects {
  position: relative;
  z-index: 82;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
  margin-top: 0.42rem;
  overflow: visible;
}

.combat-screen-class-effect {
  position: relative;
  display: grid;
  min-width: 0;
  height: 2.05rem;
  place-items: center;
  overflow: visible;
  border: 1px solid color-mix(in srgb, var(--quick-color, #d9b881) 48%, rgba(217, 184, 129, 0.24));
  border-radius: 0.26rem;
  background:
    radial-gradient(circle at 50% 8%, color-mix(in srgb, var(--quick-color, #d9b881) 24%, transparent), transparent 54%),
    linear-gradient(180deg, rgba(18, 18, 23, 0.94), rgba(4, 6, 10, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.08),
    0 6px 13px rgba(0, 0, 0, 0.28),
    0 0 12px color-mix(in srgb, var(--quick-color, #d9b881) 20%, transparent);
}

.combat-screen-class-effect.has-image img {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.18rem;
  object-fit: cover;
  filter: saturate(1.06) drop-shadow(0 0 6px color-mix(in srgb, var(--quick-color, #d9b881) 36%, transparent));
}

.combat-screen-class-effect__glyph {
  color: var(--quick-color, #d9b881);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 8px var(--quick-color, #d9b881);
}

.combat-screen-class-effect__label {
  position: absolute;
  right: 0.18rem;
  bottom: 0.12rem;
  z-index: 3;
  padding: 0 0.16rem;
  border-radius: 0.12rem;
  background: rgba(3, 6, 10, 0.8);
  color: color-mix(in srgb, var(--quick-color, #d9b881) 76%, white);
  font-family: var(--font-ui);
  font-size: 0.43rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
}

.combat-screen-class-effect.is-active {
  border-color: color-mix(in srgb, var(--quick-color, #d9b881) 86%, rgba(255, 255, 255, 0.28));
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.12),
    0 0 18px color-mix(in srgb, var(--quick-color, #d9b881) 52%, transparent),
    0 0 30px color-mix(in srgb, var(--quick-color, #d9b881) 28%, transparent);
}

.combat-screen-class-effect.is-active::before {
  content: "";
  position: absolute;
  inset: -0.12rem;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--quick-color, #d9b881) 42%, transparent), transparent 62%);
  opacity: 0.56;
  animation: sidebar-quick-card-pulse 1.35s ease-in-out infinite;
  pointer-events: none;
}

.combat-screen-class-effect.is-inactive,
.combat-screen-class-effect.is-consumed:not(.is-active) {
  opacity: 0.55;
  filter: grayscale(0.32);
}

.combat-screen-class-effect.is-consumed:not(.is-active)::after {
  content: "USED";
  position: absolute;
  inset: auto 0.18rem 0.14rem 0.18rem;
  z-index: 4;
  border-radius: 0.12rem;
  background: rgba(3, 6, 10, 0.86);
  color: rgba(232, 220, 198, 0.72);
  font-family: var(--font-ui);
  font-size: 0.42rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0;
}

@media (prefers-reduced-motion: reduce) {
  .combat-screen-class-meter.is-active > div::after,
  .combat-screen-class-meter.is-ready > div::after,
  .combat-screen-class-effect.is-active::before {
    animation: none !important;
  }
}

.combat-screen-class-effects {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.42rem !important;
  width: max-content;
  max-width: 100%;
}

.combat-screen-class-effect {
  flex: 0 0 2.55rem;
  width: 2.55rem !important;
  height: 2.55rem !important;
  aspect-ratio: 1;
}

.combat-screen-class-effect.has-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 0.2rem;
}

.combat-screen-class-effect__label {
  left: 0.16rem;
  right: 0.16rem;
  bottom: 0.12rem;
  text-align: center;
}

.combat-screen-unit-art {
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid rgba(217, 184, 129, 0.78);
  border-radius: 0.42rem;
  background: radial-gradient(circle, rgba(25, 21, 28, 0.94), rgba(5, 8, 13, 0.92));
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.62),
    inset 0 0 0 4px rgba(217, 184, 129, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.48);
}

.combat-screen-unit-art > img:last-child {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
}

.combat-screen-enemy-frame > div:nth-child(n + 3):not(.combat-screen-enemy-info) {
  display: none !important;
}

.combat-screen-enemy-info {
  position: relative;
  z-index: 8;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.04rem;
  overflow: visible;
}

.combat-screen-enemy-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.28rem;
  min-width: 0;
}

.combat-screen-enemy-stat {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.22rem;
  padding: 0.24rem 0.32rem;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 0.2rem;
  background: rgba(2, 6, 12, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 246, 210, 0.035);
}

.combat-screen-enemy-stat__label {
  overflow: hidden;
  color: rgba(217, 184, 129, 0.68);
  font-family: var(--font-ui);
  font-size: 0.46rem;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.combat-screen-enemy-stat__value {
  flex: 0 0 auto;
  color: rgba(241, 235, 220, 0.92);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1;
}

.combat-screen-enemy-stat.is-penalized .combat-screen-enemy-stat__value {
  color: rgba(248, 113, 113, 0.92);
}

.combat-screen-enemy-abilities {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  overflow: visible;
}

.combat-screen-enemy-abilities__label {
  color: rgba(217, 184, 129, 0.62);
  font-family: var(--font-ui);
  font-size: 0.45rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.combat-screen-enemy-ability-list {
  display: flex;
  min-width: 0;
  gap: 0.26rem;
  overflow: visible;
}

.combat-screen-enemy-ability-list > div {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.2rem 0.36rem !important;
  overflow: hidden;
}

.combat-screen-enemy-ability-list > div > span {
  display: block;
  overflow: hidden;
  font-size: 0.52rem !important;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dungeon-combat-enemy-panel > .combat-screen-enemy-info {
  margin-top: 0.38rem;
}

@media (min-width: 1024px) {
  .combat-screen-layout {
    height: 100%;
    overflow: hidden;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr) !important;
    position: relative;
  }

  .combat-screen-field-column {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100%;
    height: 100%;
  }

  .combat-screen-field-column,
  .combat-screen-fight-card {
    height: 100%;
  }

  .combat-screen-fight-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    grid-template-rows: minmax(280px, 1fr) minmax(300px, 38vh);
    gap: 0.75rem;
    overflow: hidden;
  }

  .combat-stage-shell {
    grid-column: 1 / -1;
    grid-row: 1;
    flex: none !important;
    min-height: 0 !important;
    height: 100% !important;
    margin-bottom: 0 !important;
  }

  .combat-screen-fight-grid {
    height: 100%;
    grid-template-rows: minmax(0, 1fr) !important;
    align-items: start;
  }

  .combat-screen-hud-dock {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    left: auto;
    bottom: auto;
    z-index: 70;
    width: 100%;
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding-right: 0;
  }

  .combat-screen-feed-dock {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 30;
    display: flex;
    flex-direction: column;
    width: min(34vw, 520px);
    height: min(36vh, 310px);
    max-height: none;
    min-height: 0;
  }

  .combat-screen-feed-dock .combat-screen-info-summary {
    flex: 0 0 auto;
    margin-bottom: 0.45rem;
  }

  .combat-screen-stat-strip {
    position: absolute;
    left: 1rem;
    top: 0.9rem;
    bottom: auto;
    z-index: 27;
    width: min(34vw, 500px);
    display: flex !important;
    grid-template-columns: none;
    gap: 0.3rem;
  }

  .combat-screen-stat-strip > div {
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    padding: 0.3rem 0.38rem !important;
    opacity: 0.82;
    background: rgba(7, 10, 18, 0.48) !important;
  }

  .combat-screen-stat-strip > div > div:first-child {
    font-size: 0.45rem !important;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .combat-screen-stat-strip > div > div:last-child {
    font-size: 0.76rem !important;
    line-height: 1.1;
    margin-top: 0 !important;
  }

  .combat-screen-player-side {
    grid-row: 1 / -1 !important;
    align-self: center;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0.7rem !important;
    width: fit-content;
    max-width: min(48vw, 720px);
    padding-top: 0;
    padding: 0.5rem;
    border: 2px solid rgba(217, 184, 129, 0.58);
    border-radius: 0.52rem;
    background:
      linear-gradient(180deg, rgba(22, 20, 25, 0.96), rgba(4, 6, 10, 0.9)),
      radial-gradient(circle at 14% 8%, rgba(122, 167, 210, 0.16), transparent 38%);
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.72),
      inset 0 1px 0 rgba(255, 246, 210, 0.1),
      0 14px 30px rgba(0, 0, 0, 0.42);
    transform: translateY(0.85rem);
  }

  .combat-screen-enemy-side {
    grid-row: 1 / -1 !important;
    align-self: center;
    justify-self: end;
    flex-direction: row !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 0.7rem !important;
    width: fit-content;
    max-width: min(42vw, 640px);
    padding: 0.5rem;
    border: 2px solid rgba(217, 184, 129, 0.58);
    border-radius: 0.52rem;
    background:
      linear-gradient(180deg, rgba(22, 20, 25, 0.96), rgba(4, 6, 10, 0.9)),
      radial-gradient(circle at 86% 8%, rgba(210, 74, 74, 0.14), transparent 38%);
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.72),
      inset 0 1px 0 rgba(255, 246, 210, 0.1),
      0 14px 30px rgba(0, 0, 0, 0.42);
    transform: translateY(0.85rem);
  }

  .combat-screen-player-side > .combat-screen-unit-art {
    order: 0;
  }

  .combat-screen-player-side > .combat-screen-unit-frame {
    order: 1 !important;
    width: min(38vw, 520px);
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0.35rem 0.45rem;
    border: 0;
    border-left: 1px solid rgba(217, 184, 129, 0.24);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .combat-screen-enemy-side > .combat-screen-unit-frame {
    order: 0 !important;
    width: min(32vw, 430px);
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0.35rem 0.45rem;
    border: 0;
    border-right: 1px solid rgba(217, 184, 129, 0.24);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .combat-screen-player-side > .combat-screen-unit-frame::before,
  .combat-screen-enemy-side > .combat-screen-unit-frame::before {
    display: none;
  }

  .combat-screen-player-side > .combat-screen-unit-art,
  .combat-screen-enemy-side > .combat-screen-unit-art {
    width: clamp(7.5rem, 15vh, 9rem) !important;
    height: clamp(7.5rem, 15vh, 9rem) !important;
    max-width: clamp(7.5rem, 15vh, 9rem) !important;
    margin-top: 0;
    flex: 0 0 auto;
    z-index: 2;
    border: 1px solid rgba(217, 184, 129, 0.34);
    box-shadow:
      inset 0 0 0 2px rgba(0, 0, 0, 0.62),
      inset 0 0 0 4px rgba(217, 184, 129, 0.1);
  }

  .combat-screen-player-side > .combat-screen-unit-art {
    margin-right: 0;
    border-radius: 0.34rem;
  }

  .combat-screen-enemy-side > .combat-screen-unit-art {
    order: 1 !important;
    align-self: flex-end;
    margin-left: 0;
    border-radius: 0.34rem;
  }

  .combat-screen-player-side > .combat-screen-unit-art > img:first-child:not(:last-child) {
    height: 58px !important;
    max-width: 30% !important;
    left: 1% !important;
    opacity: 0.78 !important;
  }

  .combat-screen-mercenary-chip {
    margin-top: 0.35rem !important;
    width: fit-content;
    max-width: 100%;
    gap: 0.35rem !important;
    padding: 0.25rem 0.45rem !important;
  }

  .combat-screen-mercenary-chip > span:first-child {
    width: 0.45rem !important;
    height: 0.45rem !important;
  }

  .combat-screen-mercenary-chip img,
  .combat-screen-mercenary-chip > span:last-child {
    width: 1.25rem !important;
    height: 1.25rem !important;
  }

  .combat-screen-mercenary-chip > div > div:last-child {
    display: none !important;
  }

}

/* Full combat page repair: reserve space for the arena, ability dock, mercenary, and info report. */
@media (min-width: 1024px) {
  .combat-screen-root--page {
    height: clamp(600px, calc(100vh - 96px), 780px);
    min-height: 600px;
    overflow: hidden;
  }

  .combat-screen-root--page .combat-screen-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) !important;
    grid-template-rows: clamp(310px, 40vh, 370px) minmax(235px, 1fr) !important;
    gap: 0.75rem !important;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .combat-screen-root--page .combat-screen-field-column,
  .combat-screen-root--page .combat-screen-fight-card {
    height: 100%;
    min-height: 0;
  }

  .combat-screen-root--page .combat-screen-field-column {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    width: 100%;
  }

  .combat-screen-root--page .combat-screen-fight-card {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) !important;
    grid-template-rows: clamp(310px, 40vh, 370px) minmax(235px, 1fr) !important;
    align-items: stretch;
    width: 100%;
    min-height: 0 !important;
    overflow: hidden;
  }

  .combat-screen-root--page .combat-stage-shell {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 0 !important;
    height: 100% !important;
  }

  .combat-screen-root--page .combat-screen-hud-dock {
    grid-column: 1;
    grid-row: 2;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: visible;
  }

  .combat-screen-root--page .combat-screen-feed-dock {
    grid-column: 2;
    grid-row: 2;
    position: relative;
    inset: auto;
    right: auto;
    bottom: auto;
    z-index: 70;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
    max-height: none;
  }

  .combat-screen-root--page .combat-screen-info-body {
    flex: 1 1 auto;
    min-height: 0;
  }

  .combat-screen-root--page .combat-ability-dock {
    margin-top: 0.25rem !important;
  }

  .combat-screen-root--page .combat-screen-proc-row,
  .combat-screen-root--page .combat-screen-status-row {
    margin-top: 0 !important;
    margin-bottom: 0.3rem !important;
  }

  .combat-screen-root--page .combat-screen-mercenary-panel {
    flex-wrap: wrap;
    width: 100%;
  }
}

@media (max-width: 1023px) {
  .combat-screen-fight-field {
    min-height: 520px !important;
  }

  .combat-screen-fight-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
  }

  .combat-screen-player-side,
  .combat-screen-enemy-side {
    grid-column: 1 !important;
    grid-row: auto !important;
    padding: 0 !important;
  }

  .combat-screen-enemy-side {
    align-items: flex-end;
  }

  .combat-screen-hud-dock,
  .combat-screen-feed-dock,
  .combat-screen-stat-strip {
    position: relative;
    width: 100%;
    max-height: none;
  }

  .combat-screen-info-drawer[open] .combat-screen-info-body {
    width: 100%;
    margin-top: 0.5rem;
  }
}

.combat-help-tip[data-help] {
  position: relative;
  overflow: visible !important;
}

.combat-help-tip[data-help]::after {
  content: none !important;
  display: none !important;
}

[data-item-tooltip="true"] {
  z-index: 2147483647 !important;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgb(8, 18, 34), rgb(3, 8, 17)) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow:
    0 22px 46px rgba(0, 0, 0, 0.82),
    inset 0 1px 0 rgba(255, 246, 210, 0.07) !important;
}

[data-item-tooltip="true"]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgb(3, 8, 17);
  pointer-events: none;
}

.inventory-tooltip-gem-remove {
  appearance: none;
  margin: -4px -5px;
  padding: 4px 5px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.inventory-tooltip-gem-remove:hover {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(127, 29, 29, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 230, 210, 0.04);
}

.inventory-tooltip-gem-remove:focus-visible {
  outline: 2px solid rgba(248, 191, 90, 0.88);
  outline-offset: 2px;
}

.inventory-tooltip-gem-remove:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.inventory-tooltip-gem-remove__action {
  margin-top: 4px;
  color: #f0b454;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1.25;
  text-transform: uppercase;
}

.inventory-tooltip-gem-remove:hover .inventory-tooltip-gem-remove__action {
  color: #ffd78b;
}

/* Ring-only comparison: give both equipped slots fixed, unmistakable columns. */
[data-item-tooltip="true"] .ring-diff-stats {
  border: 1px solid rgba(190, 151, 75, 0.2);
  background:
    linear-gradient(180deg, rgba(29, 23, 27, 0.72), rgba(4, 8, 16, 0.88));
  box-shadow: inset 0 1px 0 rgba(255, 236, 191, 0.035);
}

[data-item-tooltip="true"] .ring-diff-panel {
  margin: -2px -2px 7px;
  padding: 0 0 7px;
  border-bottom: 1px solid rgba(190, 151, 75, 0.2);
}

[data-item-tooltip="true"] .ring-diff-panel__title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #e3bd62;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

[data-item-tooltip="true"] .ring-diff-panel__rings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 7px;
}

[data-item-tooltip="true"] .ring-diff-panel__ring {
  min-width: 0;
  padding: 6px 7px;
  border-left: 2px solid rgba(178, 135, 67, 0.72);
  background: rgba(4, 8, 17, 0.76);
}

[data-item-tooltip="true"] .ring-diff-panel__ring > span {
  display: block;
  margin-bottom: 2px;
  color: rgba(205, 195, 210, 0.62);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

[data-item-tooltip="true"] .ring-diff-panel__ring > strong {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--font-serif, serif);
  font-size: 10px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

[data-item-tooltip="true"] .ring-diff-panel__columns,
[data-item-tooltip="true"] .ring-diff-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 78px 60px 60px;
  align-items: center;
  column-gap: 4px;
}

[data-item-tooltip="true"] .ring-diff-panel__columns {
  color: rgba(203, 194, 208, 0.54);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

[data-item-tooltip="true"] .ring-diff-panel__columns > span:first-child {
  text-align: left;
}

[data-item-tooltip="true"] .ring-diff-stat-row {
  min-height: 23px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  font-size: 10px;
}

[data-item-tooltip="true"] .ring-diff-stat-row:last-of-type {
  border-bottom: 0;
}

[data-item-tooltip="true"] .ring-diff-stat-label {
  min-width: 0;
  overflow: hidden;
  color: rgba(205, 195, 210, 0.72);
  text-overflow: ellipsis;
  white-space: nowrap;
}

[data-item-tooltip="true"] .ring-diff-stat-values {
  display: grid;
  grid-column: 2 / 5;
  grid-template-columns: 78px 60px 60px;
  align-items: center;
  column-gap: 4px;
}

[data-item-tooltip="true"] .ring-diff-stat-value {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

[data-item-tooltip="true"] .ring-diff-stat-value--item {
  padding-right: 4px;
  border-right: 1px solid rgba(190, 151, 75, 0.16);
}

@media (max-width: 399px) {
  [data-item-tooltip="true"] .ring-diff-panel__columns,
  [data-item-tooltip="true"] .ring-diff-stat-row {
    grid-template-columns: minmax(0, 1fr) 68px 48px 48px;
  }

  [data-item-tooltip="true"] .ring-diff-stat-values {
    grid-template-columns: 68px 48px 48px;
  }
}

:root {
  --vespera-cursor-default: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 3 25 16 15 18 11 28 5 3Z' fill='%23d9b881' stroke='%23080b14' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M8 7 20 15 13 16 10 23 8 7Z' fill='%23fff3c4' opacity='.58'/%3E%3C/svg%3E") 5 3, auto;
  --vespera-cursor-pointer: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M5 3 25 16 15 18 11 28 5 3Z' fill='%23f3cf79' stroke='%23080b14' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M8 7 20 15 13 16 10 23 8 7Z' fill='%23fff7d1' opacity='.68'/%3E%3C/svg%3E") 5 3, pointer;
}

html,
body,
#root,
#root * {
  cursor: var(--vespera-cursor-default) !important;
}

html,
body,
body * {
  -webkit-user-select: none;
  user-select: none;
}

#root button,
#root a,
#root [role="button"],
#root summary,
#root label,
#root select,
#root input[type="button"],
#root input[type="checkbox"],
#root input[type="radio"],
#root input[type="range"],
#root input[type="reset"],
#root input[type="submit"],
#root .cursor-pointer,
#root .auto-help-button,
#root [data-help] {
  cursor: var(--vespera-cursor-pointer) !important;
}

.celestial-forge-tab {
  --forge-panel: rgba(4, 11, 23, 0.78);
  --forge-border: rgba(217, 184, 129, 0.18);
  --forge-crimson: #d96262;
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

.celestial-forge-crucible {
  position: relative;
  isolation: isolate;
  min-height: 196px;
  padding: 22px;
  background:
    linear-gradient(90deg, rgba(3, 8, 17, 0.94) 0%, rgba(3, 8, 17, 0.42) 45%, rgba(3, 8, 17, 0.88) 100%),
    linear-gradient(180deg, rgba(2, 7, 16, 0.28), rgba(2, 7, 16, 0.72)),
    radial-gradient(circle at 19% 0%, rgba(248, 212, 139, 0.2), transparent 34%),
    radial-gradient(circle at 78% 18%, rgba(124, 58, 237, 0.18), transparent 42%),
    url("./celestial/celestial-forge-panel.webp") center 52% / cover no-repeat,
    linear-gradient(135deg, rgba(8, 18, 33, 0.94), rgba(3, 8, 17, 0.9));
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.celestial-forge-crucible::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 58%, rgba(248, 212, 139, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.38));
}

.celestial-forge-crucible__glow {
  position: absolute;
  z-index: 1;
  inset: auto 18% -44px 18%;
  height: 90px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(248, 212, 139, 0.2), transparent 68%);
  filter: blur(8px);
}

.celestial-forge-crucible__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.celestial-forge-crucible__copy {
  max-width: 720px;
  min-width: 0;
}

.celestial-forge-crucible__kicker {
  color: var(--color-brass, #d9b881);
  font: 1000 11px/1 var(--font-ui, inherit);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.celestial-forge-crucible__title {
  margin-top: 7px;
  color: var(--color-parchment, #f4e8d0);
  font: 900 clamp(30px, 4vw, 48px) / 0.95 var(--font-serif, serif);
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(217, 184, 129, 0.18);
}

.celestial-forge-crucible__text {
  margin-top: 10px;
  color: rgba(216, 207, 188, 0.74);
  font: 700 13px/1.5 var(--font-body, inherit);
}

.celestial-forge-crucible__controls {
  display: grid;
  gap: 10px;
  width: min(100%, 310px);
}

.celestial-forge-crucible__counter {
  position: relative;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(248, 212, 139, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(16, 28, 47, 0.78), rgba(2, 7, 16, 0.74)),
    radial-gradient(circle at 22% 36%, rgba(248, 212, 139, 0.18), transparent 54%);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(6px);
}

.celestial-forge-crucible__tier {
  display: grid;
  gap: 8px;
  padding: 11px 12px;
  border: 1px solid rgba(248, 212, 139, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(11, 17, 29, 0.78), rgba(2, 7, 16, 0.72)),
    radial-gradient(circle at 15% 20%, rgba(169, 139, 201, 0.18), transparent 58%);
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(6px);
}

.celestial-forge-crucible__tier-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.celestial-forge-crucible__tier-head > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.celestial-forge-crucible__tier-head > span:last-child {
  justify-items: end;
}

.celestial-forge-crucible__tier-head strong {
  color: #f5d36f;
  font: 1000 24px/0.95 var(--font-serif, serif);
  text-shadow: 0 0 12px rgba(217, 184, 129, 0.24);
}

.celestial-forge-crucible__tier-head > span:first-child strong {
  color: #decaff;
  font-size: 32px;
}

.celestial-forge-crucible__tier-head em {
  color: rgba(216, 207, 188, 0.62);
  font: 900 9px/1 var(--font-ui, inherit);
  font-style: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.celestial-forge-crucible__tier-track {
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(248, 212, 139, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.7);
}

.celestial-forge-crucible__tier-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d5ca8, #d9b881);
  box-shadow:
    0 0 12px rgba(217, 184, 129, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: width 0.3s ease;
}

.celestial-forge-crucible__flame {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(248, 212, 139, 0.64);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 239, 180, 0.78), rgba(217, 184, 129, 0.16) 48%, transparent 66%),
    rgba(0, 0, 0, 0.48);
  color: #fff2d2;
  font: 1000 18px/1 var(--font-serif, serif);
  box-shadow:
    0 0 18px rgba(217, 184, 129, 0.26),
    inset 0 0 14px rgba(0, 0, 0, 0.42);
}

.celestial-forge-crucible--spending .celestial-forge-crucible__flame {
  animation: celestialForgeCruciblePulse 520ms ease;
}

.celestial-forge-crucible__numbers {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.celestial-forge-crucible__numbers strong {
  color: #fff2d2;
  font: 1000 25px/1 var(--font-serif, serif);
}

.celestial-forge-crucible__numbers span {
  color: rgba(216, 207, 188, 0.66);
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.celestial-forge-unmake-button {
  min-height: 36px;
  border: 1px solid rgba(217, 98, 98, 0.46);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(62, 20, 24, 0.86), rgba(22, 6, 10, 0.9));
  color: #ffd3d3;
  font: 1000 11px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition:
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.celestial-forge-unmake-button:not(:disabled):hover {
  border-color: rgba(255, 173, 173, 0.78);
  color: #fff4f4;
  transform: translateY(-1px);
}

.celestial-forge-unmake-button--disabled,
.celestial-forge-unmake-button:disabled {
  border-color: rgba(217, 184, 129, 0.12);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(216, 207, 188, 0.34);
}

.celestial-forge-unmake {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(217, 98, 98, 0.36);
  border-radius: 8px;
  background:
    radial-gradient(circle at 8% 0%, rgba(217, 98, 98, 0.18), transparent 44%),
    rgba(8, 3, 8, 0.72);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.42);
}

.celestial-forge-unmake__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.celestial-forge-unmake__copy strong {
  color: #ffd3d3;
  font: 900 15px/1.1 var(--font-serif, serif);
}

.celestial-forge-unmake__copy span {
  color: rgba(244, 232, 208, 0.76);
  font: 700 12px/1.35 var(--font-body, inherit);
}

.celestial-forge-unmake__actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.celestial-forge-unmake__cancel,
.celestial-forge-unmake__confirm {
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 4px;
  font: 1000 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.celestial-forge-unmake__cancel {
  border: 1px solid rgba(217, 184, 129, 0.28);
  background: rgba(0, 0, 0, 0.36);
  color: rgba(244, 232, 208, 0.78);
}

.celestial-forge-unmake__confirm {
  border: 1px solid rgba(255, 173, 173, 0.58);
  background: linear-gradient(180deg, rgba(125, 36, 42, 0.92), rgba(58, 13, 20, 0.94));
  color: #fff4f4;
}

.celestial-forge-empty,
.celestial-forge-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background:
    linear-gradient(90deg, rgba(217, 184, 129, 0.08), transparent 74%),
    rgba(4, 11, 23, 0.68);
}

.celestial-forge-empty h2 {
  color: #fff2d2;
  font: 900 16px/1.1 var(--font-serif, serif);
}

.celestial-forge-empty p {
  margin-top: 4px;
  color: rgba(216, 207, 188, 0.7);
  font: 700 12px/1.4 var(--font-body, inherit);
}

.celestial-forge-empty__button {
  min-width: 132px;
  min-height: 34px;
  font-size: 10px;
}

.celestial-forge-note {
  justify-content: flex-start;
  color: rgba(216, 207, 188, 0.7);
  font: 700 12px/1.4 var(--font-body, inherit);
}

.celestial-forge-note span {
  color: var(--color-brass, #d9b881);
  font: 1000 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.celestial-forge-branches {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 14px;
}

.celestial-forge-shrine {
  position: relative;
  min-width: 0;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 28%, transparent);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--forge-accent, #d9b881) 14%, transparent), transparent 44%),
    linear-gradient(180deg, rgba(8, 17, 34, 0.82), rgba(2, 7, 16, 0.76));
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.celestial-forge-shrine__header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-height: 58px;
  margin-bottom: 14px;
}

.celestial-forge-shrine__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 62%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--forge-accent, #d9b881) 14%, rgba(0, 0, 0, 0.62));
  color: color-mix(in srgb, var(--forge-accent, #d9b881) 84%, #ffffff);
  font: 1000 12px/1 var(--font-ui, inherit);
  letter-spacing: 0.06em;
  box-shadow: 0 0 18px color-mix(in srgb, var(--forge-accent, #d9b881) 18%, transparent);
}

.celestial-forge-shrine__copy {
  min-width: 0;
}

.celestial-forge-shrine__title {
  color: color-mix(in srgb, var(--forge-accent, #d9b881) 80%, #fff3d8);
  font: 900 15px/1.1 var(--font-serif, serif);
  letter-spacing: 0.02em;
}

.celestial-forge-shrine__desc {
  margin-top: 5px;
  color: rgba(216, 207, 188, 0.68);
  font: 700 12px/1.32 var(--font-body, inherit);
}

.celestial-forge-shrine__rank {
  padding: 5px 7px;
  border: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 26%, transparent);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.26);
  color: rgba(244, 232, 208, 0.82);
  font: 1000 11px/1 var(--font-ui, inherit);
}

.celestial-forge-chain {
  position: relative;
  display: grid;
  gap: 12px;
  padding-left: 4px;
}

.celestial-forge-chain::before,
.celestial-forge-chain::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 31px;
  width: 1px;
  pointer-events: none;
}

.celestial-forge-chain::before {
  background: rgba(244, 232, 208, 0.12);
}

.celestial-forge-chain::after {
  height: var(--branch-progress, 0%);
  bottom: auto;
  background: linear-gradient(180deg, color-mix(in srgb, var(--forge-accent, #d9b881) 82%, #ffffff), transparent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--forge-accent, #d9b881) 48%, transparent);
}

.celestial-forge-node {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  min-height: 108px;
  padding: 10px;
  border: 1px solid rgba(244, 232, 208, 0.11);
  border-radius: 9px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--forge-accent, #d9b881) 9%, transparent), transparent 72%),
    rgba(0, 0, 0, 0.26);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.celestial-forge-node__mote {
  position: absolute;
  z-index: 4;
  left: 27px;
  top: -42px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff2d2;
  box-shadow:
    0 0 12px color-mix(in srgb, var(--forge-accent, #d9b881) 72%, transparent),
    0 0 24px rgba(248, 212, 139, 0.38);
  pointer-events: none;
  animation: celestialForgeMote 520ms ease forwards;
}

.celestial-forge-node--igniting .celestial-forge-node__socket {
  animation: celestialForgeSocketIgnite 520ms ease;
}

.celestial-forge-node--invested {
  border-color: color-mix(in srgb, var(--forge-accent, #d9b881) 26%, transparent);
}

.celestial-forge-node--maxed {
  border-color: color-mix(in srgb, var(--forge-accent, #d9b881) 54%, transparent);
  box-shadow:
    0 0 22px color-mix(in srgb, var(--forge-accent, #d9b881) 18%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.celestial-forge-node--unaffordable .celestial-forge-node__cost {
  border-color: rgba(248, 113, 113, 0.42);
  color: #fca5a5;
}

.celestial-forge-node__socket-wrap {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
}

.celestial-forge-node__socket {
  position: relative;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 44%, transparent);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--forge-accent, #d9b881) 18%, transparent), transparent 54%),
    rgba(2, 7, 16, 0.92);
  transform: none;
  box-shadow:
    0 0 18px rgba(0, 0, 0, 0.42),
    inset 0 0 18px rgba(0, 0, 0, 0.44);
}

.celestial-forge-node--maxed .celestial-forge-node__socket {
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--forge-accent, #d9b881) 52%, #fff6d5), transparent 58%),
    rgba(2, 7, 16, 0.88);
}

.celestial-forge-node__icon {
  color: color-mix(in srgb, var(--forge-accent, #d9b881) 82%, #ffffff);
  font: 1000 13px/1 var(--font-ui, inherit);
  letter-spacing: 0.04em;
  text-shadow: 0 0 12px color-mix(in srgb, var(--forge-accent, #d9b881) 44%, transparent);
  transform: none;
}

.celestial-forge-node__pips {
  position: absolute;
  inset: -9px;
  display: flex;
  flex-wrap: wrap;
  align-content: space-between;
  justify-content: center;
  gap: 3px 5px;
  pointer-events: none;
  transform: none;
}

.celestial-forge-node__pip {
  width: 5px;
  height: 5px;
  border: 1px solid rgba(244, 232, 208, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
}

.celestial-forge-node__pip--filled {
  border-color: color-mix(in srgb, var(--forge-accent, #d9b881) 82%, #ffffff);
  background: color-mix(in srgb, var(--forge-accent, #d9b881) 82%, #ffffff);
  box-shadow: 0 0 8px color-mix(in srgb, var(--forge-accent, #d9b881) 58%, transparent);
}

.celestial-forge-node__rank {
  color: rgba(244, 232, 208, 0.72);
  font: 1000 12px/1 var(--font-ui, inherit);
}

.celestial-forge-node__body {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.celestial-forge-node__name {
  color: #fff2d2;
  font: 900 14px/1.1 var(--font-serif, serif);
}

.celestial-forge-node__effect,
.celestial-forge-node__preview {
  min-height: 32px;
  color: rgba(216, 207, 188, 0.72);
  font: 700 12px/1.35 var(--font-body, inherit);
}

.celestial-forge-node__preview {
  display: flex;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 18%, transparent);
  border-radius: 7px;
  background: rgba(2, 7, 16, 0.46);
  color: rgba(244, 232, 208, 0.84);
}

.celestial-forge-node__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.celestial-forge-node__cost {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px 4px 5px;
  border: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 24%, transparent);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(244, 232, 208, 0.78);
  font: 900 11px/1 var(--font-ui, inherit);
  white-space: nowrap;
}

.celestial-forge-node__cost-mark {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 42%, transparent);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--forge-accent, #d9b881) 38%, #fff2c8), transparent 62%),
    rgba(0, 0, 0, 0.54);
  color: #fff2d2;
  font-size: 9px;
  box-shadow: 0 0 10px color-mix(in srgb, var(--forge-accent, #d9b881) 24%, transparent);
}

.celestial-forge-node__cost-value {
  color: #fff2d2;
}

.celestial-forge-node__cost-label {
  color: rgba(216, 207, 188, 0.58);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.celestial-forge-node__button {
  min-height: 28px;
  padding: 6px 10px;
  font-size: 10px;
  white-space: nowrap;
}

@media (max-width: 1360px) {
  .celestial-forge-branches {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 980px) {
  .celestial-forge-crucible__content,
  .celestial-forge-unmake,
  .celestial-forge-empty {
    align-items: stretch;
    flex-direction: column;
  }

  .celestial-forge-crucible__controls {
    width: 100%;
  }

  .celestial-forge-unmake__actions {
    width: 100%;
  }

  .celestial-forge-unmake__cancel,
  .celestial-forge-unmake__confirm {
    flex: 1;
  }
}

@media (max-width: 760px) {
  .celestial-forge-branches {
    grid-template-columns: 1fr;
  }

  .celestial-forge-node {
    grid-template-columns: 70px minmax(0, 1fr);
  }
}

@keyframes celestialForgeCruciblePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 18px rgba(217, 184, 129, 0.26),
      inset 0 0 14px rgba(0, 0, 0, 0.42);
  }

  45% {
    transform: scale(1.06);
    box-shadow:
      0 0 28px rgba(248, 212, 139, 0.46),
      inset 0 0 18px rgba(255, 239, 180, 0.18);
  }
}

@keyframes celestialForgeSocketIgnite {
  0%,
  100% {
    transform: scale(1);
  }

  46% {
    transform: scale(1.06);
    box-shadow:
      0 0 24px color-mix(in srgb, var(--forge-accent, #d9b881) 42%, transparent),
      inset 0 0 18px rgba(248, 212, 139, 0.16);
  }
}

@keyframes celestialForgeMote {
  0% {
    opacity: 0;
    transform: translate(0, -26px) scale(0.45);
  }

  18% {
    opacity: 1;
  }

  72% {
    opacity: 1;
    transform: translate(18px, 42px) scale(1);
  }

  100% {
    opacity: 0;
    transform: translate(28px, 50px) scale(0.25);
  }
}

.dungeon-combat-screen {
  max-width: none !important;
  border-color: rgba(217, 184, 129, 0.14) !important;
  background:
    radial-gradient(circle at 50% 18%, rgba(122, 167, 210, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(3, 7, 14, 0.36), rgba(2, 5, 10, 0.78));
  isolation: isolate;
  overflow: visible !important;
}

.dungeon-combat-screen,
.dungeon-combat-shell,
.dungeon-combat-body,
.dungeon-combat-left,
.dungeon-combat-right,
.dungeon-combat-active-card,
.dungeon-combat-player-panel,
.dungeon-combat-enemy-panel,
.dungeon-combat-screen .combat-ability-dock,
.dungeon-combat-screen .combat-screen-status-row,
.dungeon-combat-screen .combat-screen-resource-row,
.dungeon-combat-screen .combat-screen-class-effects {
  overflow: visible !important;
}

.dungeon-combat-toolbar {
  position: relative;
  z-index: 1800;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(217, 184, 129, 0.16);
  border-radius: 0.35rem;
  background: rgba(4, 8, 15, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.05),
    0 12px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(4px);
}

.dungeon-room-progress {
  display: grid;
  grid-template-columns: minmax(8.5rem, auto) minmax(8rem, 15rem);
  align-items: center;
  gap: 0.75rem;
  min-height: 2.4rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(217, 184, 129, 0.4);
  border-radius: 0.3rem;
  background: rgba(4, 8, 15, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 246, 210, 0.06), 0 10px 22px rgba(0, 0, 0, 0.3);
}

.dungeon-room-progress__copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  font-family: var(--font-ui);
  text-transform: uppercase;
  white-space: nowrap;
}

.dungeon-room-progress__copy strong {
  color: rgba(255, 244, 213, 0.97);
  font-size: 0.75rem;
  font-weight: 950;
  letter-spacing: 0.09em;
}

.dungeon-room-progress__copy span {
  color: rgba(217, 184, 129, 0.72);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.dungeon-room-progress__segments {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(1rem, 1fr);
  gap: 0.24rem;
}

.dungeon-room-progress__segments > span {
  height: 0.3rem;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-radius: 999px;
  background: rgba(217, 184, 129, 0.08);
}

.dungeon-room-progress__segments > span.is-complete {
  border-color: rgba(132, 205, 154, 0.58);
  background: rgba(132, 205, 154, 0.74);
}

.dungeon-room-progress__segments > span.is-current {
  border-color: rgba(245, 202, 104, 0.86);
  background: #e6b94d;
  box-shadow: 0 0 8px rgba(230, 185, 77, 0.46);
}

.dungeon-room-progress__segments > span.is-boss:not(.is-complete):not(.is-current) {
  border-color: rgba(222, 92, 92, 0.52);
  background: rgba(143, 34, 43, 0.32);
}

.dungeon-room-transition {
  position: absolute;
  top: 3.8rem;
  left: 50%;
  z-index: 2100;
  width: max-content;
  max-width: calc(100% - 2rem);
  transform: translateX(-50%);
  padding: 0.65rem 1.1rem;
  border: 1px solid rgba(132, 205, 154, 0.72);
  border-radius: 0.3rem;
  background: rgba(5, 15, 18, 0.96);
  color: #b9ecc5;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: center;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 22px rgba(73, 170, 110, 0.16);
  pointer-events: none;
  animation: dungeon-room-transition-in 180ms ease-out both;
}

@keyframes dungeon-room-transition-in {
  from { opacity: 0; transform: translate(-50%, -0.45rem); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 760px) {
  .dungeon-room-progress {
    grid-template-columns: 1fr;
    gap: 0.3rem;
    min-width: 10.5rem;
  }

  .dungeon-room-progress__copy {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.65rem;
  }

  .dungeon-room-progress__copy strong { font-size: 0.65rem; }
  .dungeon-room-progress__copy span { font-size: 0.48rem; }
}

.dungeon-combat-route {
  position: relative;
  z-index: 1700;
  padding: 0.55rem 0.7rem !important;
  border-color: rgba(217, 184, 129, 0.18) !important;
  background: rgba(4, 8, 15, 0.54) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.05),
    0 12px 26px rgba(0, 0, 0, 0.22);
}

.dungeon-combat-body {
  position: relative;
}

.dungeon-combat-recovery {
  display: flex;
  min-height: 18rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 2rem;
  border: 1px solid rgba(217, 184, 129, 0.28);
  border-radius: 0.55rem;
  background:
    radial-gradient(circle at 50% 35%, rgba(217, 184, 129, 0.08), transparent 42%),
    rgba(4, 8, 15, 0.78);
  color: rgba(216, 210, 232, 0.76);
  font-family: var(--font-ui);
  text-align: center;
}

.dungeon-combat-recovery strong {
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.dungeon-combat-recovery span {
  max-width: 34rem;
  font-size: 0.78rem;
  line-height: 1.55;
}

.dungeon-combat-screen .combat-screen-mercenary-panel {
  width: 100%;
}

.dungeon-combat-active-card {
  isolation: isolate;
  border-color: rgba(217, 184, 129, 0.36) !important;
  border-radius: 0.65rem !important;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.62),
    inset 0 -60px 110px rgba(0, 0, 0, 0.55),
    0 18px 40px rgba(0, 0, 0, 0.22) !important;
}

.dungeon-combat-active-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 82%, rgba(217, 184, 129, 0.16), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.38), transparent 38%, transparent 62%, rgba(0, 0, 0, 0.44));
}

.dungeon-combat-active-card > * {
  position: relative;
  z-index: 2;
}

.dungeon-combat-active-card > div:first-child {
  position: absolute !important;
  inset: 0 !important;
  z-index: 1;
  opacity: 0.05 !important;
}

.dungeon-combat-player-panel,
.dungeon-combat-enemy-panel {
  padding: 0.72rem 0.88rem;
  border: 2px solid rgba(217, 184, 129, 0.54);
  border-radius: 0.42rem;
  background:
    linear-gradient(180deg, rgba(22, 20, 25, 0.96), rgba(4, 6, 10, 0.9)),
    radial-gradient(circle at 14% 8%, rgba(217, 184, 129, 0.12), transparent 38%);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 246, 210, 0.1),
    0 14px 30px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(2px);
}

.dungeon-combat-enemy-panel {
  background:
    linear-gradient(180deg, rgba(22, 20, 25, 0.96), rgba(4, 6, 10, 0.9)),
    radial-gradient(circle at 86% 8%, rgba(210, 74, 74, 0.14), transparent 38%);
}

.dungeon-combat-player-panel h3,
.dungeon-combat-enemy-panel h3 {
  font-size: 1.18rem !important;
  line-height: 1.02 !important;
  letter-spacing: 0 !important;
}

.dungeon-combat-player-panel .combat-screen-status-row,
.dungeon-combat-player-panel .combat-screen-class-effects {
  z-index: 1800;
}

.dungeon-combat-resource-row {
  margin-top: 0.5rem;
}

.dungeon-combat-screen .combat-help-tip[data-help] {
  z-index: 2000;
  overflow: visible !important;
}

.dungeon-combat-screen .combat-help-tip[data-help]:hover,
.dungeon-combat-screen .combat-help-tip[data-help]:focus-visible {
  z-index: 2147483600 !important;
}

.dungeon-combat-screen .combat-help-tip[data-help]::after {
  z-index: 2147483647 !important;
}

.dungeon-combat-screen .combat-ability-dock .combat-ability-slot {
  overflow: visible !important;
}

/* Legacy dungeon desktop layout. Superseded by the shared stage contract below. */
@media (min-width: 99999px) {
  .dungeon-combat-screen {
    height: calc(100vh - 120px) !important;
    padding: 0.75rem !important;
  }

  .dungeon-combat-shell {
    position: relative;
  }

  .dungeon-combat-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin-bottom: 0 !important;
  }

  .dungeon-combat-route {
    position: absolute;
    top: 3.6rem;
    left: 50%;
    width: min(70vw, 740px);
    margin: 0 !important;
    transform: translateX(-50%);
  }

  .dungeon-combat-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    grid-template-rows: minmax(280px, 1fr) minmax(250px, 36vh);
    gap: 0.75rem !important;
    height: 100%;
    margin-top: 0 !important;
    min-height: 0;
  }

  .dungeon-combat-left {
    display: contents !important;
  }

  .dungeon-combat-active-card.combat-screen-fight-card {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    align-items: center;
    gap: 1.2rem;
    height: 100%;
    min-height: 0 !important;
    padding: 3.8rem clamp(0.75rem, 1vw, 1.1rem) 0.75rem !important;
  }

  .dungeon-combat-player-panel,
  .dungeon-combat-enemy-panel {
    width: min(38vw, 540px);
    max-width: 100%;
    align-self: center;
    transform: translateY(0.85rem);
  }

  .dungeon-combat-player-panel {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
    position: static !important;
  }

  .dungeon-combat-enemy-panel {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .dungeon-combat-boss-row,
  .dungeon-combat-affix-row {
    position: absolute !important;
    right: 0.75rem;
    z-index: 70;
    justify-content: flex-end;
    max-width: min(42vw, 620px);
  }

  .dungeon-combat-boss-row {
    top: 0.7rem;
  }

  .dungeon-combat-affix-row {
    top: 2.65rem;
  }

  .dungeon-combat-expected-loot,
  .dungeon-combat-divider {
    display: none !important;
  }

  .dungeon-combat-player-panel .combat-ability-dock {
    position: absolute !important;
    left: 0.75rem;
    bottom: 0.75rem;
    z-index: 1600;
    width: min(64vw, 980px);
    max-width: calc(100% - min(34vw, 520px) - 2.25rem);
    margin: 0 !important;
    border-color: rgba(217, 184, 129, 0.26) !important;
    background: rgba(7, 10, 18, 0.72) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 246, 210, 0.06),
      0 14px 28px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(4px);
  }

  .dungeon-combat-stat-strip {
    position: absolute !important;
    left: 1rem;
    top: 4.2rem;
    z-index: 60;
    width: min(26vw, 380px);
    display: flex !important;
    grid-template-columns: none !important;
    gap: 0.3rem !important;
  }

  .dungeon-combat-stat-strip > div {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.3rem 0.38rem !important;
    border-color: rgba(217, 184, 129, 0.14) !important;
    background: rgba(7, 10, 18, 0.48) !important;
  }

  .dungeon-combat-stat-strip > div > div:first-child {
    font-size: 0.45rem !important;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dungeon-combat-stat-strip > div > div:last-child {
    font-size: 0.76rem !important;
    line-height: 1.1;
  }

  .dungeon-combat-right {
    grid-column: 2;
    grid-row: 2;
    z-index: 80;
    min-height: 0;
  }

  .dungeon-combat-log-panel {
    height: 100%;
    min-height: 0;
    border-color: rgba(217, 184, 129, 0.24) !important;
    border-radius: 0.4rem !important;
    background: rgba(7, 10, 18, 0.72) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 246, 210, 0.05),
      0 14px 28px rgba(0, 0, 0, 0.24);
  }

  .dungeon-combat-loot-panel {
    display: none !important;
  }
}

/* Dungeon combat repair: use the same stage + bottom dock rhythm as map combat. */
@media (min-width: 99999px) {
  .dungeon-combat-screen {
    height: calc(100vh - 120px) !important;
    max-height: calc(100vh - 120px) !important;
    overflow: hidden !important;
    padding: 0.75rem !important;
  }

  .dungeon-combat-shell,
  .dungeon-combat-body {
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .dungeon-combat-screen .dungeon-combat-body {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px) !important;
    grid-template-rows: minmax(320px, 1fr) minmax(210px, 32vh) !important;
    gap: 0.75rem !important;
    height: 100% !important;
    margin-top: 0 !important;
    overflow: hidden !important;
  }

  .dungeon-combat-left {
    display: contents !important;
    overflow: visible !important;
  }

  .dungeon-combat-route {
    display: none !important;
  }

  .dungeon-combat-active-card.combat-screen-fight-card {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px) !important;
    grid-template-rows: minmax(320px, 1fr) minmax(210px, 32vh) !important;
    align-items: center !important;
    gap: 0.75rem !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    padding: 4.25rem 0.75rem 0.75rem !important;
  }

  .dungeon-combat-player-panel,
  .dungeon-combat-enemy-panel {
    grid-row: 1 !important;
    width: min(38vw, 540px) !important;
    max-width: 100% !important;
    align-self: center !important;
    margin: 0 !important;
    transform: translateY(0.45rem) !important;
  }

  .dungeon-combat-player-panel {
    grid-column: 1 !important;
    justify-self: start !important;
    position: relative !important;
  }

  .dungeon-combat-enemy-panel {
    grid-column: 2 !important;
    justify-self: end !important;
    position: relative !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: end !important;
    justify-self: stretch !important;
    position: relative !important;
    z-index: 1600 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0.7rem 0.75rem !important;
    overflow: visible !important;
    border-color: rgba(217, 184, 129, 0.26) !important;
    background: rgba(7, 10, 18, 0.74) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 246, 210, 0.06),
      0 14px 28px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(4px);
  }

  .dungeon-combat-active-card > .combat-ability-dock > div:first-child {
    margin-bottom: 0.5rem !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock > div:last-child {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.625rem !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock .combat-ability-slot {
    flex: 0 0 auto !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock .combat-ability-slot > button {
    width: 3.5rem !important;
    height: 3.5rem !important;
  }

  .dungeon-combat-stat-strip {
    position: absolute !important;
    left: 1rem !important;
    top: 4.55rem !important;
    z-index: 60 !important;
    width: min(30vw, 420px) !important;
    display: flex !important;
    grid-template-columns: none !important;
    gap: 0.3rem !important;
    overflow: hidden !important;
  }

  .dungeon-combat-right {
    grid-column: 2 !important;
    grid-row: 2 !important;
    z-index: 90 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .dungeon-combat-log-panel {
    height: 100% !important;
    min-height: 0 !important;
  }
}

@media (max-width: 1023px) {
  .dungeon-combat-screen {
    height: auto !important;
    min-height: calc(100vh - 120px) !important;
    overflow: hidden !important;
  }

  .dungeon-combat-left {
    overflow: visible !important;
    padding-right: 0 !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 1rem !important;
  }
}

/* Dungeon combat should mirror the regular combat scene: stage first, light HUD chrome. */
@media (min-width: 99999px) {
  .dungeon-combat-screen {
    max-width: none !important;
    width: 100% !important;
    height: calc(100vh - 120px) !important;
    padding: 0.75rem !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    border-color: rgba(217, 184, 129, 0.18) !important;
    background:
      radial-gradient(circle at 50% 18%, rgba(122, 167, 210, 0.08), transparent 36%),
      linear-gradient(180deg, rgba(3, 7, 14, 0.22), rgba(2, 5, 10, 0.76)) !important;
  }

  .dungeon-combat-toolbar {
    top: 0.85rem !important;
    left: 1.45rem !important;
    right: 1.45rem !important;
    z-index: 1900 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    pointer-events: none;
  }

  .dungeon-combat-toolbar > div:first-child,
  .dungeon-combat-toolbar .combat-auto-control,
  .dungeon-combat-toolbar .auto-help-button {
    display: none !important;
  }

  .dungeon-combat-toolbar .spell-active-title-row {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    pointer-events: auto;
  }

  .dungeon-combat-toolbar .spell-active-title-row > span:first-child {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 2.2rem;
    padding: 0.48rem 0.9rem !important;
    border: 1px solid rgba(217, 184, 129, 0.56) !important;
    border-radius: 0.28rem !important;
    background: rgba(5, 7, 11, 0.86) !important;
    color: rgba(255, 246, 220, 0.94) !important;
    font-family: var(--font-ui) !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 246, 210, 0.08),
      0 10px 22px rgba(0, 0, 0, 0.34) !important;
  }

  .dungeon-combat-toolbar .btn-danger {
    min-width: 4.2rem !important;
    min-height: 2.35rem !important;
    padding: 0.58rem 1rem !important;
    border: 1px solid rgba(255, 112, 112, 0.65) !important;
    border-radius: 0.24rem !important;
    background: linear-gradient(180deg, rgba(170, 46, 48, 0.96), rgba(104, 20, 29, 0.96)) !important;
    color: #fff1ec !important;
    font-family: var(--font-ui) !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 8px 18px rgba(90, 0, 0, 0.28) !important;
  }

  .dungeon-combat-screen .dungeon-combat-body {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px) !important;
    grid-template-rows: minmax(350px, 58vh) minmax(190px, 28vh) !important;
    gap: 0.75rem !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  .dungeon-combat-active-card.combat-screen-fight-card {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px) !important;
    grid-template-rows: minmax(350px, 58vh) minmax(190px, 28vh) !important;
    gap: 0.75rem !important;
    padding: 3.35rem 0.75rem 0.75rem !important;
    overflow: hidden !important;
    border-radius: 1.15rem !important;
    border-color: rgba(217, 184, 129, 0.22) !important;
    background-size: cover !important;
    background-position: center !important;
    box-shadow:
      inset 0 -70px 120px rgba(0, 0, 0, 0.58),
      0 18px 40px rgba(0, 0, 0, 0.22) !important;
  }

  .dungeon-combat-active-card::after {
    background:
      radial-gradient(circle at 50% 82%, rgba(217, 184, 129, 0.16), transparent 34%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 38%, transparent 62%, rgba(0, 0, 0, 0.42)) !important;
  }

  .dungeon-combat-active-card::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 14%;
    bottom: 43%;
    z-index: 2;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(232, 220, 190, 0.18), transparent);
    pointer-events: none;
  }

  .dungeon-combat-player-panel,
  .dungeon-combat-enemy-panel {
    grid-row: 1 !important;
    align-self: center !important;
    width: min(34vw, 552px) !important;
    min-height: 9.9rem;
    margin: 0 !important;
    padding: 0.62rem !important;
    border: 2px solid rgba(217, 184, 129, 0.58) !important;
    border-radius: 0.52rem !important;
    background:
      linear-gradient(180deg, rgba(22, 20, 25, 0.96), rgba(4, 6, 10, 0.9)),
      radial-gradient(circle at 14% 8%, rgba(122, 167, 210, 0.16), transparent 38%) !important;
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.72),
      inset 0 1px 0 rgba(255, 246, 210, 0.1),
      0 14px 30px rgba(0, 0, 0, 0.42) !important;
    transform: translateY(0.4rem) !important;
  }

  .dungeon-combat-enemy-panel {
    justify-self: end !important;
    min-height: 8.3rem;
    background:
      linear-gradient(180deg, rgba(22, 20, 25, 0.96), rgba(4, 6, 10, 0.9)),
      radial-gradient(circle at 86% 8%, rgba(210, 74, 74, 0.13), transparent 38%) !important;
  }

  .dungeon-combat-player-panel {
    justify-self: start !important;
  }

  .dungeon-combat-enemy-panel > div:first-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: start !important;
    gap: 0.75rem !important;
  }

  .dungeon-combat-enemy-panel > div:first-child > div:first-child {
    min-width: 0 !important;
  }

  .dungeon-combat-enemy-panel > div:first-child > div:first-child > div:first-child {
    order: 2;
    width: 7.4rem !important;
    height: 7.4rem !important;
    border: 2px solid rgba(217, 184, 129, 0.46);
    border-radius: 0.32rem;
    background: rgba(2, 4, 8, 0.82);
  }

  .dungeon-combat-enemy-panel .combat-screen-enemy-hp-bar,
  .dungeon-combat-enemy-panel > .w-full,
  .dungeon-combat-player-panel .combat-screen-player-hp-bar {
    height: 1.18rem !important;
    border-radius: 0.16rem !important;
  }

  .dungeon-combat-player-panel h3,
  .dungeon-combat-enemy-panel h3 {
    color: rgba(255, 246, 220, 0.94) !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: start !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    gap: 1rem !important;
    min-height: 7.25rem;
    padding: 0.85rem !important;
    border-radius: 0.32rem !important;
    border-color: rgba(217, 184, 129, 0.22) !important;
    background: rgba(7, 10, 18, 0.74) !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock > div:first-child {
    align-self: center !important;
    margin: 0 !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock > div:last-child {
    align-self: center !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.66rem !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock .combat-ability-slot > button {
    width: 3.55rem !important;
    height: 3.55rem !important;
    border-radius: 0.25rem !important;
  }

  .dungeon-combat-stat-strip {
    left: 1.45rem !important;
    top: 1.45rem !important;
    width: min(31vw, 430px) !important;
    z-index: 1850 !important;
  }

  .dungeon-combat-stat-strip > div {
    min-height: 2rem !important;
    border-radius: 0.22rem !important;
    background: rgba(7, 10, 18, 0.5) !important;
    box-shadow: inset 0 1px 0 rgba(255, 246, 210, 0.05) !important;
  }

  .dungeon-combat-right {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: stretch !important;
    gap: 0 !important;
  }

  .dungeon-combat-log-panel {
    border-radius: 0.32rem !important;
    border-color: rgba(217, 184, 129, 0.28) !important;
    background: rgba(7, 10, 18, 0.78) !important;
  }

  .dungeon-combat-log-panel > div:first-child {
    padding: 0.72rem 0.85rem !important;
    border-bottom-color: rgba(217, 184, 129, 0.18) !important;
    background: rgba(5, 7, 11, 0.78) !important;
    color: rgba(255, 246, 220, 0.94) !important;
  }

  .dungeon-combat-log-panel > div:first-child > span:first-child {
    font-size: 0 !important;
  }

  .dungeon-combat-log-panel > div:first-child > span:first-child::after {
    content: "INFO";
    font-size: 0.72rem;
    color: rgba(255, 246, 220, 0.98);
  }

  .dungeon-combat-log-panel > div:first-child > span:last-child {
    color: rgba(151, 181, 232, 0.78) !important;
  }

  .dungeon-combat-loot-panel,
  .dungeon-combat-route,
  .dungeon-combat-expected-loot,
  .dungeon-combat-divider {
    display: none !important;
  }
}

/* Final dungeon combat alignment: keep the shared ability dock horizontal like map combat. */
@media (min-width: 99999px) {
  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock {
    position: absolute !important;
    left: 0.75rem !important;
    right: calc(min(34vw, 520px) + 1.5rem) !important;
    bottom: 0.75rem !important;
    z-index: 1900 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    width: auto !important;
    max-width: none !important;
    min-height: 7.25rem !important;
    margin: 0 !important;
    padding: 0.85rem !important;
    overflow: visible !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock > div:first-child {
    flex: 0 0 auto !important;
    align-self: center !important;
    margin: 0 !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock > div:last-child {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.66rem !important;
    min-width: 0 !important;
    width: auto !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock .combat-ability-slot {
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock .combat-ability-slot > button {
    width: 3.55rem !important;
    height: 3.55rem !important;
  }

  .dungeon-combat-screen .dungeon-combat-stat-strip {
    width: min(34vw, 520px) !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 99999px) and (max-width: 100000px) {
  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock {
    right: calc(min(38vw, 520px) + 1.25rem) !important;
    gap: 0.65rem !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock > div:last-child {
    flex-wrap: wrap !important;
  }
}

@media (min-width: 99999px) {
  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card {
    overflow: visible !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock--dungeon {
    position: absolute !important;
    left: 0.75rem !important;
    right: calc(min(34vw, 520px) + 1.5rem) !important;
    bottom: 0.75rem !important;
    z-index: 2200 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    width: auto !important;
    max-width: none !important;
    min-height: 7.25rem !important;
    margin: 0 !important;
    padding: 0.85rem !important;
    overflow: visible !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock--dungeon > div:first-child {
    flex: 0 0 auto !important;
    align-self: center !important;
    margin: 0 !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock--dungeon > div:last-child {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.66rem !important;
    min-width: 0 !important;
    width: auto !important;
    overflow: visible !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock--dungeon .combat-ability-slot {
    position: relative !important;
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card > .combat-ability-dock--dungeon .combat-ability-slot > button {
    width: 3.55rem !important;
    height: 3.55rem !important;
  }
}

/* Active dungeon combat layout: one viewport contract shared with full-page Area Combat. */
@media (min-width: 1024px) {
  .dungeon-combat-screen {
    --dungeon-stage-height: clamp(340px, 42vh, 380px);
    width: 100% !important;
    height: clamp(600px, calc(100vh - 96px), 780px) !important;
    min-height: 600px !important;
    max-height: 780px !important;
    padding: 0.5rem !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    border-color: rgba(217, 184, 129, 0.18) !important;
    background:
      radial-gradient(circle at 50% 18%, rgba(122, 167, 210, 0.08), transparent 36%),
      linear-gradient(180deg, rgba(3, 7, 14, 0.22), rgba(2, 5, 10, 0.76)) !important;
  }

  .dungeon-combat-shell {
    position: relative;
    height: 100%;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  .dungeon-combat-toolbar {
    position: absolute !important;
    top: 0.75rem !important;
    left: 1rem !important;
    right: 1rem !important;
    z-index: 1900 !important;
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    pointer-events: none;
  }

  .dungeon-combat-toolbar > div:first-child,
  .dungeon-combat-toolbar .combat-auto-control,
  .dungeon-combat-toolbar .auto-help-button {
    display: none !important;
  }

  .dungeon-combat-toolbar .spell-active-title-row {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    pointer-events: auto;
  }

  .dungeon-combat-toolbar .spell-active-title-row > span:first-child {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 2.2rem;
    padding: 0.48rem 0.9rem !important;
    border: 1px solid rgba(217, 184, 129, 0.56) !important;
    border-radius: 0.28rem !important;
    background: rgba(5, 7, 11, 0.86) !important;
    color: rgba(255, 246, 220, 0.94) !important;
    font-family: var(--font-ui) !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 246, 210, 0.08),
      0 10px 22px rgba(0, 0, 0, 0.34) !important;
  }

  .dungeon-combat-toolbar .btn-danger {
    min-width: 4.2rem !important;
    min-height: 2.35rem !important;
    padding: 0.58rem 1rem !important;
    border: 1px solid rgba(255, 112, 112, 0.65) !important;
    border-radius: 0.24rem !important;
    background: linear-gradient(180deg, rgba(170, 46, 48, 0.96), rgba(104, 20, 29, 0.96)) !important;
    color: #fff1ec !important;
    font-family: var(--font-ui) !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.16),
      0 8px 18px rgba(90, 0, 0, 0.28) !important;
  }

  .dungeon-combat-route,
  .dungeon-combat-loot-panel,
  .dungeon-combat-expected-loot,
  .dungeon-combat-divider {
    display: none !important;
  }

  .dungeon-combat-screen .dungeon-combat-body {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) !important;
    grid-template-rows: var(--dungeon-stage-height) minmax(235px, 1fr) !important;
    gap: 0.75rem !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .dungeon-combat-left {
    display: contents !important;
  }

  .dungeon-combat-active-card.combat-screen-fight-card {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) !important;
    grid-template-rows: var(--dungeon-stage-height) minmax(235px, 1fr) !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 1rem !important;
    border-color: rgba(217, 184, 129, 0.22) !important;
    background: rgb(var(--surface-rgb) / 0.78) !important;
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.58),
      0 18px 40px rgba(0, 0, 0, 0.22) !important;
  }

  .dungeon-combat-active-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    z-index: 0;
    height: var(--dungeon-stage-height);
    border-radius: inherit;
    background:
      linear-gradient(180deg, rgba(7, 10, 16, 0.38), rgba(3, 6, 10, 0.78)),
      var(--dungeon-stage-art, none) center / cover no-repeat;
    box-shadow: inset 0 -64px 100px rgba(0, 0, 0, 0.58);
    pointer-events: none;
  }

  .dungeon-combat-active-card::after {
    content: "";
    position: absolute;
    inset: calc(var(--dungeon-stage-height) + 0.75rem) 0 0;
    z-index: 1;
    border-radius: 0 0 1rem 1rem;
    background:
      radial-gradient(circle at 38% 0%, rgba(122, 167, 210, 0.07), transparent 42%),
      linear-gradient(180deg, rgba(5, 9, 16, 0.98), rgba(2, 5, 10, 0.99));
    pointer-events: none;
  }

  .dungeon-combat-active-card > div:first-child {
    position: absolute !important;
    inset: 0 0 auto !important;
    z-index: 1;
    height: var(--dungeon-stage-height) !important;
    opacity: 0.05 !important;
    pointer-events: none;
  }

  .dungeon-combat-active-card > * {
    position: relative;
    z-index: 2;
  }

  .dungeon-combat-player-panel,
  .dungeon-combat-enemy-panel {
    grid-row: 1 !important;
    align-self: center !important;
    width: min(34vw, 520px) !important;
    max-width: calc(100% - 1.5rem) !important;
    min-height: 0 !important;
    margin: 0 0.75rem !important;
    padding: 0.62rem !important;
    border: 2px solid rgba(217, 184, 129, 0.58) !important;
    border-radius: 0.52rem !important;
    transform: translateY(1.35rem) !important;
  }

  .dungeon-combat-player-panel {
    grid-column: 1 !important;
    justify-self: start !important;
  }

  .dungeon-combat-enemy-panel {
    grid-column: 2 !important;
    justify-self: end !important;
  }

  .dungeon-combat-boss-row,
  .dungeon-combat-affix-row {
    position: absolute !important;
    right: 0.75rem;
    z-index: 70;
    justify-content: flex-end;
    max-width: min(42vw, 620px);
  }

  .dungeon-combat-boss-row {
    top: 0.7rem;
  }

  .dungeon-combat-affix-row {
    top: 2.65rem;
  }

  .dungeon-combat-stat-strip {
    position: absolute !important;
    top: 0.9rem !important;
    left: 1rem !important;
    z-index: 1850 !important;
    display: flex !important;
    width: min(34vw, 430px) !important;
    gap: 0.3rem !important;
    overflow: hidden !important;
  }

  .dungeon-combat-stat-strip > div {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2rem !important;
    padding: 0.3rem 0.38rem !important;
    border-color: rgba(217, 184, 129, 0.14) !important;
    border-radius: 0.22rem !important;
    background: rgba(7, 10, 18, 0.5) !important;
  }

  .dungeon-combat-stat-strip > div > div:first-child {
    overflow: hidden;
    font-size: 0.45rem !important;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dungeon-combat-stat-strip > div > div:last-child {
    font-size: 0.76rem !important;
    line-height: 1.1;
  }

  .dungeon-combat-active-card > .combat-ability-dock--dungeon {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: stretch !important;
    position: relative !important;
    z-index: 1600 !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 1rem !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    margin: 0 0 0.75rem 0.75rem !important;
    padding: 0.85rem !important;
    overflow: visible !important;
    border-color: rgba(217, 184, 129, 0.24) !important;
    border-radius: 0.4rem !important;
    background: rgba(7, 10, 18, 0.82) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 246, 210, 0.06),
      0 14px 28px rgba(0, 0, 0, 0.3) !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock--dungeon > div:first-child {
    align-self: center !important;
    margin: 0 !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock--dungeon > div:last-child {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.66rem !important;
    min-width: 0 !important;
    width: auto !important;
    overflow: visible !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock--dungeon .combat-ability-slot {
    position: relative !important;
    flex: 0 0 auto !important;
    width: auto !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock--dungeon .combat-ability-slot > button {
    width: 3.55rem !important;
    height: 3.55rem !important;
  }

  .dungeon-combat-right {
    grid-column: 2 !important;
    grid-row: 2 !important;
    z-index: 90 !important;
    align-self: stretch !important;
    min-height: 0 !important;
    margin: 0 0.75rem 0.75rem 0 !important;
    overflow: hidden !important;
  }

  .dungeon-combat-log-panel {
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    border-color: rgba(217, 184, 129, 0.28) !important;
    border-radius: 0.4rem !important;
    background: rgba(7, 10, 18, 0.82) !important;
  }

}

@media (min-width: 1024px) and (max-width: 1280px) {
  .dungeon-combat-screen {
    --dungeon-stage-height: clamp(340px, 45vh, 370px);
  }

  .dungeon-combat-active-card > .combat-ability-dock--dungeon {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: 0.45rem !important;
    padding: 0.65rem !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock--dungeon > div:first-child {
    justify-content: center !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock--dungeon > div:last-child {
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock--dungeon .combat-ability-slot > button {
    width: 3.25rem !important;
    height: 3.25rem !important;
  }
}

@media (min-width: 1024px) and (max-height: 800px) {
  .dungeon-combat-screen {
    --dungeon-stage-height: clamp(350px, 49vh, 360px);
    height: calc(100vh - 150px) !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .dungeon-combat-screen .dungeon-combat-body,
  .dungeon-combat-active-card.combat-screen-fight-card {
    grid-template-rows: var(--dungeon-stage-height) minmax(195px, 1fr) !important;
  }

  .dungeon-combat-player-panel,
  .dungeon-combat-enemy-panel {
    transform: translateY(1.25rem) !important;
  }

  .dungeon-combat-active-card > .combat-ability-dock--dungeon {
    padding: 0.6rem !important;
  }

  .dungeon-combat-right {
    margin-bottom: 0.5rem !important;
  }
}

/* Dungeon combat parity: use the same arena, HUD dock, and information contract as Area Combat. */
@media (min-width: 1024px) {
  .combat-screen-root--page.dungeon-combat-screen {
    --dungeon-stage-height: clamp(310px, 40vh, 370px);
    width: 100% !important;
    height: clamp(600px, calc(100vh - 96px), 780px) !important;
    min-height: 600px !important;
    max-height: 780px !important;
    max-width: 1680px !important;
    padding: 0.5rem !important;
    overflow: hidden !important;
    border-radius: 0 !important;
  }

  .dungeon-combat-screen .dungeon-combat-shell,
  .dungeon-combat-screen .dungeon-combat-body {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }

  .dungeon-combat-screen .dungeon-combat-toolbar {
    top: 0.5rem !important;
    left: 0.75rem !important;
    right: 0.75rem !important;
    height: 2.5rem;
  }

  .dungeon-combat-screen .dungeon-combat-toolbar .spell-active-title-row {
    position: relative;
    display: flex !important;
    width: 100%;
    height: 100%;
    justify-content: flex-end !important;
  }

  .dungeon-combat-screen .dungeon-combat-toolbar .spell-active-title-row > span:first-child {
    position: absolute;
    top: 0;
    right: 0;
    min-height: 2rem;
    padding: 0.4rem 0.65rem !important;
    border-color: rgba(217, 184, 129, 0.22) !important;
    background: rgba(5, 7, 11, 0.72) !important;
    color: rgba(217, 184, 129, 0.78) !important;
    font-size: 0.62rem !important;
  }

  .dungeon-combat-screen .dungeon-combat-toolbar .btn-danger {
    position: absolute;
    top: 0;
    left: 50%;
    min-width: 4rem !important;
    min-height: 2.2rem !important;
    transform: translateX(-50%);
  }

  .dungeon-combat-screen .dungeon-combat-body,
  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) !important;
    grid-template-rows: var(--dungeon-stage-height) minmax(235px, 1fr) !important;
    gap: 0.75rem !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card.combat-screen-fight-card {
    border-radius: 0.5rem !important;
    border-color: rgba(217, 184, 129, 0.22) !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card::before {
    height: var(--dungeon-stage-height) !important;
    border-radius: 1.35rem;
    background:
      radial-gradient(circle at 50% 82%, rgba(217, 184, 129, 0.16), transparent 34%),
      linear-gradient(90deg, rgba(0, 0, 0, 0.34), transparent 38%, transparent 62%, rgba(0, 0, 0, 0.42)),
      linear-gradient(180deg, rgba(7, 10, 16, 0.42), rgba(3, 6, 10, 0.78)),
      var(--dungeon-stage-art, none) center / cover no-repeat !important;
  }

  .dungeon-combat-screen .dungeon-combat-active-card::after {
    inset: calc(var(--dungeon-stage-height) + 0.75rem) 0 0 !important;
  }

  .dungeon-combat-screen .dungeon-combat-player-panel,
  .dungeon-combat-screen .dungeon-combat-enemy-panel {
    align-self: center !important;
    display: grid !important;
    min-width: 0 !important;
    min-height: 0 !important;
    gap: 0.34rem 0.7rem !important;
    margin: 0 0.75rem !important;
    padding: 0.5rem !important;
    border: 2px solid rgba(217, 184, 129, 0.58) !important;
    border-radius: 0.52rem !important;
    transform: translateY(0.85rem) !important;
    box-shadow:
      inset 0 0 0 1px rgba(0, 0, 0, 0.72),
      inset 0 1px 0 rgba(255, 246, 210, 0.1),
      0 14px 30px rgba(0, 0, 0, 0.42) !important;
  }

  .dungeon-combat-screen .dungeon-combat-player-panel {
    grid-template-columns: clamp(7.5rem, 15vh, 9rem) minmax(15rem, 1fr) !important;
    grid-template-rows: auto auto auto auto !important;
    width: min(48vw, 680px) !important;
    max-width: calc(100% - 1.5rem) !important;
    background:
      linear-gradient(180deg, rgba(22, 20, 25, 0.96), rgba(4, 6, 10, 0.9)),
      radial-gradient(circle at 14% 8%, rgba(122, 167, 210, 0.16), transparent 38%) !important;
  }

  .dungeon-combat-screen .dungeon-combat-player-header,
  .dungeon-combat-screen .dungeon-combat-player-heading {
    display: contents !important;
  }

  .dungeon-combat-screen .dungeon-combat-player-portrait {
    grid-column: 1;
    grid-row: 1 / span 4;
    align-self: stretch;
    width: clamp(7.5rem, 15vh, 9rem) !important;
    height: clamp(7.5rem, 15vh, 9rem) !important;
    overflow: hidden;
    border: 1px solid rgba(217, 184, 129, 0.34);
    border-radius: 0.34rem;
    background: radial-gradient(circle, rgba(25, 21, 28, 0.94), rgba(5, 8, 13, 0.92));
    box-shadow:
      inset 0 0 0 2px rgba(0, 0, 0, 0.62),
      inset 0 0 0 4px rgba(217, 184, 129, 0.1);
  }

  .dungeon-combat-screen .dungeon-combat-player-portrait > div {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    border-radius: inherit !important;
  }

  .dungeon-combat-screen .dungeon-combat-player-portrait img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .dungeon-combat-screen .dungeon-combat-player-identity {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    padding-right: 7rem;
  }

  .dungeon-combat-screen .dungeon-combat-player-hp-value {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    z-index: 2;
  }

  .dungeon-combat-screen .dungeon-combat-player-hp-row,
  .dungeon-combat-screen .dungeon-combat-resource-row,
  .dungeon-combat-screen .dungeon-combat-player-panel > .combat-screen-class-effects {
    grid-column: 2;
    min-width: 0;
    margin: 0 !important;
  }

  .dungeon-combat-screen .dungeon-combat-player-hp-row {
    grid-row: 2;
  }

  .dungeon-combat-screen .dungeon-combat-resource-row {
    grid-row: 3;
  }

  .dungeon-combat-screen .dungeon-combat-player-panel > .combat-screen-class-effects {
    grid-row: 4;
  }

  .dungeon-combat-screen .dungeon-combat-enemy-panel {
    grid-template-columns: minmax(15rem, 1fr) clamp(7.5rem, 15vh, 9rem) !important;
    grid-template-rows: auto auto auto auto !important;
    width: min(42vw, 640px) !important;
    max-width: calc(100% - 1.5rem) !important;
    background:
      linear-gradient(180deg, rgba(22, 20, 25, 0.96), rgba(4, 6, 10, 0.9)),
      radial-gradient(circle at 86% 8%, rgba(210, 74, 74, 0.14), transparent 38%) !important;
  }

  .dungeon-combat-screen .dungeon-combat-enemy-header,
  .dungeon-combat-screen .dungeon-combat-enemy-heading {
    display: contents !important;
  }

  .dungeon-combat-screen .dungeon-combat-enemy-portrait {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: stretch;
    width: clamp(7.5rem, 15vh, 9rem) !important;
    height: clamp(7.5rem, 15vh, 9rem) !important;
    overflow: hidden;
    border: 1px solid rgba(217, 184, 129, 0.34);
    border-radius: 0.34rem;
    background: radial-gradient(circle, rgba(25, 21, 28, 0.94), rgba(5, 8, 13, 0.92));
    box-shadow:
      inset 0 0 0 2px rgba(0, 0, 0, 0.62),
      inset 0 0 0 4px rgba(217, 184, 129, 0.1);
  }

  .dungeon-combat-screen .dungeon-combat-enemy-portrait img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
  }

  .dungeon-combat-screen .dungeon-combat-enemy-identity {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    padding-left: 6.5rem;
    text-align: right;
  }

  .dungeon-combat-screen .dungeon-combat-enemy-hp-value {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    justify-self: start;
    z-index: 2;
  }

  .dungeon-combat-screen .dungeon-combat-enemy-panel > .w-full.h-6,
  .dungeon-combat-screen .dungeon-combat-enemy-panel > .combat-screen-enemy-info,
  .dungeon-combat-screen .dungeon-combat-enemy-panel > .w-full.h-1 {
    grid-column: 1;
    min-width: 0;
    margin: 0 !important;
  }

  .dungeon-combat-screen .dungeon-combat-enemy-panel > .w-full.h-6 {
    grid-row: 2;
    height: 0.625rem !important;
    border: 1px solid rgba(210, 74, 74, 0.35);
    border-radius: 0.2rem !important;
    background: rgba(3, 6, 10, 0.75) !important;
  }

  .dungeon-combat-screen .dungeon-combat-enemy-panel > .combat-screen-enemy-info {
    grid-row: 3;
  }

  .dungeon-combat-screen .dungeon-combat-enemy-panel > .w-full.h-1 {
    grid-row: 4;
  }

  .dungeon-combat-screen .dungeon-combat-hud-dock {
    grid-column: 1 !important;
    grid-row: 2 !important;
    align-self: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 0 0.75rem 0.75rem !important;
    overflow: visible !important;
  }

  .dungeon-combat-screen .dungeon-combat-hud-dock .combat-screen-status-row {
    margin: 0 0 0.3rem !important;
  }

  .dungeon-combat-screen .dungeon-combat-hud-dock .combat-ability-dock {
    margin-top: 0.25rem !important;
  }

  .dungeon-combat-screen .dungeon-combat-hud-dock > .w-full.h-1 {
    flex: 0 0 auto;
  }

  .dungeon-combat-screen .dungeon-combat-hud-dock > div:last-child {
    margin-top: 0.45rem !important;
  }

  .dungeon-combat-screen .dungeon-combat-right {
    grid-column: 2 !important;
    grid-row: 2 !important;
    position: relative !important;
    inset: auto !important;
    z-index: 70 !important;
    display: flex !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 0.75rem 0.75rem 0 !important;
    overflow: hidden !important;
  }

  .dungeon-combat-screen .dungeon-combat-right .combat-screen-info-body,
  .dungeon-combat-screen .dungeon-combat-right .combat-feed-panel {
    flex: 1 1 auto;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .dungeon-combat-screen .dungeon-combat-stat-strip {
    top: 0.9rem !important;
    left: 1rem !important;
    width: min(34vw, 500px) !important;
  }

  .dungeon-combat-screen .dungeon-combat-stat-strip > div {
    min-height: 0 !important;
    padding: 0.3rem 0.38rem !important;
    opacity: 0.82;
  }
}

@media (min-width: 1024px) and (max-height: 800px) {
  .combat-screen-root--page.dungeon-combat-screen {
    --dungeon-stage-height: clamp(310px, 40vh, 370px);
    height: clamp(600px, calc(100vh - 96px), 780px) !important;
    min-height: 600px !important;
  }
}

input:not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="reset"]):not([type="submit"]),
textarea,
[contenteditable="true"],
.allow-text-select {
  -webkit-user-select: text;
  user-select: text;
  cursor: text !important;
}

/* The Spire final polish pass */
.spire-tab {
  position: relative;
  isolation: isolate;
  min-height: min(900px, calc(100vh - 12rem));
  padding: clamp(0.875rem, 1.8vw, 1.5rem);
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 0.7rem;
  background: #050712;
  color: var(--color-parchment);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.05),
    0 24px 48px rgba(0, 0, 0, 0.32);
}

.spire-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background: url("./celestial/spire/spire-background.webp") center top / 100% auto no-repeat;
  transform: scale(1.002);
}

.spire-tab::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(circle at 48% 24%, rgba(156, 89, 255, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(2, 4, 10, 0.78), rgba(4, 5, 14, 0.28) 45%, rgba(2, 4, 10, 0.84)),
    linear-gradient(180deg, rgba(2, 4, 10, 0.38), rgba(2, 4, 10, 0.82));
}

.spire-tab--sealed::after {
  background:
    radial-gradient(circle at 50% 22%, rgba(120, 74, 196, 0.18), transparent 33%),
    radial-gradient(circle at 22% 58%, rgba(180, 196, 255, 0.09), transparent 28%),
    linear-gradient(90deg, rgba(2, 3, 9, 0.9), rgba(3, 4, 11, 0.64), rgba(2, 3, 9, 0.92)),
    linear-gradient(180deg, rgba(2, 4, 10, 0.64), rgba(2, 4, 10, 0.94));
}

.spire-tab--aberrant::after {
  background:
    radial-gradient(circle at 50% 22%, rgba(188, 84, 255, 0.28), transparent 34%),
    radial-gradient(circle at 72% 40%, rgba(255, 72, 172, 0.16), transparent 24%),
    linear-gradient(90deg, rgba(2, 4, 10, 0.75), rgba(4, 5, 14, 0.28) 45%, rgba(2, 4, 10, 0.84)),
    linear-gradient(180deg, rgba(2, 4, 10, 0.34), rgba(2, 4, 10, 0.82));
}

.spire-tab .combat-zone-panel {
  display: block !important;
  grid-template-columns: none !important;
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  padding: clamp(0.9rem, 1.5vw, 1.2rem);
  border-color: rgba(217, 184, 129, 0.22) !important;
  border-radius: 0.55rem !important;
  background:
    linear-gradient(180deg, rgba(13, 18, 30, 0.86), rgba(5, 8, 16, 0.78)),
    rgba(5, 8, 16, 0.78) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.06),
    0 18px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.spire-hero,
.spire-panel__header,
.spire-panel__header--actions,
.spire-run-summary,
.spire-preview-grid,
.spire-next-floor,
.spire-choice-list,
.spire-record-grid,
.spire-card-grid {
  position: relative;
  z-index: 1;
}

.spire-hero,
.spire-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.spire-hero {
  padding: 0.35rem 0 0.25rem;
}

.spire-hero__copy {
  max-width: 46rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.4rem;
  background: linear-gradient(90deg, rgba(3, 5, 12, 0.72), rgba(3, 5, 12, 0.08));
}

.spire-hero__status,
.spire-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.spire-eyebrow {
  display: block;
  font-size: 0.68rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-celestial-gold);
}

.spire-heading {
  margin: 0.25rem 0 0;
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(2rem, 3.2vw, 3.6rem);
  line-height: 0.96;
  letter-spacing: 0;
  color: var(--color-parchment);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.72);
}

.spire-title {
  margin: 0.25rem 0 0;
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1.18rem, 1.55vw, 1.55rem);
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--color-parchment);
}

.spire-body,
.spire-tab p {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: rgba(229, 232, 242, 0.86);
}

.spire-body--wide {
  max-width: 42rem;
}

.spire-status,
.spire-chip,
.spire-choice-chip,
.spire-flux-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2rem;
  border-radius: 0.35rem;
  border: 1px solid rgba(217, 184, 129, 0.2);
  background: rgba(5, 8, 16, 0.72);
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-parchment);
}

.spire-status--open {
  border-color: rgba(96, 227, 183, 0.3);
  color: rgb(187, 255, 230);
}

.spire-status--sealed {
  border-color: rgba(255, 107, 107, 0.36);
  color: rgb(255, 207, 207);
}

.spire-chip b {
  color: var(--color-celestial-gold);
}

.spire-chip--violet {
  border-color: rgba(176, 120, 255, 0.28);
  background: rgba(94, 46, 168, 0.14);
}

.spire-chip--green {
  border-color: rgba(77, 226, 160, 0.24);
  background: rgba(25, 128, 89, 0.13);
}

.spire-chip--crimson {
  border-color: rgba(255, 91, 118, 0.28);
  background: rgba(158, 38, 74, 0.14);
}

.spire-sealed-panel {
  max-width: 48rem;
  min-height: 26rem;
  overflow: hidden;
}

.spire-sealed-panel .spire-panel__header {
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 0.7rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(217, 184, 129, 0.14);
}

.spire-sealed-panel .spire-panel__header > div {
  min-width: 0;
  flex: 1 1 auto;
}

.spire-sealed-panel .spire-status--sealed {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-top: 0.1rem;
  background:
    linear-gradient(180deg, rgba(45, 15, 23, 0.98), rgba(10, 12, 22, 0.98));
  box-shadow:
    0 0 0 6px rgba(7, 10, 18, 0.94),
    0 12px 26px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 230, 230, 0.08);
}

.spire-sealed-fog {
  position: absolute;
  inset: -30%;
  z-index: -1;
  pointer-events: none;
  opacity: 0.72;
  background:
    radial-gradient(circle at 18% 28%, rgba(206, 214, 255, 0.12), transparent 24%),
    radial-gradient(circle at 62% 58%, rgba(153, 89, 255, 0.14), transparent 28%),
    linear-gradient(115deg, transparent, rgba(206, 214, 255, 0.08), transparent);
  filter: blur(14px);
}

.spire-requirements,
.spire-run-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.spire-run-summary {
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.spire-meter {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  align-items: center;
  min-height: 4rem;
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 0.45rem;
  background: rgba(4, 7, 14, 0.58);
  padding: 0.7rem 0.8rem;
  text-align: left;
  color: rgba(229, 232, 242, 0.9);
}

.spire-meter--link {
  cursor: pointer;
}

.spire-meter--link:hover {
  border-color: rgba(217, 184, 129, 0.48);
  background: rgba(27, 21, 34, 0.78);
}

.spire-meter--complete {
  border-color: rgba(96, 227, 183, 0.28);
  background: rgba(18, 108, 76, 0.14);
}

.spire-meter__label,
.spire-meter__action {
  font-size: 0.72rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(229, 200, 138, 0.82);
}

.spire-meter__value {
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--color-parchment);
}

.spire-meter__action {
  justify-self: end;
  color: rgba(198, 212, 255, 0.82);
}

.spire-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 1rem;
}

.spire-preview-card {
  min-height: 4.25rem;
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 0.45rem;
  background: linear-gradient(180deg, rgba(14, 18, 31, 0.76), rgba(5, 8, 16, 0.72));
  padding: 0.75rem;
}

.spire-preview-card b {
  display: block;
  font-size: 0.78rem;
  color: var(--color-celestial-gold);
}

.spire-preview-card span {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(229, 232, 242, 0.82);
}

.spire-run-note {
  margin-top: 0.9rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(217, 184, 129, 0.13);
  border-radius: 0.4rem;
  background: rgba(3, 5, 12, 0.42);
}

.spire-progress {
  margin-top: 1rem;
  padding: 0.8rem;
  border: 1px solid rgba(217, 184, 129, 0.14);
  border-radius: 0.45rem;
  background: rgba(3, 5, 12, 0.48);
}

.spire-progress__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(229, 200, 138, 0.86);
}

.spire-progress__top b {
  color: var(--color-parchment);
}

.spire-progress__track {
  position: relative;
  height: 1.45rem;
  margin-top: 0.75rem;
  border: 1px solid rgba(217, 184, 129, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.45);
}

.spire-progress__fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(217, 184, 129, 0.88), rgba(161, 97, 255, 0.72));
  box-shadow: 0 0 18px rgba(158, 98, 255, 0.32);
}

.spire-progress__milestones {
  position: absolute;
  inset: 0 0.72rem;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  align-items: center;
  pointer-events: none;
}

.spire-progress__marker {
  position: relative;
  justify-self: end;
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  transform: translateX(50%);
  border: 1px solid rgba(217, 184, 129, 0.32);
  border-radius: 50%;
  background: rgb(9, 12, 22);
  font-size: 0.68rem;
  font-weight: 900;
  color: rgba(229, 200, 138, 0.88);
  pointer-events: auto;
}

.spire-progress__marker:last-child {
  transform: none;
}

.spire-progress__marker.is-cleared {
  border-color: rgba(167, 109, 255, 0.55);
  background: rgb(40, 23, 68);
}

.spire-progress__marker.is-current {
  border-color: rgba(255, 235, 164, 0.9);
  box-shadow: 0 0 0 3px rgba(217, 184, 129, 0.18), 0 0 18px rgba(217, 184, 129, 0.35);
}

.spire-flux {
  display: grid;
  grid-template-columns: minmax(10rem, 13rem) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid rgba(176, 120, 255, 0.22);
  border-radius: 0.5rem;
  background: rgba(23, 13, 42, 0.42);
}

.spire-flux__copy b {
  display: block;
  margin-top: 0.2rem;
  font-size: 1.55rem;
  line-height: 1;
  color: rgb(225, 207, 255);
}

.spire-flux__copy small {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: rgba(229, 232, 242, 0.74);
}

.spire-flux__bar {
  position: relative;
  min-height: 3.3rem;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 0.24rem;
  align-items: stretch;
  padding-right: 4.2rem;
}

.spire-flux__fill {
  position: absolute;
  inset: 0.45rem 4.2rem 0.45rem 0;
  max-width: calc(100% - 4.2rem);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(107, 62, 196, 0.85), rgba(206, 90, 255, 0.9));
  box-shadow: 0 0 22px rgba(176, 92, 255, 0.34);
}

.spire-flux__bar i {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(176, 120, 255, 0.2);
  border-radius: 0.3rem;
  background: rgba(4, 5, 12, 0.5);
}

.spire-flux__bar i.is-lit {
  border-color: rgba(225, 183, 255, 0.42);
  background: rgba(137, 71, 222, 0.3);
}

.spire-flux__aberration {
  position: absolute;
  right: 0;
  top: 50%;
  width: 3.25rem;
  height: 3.25rem;
  transform: translateY(-50%);
  border: 1px solid rgba(217, 184, 129, 0.28);
  border-radius: 0.45rem;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.35);
  filter: saturate(0.7) brightness(0.78);
}

.spire-flux--ignited {
  border-color: rgba(225, 129, 255, 0.58);
  box-shadow: 0 0 28px rgba(177, 78, 255, 0.24), inset 0 1px 0 rgba(255, 246, 210, 0.06);
}

.spire-flux--ignited .spire-flux__aberration {
  filter: saturate(1.18) brightness(1.12);
  box-shadow: 0 0 22px rgba(221, 123, 255, 0.46);
}

.spire-next-floor {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.spire-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(0.9rem, 1.5vw, 1.2rem);
  margin-top: 1rem;
}

.spire-tarot-card {
  position: relative;
  aspect-ratio: 2 / 3;
  min-height: 31rem;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.34);
  border-radius: 0.65rem;
  background: rgb(5, 7, 14);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.08),
    0 18px 36px rgba(0, 0, 0, 0.38);
}

.spire-tarot-card__back {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(5, 7, 14, 0.44), rgba(5, 7, 14, 0.83)),
    url("./celestial/spire/tarot-back.webp") center / cover no-repeat;
  opacity: 0.92;
}

.spire-tarot-card__face {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: clamp(0.85rem, 1.5vw, 1.1rem);
}

.spire-tarot-card__face h4 {
  margin: 0;
  padding: 0.4rem 0 0.65rem;
  border-bottom: 1px solid rgba(217, 184, 129, 0.22);
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1.25rem, 1.7vw, 1.75rem);
  line-height: 1;
  color: var(--color-parchment);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.78);
}

.spire-tarot-option {
  display: flex;
  min-height: 10rem;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: rgba(3, 5, 12, 0.74);
}

.spire-tarot-option b,
.spire-tarot-option__row {
  font-size: 0.8rem;
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spire-tarot-option p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(229, 232, 242, 0.88);
}

.spire-tarot-option--upright {
  border-color: rgba(217, 184, 129, 0.32);
  box-shadow: inset 0 0 0 1px rgba(96, 227, 183, 0.08);
}

.spire-tarot-option--upright b {
  color: rgb(206, 244, 190);
}

.spire-tarot-option--reversed {
  border-color: rgba(255, 91, 118, 0.35);
  background: rgba(42, 10, 23, 0.72);
}

.spire-tarot-option--reversed b {
  color: rgb(255, 187, 195);
}

.spire-tarot-option__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.spire-flux-chip {
  min-height: 1.55rem;
  border-color: rgba(255, 91, 118, 0.42);
  background: rgba(158, 38, 74, 0.22);
  padding: 0.28rem 0.45rem;
  color: rgb(255, 209, 217);
}

.spire-card-choice {
  width: 100%;
  min-height: 2.25rem;
  font-size: 0.76rem !important;
}

/* Spire Tarot v2: distinct card fronts and compact orientation choices. */
.spire-tarot-panel {
  position: relative;
  overflow: visible;
  background:
    radial-gradient(circle at 50% 0%, rgba(114, 73, 163, 0.16), transparent 32%),
    linear-gradient(180deg, rgba(7, 10, 19, 0.97), rgba(3, 6, 13, 0.97));
}

.spire-tarot-rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.spire-tarot-rule {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.65rem;
  min-height: 3rem;
  border: 1px solid rgba(217, 184, 129, 0.2);
  border-radius: 0.5rem;
  padding: 0.65rem 0.75rem;
  background: rgba(3, 6, 13, 0.62);
  color: rgba(229, 232, 242, 0.82);
  font-size: 0.76rem;
  line-height: 1.4;
}

.spire-tarot-rule b {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.spire-tarot-rule--upright b {
  color: rgb(205, 241, 190);
}

.spire-tarot-rule--reversed {
  border-color: rgba(255, 91, 118, 0.26);
  background: rgba(39, 8, 21, 0.48);
}

.spire-tarot-rule--reversed b {
  color: rgb(255, 187, 195);
}

.spire-tarot-panel .spire-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.spire-tarot-panel .spire-tarot-card {
  --tarot-accent: #b895ff;
  --tarot-accent-rgb: 184, 149, 255;
  isolation: isolate;
  display: grid;
  grid-template-rows: minmax(14.5rem, 19vw) auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: auto;
  overflow: hidden;
  border-color: rgba(var(--tarot-accent-rgb), 0.5);
  border-radius: 0.75rem;
  background: rgb(4, 6, 13);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.08),
    0 18px 38px rgba(0, 0, 0, 0.42),
    0 0 24px rgba(var(--tarot-accent-rgb), 0.07);
  animation: spire-tarot-reveal 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.spire-tarot-panel .spire-tarot-card:hover,
.spire-tarot-panel .spire-tarot-card:focus-within {
  transform: translateY(-3px);
  border-color: rgba(var(--tarot-accent-rgb), 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.1),
    0 22px 44px rgba(0, 0, 0, 0.48),
    0 0 30px rgba(var(--tarot-accent-rgb), 0.15);
}

.spire-tarot-card[data-tone="ember"] { --tarot-accent: #ff934d; --tarot-accent-rgb: 255, 147, 77; }
.spire-tarot-card[data-tone="violet"] { --tarot-accent: #c28cff; --tarot-accent-rgb: 194, 140, 255; }
.spire-tarot-card[data-tone="silver"] { --tarot-accent: #dce9ff; --tarot-accent-rgb: 220, 233, 255; }
.spire-tarot-card[data-tone="gold"] { --tarot-accent: #f2c85b; --tarot-accent-rgb: 242, 200, 91; }
.spire-tarot-card[data-tone="void"] { --tarot-accent: #9b83d7; --tarot-accent-rgb: 155, 131, 215; }
.spire-tarot-card[data-tone="frost"] { --tarot-accent: #83ddff; --tarot-accent-rgb: 131, 221, 255; }
.spire-tarot-card[data-tone="blood"] { --tarot-accent: #ff667d; --tarot-accent-rgb: 255, 102, 125; }
.spire-tarot-card[data-tone="verdant"] { --tarot-accent: #99d9b2; --tarot-accent-rgb: 153, 217, 178; }
.spire-tarot-card[data-tone="azure"] { --tarot-accent: #78c5ff; --tarot-accent-rgb: 120, 197, 255; }
.spire-tarot-card[data-tone="mana"] { --tarot-accent: #65bfff; --tarot-accent-rgb: 101, 191, 255; }

.spire-tarot-panel .spire-tarot-card__back {
  z-index: -1;
  opacity: 0.35;
}

.spire-tarot-card__art {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: rgb(2, 4, 10);
}

.spire-tarot-card__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 43%;
  filter: saturate(0.96) contrast(1.04) brightness(0.9);
  transform: scale(1.012);
  transition:
    transform 320ms ease,
    filter 220ms ease;
}

.spire-tarot-card:hover .spire-tarot-card__art img,
.spire-tarot-card:focus-within .spire-tarot-card__art img {
  filter: saturate(1.06) contrast(1.04) brightness(0.98);
  transform: scale(1.035);
}

.spire-tarot-card__art-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(1, 3, 8, 0.18) 0%, transparent 35%, rgba(2, 4, 10, 0.9) 100%),
    linear-gradient(90deg, rgba(1, 3, 8, 0.2), transparent 14%, transparent 86%, rgba(1, 3, 8, 0.2));
  pointer-events: none;
}

.spire-tarot-card__identity {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.85rem 0.9rem 0.8rem;
  pointer-events: none;
}

.spire-tarot-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: rgba(255, 244, 207, 0.78);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px #000;
}

.spire-tarot-card__category {
  border: 1px solid rgba(var(--tarot-accent-rgb), 0.48);
  border-radius: 999px;
  padding: 0.26rem 0.48rem;
  background: rgba(2, 4, 10, 0.7);
  color: var(--tarot-accent);
  box-shadow: 0 0 14px rgba(var(--tarot-accent-rgb), 0.12);
}

.spire-tarot-card__identity h4 {
  margin: 0;
  padding: 0.7rem 0.1rem 0;
  border-top: 1px solid rgba(var(--tarot-accent-rgb), 0.34);
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1.35rem, 1.65vw, 1.8rem);
  line-height: 1.08;
  color: var(--color-parchment);
  text-shadow:
    0 3px 12px #000,
    0 0 18px rgba(var(--tarot-accent-rgb), 0.18);
}

.spire-tarot-card__choices {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  padding: 0.7rem;
  border-top: 1px solid rgba(var(--tarot-accent-rgb), 0.28);
  background:
    linear-gradient(180deg, rgba(5, 8, 16, 0.88), rgba(2, 4, 10, 0.98)),
    radial-gradient(circle at 50% 0%, rgba(var(--tarot-accent-rgb), 0.12), transparent 55%);
}

.spire-tarot-panel .spire-tarot-option {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.5rem;
  width: 100%;
  min-height: 7.4rem;
  flex: none;
  border-radius: 0.5rem;
  padding: 0.68rem 0.72rem;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.spire-tarot-panel .spire-tarot-option b,
.spire-tarot-panel .spire-tarot-option__row {
  font-size: 0.72rem;
}

.spire-tarot-option__effect {
  display: block;
  align-self: center;
  font-size: 0.84rem;
  line-height: 1.42;
  color: rgba(229, 232, 242, 0.9);
}

.spire-tarot-panel .spire-tarot-option--upright {
  border-color: rgba(163, 220, 184, 0.34);
  background: linear-gradient(135deg, rgba(15, 34, 28, 0.72), rgba(4, 8, 14, 0.9));
}

.spire-tarot-panel .spire-tarot-option--upright:hover,
.spire-tarot-panel .spire-tarot-option--upright:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(163, 236, 190, 0.68);
  background: linear-gradient(135deg, rgba(22, 52, 41, 0.84), rgba(5, 11, 18, 0.94));
  box-shadow: 0 0 18px rgba(85, 217, 155, 0.12);
  outline: none;
}

.spire-tarot-panel .spire-tarot-option--reversed {
  border-color: rgba(255, 91, 118, 0.38);
  background: linear-gradient(135deg, rgba(54, 10, 27, 0.8), rgba(12, 4, 14, 0.94));
}

.spire-tarot-panel .spire-tarot-option--reversed:hover,
.spire-tarot-panel .spire-tarot-option--reversed:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 116, 142, 0.72);
  background: linear-gradient(135deg, rgba(76, 13, 37, 0.88), rgba(17, 5, 17, 0.96));
  box-shadow: 0 0 18px rgba(255, 78, 116, 0.14);
  outline: none;
}

.spire-orientation-chip,
.spire-tarot-panel .spire-flux-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.55rem;
  border: 1px solid rgba(96, 227, 183, 0.3);
  border-radius: 999px;
  padding: 0.28rem 0.48rem;
  background: rgba(44, 121, 91, 0.16);
  color: rgb(197, 239, 213);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spire-tarot-panel .spire-flux-chip {
  border-color: rgba(255, 91, 118, 0.42);
  background: rgba(158, 38, 74, 0.22);
  color: rgb(255, 209, 217);
}

.spire-tarot-option__action {
  color: var(--color-celestial-gold, #dfb24d);
  font-size: 0.67rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spire-tarot-option__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

@keyframes spire-tarot-reveal {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1180px) {
  .spire-tarot-panel .spire-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .spire-tarot-rules,
  .spire-tarot-panel .spire-card-grid {
    grid-template-columns: 1fr;
  }

  .spire-tarot-panel .spire-tarot-card {
    grid-template-rows: minmax(16rem, 60vw) auto;
  }

  .spire-tarot-rule {
    grid-template-columns: 1fr;
  }
}

.reduce-motion .spire-tarot-card,
.reduce-motion .spire-tarot-card__art img,
.reduce-motion .spire-tarot-option {
  animation: none;
  transition: none;
}

@media (prefers-reduced-motion: reduce) {
  .spire-tarot-card,
  .spire-tarot-card__art img,
  .spire-tarot-option {
    animation: none;
    transition: none;
  }
}

.spire-tarot-modal-shell {
  position: fixed;
  inset: 0;
  z-index: 99950;
  display: grid;
  place-items: center;
  padding: clamp(0.4rem, 1vw, 0.8rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 36%, rgba(83, 46, 126, 0.22), transparent 45%),
    rgba(1, 3, 8, 0.86);
  backdrop-filter: blur(9px) saturate(0.72);
}

.spire-tarot-modal {
  width: min(96vw, 55rem);
  height: min(46rem, calc(100vh - 0.8rem));
  max-height: calc(100vh - 0.8rem);
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(217, 184, 129, 0.42);
  border-radius: 0.8rem;
  padding: clamp(0.65rem, 1vw, 0.9rem);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.72),
    0 0 48px rgba(129, 73, 185, 0.16),
    inset 0 1px 0 rgba(255, 246, 210, 0.08);
  scrollbar-color: rgba(217, 184, 129, 0.45) rgba(4, 7, 14, 0.7);
}

.spire-tarot-modal__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(21rem, 0.7fr);
  align-items: start;
  gap: 1rem;
}

.spire-tarot-modal__title h2 {
  margin: 0.18rem 0 0;
  color: var(--color-parchment);
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1.55rem, 2.1vw, 2.3rem);
  line-height: 1;
  text-shadow: 0 0 24px rgba(183, 133, 232, 0.22);
}

.spire-tarot-modal__title p {
  max-width: 52rem;
  margin: 0.35rem 0 0;
  color: rgba(229, 232, 242, 0.78);
  font-size: 0.82rem;
  line-height: 1.45;
}

.spire-tarot-modal__controls {
  display: grid;
  grid-template-columns: minmax(11rem, 1fr) minmax(9rem, 10rem);
  min-width: 0;
  gap: 0.55rem;
}

.spire-tarot-modal__flux {
  grid-row: span 2;
  min-width: 11rem;
  border: 1px solid rgba(178, 128, 232, 0.3);
  border-radius: 0.5rem;
  padding: 0.62rem 0.7rem;
  background: rgba(17, 10, 29, 0.72);
}

.spire-tarot-modal__flux > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: rgba(224, 205, 246, 0.8);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spire-tarot-modal__flux strong {
  color: #e0b6ff;
  font-size: 1rem;
}

.spire-tarot-modal__flux-track {
  height: 0.45rem;
  margin-top: 0.48rem;
  overflow: hidden;
  border: 1px solid rgba(200, 160, 239, 0.2);
  border-radius: 999px;
  background: rgba(2, 4, 10, 0.9);
}

.spire-tarot-modal__flux-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7e56b1, #d55d9f, #ff677f);
  box-shadow: 0 0 14px rgba(218, 91, 163, 0.42);
  transition: width 220ms ease;
}

.spire-tarot-modal__flux small {
  display: block;
  margin-top: 0.42rem;
  color: rgba(222, 209, 233, 0.62);
  font-size: 0.62rem;
  line-height: 1.35;
}

.spire-tarot-modal__flux.is-aberrant {
  border-color: rgba(255, 91, 118, 0.56);
  box-shadow: 0 0 22px rgba(255, 69, 107, 0.15);
}

.spire-tarot-modal__auto {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border: 1px solid rgba(217, 184, 129, 0.3);
  border-radius: 0.5rem;
  padding: 0.58rem 0.68rem;
  background: rgba(5, 8, 15, 0.86);
  color: rgba(229, 232, 242, 0.8);
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
}

.spire-tarot-modal__auto b {
  color: var(--color-celestial-gold);
  text-transform: uppercase;
}

.spire-tarot-modal__auto.is-active {
  border-color: rgba(92, 226, 169, 0.48);
  background: rgba(13, 54, 39, 0.62);
}

.spire-tarot-modal__auto.is-active b {
  color: #91e7bc;
}

.spire-tarot-modal__offline-rule {
  display: grid;
  width: 100%;
  min-width: 0;
  align-content: center;
  gap: 0.18rem;
  border: 1px solid rgba(172, 121, 225, 0.28);
  border-radius: 0.5rem;
  padding: 0.48rem 0.58rem;
  background: rgba(27, 14, 43, 0.72);
}

.spire-tarot-modal__offline-rule b {
  color: #e3c4ff;
  font-size: 0.61rem;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.spire-tarot-modal__offline-rule span {
  min-width: 0;
  overflow-wrap: break-word;
  color: rgba(224, 211, 238, 0.68);
  font-size: 0.59rem;
  line-height: 1.3;
}

.spire-tarot-modal .spire-tarot-card {
  perspective: 75rem;
  grid-template-rows: auto auto;
}

.spire-tarot-modal .spire-card-grid {
  gap: 0.8rem;
  margin-top: 0.65rem;
}

.spire-tarot-modal .spire-tarot-rules {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.spire-tarot-modal .spire-tarot-rule {
  min-height: 2.35rem;
  padding: 0.45rem 0.6rem;
  font-size: 0.7rem;
}

.spire-tarot-modal .spire-tarot-card.is-reversed {
  --tarot-accent: #ff6684;
  --tarot-accent-rgb: 255, 102, 132;
}

.spire-tarot-modal .spire-tarot-card__art img {
  object-fit: contain;
  object-position: center;
  animation: spire-tarot-side-swap 460ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
  backface-visibility: hidden;
  transform-origin: center;
}

.spire-tarot-modal .spire-tarot-card__art {
  width: 100%;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--tarot-accent-rgb), 0.08), transparent 58%),
    #02040a;
}

.spire-tarot-modal .spire-tarot-card:hover .spire-tarot-card__art img,
.spire-tarot-modal .spire-tarot-card:focus-within .spire-tarot-card__art img {
  transform: none;
}

.spire-tarot-modal .spire-tarot-card.is-reversed .spire-tarot-card__art-shade {
  background:
    linear-gradient(180deg, rgba(34, 2, 14, 0.14) 0%, transparent 34%, rgba(20, 2, 10, 0.92) 100%),
    linear-gradient(90deg, rgba(31, 3, 15, 0.22), transparent 14%, transparent 86%, rgba(31, 3, 15, 0.22));
}

.spire-tarot-modal .spire-tarot-card__identity h3 {
  margin: 0;
  overflow: hidden;
  padding: 0.55rem 0.08rem 0;
  border-top: 1px solid rgba(var(--tarot-accent-rgb), 0.34);
  color: var(--color-parchment);
  font-family: var(--font-heading, Georgia, serif);
  font-size: clamp(1rem, 1.18vw, 1.22rem);
  line-height: 1;
  letter-spacing: -0.015em;
  text-overflow: clip;
  white-space: nowrap;
  text-shadow:
    0 3px 12px #000,
    0 0 18px rgba(var(--tarot-accent-rgb), 0.18);
}

.spire-tarot-side-summary {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.55rem;
  height: 6rem;
  min-height: 6rem;
  box-sizing: border-box;
  border: 1px solid rgba(158, 221, 185, 0.28);
  border-radius: 0.5rem;
  padding: 0.7rem 0.72rem;
  background: linear-gradient(135deg, rgba(13, 39, 29, 0.68), rgba(4, 8, 14, 0.88));
}

.spire-tarot-side-summary.is-reversed {
  border-color: rgba(255, 91, 118, 0.4);
  background: linear-gradient(135deg, rgba(58, 9, 28, 0.82), rgba(12, 4, 14, 0.94));
}

.spire-tarot-side-summary b {
  color: #c9f1d8;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spire-tarot-side-summary.is-reversed b {
  color: #ffc1cd;
}

.spire-tarot-side-summary p {
  align-self: center;
  margin: 0;
  color: rgba(232, 235, 243, 0.9);
  font-size: 0.71rem;
  line-height: 1.3;
}

.spire-tarot-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.spire-tarot-card__choices {
  grid-template-rows: 6rem 2.45rem;
  gap: 0.45rem;
  padding: 0.55rem;
}

.spire-tarot-choose,
.spire-tarot-swap {
  width: 100%;
  height: 2.45rem;
  min-height: 2.45rem;
  box-sizing: border-box;
  border-radius: 0.42rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.spire-tarot-choose.is-reversed {
  border-color: rgba(255, 101, 132, 0.62);
  background: linear-gradient(180deg, #8f2545, #5f132e);
  color: #fff0f3;
}

.spire-tarot-swap {
  border: 1px solid rgba(188, 145, 232, 0.38);
  background: rgba(35, 20, 52, 0.76);
  color: #dbc0f4;
  cursor: pointer;
}

.spire-tarot-swap:hover,
.spire-tarot-swap:focus-visible {
  border-color: rgba(220, 181, 255, 0.72);
  background: rgba(58, 31, 85, 0.88);
  outline: none;
}

.spire-choice-chip--penalty {
  border-color: rgba(255, 91, 118, 0.36);
  background: rgba(126, 24, 52, 0.2);
  color: #ffc0cc;
}

@keyframes spire-tarot-side-swap {
  0% {
    opacity: 0;
    transform: perspective(75rem) rotateY(-92deg) scale(0.97);
    filter: brightness(0.4) saturate(0.65);
  }
  62% {
    opacity: 1;
    transform: perspective(75rem) rotateY(6deg) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: perspective(75rem) rotateY(0) scale(1);
  }
}

@media (max-width: 1100px) {
  .spire-tarot-modal__header {
    grid-template-columns: 1fr;
  }

  .spire-tarot-modal__controls {
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 0.45fr);
  }
}

@media (max-width: 680px) {
  .spire-tarot-modal-shell {
    place-items: stretch;
    padding: 0;
  }

  .spire-tarot-modal {
    width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .spire-tarot-modal__controls,
  .spire-tarot-card__actions {
    grid-template-columns: 1fr;
  }

  .spire-tarot-modal__flux {
    grid-row: auto;
  }
}

.reduce-motion .spire-tarot-modal .spire-tarot-card__art img {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .spire-tarot-modal .spire-tarot-card__art img {
    animation: none;
  }
}

.spire-choice-panel,
.spire-modifier-panel,
.spire-record-panel {
  margin-top: 1rem;
}

.spire-choice-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.spire-choice-change {
  min-height: 2rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.7rem;
}

.spire-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.spire-choice-chip {
  border-color: rgba(217, 184, 129, 0.2);
  background: rgba(217, 184, 129, 0.1);
  color: rgb(242, 220, 171);
}

.spire-choice-chip--reversed {
  border-color: rgba(255, 91, 118, 0.3);
  background: rgba(158, 38, 74, 0.14);
  color: rgb(255, 207, 215);
}

.spire-choice-chip--modifier {
  border-color: rgba(96, 227, 183, 0.24);
  background: rgba(18, 108, 76, 0.12);
  color: rgb(190, 255, 231);
}

.spire-record-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.spire-record-card {
  border: 1px solid rgba(217, 184, 129, 0.16);
  border-radius: 0.45rem;
  background: rgba(4, 7, 14, 0.58);
  padding: 0.8rem;
}

.spire-record-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--color-parchment);
}

.spire-record-card__top span {
  color: var(--color-celestial-gold);
}

.spire-record-card__top span.is-aberrant {
  color: rgb(230, 178, 255);
}

.spire-record-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

@media (max-width: 900px) {
  .spire-tab {
    min-height: 44rem;
    padding: 0.75rem;
  }

  .spire-hero,
  .spire-panel__header,
  .spire-panel__header--actions,
  .spire-flux {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .spire-requirements,
  .spire-preview-grid,
  .spire-run-summary {
    grid-template-columns: 1fr;
  }

  .spire-actions,
  .spire-hero__status {
    justify-content: flex-start;
  }

  .spire-tarot-card {
    min-height: 28rem;
  }
}

/* Celestial Forge final full-page presentation */
.celestial-forge-tab {
  --forge-panel: rgba(5, 10, 19, 0.78);
  --forge-border: rgba(217, 184, 129, 0.24);
  --forge-crimson: #d96262;
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 7rem);
  margin: 0;
  padding: clamp(0.85rem, 1.3vw, 1.45rem);
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.16);
  border-radius: 0.5rem;
  background:
    radial-gradient(ellipse at 50% 36%, rgba(96, 60, 148, 0.16), transparent 34%),
    radial-gradient(ellipse at 50% 86%, rgba(217, 184, 129, 0.19), transparent 40%),
    linear-gradient(90deg, rgba(1, 4, 10, 0.76), rgba(3, 8, 16, 0.24) 18%, rgba(3, 8, 16, 0.24) 82%, rgba(1, 4, 10, 0.78)),
    linear-gradient(180deg, rgba(1, 4, 10, 0.7), rgba(1, 4, 10, 0.2) 42%, rgba(1, 4, 10, 0.78)),
    url("./celestial/forge/forge-background.webp?v=forge-final-1") center 60% / cover no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255, 244, 205, 0.04),
    inset 0 -10rem 12rem rgba(0, 0, 0, 0.44),
    0 1.4rem 3rem rgba(0, 0, 0, 0.28);
}

.celestial-forge-tab::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 72%, rgba(217, 184, 129, 0.15), transparent 30%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.32), transparent 18%, rgba(0, 0, 0, 0.62) 100%);
}

.celestial-forge-tab::after {
  content: "";
  position: absolute;
  inset: auto 12% -10% 12%;
  z-index: -1;
  height: 34%;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(217, 184, 129, 0.17), transparent 66%);
  filter: blur(1.1rem);
}

.celestial-forge-tab > * {
  position: relative;
  z-index: 1;
}

.celestial-forge-crucible {
  min-height: 8.8rem;
  padding: clamp(1rem, 1.8vw, 1.55rem);
  overflow: visible;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(ellipse at 50% 92%, rgba(217, 184, 129, 0.17), transparent 58%),
    linear-gradient(90deg, rgba(1, 4, 10, 0.74), rgba(4, 10, 20, 0.2) 48%, rgba(1, 4, 10, 0.72));
  box-shadow: none;
}

.celestial-forge-crucible::before {
  background:
    radial-gradient(ellipse at 50% 100%, rgba(217, 184, 129, 0.22), transparent 44%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.18));
}

.celestial-forge-crucible__glow {
  inset: auto 24% -3.2rem 24%;
  height: 8.5rem;
  background: radial-gradient(ellipse at 50% 50%, rgba(217, 184, 129, 0.31), rgba(137, 82, 218, 0.13) 34%, transparent 70%);
  filter: blur(0.9rem);
}

.celestial-forge-crucible__content {
  align-items: center;
  gap: clamp(1rem, 2vw, 2.25rem);
}

.celestial-forge-crucible__copy {
  max-width: 46rem;
}

.celestial-forge-crucible__kicker {
  color: #f3c96d;
  text-shadow: 0 0 0.8rem rgba(217, 184, 129, 0.24);
}

.celestial-forge-crucible__title {
  width: fit-content;
  margin-top: 0.45rem;
  color: #fff2d2;
  font-size: clamp(2.4rem, 4.2vw, 4.65rem);
  text-shadow:
    0 0 1.4rem rgba(217, 184, 129, 0.26),
    0 0 2.6rem rgba(137, 82, 218, 0.18);
}

.celestial-forge-crucible__text,
.celestial-forge-note,
.celestial-forge-node__pips {
  display: none !important;
}

.celestial-forge-crucible__controls {
  width: min(100%, 23rem);
  gap: 0.65rem;
}

.celestial-forge-crucible__counter {
  grid-template-columns: 4.3rem minmax(0, 1fr);
  min-height: 5.7rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(217, 184, 129, 0.34);
  border-radius: 0.42rem;
  background:
    radial-gradient(circle at 18% 42%, rgba(217, 184, 129, 0.2), transparent 54%),
    linear-gradient(180deg, rgba(7, 14, 27, 0.88), rgba(2, 6, 14, 0.78));
}

.celestial-forge-crucible__flame {
  width: 3.85rem;
  height: 3.85rem;
  overflow: hidden;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 242, 210, 0.22), rgba(91, 53, 146, 0.24) 42%, rgba(0, 0, 0, 0.76));
}

.celestial-forge-crucible__flame img,
.celestial-forge-node__cost-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.celestial-forge-crucible__numbers strong {
  color: #fff2d2;
  font-size: clamp(1.65rem, 2.3vw, 2.25rem);
  text-shadow: 0 0 1rem rgba(217, 184, 129, 0.24);
}

.celestial-forge-crucible__numbers span {
  color: rgba(244, 232, 208, 0.66);
}

.celestial-forge-unmake-button {
  min-height: 2.25rem;
  border-color: rgba(217, 184, 129, 0.18);
  background: rgba(1, 5, 12, 0.62);
  color: rgba(244, 232, 208, 0.66);
}

.celestial-forge-unmake-button:not(:disabled):hover {
  border-color: rgba(217, 98, 98, 0.78);
  color: #ffd3d3;
}

.celestial-forge-unmake {
  border-radius: 0.42rem;
  backdrop-filter: blur(0.55rem);
}

.celestial-forge-unmake__confirm {
  border-color: rgba(255, 173, 173, 0.72);
  background: linear-gradient(180deg, rgba(153, 43, 52, 0.96), rgba(78, 14, 24, 0.98));
}

.celestial-forge-empty {
  max-width: 42rem;
  margin-inline: auto;
  border-radius: 0.45rem;
  background:
    radial-gradient(circle at 18% 0%, rgba(217, 184, 129, 0.16), transparent 54%),
    linear-gradient(180deg, rgba(5, 12, 24, 0.88), rgba(2, 6, 14, 0.84));
  backdrop-filter: blur(0.45rem);
}

.celestial-forge-branches {
  width: 100%;
  grid-template-columns: repeat(4, minmax(13.5rem, 1fr));
  gap: clamp(0.75rem, 1vw, 1.1rem);
}

.celestial-forge-shrine {
  position: relative;
  min-height: 100%;
  padding: 0.95rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 42%, rgba(217, 184, 129, 0.13));
  border-radius: 0.5rem;
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--forge-accent, #d9b881) 18%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(10, 18, 31, 0.86), rgba(2, 6, 14, 0.8));
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 205, 0.06),
    0 1rem 2.3rem rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(0.35rem);
}

.celestial-forge-shrine::before,
.celestial-forge-shrine::after,
.celestial-forge-node::before,
.celestial-forge-node::after {
  content: "";
  position: absolute;
  width: 1.1rem;
  height: 1.1rem;
  pointer-events: none;
  opacity: 0.72;
}

.celestial-forge-shrine::before,
.celestial-forge-node::before {
  top: 0.35rem;
  left: 0.35rem;
  border-top: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 68%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 68%, transparent);
}

.celestial-forge-shrine::after,
.celestial-forge-node::after {
  right: 0.35rem;
  bottom: 0.35rem;
  border-right: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 54%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 54%, transparent);
}

.celestial-forge-shrine__header {
  grid-template-columns: 3.15rem minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 4rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--forge-accent, #d9b881) 22%, transparent);
}

.celestial-forge-shrine__icon {
  width: 2.75rem;
  height: 2.75rem;
  overflow: hidden;
  border-radius: 0.45rem;
  background:
    radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--forge-accent, #d9b881) 24%, transparent), transparent 64%),
    rgba(0, 0, 0, 0.58);
  box-shadow:
    0 0 1.2rem color-mix(in srgb, var(--forge-accent, #d9b881) 28%, transparent),
    inset 0 0 0 1px rgba(255, 244, 205, 0.05);
}

.celestial-forge-shrine__icon img,
.celestial-forge-node__icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.celestial-forge-shrine__title {
  position: relative;
  width: fit-content;
  padding-bottom: 0.22rem;
  color: color-mix(in srgb, var(--forge-accent, #d9b881) 76%, #fff2d2);
  font-size: 1.02rem;
}

.celestial-forge-shrine__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--forge-accent, #d9b881) 74%, transparent), transparent);
}

.celestial-forge-shrine__desc {
  color: rgba(232, 220, 198, 0.64);
  font-size: 0.73rem;
}

.celestial-forge-shrine__rank {
  border-color: color-mix(in srgb, var(--forge-accent, #d9b881) 34%, transparent);
  color: #fff2d2;
}

.celestial-forge-chain {
  gap: 0.78rem;
  padding-top: 0.2rem;
  padding-left: 0.12rem;
}

.celestial-forge-chain::before,
.celestial-forge-chain::after {
  top: 4.3rem;
  bottom: 2.8rem;
  left: 2.12rem;
  mask-image: linear-gradient(180deg, transparent, #000 10%, #000 78%, transparent);
}

.celestial-forge-chain::before {
  background: linear-gradient(180deg, rgba(244, 232, 208, 0.2), rgba(244, 232, 208, 0.05), transparent);
}

.celestial-forge-chain::after {
  background: linear-gradient(180deg, color-mix(in srgb, var(--forge-accent, #d9b881) 92%, #ffffff), color-mix(in srgb, var(--forge-accent, #d9b881) 38%, transparent), transparent);
}

.celestial-forge-node {
  grid-template-columns: 4.55rem minmax(0, 1fr);
  min-height: 9.6rem;
  padding: 0.72rem;
  border: 1px solid rgba(217, 184, 129, 0.14);
  border-radius: 0.45rem;
  background:
    radial-gradient(circle at 9% 20%, color-mix(in srgb, var(--forge-accent, #d9b881) 13%, transparent), transparent 45%),
    linear-gradient(180deg, rgba(8, 14, 26, 0.86), rgba(1, 5, 12, 0.8));
  transition:
    border-color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.celestial-forge-node:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--forge-accent, #d9b881) 46%, rgba(217, 184, 129, 0.2));
  box-shadow:
    0 0 1.35rem color-mix(in srgb, var(--forge-accent, #d9b881) 12%, transparent),
    inset 0 1px 0 rgba(255, 244, 205, 0.05);
}

.celestial-forge-node__socket {
  width: 3.65rem;
  height: 3.65rem;
  overflow: hidden;
  border-radius: 0.5rem;
  border-color: color-mix(in srgb, var(--forge-accent, #d9b881) 58%, transparent);
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--forge-accent, #d9b881) 22%, transparent), transparent 60%),
    rgba(1, 5, 12, 0.92);
}

.celestial-forge-node__icon {
  width: 2.65rem;
  height: 2.65rem;
  overflow: hidden;
  border-radius: 0.32rem;
  transform: none;
  filter: drop-shadow(0 0 0.55rem color-mix(in srgb, var(--forge-accent, #d9b881) 34%, transparent));
}

.celestial-forge-node--maxed .celestial-forge-node__socket {
  border-color: rgba(255, 220, 125, 0.96);
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 235, 159, 0.68), rgba(217, 184, 129, 0.2) 55%, rgba(1, 5, 12, 0.86)),
    rgba(1, 5, 12, 0.9);
  box-shadow:
    0 0 1.25rem rgba(255, 218, 111, 0.44),
    0 0 2.25rem color-mix(in srgb, var(--forge-accent, #d9b881) 28%, transparent),
    inset 0 0 1.15rem rgba(255, 245, 192, 0.18);
}

.celestial-forge-node__rank {
  color: rgba(244, 232, 208, 0.78);
}

.celestial-forge-node__body {
  gap: 0.45rem;
}

.celestial-forge-node__name {
  color: #fff2d2;
  font-size: 1rem;
}

.celestial-forge-node__pip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.22rem;
  min-height: 0.92rem;
}

.celestial-forge-node__rank-pip {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}

.celestial-forge-node__rank-pip.is-empty {
  border-color: rgba(217, 184, 129, 0.2);
  background: rgba(1, 5, 12, 0.64);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.44);
}

.celestial-forge-node__rank-pip.is-spent {
  border-color: color-mix(in srgb, var(--forge-accent, #d9b881) 78%, #fff2d2);
  background:
    radial-gradient(circle at 40% 30%, #fff2d2, color-mix(in srgb, var(--forge-accent, #d9b881) 82%, #c8a572) 48%, rgba(6, 10, 18, 0.9));
  box-shadow: 0 0 0.55rem color-mix(in srgb, var(--forge-accent, #d9b881) 46%, transparent);
}

.celestial-forge-node__preview {
  min-height: 3.15rem;
  align-items: flex-start;
  padding: 0.55rem 0.62rem;
  border-radius: 0.36rem;
  border-color: color-mix(in srgb, var(--forge-accent, #d9b881) 24%, transparent);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--forge-accent, #d9b881) 10%, transparent), transparent 72%),
    rgba(1, 5, 12, 0.58);
  color: rgba(244, 232, 208, 0.88);
}

.celestial-forge-node__cost {
  min-height: 1.75rem;
  padding: 0.2rem 0.5rem 0.2rem 0.25rem;
  border-color: color-mix(in srgb, var(--forge-accent, #d9b881) 34%, transparent);
  background: rgba(1, 5, 12, 0.56);
}

.celestial-forge-node--unaffordable .celestial-forge-node__cost {
  border-color: rgba(248, 113, 113, 0.56);
  background:
    radial-gradient(circle at 15% 50%, rgba(248, 113, 113, 0.18), transparent 56%),
    rgba(42, 12, 18, 0.42);
  color: rgba(252, 165, 165, 0.82);
}

.celestial-forge-node__cost-icon {
  width: 1.28rem;
  height: 1.28rem;
  border-radius: 50%;
  box-shadow: 0 0 0.55rem rgba(217, 184, 129, 0.24);
}

.celestial-forge-node__cost-mark {
  display: none !important;
}

.celestial-forge-node__forged-ribbon {
  display: inline-grid;
  min-height: 1.75rem;
  place-items: center;
  padding: 0.28rem 0.72rem;
  border: 1px solid rgba(255, 220, 125, 0.7);
  border-radius: 999px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 246, 201, 0.28), transparent 46%),
    linear-gradient(180deg, rgba(139, 102, 35, 0.92), rgba(64, 43, 12, 0.94));
  color: #fff2d2;
  font: 1000 0.62rem/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 0 1rem rgba(217, 184, 129, 0.24);
}

.celestial-forge-node__button {
  min-height: 1.8rem;
  padding: 0.38rem 0.68rem;
  border-radius: 0.26rem;
}

@media (max-width: 1500px) {
  .celestial-forge-branches {
    grid-template-columns: repeat(2, minmax(16rem, 1fr));
  }
}

@media (max-width: 980px) {
  .celestial-forge-tab {
    padding: 0.7rem;
  }

  .celestial-forge-crucible__content,
  .celestial-forge-unmake,
  .celestial-forge-empty {
    align-items: stretch;
    flex-direction: column;
  }

  .celestial-forge-crucible__controls {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .celestial-forge-branches {
    grid-template-columns: 1fr;
  }

  .celestial-forge-node {
    grid-template-columns: 4.25rem minmax(0, 1fr);
  }
}

/* ===== Vital card v2 override (sidebar character card) — appended block, keeps all variant rules ===== */
.sidebar-character-card {
  border-top: 2px solid var(--class-meter-border, rgba(217, 184, 129, 0.55));
  padding: 13px 13px 14px;
}
.sidebar-character-card__head {
  align-items: start;
  gap: 13px;
}
.sidebar-character-card__portrait {
  overflow: visible;
}
.sidebar-character-card__portrait::after {
  border: 1px solid var(--class-meter-border, rgba(217, 184, 129, 0.4));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -26px 26px rgba(0, 0, 0, 0.3),
    0 0 14px color-mix(in srgb, var(--class-meter-color, #d9b881) 22%, transparent);
}
.sidebar-character-card__level-badge {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%);
  z-index: 6;
  display: inline-flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  width: auto;
  min-height: 0;
  padding: 3px 10px 4px;
  border: 1px solid rgba(223, 190, 124, 0.95);
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 236, 170, 0.3), transparent 60%),
    linear-gradient(160deg, rgba(46, 34, 24, 0.99), rgba(9, 12, 18, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 205, 0.2),
    0 5px 14px rgba(0, 0, 0, 0.7),
    0 0 12px rgba(217, 184, 129, 0.3);
}
.sidebar-character-card__level-label {
  font-size: 8px;
  letter-spacing: 0.14em;
}
.sidebar-character-card__level-number {
  font-size: 15px;
}
.sidebar-character-card__identity {
  gap: 5px;
  padding-top: 2px;
}
.sidebar-character-card__classline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}
.sidebar-character-card__classline .scc-class {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.sidebar-character-card__classline .scc-dot {
  flex: 0 0 auto;
  color: rgba(217, 184, 129, 0.7);
}
.sidebar-character-card__classline .scc-sub {
  flex: 0 1 auto;
  overflow: hidden;
  color: rgba(239, 231, 208, 0.92);
  text-overflow: ellipsis;
}
.sidebar-character-card__classline .scc-none {
  color: rgba(216, 207, 188, 0.42);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.sidebar-character-card__title-line {
  overflow: hidden;
  color: #d9b881;
  font-family: var(--font-serif);
  font-size: 10px;
  font-style: italic;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.9;
}
.sidebar-character-card__divider {
  height: 1px;
  margin: 12px 0 9px;
  background: linear-gradient(90deg, transparent, rgba(217, 184, 129, 0.34), transparent);
}
.sidebar-character-card__vitals {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sidebar-character-card__vital-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
}
.sidebar-character-card__vital-label span:last-child {
  color: #e8dec6;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.02em;
}
.sidebar-character-card__vital-track {
  height: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  overflow: hidden;
}
.sidebar-character-card__vital-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 260ms ease;
}
.sidebar-character-card__buff-chip.is-quick {
  margin-top: 10px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.32);
}
.sidebar-character-card__quick-grid {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 6px;
}
.sidebar-character-card__quick-slot {
  position: relative;
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-radius: 6px;
  background: rgba(2, 6, 12, 0.55);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7);
}
.sidebar-character-card__quick-slot img {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
}
.sidebar-character-card__quick-slot.is-inactive img {
  filter: saturate(0.2) brightness(0.7);
  opacity: 0.45;
}
.sidebar-character-card__quick-slot.is-active {
  border-color: var(--quick-color, rgba(217, 184, 129, 0.6));
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.7),
    0 0 10px color-mix(in srgb, var(--quick-color, #d9b881) 30%, transparent);
}
.sidebar-character-card__quick-glyph {
  color: rgba(216, 207, 188, 0.5);
  font-family: var(--font-ui);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.sidebar-character-card__quick-value {
  position: absolute;
  right: 3px;
  bottom: 2px;
  color: #e8dec6;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* ===== Vital card v3 — full reconstruction (scc2): cinematic banner header + stat body ===== */
.sidebar-character-card.scc2 {
  padding: 0;
  overflow: hidden;
}
.sidebar-character-card.scc2::before,
.sidebar-character-card.scc2::after {
  content: none;
}
.scc2-hero {
  position: relative;
  height: 128px;
  background: linear-gradient(160deg, rgba(16, 24, 39, 0.9), rgba(10, 14, 24, 0.95));
}
.scc2-hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 14%;
  filter: saturate(1.05) brightness(1.08) contrast(1.02);
}
.scc2-hero-art--class {
  object-position: 50% 0%;
  transform: scale(1.45);
  transform-origin: 50% 16%;
}
.scc2-hero-art--subclass-default {
  object-position: 50% 35%;
}
.scc2-hero-art--subclass-alternate {
  object-position: 50% 8%;
  transform: scale(1.45);
  transform-origin: 50% 16%;
}
.scc2-hero-art--custom {
  object-position: 50% 0%;
}
.scc2-hero-art--empty {
  background:
    radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--scc2-class, #d9b881) 26%, transparent), transparent 62%),
    linear-gradient(160deg, rgba(20, 28, 44, 0.98), rgba(10, 14, 24, 0.99));
}
.scc2-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(4, 8, 16, 0.16), rgba(4, 8, 16, 0.01) 36%, rgba(6, 10, 18, 0.18) 62%, rgba(10, 14, 23, 0.84) 88%, rgba(11, 15, 25, 0.98)),
    linear-gradient(90deg, rgba(4, 8, 16, 0.22), transparent 42%);
}
.scc2-presentation-toggle {
  position: absolute;
  top: 7px;
  right: 7px;
  z-index: 7;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--scc2-class, #d9b881) 78%, #f6e7bd);
  border-radius: 5px;
  background:
    linear-gradient(145deg, rgba(17, 27, 42, 0.96), rgba(4, 9, 17, 0.96));
  color: color-mix(in srgb, var(--scc2-class, #d9b881) 82%, #fff3ca);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 2px 10px rgba(0, 0, 0, 0.5);
  font-family: var(--font-ui, sans-serif);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition:
    border-color 140ms ease,
    color 140ms ease,
    filter 140ms ease,
    transform 140ms ease;
}
.scc2-presentation-toggle:hover,
.scc2-presentation-toggle:focus-visible {
  border-color: #fff0bd;
  color: #fff7df;
  filter: brightness(1.18);
  transform: translateY(-1px);
  outline: none;
}
.scc2-custom-avatar-button {
  right: 37px;
}
.scc2-custom-avatar-button svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.scc2-custom-avatar-button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}
.scc2-avatar-file-input {
  display: none;
}
.scc2-level {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 4px 10px 5px;
  border: 1px solid rgba(223, 190, 124, 0.95);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 236, 170, 0.30), transparent 60%),
    linear-gradient(160deg, rgba(46, 34, 24, 0.98), rgba(9, 12, 18, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 205, 0.22),
    0 6px 16px rgba(0, 0, 0, 0.66),
    0 0 12px rgba(217, 184, 129, 0.28);
}
.scc2-level-label {
  color: #d9b881;
  font-family: var(--font-ui);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0.2em;
  line-height: 1;
}
.scc2-level-num {
  color: #fff2c8;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}
.scc2-medallion {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 2px;
  border: 1px solid rgba(217, 184, 129, 0.5);
  border-radius: 8px;
  background: rgba(6, 10, 18, 0.72);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}
.scc2-id {
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 7px;
  z-index: 2;
  min-width: 0;
}
.scc2-name {
  overflow: hidden;
  color: var(--color-parchment, #efe7d0);
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.92);
  white-space: nowrap;
}
.scc2-classline {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.13em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}
.scc2-classline > span {
  text-shadow: 0 1px 7px rgba(0, 0, 0, 0.9);
}
.scc2-class {
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}
.scc2-dot {
  flex: 0 0 auto;
  color: rgba(217, 184, 129, 0.75);
}
.scc2-sub {
  flex: 0 1 auto;
  overflow: hidden;
  color: rgba(239, 231, 208, 0.94);
  text-overflow: ellipsis;
}
.scc2-none {
  color: rgba(216, 207, 188, 0.5);
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.1em;
}
.scc2-title {
  overflow: hidden;
  margin-top: 2px;
  color: #d9b881;
  font-family: var(--font-serif);
  font-size: 10px;
  font-style: italic;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}
.scc2-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 12px 12px;
}
.scc2-bar-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.scc2-bar-name {
  font-family: var(--font-ui);
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.75);
}
.scc2-meter-label-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.scc2-meter-help {
  position: relative;
  display: inline-grid;
  width: 12px;
  height: 12px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(2, 6, 12, 0.86);
  box-shadow: 0 0 8px color-mix(in srgb, currentColor 38%, transparent);
  color: currentColor;
  cursor: var(--vespera-cursor-pointer);
  font: 1000 9px/1 var(--font-ui, inherit);
  letter-spacing: 0;
  text-transform: none;
}
.scc2-meter-help[data-help]:hover,
.scc2-meter-help[data-help]:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 1px rgba(244, 232, 208, 0.55),
    0 0 10px color-mix(in srgb, currentColor 48%, transparent);
}
.scc2-bar-val {
  color: #e8dec6;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: 0.02em;
}
.scc2-track {
  height: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.75);
  overflow: hidden;
}
.scc2-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 260ms ease;
}
.scc2-meter {
  margin-top: 1px;
  padding: 8px 9px 9px;
  border: 1px solid var(--class-meter-border, rgba(217, 184, 129, 0.4));
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  transition: box-shadow 240ms ease;
}
.scc2-meter.is-active {
  box-shadow: 0 0 16px color-mix(in srgb, var(--class-meter-color, #d9b881) 38%, transparent);
}
.scc2-meter .scc2-bar-top {
  margin-bottom: 4px;
}
.scc2-track--meter {
  height: 14px;
}
.scc2-track--meter .scc2-fill {
  width: 100%;
  transform-origin: left center;
  transition: transform 110ms linear;
  will-change: transform;
}
.scc2-slots {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-top: 1px;
}
.scc2-slot {
  position: relative;
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(217, 184, 129, 0.22);
  border-radius: 6px;
  background: rgba(2, 6, 12, 0.55);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7);
}
.scc2-slot img {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
}
.scc2-slot.is-inactive img {
  filter: saturate(0.2) brightness(0.68);
  opacity: 0.45;
}
.scc2-slot.is-active {
  border-color: var(--quick-color, rgba(217, 184, 129, 0.6));
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.7),
    0 0 10px color-mix(in srgb, var(--quick-color, #d9b881) 32%, transparent);
}
.scc2-slot-glyph {
  color: rgba(216, 207, 188, 0.5);
  font-family: var(--font-ui);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.12em;
}
.scc2-slot-value {
  position: absolute;
  right: 3px;
  bottom: 2px;
  color: #e8dec6;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
}

/* scc2 layout guard: defeat legacy grid variants that force a 98/82/76px column layout on the card */
.sidebar-character-card.scc2 {
  display: flex;
  flex-direction: column;
  column-gap: 0;
  row-gap: 0;
  grid-template-columns: none;
  grid-template-rows: none;
  min-height: 0;
  align-items: stretch;
}
.sidebar-character-card.scc2 > .scc2-hero {
  width: 100%;
  flex: 0 0 auto;
}
.sidebar-character-card.scc2 > .scc2-body {
  width: 100%;
  flex: 1 1 auto;
}

/* scc2 requested polish: larger portrait, visible stat chip, explicit class labels, compact effect squares */
.sidebar-character-card.scc2 {
  overflow: visible;
}
.sidebar-character-card.scc2 .scc2-hero {
  height: 150px;
  overflow: visible;
  border-radius: 8px 8px 0 0;
}
.sidebar-character-card.scc2 .scc2-hero-art,
.sidebar-character-card.scc2 .scc2-hero-art--empty,
.sidebar-character-card.scc2 .scc2-hero-scrim {
  border-radius: 8px 8px 0 0;
}
.sidebar-character-card.scc2 .scc2-level {
  top: 10px;
  right: 10px;
  min-width: 48px;
  padding: 5px 10px 6px;
}
.sidebar-character-card.scc2 .scc2-level-label {
  font-size: 7.5px;
  letter-spacing: 0.16em;
}
.sidebar-character-card.scc2 .scc2-level-num {
  font-size: 20px;
}
.sidebar-character-card.scc2 .scc2-stats-chip {
  position: absolute;
  top: 63px;
  right: 10px;
  z-index: 14;
  display: grid;
  min-width: 58px;
  min-height: 23px;
  place-items: center;
  border: 1px solid rgba(121, 199, 255, 0.46);
  border-radius: 6px;
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 199, 255, 0.22), transparent 65%),
    rgba(4, 10, 18, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 5px 13px rgba(0, 0, 0, 0.58);
  cursor: default;
}
.sidebar-character-card.scc2 .scc2-stats-label {
  color: #eaf6ff;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.8);
}
.sidebar-character-card.scc2 .scc2-stats-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 5000;
  width: 250px;
  max-width: calc(100vw - 28px);
  max-height: min(470px, calc(100vh - 120px));
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(217, 184, 129, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 27, 41, 0.98), rgba(8, 13, 23, 0.99));
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}
.sidebar-character-card.scc2 .scc2-stats-chip:hover .scc2-stats-popover,
.sidebar-character-card.scc2 .scc2-stats-chip:focus-within .scc2-stats-popover {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.sidebar-character-card.scc2 .scc2-stats-popover-title {
  margin-bottom: 8px;
  color: #fff2c8;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.sidebar-character-card.scc2 .scc2-stats-group + .scc2-stats-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(217, 184, 129, 0.18);
}
.sidebar-character-card.scc2 .scc2-stats-group-label {
  margin-bottom: 5px;
  color: #d9b881;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sidebar-character-card.scc2 .scc2-stats-grid {
  display: grid;
  gap: 4px;
}
.sidebar-character-card.scc2 .scc2-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(239, 231, 208, 0.78);
  font-family: var(--font-ui);
  font-size: 10px;
  line-height: 1.15;
}
.sidebar-character-card.scc2 .scc2-stats-row strong {
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
}
.scc2-stats-popover-portal {
  position: fixed;
  z-index: 2147483600;
  width: 250px;
  max-width: calc(100vw - 28px);
  max-height: min(470px, calc(100vh - 80px));
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(217, 184, 129, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 27, 41, 0.98), rgba(8, 13, 23, 0.99));
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.75),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  pointer-events: none;
}
.scc2-stats-popover-portal .scc2-stats-popover-title {
  margin-bottom: 8px;
  color: #fff2c8;
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.scc2-stats-popover-portal .scc2-stats-group + .scc2-stats-group {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(217, 184, 129, 0.18);
}
.scc2-stats-popover-portal .scc2-stats-group-label {
  margin-bottom: 5px;
  color: #d9b881;
  font-family: var(--font-ui);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.scc2-stats-popover-portal .scc2-stats-grid {
  display: grid;
  gap: 4px;
}
.scc2-stats-popover-portal .scc2-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: rgba(239, 231, 208, 0.78);
  font-family: var(--font-ui);
  font-size: 10px;
  line-height: 1.15;
}
.scc2-stats-popover-portal .scc2-stats-row strong {
  color: #ffffff;
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
}
.scc2-slot-tooltip-portal {
  position: fixed;
  z-index: 2147483600;
  width: max-content;
  max-width: min(260px, calc(100vw - 36px));
  padding: 8px 10px;
  border: 1px solid rgba(217, 184, 129, 0.52);
  border-radius: 6px;
  background: rgba(3, 8, 17, 0.99);
  color: rgba(244, 232, 208, 0.95);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.72),
    0 0 16px color-mix(in srgb, var(--quick-color, #d9b881) 18%, transparent);
  font: 700 10.5px/1.35 var(--font-body, inherit);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: pre-line;
  pointer-events: none;
}
.sidebar-character-card.scc2 .scc2-medallion {
  top: 11px;
  left: 11px;
  padding: 3px;
  border-radius: 10px;
  border-color: rgba(217, 184, 129, 0.72);
  background: rgba(5, 9, 16, 0.80);
}
.sidebar-character-card.scc2 .scc2-id {
  left: 12px;
  right: 12px;
  bottom: 9px;
  min-height: 48px;
}
.sidebar-character-card.scc2 .scc2-name {
  font-size: 18px;
}
.sidebar-character-card.scc2 .scc2-classline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  margin-top: 5px;
  white-space: normal;
}
.sidebar-character-card.scc2 .scc2-classline > .scc2-class,
.sidebar-character-card.scc2 .scc2-classline > .scc2-sub {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
  padding: 4px 5px;
  border: 1px solid rgba(217, 184, 129, 0.20);
  border-radius: 6px;
  background: rgba(2, 6, 12, 0.46);
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-character-card.scc2 .scc2-class::before,
.sidebar-character-card.scc2 .scc2-sub::before {
  color: #d9b881;
  font-family: var(--font-ui);
  font-size: 6.8px;
  font-weight: 900;
  letter-spacing: 0.16em;
  line-height: 1;
}
.sidebar-character-card.scc2 .scc2-class::before {
  content: "CLASS";
}
.sidebar-character-card.scc2 .scc2-sub::before {
  content: "SUBCLASS";
}
.sidebar-character-card.scc2 .scc2-sub--action {
  cursor: pointer;
  color: #fff2c8;
  text-align: left;
  border-color: rgba(245, 216, 119, 0.68) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 216, 119, 0.2), transparent 45%),
    rgba(24, 14, 5, 0.72) !important;
  box-shadow: 0 0 15px rgba(245, 216, 119, 0.18);
  animation: subclass-ready-pulse 1.8s ease-in-out infinite;
}
.sidebar-character-card.scc2 .scc2-sub--action:hover,
.sidebar-character-card.scc2 .scc2-sub--action:focus-visible {
  border-color: rgba(255, 238, 177, 0.94) !important;
  color: #fff8df;
  outline: 2px solid rgba(245, 216, 119, 0.5);
  outline-offset: 1px;
}
@keyframes subclass-ready-pulse {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 216, 119, 0.16); }
  50% { box-shadow: 0 0 22px rgba(245, 216, 119, 0.42); }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar-character-card.scc2 .scc2-sub--action {
    animation: none;
  }
}
.reduce-motion .sidebar-character-card.scc2 .scc2-sub--action {
  animation: none;
}
.sidebar-character-card.scc2 .scc2-dot,
.sidebar-character-card.scc2 .scc2-title {
  display: none !important;
}
.sidebar-character-card.scc2 .scc2-meter {
  padding: 7px 0 0;
  border: 0;
  background: transparent;
}
.sidebar-character-card.scc2 .scc2-slots {
  display: grid;
  grid-template-columns: repeat(4, 34px);
  justify-content: space-between;
  gap: 6px;
  margin-top: 3px;
}
.sidebar-character-card.scc2 .scc2-slot {
  width: 34px;
  min-width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 6px;
}
.sidebar-character-card.scc2 .scc2-slot img {
  width: 22px;
  height: 22px;
}
.sidebar-character-card.scc2 .scc2-slot-glyph {
  max-width: 28px;
  overflow: hidden;
  font-size: 7px;
  letter-spacing: 0.08em;
  text-align: center;
  text-overflow: ellipsis;
}
.sidebar-character-card.scc2 .scc2-slot-value {
  right: 2px;
  bottom: 2px;
  font-size: 7.5px;
}

.sidebar-character-card.scc2 .scc2-slot[data-help] {
  overflow: visible !important;
  cursor: var(--vespera-cursor-pointer) !important;
}

.sidebar-character-card.scc2 .scc2-slot[data-help]::after {
  content: attr(data-help);
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 2147483647;
  width: max-content;
  max-width: min(240px, calc(100vw - 36px));
  padding: 8px 10px;
  border: 1px solid rgba(217, 184, 129, 0.52);
  border-radius: 6px;
  background: rgba(3, 8, 17, 0.99);
  color: rgba(244, 232, 208, 0.95);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.72), 0 0 16px color-mix(in srgb, var(--quick-color, #d9b881) 18%, transparent);
  font: 700 10.5px/1.35 var(--font-body, inherit);
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  white-space: pre-line;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.sidebar-character-card.scc2 .scc2-slot[data-help]:hover,
.sidebar-character-card.scc2 .scc2-slot[data-help]:focus-visible {
  z-index: 2147483000 !important;
}

.sidebar-character-card.scc2 .scc2-slot[data-help]:hover::after,
.sidebar-character-card.scc2 .scc2-slot[data-help]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

/* ===== FRONTIER v2 — FULL-SCREEN WAR TABLE (appended override; no JSX changes) ===== */
/* Shell owns the whole viewport under the top bar; nothing scrolls */
.frontier-page-shell--open {
  position: relative;
  height: calc(100dvh - 4rem);
  min-height: 0;
  overflow: hidden;
}
main:has(.frontier-page-shell--open) {
  overflow-y: hidden !important;
}
main:has(.frontier-page-shell--open) > .relative.z-10 {
  min-height: 0 !important;
  padding-bottom: 0 !important;
}
/* Rail = the viewport plane */
.frontier-page-shell--open .frontier-stage-rail {
  display: block;
  position: absolute;
  inset: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #000;
}
/* Stage: true edge-to-edge cover at the map's native 16:9; symmetric crop when the viewport isn't 16:9 */
.frontier-page-shell--open .frontier-map-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 1536 / 864;
  width: max(100%, calc((100dvh - 4rem) * 1.77778)) !important;
  height: auto;
  max-height: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}
/* Region plate bar: pad down past the cropped band so it is always fully visible */
.frontier-page-shell--open .frontier-map-topbar {
  padding-top: max(0.85rem, calc((100% / 1.77778 - 100dvh + 4rem) / 2 + 0.85rem));
  padding-left: 1rem;
  padding-right: 1rem;
}
.frontier-page-shell--open .frontier-region-plate {
  border-radius: 10px;
  border-color: rgba(217, 184, 129, 0.3);
  background:
    linear-gradient(135deg, rgba(8, 12, 21, 0.9), rgba(12, 18, 30, 0.78)) !important;
  box-shadow:
    inset 0 1px 0 rgba(244, 232, 208, 0.1),
    0 18px 44px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}
/* Dissolve the bottom strip entirely; its panels become floating war-table docks */
.frontier-page-shell--open .frontier-stage-rail__support {
  display: contents;
}
.frontier-page-shell--open .frontier-bottom-dock {
  display: contents;
}
/* Shared dock chrome */
.frontier-page-shell--open .frontier-briefing-panel,
.frontier-page-shell--open .frontier-socket-panel,
.frontier-page-shell--open .frontier-command-panel {
  position: absolute;
  z-index: 40;
  margin: 0;
  border: 1px solid rgba(217, 184, 129, 0.28) !important;
  border-radius: 12px !important;
  background:
    linear-gradient(180deg, rgba(10, 15, 26, 0.92), rgba(5, 8, 15, 0.9)) !important;
  box-shadow:
    inset 0 1px 0 rgba(244, 232, 208, 0.09),
    0 24px 60px rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(10px) saturate(1.05);
  padding: 0.95rem !important;
}
/* Node briefing: bottom-right command card */
.frontier-page-shell--open .frontier-briefing-panel {
  right: 1rem;
  bottom: 1rem;
  width: min(400px, 30vw);
  max-height: 46vh;
  overflow-y: auto;
}
/* Active Seals: bottom-left */
.frontier-page-shell--open .frontier-socket-panel {
  left: 1rem;
  bottom: 1rem;
  width: min(360px, 27vw);
  max-height: 40vh;
  overflow-y: auto;
}
.frontier-page-shell--open .frontier-socket-panel .frontier-seal-socket {
  min-height: 64px;
}
/* Bastion / Quartermaster / Campaign: top-right, compact and scrollable */
.frontier-page-shell--open .frontier-command-panel {
  right: 1rem;
  top: 1rem;
  width: min(380px, 29vw);
  max-height: 52vh;
  overflow-y: auto;
}
/* Region switcher: floating pill dock, bottom-center of the screen */
.frontier-page-shell--open .frontier-region-dock {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  z-index: 35;
  order: 0;
  width: auto;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(217, 184, 129, 0.26);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(9, 14, 24, 0.9), rgba(5, 8, 15, 0.88));
  box-shadow:
    inset 0 1px 0 rgba(244, 232, 208, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(9px);
}
/* Custom scrollbars inside docks stay subtle */
.frontier-page-shell--open .frontier-briefing-panel::-webkit-scrollbar,
.frontier-page-shell--open .frontier-socket-panel::-webkit-scrollbar,
.frontier-page-shell--open .frontier-command-panel::-webkit-scrollbar {
  width: 6px;
}
.frontier-page-shell--open .frontier-briefing-panel::-webkit-scrollbar-thumb,
.frontier-page-shell--open .frontier-socket-panel::-webkit-scrollbar-thumb,
.frontier-page-shell--open .frontier-command-panel::-webkit-scrollbar-thumb {
  background: rgba(217, 184, 129, 0.28);
  border-radius: 999px;
}
/* Narrow screens: fall back to stacked flow so nothing overlaps */
@media (max-width: 1100px) {
  .frontier-page-shell--open {
    height: auto;
    overflow: visible;
  }
  main:has(.frontier-page-shell--open) {
    overflow-y: auto !important;
  }
  .frontier-page-shell--open .frontier-stage-rail {
    position: static;
    display: grid;
    height: auto;
    overflow: visible;
  }
  .frontier-page-shell--open .frontier-map-stage {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100% !important;
  }
  .frontier-page-shell--open .frontier-map-topbar {
    padding-top: 0.85rem;
  }
  .frontier-page-shell--open .frontier-stage-rail__support {
    display: block;
    padding: 0.75rem;
  }
  .frontier-page-shell--open .frontier-bottom-dock {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr);
  }
  .frontier-page-shell--open .frontier-briefing-panel,
  .frontier-page-shell--open .frontier-socket-panel,
  .frontier-page-shell--open .frontier-command-panel,
  .frontier-page-shell--open .frontier-region-dock {
    position: static;
    width: auto;
    max-height: none;
    transform: none;
  }
}

/* ===== FRONTIER v3 - SELECTED REGION EXPEDITION ===== */
.frontier-region-expedition.frontier-page-shell--open {
  --frontier-region-bg-size: 235% auto;
  --frontier-region-bg-position: 50% 50%;
  --frontier-region-accent: #d9b881;
  --frontier-region-glow: rgba(217, 184, 129, 0.22);
  height: calc(100dvh - 4rem);
  padding: 8px 10px 10px;
  background:
    radial-gradient(circle at 52% 24%, rgba(58, 78, 104, 0.22), transparent 36%),
    linear-gradient(180deg, #071321 0%, #03070d 100%);
  overflow: hidden;
}

.frontier-region-expedition--gloamwell_march {
  --frontier-region-bg-size: cover;
  --frontier-region-bg-position: 50% 50%;
  --frontier-region-accent: #8bbfe1;
  --frontier-region-glow: rgba(91, 151, 195, 0.26);
}

.frontier-region-expedition--briarwake_bastion {
  --frontier-region-bg-position: 50% 27%;
  --frontier-region-accent: #9fbc75;
  --frontier-region-glow: rgba(99, 139, 72, 0.25);
}

.frontier-region-expedition--ashglass_reliquary {
  --frontier-region-bg-position: 88% 24%;
  --frontier-region-accent: #e48a48;
  --frontier-region-glow: rgba(204, 83, 34, 0.26);
}

.frontier-region-expedition--drowned_star_strand {
  --frontier-region-bg-position: 16% 78%;
  --frontier-region-accent: #68c9d0;
  --frontier-region-glow: rgba(54, 143, 158, 0.24);
}

.frontier-region-expedition--cinderwyrm_aerie {
  --frontier-region-bg-position: 50% 86%;
  --frontier-region-accent: #e06c36;
  --frontier-region-glow: rgba(217, 83, 28, 0.25);
}

.frontier-region-expedition--crownless_meridian {
  --frontier-region-bg-position: 89% 82%;
  --frontier-region-accent: #b89cf3;
  --frontier-region-glow: rgba(144, 96, 220, 0.25);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
  position: relative !important;
  inset: auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) clamp(330px, 24vw, 410px);
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(7, 14, 24, 0.94), rgba(3, 7, 13, 0.96)),
    #050912;
  box-shadow:
    inset 0 1px 0 rgba(244, 232, 208, 0.08),
    0 24px 60px rgba(0, 0, 0, 0.42);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  grid-column: 1;
  grid-row: 1;
  width: 100% !important;
  height: 100% !important;
  min-height: 0;
  aspect-ratio: auto !important;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.25);
  border-radius: 8px;
  background: #02060c;
  box-shadow:
    inset 0 0 0 1px rgba(244, 232, 208, 0.03),
    inset 0 -80px 140px rgba(0, 0, 0, 0.45);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-map-art {
  background-size: var(--frontier-region-bg-size) !important;
  background-position: var(--frontier-region-bg-position) !important;
  background-repeat: no-repeat !important;
  filter: saturate(1.12) contrast(1.08) brightness(0.9) !important;
  transform: scale(1.018);
  transform-origin: center;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-map-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 34%, rgba(1, 5, 11, 0.18) 58%, rgba(0, 0, 0, 0.6) 100%),
    linear-gradient(90deg, rgba(2, 7, 14, 0.45), transparent 20%, transparent 76%, rgba(0, 0, 0, 0.55));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-map-stage::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(217, 184, 129, 0.16);
  border-radius: 6px;
  box-shadow: inset 0 0 46px rgba(0, 0, 0, 0.34);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-map-topbar {
  inset: 12px auto auto 12px;
  width: min(350px, 42%);
  padding: 0;
  display: block;
  pointer-events: none;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate {
  width: 100% !important;
  padding: 0.8rem !important;
  border-color: color-mix(in srgb, var(--frontier-region-accent) 48%, rgba(217, 184, 129, 0.35)) !important;
  background:
    linear-gradient(135deg, rgba(5, 10, 18, 0.92), rgba(12, 20, 31, 0.76)) !important;
  box-shadow:
    inset 0 1px 0 rgba(244, 232, 208, 0.1),
    0 18px 42px rgba(0, 0, 0, 0.52),
    0 0 34px var(--frontier-region-glow);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__name {
  color: var(--frontier-region-accent);
  font-size: clamp(1.15rem, 1.15vw, 1.45rem);
  line-height: 1.08;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
  inset: 9% 4% 11%;
  z-index: 12;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-shadow {
  stroke-width: 0.55;
  opacity: 0.56;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-full {
  stroke: color-mix(in srgb, var(--frontier-region-accent) 70%, #1f2430);
  stroke-width: 0.24;
  opacity: 0.74;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress {
  stroke: var(--frontier-region-accent);
  stroke-width: 0.34;
  opacity: 0.96;
  filter: drop-shadow(0 0 5px var(--frontier-region-glow));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
  z-index: 14;
  transform: scale(1.12);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node:hover,
.frontier-region-expedition.frontier-page-shell--open .frontier-route-node:focus-visible {
  transform: scale(1.28);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
  outline: 2px solid rgba(244, 232, 208, 0.72);
  outline-offset: 3px;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
  inset: auto 0 12px;
  justify-content: center;
  padding: 0;
  pointer-events: none;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
  position: relative !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
  pointer-events: auto;
  padding: 0.42rem 0.52rem;
  border-color: rgba(217, 184, 129, 0.3);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 12, 21, 0.94), rgba(3, 7, 13, 0.92));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--active {
  border-color: var(--frontier-region-accent);
  background: color-mix(in srgb, var(--frontier-region-accent) 20%, rgba(0, 0, 0, 0.62));
  color: #fff4c7;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail__support {
  position: relative !important;
  display: block !important;
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 0 !important;
  overflow: hidden;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock {
  display: grid !important;
  grid-template-rows: auto minmax(0, 0.95fr) minmax(0, 1fr);
  gap: 8px;
  height: 100%;
  min-height: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
  position: relative !important;
  inset: auto !important;
  right: auto !important;
  bottom: auto !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  max-height: none !important;
  min-height: 0;
  overflow: auto;
  border-radius: 8px !important;
  border-color: rgba(217, 184, 129, 0.26) !important;
  background:
    linear-gradient(180deg, rgba(8, 15, 26, 0.94), rgba(5, 10, 18, 0.92)) !important;
  box-shadow:
    inset 0 1px 0 rgba(244, 232, 208, 0.08),
    0 12px 32px rgba(0, 0, 0, 0.36) !important;
  padding: 0.78rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
  order: 1;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
  order: 2;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  order: 3;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
  font-size: 1.18rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
  grid-template-columns: 72px minmax(0, 1fr) !important;
  gap: 0.7rem;
  margin-top: 0.75rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
  width: 72px !important;
  height: 72px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
  gap: 0.35rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.45rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card {
  padding: 0.55rem 0.65rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body {
  margin-top: 0.55rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
  padding: 0.55rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel p {
  display: none;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
  min-height: 62px !important;
  padding: 0.55rem !important;
}

@media (max-width: 1180px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
    display: none;
  }
}

@media (max-width: 900px) {
  .frontier-region-expedition.frontier-page-shell--open {
    height: auto;
    min-height: calc(100dvh - 4rem);
    overflow: visible;
  }

  main:has(.frontier-region-expedition.frontier-page-shell--open) {
    overflow-y: auto !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    overflow: visible;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    min-height: 62vh;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail__support {
    grid-column: 1;
    height: auto;
    overflow: visible;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock {
    height: auto;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-topbar {
    width: calc(100% - 24px);
  }
}

/* Frontier v3.1 - readable selected-region node flow. */
.frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
  overflow: visible;
  isolation: isolate;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__pip,
.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__mark {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 0.58rem !important;
  height: 0.58rem !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 999px;
  background: rgba(12, 8, 4, 0.9) !important;
  box-shadow:
    inset 0 0 0 1px rgba(255, 239, 181, 0.34),
    0 0 9px var(--frontier-region-glow) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__mark {
  color: #160e05 !important;
  background: var(--frontier-region-accent) !important;
  font-size: 0.65rem !important;
  line-height: 1;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__pip--locked {
  width: 0.38rem !important;
  height: 0.38rem !important;
  background: rgba(148, 155, 170, 0.42) !important;
  box-shadow: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__number {
  position: absolute;
  left: 50%;
  top: -1.35rem;
  z-index: 3;
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-width: 1.28rem !important;
  height: 1rem !important;
  padding: 0 0.18rem;
  border: 1px solid rgba(217, 184, 129, 0.34);
  border-radius: 4px;
  background: rgba(3, 7, 13, 0.84) !important;
  color: rgba(230, 238, 250, 0.76) !important;
  font-family: var(--font-ui, inherit);
  font-size: 0.52rem !important;
  font-weight: 900;
  line-height: 1 !important;
  letter-spacing: 0;
  text-shadow: none;
  transform: translateX(-50%);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.48);
  pointer-events: none;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--available .frontier-route-node__number,
.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected .frontier-route-node__number {
  border-color: color-mix(in srgb, var(--frontier-region-accent) 70%, #f4d47a);
  background: color-mix(in srgb, var(--frontier-region-accent) 24%, rgba(3, 7, 13, 0.88)) !important;
  color: #fff4c7 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected .frontier-route-node__number {
  top: -1.55rem;
  min-width: 1.45rem !important;
  height: 1.12rem !important;
  background: var(--frontier-region-accent) !important;
  color: #06101a !important;
  box-shadow:
    0 0 0 2px rgba(0, 0, 0, 0.48),
    0 0 16px var(--frontier-region-glow);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared .frontier-route-node__number {
  color: rgba(255, 244, 199, 0.9) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node--locked .frontier-route-node__number {
  border-color: rgba(148, 155, 170, 0.18);
  color: rgba(200, 210, 225, 0.42) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__portrait {
  filter: saturate(0.95) contrast(1.05) brightness(0.88);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-node__boss-label {
  bottom: -1.08rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.6rem;
  border: 1px solid rgba(217, 184, 129, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(7, 12, 21, 0.92), rgba(3, 7, 13, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(244, 232, 208, 0.08),
    0 14px 32px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-status__label,
.frontier-region-expedition.frontier-page-shell--open .frontier-route-status__state {
  font-family: var(--font-ui, inherit);
  font-size: 0.55rem;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  color: rgba(218, 201, 168, 0.78);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-status__value {
  color: var(--frontier-region-accent);
  font-family: var(--font-ui, inherit);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-status__state {
  padding: 0.22rem 0.38rem;
  border: 1px solid rgba(217, 184, 129, 0.2);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.26);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-status__state--ready {
  border-color: color-mix(in srgb, var(--frontier-region-accent) 48%, rgba(217, 184, 129, 0.2));
  color: #fff4c7;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-status__state--cleared {
  border-color: rgba(113, 211, 154, 0.32);
  color: rgba(177, 245, 204, 0.9);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-route-status__state--locked {
  color: rgba(200, 210, 225, 0.48);
}

@media (max-width: 900px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node__number {
    top: -1.18rem;
    min-width: 1.08rem !important;
    height: 0.9rem !important;
    font-size: 0.48rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-status {
    max-width: calc(100vw - 2rem);
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* Frontier v3.2 - unified operation rail. */
.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail__support {
  border: 1px solid rgba(217, 184, 129, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.86), rgba(2, 6, 12, 0.92)),
    radial-gradient(circle at 50% 0%, var(--frontier-region-glow), transparent 42%);
  box-shadow:
    inset 0 1px 0 rgba(244, 232, 208, 0.08),
    inset 0 0 34px rgba(0, 0, 0, 0.22);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock {
  grid-template-rows: minmax(156px, 0.58fr) minmax(236px, 1fr) minmax(118px, 0.48fr);
  gap: 6px;
  padding: 6px;
  overflow: hidden;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  overflow: hidden;
  border-color: rgba(217, 184, 129, 0.18) !important;
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.74), rgba(3, 7, 13, 0.72)) !important;
  box-shadow: inset 0 1px 0 rgba(244, 232, 208, 0.06) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel > .flex:first-child {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.55rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .text-\[10px\],
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel .text-\[10px\],
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel .text-\[10px\] {
  letter-spacing: 0.16em;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
  max-width: 100%;
  font-size: 1.02rem;
  line-height: 1.08;
  white-space: normal;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-fight-button {
  min-width: 5.8rem;
  min-height: 2.15rem;
  padding: 0.45rem 0.7rem !important;
  border-radius: 6px;
  font-size: 0.66rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
  grid-template-columns: 58px minmax(0, 1fr) !important;
  align-items: stretch;
  gap: 0.55rem;
  margin-top: 0.55rem !important;
  min-height: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
  width: 58px !important;
  height: 58px !important;
  border: 1px solid rgba(217, 184, 129, 0.26);
  border-radius: 6px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-body .space-y-3 {
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.42rem;
  min-width: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.32rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div,
.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card {
  padding: 0.45rem 0.5rem;
  border-color: rgba(217, 184, 129, 0.14);
  background: rgba(0, 0, 0, 0.22);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
  padding: 0.42rem 0.5rem !important;
  border-color: rgba(217, 184, 129, 0.14) !important;
  background: rgba(0, 0, 0, 0.2) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-reward > div:first-child {
  display: none;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-reward > div:last-child {
  margin-top: 0 !important;
  overflow: hidden;
  color: rgba(244, 232, 208, 0.9);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0.5rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel > .flex:first-child {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(4.5rem, 1fr));
  width: auto;
  min-width: 9.4rem;
  padding: 0.18rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
  padding: 0.38rem 0.45rem !important;
  font-size: 0.58rem !important;
  letter-spacing: 0.12em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.45rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__label {
  font-size: 0.5rem;
  letter-spacing: 0.14em;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__value {
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__note {
  overflow: hidden;
  font-size: 0.56rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body {
  min-height: 0;
  margin-top: 0 !important;
  overflow: hidden;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-note,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__desc {
  display: none;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
  padding: 0.48rem 0.55rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center !important;
  gap: 0.5rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta {
  gap: 0.3rem !important;
  margin-top: 0.35rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta span {
  padding: 0.25rem 0.35rem !important;
  font-size: 0.5rem !important;
  letter-spacing: 0.08em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade {
  min-height: 1.85rem;
  padding: 0.35rem 0.55rem !important;
  border-radius: 5px;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0.45rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel > .flex:first-child {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions {
  gap: 0.35rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions > div {
  padding: 0.38rem 0.5rem !important;
  font-size: 0.62rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action {
  min-height: 1.85rem;
  padding: 0.35rem 0.52rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel .mt-3.grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.42rem !important;
  margin-top: 0 !important;
  min-height: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
  min-height: 0 !important;
  padding: 0.48rem 0.42rem !important;
  display: grid;
  align-content: center;
  gap: 0.12rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket > div:first-child {
  overflow: hidden;
  font-size: 0.68rem !important;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket > div:nth-child(2) {
  margin-top: 0 !important;
  font-size: 0.48rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket > div:nth-child(n + 3) {
  display: none !important;
}

/* Frontier pass 37: keep the command-panel shop readable inside the selected-region rail. */
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: minmax(3.15rem, auto) !important;
  align-content: start;
  gap: 0.42rem !important;
  min-height: 10rem !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  padding: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
  min-width: 0;
  padding: 0.48rem 0.55rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row {
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(3.8rem, auto) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row .min-w-0 {
  min-width: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row .font-serif {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Frontier pass 38: keep the code-drawn board inside the same bounds as the node layer. */
.frontier-region-expedition.frontier-page-shell--open .frontier-board-svg {
  left: 4.5% !important;
  top: 7% !important;
  right: auto !important;
  bottom: auto !important;
  width: calc(100% - 9%) !important;
  height: calc(100% - 19%) !important;
  max-width: none !important;
  max-height: none !important;
}

@media (max-width: 1180px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock {
    grid-template-rows: auto auto auto;
    overflow: visible;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    overflow: visible;
  }
}

/* Frontier v3.3 - six region destination selector. */
.frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
  inset: auto 12px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 8px;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
  width: 100%;
  min-width: 0;
  padding: 0.38rem;
  border-radius: 8px;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.28rem;
  width: 100%;
  max-width: none !important;
  min-width: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__arrow {
  width: 1.9rem;
  min-width: 1.9rem;
  height: 2.58rem;
  border-radius: 6px;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 3px;
  align-content: center;
  justify-content: stretch;
  gap: 0.16rem;
  min-width: 0 !important;
  min-height: 2.58rem;
  padding: 0.34rem 0.4rem 0.32rem !important;
  overflow: hidden;
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(8, 14, 24, 0.82), rgba(2, 6, 12, 0.8));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item::before,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item::after {
  content: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.28rem;
  height: 1rem;
  border: 1px solid rgba(217, 184, 129, 0.24);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.3);
  color: rgba(255, 244, 199, 0.88);
  font-family: var(--font-ui, inherit);
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__name {
  overflow: hidden;
  color: rgba(244, 232, 208, 0.82);
  font-family: var(--font-ui, inherit);
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__meta {
  overflow: hidden;
  color: rgba(180, 194, 214, 0.62);
  font-family: var(--font-ui, inherit);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-align: left;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__progress {
  display: block;
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--frontier-region-accent) 78%, #f4d47a);
  box-shadow: 0 0 8px var(--frontier-region-glow);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--active {
  border-color: var(--frontier-region-accent) !important;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--frontier-region-accent) 22%, rgba(8, 14, 24, 0.88)), rgba(3, 7, 13, 0.86)) !important;
  box-shadow:
    inset 0 1px 0 rgba(244, 232, 208, 0.1),
    0 0 18px var(--frontier-region-glow);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--active .frontier-region-dock__code {
  border-color: var(--frontier-region-accent);
  background: var(--frontier-region-accent);
  color: #06101a;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--active .frontier-region-dock__name {
  color: #fff4c7;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--locked {
  opacity: 0.56;
  filter: grayscale(0.25);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--locked .frontier-region-dock__progress > span {
  width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--complete .frontier-region-dock__code {
  border-color: rgba(113, 211, 154, 0.34);
  color: rgba(177, 245, 204, 0.92);
}

/* Frontier pass 39: show full destination names in the six-card region selector. */
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__arrow {
  height: 3rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
  grid-template-rows: minmax(1.3rem, auto) auto 3px;
  min-height: 3rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__main {
  align-items: start;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__name {
  min-width: 0;
  overflow: visible;
  line-height: 1.06;
  text-overflow: clip;
  white-space: normal;
}

@media (max-width: 1260px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__name {
    display: none;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__main {
    grid-template-columns: minmax(0, 1fr);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__code,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__meta {
    justify-self: center;
    text-align: center;
  }
}

@media (max-width: 900px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Frontier v3.4 - flatter command surface, centered Seals, and readable controls. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    font-size: 15px;
    padding: 10px 12px;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) clamp(410px, 28vw, 500px) !important;
    gap: 12px;
    padding: 0;
    overflow: visible !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    overflow: visible !important;
    border-color: rgba(217, 184, 129, 0.22);
    background:
      linear-gradient(180deg, rgba(6, 12, 21, 0.94), rgba(2, 6, 12, 0.98));
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage::after {
    inset: 8px;
    border-color: rgba(217, 184, 129, 0.11);
    box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.24);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-board-svg {
    left: 5% !important;
    top: 5% !important;
    width: 90% !important;
    height: 68% !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    inset: 7% 5% 27% !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-board-road--main {
    filter:
      drop-shadow(0 0 8px color-mix(in srgb, var(--frontier-region-accent) 50%, transparent))
      drop-shadow(0 0 18px var(--frontier-region-glow));
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
    filter: drop-shadow(0 0 10px var(--frontier-region-glow));
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:focus-visible {
    z-index: 80;
    filter:
      drop-shadow(0 0 14px color-mix(in srgb, var(--frontier-region-accent) 72%, transparent))
      drop-shadow(0 0 28px var(--frontier-region-glow));
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
    outline: 2px solid color-mix(in srgb, var(--frontier-region-accent) 68%, #fff4c7);
    box-shadow:
      0 0 0 3px rgba(0, 0, 0, 0.42),
      0 0 24px color-mix(in srgb, var(--frontier-region-accent) 62%, transparent),
      0 0 52px var(--frontier-region-glow) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail__support,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock {
    display: contents !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    position: relative !important;
    z-index: 70;
    inset: auto !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0;
    overflow: visible !important;
    border: 1px solid rgba(217, 184, 129, 0.22) !important;
    border-radius: 8px !important;
    background:
      linear-gradient(180deg, rgba(8, 14, 24, 0.9), rgba(3, 7, 13, 0.86)) !important;
    box-shadow:
      inset 0 1px 0 rgba(244, 232, 208, 0.07),
      0 16px 38px rgba(0, 0, 0, 0.36) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
    max-height: 32vh !important;
    padding: 0.95rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    max-height: calc(100% - 250px) !important;
    padding: 0.95rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    justify-self: center;
    width: min(780px, calc(100% - 32px)) !important;
    margin-bottom: 12px;
    padding: 0.62rem 0.7rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    inset: auto 18px 100px !important;
    z-index: 76;
    grid-template-columns: minmax(0, min(940px, 100%)) !important;
    justify-content: center;
    align-items: end;
    pointer-events: none;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-status {
    display: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
    width: 100%;
    padding: 0.5rem;
    border-color: rgba(217, 184, 129, 0.22);
    background:
      linear-gradient(180deg, rgba(7, 12, 21, 0.92), rgba(3, 7, 13, 0.88));
    box-shadow:
      inset 0 1px 0 rgba(244, 232, 208, 0.07),
      0 14px 32px rgba(0, 0, 0, 0.34);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__arrow {
    width: 2.15rem;
    min-width: 2.15rem;
    height: 3.2rem;
    border-color: rgba(217, 184, 129, 0.26);
    color: #fff0bd;
    font-size: 1.05rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
    min-height: 3.2rem;
    padding: 0.42rem 0.48rem 0.38rem !important;
    border-color: rgba(217, 184, 129, 0.16);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__code {
    min-width: 1.45rem;
    height: 1.12rem;
    font-size: 0.58rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__name {
    font-size: 0.68rem;
    line-height: 1.08;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__meta {
    font-size: 0.56rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .text-\[10px\],
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel .text-\[10px\],
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel .text-\[10px\] {
    font-size: 0.68rem !important;
    letter-spacing: 0.12em;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
    font-size: 1.28rem !important;
    line-height: 1.08;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
    grid-template-columns: 74px minmax(0, 1fr) !important;
    gap: 0.75rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
    width: 74px !important;
    height: 74px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
    font-size: 0.82rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    border-color: rgba(217, 184, 129, 0.1) !important;
    background: rgba(0, 0, 0, 0.16) !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card {
    padding: 0.62rem 0.7rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__label {
    font-size: 0.62rem;
    letter-spacing: 0.1em;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__value {
    font-size: 0.86rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__note {
    font-size: 0.66rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
    min-width: 11.5rem;
    border-color: rgba(217, 184, 129, 0.2) !important;
    border-radius: 7px !important;
    background: rgba(0, 0, 0, 0.22) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
    min-height: 2rem;
    border-radius: 5px !important;
    font-size: 0.68rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop {
    min-height: 0 !important;
    max-height: min(32vh, 330px) !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
    padding-right: 0.15rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
    padding: 0.58rem 0 !important;
    border-width: 0 0 1px !important;
    border-radius: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer:last-child {
    border-bottom: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row .font-serif {
    font-size: 0.9rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta span {
    font-size: 0.58rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action {
    min-height: 2.25rem;
    border: 1px solid rgba(255, 224, 138, 0.42) !important;
    border-radius: 7px !important;
    background:
      linear-gradient(180deg, rgba(214, 183, 124, 0.96), rgba(132, 88, 38, 0.96)) !important;
    color: #110a04 !important;
    font-size: 0.72rem !important;
    font-weight: 950 !important;
    letter-spacing: 0.06em !important;
    text-shadow: none !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 244, 215, 0.34),
      0 8px 18px rgba(0, 0, 0, 0.32) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button {
    min-width: 7.5rem;
    background:
      linear-gradient(180deg, rgba(176, 48, 42, 0.98), rgba(74, 14, 18, 0.98)) !important;
    color: #fff0bd !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button:disabled,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action:disabled,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:disabled,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:disabled {
    border-color: rgba(148, 163, 184, 0.18) !important;
    background:
      linear-gradient(180deg, rgba(38, 45, 57, 0.82), rgba(14, 18, 25, 0.88)) !important;
    color: rgba(221, 226, 236, 0.56) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action:not(:disabled):hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button:not(:disabled):hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item:not(:disabled):hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket:not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    display: grid !important;
    grid-template-columns: minmax(116px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel > .flex:first-child {
    display: contents !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel > .flex:first-child > div:first-child {
    min-width: 0;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel p {
    display: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions {
    grid-column: 3;
    justify-self: end;
    gap: 0.45rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel .mt-3.grid {
    grid-column: 2;
    grid-row: 1;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.5rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
    min-height: 54px !important;
    padding: 0.48rem 0.58rem !important;
    border-color: rgba(217, 184, 129, 0.16) !important;
    background: rgba(0, 0, 0, 0.18) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket > div:first-child {
    font-size: 0.78rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket > div:nth-child(2) {
    font-size: 0.58rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open [data-help] {
    position: relative;
    overflow: visible !important;
  }

  .frontier-region-expedition.frontier-page-shell--open [data-help]:hover,
  .frontier-region-expedition.frontier-page-shell--open [data-help]:focus-visible {
    z-index: 2147483600 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open [data-help]::after {
    z-index: 2147483647 !important;
    max-width: min(22rem, calc(100vw - 2rem));
    pointer-events: none !important;
    font-size: 0.78rem !important;
    line-height: 1.25 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action[data-help]::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade[data-help]::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button[data-help]::after {
    left: auto;
    right: 0;
    bottom: calc(100% + 0.48rem);
    transform: translateY(0.25rem);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action[data-help]:hover::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action[data-help]:focus-visible::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade[data-help]:hover::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade[data-help]:focus-visible::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button[data-help]:hover::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button[data-help]:focus-visible::after {
    transform: translateY(0);
  }
}

@media (max-width: 1320px) and (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
    grid-template-columns: minmax(0, 1fr) 390px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__name {
    display: none;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    width: min(680px, calc(100% - 28px)) !important;
  }
}

/* Frontier v3.4.1 - pin the flattened HUD instead of inheriting old dock grid rows. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-rail-width: clamp(410px, 28vw, 500px);
    --frontier-stage-gap: 12px;
    height: calc(100dvh - 8.5rem);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
    grid-template-columns: minmax(0, 1fr) var(--frontier-rail-width) !important;
    grid-template-rows: minmax(0, 1fr) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    grid-column: 1 !important;
    grid-row: 1 !important;
    height: 100% !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail__support {
    position: absolute !important;
    inset: 0 !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    z-index: 72;
    display: block !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    pointer-events: none;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock {
    position: absolute !important;
    inset: 0 !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    pointer-events: none;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    position: absolute !important;
    grid-column: auto !important;
    grid-row: auto !important;
    justify-self: auto !important;
    pointer-events: auto;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: var(--frontier-rail-width) !important;
    height: min(32vh, 265px) !important;
    max-height: min(32vh, 265px) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(min(32vh, 265px) + 12px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: var(--frontier-rail-width) !important;
    height: auto !important;
    max-height: calc(100% - min(32vh, 265px) - 12px) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    top: auto !important;
    left: 16px !important;
    right: calc(var(--frontier-rail-width) + var(--frontier-stage-gap) + 16px) !important;
    bottom: 0 !important;
    width: auto !important;
    height: auto !important;
    max-height: 100px !important;
    margin: 0;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
    font-size: 0.72rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action {
    min-width: 6.5rem;
    font-size: 0.78rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    inset: auto 18px 112px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-board-svg {
    height: 58% !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    inset: 7% 5% 36% !important;
  }
}

@media (max-width: 1320px) and (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-rail-width: 390px;
  }
}

/* Frontier v3.4.2 - remove nested-card clutter inside the flattened panels. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
    border-width: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div {
    padding: 0.42rem 0.5rem !important;
    border-left: 2px solid color-mix(in srgb, var(--frontier-region-accent) 58%, rgba(217, 184, 129, 0.2)) !important;
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--frontier-region-accent) 10%, transparent), transparent) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    margin-top: 0.35rem !important;
    padding: 0.5rem 0 !important;
    border-top: 1px solid rgba(217, 184, 129, 0.14) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-stack {
    gap: 0 !important;
    border-block: 1px solid rgba(217, 184, 129, 0.12);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card {
    padding: 0.58rem 0.65rem !important;
    border-bottom: 1px solid rgba(217, 184, 129, 0.1) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card:last-child {
    border-bottom: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
    padding: 0.72rem 0 !important;
    border-bottom: 1px solid rgba(217, 184, 129, 0.14) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row .font-serif {
    font-size: 1rem !important;
    line-height: 1.1 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta span {
    font-size: 0.62rem !important;
    padding: 0.28rem 0.38rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-note,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__desc {
    display: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
    border-color: rgba(217, 184, 129, 0.2) !important;
    background:
      linear-gradient(180deg, rgba(8, 14, 24, 0.72), rgba(2, 6, 12, 0.66)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
    filter:
      drop-shadow(0 0 10px color-mix(in srgb, var(--frontier-region-accent) 45%, transparent))
      drop-shadow(0 0 18px var(--frontier-region-glow));
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--available,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
    filter:
      drop-shadow(0 0 16px color-mix(in srgb, var(--frontier-region-accent) 72%, transparent))
      drop-shadow(0 0 34px var(--frontier-region-glow));
  }
}

/* Elements tree: CSS grid owns both node placement and connector placement. */
.element-node-v2 {
  opacity: 1 !important;
  background: rgba(7, 17, 31, 0.97) !important;
}
.element-node-v2.is-locked .element-node-v2__image {
  opacity: 0.42;
  filter: grayscale(0.6) brightness(0.78);
}
.element-node-v2.is-locked {
  border-color: rgba(255, 255, 255, 0.16) !important;
}

.element-node-v2.is-branch-unselected {
  filter: grayscale(0.9) brightness(0.72);
}

.element-node-v2.is-branch-unselected .element-node-v2__image {
  opacity: 0.34 !important;
  filter: grayscale(1) brightness(0.62) !important;
}

.element-node-v2.is-branch-unselected .element-node-v2__rank,
.element-node-v2.is-branch-unselected .element-node-v2__label {
  color: rgba(176, 169, 186, 0.52) !important;
}

.elements-page-layout {
  scrollbar-gutter: stable both-edges;
}

.elements-tree-stage {
  overflow: visible;
}

.elements-css-tree {
  --node-size: 68px;
  --keystone-size: 104px;
  --branch-gap: clamp(128px, 22vw, 178px);
  --path-label-col: clamp(86px, 14vw, 118px);
  --join-half-gap: 20px;
  --tree-line: color-mix(in srgb, var(--element-accent, #38bdf8) 86%, #ffffff 6%);
  display: grid;
  grid-template-columns: var(--path-label-col) var(--node-size) var(--branch-gap) var(--node-size) var(--path-label-col);
  grid-template-rows: var(--node-size) 34px var(--node-size) 30px var(--node-size) 30px var(--node-size) 40px var(--keystone-size);
  justify-content: center;
  align-content: start;
  justify-items: center;
  align-items: center;
  width: min(100%, calc((var(--path-label-col) * 2) + (var(--node-size) * 2) + var(--branch-gap)));
  min-height: 500px;
  margin: 8px auto 0;
  overflow: visible;
}

.elements-css-tree__line {
  z-index: 1;
  display: block;
  pointer-events: none;
  background: var(--tree-line);
  box-shadow:
    0 0 5px color-mix(in srgb, var(--element-accent, #38bdf8) 70%, transparent),
    0 0 12px color-mix(in srgb, var(--element-accent, #38bdf8) 28%, transparent);
}

.elements-css-tree__line--top {
  grid-column: 3;
  grid-row: 2;
  width: 2px;
  height: 100%;
}

.elements-css-tree__line--split {
  grid-column: 2 / 5;
  grid-row: 2;
  align-self: end;
  justify-self: center;
  width: calc(100% - var(--node-size));
  height: 2px;
}

.elements-css-tree__line--left-rail {
  grid-column: 2;
  grid-row: 3 / 9;
  align-self: start;
  width: 2px;
  height: calc(100% - var(--join-half-gap));
}

.elements-css-tree__line--right-rail {
  grid-column: 4;
  grid-row: 3 / 9;
  align-self: start;
  width: 2px;
  height: calc(100% - var(--join-half-gap));
}

.elements-css-tree--left-chosen .elements-css-tree__line--right-rail,
.elements-css-tree--right-chosen .elements-css-tree__line--left-rail {
  background: rgba(140, 136, 152, 0.28);
  box-shadow: none;
}

.elements-css-tree--left-chosen .elements-css-tree__node--2,
.elements-css-tree--left-chosen .elements-css-tree__node--4,
.elements-css-tree--left-chosen .elements-css-tree__node--6,
.elements-css-tree--right-chosen .elements-css-tree__node--1,
.elements-css-tree--right-chosen .elements-css-tree__node--3,
.elements-css-tree--right-chosen .elements-css-tree__node--5 {
  color: rgba(180, 174, 190, 0.5);
}

.elements-css-tree__line--bottom {
  grid-column: 2 / 5;
  grid-row: 8;
  justify-self: center;
  width: calc(100% - var(--node-size));
  height: 2px;
}

.elements-css-tree__line--final {
  grid-column: 3;
  grid-row: 8;
  align-self: end;
  width: 2px;
  height: 50%;
}

.elements-css-tree__path-label {
  z-index: 3;
  justify-self: center;
  align-self: center;
  border: 1px solid color-mix(in srgb, var(--element-accent, #38bdf8) 62%, transparent);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(2, 8, 18, 0.72);
  color: var(--element-accent, #38bdf8);
  box-shadow: 0 0 14px color-mix(in srgb, var(--element-accent, #38bdf8) 18%, transparent);
  font: 1000 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.elements-css-tree__path-label--left {
  grid-column: 1;
  grid-row: 3;
}

.elements-css-tree__path-label--right {
  grid-column: 5;
  grid-row: 3;
}

.elements-css-tree__node {
  position: relative;
  z-index: 4;
  width: var(--node-size);
  height: var(--node-size);
  padding: 0;
}

.elements-css-tree__node--0 {
  grid-column: 3;
  grid-row: 1;
}

.elements-css-tree__node--1 {
  grid-column: 2;
  grid-row: 3;
}

.elements-css-tree__node--2 {
  grid-column: 4;
  grid-row: 3;
}

.elements-css-tree__node--3 {
  grid-column: 2;
  grid-row: 5;
}

.elements-css-tree__node--4 {
  grid-column: 4;
  grid-row: 5;
}

.elements-css-tree__node--5 {
  grid-column: 2;
  grid-row: 7;
}

.elements-css-tree__node--6 {
  grid-column: 4;
  grid-row: 7;
}

.elements-css-tree__node--7 {
  grid-column: 3;
  grid-row: 9;
  width: var(--keystone-size);
  height: var(--keystone-size);
}

@media (max-width: 1120px) {
  .elements-page-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .elements-page-layout > aside,
  .elements-page-layout > section {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .elements-page-tree-panel {
    min-height: 640px !important;
  }

  .elements-tree-stage {
    min-height: 430px !important;
  }

  .elements-css-tree {
    --branch-gap: clamp(112px, 24vw, 160px);
    --path-label-col: clamp(74px, 15vw, 96px);
  }
}

@media (max-width: 640px) {
  .elements-page-layout {
    gap: 10px !important;
  }

  .elements-page-tree-panel {
    min-height: 600px !important;
  }

  .elements-tree-stage {
    min-height: 410px !important;
    margin-top: 10px !important;
  }

  .elements-css-tree {
    --node-size: 60px;
    --keystone-size: 92px;
    --join-half-gap: 17px;
    --branch-gap: clamp(82px, 24vw, 118px);
    --path-label-col: 0px;
    grid-template-rows: var(--node-size) 30px var(--node-size) 28px var(--node-size) 28px var(--node-size) 34px var(--keystone-size);
    min-height: 455px;
  }

  .elements-css-tree__path-label {
    display: none;
  }

  .element-node-v2__label {
    width: 92px;
    font-size: 8px;
  }

  .element-node-v2--keystone .element-node-v2__label {
    width: 112px;
    font-size: 9px;
  }
}

/* Frontier v3.4.4 - no generated map placeholder; use a horizontal node runway. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    overflow: hidden !important;
    background:
      radial-gradient(circle at 32% 42%, color-mix(in srgb, var(--frontier-region-accent) 14%, transparent), transparent 36%),
      linear-gradient(180deg, rgba(5, 12, 22, 0.96), rgba(2, 6, 12, 0.98)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-board-svg,
  .frontier-region-expedition.frontier-page-shell--open .frontier-map-art--atmosphere,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field > svg {
    display: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    position: absolute !important;
    top: clamp(220px, 36%, 300px) !important;
    left: clamp(34px, 6%, 76px) !important;
    right: clamp(34px, 6%, 76px) !important;
    bottom: auto !important;
    width: auto !important;
    height: 116px !important;
    max-height: none !important;
    display: grid !important;
    grid-template-columns: repeat(20, minmax(0, 1fr));
    align-items: center;
    gap: clamp(4px, 0.7vw, 10px);
    padding: 0 10px !important;
    overflow: visible !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field::before {
    content: "";
    position: absolute;
    left: 24px;
    right: 24px;
    top: 50%;
    height: 4px;
    border-radius: 999px;
    background:
      linear-gradient(90deg,
        transparent,
        color-mix(in srgb, var(--frontier-region-accent) 42%, rgba(217, 184, 129, 0.32)) 8%,
        color-mix(in srgb, var(--frontier-region-accent) 62%, rgba(255, 224, 138, 0.5)) 50%,
        color-mix(in srgb, var(--frontier-region-accent) 42%, rgba(217, 184, 129, 0.32)) 92%,
        transparent);
    box-shadow:
      0 0 18px color-mix(in srgb, var(--frontier-region-accent) 38%, transparent),
      0 0 34px var(--frontier-region-glow);
    transform: translateY(-50%);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: clamp(34px, 3vw, 48px) !important;
    height: clamp(34px, 3vw, 48px) !important;
    place-self: center;
    z-index: 3;
    transform: none !important;
    border-width: 2px !important;
    box-shadow:
      0 0 0 3px rgba(0, 0, 0, 0.42),
      0 0 20px color-mix(in srgb, var(--frontier-region-accent) 36%, transparent),
      inset 0 0 14px rgba(255, 255, 255, 0.12) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) > .frontier-route-node__pip,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) > .frontier-route-node__mark {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    opacity: 0.42;
    background: transparent !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--available,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
    border-color: rgba(255, 232, 165, 0.9) !important;
    filter: none !important;
    box-shadow:
      0 0 0 3px rgba(0, 0, 0, 0.48),
      0 0 0 7px color-mix(in srgb, var(--frontier-region-accent) 18%, transparent),
      0 0 30px color-mix(in srgb, var(--frontier-region-accent) 72%, rgba(255, 224, 138, 0.28)),
      0 0 56px var(--frontier-region-glow),
      inset 0 0 16px rgba(255, 255, 255, 0.2) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
    width: clamp(42px, 3.5vw, 56px) !important;
    height: clamp(42px, 3.5vw, 56px) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--boss {
    width: clamp(48px, 4vw, 64px) !important;
    height: clamp(48px, 4vw, 64px) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:focus-visible {
    z-index: 90;
    transform: translateY(-3px) scale(1.08) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) .frontier-route-node__number {
    font-size: clamp(0.7rem, 0.78vw, 0.92rem) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared:not(.frontier-route-node--boss) .frontier-route-node__number {
    top: 50% !important;
    bottom: auto !important;
    border: 0 !important;
    background: transparent !important;
    transform: translate(-50%, -50%) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node__boss-label {
    bottom: -1.18rem !important;
    font-size: 0.5rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    height: min(28vh, 230px) !important;
    max-height: min(28vh, 230px) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(min(28vh, 230px) + 10px) !important;
    max-height: calc(100% - min(28vh, 230px) - 10px) !important;
  }
}

/* Frontier v3.4.5 - smaller medallions with subtle regional runway patterns. */
@media (min-width: 1181px) {
  .frontier-region-expedition--gloamwell_march {
    --frontier-runway-pattern:
      radial-gradient(ellipse 150px 30px at 18% 46%, rgba(119, 191, 232, 0.13), transparent 63%),
      radial-gradient(ellipse 190px 34px at 42% 56%, rgba(189, 224, 255, 0.08), transparent 66%),
      repeating-radial-gradient(ellipse at 30% 50%, transparent 0 34px, rgba(137, 199, 230, 0.08) 35px 36px, transparent 37px 70px);
  }

  .frontier-region-expedition--briarwake_bastion {
    --frontier-runway-pattern:
      radial-gradient(ellipse 120px 24px at 22% 42%, rgba(143, 190, 101, 0.14), transparent 64%),
      radial-gradient(ellipse 210px 36px at 70% 55%, rgba(91, 159, 84, 0.1), transparent 68%),
      repeating-radial-gradient(ellipse at 58% 50%, transparent 0 30px, rgba(160, 211, 123, 0.08) 31px 32px, transparent 33px 62px);
  }

  .frontier-region-expedition--ashglass_reliquary {
    --frontier-runway-pattern:
      radial-gradient(ellipse 160px 28px at 28% 48%, rgba(238, 126, 65, 0.13), transparent 66%),
      radial-gradient(ellipse 130px 24px at 76% 45%, rgba(255, 192, 104, 0.09), transparent 64%),
      repeating-linear-gradient(118deg, transparent 0 46px, rgba(255, 162, 91, 0.07) 47px 49px, transparent 50px 96px);
  }

  .frontier-region-expedition--drowned_star_strand {
    --frontier-runway-pattern:
      radial-gradient(ellipse 170px 28px at 18% 54%, rgba(89, 206, 221, 0.12), transparent 66%),
      radial-gradient(ellipse 210px 32px at 66% 44%, rgba(77, 145, 224, 0.1), transparent 68%),
      repeating-radial-gradient(ellipse at 42% 50%, transparent 0 36px, rgba(103, 207, 222, 0.08) 37px 39px, transparent 40px 74px);
  }

  .frontier-region-expedition--cinderwyrm_aerie {
    --frontier-runway-pattern:
      radial-gradient(ellipse 170px 30px at 24% 48%, rgba(255, 111, 49, 0.14), transparent 64%),
      radial-gradient(ellipse 150px 24px at 80% 52%, rgba(255, 181, 86, 0.09), transparent 64%),
      repeating-linear-gradient(72deg, transparent 0 42px, rgba(255, 106, 48, 0.08) 43px 45px, transparent 46px 88px);
  }

  .frontier-region-expedition--crownless_meridian {
    --frontier-runway-pattern:
      radial-gradient(ellipse 180px 30px at 30% 48%, rgba(178, 126, 255, 0.13), transparent 66%),
      radial-gradient(ellipse 150px 26px at 72% 52%, rgba(111, 180, 255, 0.09), transparent 64%),
      repeating-radial-gradient(ellipse at 62% 50%, transparent 0 32px, rgba(186, 150, 255, 0.08) 33px 34px, transparent 35px 68px);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    top: clamp(210px, 34%, 280px) !important;
    height: 92px !important;
    gap: clamp(6px, 0.9vw, 14px);
    padding: 0 18px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field::before {
    left: 32px;
    right: 32px;
    height: 2px;
    opacity: 0.78;
    box-shadow:
      0 0 12px color-mix(in srgb, var(--frontier-region-accent) 34%, transparent),
      0 0 24px var(--frontier-region-glow);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field::after {
    content: "";
    position: absolute;
    inset: -18px 4px;
    z-index: 0;
    pointer-events: none;
    border-radius: 999px;
    background: var(--frontier-runway-pattern, radial-gradient(ellipse at 50% 50%, rgba(217, 184, 129, 0.08), transparent 68%));
    opacity: 0.56;
    filter: blur(0.1px);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
    width: clamp(28px, 2.25vw, 36px) !important;
    height: clamp(28px, 2.25vw, 36px) !important;
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, 0.44),
      0 0 14px color-mix(in srgb, var(--frontier-region-accent) 32%, transparent),
      inset 0 0 10px rgba(255, 255, 255, 0.1) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--available,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, 0.5),
      0 0 0 5px color-mix(in srgb, var(--frontier-region-accent) 14%, transparent),
      0 0 22px color-mix(in srgb, var(--frontier-region-accent) 66%, rgba(255, 224, 138, 0.24)),
      0 0 42px var(--frontier-region-glow),
      inset 0 0 12px rgba(255, 255, 255, 0.18) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
    width: clamp(34px, 2.65vw, 42px) !important;
    height: clamp(34px, 2.65vw, 42px) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--boss {
    width: clamp(38px, 3vw, 48px) !important;
    height: clamp(38px, 3vw, 48px) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:focus-visible {
    transform: translateY(-2px) scale(1.08) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) .frontier-route-node__number {
    font-size: clamp(0.62rem, 0.66vw, 0.78rem) !important;
  }
}

/* Frontier v3.4.6 - keep the runway readable but break the ruler-straight node line. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    height: 118px !important;
    align-items: center;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field::before {
    top: 51%;
    height: 3px;
    opacity: 0.46;
    background:
      radial-gradient(ellipse 72px 18px at 4% 48%, color-mix(in srgb, var(--frontier-region-accent) 62%, rgba(255, 224, 138, 0.35)), transparent 72%),
      radial-gradient(ellipse 92px 18px at 19% 39%, color-mix(in srgb, var(--frontier-region-accent) 46%, rgba(255, 224, 138, 0.26)), transparent 72%),
      radial-gradient(ellipse 96px 18px at 36% 58%, color-mix(in srgb, var(--frontier-region-accent) 42%, rgba(255, 224, 138, 0.24)), transparent 72%),
      radial-gradient(ellipse 104px 18px at 54% 42%, color-mix(in srgb, var(--frontier-region-accent) 46%, rgba(255, 224, 138, 0.26)), transparent 72%),
      radial-gradient(ellipse 96px 18px at 72% 58%, color-mix(in srgb, var(--frontier-region-accent) 42%, rgba(255, 224, 138, 0.24)), transparent 72%),
      radial-gradient(ellipse 72px 18px at 91% 42%, color-mix(in srgb, var(--frontier-region-accent) 52%, rgba(255, 224, 138, 0.3)), transparent 72%);
    box-shadow:
      0 0 14px color-mix(in srgb, var(--frontier-region-accent) 30%, transparent),
      0 0 24px var(--frontier-region-glow);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
    --frontier-node-y: 0px;
    transform: translateY(var(--frontier-node-y)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(1) { --frontier-node-y: -10px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(2) { --frontier-node-y: 2px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(3) { --frontier-node-y: 10px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(4) { --frontier-node-y: 14px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(5) { --frontier-node-y: 8px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(6) { --frontier-node-y: -1px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(7) { --frontier-node-y: -11px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(8) { --frontier-node-y: -14px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(9) { --frontier-node-y: -8px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(10) { --frontier-node-y: 2px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(11) { --frontier-node-y: 11px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(12) { --frontier-node-y: 14px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(13) { --frontier-node-y: 7px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(14) { --frontier-node-y: -3px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(15) { --frontier-node-y: -12px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(16) { --frontier-node-y: -13px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(17) { --frontier-node-y: -6px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(18) { --frontier-node-y: 5px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(19) { --frontier-node-y: 12px; }
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:nth-of-type(20) { --frontier-node-y: 6px; }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node:focus-visible {
    transform: translateY(calc(var(--frontier-node-y, 0px) - 2px)) scale(1.08) !important;
  }
}

/* Frontier v3.4.7 - generated top-down region maps behind the node runway. */
@media (min-width: 1181px) {
  .frontier-region-expedition--gloamwell_march {
    --frontier-region-map-art: url("frontier/gloamwell-march-topdown.webp");
  }

  .frontier-region-expedition--briarwake_bastion {
    --frontier-region-map-art: url("frontier/briarwake-bastion-topdown.webp");
  }

  .frontier-region-expedition--ashglass_reliquary {
    --frontier-region-map-art: url("frontier/ashglass-reliquary-topdown.webp");
  }

  .frontier-region-expedition--drowned_star_strand {
    --frontier-region-map-art: url("frontier/drowned-star-strand-topdown.webp");
  }

  .frontier-region-expedition--cinderwyrm_aerie {
    --frontier-region-map-art: url("frontier/cinderwyrm-aerie-topdown.webp");
  }

  .frontier-region-expedition--crownless_meridian {
    --frontier-region-map-art: url("frontier/crownless-meridian-topdown.webp");
  }

  .frontier-region-expedition--stormglass_expanse { --frontier-region-map-art: url("frontier/stormglass-expanse-topdown.webp"); }
  .frontier-region-expedition--bloodroot_orchard { --frontier-region-map-art: url("frontier/bloodroot-orchard-topdown.webp"); }
  .frontier-region-expedition--ironveil_foundry { --frontier-region-map-art: url("frontier/ironveil-foundry-topdown.webp"); }
  .frontier-region-expedition--pale_ossuary { --frontier-region-map-art: url("frontier/pale-ossuary-topdown.webp"); }
  .frontier-region-expedition--nightbloom_mire { --frontier-region-map-art: url("frontier/nightbloom-mire-topdown.webp"); }
  .frontier-region-expedition--sunken_bell_hollow { --frontier-region-map-art: url("frontier/sunken-bell-hollow-topdown.webp"); }
  .frontier-region-expedition--shardfall_crater { --frontier-region-map-art: url("frontier/shardfall-crater-topdown.webp"); }
  .frontier-region-expedition--umbral_menagerie { --frontier-region-map-art: url("frontier/umbral-menagerie-topdown.webp"); }
  .frontier-region-expedition--dawnscar_monastery { --frontier-region-map-art: url("frontier/dawnscar-monastery-topdown.webp"); }
  .frontier-region-expedition--chainfrost_chasm { --frontier-region-map-art: url("frontier/chainfrost-chasm-topdown.webp"); }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    background:
      linear-gradient(180deg, rgba(2, 6, 12, 0.18), rgba(2, 6, 12, 0.58)),
      radial-gradient(circle at 45% 42%, transparent 0 34%, rgba(2, 6, 12, 0.42) 78%),
      var(--frontier-region-map-art),
      linear-gradient(180deg, rgba(5, 12, 22, 0.96), rgba(2, 6, 12, 0.98)) !important;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
  }
}

/* Frontier v3.4.8 - brighter blue command material and polished route medallions. */
.advanced-page-help-anchor--frontlines {
  display: none !important;
}

@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-panel-blue: rgba(13, 38, 65, 0.88);
    --frontier-panel-blue-deep: rgba(4, 14, 29, 0.94);
    --frontier-panel-blue-light: rgba(36, 93, 136, 0.58);
    --frontier-panel-line: rgba(118, 183, 255, 0.38);
    --frontier-panel-line-strong: rgba(162, 211, 255, 0.62);
    --frontier-panel-glow: rgba(64, 156, 255, 0.28);
    padding-top: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
    filter: saturate(1.08);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    border: 1px solid rgba(111, 178, 244, 0.38) !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, 0.035),
      inset 0 0 80px rgba(14, 55, 91, 0.28),
      0 18px 48px rgba(0, 0, 0, 0.46) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage > .absolute.inset-0.z-0 {
    filter: brightness(1.12) saturate(1.14) contrast(1.02) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
      radial-gradient(circle at 50% 46%, rgba(56, 189, 248, 0.13), transparent 36%),
      linear-gradient(180deg, rgba(3, 15, 31, 0.1), rgba(3, 15, 31, 0.34));
    mix-blend-mode: screen;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
    border-color: var(--frontier-panel-line) !important;
    background:
      radial-gradient(circle at 8% 0%, rgba(87, 177, 255, 0.22), transparent 34%),
      linear-gradient(145deg, var(--frontier-panel-blue), var(--frontier-panel-blue-deep) 74%) !important;
    box-shadow:
      inset 0 1px 0 rgba(232, 246, 255, 0.1),
      inset 0 0 36px rgba(93, 173, 255, 0.08),
      0 16px 42px rgba(0, 0, 0, 0.38),
      0 0 26px rgba(38, 121, 204, 0.14) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate {
    border-left: 3px solid color-mix(in srgb, var(--frontier-region-accent) 48%, #78c7ff) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__name,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-title,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row .font-serif,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__value {
    color: #fff5d6 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.58);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__eyebrow,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__modifier-label,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__label,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel .text-\[10px\],
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .text-\[10px\],
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel .text-\[10px\] {
    color: #ffd978 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
    border-color: rgba(125, 191, 255, 0.18) !important;
    background:
      linear-gradient(90deg, rgba(44, 112, 170, 0.2), rgba(4, 13, 28, 0.1)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-stack {
    border-color: rgba(125, 191, 255, 0.18) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__track {
    background: rgba(2, 8, 18, 0.72) !important;
    border: 1px solid rgba(125, 191, 255, 0.16);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__track > span,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__progress > span {
    background:
      linear-gradient(90deg, #50c8ff, #ffe08a) !important;
    box-shadow:
      0 0 10px rgba(80, 200, 255, 0.52),
      0 0 16px rgba(255, 224, 138, 0.34) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
    border-color: rgba(128, 190, 255, 0.28) !important;
    background: rgba(4, 15, 31, 0.68) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
    border: 1px solid transparent;
    color: rgba(214, 233, 255, 0.78) !important;
    font-weight: 950 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button.bg-celestial-gold\/18 {
    border-color: rgba(255, 224, 138, 0.48);
    background:
      linear-gradient(180deg, rgba(35, 93, 145, 0.92), rgba(9, 35, 73, 0.94)) !important;
    color: #fff5cf !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.12),
      0 0 16px rgba(83, 168, 255, 0.22);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign button {
    min-height: 2.45rem;
    border-radius: 6px !important;
    border-color: rgba(255, 229, 163, 0.62) !important;
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 246, 210, 0.3), transparent 42%),
      linear-gradient(180deg, #d8b86b, #a67533 58%, #74451b) !important;
    color: #100801 !important;
    font-family: var(--font-ui, inherit);
    font-weight: 1000 !important;
    letter-spacing: 0.04em !important;
    text-transform: none !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 250, 224, 0.5),
      inset 0 -10px 18px rgba(74, 39, 9, 0.22),
      0 10px 22px rgba(0, 0, 0, 0.34) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button {
    border-color: rgba(255, 143, 124, 0.66) !important;
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 210, 185, 0.24), transparent 42%),
      linear-gradient(180deg, #c94236, #8b1f24 58%, #4f1018) !important;
    color: #fff2d2 !important;
    text-transform: uppercase !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action:not(:disabled):hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button:not(:disabled):hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:not(:disabled):hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:not(:disabled):hover {
    border-color: rgba(255, 245, 214, 0.88) !important;
    filter: brightness(1.1) saturate(1.06);
    transform: translateY(-1px);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button:disabled,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action:disabled,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:disabled,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:disabled {
    border-color: rgba(111, 139, 169, 0.22) !important;
    background:
      linear-gradient(180deg, rgba(45, 61, 82, 0.86), rgba(13, 22, 35, 0.9)) !important;
    color: rgba(213, 225, 238, 0.58) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__arrow,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
    border-color: rgba(127, 187, 255, 0.26) !important;
    background:
      linear-gradient(180deg, rgba(20, 50, 86, 0.86), rgba(5, 16, 34, 0.9)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.07),
      0 8px 20px rgba(0, 0, 0, 0.26);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--active {
    border-color: var(--frontier-panel-line-strong) !important;
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 224, 138, 0.22), transparent 42%),
      linear-gradient(180deg, rgba(37, 103, 160, 0.94), rgba(9, 32, 70, 0.96)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.14),
      0 0 0 1px rgba(255, 224, 138, 0.16),
      0 0 24px rgba(82, 177, 255, 0.34) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__code {
    border-color: rgba(255, 224, 138, 0.4);
    background: rgba(3, 12, 26, 0.62);
    color: #ffe08a;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item--active .frontier-region-dock__code {
    background:
      linear-gradient(180deg, #ffe08a, #c49142) !important;
    color: #08111f !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__name {
    color: rgba(238, 248, 255, 0.92);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    top: clamp(190px, 31%, 258px) !important;
    z-index: 16 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field::after {
    opacity: 0.72 !important;
    background:
      radial-gradient(ellipse 220px 40px at 12% 46%, rgba(82, 177, 255, 0.18), transparent 68%),
      radial-gradient(ellipse 260px 46px at 50% 52%, rgba(255, 224, 138, 0.14), transparent 70%),
      radial-gradient(ellipse 220px 40px at 88% 47%, rgba(140, 111, 255, 0.14), transparent 68%),
      var(--frontier-runway-pattern, radial-gradient(ellipse at 50% 50%, rgba(217, 184, 129, 0.08), transparent 68%)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field::before {
    height: 4px !important;
    opacity: 0.72 !important;
    background:
      linear-gradient(90deg, transparent, rgba(82, 177, 255, 0.58) 12%, rgba(255, 224, 138, 0.78) 50%, rgba(82, 177, 255, 0.58) 88%, transparent) !important;
    box-shadow:
      0 0 16px rgba(82, 177, 255, 0.48),
      0 0 28px rgba(255, 224, 138, 0.26) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node {
    border-color: rgba(133, 190, 255, 0.54) !important;
    background:
      radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.38), transparent 30%),
      radial-gradient(circle at 50% 50%, rgba(26, 75, 123, 0.98), rgba(7, 23, 48, 0.96) 62%, rgba(1, 7, 18, 0.98)) !important;
    color: #e8f5ff !important;
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, 0.52),
      0 0 0 3px rgba(109, 183, 255, 0.18),
      0 0 20px rgba(63, 165, 255, 0.28),
      inset 0 0 15px rgba(191, 226, 255, 0.12) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node__number {
    color: #f4fbff !important;
    text-shadow:
      0 1px 2px rgba(0, 0, 0, 0.82),
      0 0 10px rgba(95, 184, 255, 0.58) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--available,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
    border-color: rgba(255, 230, 151, 0.94) !important;
    background:
      radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.62), transparent 30%),
      radial-gradient(circle at 50% 52%, #ffe08a, #2b8ed2 58%, #082047 100%) !important;
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, 0.56),
      0 0 0 6px rgba(76, 173, 255, 0.18),
      0 0 30px rgba(76, 173, 255, 0.5),
      0 0 42px rgba(255, 224, 138, 0.28),
      inset 0 0 16px rgba(255, 255, 255, 0.22) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--selected {
    border-color: #fff3c2 !important;
    background:
      radial-gradient(circle at 50% 16%, rgba(255, 255, 255, 0.72), transparent 30%),
      radial-gradient(circle at 50% 52%, #fff0a8, #48c1ff 58%, #0a2f66 100%) !important;
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, 0.58),
      0 0 0 8px rgba(255, 224, 138, 0.18),
      0 0 38px rgba(96, 196, 255, 0.64),
      0 0 62px rgba(255, 224, 138, 0.38),
      inset 0 0 18px rgba(255, 255, 255, 0.32) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared {
    border-color: rgba(131, 243, 190, 0.82) !important;
    background:
      radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.5), transparent 30%),
      radial-gradient(circle at 50% 52%, #7ff1bc, #267d79 58%, #0a2230 100%) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared .frontier-route-node__number,
  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--cleared .frontier-route-node__mark {
    color: #05140d !important;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.38) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--locked {
    opacity: 0.68;
    border-color: rgba(116, 153, 190, 0.32) !important;
    background:
      radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.2), transparent 30%),
      radial-gradient(circle at 50% 52%, rgba(43, 62, 86, 0.92), rgba(9, 20, 37, 0.96) 62%, rgba(2, 7, 16, 0.98)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node--boss {
    border-color: rgba(255, 141, 118, 0.86) !important;
    background:
      radial-gradient(circle at 50% 16%, rgba(255, 213, 185, 0.48), transparent 30%),
      radial-gradient(circle at 50% 52%, #c94334, #61151e 58%, #14050a 100%) !important;
    box-shadow:
      0 0 0 2px rgba(0, 0, 0, 0.62),
      0 0 0 7px rgba(255, 105, 80, 0.13),
      0 0 34px rgba(255, 104, 86, 0.44),
      inset 0 0 18px rgba(255, 255, 255, 0.18) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node__boss-label {
    border-color: rgba(255, 205, 119, 0.52) !important;
    background: rgba(4, 12, 24, 0.92) !important;
    color: #ffe6a8 !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.34);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
    box-shadow:
      inset 0 0 0 1px rgba(114, 184, 255, 0.12),
      inset 0 -18px 30px rgba(2, 9, 20, 0.32) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket::before {
    border-color: rgba(116, 190, 255, 0.28);
    background:
      radial-gradient(circle, rgba(82, 177, 255, 0.13), transparent 66%) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket--selected {
    border-color: rgba(255, 224, 138, 0.7) !important;
    box-shadow:
      inset 0 0 0 1px rgba(255, 224, 138, 0.16),
      0 0 22px rgba(82, 177, 255, 0.3),
      0 0 18px rgba(255, 224, 138, 0.18) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open,
  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail,
  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage,
  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail__support,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body {
    overflow: visible !important;
  }

  .frontier-region-expedition.frontier-page-shell--open [data-help] {
    isolation: isolate;
    z-index: 120 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open [data-help]:hover,
  .frontier-region-expedition.frontier-page-shell--open [data-help]:focus-visible {
    z-index: 2147483600 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open [data-help]::after {
    z-index: 2147483647 !important;
    border-color: rgba(152, 207, 255, 0.64) !important;
    background:
      radial-gradient(circle at 0% 0%, rgba(82, 177, 255, 0.2), transparent 38%),
      linear-gradient(180deg, rgba(8, 25, 47, 0.99), rgba(3, 10, 22, 0.99)) !important;
    color: #f2f8ff !important;
    box-shadow:
      0 18px 42px rgba(0, 0, 0, 0.58),
      0 0 22px rgba(82, 177, 255, 0.22) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-node[data-help]::after {
    bottom: calc(100% + 0.8rem) !important;
    max-width: 15rem;
  }
}

/* Frontier v3.4.9 - inventory-blue rail, stable command panel, centered seal help. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-briefing-height: clamp(198px, 22vh, 218px);
    --frontier-panel-bg:
      linear-gradient(180deg, rgb(var(--indigo-rgb) / 0.94), rgb(var(--surface-rgb) / 0.88));
    --frontier-panel-inner:
      linear-gradient(180deg, rgb(var(--indigo-rgb) / 0.62), rgb(var(--surface-rgb) / 0.42));
    --frontier-panel-border: rgb(var(--brass-rgb) / 0.30);
    --frontier-panel-border-soft: rgb(var(--brass-rgb) / 0.16);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
    border-color: var(--frontier-panel-border) !important;
    background: var(--frontier-panel-bg) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 240, 200, 0.05),
      0 12px 24px rgba(0, 0, 0, 0.18) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__arrow,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
    border-color: var(--frontier-panel-border-soft) !important;
    background: var(--frontier-panel-inner) !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate__name,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-title,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row .font-serif,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__value {
    color: var(--color-parchment) !important;
    text-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    top: 0 !important;
    height: var(--frontier-briefing-height) !important;
    max-height: var(--frontier-briefing-height) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(var(--frontier-briefing-height) + 8px) !important;
    bottom: 0 !important;
    height: auto !important;
    max-height: none !important;
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 10px !important;
    overflow: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel > .flex:first-child {
    min-height: 34px;
    align-items: center !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-stack {
    min-height: 112px;
    max-height: 126px;
    overflow: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign {
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign {
    align-self: stretch;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    width: min(220px, 100%);
    padding: 3px !important;
    border-radius: 5px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
    min-height: 28px !important;
    border: 1px solid transparent !important;
    border-radius: 3px !important;
    background: transparent !important;
    color: var(--color-brass) !important;
    font-family: var(--font-serif) !important;
    font-style: italic;
    font-weight: 400 !important;
    letter-spacing: 0.01em !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button.bg-celestial-gold\/18 {
    border-color: #d6a94f52 !important;
    background: #d6a94f1a !important;
    color: var(--color-parchment) !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign button {
    min-width: 104px;
    min-height: 38px;
    border: 1px solid #9b6f24a6 !important;
    border-radius: 3px !important;
    padding: 0.55rem 1.25rem !important;
    background: linear-gradient(#d9c8a0, #bfa679) !important;
    color: var(--color-painted-indigo) !important;
    font-family: var(--font-serif) !important;
    font-style: italic;
    font-size: 0.84rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    line-height: 1 !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow:
      inset 0 1px #e8dbb873,
      inset 0 -1px #785f3738,
      0 1px 2px #00000059 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button {
    min-width: 118px;
    min-height: 38px;
    border: 1px solid rgba(239, 92, 76, 0.72) !important;
    border-radius: 3px !important;
    padding: 0.55rem 1.35rem !important;
    background:
      linear-gradient(180deg, rgba(188, 42, 34, 0.98), rgba(109, 18, 20, 0.98)) !important;
    color: #fff0d0 !important;
    font-family: var(--font-serif) !important;
    font-style: italic;
    font-size: 0.86rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
    text-transform: none !important;
    box-shadow:
      inset 0 1px rgba(255, 210, 194, 0.28),
      inset 0 -1px rgba(25, 0, 0, 0.42),
      0 1px 2px #00000059 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action:not(:disabled):hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:not(:disabled):hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:not(:disabled):hover,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign button:not(:disabled):hover {
    background: linear-gradient(#e2d2ac, #c8b084) !important;
    border-color: #9b6f24d9 !important;
    filter: none !important;
    transform: translateY(-1px);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button:not(:disabled):hover {
    background:
      linear-gradient(180deg, rgba(211, 58, 48, 0.98), rgba(127, 22, 24, 0.98)) !important;
    border-color: rgba(255, 139, 118, 0.9) !important;
    filter: none !important;
    transform: translateY(-1px);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action:disabled,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:disabled,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:disabled,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign button:disabled,
  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button:disabled {
    opacity: 0.44 !important;
    cursor: not-allowed;
    filter: grayscale(0.35) !important;
    transform: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    left: 16px !important;
    right: calc(var(--frontier-rail-width) + var(--frontier-stage-gap) + 16px) !important;
    bottom: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
    min-height: 58px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket[data-help]::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action[data-help]::after {
    position: fixed !important;
    left: 50vw !important;
    top: 50vh !important;
    right: auto !important;
    bottom: auto !important;
    width: min(390px, calc(100vw - 44px)) !important;
    max-width: min(390px, calc(100vw - 44px)) !important;
    padding: 12px 14px !important;
    transform: translate(-50%, calc(-50% + 8px)) !important;
    text-align: center !important;
    font-size: 0.82rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket[data-help]:hover::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket[data-help]:focus-visible::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action[data-help]:hover::after,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action[data-help]:focus-visible::after {
    transform: translate(-50%, -50%) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open [data-help]::after {
    pointer-events: none !important;
  }
}

/* Frontier v3.5 final cascade - must stay after older Frontier passes. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-panel-bg:
      linear-gradient(180deg, rgb(var(--indigo-rgb) / 0.96), rgb(var(--surface-rgb) / 0.90));
    --frontier-panel-inner:
      linear-gradient(180deg, rgb(var(--indigo-rgb) / 0.72), rgb(var(--surface-rgb) / 0.52));
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
    border-color: rgb(var(--brass-rgb) / 0.30) !important;
    background: var(--frontier-panel-bg) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(var(--frontier-briefing-height, 210px) + 8px) !important;
    bottom: 0 !important;
    display: grid !important;
    grid-template-rows: auto auto minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign {
    height: 100% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
    font-size: clamp(1.35rem, 1.35vw, 1.68rem) !important;
    line-height: 1.05 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
    gap: 0.6rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div {
    min-height: 4.1rem !important;
    padding: 0.72rem 0.82rem !important;
    border-color: rgba(80, 178, 255, 0.22) !important;
    background: linear-gradient(180deg, rgba(17, 64, 112, 0.72), rgba(5, 24, 48, 0.76)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div > div:first-child {
    color: rgba(221, 234, 248, 0.72) !important;
    font-size: 0.68rem !important;
    letter-spacing: 0.15em !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div > div:last-child {
    color: #fff6d7 !important;
    font-size: clamp(1rem, 1vw, 1.26rem) !important;
    line-height: 1.05 !important;
    text-shadow: 0 0 12px rgba(82, 177, 255, 0.24) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward {
    position: relative !important;
    min-height: 4.2rem !important;
    padding: 0.72rem 7.8rem 0.72rem 0.9rem !important;
    border-color: rgba(108, 210, 255, 0.36) !important;
    background:
      radial-gradient(circle at 88% 50%, rgba(64, 196, 255, 0.20), transparent 42%),
      linear-gradient(180deg, rgba(17, 70, 118, 0.78), rgba(5, 25, 52, 0.82)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__label {
    font-size: 0.72rem !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__value {
    color: #e9fbff !important;
    font-family: var(--font-serif) !important;
    font-size: clamp(1.15rem, 1.1vw, 1.42rem) !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__bonus {
    margin-top: 0.28rem !important;
    color: rgba(196, 231, 255, 0.82) !important;
    font-size: 0.72rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward__mark {
    position: absolute !important;
    top: 50% !important;
    right: 0.86rem !important;
    transform: translateY(-50%) !important;
    border: 1px solid rgba(162, 226, 255, 0.42) !important;
    border-radius: 4px !important;
    padding: 0.5rem 0.72rem !important;
    background: linear-gradient(180deg, rgba(14, 105, 168, 0.78), rgba(5, 36, 74, 0.92)) !important;
    color: #f4fcff !important;
    font-family: var(--font-serif) !important;
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign button {
    min-height: 2.35rem !important;
    border-radius: 4px !important;
    font-size: 0.82rem !important;
  }
}

/* Frontier v3.6.3 - physically last cascade guard for viewport-fit polish. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-briefing-height: clamp(220px, 24vh, 244px) !important;
    --frontier-panel-bg: linear-gradient(180deg, rgba(10, 12, 17, 0.97), rgba(5, 5, 8, 0.93)) !important;
    --frontier-panel-inner: linear-gradient(180deg, rgba(22, 18, 16, 0.62), rgba(8, 7, 9, 0.46)) !important;
    --frontier-panel-border: rgba(217, 184, 129, 0.36) !important;
    --frontier-panel-border-soft: rgba(217, 184, 129, 0.18) !important;
    height: calc(100dvh - 6.2rem) !important;
    margin-top: -30px !important;
    padding: 4px 8px 8px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock {
    border-color: var(--frontier-panel-border) !important;
    background: var(--frontier-panel-bg) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats > div,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward,
  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__arrow,
  .frontier-region-expedition.frontier-page-shell--open .frontier-region-dock__item {
    border-color: var(--frontier-panel-border-soft) !important;
    background: var(--frontier-panel-inner) !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    border-color: rgba(217, 184, 129, 0.3) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    top: 0 !important;
    height: var(--frontier-briefing-height) !important;
    max-height: var(--frontier-briefing-height) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    gap: 0.45rem !important;
    overflow: hidden !important;
    padding: 0.72rem !important;
    align-self: stretch !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(var(--frontier-briefing-height) + 6px) !important;
    bottom: 0 !important;
    max-height: none !important;
    gap: 0.52rem !important;
    padding: 0.72rem !important;
    align-self: stretch !important;
    justify-self: stretch !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0.58rem !important;
    margin-top: 0 !important;
    min-height: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
    width: 58px !important;
    height: 58px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
    font-size: clamp(1.08rem, 1.08vw, 1.32rem) !important;
    line-height: 1.04 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
    gap: 0.35rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip {
    min-height: 2.15rem !important;
    padding: 0.32rem 0.42rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-aether-reward,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    min-height: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    border-color: var(--frontier-panel-border-soft) !important;
    background: transparent !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
    min-width: 0 !important;
    min-height: 2.1rem !important;
    font-size: 0.72rem !important;
    font-style: normal !important;
    text-transform: uppercase !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    inset: auto 16px 106px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-route-field {
    top: clamp(154px, 25%, 220px) !important;
  }
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::before,
.frontier-region-expedition.frontier-page-shell--open [data-help]::after {
  content: none !important;
  display: none !important;
}

/* Frontier consistency repair - physical EOF guard. */
.frontier-region-expedition.frontier-page-shell--open {
  --frontier-ui-blue: linear-gradient(135deg, rgba(8, 20, 38, 0.98), rgba(12, 28, 52, 0.94)) !important;
  --frontier-ui-blue-raised: linear-gradient(180deg, rgba(13, 31, 57, 0.98), rgba(5, 13, 25, 0.98)) !important;
  --frontier-ui-line: rgba(214, 169, 79, 0.36) !important;
  --frontier-ui-line-soft: rgba(214, 169, 79, 0.2) !important;
  --frontier-ui-text: rgba(244, 232, 208, 0.96) !important;
  --frontier-ui-muted: rgba(196, 211, 226, 0.78) !important;
  --frontier-ui-gold: #f3c96d !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-dock,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
  border-color: var(--frontier-ui-line) !important;
  background: var(--frontier-ui-blue) !important;
  color: var(--frontier-ui-text) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
  background: linear-gradient(180deg, rgba(9, 22, 42, 0.98), rgba(4, 10, 21, 0.98)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
  gap: 0.45rem !important;
  border-color: transparent !important;
  background: rgba(2, 7, 15, 0.34) !important;
  padding: 0.35rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
  min-height: 2.55rem !important;
  border: 1px solid transparent !important;
  border-radius: 4px !important;
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.86), rgba(3, 8, 17, 0.86)) !important;
  color: var(--frontier-ui-gold) !important;
  font-size: clamp(0.78rem, 0.72vw, 0.9rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button.bg-celestial-gold\/18,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button[aria-selected="true"] {
  border-color: rgba(214, 169, 79, 0.55) !important;
  background: linear-gradient(180deg, rgba(55, 43, 24, 0.96), rgba(24, 22, 20, 0.96)) !important;
  color: #fff1bf !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign {
  gap: 0.65rem !important;
  overflow: visible !important;
  color: var(--frontier-ui-text) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-note {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
  min-height: 6.4rem !important;
  padding: 0.72rem 0.78rem !important;
  border: 1px solid var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: var(--frontier-ui-blue-raised) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer--sweep .frontier-command-offer__row {
  display: grid !important;
  grid-template-columns: 3.25rem minmax(0, 1fr) 7.4rem !important;
  align-items: center !important;
  gap: 0.75rem !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__icon {
  width: 3rem !important;
  height: 3rem !important;
  padding: 0.28rem !important;
  border: 1px solid rgba(214, 169, 79, 0.28) !important;
  border-radius: 6px !important;
  background: rgba(2, 7, 15, 0.86) !important;
  object-fit: cover !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy {
  display: grid !important;
  grid-template-columns: minmax(10.5rem, 0.88fr) minmax(15.75rem, 1.12fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 0.85rem !important;
  row-gap: 0.16rem !important;
  align-items: center !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__title,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row .font-serif {
  grid-column: 1 !important;
  grid-row: 1 !important;
  margin: 0 !important;
  color: var(--frontier-ui-text) !important;
  font-family: var(--font-serif) !important;
  font-size: clamp(0.96rem, 0.9vw, 1.12rem) !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  text-align: left !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__desc {
  grid-column: 1 !important;
  grid-row: 2 !important;
  margin: 0 !important;
  color: var(--frontier-ui-muted) !important;
  font-size: clamp(0.72rem, 0.64vw, 0.82rem) !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  text-align: left !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy > .frontier-hud-chip-row {
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  display: grid !important;
  grid-template-columns: minmax(5.6rem, 1fr) auto minmax(5.6rem, 1fr) !important;
  align-items: center !important;
  gap: 0.52rem !important;
  margin: 0 !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip {
  min-height: 2.65rem !important;
  padding: 0.42rem 0.55rem !important;
  border-color: rgba(214, 169, 79, 0.32) !important;
  border-radius: 5px !important;
  background: linear-gradient(180deg, rgba(4, 10, 20, 0.95), rgba(1, 4, 10, 0.96)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__icon {
  width: 1.3rem !important;
  height: 1.3rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__value {
  color: #ffe2a3 !important;
  font-size: clamp(0.82rem, 0.76vw, 0.95rem) !important;
  line-height: 1.05 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__label {
  color: rgba(224, 231, 238, 0.78) !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.08em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__close {
  min-height: 2.7rem !important;
  border: 1px solid rgba(214, 169, 79, 0.42) !important;
  border-radius: 5px !important;
  font-size: clamp(0.76rem, 0.68vw, 0.88rem) !important;
  font-weight: 900 !important;
  letter-spacing: 0.03em !important;
  text-transform: none !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__close {
  background: linear-gradient(180deg, #e3ca8b, #c49a49) !important;
  color: #071421 !important;
  text-shadow: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__bind:disabled {
  border-color: rgba(120, 137, 158, 0.24) !important;
  background: linear-gradient(180deg, rgba(24, 37, 55, 0.98), rgba(8, 15, 29, 0.98)) !important;
  color: rgba(220, 229, 239, 0.72) !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  padding: 0.8rem 1rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-slot-grid {
  gap: 0.55rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
  width: 3.7rem !important;
  min-height: 3.7rem !important;
  padding: 0.35rem !important;
  border-color: var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, rgba(8, 18, 34, 0.92), rgba(2, 6, 13, 0.94)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__frame,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__icon {
  width: 2.7rem !important;
  height: 2.7rem !important;
  border-radius: 5px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button {
  min-height: 2.7rem !important;
  border-color: rgba(214, 169, 79, 0.32) !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, rgba(10, 22, 41, 0.98), rgba(4, 9, 18, 0.98)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal-layer {
  align-items: center !important;
  padding: 1.4rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
  width: min(74rem, calc(100vw - 4rem)) !important;
  max-height: calc(100vh - 3.5rem) !important;
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr) !important;
  gap: 0.7rem !important;
  overflow: visible !important;
  padding: 0.85rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__title {
  font-size: clamp(1.25rem, 1.35vw, 1.65rem) !important;
  line-height: 1.04 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__equipped {
  display: grid !important;
  grid-template-columns: 12.5rem minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0.9rem !important;
  min-height: 4.6rem !important;
  margin: 0 !important;
  padding: 0.65rem 0.8rem !important;
  border: 1px solid var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: var(--frontier-ui-blue-raised) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-grid,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.6rem !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot {
  min-height: 3.35rem !important;
  padding: 0.35rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card {
  min-height: 8.1rem !important;
  padding: 0.62rem !important;
  border: 1px solid var(--frontier-ui-line-soft) !important;
  border-radius: 7px !important;
  background: var(--frontier-ui-blue-raised) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__portrait {
  width: 3.05rem !important;
  height: 3.05rem !important;
  border-radius: 6px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__name {
  color: var(--frontier-ui-text) !important;
  font-size: clamp(0.96rem, 0.84vw, 1.1rem) !important;
  line-height: 1.08 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-help-tooltip {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open,
.frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail,
.frontier-region-expedition.frontier-page-shell--open .frontier-map-stage,
.frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body {
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help] {
  position: relative !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::before {
  content: none !important;
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]::after {
  content: attr(data-help) !important;
  display: block !important;
  position: absolute !important;
  left: 50% !important;
  bottom: calc(100% + 0.5rem) !important;
  z-index: 2147483647 !important;
  width: max-content !important;
  max-width: min(20rem, calc(100vw - 2rem)) !important;
  padding: 0.58rem 0.68rem !important;
  border: 1px solid rgba(214, 169, 79, 0.46) !important;
  border-radius: 6px !important;
  background: rgba(3, 8, 17, 0.99) !important;
  color: rgba(244, 232, 208, 0.96) !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.58) !important;
  font-family: var(--font-ui, inherit) !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  white-space: normal !important;
  pointer-events: none !important;
  opacity: 0 !important;
  transform: translate(-50%, 0.25rem) !important;
  transition: opacity 0.12s ease, transform 0.12s ease !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate [data-help]::after {
  left: auto !important;
  right: 0 !important;
  transform: translateY(0.25rem) !important;
}

.frontier-region-expedition.frontier-page-shell--open [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open [data-help]:focus-within::after {
  opacity: 1 !important;
  transform: translate(-50%, 0) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]:focus-within::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel [data-help]:focus-within::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate [data-help]:hover::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate [data-help]:focus-visible::after,
.frontier-region-expedition.frontier-page-shell--open .frontier-region-plate [data-help]:focus-within::after {
  transform: translateY(0) !important;
}

@media (max-width: 1380px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer--sweep .frontier-command-offer__row {
    grid-template-columns: 2.85rem minmax(0, 1fr) 6.6rem !important;
    gap: 0.55rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy {
    grid-template-columns: minmax(7.4rem, 0.74fr) minmax(12.25rem, 1.26fr) !important;
    column-gap: 0.55rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy > .frontier-hud-chip-row {
    grid-template-columns: minmax(4.85rem, 1fr) auto minmax(4.85rem, 1fr) !important;
    gap: 0.35rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal {
    width: min(72rem, calc(100vw - 2.2rem)) !important;
  }
}

/* Frontier shop rail fit - keep after the consistency guard. */
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer--sweep .frontier-command-offer__row {
  display: grid !important;
  grid-template-columns: 3rem minmax(0, 1fr) 6.4rem !important;
  grid-template-rows: auto auto !important;
  align-items: start !important;
  column-gap: 0.62rem !important;
  row-gap: 0.48rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__icon {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  align-self: center !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy {
  display: contents !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__title,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row .font-serif {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__desc {
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__meta,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__copy > .frontier-hud-chip-row {
  grid-column: 2 / 4 !important;
  grid-row: 2 !important;
  grid-template-columns: minmax(5.1rem, 1fr) auto minmax(5.1rem, 1fr) !important;
  width: 100% !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-offer__row > .frontier-command-action {
  grid-column: 3 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: stretch !important;
  width: 100% !important;
  min-width: 0 !important;
  padding-inline: 0.55rem !important;
}

/* Frontier shop rail vertical fit - fixed rail height at 1280x720. */
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer {
  min-height: 5.85rem !important;
  padding: 0.48rem 0.62rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__row {
  grid-template-columns: 2.75rem minmax(0, 1fr) 5.95rem !important;
  column-gap: 0.55rem !important;
  row-gap: 0.34rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__icon {
  width: 2.55rem !important;
  height: 2.55rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-hud-chip {
  min-height: 2.05rem !important;
  padding: 0.22rem 0.34rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-hud-chip__icon {
  width: 1.05rem !important;
  height: 1.05rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-hud-chip__value {
  font-size: 0.72rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-hud-chip__label {
  font-size: 0.54rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-action {
  min-height: 2.2rem !important;
}

.frontier-shop-feedback {
  border-color: rgba(214, 169, 79, 0.32);
  background: rgba(3, 12, 23, 0.74);
  color: rgba(244, 232, 208, 0.9);
}

.frontier-shop-feedback[data-state="success"] {
  border-color: rgba(110, 231, 183, 0.38);
  background: rgba(16, 90, 72, 0.22);
  color: #caffdf;
}

.frontier-shop-feedback[data-state="error"] {
  border-color: rgba(248, 113, 113, 0.42);
  background: rgba(98, 24, 36, 0.24);
  color: #ffd0c8;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-hud-chip--reason {
  display: none !important;
}

/* Frontier rail fit after recovery controls. Keep this after older Frontier guards. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-rail-width: clamp(380px, 30vw, 440px) !important;
    --frontier-briefing-height: clamp(228px, 34vh, 252px) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
    grid-template-columns: minmax(0, 1fr) var(--frontier-rail-width) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    top: 0 !important;
    right: 0 !important;
    width: var(--frontier-rail-width) !important;
    height: var(--frontier-briefing-height) !important;
    max-height: var(--frontier-briefing-height) !important;
    display: grid !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 0.42rem !important;
    padding: 0.62rem 0.68rem !important;
    overflow: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(var(--frontier-briefing-height) + 8px) !important;
    right: 0 !important;
    bottom: 0 !important;
    width: var(--frontier-rail-width) !important;
    height: auto !important;
    max-height: calc(100% - var(--frontier-briefing-height) - 8px) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign {
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 0.5rem !important;
    align-items: start !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    white-space: normal !important;
    text-overflow: clip !important;
    font-size: clamp(0.98rem, 1.05vw, 1.18rem) !important;
    line-height: 1.05 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-subtitle {
    margin-top: 0.16rem !important;
    font-size: 0.66rem !important;
    line-height: 1.1 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-number-chip {
    align-self: start !important;
    padding: 0.22rem 0.46rem !important;
    border-radius: 0.42rem !important;
    font-size: 0.58rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
    grid-template-columns: 46px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0.48rem !important;
    margin-top: 0 !important;
    min-height: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
    width: 46px !important;
    height: 46px !important;
    border-radius: 5px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body .space-y-3 {
    display: grid !important;
    gap: 0.3rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.3rem !important;
    margin: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip {
    min-height: 1.86rem !important;
    padding: 0.22rem 0.32rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip__icon,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip__icon {
    width: 1rem !important;
    height: 1rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip__value,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip__value {
    font-size: 0.68rem !important;
    line-height: 1 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip__label,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip__label {
    font-size: 0.48rem !important;
    letter-spacing: 0.05em !important;
    line-height: 1 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(128px, 0.42fr) !important;
    gap: 0.42rem !important;
    align-items: stretch !important;
    margin: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button,
  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 2rem !important;
    height: 2rem !important;
    padding: 0.34rem 0.52rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button {
    grid-template-columns: 20px minmax(0, 1fr) auto !important;
    gap: 0.42rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__icon {
    width: 20px !important;
    height: 20px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__label,
  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__state {
    font-size: 0.56rem !important;
    letter-spacing: 0.04em !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-recovery-controls {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.38rem !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-control {
    min-width: 0 !important;
    padding: 0.34rem 0.42rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-control__head {
    gap: 0.32rem !important;
    margin-bottom: 0.25rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-control__label,
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-control__value {
    font-size: 0.55rem !important;
    letter-spacing: 0.05em !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-presets {
    gap: 0.22rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-preset {
    min-width: 0 !important;
    height: 1.22rem !important;
    border-radius: 4px !important;
    font-size: 0.54rem !important;
  }
}

@media (max-width: 1320px) and (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-rail-width: 380px !important;
    --frontier-briefing-height: 232px !important;
  }
}

/* Split Stack modal polish. */
.split-stack-modal {
  width: min(29rem, calc(100vw - 2rem)) !important;
  padding: 1.25rem !important;
  border: 1px solid rgba(214, 169, 79, 0.42) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(214, 169, 79, 0.13), transparent 34%),
    linear-gradient(180deg, rgba(8, 20, 38, 0.98), rgba(3, 9, 18, 0.98)) !important;
  box-shadow:
    0 26px 70px rgba(0, 0, 0, 0.68),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.split-stack-modal__header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.split-stack-modal__icon {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(214, 169, 79, 0.35);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(13, 28, 51, 0.9), rgba(5, 13, 25, 0.96));
  color: #f4e8d0;
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 12px 24px rgba(0, 0, 0, 0.28);
}

.split-stack-modal__icon-image {
  width: 2.35rem;
  height: 2.35rem;
  object-fit: contain;
}

.split-stack-modal__icon--empty {
  color: rgba(200, 192, 208, 0.75);
  padding: 0.55rem;
}

.split-stack-modal__kicker {
  color: rgba(214, 169, 79, 0.84);
  font: 900 0.68rem/1 var(--font-ui, system-ui);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.split-stack-modal__title {
  margin-top: 0.18rem;
  color: var(--color-parchment, #f4e8d0);
  font-family: var(--font-serif, serif);
  font-size: 1.55rem;
  font-style: italic;
  font-weight: 800;
  line-height: 1.05;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.62);
}

.split-stack-modal__item {
  margin-top: 0.18rem;
  color: rgba(200, 192, 208, 0.86);
  font-size: 0.88rem;
  font-style: italic;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-stack-modal__current {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(214, 169, 79, 0.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(5, 14, 28, 0.72), rgba(5, 11, 22, 0.48));
  text-align: center;
}

.split-stack-modal__current-label {
  color: rgba(200, 192, 208, 0.78);
  font-size: 0.8rem;
  font-weight: 700;
}

.split-stack-modal__current-value {
  margin-top: 0.18rem;
  color: #fff7d6;
  font-size: 2rem;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0.01em;
}

.split-stack-modal__control {
  margin-bottom: 1rem;
  padding: 0.95rem;
  border: 1px solid rgba(118, 164, 183, 0.16);
  border-radius: 8px;
  background: rgba(3, 10, 20, 0.38);
}

.split-stack-modal__control-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.72rem;
  color: rgba(200, 192, 208, 0.86);
  font-size: 0.78rem;
  font-weight: 800;
}

.split-stack-modal__selected {
  color: #8bd3ff;
  font-size: 1rem;
  font-weight: 1000;
}

.split-stack-modal__range {
  width: 100%;
  height: 1.55rem;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

.split-stack-modal__range:focus {
  outline: none;
}

.split-stack-modal__range::-webkit-slider-runnable-track {
  height: 0.48rem;
  border: 1px solid rgba(214, 169, 79, 0.22);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(88, 166, 208, 0.7), rgba(214, 169, 79, 0.72));
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.52);
}

.split-stack-modal__range::-webkit-slider-thumb {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: -0.48rem;
  border: 2px solid #f5d991;
  border-radius: 999px;
  appearance: none;
  -webkit-appearance: none;
  background: radial-gradient(circle at 35% 32%, #fff3c4, #62b6df 46%, #15344b 100%);
  box-shadow:
    0 0 0 4px rgba(98, 182, 223, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.55);
}

.split-stack-modal__range::-moz-range-track {
  height: 0.48rem;
  border: 1px solid rgba(214, 169, 79, 0.22);
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(88, 166, 208, 0.7), rgba(214, 169, 79, 0.72));
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.52);
}

.split-stack-modal__range::-moz-range-thumb {
  width: 1.35rem;
  height: 1.35rem;
  border: 2px solid #f5d991;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 32%, #fff3c4, #62b6df 46%, #15344b 100%);
  box-shadow:
    0 0 0 4px rgba(98, 182, 223, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.55);
}

.split-stack-modal__limits {
  display: flex;
  justify-content: space-between;
  margin-top: 0.42rem;
  color: rgba(200, 192, 208, 0.72);
  font-size: 0.72rem;
  font-weight: 800;
}

.split-stack-modal__preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.split-stack-modal__card {
  min-width: 0;
  padding: 0.85rem 0.75rem;
  border-radius: 8px;
  text-align: center;
  background: linear-gradient(180deg, rgba(8, 18, 34, 0.74), rgba(3, 9, 18, 0.8));
}

.split-stack-modal__card--remaining {
  border: 1px solid rgba(96, 165, 250, 0.46);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.08);
}

.split-stack-modal__card--new {
  border: 1px solid rgba(45, 212, 191, 0.5);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.08);
}

.split-stack-modal__card-label {
  color: rgba(200, 192, 208, 0.78);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.split-stack-modal__card--remaining .split-stack-modal__card-value {
  color: #93c5fd;
}

.split-stack-modal__card--new .split-stack-modal__card-value {
  color: #6ee7b7;
}

.split-stack-modal__card-value {
  margin-top: 0.28rem;
  font-size: 1.55rem;
  font-weight: 1000;
  line-height: 1;
}

.split-stack-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.split-stack-modal__button {
  min-height: 2.75rem;
  padding: 0.62rem 1rem !important;
  border-radius: 6px !important;
  font-weight: 900 !important;
}

@media (max-width: 520px) {
  .split-stack-modal {
    padding: 1rem !important;
  }

  .split-stack-modal__preview,
  .split-stack-modal__actions {
    grid-template-columns: 1fr;
  }
}

:root {
  --vespera-ui-scale: 1;
  --vespera-desktop-titlebar-height: 0px;
  --vespera-viewport-width: calc(100vw / var(--vespera-ui-scale));
  --vespera-viewport-height: calc(100dvh / var(--vespera-ui-scale));
  --vespera-game-viewport-height: calc(
    var(--vespera-viewport-height) - var(--vespera-desktop-titlebar-height)
  );
}

html {
  /* Chromium/Electron-only game client: zoom scales fixed px shells and rem content together. */
  font-size: 16px;
  zoom: var(--vespera-ui-scale);
  width: var(--vespera-viewport-width);
  height: calc(100vh / var(--vespera-ui-scale));
  height: var(--vespera-viewport-height);
  overflow: hidden;
}

/*
 * Root zoom also magnifies viewport units. Compensate every fixed full-screen
 * layer so overlays remain physically bounded by the visible game window at
 * every supported UI scale.
 */
.fixed.inset-0 {
  top: var(--vespera-desktop-titlebar-height);
  right: auto;
  bottom: auto;
  left: 0;
  width: var(--vespera-viewport-width);
  height: calc(100vh / var(--vespera-ui-scale));
  height: var(--vespera-game-viewport-height);
}

.modal-overlay,
.vespera-modal-viewport {
  min-height: 0;
  max-width: var(--vespera-viewport-width);
  max-height: calc(100vh / var(--vespera-ui-scale));
  max-height: var(--vespera-game-viewport-height);
  overflow: hidden;
}

.vespera-modal-viewport {
  z-index: 2147483000 !important;
}

.modal-overlay > .panel-painted,
.modal-overlay > .modal-content,
.modal-overlay > [role="dialog"],
.modal-overlay > [aria-modal="true"] {
  min-height: 0;
  max-height: calc(100% - 2rem) !important;
}

/* Large dialogs that use a custom backdrop still inherit the same viewport cap. */
.fixed.inset-0.flex > :not(.absolute):not(.pointer-events-none) {
  min-height: 0;
  max-height: calc(100% - 2rem) !important;
}

.modal-overlay > .panel-painted:not(.overflow-hidden):not(.vespera-modal-frame),
.modal-overlay > .modal-content:not(.overflow-hidden):not(.vespera-modal-frame),
.modal-overlay > [role="dialog"]:not(.overflow-hidden):not(.vespera-modal-frame),
.modal-overlay > [aria-modal="true"]:not(.overflow-hidden):not(.vespera-modal-frame),
.fixed.inset-0.flex > :not(.absolute):not(.pointer-events-none):not(.overflow-hidden):not(.vespera-modal-frame) {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#root {
  width: 100%;
  height: var(--vespera-game-viewport-height);
  margin-top: var(--vespera-desktop-titlebar-height);
  overflow: hidden;
  overscroll-behavior: none;
}

/* Keep the game document stationary; only intentional inner panels scroll. */
body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: calc(100vh / var(--vespera-ui-scale));
  height: var(--vespera-viewport-height);
  overflow: hidden;
  overscroll-behavior: none;
}

/* Every root shell consumes the same usable viewport, including the desktop title strip. */
#root > .h-screen,
#root > .min-h-screen,
#root > .zone-themed-shell {
  height: 100% !important;
  min-height: 100% !important;
}

.ui-scale-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.ui-scale-menu-wrap {
  position: relative;
  width: min(100%, 15rem);
  min-width: 11.5rem;
}

.ui-scale-menu {
  width: 100%;
  min-height: 2.65rem;
  appearance: none;
  padding: 0.58rem 2.35rem 0.58rem 0.82rem;
  border: 1px solid rgba(222, 183, 91, 0.42);
  border-radius: 0.55rem;
  outline: none;
  background: linear-gradient(
    180deg,
    rgba(34, 45, 58, 0.96),
    rgba(12, 21, 31, 0.98)
  );
  color: var(--color-parchment);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 7px 20px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.ui-scale-menu:hover,
.ui-scale-menu:focus-visible {
  border-color: rgba(235, 197, 105, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 0 3px rgba(222, 183, 91, 0.11),
    0 8px 22px rgba(0, 0, 0, 0.25);
}

.ui-scale-menu option {
  background: #0b1722;
  color: #eee4ca;
}

.ui-scale-menu-arrow {
  position: absolute;
  top: 50%;
  right: 0.82rem;
  color: var(--color-celestial-gold);
  font-size: 1.05rem;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-55%);
}

.ui-scale-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.72rem;
  padding: 0.75rem 0.82rem;
  border: 1px solid rgba(239, 176, 73, 0.38);
  border-radius: 0.55rem;
  background: linear-gradient(
    135deg,
    rgba(91, 54, 17, 0.58),
    rgba(35, 27, 22, 0.84)
  );
  box-shadow: inset 0 1px 0 rgba(255, 220, 143, 0.05);
}

.ui-scale-warning__icon {
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border: 1px solid rgba(255, 205, 112, 0.58);
  border-radius: 50%;
  background: rgba(176, 101, 26, 0.25);
  color: #ffd783;
  font: 900 0.78rem/1 var(--font-display, sans-serif);
}

.ui-scale-warning__copy strong {
  display: block;
  margin-bottom: 0.12rem;
  color: #f2cb79;
  font-size: 0.72rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.ui-scale-warning__copy p {
  margin: 0;
  color: rgba(235, 226, 208, 0.72);
  font-size: 0.68rem;
  line-height: 1.45;
}

.ui-scale-warning__reset {
  min-height: 2.15rem;
  padding: 0.42rem 0.65rem;
  border: 1px solid rgba(239, 197, 109, 0.45);
  border-radius: 0.42rem;
  background: rgba(20, 26, 31, 0.72);
  color: #f1d493;
  font-size: 0.64rem;
  font-weight: 900;
  white-space: nowrap;
  transition: border-color 150ms ease, background 150ms ease;
}

.ui-scale-warning__reset:hover,
.ui-scale-warning__reset:focus-visible {
  border-color: rgba(255, 218, 138, 0.8);
  background: rgba(76, 53, 25, 0.82);
}

@media (max-width: 620px) {
  .ui-scale-control-row {
    align-items: stretch;
    flex-direction: column;
  }

  .ui-scale-menu-wrap {
    width: 100%;
  }

  .ui-scale-warning {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ui-scale-warning__reset {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* Frontier right rail and seal dock cleanup. Keep this last. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-rail-width: clamp(430px, 31vw, 480px) !important;
    --frontier-briefing-height: clamp(305px, 38vh, 340px) !important;
    --frontier-stage-gap: 10px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
    position: relative !important;
    grid-template-columns: minmax(0, 1fr) var(--frontier-rail-width) !important;
    gap: var(--frontier-stage-gap) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail__support {
    display: contents !important;
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock {
    position: absolute !important;
    inset: 0 !important;
    grid-column: 1 / -1 !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    pointer-events: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    position: absolute !important;
    pointer-events: auto !important;
    z-index: 60 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: auto !important;
    width: var(--frontier-rail-width) !important;
    height: var(--frontier-briefing-height) !important;
    max-height: var(--frontier-briefing-height) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto auto !important;
    gap: 0.55rem !important;
    padding: 0.72rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    top: calc(var(--frontier-briefing-height) + 10px) !important;
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    width: var(--frontier-rail-width) !important;
    height: auto !important;
    max-height: calc(100% - var(--frontier-briefing-height) - 10px) !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    gap: 0.6rem !important;
    padding: 0.72rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--campaign,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 0.55rem !important;
    margin-top: 0 !important;
    min-height: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
    width: 58px !important;
    height: 58px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    display: grid !important;
    gap: 0.34rem !important;
    margin: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip {
    min-height: 2.05rem !important;
    padding: 0.28rem 0.38rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.42rem !important;
    align-items: stretch !important;
    margin: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-fight-button,
  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 2.05rem !important;
    height: 2.05rem !important;
    padding: 0.35rem 0.65rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button {
    display: grid !important;
    grid-template-columns: 22px minmax(0, 1fr) auto !important;
    gap: 0.5rem !important;
    justify-items: start !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__label,
  .frontier-region-expedition.frontier-page-shell--open .frontier-auto-combat-button__state {
    font-size: 0.64rem !important;
    letter-spacing: 0.05em !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-recovery-controls {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.42rem !important;
    margin: 0 !important;
    min-width: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-control {
    min-width: 0 !important;
    padding: 0.38rem 0.45rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-preset {
    min-width: 0 !important;
    height: 1.3rem !important;
    font-size: 0.56rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    left: 16px !important;
    right: calc(var(--frontier-rail-width) + var(--frontier-stage-gap) + 16px) !important;
    bottom: 0 !important;
    top: auto !important;
    width: auto !important;
    height: 104px !important;
    max-height: 104px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    padding: 10px 14px !important;
    background:
      linear-gradient(180deg, rgba(8, 18, 32, 0.92), rgba(3, 8, 16, 0.94)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel > .flex:first-child {
    display: contents !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel > .flex:first-child > div:first-child,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seals-header-chips,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seals-eyebrow {
    display: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-slot-grid {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem !important;
    margin: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
    position: relative !important;
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    min-height: 72px !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 7px !important;
    border-color: rgba(214, 169, 79, 0.34) !important;
    background: linear-gradient(180deg, rgba(7, 14, 26, 0.95), rgba(2, 6, 13, 0.98)) !important;
    box-shadow:
      inset 0 0 0 1px rgba(244, 232, 208, 0.05),
      0 10px 20px rgba(0, 0, 0, 0.28) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket--selected {
    border-color: rgba(255, 219, 130, 0.9) !important;
    box-shadow:
      0 0 0 1px rgba(255, 219, 130, 0.35),
      0 0 22px rgba(214, 169, 79, 0.32) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__frame,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty {
    width: 58px !important;
    height: 58px !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    border-radius: 5px !important;
    background: transparent !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__icon {
    width: 58px !important;
    height: 58px !important;
    border-radius: 5px !important;
    object-fit: cover !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__pips {
    position: absolute !important;
    left: 50% !important;
    bottom: 4px !important;
    transform: translateX(-50%) !important;
    width: auto !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions {
    display: flex !important;
    flex: 0 0 auto !important;
    gap: 0.55rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action {
    min-width: 150px !important;
    min-height: 2.65rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    inset: auto 16px 118px !important;
  }
}

/* Frontier reward/seal alignment follow-up. Keep this last. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body .space-y-3 {
    display: grid !important;
    grid-template-rows: auto auto !important;
    gap: 0.36rem !important;
    min-width: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.34rem !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward > .frontier-hud-chip {
    width: 100% !important;
    min-width: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward > .frontier-hud-chip:first-child {
    order: 2 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward > .frontier-hud-chip:nth-child(2) {
    order: 1 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    justify-content: flex-start !important;
    gap: 1rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-slot-grid {
    order: 1 !important;
    margin-right: auto !important;
    padding: 8px 10px !important;
    border: 1px solid rgba(214, 169, 79, 0.24) !important;
    border-radius: 8px !important;
    background: linear-gradient(180deg, rgba(4, 11, 22, 0.86), rgba(1, 5, 12, 0.92)) !important;
    box-shadow: inset 0 1px 0 rgba(244, 232, 208, 0.05) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions {
    order: 2 !important;
    margin-left: auto !important;
    justify-content: flex-end !important;
  }
}

/* Frontier seal dock and reward row final alignment. Keep this last. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward.frontier-aether-reward {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 0.34rem !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward.frontier-aether-reward > .frontier-hud-chip {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 2.05rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward.frontier-aether-reward > .frontier-hud-chip:first-child {
    order: 2 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward.frontier-aether-reward > .frontier-hud-chip:nth-child(2) {
    order: 1 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    position: absolute !important;
    left: 16px !important;
    right: calc(var(--frontier-rail-width) + var(--frontier-stage-gap) + 16px) !important;
    bottom: 0 !important;
    height: 118px !important;
    max-height: 118px !important;
    display: block !important;
    padding: 12px 16px !important;
    overflow: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-slot-grid {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1rem !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
    width: 86px !important;
    height: 86px !important;
    min-width: 86px !important;
    min-height: 86px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__frame,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty {
    width: 70px !important;
    height: 70px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__icon {
    width: 70px !important;
    height: 70px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-actions {
    position: absolute !important;
    right: 16px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 0.65rem !important;
    margin: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    inset: auto 16px 132px !important;
  }
}

/* Frontier seal icon centering. Keep this last. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
    display: block !important;
    position: relative !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__frame,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__empty {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__icon {
    display: block !important;
    margin: 0 auto !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__pips {
    bottom: 5px !important;
  }
}

/* Frontier reward chips: keep Aether and Boss Bonus on one row. Keep this last. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward.frontier-aether-reward {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-auto-flow: column !important;
    grid-auto-rows: minmax(2.05rem, auto) !important;
    align-items: stretch !important;
    gap: 0.34rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward.frontier-aether-reward > .frontier-hud-chip:first-child {
    grid-column: 1 !important;
    grid-row: 1 !important;
    order: 1 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward.frontier-aether-reward > .frontier-hud-chip:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
    order: 2 !important;
  }
}

/* Frontier help/readability pass. Keep this last. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open [data-help]::after {
    min-width: min(360px, 74vw) !important;
    max-width: min(460px, 78vw) !important;
    padding: 0.8rem 0.9rem !important;
    font-size: 0.86rem !important;
    line-height: 1.35 !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    z-index: 2147483647 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs button {
    font-size: 0.86rem !important;
    letter-spacing: 0.06em !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__label,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-title,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seals-eyebrow,
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-eyebrow {
    font-size: 0.72rem !important;
    line-height: 1.15 !important;
    letter-spacing: 0.12em !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__note {
    font-size: 0.76rem !important;
    line-height: 1.25 !important;
    font-weight: 800 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__value {
    font-size: 0.88rem !important;
    line-height: 1.05 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip__label {
    font-size: 0.62rem !important;
    line-height: 1.05 !important;
    letter-spacing: 0.05em !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-control__label,
  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-control__value {
    font-size: 0.68rem !important;
    line-height: 1.05 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel .combat-auto-preset {
    font-size: 0.62rem !important;
    font-weight: 900 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-action {
    font-size: 0.82rem !important;
  }
}

/* Frontier foreground help overlays. Keep this last. */
.frontier-region-expedition.frontier-page-shell--open [data-help]::before,
.frontier-region-expedition.frontier-page-shell--open [data-help]::after {
  content: none !important;
  display: none !important;
}

.frontier-region-expedition.frontier-page-shell--open {
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-help-tooltip {
  display: block !important;
  position: fixed !important;
  z-index: 2147483647 !important;
  pointer-events: none !important;
  min-width: min(360px, 74vw) !important;
  max-width: min(460px, 78vw) !important;
  padding: 0.8rem 0.9rem !important;
  border: 1px solid rgba(214, 169, 79, 0.72) !important;
  border-radius: 6px !important;
  background: rgba(3, 8, 16, 0.98) !important;
  color: rgba(244, 232, 208, 0.96) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(152, 207, 255, 0.14) inset !important;
  font-size: 0.86rem !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  text-align: left !important;
  text-transform: none !important;
  white-space: normal !important;
}

/* Elements layout refresh (easy revert): remove this block and the matching
   elements-page-* hooks in GameView-Bdbw4Cpc.js to restore the prior layout. */
.elements-page-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 320px) !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  height: clamp(640px, calc(100vh - 108px), 820px) !important;
  max-height: clamp(640px, calc(100vh - 108px), 820px) !important;
  overflow: hidden !important;
}

.elements-page-layout > aside:first-child {
  grid-column: 1 / -1;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  height: auto !important;
  min-height: 0 !important;
  padding: 10px 12px !important;
  overflow: visible !important;
  background:
    linear-gradient(90deg, rgba(18, 28, 49, 0.98), rgba(8, 18, 34, 0.92)),
    rgb(var(--indigo-rgb) / 0.78) !important;
  box-shadow: inset 0 1px 0 rgba(255, 240, 205, 0.05);
}

.elements-page-header-copy strong,
.elements-page-header-copy span {
  display: block;
}

.elements-page-header-copy strong {
  color: var(--color-parchment);
  font: 800 20px/1.05 var(--font-serif, inherit);
  letter-spacing: 0.03em;
}

.elements-page-header-copy span {
  max-width: 210px;
  margin-top: 5px;
  color: var(--color-lavender-grey);
  font: 700 10px/1.35 var(--font-body, inherit);
}

.elements-page-selector {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px !important;
}

.elements-page-selector > button {
  min-width: 0;
  min-height: 54px;
  gap: 8px !important;
  padding: 7px 9px !important;
}

.elements-page-selector > button > span:first-child {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px;
}

.elements-page-selector > button > span:last-child span:first-child {
  overflow: hidden;
  font-size: 14px !important;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.elements-page-selector > button > span:last-child span:last-child {
  margin-top: 3px;
  font-size: 9px !important;
  letter-spacing: 0.1em !important;
}

.elements-page-tree-panel {
  grid-column: 1;
  grid-row: 2;
  height: 100% !important;
}

.elements-page-details-panel {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  height: 100% !important;
  overflow-y: auto !important;
}

.elements-page-tree-description {
  position: static !important;
  z-index: 20;
  width: auto !important;
  max-width: 560px !important;
  margin: 5px auto 0 !important;
  padding-inline: 12px;
  text-align: center !important;
}

.elements-page-tree-panel .elements-css-tree {
  --branch-gap: clamp(150px, 18vw, 230px);
  --path-label-col: clamp(92px, 9vw, 126px);
}

.elements-page-tree-panel .elements-css-tree__path-label {
  max-width: 124px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.elements-css-tree--left-chosen .elements-css-tree__path-label--left,
.elements-css-tree--right-chosen .elements-css-tree__path-label--right {
  background: color-mix(in srgb, var(--element-accent) 19%, rgba(2, 8, 18, 0.88));
  color: var(--color-parchment);
  box-shadow: 0 0 18px color-mix(in srgb, var(--element-accent) 30%, transparent);
}

.elements-css-tree--left-chosen .elements-css-tree__path-label--right,
.elements-css-tree--right-chosen .elements-css-tree__path-label--left {
  border-color: rgba(150, 145, 160, 0.22);
  background: rgba(9, 12, 18, 0.72);
  color: rgba(176, 169, 186, 0.52);
  box-shadow: none;
}

.elements-page-tree-panel .element-node-v2__label {
  width: 118px;
  padding: 2px 4px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, rgba(2, 7, 14, 0.82) 18% 82%, transparent);
  font-size: 10px;
  line-height: 1.12;
}

.elements-page-upgrade-button:disabled {
  opacity: 0.78 !important;
}

.elements-page-refund-button {
  margin-top: auto !important;
  opacity: 0.78;
}

.elements-page-refund-button:hover,
.elements-page-refund-button:focus-visible {
  opacity: 1;
}

.elements-total-bonuses {
  display: flex;
  flex: 0 0 220px;
  min-height: 220px;
  max-height: 220px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--element-accent) 42%, rgba(217, 184, 129, 0.2));
  border-radius: 4px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--element-accent) 9%, rgba(5, 13, 25, 0.95)), rgba(5, 13, 25, 0.9));
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.26);
}

.elements-total-bonuses--tree-corner {
  position: absolute;
  z-index: 3;
  top: 16px;
  left: 16px;
  height: calc(100% - 32px);
  width: clamp(230px, 24%, 300px);
  min-height: 0;
  max-height: calc(100% - 32px);
  max-width: calc(100% - 32px);
  flex-basis: auto;
  margin: 0;
}

.elements-total-bonuses > header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px 7px;
  border-bottom: 1px solid color-mix(in srgb, var(--element-accent) 28%, transparent);
}

.elements-total-bonuses > header > div {
  min-width: 0;
}

.elements-total-bonuses > header span,
.elements-total-bonuses > header strong {
  display: block;
}

.elements-total-bonuses > header span {
  color: var(--color-lavender-grey);
  font: 900 9px/1.1 var(--font-ui, inherit);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.elements-total-bonuses > header strong {
  margin-top: 3px;
  overflow: hidden;
  color: var(--color-parchment);
  font: 800 14px/1.1 var(--font-serif, inherit);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.elements-total-bonuses > header > b {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--element-accent) 50%, transparent);
  border-radius: 3px;
  padding: 4px 6px;
  background: color-mix(in srgb, var(--element-accent) 11%, rgba(3, 9, 18, 0.8));
  color: var(--element-accent);
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.elements-total-bonuses > p {
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 10px;
  color: rgba(184, 194, 214, 0.72);
  font: 600 10px/1.35 var(--font-ui, inherit);
}

.elements-total-bonuses__list {
  display: grid;
  min-height: 0;
  gap: 6px;
  overflow-y: auto;
  padding: 0 7px 8px;
  scrollbar-color: color-mix(in srgb, var(--element-accent) 48%, transparent) rgba(3, 9, 18, 0.55);
  scrollbar-width: thin;
}

.elements-total-bonus-card {
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--element-accent) 45%, rgba(255, 255, 255, 0.08));
  border-radius: 4px;
  padding: 7px 8px;
  background: rgba(3, 12, 23, 0.84);
  box-shadow: inset 2px 0 0 color-mix(in srgb, var(--element-accent) 76%, #ffffff 8%);
}

.elements-total-bonus-card > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.elements-total-bonus-card > span b,
.elements-total-bonus-card > span em {
  overflow: hidden;
  font: 900 9px/1.15 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.elements-total-bonus-card > span b {
  color: rgba(202, 207, 220, 0.76);
}

.elements-total-bonus-card > span em {
  flex: 0 0 auto;
  color: color-mix(in srgb, var(--element-accent) 78%, #ffffff 16%);
  font-style: normal;
}

.elements-total-bonus-card > strong {
  display: block;
  margin-top: 5px;
  color: color-mix(in srgb, var(--element-accent) 78%, #dffaff 22%);
  font: 800 11px/1.35 var(--font-ui, inherit);
  overflow-wrap: anywhere;
}

.elements-total-bonuses__empty {
  display: flex;
  min-height: 58px;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
}

.elements-total-bonuses__empty strong {
  color: var(--color-parchment);
  font: 800 11px/1.3 var(--font-ui, inherit);
}

.elements-total-bonuses__empty span {
  margin-top: 3px;
  color: var(--color-lavender-grey);
  font: 600 10px/1.3 var(--font-ui, inherit);
}

.element-node-tooltip {
  position: fixed;
  z-index: 2147483638;
  box-sizing: border-box;
  width: clamp(340px, 32vw, 460px);
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid color-mix(in srgb, var(--element-accent) 72%, #f5dc9d 14%);
  border-radius: 6px;
  padding: 11px;
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--element-accent) 16%, transparent), transparent 42%),
    linear-gradient(180deg, rgba(8, 19, 34, 0.99), rgba(3, 9, 18, 0.995));
  box-shadow:
    0 22px 58px rgba(0, 0, 0, 0.78),
    0 0 24px color-mix(in srgb, var(--element-accent) 24%, transparent),
    inset 0 0 0 1px rgba(255, 244, 211, 0.04);
  color: var(--color-parchment);
  pointer-events: none;
}

.element-node-tooltip__header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid color-mix(in srgb, var(--element-accent) 30%, transparent);
}

.element-node-tooltip__icon {
  width: 44px;
  height: 44px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--element-accent) 78%, #ffffff 10%);
  border-radius: 4px;
  background: rgba(2, 8, 16, 0.92);
  box-shadow: 0 0 14px color-mix(in srgb, var(--element-accent) 30%, transparent);
}

.element-node-tooltip__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.element-node-tooltip__identity {
  min-width: 0;
}

.element-node-tooltip__identity span,
.element-node-tooltip__identity strong {
  display: block;
}

.element-node-tooltip__identity span {
  color: var(--element-accent);
  font: 900 9px/1.1 var(--font-ui, inherit);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.element-node-tooltip__identity strong {
  margin-top: 4px;
  color: var(--color-parchment);
  font: 800 19px/1.1 var(--font-serif, inherit);
  overflow-wrap: anywhere;
  white-space: normal;
}

.element-node-tooltip__state {
  align-self: start;
  border: 1px solid color-mix(in srgb, var(--element-accent) 45%, transparent);
  border-radius: 3px;
  padding: 4px 6px;
  color: var(--element-accent);
  font: 900 8px/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.element-node-tooltip__state.is-mastered {
  border-color: rgba(92, 238, 152, 0.5);
  color: #8ef5b2;
}

.element-node-tooltip__description {
  margin: 9px 1px 0;
  color: rgba(210, 215, 228, 0.8);
  font: 600 11px/1.45 var(--font-ui, inherit);
  overflow-wrap: anywhere;
}

.element-node-tooltip__effects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.element-node-tooltip__effects section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(154, 177, 204, 0.18);
  border-radius: 4px;
  padding: 8px;
  background: rgba(5, 15, 28, 0.82);
}

.element-node-tooltip__effects section.is-next {
  border-color: color-mix(in srgb, var(--element-accent) 48%, transparent);
  background: color-mix(in srgb, var(--element-accent) 8%, rgba(5, 15, 28, 0.88));
}

.element-node-tooltip__effects span,
.element-node-tooltip__effects strong {
  display: block;
}

.element-node-tooltip__effects span,
.element-node-tooltip__meta span {
  color: rgba(167, 181, 204, 0.72);
  font: 900 8px/1.15 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.element-node-tooltip__effects strong {
  margin-top: 5px;
  color: var(--color-parchment);
  font: 750 11px/1.4 var(--font-ui, inherit);
  overflow-wrap: anywhere;
}

.element-node-tooltip__effects section.is-next strong {
  color: color-mix(in srgb, var(--element-accent) 75%, #ffffff 25%);
}

.element-node-tooltip__meta {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 7px 8px;
  border: 1px solid rgba(154, 177, 204, 0.14);
  border-radius: 4px;
  background: rgba(2, 9, 18, 0.68);
}

.element-node-tooltip__meta > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.element-node-tooltip__meta strong {
  min-width: 0;
  color: var(--color-parchment);
  font: 800 10px/1.35 var(--font-ui, inherit);
  overflow-wrap: anywhere;
  text-align: right;
}

.element-node-tooltip footer {
  margin: 8px -1px -1px;
  color: rgba(190, 198, 214, 0.58);
  font: 600 9px/1.3 var(--font-ui, inherit);
  overflow-wrap: anywhere;
  text-align: right;
}

@media (max-width: 640px) {
  .element-node-tooltip {
    width: calc(100vw - 24px);
  }

  .element-node-tooltip__effects {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1120px) and (min-width: 961px) {
  .elements-page-layout {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 285px) !important;
    grid-template-rows: auto minmax(640px, 1fr) !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .elements-page-layout > aside:first-child {
    grid-template-columns: minmax(165px, 190px) minmax(0, 1fr);
  }

  .elements-page-selector {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .elements-page-tree-panel,
  .elements-page-details-panel {
    min-height: 640px !important;
    height: 640px !important;
  }

  .elements-page-tree-panel .elements-css-tree {
    --branch-gap: clamp(112px, 18vw, 150px);
    --path-label-col: clamp(70px, 8vw, 88px);
  }

  .elements-page-tree-panel .elements-css-tree__path-label {
    grid-row: 2;
    align-self: start;
    max-width: 96px;
    padding: 4px 7px;
    font-size: 8px;
  }

  .elements-page-tree-panel .elements-css-tree__path-label--left {
    grid-column: 2;
  }

  .elements-page-tree-panel .elements-css-tree__path-label--right {
    grid-column: 4;
  }
}

@media (max-width: 960px) {
  .elements-page-layout {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .elements-page-layout > aside:first-child {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: minmax(0, 1fr);
  }

  .elements-page-header-copy span {
    max-width: none;
  }

  .elements-page-selector {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .elements-page-tree-panel {
    grid-column: 1;
    grid-row: 2;
    min-height: 620px !important;
    height: 620px !important;
  }

  .elements-page-details-panel {
    grid-column: 1;
    grid-row: 3;
    height: auto !important;
    min-height: 0 !important;
  }

  .elements-page-refund-button {
    margin-top: 12px !important;
  }

  .elements-total-bonuses--tree-corner {
    width: clamp(220px, 34%, 280px);
  }
}

@media (max-width: 640px) {
  .elements-page-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .elements-page-selector > button > span:first-child {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px;
  }

  .elements-page-tree-panel .element-node-v2__label {
    width: 100px;
    font-size: 9px;
  }

  .elements-total-bonuses--tree-corner {
    width: min(220px, calc(100% - 32px));
  }
}

/* Mercenary Dispatch v2 (one-line revert): set
   FOLLOWER_DISPATCH_COMPACT_UI to false in GameView-Bdbw4Cpc.js. */
.follower-dispatch-v2 {
  --follower-compact-card-height: 180px;
  margin-bottom: 0 !important;
}

.follower-dispatch-v2 .follower-dispatch-hero {
  min-height: 58px !important;
  margin-bottom: 8px !important;
  padding: 9px 11px !important;
}

.follower-dispatch-v2 .follower-dispatch-hero h2 {
  font-size: 20px !important;
  line-height: 1.05;
}

.follower-dispatch-v2 .follower-dispatch-hero p {
  margin-top: 3px !important;
  font-size: 11px !important;
}

.follower-dispatch-v2 .follower-summary-chip {
  min-width: 68px;
  padding: 5px 8px !important;
}

.follower-dispatch-v2 .follower-dispatch-board {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 8px !important;
}

.follower-dispatch-v2 .follower-dispatch-board > section {
  min-width: 0;
}

.follower-dispatch-v2 .follower-roster-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px !important;
}

.follower-dispatch-v2 .follower-hero-card {
  min-height: var(--follower-compact-card-height) !important;
  height: var(--follower-compact-card-height);
}

.follower-dispatch-v2 .follower-hero-card__portrait {
  width: 108px !important;
  transform: scale(1.02);
  object-position: center top;
}

.follower-dispatch-v2 .follower-hero-card:hover .follower-hero-card__portrait {
  transform: scale(1.045);
}

.follower-dispatch-v2 .follower-hero-card__shade {
  background:
    linear-gradient(90deg, rgba(8, 18, 34, 0.12) 0%, rgba(10, 24, 45, 0.52) 24%, rgba(10, 25, 48, 0.94) 40%, rgba(9, 25, 48, 0.98) 100%),
    radial-gradient(circle at 76% 10%, rgba(122, 167, 210, 0.18), transparent 34%);
}

.follower-dispatch-v2 .follower-hero-card__content {
  min-height: var(--follower-compact-card-height) !important;
  height: var(--follower-compact-card-height);
  margin-left: 96px !important;
  gap: 7px !important;
  padding: 10px !important;
}

.follower-dispatch-v2 .follower-hero-card__title-row {
  gap: 5px !important;
  padding-right: 58px !important;
}

.follower-dispatch-v2 .follower-hero-card__title-row h3 {
  overflow: hidden;
  font-size: 17px !important;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.follower-dispatch-v2 .follower-role-badge,
.follower-dispatch-v2 .follower-unlock-badge,
.follower-dispatch-v2 .follower-active-badge {
  font-size: 10px !important;
  letter-spacing: 0.08em !important;
}

.follower-dispatch-v2 .follower-unlock-badge {
  top: 8px !important;
  right: 8px !important;
  padding: 3px 5px !important;
}

.follower-dispatch-v2 .follower-active-badge {
  top: 8px !important;
  right: 8px !important;
  padding: 3px 5px !important;
  transform: translateX(calc(-100% - 8px));
}

.follower-dispatch-v2 .follower-status-copy {
  display: none;
}

.follower-dispatch-v2 .follower-card-abilities {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
}

.follower-dispatch-v2 .follower-hero-card .follower-ability-slot {
  min-height: 48px !important;
  gap: 6px !important;
  padding: 5px !important;
}

.follower-dispatch-v2 .follower-hero-card .follower-ability-slot > span:first-child {
  width: 34px !important;
  height: 34px !important;
}

.follower-dispatch-v2 .follower-hero-card .follower-ability-slot img {
  width: 31px !important;
  height: 31px !important;
}

.follower-dispatch-v2 .follower-hero-card .follower-ability-slot span span:first-child {
  font-size: 9px !important;
}

.follower-dispatch-v2 .follower-hero-card .follower-ability-slot span span:nth-child(2) {
  overflow: hidden;
  font-size: 11px !important;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.follower-dispatch-v2 .follower-hero-card .follower-ability-slot span span:last-child {
  font-size: 10px !important;
}

.follower-dispatch-v2 .follower-card-progression {
  min-width: 0;
}

.follower-dispatch-v2 .follower-card-progression > div:first-child {
  margin-bottom: 3px !important;
  font-size: 11px !important;
}

.follower-dispatch-v2 .follower-card-progression > .follower-rank-meter,
.follower-dispatch-v2 .follower-card-progression > .follower-readiness-meter,
.follower-dispatch-v2 .follower-card-progression > .follower-ability-tip {
  display: none !important;
}

.follower-dispatch-v2 .follower-readiness-segments {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 2px;
  width: 100%;
}

.follower-dispatch-v2 .follower-readiness-segment {
  position: relative;
  height: 9px;
  overflow: hidden;
  border: 1px solid rgba(168, 200, 181, 0.24);
  border-radius: 2px;
  background: rgba(3, 8, 17, 0.78);
}

.follower-dispatch-v2 .follower-readiness-segment__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6ee7b7, #d9b881);
  box-shadow: 0 0 7px rgba(110, 231, 183, 0.28);
}

.follower-dispatch-v2 .follower-card-actions {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)) !important;
  gap: 5px !important;
  margin-top: 0 !important;
}

.follower-dispatch-v2 .follower-card-action {
  min-height: 31px !important;
  padding: 4px 9px !important;
  font-size: 11px !important;
}

.follower-dispatch-v2 .follower-card-action.is-max-rank {
  display: none !important;
}

.follower-dispatch-v2 .follower-dispatch-route-header {
  min-height: 27px;
  margin-bottom: 5px !important;
  padding-bottom: 5px !important;
}

.follower-dispatch-v2 .follower-dispatch-route-header > div:first-child {
  display: none !important;
}

.follower-dispatch-v2 .follower-dispatch-route-header > div:last-child {
  width: 100%;
  justify-content: flex-end;
}

.follower-dispatch-v2 .follower-dispatch-route-header button {
  min-height: 27px;
  padding: 4px 9px;
  font-size: 10px !important;
}

.follower-dispatch-v2 .follower-dispatch-board > section:nth-child(2) > .follower-result-note {
  display: none !important;
}

.follower-dispatch-v2 .follower-expedition-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px !important;
}

.follower-dispatch-v2 .follower-expedition-card {
  min-height: 108px !important;
  height: 108px;
}

.follower-dispatch-v2 .follower-expedition-card > div {
  padding: 7px !important;
}

.follower-dispatch-v2 .follower-expedition-card .font-serif.text-base {
  font-size: 14px !important;
}

.follower-dispatch-v2 .follower-expedition-card .mt-1.text-\[10px\] {
  font-size: 11px !important;
}

.follower-dispatch-v2 .follower-expedition-card .grid {
  gap: 2px 5px !important;
  font-size: 11px !important;
}

.follower-dispatch-v2 .follower-expedition-card.is-mercenary-blocked .grid > .col-span-2 {
  display: none;
}

.follower-dispatch-v2 .follower-command-rail {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden !important;
}

.follower-dispatch-v2 .follower-command-summary {
  margin-bottom: 9px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(217, 184, 129, 0.14);
}

.follower-dispatch-v2 .follower-command-summary__identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.follower-dispatch-v2 .follower-command-summary__identity > img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(217, 184, 129, 0.32);
  border-radius: 4px;
  object-fit: cover;
}

.follower-dispatch-v2 .follower-command-summary__eyebrow {
  color: var(--color-celestial-gold);
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.follower-dispatch-v2 .follower-command-summary__name {
  margin-top: 4px;
  overflow: hidden;
  color: var(--color-parchment);
  font: 800 15px/1.05 var(--font-serif, inherit);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.follower-dispatch-v2 .follower-command-summary__meta {
  margin-top: 4px;
  color: var(--color-lavender-grey);
  font: 700 9px/1.2 var(--font-ui, inherit);
  text-transform: uppercase;
}

.follower-dispatch-v2 .follower-command-summary__readiness {
  margin-top: 8px;
}

.follower-dispatch-v2 .follower-command-summary__readiness > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  color: var(--color-lavender-grey);
  font-size: 10px;
}

.follower-dispatch-v2 .follower-command-summary__readiness strong {
  color: var(--color-celestial-gold);
}

.follower-dispatch-v2 .follower-command-summary__abilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-top: 8px;
}

.follower-dispatch-v2 .follower-command-summary__abilities .follower-ability-slot {
  min-height: 43px;
  gap: 5px !important;
  padding: 4px !important;
}

.follower-dispatch-v2 .follower-command-summary__abilities .follower-ability-slot > span:first-child {
  width: 30px !important;
  height: 30px !important;
}

.follower-dispatch-v2 .follower-command-summary__abilities .follower-ability-slot img {
  width: 27px !important;
  height: 27px !important;
}

.follower-dispatch-v2 .follower-command-summary__abilities .follower-ability-slot span span {
  font-size: 9px !important;
}

.follower-dispatch-v2 .follower-command-summary__action {
  width: 100%;
  min-height: 30px;
  margin-top: 7px;
  font-size: 10px !important;
}

.follower-dispatch-v2 .follower-queue-header {
  margin-bottom: 7px !important;
  padding-bottom: 6px !important;
}

.follower-dispatch-v2 .follower-queue-card {
  padding: 8px !important;
}

.follower-dispatch-v2 .follower-command-rail > .space-y-2 {
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.follower-dispatch-v2 .follower-queue-step {
  padding: 3px 7px !important;
}

.follower-dispatch-v2 .follower-queue-step .follower-queue-progress {
  height: 6px !important;
  margin-top: 3px !important;
}

.follower-dispatch-v2 .follower-queue-step .font-serif.text-xs {
  font-size: 12px !important;
}

.follower-dispatch-v2 .follower-queue-card > .flex .text-\[10px\],
.follower-dispatch-v2 .follower-queue-step .text-\[10px\],
.follower-dispatch-v2 .follower-queue-card > .flex button {
  font-size: 11px !important;
}

.follower-dispatch-v2 .follower-queue-header .text-\[10px\] {
  font-size: 11px !important;
}

@media (min-width: 1360px) {
  .follower-dispatch-v2 .follower-dispatch-board {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 360px) !important;
    grid-template-rows: auto auto;
  }

  .follower-dispatch-v2 .follower-dispatch-board > section:first-child {
    grid-column: 1;
    grid-row: 1;
    padding: 6px !important;
  }

  .follower-dispatch-v2 .follower-dispatch-board > section:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 7px !important;
  }

  .follower-dispatch-v2 .follower-dispatch-board > section:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
    height: 568px;
    max-height: 568px;
    padding: 8px !important;
    overflow-y: auto;
  }

  .follower-dispatch-v2 .follower-roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .follower-dispatch-v2 .follower-expedition-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .follower-dispatch-v2 .follower-roster-grid,
  .follower-dispatch-v2 .follower-expedition-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .follower-dispatch-v2 .follower-hero-card {
    min-height: 188px !important;
    height: 188px;
  }

  .follower-dispatch-v2 .follower-hero-card__content {
    min-height: 188px !important;
    height: 188px;
  }
}

/* Frontier scenic route steps. Roll back with FRONTIER_SCENIC_STEPS_ENABLED in GameView. */
.frontier-scenic-steps {
  --frontier-step-accent: #c9e8f7;
  --frontier-step-mid: #52728c;
  --frontier-step-deep: #0b1c2b;
  --frontier-step-route: #b9ddec;
  --frontier-step-glow: rgba(137, 206, 237, 0.42);
}

.frontier-scenic-steps.frontier-region-expedition--gloamwell_march {
  --frontier-step-accent: #c8efff;
  --frontier-step-mid: #547e9b;
  --frontier-step-deep: #0a2031;
  --frontier-step-route: #b8e4f6;
  --frontier-step-glow: rgba(130, 213, 255, 0.44);
}

.frontier-scenic-steps.frontier-region-expedition--briarwake_bastion {
  --frontier-step-accent: #e1d493;
  --frontier-step-mid: #667b46;
  --frontier-step-deep: #162418;
  --frontier-step-route: #c8bd78;
  --frontier-step-glow: rgba(183, 198, 102, 0.4);
}

.frontier-scenic-steps.frontier-region-expedition--ashglass_reliquary {
  --frontier-step-accent: #ffc072;
  --frontier-step-mid: #a44c2b;
  --frontier-step-deep: #260d0a;
  --frontier-step-route: #e68a4c;
  --frontier-step-glow: rgba(255, 123, 65, 0.44);
}

.frontier-scenic-steps.frontier-region-expedition--drowned_star_strand {
  --frontier-step-accent: #a8f1e7;
  --frontier-step-mid: #337986;
  --frontier-step-deep: #071f2b;
  --frontier-step-route: #86d9d0;
  --frontier-step-glow: rgba(93, 224, 214, 0.42);
}

.frontier-scenic-steps.frontier-region-expedition--cinderwyrm_aerie {
  --frontier-step-accent: #ffc06b;
  --frontier-step-mid: #a64327;
  --frontier-step-deep: #2a0b07;
  --frontier-step-route: #f08b45;
  --frontier-step-glow: rgba(255, 103, 47, 0.46);
}

.frontier-scenic-steps.frontier-region-expedition--crownless_meridian {
  --frontier-step-accent: #d9bdff;
  --frontier-step-mid: #6749a6;
  --frontier-step-deep: #170d30;
  --frontier-step-route: #b99ae9;
  --frontier-step-glow: rgba(164, 117, 244, 0.46);
}

.frontier-scenic-steps.frontier-region-expedition--stormglass_expanse { --frontier-step-accent: #a8e9ff; --frontier-step-mid: #2c6f9d; --frontier-step-deep: #071728; --frontier-step-route: #74cce9; --frontier-step-glow: rgba(76, 188, 242, 0.5); }
.frontier-scenic-steps.frontier-region-expedition--bloodroot_orchard { --frontier-step-accent: #ffb09a; --frontier-step-mid: #8d2d31; --frontier-step-deep: #26070d; --frontier-step-route: #db6255; --frontier-step-glow: rgba(221, 64, 62, 0.46); }
.frontier-scenic-steps.frontier-region-expedition--ironveil_foundry { --frontier-step-accent: #ffd07d; --frontier-step-mid: #8c5a32; --frontier-step-deep: #21140d; --frontier-step-route: #d59450; --frontier-step-glow: rgba(234, 142, 57, 0.46); }
.frontier-scenic-steps.frontier-region-expedition--pale_ossuary { --frontier-step-accent: #f2ead8; --frontier-step-mid: #8e8a87; --frontier-step-deep: #24242a; --frontier-step-route: #d0c5b2; --frontier-step-glow: rgba(224, 219, 210, 0.38); }
.frontier-scenic-steps.frontier-region-expedition--nightbloom_mire { --frontier-step-accent: #d6a8ff; --frontier-step-mid: #65438c; --frontier-step-deep: #14102b; --frontier-step-route: #a982dc; --frontier-step-glow: rgba(167, 104, 237, 0.48); }
.frontier-scenic-steps.frontier-region-expedition--sunken_bell_hollow { --frontier-step-accent: #bde8dd; --frontier-step-mid: #557f78; --frontier-step-deep: #0b2527; --frontier-step-route: #ba9b5e; --frontier-step-glow: rgba(91, 194, 184, 0.42); }
.frontier-scenic-steps.frontier-region-expedition--shardfall_crater { --frontier-step-accent: #e0b5ff; --frontier-step-mid: #7444a1; --frontier-step-deep: #1b0a32; --frontier-step-route: #bd81ed; --frontier-step-glow: rgba(178, 91, 241, 0.5); }
.frontier-scenic-steps.frontier-region-expedition--umbral_menagerie { --frontier-step-accent: #e59bb9; --frontier-step-mid: #703452; --frontier-step-deep: #180915; --frontier-step-route: #ad6683; --frontier-step-glow: rgba(201, 75, 132, 0.44); }
.frontier-scenic-steps.frontier-region-expedition--dawnscar_monastery { --frontier-step-accent: #ffe0a3; --frontier-step-mid: #9b6435; --frontier-step-deep: #25130d; --frontier-step-route: #dda45e; --frontier-step-glow: rgba(242, 166, 76, 0.46); }
.frontier-scenic-steps.frontier-region-expedition--chainfrost_chasm { --frontier-step-accent: #d9f5ff; --frontier-step-mid: #668dab; --frontier-step-deep: #0b1d31; --frontier-step-route: #a9dbed; --frontier-step-glow: rgba(133, 213, 244, 0.46); }

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-field {
  position: absolute !important;
  inset: 32px 18px 96px !important;
  display: block !important;
  z-index: 10 !important;
  width: auto !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
  grid-template-columns: none !important;
  gap: 0 !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-field::before,
.frontier-scenic-steps.frontier-page-shell--open .frontier-route-field::after {
  content: none !important;
  display: none !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-field > svg {
  display: block !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node {
  position: absolute !important;
  left: calc(var(--frontier-node-left) - var(--frontier-node-half)) !important;
  top: calc(var(--frontier-node-top) - var(--frontier-node-half)) !important;
  width: var(--frontier-node-size) !important;
  min-width: var(--frontier-node-size) !important;
  max-width: var(--frontier-node-size) !important;
  height: var(--frontier-node-size) !important;
  min-height: var(--frontier-node-size) !important;
  max-height: var(--frontier-node-size) !important;
  aspect-ratio: 1 / 1 !important;
  flex: 0 0 var(--frontier-node-size) !important;
  place-self: auto;
}

.frontier-scenic-steps .frontier-stage-rail svg[aria-label="Frontier Route"] path {
  stroke-linecap: round !important;
  vector-effect: non-scaling-stroke;
}

.frontier-scenic-steps .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-shadow {
  stroke: rgba(0, 0, 0, 0.88) !important;
  stroke-width: 1.3 !important;
  stroke-dasharray: 0.01 2.25 !important;
  opacity: 0.76 !important;
}

.frontier-scenic-steps .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-full,
.frontier-scenic-steps .frontier-board-road--main {
  stroke: var(--frontier-step-route) !important;
  stroke-width: 0.62 !important;
  stroke-dasharray: 0.01 2.25 !important;
  opacity: 0.72 !important;
  filter: drop-shadow(0 0 4px var(--frontier-step-glow));
}

.frontier-scenic-steps .frontier-stage-rail svg[aria-label="Frontier Route"] .frontier-route-progress {
  stroke: color-mix(in srgb, var(--frontier-step-accent) 86%, #fff4c7) !important;
  stroke-width: 0.86 !important;
  stroke-dasharray: 0.01 2.25 !important;
  opacity: 0.98 !important;
  filter: drop-shadow(0 0 7px var(--frontier-step-glow)) !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) {
  --frontier-step-scale: 1;
  --frontier-step-tilt: 0deg;
  --frontier-step-counter: 0deg;
  isolation: isolate;
  overflow: hidden !important;
  border: 2px solid color-mix(in srgb, var(--frontier-step-accent) 72%, #342819) !important;
  border-radius: 44% 56% 48% 52% !important;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--frontier-step-accent) 52%, #ffffff) 0 9%, transparent 34%),
    radial-gradient(circle at 42% 34%, var(--frontier-step-accent), var(--frontier-step-mid) 48%, var(--frontier-step-deep) 100%) !important;
  color: #fff3c9 !important;
  box-shadow:
    0 3px 0 color-mix(in srgb, var(--frontier-step-deep) 88%, #000000),
    0 7px 12px rgba(0, 0, 0, 0.44),
    0 0 12px color-mix(in srgb, var(--frontier-step-glow) 70%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    inset 0 -5px 9px rgba(0, 0, 0, 0.3) !important;
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--frontier-step-accent) 22%, transparent));
  transform: rotate(var(--frontier-step-tilt)) scale(var(--frontier-step-scale)) !important;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss).frontier-route-node--step-1 {
  --frontier-step-tilt: 0deg;
  --frontier-step-counter: 0deg;
  border-radius: 50% 42% 54% 45% !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss).frontier-route-node--step-2 {
  --frontier-step-tilt: 0deg;
  --frontier-step-counter: 0deg;
  border-radius: 34% 56% 39% 52% !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss).frontier-route-node--step-3 {
  --frontier-step-tilt: 0deg;
  --frontier-step-counter: 0deg;
  border-radius: 23% 45% 31% 49% !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss).frontier-route-node--step-4 {
  --frontier-step-tilt: 0deg;
  --frontier-step-counter: 0deg;
  border-radius: 43% 28% 46% 32% !important;
}

.frontier-scenic-steps.frontier-region-expedition--briarwake_bastion .frontier-route-node:not(.frontier-route-node--boss) {
  border-style: double !important;
  border-width: 3px !important;
  background:
    repeating-radial-gradient(ellipse at 48% 45%, transparent 0 5px, rgba(238, 222, 150, 0.12) 6px 7px),
    radial-gradient(circle at 42% 34%, var(--frontier-step-accent), var(--frontier-step-mid) 52%, var(--frontier-step-deep) 100%) !important;
}

.frontier-scenic-steps.frontier-region-expedition--ashglass_reliquary .frontier-route-node--step-1,
.frontier-scenic-steps.frontier-region-expedition--ashglass_reliquary .frontier-route-node--step-3 {
  clip-path: polygon(50% 0, 92% 22%, 100% 68%, 66% 100%, 13% 86%, 0 35%);
  border-radius: 0 !important;
}

.frontier-scenic-steps.frontier-region-expedition--ashglass_reliquary .frontier-route-node--step-2,
.frontier-scenic-steps.frontier-region-expedition--ashglass_reliquary .frontier-route-node--step-4 {
  clip-path: polygon(31% 0, 88% 11%, 100% 55%, 78% 100%, 18% 91%, 0 42%);
  border-radius: 0 !important;
}

.frontier-scenic-steps.frontier-region-expedition--drowned_star_strand .frontier-route-node:not(.frontier-route-node--boss) {
  border-radius: 52% 48% 46% 54% !important;
  background:
    radial-gradient(ellipse at 38% 28%, rgba(255, 255, 255, 0.78), transparent 20%),
    radial-gradient(circle at 50% 50%, var(--frontier-step-accent), var(--frontier-step-mid) 55%, var(--frontier-step-deep) 100%) !important;
}

.frontier-scenic-steps.frontier-region-expedition--cinderwyrm_aerie .frontier-route-node:not(.frontier-route-node--boss) {
  border-radius: 18% 31% 16% 27% !important;
  background:
    linear-gradient(118deg, transparent 43%, color-mix(in srgb, var(--frontier-step-accent) 72%, #ff4d20) 45% 49%, transparent 51%),
    radial-gradient(circle at 42% 34%, var(--frontier-step-accent), var(--frontier-step-mid) 45%, var(--frontier-step-deep) 100%) !important;
}

.frontier-scenic-steps.frontier-region-expedition--crownless_meridian .frontier-route-node:not(.frontier-route-node--boss).frontier-route-node--step-1,
.frontier-scenic-steps.frontier-region-expedition--crownless_meridian .frontier-route-node:not(.frontier-route-node--boss).frontier-route-node--step-3 {
  --frontier-step-tilt: 0deg;
  --frontier-step-counter: 0deg;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  border-radius: 0 !important;
}

.frontier-scenic-steps.frontier-region-expedition--crownless_meridian .frontier-route-node:not(.frontier-route-node--boss).frontier-route-node--step-2,
.frontier-scenic-steps.frontier-region-expedition--crownless_meridian .frontier-route-node:not(.frontier-route-node--boss).frontier-route-node--step-4 {
  --frontier-step-tilt: 0deg;
  --frontier-step-counter: 0deg;
  clip-path: polygon(50% 3%, 97% 50%, 50% 97%, 3% 50%);
  border-radius: 0 !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss)::before {
  content: "" !important;
  position: absolute !important;
  inset: 3px !important;
  border: 1px solid color-mix(in srgb, var(--frontier-step-accent) 42%, transparent) !important;
  border-radius: inherit !important;
  background: radial-gradient(circle at 45% 38%, rgba(255, 255, 255, 0.13), transparent 58%) !important;
  transform: none !important;
  pointer-events: none;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss)::after {
  content: none !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) > .frontier-route-node__pip,
.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) > .frontier-route-node__mark {
  display: none !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss) > .frontier-route-node__number {
  position: relative !important;
  inset: auto !important;
  display: grid !important;
  width: auto !important;
  min-width: 0 !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 0 !important;
  place-items: center;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #fff6d5 !important;
  font: 950 clamp(0.63rem, 0.68vw, 0.82rem)/1 var(--font-serif, serif) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.94), 0 0 7px var(--frontier-step-glow) !important;
  transform: rotate(var(--frontier-step-counter)) !important;
  pointer-events: none;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--milestone:not(.frontier-route-node--boss) {
  border-width: 3px !important;
  filter: drop-shadow(0 0 7px var(--frontier-step-glow));
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--milestone:not(.frontier-route-node--boss)::before {
  inset: 5px !important;
  border-style: double !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--locked:not(.frontier-route-node--boss) {
  opacity: 0.5 !important;
  filter: grayscale(0.62) saturate(0.45) brightness(0.7);
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--cleared:not(.frontier-route-node--boss) {
  opacity: 0.86 !important;
  border-color: color-mix(in srgb, var(--frontier-step-accent) 58%, #8bcf9d) !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--cleared:not(.frontier-route-node--boss)::after {
  content: "\2713" !important;
  position: absolute !important;
  z-index: 4;
  top: 2px !important;
  right: 2px !important;
  left: auto !important;
  display: grid !important;
  width: 10px !important;
  height: 10px !important;
  place-items: center;
  border: 1px solid rgba(228, 255, 226, 0.56) !important;
  border-radius: 999px !important;
  background: #173a28 !important;
  color: #caffd7 !important;
  font: 900 7px/1 var(--font-ui, sans-serif) !important;
  box-shadow: 0 0 7px rgba(102, 239, 151, 0.44) !important;
  transform: rotate(var(--frontier-step-counter)) !important;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--available:not(.frontier-route-node--boss),
.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--selected:not(.frontier-route-node--boss) {
  border-color: color-mix(in srgb, var(--frontier-step-accent) 76%, #fff4ba) !important;
  filter: brightness(1.12) drop-shadow(0 0 8px var(--frontier-step-glow));
  animation: frontierScenicStepPulse 2.5s ease-in-out infinite;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--selected:not(.frontier-route-node--boss) {
  --frontier-step-scale: 1;
  z-index: 20;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node:not(.frontier-route-node--boss):hover:not(:disabled) {
  --frontier-step-scale: 1;
  z-index: 21;
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--selected:not(.frontier-route-node--boss):hover:not(:disabled) {
  --frontier-step-scale: 1;
}

@media (min-width: 1181px) {
  .frontier-scenic-steps.frontier-page-shell--open .frontier-route-field {
    inset: 42px 30px 116px !important;
  }
}

@media (max-width: 760px) {
  .frontier-scenic-steps.frontier-page-shell--open .frontier-route-field {
    inset: 24px 12px 84px !important;
  }
}

.frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--boss {
  border: 3px solid color-mix(in srgb, var(--frontier-step-accent) 58%, #ff8761) !important;
  border-radius: 46% !important;
  box-shadow:
    0 0 0 4px rgba(0, 0, 0, 0.56),
    0 0 0 7px color-mix(in srgb, var(--frontier-step-accent) 20%, transparent),
    0 0 30px color-mix(in srgb, var(--frontier-step-glow) 78%, rgba(255, 82, 52, 0.24)),
    inset 0 0 16px rgba(255, 228, 183, 0.18) !important;
}

@keyframes frontierScenicStepPulse {
  0%,
  100% {
    box-shadow:
      0 3px 0 color-mix(in srgb, var(--frontier-step-deep) 88%, #000000),
      0 7px 12px rgba(0, 0, 0, 0.44),
      0 0 10px color-mix(in srgb, var(--frontier-step-glow) 58%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      inset 0 -5px 9px rgba(0, 0, 0, 0.3);
  }
  50% {
    box-shadow:
      0 3px 0 color-mix(in srgb, var(--frontier-step-deep) 88%, #000000),
      0 7px 14px rgba(0, 0, 0, 0.5),
      0 0 20px var(--frontier-step-glow),
      inset 0 1px 0 rgba(255, 255, 255, 0.38),
      inset 0 -5px 9px rgba(0, 0, 0, 0.3);
  }
}

@media (prefers-reduced-motion: reduce) {
  .frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--available:not(.frontier-route-node--boss),
  .frontier-scenic-steps.frontier-page-shell--open .frontier-route-node--selected:not(.frontier-route-node--boss) {
    animation: none;
  }
}

/* Frontier round-marker physical EOF guard. */
.frontier-scenic-steps.frontier-page-shell--open.frontier-region-expedition .frontier-route-node:not(.frontier-route-node--boss),
.frontier-scenic-steps.frontier-page-shell--open.frontier-region-expedition .frontier-route-node:not(.frontier-route-node--boss)::before,
.frontier-scenic-steps.frontier-page-shell--open.frontier-region-expedition .frontier-route-node--boss,
.frontier-scenic-steps.frontier-page-shell--open.frontier-region-expedition .frontier-route-node--boss > .frontier-route-node__portrait {
  border-radius: 50% !important;
  clip-path: none !important;
  transform: none !important;
}

/* Notes3: keep the Sweep rules visible without flattening the copy into the offer grid. */
.frontier-region-expedition.frontier-page-shell--open
  .frontier-command-offer--sweep
  .frontier-command-offer__copy {
  display: block !important;
  grid-column: 2 !important;
  grid-row: 1 / span 2 !important;
  align-self: start !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open
  .frontier-command-offer--sweep
  .frontier-command-offer__desc {
  display: block !important;
  width: auto !important;
  margin-top: 0.28rem !important;
  font-size: 0.68rem !important;
  line-height: 1.35 !important;
}

/* Notes4: Spire controls, embedded combat, and foreground-only combat motion. */
.spire-tab [data-help]::before,
.spire-tab [data-help]::after,
.spire-status[data-help]::before,
.spire-status[data-help]::after {
  content: none !important;
  display: none !important;
}

.spire-auto-advance {
  min-height: 2.35rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(184, 155, 104, 0.42);
  border-radius: 0.3rem;
  background: linear-gradient(180deg, rgba(23, 25, 39, 0.92), rgba(7, 10, 19, 0.96));
  color: rgba(229, 219, 194, 0.82);
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.spire-auto-advance:hover,
.spire-auto-advance:focus-visible {
  border-color: rgba(232, 199, 130, 0.72);
  color: var(--color-parchment);
}

.spire-auto-advance b {
  min-width: 2rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid rgba(151, 140, 171, 0.34);
  border-radius: 999px;
  background: rgba(4, 7, 13, 0.72);
  color: rgba(177, 165, 194, 0.72);
  text-align: center;
}

.spire-auto-advance.is-active {
  border-color: rgba(116, 211, 158, 0.58);
  box-shadow: inset 0 0 18px rgba(37, 126, 91, 0.14), 0 0 18px rgba(57, 180, 122, 0.08);
  color: rgba(204, 247, 220, 0.94);
}

.spire-auto-advance.is-active b {
  border-color: rgba(116, 211, 158, 0.54);
  background: rgba(21, 85, 60, 0.46);
  color: #9ff2bd;
}

.spire-tarot-gate {
  width: 100%;
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(214, 174, 91, 0.52);
  border-left: 3px solid rgba(232, 196, 119, 0.88);
  border-radius: 0.25rem;
  background: linear-gradient(90deg, rgba(101, 68, 28, 0.28), rgba(42, 22, 61, 0.18));
  color: rgba(247, 225, 174, 0.94);
  text-align: left;
}

.spire-tarot-gate b {
  font: 800 0.7rem/1.2 var(--font-ui, system-ui, sans-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spire-tarot-gate span {
  color: rgba(219, 207, 185, 0.76);
  font: 600 0.72rem/1.3 var(--font-body, system-ui, sans-serif);
}

.spire-tarot-gate:hover,
.spire-tarot-gate:focus-visible {
  border-color: rgba(241, 206, 135, 0.82);
  background: linear-gradient(90deg, rgba(114, 77, 31, 0.36), rgba(53, 27, 76, 0.25));
}

.spire-tarot-panel--required {
  animation: notes4TarotRequired 720ms ease-out;
}

@keyframes notes4TarotRequired {
  0%, 100% { box-shadow: inherit; }
  45% { box-shadow: 0 0 0 2px rgba(235, 198, 120, 0.5), 0 0 32px rgba(182, 108, 207, 0.28); }
}

.spire-live-combat-panel {
  min-height: clamp(820px, calc(100vh - 72px), 1060px) !important;
  height: auto !important;
  margin-top: 0.9rem;
  overflow: visible !important;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(191, 145, 227, 0.08);
}

.spire-live-combat-panel > div:first-child,
.spire-live-combat-panel .combat-screen-root--embedded,
.spire-live-combat-panel .combat-screen-layout,
.spire-live-combat-panel .combat-screen-field-column,
.spire-live-combat-panel .combat-screen-fight-card {
  min-height: 100%;
  height: auto;
  overflow: visible !important;
}

.spire-live-combat-panel .combat-screen-feed-dock {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.spire-live-combat-panel .combat-screen-info-body {
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (min-width: 1024px) {
  .spire-live-combat-panel .combat-screen-layout,
  .spire-live-combat-panel .combat-screen-fight-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) !important;
    grid-template-rows: minmax(420px, 1fr) minmax(300px, auto) !important;
    gap: 0.75rem !important;
    min-height: inherit !important;
  }

  .spire-live-combat-panel .combat-screen-fight-card {
    position: relative !important;
  }

  .spire-live-combat-panel .combat-screen-field-column {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    width: 100%;
  }

  .spire-live-combat-panel .combat-stage-shell {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 420px !important;
    height: auto !important;
  }

  .spire-live-combat-panel .combat-screen-hud-dock {
    grid-column: 1;
    grid-row: 2;
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    min-height: 300px;
  }

  .spire-live-combat-panel .combat-screen-feed-dock {
    grid-column: 2;
    grid-row: 2;
    position: absolute;
    inset: auto 0 var(--tower-combat-info-bottom, 0px) auto;
    top: var(--tower-combat-info-top, calc(420px + 0.75rem));
    z-index: 70;
    width: min(520px, 100%);
    align-self: start;
    height: auto;
    min-height: 140px;
    max-height: none;
    margin-top: 0;
    overflow: hidden;
  }
}

/* Notes4: compact Tower run report, closed until requested. */
.tower-damage-disclosure {
  display: block !important;
  grid-template-columns: none !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: hidden;
  padding: 0 !important;
}

.tower-damage-disclosure__toggle {
  display: flex !important;
  width: 100%;
  max-width: none !important;
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.8rem;
  background: linear-gradient(90deg, rgba(14, 17, 28, 0.82), rgba(7, 10, 18, 0.54));
  color: var(--color-parchment);
  text-align: left;
}

.tower-damage-disclosure__toggle > span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.tower-damage-disclosure__toggle b,
.tower-damage-disclosure__toggle strong {
  font: 800 0.74rem/1.2 var(--font-ui, system-ui, sans-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tower-damage-disclosure__toggle small {
  color: rgba(184, 174, 158, 0.64);
  font: 600 0.62rem/1.2 var(--font-body, system-ui, sans-serif);
}

.tower-damage-disclosure__toggle:hover,
.tower-damage-disclosure__toggle:focus-visible {
  background: linear-gradient(90deg, rgba(37, 31, 38, 0.88), rgba(11, 14, 23, 0.68));
}

.tower-damage-disclosure__body {
  width: 100%;
  padding: 0.7rem 0.8rem 0.8rem;
  border-top: 1px solid rgba(205, 176, 116, 0.16);
  background: rgba(3, 6, 12, 0.42);
}

/* Notes4: keep material sources usable when their list is taller than the viewport. */
.crafting-material-source-popover {
  scrollbar-gutter: stable;
  outline: none;
}

.crafting-material-source-popover:hover,
.crafting-material-source-popover:focus-visible {
  border-color: rgba(214, 180, 113, 0.66) !important;
}

/* Notes4: the Logs screen reads as a ledger, not a pile of rounded cards. */
.logs-ledger {
  border-color: rgba(192, 158, 96, 0.22) !important;
  border-radius: 0.2rem !important;
  background:
    linear-gradient(90deg, rgba(184, 139, 72, 0.035) 1px, transparent 1px),
    rgba(4, 7, 13, 0.7) !important;
  background-size: 28px 100%, auto !important;
  box-shadow: inset 3px 0 0 rgba(184, 139, 72, 0.25);
}

.logs-ledger .combat-log-entry {
  margin-left: 0.3rem;
  padding: 0.48rem 0.65rem !important;
  border-width: 0 0 1px 2px !important;
  border-radius: 0.08rem !important;
  border-bottom-color: rgba(190, 164, 118, 0.1) !important;
  background-color: rgba(6, 9, 16, 0.42) !important;
  box-shadow: none !important;
}

.logs-ledger .combat-log-entry:hover {
  background-color: rgba(25, 24, 33, 0.72) !important;
}

@media (max-width: 760px) {
  .spire-panel__header--actions,
  .spire-tarot-gate {
    align-items: stretch;
    flex-direction: column;
  }

  .spire-actions {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .combat-screen-fight-grid.animate-shake,
  .spire-tarot-panel--required {
    animation: none !important;
  }
}

/* Player-card Combat Automation command and foreground panel. */
.scc2-combat-automation-button {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 6;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(217, 184, 129, 0.62);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 231, 168, 0.2), transparent 55%),
    linear-gradient(150deg, rgba(32, 25, 31, 0.98), rgba(5, 10, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 205, 0.18),
    0 7px 18px rgba(0, 0, 0, 0.66),
    0 0 14px rgba(217, 184, 129, 0.22);
  color: #ffe7a8;
  cursor: var(--vespera-cursor-pointer);
  font: 900 9px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px rgba(217, 184, 129, 0.58);
  transition: border-color 150ms ease, box-shadow 150ms ease, color 150ms ease, transform 150ms ease;
}

.scc2-combat-automation-button:hover,
.scc2-combat-automation-button:focus-visible,
.scc2-combat-automation-button.is-open {
  border-color: rgba(255, 224, 145, 0.95);
  box-shadow:
    inset 0 1px 0 rgba(255, 249, 220, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.72),
    0 0 20px rgba(217, 184, 129, 0.42);
  color: #fff4cf;
  outline: none;
  transform: translateY(-1px);
}

.scc2-combat-automation-button.is-auto-combat-on,
.scc2-combat-automation-button.is-auto-combat-on:hover,
.scc2-combat-automation-button.is-auto-combat-on:focus-visible,
.scc2-combat-automation-button.is-auto-combat-on.is-open {
  border-color: rgba(74, 222, 128, 0.96);
  background:
    radial-gradient(circle at 50% 18%, rgba(134, 239, 172, 0.26), transparent 58%),
    linear-gradient(150deg, rgba(13, 54, 39, 0.98), rgba(3, 20, 15, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 231, 0.22),
    0 7px 18px rgba(0, 0, 0, 0.66),
    0 0 8px rgba(74, 222, 128, 0.9),
    0 0 20px rgba(34, 197, 94, 0.48);
  color: #bbf7d0;
  text-shadow: 0 0 9px rgba(74, 222, 128, 0.86);
}

.combat-automation-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 8px 12px 12px 238px;
  background: transparent;
}

.combat-automation-popover {
  position: relative;
  display: flex;
  width: min(820px, calc(100vw - 250px));
  max-height: calc(100dvh - 20px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(217, 184, 129, 0.5);
  border-radius: 12px;
  background:
    radial-gradient(circle at 82% 4%, rgba(217, 184, 129, 0.1), transparent 32%),
    linear-gradient(145deg, rgba(7, 17, 32, 0.99), rgba(4, 10, 20, 0.99));
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 205, 0.1),
    inset 0 0 0 1px rgba(82, 111, 146, 0.1),
    0 28px 90px rgba(0, 0, 0, 0.82),
    0 0 32px rgba(217, 184, 129, 0.14);
  color: var(--color-parchment);
}

.combat-automation-popover::before {
  content: "";
  position: absolute;
  top: 0;
  right: 10%;
  left: 10%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 223, 148, 0.82), transparent);
}

.combat-automation-popover__header,
.combat-automation-popover__footer {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: rgba(217, 184, 129, 0.2);
  background: rgba(2, 8, 17, 0.5);
}

.combat-automation-popover__header {
  padding: 17px 19px 14px;
  border-bottom-width: 1px;
}

.combat-automation-popover__eyebrow {
  color: rgba(217, 184, 129, 0.78);
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.combat-automation-popover__header h2 {
  margin-top: 5px;
  color: #f6ebcf;
  font: 800 italic 24px/1.05 var(--font-serif, serif);
  letter-spacing: 0.025em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
}

.combat-automation-popover__x {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid rgba(217, 184, 129, 0.34);
  border-radius: 7px;
  background: rgba(4, 11, 21, 0.82);
  color: rgba(239, 231, 208, 0.78);
  cursor: var(--vespera-cursor-pointer);
  font: 400 22px/1 var(--font-ui, inherit);
  transition: 150ms ease;
}

.combat-automation-popover__x:hover,
.combat-automation-popover__x:focus-visible {
  border-color: rgba(255, 224, 145, 0.78);
  background: rgba(217, 184, 129, 0.12);
  color: #fff1c5;
  outline: none;
}

.combat-automation-popover__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 19px 20px;
  overscroll-behavior: contain;
}

.combat-automation-popover__body > p {
  margin: 0 0 15px;
  color: rgba(184, 198, 219, 0.72);
  font: 500 12px/1.55 var(--font-body, inherit);
}

.combat-automation-popover .combat-automation-dock {
  display: grid;
  grid-template-columns: minmax(205px, 1.35fr) minmax(165px, 0.9fr) repeat(2, minmax(145px, 1fr));
  align-items: stretch;
  justify-content: stretch;
  gap: 10px;
}

.combat-automation-popover .combat-auto-utility-slot--wide,
.combat-automation-popover .combat-auto-toggle-card,
.combat-automation-popover .combat-auto-control {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.combat-automation-popover .auto-ability-chip {
  width: 100%;
}

.combat-automation-popover__footer {
  padding: 11px 19px;
  border-top-width: 1px;
}

.combat-automation-popover__footer > span {
  color: rgba(184, 198, 219, 0.62);
  font: 700 10px/1.2 var(--font-ui, inherit);
  letter-spacing: 0.05em;
}

.combat-automation-popover__done {
  min-width: 94px;
  min-height: 34px;
  padding: 7px 18px;
  border: 1px solid rgba(255, 221, 141, 0.68);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(185, 139, 59, 0.92), rgba(112, 76, 28, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 211, 0.24),
    0 7px 18px rgba(0, 0, 0, 0.35);
  color: #fff3cf;
  cursor: var(--vespera-cursor-pointer);
  font: 900 11px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: 150ms ease;
}

.combat-automation-popover__done:hover,
.combat-automation-popover__done:focus-visible {
  border-color: #ffe5a1;
  filter: brightness(1.08);
  outline: none;
  transform: translateY(-1px);
}

@media (max-width: 900px) {
  .combat-automation-popover .combat-automation-dock {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .combat-automation-popover-backdrop {
    align-items: flex-start;
    padding: 8px 8px 8px 238px;
    overflow-y: auto;
  }

  .combat-automation-popover {
    width: 100%;
    max-height: calc(100dvh - 16px);
  }

  .combat-automation-popover__header,
  .combat-automation-popover__body,
  .combat-automation-popover__footer {
    padding-right: 13px;
    padding-left: 13px;
  }

  .combat-automation-popover .combat-automation-dock {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  .combat-automation-popover-backdrop {
    padding-left: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scc2-combat-automation-button,
  .combat-automation-popover__done {
    transition: none !important;
  }
}

/* Permanent Damage Report: visible player-card command and deep combat analytics. */
.scc2-damage-report-button {
  position: absolute;
  top: 49px;
  left: 8px;
  z-index: 6;
  display: grid;
  width: 34px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(103, 232, 249, 0.72);
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 0%, rgba(192, 132, 252, 0.42), transparent 68%),
    linear-gradient(145deg, rgba(12, 54, 74, 0.98), rgba(18, 10, 42, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(224, 247, 255, 0.22),
    0 6px 16px rgba(0, 0, 0, 0.68),
    0 0 13px rgba(34, 211, 238, 0.38);
  color: #cffafe;
  cursor: var(--vespera-cursor-pointer);
  font: 950 9px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.12em;
  text-shadow: 0 0 8px rgba(34, 211, 238, 0.85);
  transition: 150ms ease;
}

.scc2-damage-report-button::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 3px;
  left: 5px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #67e8f9 0 30%, #c084fc 30% 62%, #facc15 62%);
  box-shadow: 0 0 7px rgba(103, 232, 249, 0.7);
}

.scc2-damage-report-button:hover,
.scc2-damage-report-button:focus-visible,
.scc2-damage-report-button.is-open {
  border-color: #a5f3fc;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 8px 20px rgba(0, 0, 0, 0.72),
    0 0 20px rgba(34, 211, 238, 0.72),
    0 0 32px rgba(192, 132, 252, 0.28);
  color: #fff;
  outline: none;
  transform: translateY(-1px) scale(1.04);
}

.damage-analytics-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180000;
  display: grid;
  place-items: center;
  padding: 12px;
  background:
    radial-gradient(circle at 50% 2%, rgba(20, 184, 166, 0.12), transparent 36%),
    rgba(0, 4, 11, 0.82);
  backdrop-filter: blur(8px);
}

.damage-analytics-modal {
  position: relative;
  display: flex;
  width: min(1450px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(103, 232, 249, 0.44);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% -8%, rgba(34, 211, 238, 0.12), transparent 29%),
    radial-gradient(circle at 91% 2%, rgba(192, 132, 252, 0.13), transparent 31%),
    linear-gradient(150deg, rgba(5, 16, 29, 0.995), rgba(3, 9, 19, 0.995));
  box-shadow:
    inset 0 1px 0 rgba(224, 247, 255, 0.1),
    inset 0 0 0 1px rgba(217, 184, 129, 0.08),
    0 34px 110px rgba(0, 0, 0, 0.88),
    0 0 48px rgba(34, 211, 238, 0.12);
  color: #e8edf5;
}

.damage-analytics-modal::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  right: 7%;
  left: 7%;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #67e8f9, #c084fc, #facc15, transparent);
  box-shadow: 0 0 16px rgba(103, 232, 249, 0.62);
}

.damage-analytics-header {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px 16px;
  border-bottom: 1px solid rgba(103, 232, 249, 0.16);
  background: rgba(2, 9, 19, 0.75);
}

.damage-analytics-heading > span,
.damage-analytics-section-heading > div > span {
  color: #67e8f9;
  font: 850 9px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.damage-analytics-heading h2 {
  margin: 5px 0 3px;
  color: #fff2c7;
  font: 900 italic clamp(26px, 3vw, 38px)/0.98 var(--font-serif, serif);
  letter-spacing: 0.025em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.8);
}

.damage-analytics-heading p {
  margin: 0;
  color: rgba(196, 211, 232, 0.74);
  font: 600 11px/1.4 var(--font-body, sans-serif);
}

.damage-analytics-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.damage-analytics-trend {
  min-width: 126px;
  padding: 8px 12px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 8px;
  background: rgba(4, 15, 28, 0.75);
  text-align: right;
}

.damage-analytics-trend small {
  display: block;
  margin-bottom: 3px;
  color: rgba(188, 204, 225, 0.66);
  font: 800 8px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.damage-analytics-trend strong {
  font: 900 19px/1 var(--font-ui, sans-serif);
}

.damage-analytics-trend.is-up strong { color: #6ee7b7; }
.damage-analytics-trend.is-down strong { color: #fb7185; }

.damage-analytics-close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border: 1px solid rgba(217, 184, 129, 0.36);
  border-radius: 8px;
  background: rgba(4, 11, 21, 0.88);
  color: #eadfca;
  cursor: var(--vespera-cursor-pointer);
  font: 400 24px/1 var(--font-ui, sans-serif);
  transition: 150ms ease;
}

.damage-analytics-close:hover,
.damage-analytics-close:focus-visible {
  border-color: #ffe29a;
  background: rgba(217, 184, 129, 0.13);
  color: #fff2c7;
  outline: none;
}

.damage-analytics-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 15px 18px 18px;
  scrollbar-color: rgba(103, 232, 249, 0.45) rgba(2, 8, 17, 0.45);
  overscroll-behavior: contain;
}

.damage-analytics-scopes {
  position: sticky;
  z-index: 5;
  top: -15px;
  display: flex;
  gap: 7px;
  margin: -2px 0 13px;
  padding: 7px 0;
  background: linear-gradient(180deg, #06101e 70%, transparent);
}

.damage-analytics-scopes button {
  min-height: 31px;
  padding: 6px 14px;
  border: 1px solid rgba(113, 139, 171, 0.27);
  border-radius: 7px;
  background: rgba(4, 13, 25, 0.82);
  color: rgba(198, 211, 229, 0.72);
  cursor: var(--vespera-cursor-pointer);
  font: 850 9px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.damage-analytics-scopes button:hover,
.damage-analytics-scopes button:focus-visible,
.damage-analytics-scopes button.is-active {
  border-color: rgba(103, 232, 249, 0.72);
  background: linear-gradient(145deg, rgba(10, 54, 68, 0.94), rgba(31, 18, 58, 0.94));
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.18);
  color: #e5fbff;
  outline: none;
}

.damage-analytics-empty {
  display: grid;
  min-height: 280px;
  place-content: center;
  gap: 9px;
  border: 1px dashed rgba(103, 232, 249, 0.27);
  border-radius: 11px;
  background: rgba(5, 14, 26, 0.5);
  text-align: center;
}

.damage-analytics-empty strong {
  color: #fff2c7;
  font: 850 20px/1.15 var(--font-serif, serif);
}

.damage-analytics-empty span {
  color: rgba(188, 204, 225, 0.7);
  font: 500 12px/1.5 var(--font-body, sans-serif);
}

.damage-analytics-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.damage-analytics-summary {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 12px 14px 13px;
  border: 1px solid rgba(121, 150, 183, 0.2);
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(10, 24, 40, 0.86), rgba(3, 10, 21, 0.9));
}

.damage-analytics-summary::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #67e8f9;
  box-shadow: 0 0 14px currentColor;
}

.damage-analytics-summary.is-gold::before { background: #facc15; }
.damage-analytics-summary.is-violet::before { background: #c084fc; }
.damage-analytics-summary.is-emerald::before { background: #6ee7b7; }
.damage-analytics-summary.is-cyan::before { background: #67e8f9; }

.damage-analytics-summary > span {
  display: block;
  overflow: hidden;
  margin-bottom: 6px;
  color: rgba(176, 195, 219, 0.68);
  font: 800 8px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.damage-analytics-summary > strong {
  display: block;
  overflow: hidden;
  color: #f7f0dd;
  font: 900 clamp(16px, 2vw, 25px)/1 var(--font-ui, sans-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.damage-analytics-section {
  min-width: 0;
  margin-top: 12px;
  border: 1px solid rgba(102, 134, 169, 0.2);
  border-radius: 10px;
  background: rgba(3, 11, 22, 0.72);
  box-shadow: inset 0 1px 0 rgba(225, 240, 255, 0.025);
}

.damage-analytics-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 14px 11px;
  border-bottom: 1px solid rgba(103, 232, 249, 0.11);
}

.damage-analytics-section h3,
.damage-analytics-section-heading h3 {
  margin: 3px 0 0;
  color: #f4ead3;
  font: 850 15px/1.15 var(--font-ui, sans-serif);
  letter-spacing: 0.02em;
}

.damage-analytics-section-heading > p {
  max-width: 570px;
  margin: 0;
  color: rgba(168, 186, 209, 0.64);
  font: 500 10px/1.4 var(--font-body, sans-serif);
  text-align: right;
}

.damage-analytics-table-head,
.damage-analytics-row-main {
  display: grid;
  grid-template-columns: minmax(270px, 1.9fr) minmax(75px, 0.55fr) minmax(135px, 0.82fr) minmax(86px, 0.65fr) minmax(58px, 0.42fr) minmax(58px, 0.42fr);
  align-items: center;
  gap: 11px;
}

.damage-analytics-table-head {
  padding: 8px 14px;
  border-bottom: 1px solid rgba(103, 232, 249, 0.1);
  color: rgba(165, 185, 210, 0.62);
  font: 800 8px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.damage-analytics-row {
  position: relative;
  border-bottom: 1px solid rgba(104, 132, 163, 0.13);
  background: linear-gradient(90deg, color-mix(in srgb, var(--analytics-row-color) 8%, transparent), transparent 48%);
}

.damage-analytics-row:last-child { border-bottom: 0; }

.damage-analytics-row::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 2px;
  background: var(--analytics-row-color);
  box-shadow: 0 0 9px var(--analytics-row-color);
}

.damage-analytics-row-main {
  width: 100%;
  padding: 9px 14px;
  border: 0;
  background: transparent;
  color: rgba(214, 224, 237, 0.84);
  cursor: var(--vespera-cursor-pointer);
  font: 700 11px/1.2 var(--font-ui, sans-serif);
  text-align: left;
}

.damage-analytics-row-main:hover,
.damage-analytics-row-main:focus-visible,
.damage-analytics-row.is-expanded .damage-analytics-row-main {
  background: color-mix(in srgb, var(--analytics-row-color) 11%, transparent);
  color: #f8fbff;
  outline: none;
}

.damage-analytics-ability-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.damage-analytics-ability-icon {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--analytics-row-color) 70%, #fff 10%);
  border-radius: 7px;
  background: rgba(0, 4, 12, 0.9);
  color: var(--analytics-row-color);
  font: 900 8px/1 var(--font-ui, sans-serif);
}

.damage-analytics-ability-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.damage-analytics-ability-cell > span:last-child {
  min-width: 0;
}

.damage-analytics-ability-cell strong,
.damage-analytics-ability-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.damage-analytics-ability-cell strong {
  color: #f6ecd6;
  font-size: 12px;
}

.damage-analytics-ability-cell small {
  margin-top: 4px;
  color: rgba(167, 187, 211, 0.6);
  font-size: 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.damage-analytics-dps {
  color: #67e8f9;
  font-size: 15px;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.34);
}

.damage-analytics-share-cell > strong {
  display: block;
  margin-bottom: 4px;
  color: #dce7f4;
  font-size: 9px;
}

.damage-analytics-share-cell > span {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 4px;
  background: rgba(71, 91, 116, 0.28);
}

.damage-analytics-share-cell i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--analytics-row-color), #e9d5ff);
  box-shadow: 0 0 7px var(--analytics-row-color);
}

.damage-analytics-row-details {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
  padding: 0 14px 10px 60px;
}

.damage-analytics-row-details > div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(108, 138, 172, 0.17);
  border-radius: 6px;
  background: rgba(0, 6, 15, 0.62);
}

.damage-analytics-row-details span,
.damage-analytics-output-grid span,
.damage-analytics-record-grid span {
  display: block;
  color: rgba(162, 183, 208, 0.62);
  font: 750 8px/1.15 var(--font-ui, sans-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.damage-analytics-row-details strong {
  display: block;
  margin-top: 5px;
  color: #f3ead8;
  font: 850 12px/1 var(--font-ui, sans-serif);
}

.damage-analytics-lower-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.damage-analytics-output,
.damage-analytics-records {
  padding: 13px 14px 14px;
}

.damage-analytics-output > h3,
.damage-analytics-records > h3 {
  margin: 0 0 10px;
}

.damage-analytics-output-grid,
.damage-analytics-record-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.damage-analytics-record-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.damage-analytics-record-grid > div:last-child {
  grid-column: 1 / -1;
}

.damage-analytics-output-grid > div,
.damage-analytics-record-grid > div {
  position: relative;
  min-width: 0;
  padding: 9px 25px 9px 9px;
  border: 1px solid rgba(105, 137, 170, 0.15);
  border-radius: 7px;
  background: rgba(1, 7, 16, 0.56);
}

.damage-analytics-output-grid > div[data-help],
.damage-analytics-record-grid > div[data-help] {
  cursor: help;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.damage-analytics-help-mark {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 13px;
  height: 13px;
  place-items: center;
  border: 1px solid rgba(103, 232, 249, 0.48);
  border-radius: 50%;
  color: rgba(186, 230, 253, 0.82);
  font: 800 9px/1 var(--font-ui, sans-serif);
  font-style: normal;
}

.damage-analytics-output-grid > div[data-help]:hover,
.damage-analytics-record-grid > div[data-help]:hover,
.damage-analytics-output-grid > div[data-help]:focus-visible,
.damage-analytics-record-grid > div[data-help]:focus-visible {
  border-color: rgba(103, 232, 249, 0.55);
  background: rgba(11, 31, 48, 0.82);
  outline: none;
}

.damage-analytics-output-grid strong,
.damage-analytics-record-grid strong {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  color: #f4ebd8;
  font: 900 14px/1 var(--font-ui, sans-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.damage-analytics-record-grid small {
  display: block;
  margin-top: 5px;
  color: rgba(103, 232, 249, 0.65);
  font: 600 8px/1.25 var(--font-body, sans-serif);
  overflow-wrap: anywhere;
  white-space: normal;
}

.damage-analytics-history-list {
  max-height: 245px;
  overflow-y: auto;
  padding: 5px 8px 8px;
}

.damage-analytics-history-list article {
  display: grid;
  grid-template-columns: minmax(200px, 1.4fr) minmax(120px, 0.65fr) 85px 95px;
  align-items: center;
  gap: 12px;
  padding: 8px 9px;
  border-bottom: 1px solid rgba(102, 132, 166, 0.13);
  color: rgba(205, 218, 234, 0.78);
  font: 700 10px/1.2 var(--font-ui, sans-serif);
}

.damage-analytics-history-list article:last-child { border-bottom: 0; }
.damage-analytics-history-list article.is-victory { border-left: 2px solid #6ee7b7; }
.damage-analytics-history-list article.is-defeat { border-left: 2px solid #fb7185; }
.damage-analytics-history-list article.is-interrupted { border-left: 2px solid #94a3b8; }

.damage-analytics-history-list article > div strong,
.damage-analytics-history-list article > div span {
  display: block;
}

.damage-analytics-history-list article > div strong { color: #f1e8d4; }
.damage-analytics-history-list article > div span {
  margin-top: 3px;
  color: rgba(160, 181, 205, 0.57);
  font-size: 8px;
  text-transform: uppercase;
}

.damage-analytics-history-list article > strong {
  color: #67e8f9;
  text-align: right;
}

.damage-analytics-history-list article > span:last-child {
  color: #d7c5f9;
  text-align: right;
}

.damage-analytics-tracking-note {
  margin: 12px 2px 0;
  color: rgba(154, 175, 199, 0.5);
  font: 500 9px/1.45 var(--font-body, sans-serif);
  text-align: center;
}

@media (max-width: 1050px) {
  .damage-analytics-lower-grid { grid-template-columns: 1fr; }
  .damage-analytics-record-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-x: visible; }
  .damage-analytics-table-head,
  .damage-analytics-row-main {
    grid-template-columns: minmax(220px, 1.7fr) 72px minmax(115px, 0.8fr) 78px 54px;
  }
  .damage-analytics-table-head > :last-child,
  .damage-analytics-row-main > :last-child { display: none; }
  .damage-analytics-row-details { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .damage-analytics-backdrop { padding: 5px; }
  .damage-analytics-modal {
    width: calc(100vw - 10px);
    max-height: calc(100dvh - 10px);
    border-radius: 9px;
  }
  .damage-analytics-header { align-items: flex-start; padding: 14px; }
  .damage-analytics-heading p,
  .damage-analytics-trend { display: none; }
  .damage-analytics-body { padding: 10px; }
  .damage-analytics-scopes {
    top: -10px;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .damage-analytics-scopes button { flex: 0 0 auto; }
  .damage-analytics-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .damage-analytics-section-heading { align-items: flex-start; flex-direction: column; gap: 5px; }
  .damage-analytics-section-heading > p { text-align: left; }
  .damage-analytics-table-head,
  .damage-analytics-row-main {
    grid-template-columns: minmax(185px, 1.7fr) 65px minmax(95px, 0.75fr);
    gap: 7px;
  }
  .damage-analytics-table-head > :nth-child(n + 4),
  .damage-analytics-row-main > :nth-child(n + 4) { display: none; }
  .damage-analytics-row-main { padding: 8px 9px; }
  .damage-analytics-table-head { padding: 7px 9px; }
  .damage-analytics-row-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 9px 9px;
  }
  .damage-analytics-output-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .damage-analytics-history-list article {
    grid-template-columns: minmax(150px, 1fr) 76px 80px;
  }
  .damage-analytics-history-list article > span:nth-of-type(1) { display: none; }
}

@media (max-width: 430px) {
  .damage-analytics-table-head,
  .damage-analytics-row-main {
    grid-template-columns: minmax(165px, 1fr) 60px;
  }
  .damage-analytics-table-head > :nth-child(3),
  .damage-analytics-row-main > :nth-child(3) { display: none; }
  .damage-analytics-ability-icon { width: 31px; height: 31px; flex-basis: 31px; }
  .damage-analytics-summary { padding: 10px; }
  .damage-analytics-summary > strong { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .scc2-damage-report-button,
  .damage-analytics-close,
  .damage-analytics-radial-segment,
  .damage-analytics-chart-legend button { transition: none !important; }
  .scc2-damage-report-button:hover,
  .scc2-damage-report-button:focus-visible { transform: none; }
}

/* Damage Report v2: compact moonsteel workbench with bright analytical hierarchy. */
.damage-analytics-modal--v2 {
  width: min(880px, calc(100vw - 64px));
  max-height: min(720px, calc(100dvh - 48px));
  filter: brightness(0.9);
  border-color: rgba(125, 211, 252, 0.78);
  border-radius: 16px;
  background:
    radial-gradient(circle at 10% -10%, rgba(103, 232, 249, 0.25), transparent 31%),
    radial-gradient(circle at 92% 0%, rgba(192, 132, 252, 0.25), transparent 34%),
    linear-gradient(145deg, #183b55 0%, #112c45 48%, #172b48 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 0 0 1px rgba(255, 226, 154, 0.1),
    0 28px 90px rgba(0, 0, 0, 0.72),
    0 0 50px rgba(56, 189, 248, 0.24);
  color: #f8fbff;
}

.damage-analytics-modal--v2 .damage-analytics-header {
  padding: 14px 18px 13px;
  border-bottom-color: rgba(186, 230, 253, 0.34);
  background:
    linear-gradient(90deg, rgba(35, 83, 111, 0.98), rgba(42, 58, 98, 0.98));
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.damage-analytics-modal--v2 .damage-analytics-heading h2 {
  margin: 4px 0 2px;
  color: #fff3c4;
  font-size: clamp(25px, 2.5vw, 34px);
  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.48),
    0 0 20px rgba(250, 204, 21, 0.15);
}

.damage-analytics-modal--v2 .damage-analytics-heading > span {
  color: #a5f3fc;
}

.damage-analytics-modal--v2 .damage-analytics-heading p {
  color: rgba(235, 246, 255, 0.8);
}

.damage-analytics-modal--v2 .damage-analytics-trend {
  min-width: 112px;
  padding: 7px 10px;
  border-color: rgba(186, 230, 253, 0.38);
  background: rgba(20, 48, 70, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.damage-analytics-modal--v2 .damage-analytics-close {
  border-color: rgba(255, 226, 154, 0.55);
  background: rgba(42, 56, 78, 0.9);
  color: #fff3c4;
}

.damage-analytics-modal--v2 .damage-analytics-body {
  padding: 12px 14px 14px;
  background:
    linear-gradient(180deg, rgba(20, 47, 68, 0.84), rgba(11, 29, 47, 0.94));
  scrollbar-color: rgba(125, 211, 252, 0.78) rgba(10, 30, 48, 0.72);
}

.damage-analytics-modal--v2 .damage-analytics-scopes {
  top: -12px;
  margin: -1px 0 9px;
  padding: 5px 0 6px;
  background: linear-gradient(180deg, #17364f 76%, transparent);
}

.damage-analytics-modal--v2 .damage-analytics-scopes button {
  min-height: 29px;
  padding: 5px 12px;
  border-color: rgba(186, 230, 253, 0.34);
  background: rgba(34, 68, 91, 0.92);
  color: rgba(239, 248, 255, 0.82);
}

.damage-analytics-modal--v2 .damage-analytics-scopes button:hover,
.damage-analytics-modal--v2 .damage-analytics-scopes button:focus-visible,
.damage-analytics-modal--v2 .damage-analytics-scopes button.is-active {
  border-color: #a5f3fc;
  background: linear-gradient(145deg, #1d6b7a, #554384);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 0 16px rgba(34, 211, 238, 0.28);
  color: #fff;
}

.damage-analytics-modal--v2 .damage-analytics-summary-grid {
  gap: 8px;
  margin-bottom: 9px;
}

.damage-analytics-modal--v2 .damage-analytics-summary {
  padding: 9px 11px 10px;
  border-color: rgba(186, 230, 253, 0.27);
  background:
    linear-gradient(145deg, rgba(40, 83, 108, 0.94), rgba(28, 53, 79, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.damage-analytics-modal--v2 .damage-analytics-summary > span {
  margin-bottom: 5px;
  color: rgba(228, 242, 255, 0.7);
}

.damage-analytics-modal--v2 .damage-analytics-summary > strong {
  color: #fff9e8;
  font-size: clamp(16px, 1.75vw, 22px);
}

.damage-analytics-modal--v2 .damage-analytics-summary[data-help] {
  cursor: help;
}

.damage-analytics-efficiency {
  margin: 0 0 10px;
  padding: 11px;
  border: 1px solid rgba(186, 230, 253, 0.25);
  border-radius: 11px;
  background:
    radial-gradient(circle at 8% 0%, rgba(110, 231, 183, 0.12), transparent 34%),
    linear-gradient(135deg, rgba(17, 49, 67, 0.94), rgba(25, 38, 72, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 22px rgba(0, 0, 0, 0.18);
}

.damage-analytics-efficiency > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 9px;
}

.damage-analytics-efficiency > header span {
  color: #6ee7b7;
  font: 850 10px/1.15 var(--font-ui, sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.damage-analytics-efficiency > header h3 {
  margin: 3px 0 0;
  color: #fff4cf;
  font: 850 17px/1.15 var(--font-ui, sans-serif);
}

.damage-analytics-efficiency > header p {
  max-width: 510px;
  margin: 0;
  color: rgba(224, 239, 250, 0.7);
  font: 550 11px/1.4 var(--font-body, sans-serif);
  text-align: right;
}

.damage-analytics-efficiency-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.damage-analytics-efficiency-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 21px;
  align-items: center;
  gap: 10px;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid rgba(110, 231, 183, 0.3);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(13, 73, 67, 0.74), rgba(19, 47, 70, 0.9));
  cursor: help;
}

.damage-analytics-efficiency-card.is-xp {
  border-color: rgba(250, 204, 21, 0.32);
  background: linear-gradient(135deg, rgba(86, 62, 15, 0.62), rgba(38, 43, 72, 0.9));
}

.damage-analytics-efficiency-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(110, 231, 183, 0.55);
  border-radius: 50%;
  background: rgba(6, 38, 40, 0.78);
  color: #a7f3d0;
  font: 900 10px/1 var(--font-ui, sans-serif);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.14);
}

.is-xp .damage-analytics-efficiency-icon {
  border-color: rgba(250, 204, 21, 0.55);
  background: rgba(63, 44, 8, 0.78);
  color: #fde68a;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.14);
}

.damage-analytics-efficiency-card small,
.damage-analytics-efficiency-card strong {
  display: block;
}

.damage-analytics-efficiency-card small {
  color: rgba(225, 239, 250, 0.7);
  font: 800 10px/1.15 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.damage-analytics-efficiency-card strong {
  margin-top: 3px;
  color: #ecfdf5;
  font: 900 clamp(21px, 2.3vw, 30px)/1 var(--font-ui, sans-serif);
  font-variant-numeric: tabular-nums;
}

.damage-analytics-efficiency-card.is-xp strong {
  color: #fef3c7;
}

.damage-analytics-efficiency-card .damage-analytics-help-mark {
  justify-self: end;
}

.damage-analytics-composition {
  display: grid;
  grid-template-columns: minmax(250px, 0.72fr) minmax(0, 1.55fr);
  gap: 10px;
  min-height: 288px;
  margin-bottom: 10px;
}

.damage-analytics-chart-card,
.damage-analytics-leaders {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(186, 230, 253, 0.34);
  border-radius: 12px;
  background:
    linear-gradient(150deg, rgba(41, 82, 106, 0.96), rgba(24, 48, 73, 0.97));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.11),
    0 12px 28px rgba(0, 0, 0, 0.18);
}

.damage-analytics-chart-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px 11px;
  text-align: center;
}

.damage-analytics-chart-heading > span,
.damage-analytics-leaders-heading > div > span {
  color: #a5f3fc;
  font: 850 8px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.damage-analytics-chart-heading h3,
.damage-analytics-leaders-heading h3 {
  margin: 4px 0 0;
  color: #fff6d8;
  font: 900 15px/1.1 var(--font-ui, sans-serif);
}

.damage-analytics-interactive-chart {
  display: flex;
  width: 100%;
  min-height: 218px;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.damage-analytics-radial {
  position: relative;
  width: 132px;
  height: 132px;
  margin: 3px auto 0;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3));
}

.damage-analytics-radial svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.damage-analytics-radial-track,
.damage-analytics-radial-segment {
  fill: none;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
}

.damage-analytics-radial-track {
  stroke: rgba(10, 31, 49, 0.72);
  stroke-width: 12;
}

.damage-analytics-radial-segment {
  cursor: pointer;
  opacity: 0.42;
  stroke: var(--analytics-row-color);
  stroke-linecap: butt;
  stroke-width: 11;
  transition:
    opacity 160ms ease,
    stroke-width 160ms ease,
    filter 160ms ease;
}

.damage-analytics-radial-segment:hover,
.damage-analytics-radial-segment:focus-visible,
.damage-analytics-radial-segment.is-active {
  opacity: 1;
  stroke-width: 15;
  filter: drop-shadow(0 0 5px var(--analytics-row-color));
  outline: none;
}

.damage-analytics-radial-center {
  position: absolute;
  inset: 29px;
  display: grid;
  place-content: center;
  border: 1px solid rgba(186, 230, 253, 0.32);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(74, 139, 173, 0.98), rgba(16, 43, 65, 0.99) 72%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 0 16px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.damage-analytics-radial-center strong,
.damage-analytics-radial-center span,
.damage-analytics-radial-center small {
  display: block;
}

.damage-analytics-radial-center strong {
  color: #fff7d6;
  font: 950 18px/1 var(--font-ui, sans-serif);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.damage-analytics-radial-center span {
  margin-top: 3px;
  color: #bff7ff;
  font: 850 7px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.11em;
}

.damage-analytics-radial-center small {
  margin-top: 4px;
  color: rgba(255, 247, 214, 0.74);
  font: 800 8px/1 var(--font-ui, sans-serif);
}

.damage-analytics-chart-selection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 7px;
  padding: 6px 8px 6px 9px;
  border: 1px solid color-mix(in srgb, var(--analytics-row-color) 42%, rgba(186, 230, 253, 0.2));
  border-left: 3px solid var(--analytics-row-color);
  border-radius: 7px;
  background: rgba(10, 31, 49, 0.52);
  text-align: left;
}

.damage-analytics-chart-selection strong {
  grid-column: 1 / -1;
  overflow: hidden;
  color: #fff8dd;
  font: 850 10px/1.15 var(--font-ui, sans-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.damage-analytics-chart-selection span,
.damage-analytics-chart-selection small {
  color: rgba(224, 239, 251, 0.72);
  font: 700 7px/1.15 var(--font-ui, sans-serif);
}

.damage-analytics-chart-selection small {
  color: var(--analytics-row-color);
  text-align: right;
  text-transform: uppercase;
}

.damage-analytics-chart-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  max-height: 63px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-color: rgba(125, 211, 252, 0.58) rgba(12, 32, 49, 0.5);
}

.damage-analytics-chart-legend button {
  display: grid;
  min-width: 0;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px;
  min-height: 27px;
  padding: 4px 5px;
  border: 1px solid rgba(186, 230, 253, 0.16);
  border-radius: 6px;
  background: rgba(9, 29, 46, 0.38);
  color: rgba(231, 244, 253, 0.7);
  cursor: pointer;
}

.damage-analytics-chart-legend button:hover,
.damage-analytics-chart-legend button:focus-visible,
.damage-analytics-chart-legend button.is-active {
  border-color: color-mix(in srgb, var(--analytics-row-color) 72%, white 8%);
  background: color-mix(in srgb, var(--analytics-row-color) 16%, rgba(9, 29, 46, 0.76));
  color: #fff;
  outline: none;
}

.damage-analytics-chart-legend button i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--analytics-row-color);
  box-shadow: 0 0 6px var(--analytics-row-color);
}

.damage-analytics-chart-legend button strong {
  overflow: hidden;
  font: 750 7px/1 var(--font-ui, sans-serif);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.damage-analytics-chart-legend button span {
  color: var(--analytics-row-color);
  font: 850 7px/1 var(--font-ui, sans-serif);
}

.damage-analytics-chart-card > p {
  margin: 5px 0 0;
  color: rgba(227, 241, 252, 0.72);
  font: 550 9px/1.4 var(--font-body, sans-serif);
}

.damage-analytics-leaders {
  padding: 12px;
}

.damage-analytics-leaders-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.damage-analytics-leaders-heading > p {
  max-width: 230px;
  margin: 0;
  color: rgba(221, 237, 250, 0.68);
  font: 550 9px/1.35 var(--font-body, sans-serif);
  text-align: right;
}

.damage-analytics-leader-list {
  display: grid;
  gap: 5px;
  max-height: 226px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(125, 211, 252, 0.62) rgba(12, 32, 49, 0.55);
  scrollbar-gutter: stable;
}

.damage-analytics-leader-list article {
  position: relative;
  display: grid;
  grid-template-columns: 22px 35px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 8px;
  min-height: 37px;
  overflow: hidden;
  padding: 5px 8px 8px;
  border: 1px solid color-mix(in srgb, var(--analytics-row-color) 34%, rgba(186, 230, 253, 0.22));
  border-radius: 8px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--analytics-row-color) 17%, rgba(22, 54, 78, 0.92)), rgba(24, 52, 76, 0.9));
}

.damage-analytics-leader-list article > b {
  color: var(--analytics-row-color);
  font: 950 12px/1 var(--font-ui, sans-serif);
  text-align: center;
}

.damage-analytics-leader-icon {
  display: grid;
  width: 33px;
  height: 33px;
  overflow: hidden;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--analytics-row-color) 70%, white 15%);
  border-radius: 7px;
  background: rgba(7, 23, 38, 0.86);
  color: var(--analytics-row-color);
  font: 900 7px/1 var(--font-ui, sans-serif);
}

.damage-analytics-leader-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.damage-analytics-leader-list article > div {
  min-width: 0;
}

.damage-analytics-leader-list strong,
.damage-analytics-leader-list small {
  display: block;
}

.damage-analytics-leader-list article > div strong {
  overflow: hidden;
  color: #fff9e8;
  font: 850 10px/1.15 var(--font-ui, sans-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.damage-analytics-leader-list article > div small {
  margin-top: 3px;
  color: rgba(224, 239, 251, 0.7);
  font: 700 7px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.damage-analytics-leader-list article > span {
  text-align: right;
}

.damage-analytics-leader-list article > span strong {
  color: #d7fbff;
  font: 950 13px/1 var(--font-ui, sans-serif);
}

.damage-analytics-leader-list article > span small {
  margin-top: 2px;
  color: rgba(221, 237, 250, 0.58);
  font: 750 7px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
}

.damage-analytics-leader-list article > i {
  position: absolute;
  right: 8px;
  bottom: 4px;
  left: 73px;
  height: 2px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(213, 232, 247, 0.12);
}

.damage-analytics-leader-list article > i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--analytics-row-color);
  box-shadow: 0 0 8px var(--analytics-row-color);
}

.damage-analytics-modal--v2 .damage-analytics-section {
  border-color: rgba(186, 230, 253, 0.28);
  background: rgba(24, 52, 76, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 10px 25px rgba(0, 0, 0, 0.13);
}

.damage-analytics-modal--v2 .damage-analytics-section-heading {
  padding: 11px 12px 9px;
  border-bottom-color: rgba(186, 230, 253, 0.22);
}

.damage-analytics-modal--v2 .damage-analytics-section h3,
.damage-analytics-modal--v2 .damage-analytics-section-heading h3 {
  color: #fff6dc;
}

.damage-analytics-modal--v2 .damage-analytics-section-heading > p {
  color: rgba(224, 239, 251, 0.7);
}

.damage-analytics-modal--v2 .damage-analytics-table-head {
  border-bottom-color: rgba(186, 230, 253, 0.2);
  background: rgba(18, 43, 65, 0.8);
  color: rgba(224, 239, 251, 0.68);
}

.damage-analytics-modal--v2 .damage-analytics-rows {
  max-height: 318px;
  overflow-y: auto;
  scrollbar-color: rgba(125, 211, 252, 0.75) rgba(11, 31, 49, 0.7);
}

.damage-analytics-modal--v2 .damage-analytics-row {
  border-bottom-color: rgba(186, 230, 253, 0.14);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--analytics-row-color) 15%, rgba(31, 65, 88, 0.95)), rgba(25, 54, 79, 0.92));
}

.damage-analytics-modal--v2 .damage-analytics-row-main {
  color: rgba(238, 247, 255, 0.9);
}

.damage-analytics-modal--v2 .damage-analytics-row-main:hover,
.damage-analytics-modal--v2 .damage-analytics-row-main:focus-visible,
.damage-analytics-modal--v2 .damage-analytics-row.is-expanded .damage-analytics-row-main {
  background: color-mix(in srgb, var(--analytics-row-color) 20%, rgba(45, 82, 108, 0.94));
}

.damage-analytics-modal--v2 .damage-analytics-ability-cell strong {
  color: #fff9e9;
}

.damage-analytics-modal--v2 .damage-analytics-type-label {
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--analytics-row-color) 45%, transparent);
  border-radius: 4px;
  background: color-mix(in srgb, var(--analytics-row-color) 14%, rgba(20, 45, 65, 0.9));
  color: #eaf8ff;
}

.damage-analytics-modal--v2 .damage-analytics-dps {
  color: #a5f3fc;
  text-shadow: 0 0 11px rgba(103, 232, 249, 0.42);
}

.damage-analytics-modal--v2 .damage-analytics-share-cell > span {
  background: rgba(210, 232, 247, 0.16);
}

.damage-analytics-modal--v2 .damage-analytics-row-details > div,
.damage-analytics-modal--v2 .damage-analytics-output-grid > div,
.damage-analytics-modal--v2 .damage-analytics-record-grid > div {
  border-color: rgba(186, 230, 253, 0.21);
  background: rgba(18, 42, 63, 0.8);
}

.damage-analytics-modal--v2 .damage-analytics-row-details span,
.damage-analytics-modal--v2 .damage-analytics-output-grid span,
.damage-analytics-modal--v2 .damage-analytics-record-grid span {
  color: rgba(222, 238, 251, 0.68);
}

.damage-analytics-modal--v2 .damage-analytics-row-details strong,
.damage-analytics-modal--v2 .damage-analytics-output-grid strong,
.damage-analytics-modal--v2 .damage-analytics-record-grid strong {
  color: #fff8e6;
}

.damage-analytics-modal--v2 .damage-analytics-history-list article {
  color: rgba(232, 243, 252, 0.86);
}

.damage-analytics-modal--v2 .damage-analytics-tracking-note {
  color: rgba(216, 234, 247, 0.62);
}

@media (max-width: 900px) {
  .damage-analytics-modal--v2 {
    width: min(720px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
  }
  .damage-analytics-composition {
    grid-template-columns: minmax(205px, 0.72fr) minmax(0, 1.45fr);
  }
  .damage-analytics-radial {
    width: 122px;
    height: 122px;
  }
  .damage-analytics-leader-list article {
    grid-template-columns: 19px 31px minmax(0, 1fr) 61px;
    gap: 6px;
  }
  .damage-analytics-leader-icon {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 720px) {
  .damage-analytics-modal--v2 {
    width: calc(100vw - 10px);
    max-height: calc(100dvh - 10px);
  }
  .damage-analytics-composition {
    grid-template-columns: 1fr;
  }
  .damage-analytics-efficiency > header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .damage-analytics-efficiency > header p {
    max-width: none;
    text-align: left;
  }
  .damage-analytics-efficiency-grid {
    grid-template-columns: 1fr;
  }
  .damage-analytics-chart-card {
    display: grid;
    grid-template-columns: minmax(125px, 0.8fr) 146px minmax(150px, 1fr);
    align-items: center;
    gap: 8px;
    text-align: left;
  }
  .damage-analytics-chart-card > p {
    text-align: left;
  }
  .damage-analytics-interactive-chart {
    min-height: 210px;
  }
  .damage-analytics-radial {
    width: 124px;
    height: 124px;
    margin: 0 auto;
  }
}

@media (max-width: 520px) {
  .damage-analytics-chart-card {
    display: flex;
    text-align: center;
  }
  .damage-analytics-leaders-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .damage-analytics-leaders-heading > p {
    max-width: none;
    text-align: left;
  }
}

/* Damage Report v2 readability: keep the composition, remove micro-text. */
.damage-analytics-modal--v2 {
  width: min(1040px, calc(100vw - 40px));
  max-height: min(820px, calc(100dvh - 32px));
  font-size: 13px;
}

.damage-analytics-modal--v2 .damage-analytics-heading > span,
.damage-analytics-modal--v2 .damage-analytics-section-heading > div > span,
.damage-analytics-chart-heading > span,
.damage-analytics-leaders-heading > div > span {
  font-size: 11px;
}

.damage-analytics-modal--v2 .damage-analytics-heading p,
.damage-analytics-modal--v2 .damage-analytics-section-heading > p,
.damage-analytics-leaders-heading > p {
  font-size: 12px;
}

.damage-analytics-modal--v2 .damage-analytics-trend small,
.damage-analytics-modal--v2 .damage-analytics-scopes button,
.damage-analytics-modal--v2 .damage-analytics-summary > span,
.damage-analytics-modal--v2 .damage-analytics-table-head {
  font-size: 11px;
}

.damage-analytics-chart-heading h3,
.damage-analytics-leaders-heading h3,
.damage-analytics-modal--v2 .damage-analytics-section h3,
.damage-analytics-modal--v2 .damage-analytics-section-heading h3 {
  font-size: 18px;
}

.damage-analytics-radial-center strong {
  font-size: 22px;
}

.damage-analytics-radial-center span,
.damage-analytics-radial-center small {
  font-size: 10px;
}

.damage-analytics-chart-selection {
  padding: 8px 10px 8px 11px;
}

.damage-analytics-chart-selection strong {
  font-size: 13px;
}

.damage-analytics-chart-selection span,
.damage-analytics-chart-selection small,
.damage-analytics-chart-legend button strong,
.damage-analytics-chart-legend button span {
  font-size: 10px;
}

.damage-analytics-chart-legend {
  max-height: 74px;
}

.damage-analytics-chart-legend button {
  min-height: 32px;
  padding: 6px 7px;
}

.damage-analytics-chart-card > p {
  font-size: 12px;
}

.damage-analytics-leader-list article {
  min-height: 47px;
  padding: 7px 10px 10px;
}

.damage-analytics-leader-icon {
  width: 38px;
  height: 38px;
  font-size: 10px;
}

.damage-analytics-leader-list article > b {
  font-size: 15px;
}

.damage-analytics-leader-list article > div strong {
  font-size: 13px;
}

.damage-analytics-leader-list article > div small,
.damage-analytics-leader-list article > span small {
  font-size: 10px;
}

.damage-analytics-leader-list article > span strong {
  font-size: 17px;
}

.damage-analytics-modal--v2 .damage-analytics-row-main {
  padding-block: 12px;
  font-size: 13px;
}

.damage-analytics-modal--v2 .damage-analytics-ability-cell strong {
  font-size: 15px;
}

.damage-analytics-modal--v2 .damage-analytics-ability-cell small,
.damage-analytics-modal--v2 .damage-analytics-type-label,
.damage-analytics-modal--v2 .damage-analytics-share-cell > strong {
  font-size: 10px;
}

.damage-analytics-modal--v2 .damage-analytics-dps {
  font-size: 18px;
}

.damage-analytics-modal--v2 .damage-analytics-row-details span,
.damage-analytics-modal--v2 .damage-analytics-output-grid span,
.damage-analytics-modal--v2 .damage-analytics-record-grid span {
  font-size: 10px;
}

.damage-analytics-modal--v2 .damage-analytics-row-details strong,
.damage-analytics-modal--v2 .damage-analytics-output-grid strong,
.damage-analytics-modal--v2 .damage-analytics-record-grid strong {
  font-size: 17px;
}

.damage-analytics-modal--v2 .damage-analytics-record-grid small {
  font-size: 10px;
}

.damage-analytics-modal--v2 .damage-analytics-history-list article {
  padding-block: 11px;
  font-size: 13px;
}

.damage-analytics-modal--v2 .damage-analytics-history-list article > div span {
  font-size: 10px;
}

.damage-analytics-modal--v2 .damage-analytics-tracking-note {
  font-size: 11px;
}

.damage-analytics-report-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 180px));
  justify-content: center;
  gap: 7px;
  margin: 0 0 8px;
  padding: 4px;
  border: 1px solid rgba(186, 230, 253, 0.22);
  border-radius: 10px;
  background: rgba(10, 30, 48, 0.62);
}

.damage-analytics-report-tabs button {
  min-height: 35px;
  padding: 7px 18px;
  border: 1px solid rgba(186, 230, 253, 0.2);
  border-radius: 7px;
  background: rgba(27, 57, 80, 0.78);
  color: rgba(229, 243, 252, 0.72);
  cursor: var(--vespera-cursor-pointer);
  font: 900 12px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.damage-analytics-report-tabs button:hover,
.damage-analytics-report-tabs button:focus-visible,
.damage-analytics-report-tabs button.is-active {
  border-color: #a5f3fc;
  background: linear-gradient(145deg, #1c6978, #554184);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 18px rgba(103, 232, 249, 0.24);
  color: #fff9e8;
  outline: none;
}

.damage-analytics-defense-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.55fr);
  gap: 10px;
  margin-bottom: 10px;
}

.damage-analytics-defense-overview,
.damage-analytics-defense-sources,
.damage-analytics-defense-explainer {
  border: 1px solid rgba(186, 230, 253, 0.32);
  border-radius: 12px;
  background:
    linear-gradient(150deg, rgba(41, 82, 106, 0.96), rgba(24, 48, 73, 0.97));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 12px 28px rgba(0, 0, 0, 0.18);
}

.damage-analytics-defense-overview {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  text-align: center;
}

.damage-analytics-defense-overview > span,
.damage-analytics-defense-sources .damage-analytics-leaders-heading > div > span {
  color: #a5f3fc;
  font: 850 11px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.damage-analytics-defense-overview h3 {
  margin: 6px 0 12px;
  color: #fff6d8;
  font: 900 18px/1.15 var(--font-ui, sans-serif);
}

.damage-analytics-defense-ring {
  position: relative;
  isolation: isolate;
  display: grid;
  width: 152px;
  height: 152px;
  place-content: center;
  border-radius: 50%;
  background:
    conic-gradient(#6ee7b7 0 var(--defense-share), rgba(125, 151, 177, 0.25) var(--defense-share) 100%);
  box-shadow:
    0 0 24px rgba(110, 231, 183, 0.22),
    inset 0 0 16px rgba(255, 255, 255, 0.08);
}

.damage-analytics-defense-ring::before {
  position: absolute;
  z-index: -1;
  inset: 14px;
  border: 1px solid rgba(186, 230, 253, 0.3);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, #315f79, #102b43 72%);
  content: "";
}

.damage-analytics-defense-ring strong,
.damage-analytics-defense-ring span {
  display: block;
}

.damage-analytics-defense-ring strong {
  color: #fff7d6;
  font: 950 25px/1 var(--font-ui, sans-serif);
}

.damage-analytics-defense-ring span {
  margin-top: 6px;
  color: #bff7ff;
  font: 850 10px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.damage-analytics-defense-split {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 14px;
}

.damage-analytics-defense-split > div {
  padding: 9px;
  border: 1px solid rgba(186, 230, 253, 0.2);
  border-radius: 8px;
  background: rgba(10, 31, 49, 0.52);
}

.damage-analytics-defense-split span,
.damage-analytics-defense-split strong {
  display: block;
}

.damage-analytics-defense-split span {
  color: rgba(224, 239, 251, 0.68);
  font: 750 10px/1.1 var(--font-ui, sans-serif);
  text-transform: uppercase;
}

.damage-analytics-defense-split strong {
  margin-top: 5px;
  color: #fff8e6;
  font: 900 18px/1 var(--font-ui, sans-serif);
}

.damage-analytics-defense-overview > p {
  margin: auto 0 0;
  color: rgba(227, 241, 252, 0.76);
  font: 600 12px/1.45 var(--font-body, sans-serif);
}

.damage-analytics-defense-sources {
  min-width: 0;
  min-height: 330px;
  padding: 13px;
}

.damage-analytics-defense-list {
  display: grid;
  gap: 6px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(125, 211, 252, 0.68) rgba(12, 32, 49, 0.55);
  scrollbar-gutter: stable;
}

.damage-analytics-defense-list > article {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  overflow: hidden;
  padding: 7px 10px 11px;
  border: 1px solid color-mix(in srgb, var(--analytics-row-color) 38%, rgba(186, 230, 253, 0.2));
  border-radius: 9px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--analytics-row-color) 17%, rgba(22, 54, 78, 0.94)), rgba(24, 52, 76, 0.92));
}

.damage-analytics-defense-list > article > div {
  min-width: 0;
}

.damage-analytics-defense-list strong,
.damage-analytics-defense-list small {
  display: block;
}

.damage-analytics-defense-list > article > div strong {
  overflow: hidden;
  color: #fff9e8;
  font: 850 14px/1.15 var(--font-ui, sans-serif);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.damage-analytics-defense-list > article > div small {
  margin-top: 4px;
  color: rgba(224, 239, 251, 0.7);
  font: 700 10px/1.1 var(--font-ui, sans-serif);
  text-transform: uppercase;
}

.damage-analytics-defense-list > article > span:not(.damage-analytics-leader-icon) {
  text-align: right;
}

.damage-analytics-defense-list > article > span strong {
  color: var(--analytics-row-color);
  font: 950 17px/1 var(--font-ui, sans-serif);
}

.damage-analytics-defense-list > article > span small {
  margin-top: 4px;
  color: rgba(224, 239, 251, 0.66);
  font: 800 10px/1 var(--font-ui, sans-serif);
}

.damage-analytics-defense-list > article > i {
  position: absolute;
  right: 10px;
  bottom: 5px;
  left: 61px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(210, 232, 247, 0.15);
}

.damage-analytics-defense-list > article > i span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--analytics-row-color);
  box-shadow: 0 0 8px var(--analytics-row-color);
}

.damage-analytics-defense-explainer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
  padding: 10px;
}

.damage-analytics-defense-explainer > div {
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--analytics-row-color) 35%, rgba(186, 230, 253, 0.18));
  border-left: 3px solid var(--analytics-row-color);
  border-radius: 8px;
  background: rgba(10, 31, 49, 0.5);
}

.damage-analytics-defense-explainer strong,
.damage-analytics-defense-explainer span {
  display: block;
}

.damage-analytics-defense-explainer strong {
  color: var(--analytics-row-color);
  font: 850 11px/1.1 var(--font-ui, sans-serif);
}

.damage-analytics-defense-explainer span {
  margin-top: 5px;
  color: rgba(229, 242, 252, 0.72);
  font: 550 11px/1.4 var(--font-body, sans-serif);
}

.damage-analytics-defense-empty {
  min-height: 330px;
}

@media (max-width: 720px) {
  .damage-analytics-modal--v2 {
    width: calc(100vw - 10px);
    max-height: calc(100dvh - 10px);
  }
  .damage-analytics-defense-layout {
    grid-template-columns: 1fr;
  }
  .damage-analytics-defense-explainer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .damage-analytics-report-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .damage-analytics-defense-explainer {
    grid-template-columns: 1fr;
  }
}

/* Keep the report's semantic chart colors distinct while matching the selected UI theme. */
.damage-analytics-modal {
  --analytics-ui-accent: var(--color-accent-primary, #67e8f9);
  --analytics-ui-warm: var(--color-accent-warm, #c084fc);
  border-color: color-mix(in srgb, var(--analytics-ui-accent) 48%, transparent);
  background:
    radial-gradient(circle at 12% -8%, color-mix(in srgb, var(--analytics-ui-accent) 14%, transparent), transparent 29%),
    radial-gradient(circle at 91% 2%, color-mix(in srgb, var(--analytics-ui-warm) 14%, transparent), transparent 31%),
    linear-gradient(150deg, rgb(var(--indigo-rgb) / 0.995), rgb(var(--surface-background-rgb, 3 9 19) / 0.995));
  box-shadow:
    inset 0 1px 0 rgba(224, 247, 255, 0.1),
    inset 0 0 0 1px color-mix(in srgb, var(--analytics-ui-warm) 10%, transparent),
    0 34px 110px rgba(0, 0, 0, 0.88),
    0 0 48px color-mix(in srgb, var(--analytics-ui-accent) 14%, transparent);
}

.damage-analytics-modal::before {
  background: linear-gradient(
    90deg,
    transparent,
    var(--analytics-ui-accent),
    var(--analytics-ui-warm),
    var(--analytics-ui-accent),
    transparent
  );
  box-shadow: 0 0 16px color-mix(in srgb, var(--analytics-ui-accent) 62%, transparent);
}

.damage-analytics-header {
  border-bottom-color: color-mix(in srgb, var(--analytics-ui-accent) 20%, transparent);
  background: color-mix(in srgb, rgb(var(--indigo-rgb) / 0.78) 92%, var(--analytics-ui-accent));
}

.damage-analytics-heading > span,
.damage-analytics-section-heading > div > span {
  color: var(--analytics-ui-accent);
}

.damage-analytics-scopes button:hover,
.damage-analytics-scopes button:focus-visible,
.damage-analytics-scopes button.is-active,
.damage-analytics-report-tabs button:hover,
.damage-analytics-report-tabs button:focus-visible,
.damage-analytics-report-tabs button.is-active {
  border-color: color-mix(in srgb, var(--analytics-ui-accent) 76%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--analytics-ui-accent) 24%, rgb(var(--indigo-rgb) / 0.94)),
    color-mix(in srgb, var(--analytics-ui-warm) 22%, rgb(var(--indigo-rgb) / 0.94))
  );
  box-shadow: 0 0 14px color-mix(in srgb, var(--analytics-ui-accent) 20%, transparent);
}

.damage-analytics-body {
  scrollbar-color:
    color-mix(in srgb, var(--analytics-ui-accent) 48%, transparent)
    rgb(var(--indigo-rgb) / 0.45);
}

/* Inventory loot rules */
.inventory-filter-panel {
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid rgb(var(--brass-rgb) / 0.18);
  border-radius: 4px;
  background: rgb(var(--indigo-rgb) / 0.28);
}

.inventory-filter-form {
  min-width: 0;
  height: 100%;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.inventory-filter-form input[type="text"],
.inventory-filter-form select {
  min-height: 32px;
  font-size: 12px !important;
  line-height: 1.2;
}

.inventory-filter-dropdown {
  position: relative;
  min-width: 0;
  width: 100%;
}

.inventory-filter-dropdown__trigger {
  position: relative;
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  line-height: 1.2;
}

.inventory-filter-dropdown__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-filter-dropdown__chevron {
  position: absolute;
  top: 50%;
  right: 8px;
  color: rgb(var(--brass-rgb) / 0.78);
  font-size: 13px;
  line-height: 1;
  transform: translateY(-55%);
  transition: transform 120ms ease, color 120ms ease;
}

.inventory-filter-dropdown__trigger[aria-expanded="true"] {
  border-color: rgb(var(--brass-rgb) / 0.7) !important;
  color: var(--color-parchment);
  box-shadow: 0 0 0 1px rgb(var(--brass-rgb) / 0.12), 0 8px 18px rgb(0 0 0 / 0.22);
}

.inventory-filter-dropdown__trigger[aria-expanded="true"] .inventory-filter-dropdown__chevron {
  color: var(--color-celestial-gold);
  transform: translateY(-45%) rotate(180deg);
}

.inventory-filter-dropdown__menu {
  position: fixed;
  z-index: 2147483647;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 4px;
  border: 1px solid rgb(var(--brass-rgb) / 0.64);
  border-radius: 4px;
  background: linear-gradient(180deg, rgb(var(--indigo-rgb) / 0.99), rgb(var(--surface-rgb) / 0.99));
  box-shadow: 0 18px 44px rgb(0 0 0 / 0.68), inset 0 1px rgb(255 245 215 / 0.06);
  color: var(--color-ivory-beige);
  font-size: var(--inventory-dropdown-font-size, 12px);
  overscroll-behavior: contain;
}

.inventory-filter-dropdown__option {
  display: flex;
  width: 100%;
  min-height: var(--inventory-dropdown-option-height, 32px);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px var(--inventory-dropdown-inline-padding, 10px);
  border: 1px solid transparent;
  border-radius: 3px;
  color: rgb(var(--parchment-rgb) / 0.82);
  background: transparent;
  font: inherit;
  text-align: left;
  transition: border-color 100ms ease, background 100ms ease, color 100ms ease;
}

.inventory-filter-dropdown__option:hover,
.inventory-filter-dropdown__option:focus-visible {
  border-color: rgb(var(--brass-rgb) / 0.34);
  outline: none;
  color: var(--color-parchment);
  background: rgb(var(--brass-rgb) / 0.12);
}

.inventory-filter-dropdown__option.is-selected {
  border-color: rgb(var(--brass-rgb) / 0.5);
  color: var(--color-celestial-gold);
  background: linear-gradient(90deg, rgb(var(--brass-rgb) / 0.16), rgb(var(--royal-rgb) / 0.08));
}

.inventory-filter-dropdown__check {
  flex: 0 0 auto;
  color: var(--color-celestial-gold);
  font-weight: 900;
}

.inventory-filter-form button,
.inventory-filter-form label {
  min-height: 29px;
  font-size: 11px !important;
  letter-spacing: 0.1em !important;
}

.inventory-filter-actions {
  align-self: center;
  display: grid;
  flex: 0 0 112px;
  width: 112px;
  grid-template-rows: repeat(3, 34px);
  gap: 6px;
}

.inventory-select-toggle,
.inventory-loot-rules-button,
.inventory-go-to-bank-button {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 27px;
  justify-content: center;
}

.inventory-loot-rules-button,
.inventory-go-to-bank-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgb(var(--brass-rgb) / 0.42);
  border-radius: 3px;
  background: linear-gradient(180deg, rgb(var(--brass-rgb) / 0.14), rgb(var(--surface-rgb) / 0.7));
  color: rgb(var(--parchment-rgb) / 0.86);
  font-family: var(--font-serif, Georgia, serif);
  font-size: 10px;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
}

.inventory-loot-rules-button:hover,
.inventory-go-to-bank-button:hover {
  border-color: rgb(var(--brass-rgb) / 0.78);
  background: rgb(var(--brass-rgb) / 0.18);
  color: var(--color-celestial-gold);
}

.inventory-loot-rules-button.is-active {
  border-color: rgb(89 190 135 / 0.55);
  background: linear-gradient(180deg, rgb(89 190 135 / 0.13), rgb(0 0 0 / 0.28));
}

.inventory-loot-rules-button__status {
  padding: 2px 5px;
  border: 1px solid rgb(var(--brass-rgb) / 0.28);
  border-radius: 999px;
  color: rgb(var(--parchment-rgb) / 0.74);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.inventory-loot-rules-button.is-active .inventory-loot-rules-button__status {
  border-color: rgb(89 190 135 / 0.42);
  color: rgb(145 238 183);
}

@media (max-width: 620px) {
  .inventory-filter-panel {
    flex-direction: column;
  }

  .inventory-filter-actions {
    align-self: stretch;
    flex: 0 0 auto;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: 34px;
  }
}

.loot-rules-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(2 5 12 / 0.84);
  backdrop-filter: blur(8px);
}

.loot-rules-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: min(880px, calc(100dvh - 40px));
  overflow: auto;
  border: 1px solid rgb(var(--brass-rgb) / 0.58);
  border-radius: 8px;
  background:
    radial-gradient(circle at 85% 0%, rgb(var(--royal-rgb) / 0.16), transparent 34%),
    linear-gradient(155deg, rgb(var(--indigo-rgb) / 0.99), rgb(4 10 22 / 0.99));
  box-shadow: 0 30px 90px rgb(0 0 0 / 0.75), inset 0 1px rgb(255 245 215 / 0.06);
}

.loot-rules-editor {
  position: relative;
  padding: 24px;
  color: rgb(var(--parchment-rgb) / 0.92);
}

.loot-rules-editor--embedded {
  margin-bottom: 20px;
  border: 1px solid rgb(var(--brass-rgb) / 0.26);
  border-radius: 8px;
  background: rgb(var(--indigo-rgb) / 0.44);
}

.loot-rules-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 17px;
  border-bottom: 1px solid rgb(var(--brass-rgb) / 0.22);
}

.loot-rules-kicker {
  margin-bottom: 5px;
  color: rgb(var(--brass-rgb) / 0.7);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.loot-rules-header h2 {
  margin: 0;
  color: var(--color-celestial-gold);
  font-family: var(--font-serif, Georgia, serif);
  font-size: 25px;
  letter-spacing: 0.03em;
}

.loot-rules-header p {
  max-width: 620px;
  margin: 6px 0 0;
  color: rgb(var(--parchment-rgb) / 0.9);
  font-size: 12px;
}

.loot-rule-presets {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgb(var(--brass-rgb) / 0.2);
  border-radius: 7px;
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--royal-rgb) / 0.12), transparent 42%),
    rgb(0 0 0 / 0.16);
}

.loot-rule-presets__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.loot-rule-presets__heading h3 {
  margin: 0;
  color: rgb(var(--parchment-rgb) / 0.92);
  font-family: var(--font-serif, Georgia, serif);
  font-size: 14px;
}

.loot-rule-presets__heading span {
  color: rgb(var(--parchment-rgb) / 0.82);
  font-size: 9px;
  text-align: right;
}

.loot-rule-presets__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.loot-rule-preset {
  display: grid;
  gap: 4px;
  min-width: 0;
  min-height: 74px;
  padding: 10px;
  border: 1px solid rgb(var(--lavender-rgb) / 0.14);
  border-radius: 5px;
  background: linear-gradient(180deg, rgb(var(--surface-rgb) / 0.6), rgb(2 8 18 / 0.58));
  color: rgb(var(--parchment-rgb) / 0.78);
  text-align: left;
}

.loot-rule-preset:hover {
  border-color: rgb(var(--brass-rgb) / 0.48);
}

.loot-rule-preset.is-active {
  border-color: rgb(89 190 135 / 0.58);
  background:
    linear-gradient(135deg, rgb(89 190 135 / 0.13), transparent 66%),
    rgb(var(--surface-rgb) / 0.68);
  box-shadow: inset 0 0 0 1px rgb(145 238 183 / 0.06);
}

.loot-rule-preset strong {
  color: rgb(var(--parchment-rgb) / 0.94);
  font-family: var(--font-serif, Georgia, serif);
  font-size: 11px;
  line-height: 1.25;
}

.loot-rule-preset.is-active strong {
  color: rgb(145 238 183);
}

.loot-rule-preset span {
  color: rgb(var(--parchment-rgb) / 0.8);
  font-size: 9px;
  line-height: 1.35;
}

.loot-rules-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.loot-rules-close {
  border: 1px solid rgb(var(--brass-rgb) / 0.36);
  background: rgb(var(--surface-rgb) / 0.72);
  color: rgb(var(--lavender-rgb) / 0.82);
}

.loot-rules-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  font-size: 21px;
}

.loot-rule-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0;
  padding: 8px 11px;
  border-left: 2px solid rgb(var(--brass-rgb) / 0.7);
  background: linear-gradient(90deg, rgb(var(--brass-rgb) / 0.1), transparent);
  color: rgb(var(--parchment-rgb) / 0.9);
  font-size: 11px;
}

.loot-rules-apply-owned {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgb(var(--brass-rgb) / 0.62);
  border-radius: 4px;
  background: linear-gradient(180deg, rgb(var(--brass-rgb) / 0.2), rgb(0 0 0 / 0.3));
  color: var(--color-celestial-gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loot-rules-apply-owned:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.loot-rules-confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 2147483100;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(2 5 12 / 0.86);
  backdrop-filter: blur(7px);
}

.loot-rules-confirm-panel {
  width: min(440px, calc(100vw - 28px));
  padding: 22px;
  border: 1px solid rgb(var(--brass-rgb) / 0.58);
  border-radius: 7px;
  background: linear-gradient(155deg, rgb(var(--indigo-rgb) / 0.99), rgb(4 10 22 / 0.99));
  box-shadow: 0 24px 70px rgb(0 0 0 / 0.72);
}

.loot-rules-confirm-panel h3 {
  margin: 0;
  color: var(--color-celestial-gold);
  font-family: var(--font-serif, Georgia, serif);
  font-size: 21px;
}

.loot-rules-confirm-panel p {
  margin: 10px 0 18px;
  color: rgb(var(--parchment-rgb) / 0.82);
  font-size: 12px;
  line-height: 1.55;
}

.loot-rules-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.loot-rules-confirm-panel button {
  min-width: 112px;
  padding: 8px 12px;
}

.loot-rules-apply-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 18px;
}

.loot-rules-apply-preview > div {
  padding: 9px;
  border: 1px solid rgb(var(--brass-rgb) / 0.18);
  border-radius: 4px;
  background: rgb(0 0 0 / 0.2);
  text-align: center;
}

.loot-rules-apply-preview dt {
  color: rgb(var(--lavender-rgb) / 0.58);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loot-rules-apply-preview dd {
  margin: 5px 0 0;
  color: var(--color-celestial-gold);
  font-family: var(--font-mono, monospace);
  font-size: 14px;
  font-weight: 800;
}

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

.loot-rule-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgb(var(--lavender-rgb) / 0.12);
  border-radius: 6px;
  background: linear-gradient(180deg, rgb(var(--surface-rgb) / 0.72), rgb(2 8 18 / 0.66));
  opacity: 0.62;
  transition: border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.loot-rule-card.is-enabled {
  border-color: rgb(var(--brass-rgb) / 0.38);
  opacity: 1;
  box-shadow: inset 0 1px rgb(255 248 220 / 0.04);
}

.loot-rule-card-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 14px;
}

.loot-rule-card-head h3 {
  margin: 0;
  color: rgb(var(--parchment-rgb) / 0.95);
  font-family: var(--font-serif, Georgia, serif);
  font-size: 15px;
}

.loot-rule-toggle {
  min-width: 42px;
  padding: 5px 7px;
  border: 1px solid rgb(var(--lavender-rgb) / 0.17);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.25);
  color: rgb(var(--lavender-rgb) / 0.65);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loot-rule-toggle.is-on {
  border-color: rgb(89 190 135 / 0.55);
  color: rgb(145 238 183);
}

.loot-rule-field {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  color: rgb(var(--parchment-rgb) / 0.86);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loot-rule-field select,
.loot-rule-field input[type="number"] {
  width: 100%;
  min-height: 35px;
  padding: 7px 9px;
  border: 1px solid rgb(var(--brass-rgb) / 0.25);
  border-radius: 4px;
  outline: none;
  background: rgb(2 8 18 / 0.86);
  color: rgb(var(--parchment-rgb) / 0.96);
  font-size: 11px;
  text-transform: none;
}

.loot-rule-field select:focus,
.loot-rule-field input[type="number"]:focus {
  border-color: rgb(var(--brass-rgb) / 0.72);
}

.loot-rule-field select:disabled,
.loot-rule-field input:disabled {
  cursor: not-allowed;
}

.loot-rule-field .loot-rule-select {
  width: 100%;
}

.loot-rule-field .loot-rule-select-trigger {
  min-height: 35px;
  padding: 7px 9px;
  border-color: rgb(var(--brass-rgb) / 0.28);
  border-radius: 4px;
  background: rgb(3 12 25 / 0.78);
  color: rgb(225 230 235);
  font: 600 11px/1.35 var(--font-body, sans-serif);
  text-transform: none;
}

.loot-rule-field .loot-rule-select-trigger:focus-visible,
.loot-rule-field .loot-rule-select-trigger[aria-expanded="true"] {
  border-color: rgb(var(--brass-rgb) / 0.72);
}

.loot-rule-check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  color: rgb(var(--parchment-rgb) / 0.9);
  font-size: 10px;
}

.loot-rule-check input {
  accent-color: var(--color-celestial-gold);
}

.loot-rule-preview {
  min-height: 38px;
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgb(var(--lavender-rgb) / 0.1);
  color: rgb(var(--parchment-rgb) / 0.88);
  font-size: 10px;
  line-height: 1.45;
}

.loot-rules-safety {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgb(86 148 197 / 0.25);
  border-radius: 5px;
  background: rgb(31 67 99 / 0.12);
}

.loot-rules-safety strong {
  grid-row: 1 / span 3;
  color: rgb(153 211 246);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loot-rules-safety p {
  margin: 0;
  color: rgb(var(--parchment-rgb) / 0.86);
  font-size: 10px;
  line-height: 1.45;
}

.loot-rule-history {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid rgb(var(--brass-rgb) / 0.18);
}

.loot-rule-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.loot-rule-history-head h3 {
  margin: 0;
  color: rgb(var(--parchment-rgb) / 0.96);
  font-family: var(--font-serif, Georgia, serif);
  font-size: 13px;
}

.loot-rule-history-head button,
.loot-rule-history-row > button {
  padding: 5px 8px;
  border: 1px solid rgb(var(--brass-rgb) / 0.25);
  border-radius: 3px;
  background: rgb(var(--surface-rgb) / 0.52);
  color: rgb(var(--parchment-rgb) / 0.92);
  font-size: 9px;
}

.loot-rule-history-list {
  display: grid;
  gap: 5px;
  max-height: 240px;
  overflow: auto;
}

.loot-rule-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid rgb(var(--lavender-rgb) / 0.09);
  border-radius: 4px;
  background: rgb(0 0 0 / 0.16);
}

.loot-rule-history-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.loot-rule-history-row strong {
  overflow: hidden;
  color: rgb(var(--parchment-rgb) / 0.96);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loot-rule-history-row span,
.loot-rule-history-empty {
  color: rgb(var(--parchment-rgb) / 0.82);
  font-size: 9px;
}

.loot-rule-history-rating {
  color: rgb(162 248 198 / 0.9);
  font-size: 8px;
  font-style: normal;
}

.loot-rule-history-row > button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

@media (max-width: 920px) {
  .loot-rule-presets__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .loot-rule-grid {
    grid-template-columns: 1fr;
  }

  .loot-rules-dialog {
    width: min(720px, calc(100vw - 18px));
  }

  .loot-rules-safety {
    grid-template-columns: 1fr;
  }

  .loot-rules-safety strong {
    grid-row: auto;
  }
}

@media (max-width: 620px) {
  .loot-rules-backdrop {
    place-items: start center;
    padding: 8px;
    overflow: auto;
  }

  .loot-rules-dialog {
    width: 100%;
    max-height: none;
  }

  .loot-rules-editor {
    padding: 15px;
  }

  .loot-rules-header {
    flex-direction: column;
  }

  .loot-rules-header-actions {
    width: 100%;
  }

  .loot-rules-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
  }

  .inventory-loot-rules-button > span:nth-child(2) {
    display: none;
  }

  .loot-rule-presets__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .loot-rule-presets__heading span {
    text-align: left;
  }

  .loot-rule-presets__grid {
    grid-template-columns: 1fr;
  }

  .loot-rule-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .loot-rules-apply-owned {
    width: 100%;
  }

  .loot-rules-confirm-actions {
    flex-direction: column-reverse;
  }

  .loot-rules-confirm-panel button {
    width: 100%;
  }
}
/* Account Vault: reversible Bank subview gated by ACCOUNT_VAULT_ENABLED. */
.account-vault-page {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  overflow: hidden;
  color: var(--color-parchment);
  background:
    radial-gradient(circle at 38% 0%, rgb(var(--brass-rgb) / 0.08), transparent 34%),
    rgb(var(--indigo-rgb) / 0.96);
}
.account-vault-header {
  min-height: 94px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgb(var(--brass-rgb) / 0.24);
}
.account-vault-header-primary {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.account-vault-heading {
  margin: 0 0 5px;
  color: var(--color-parchment);
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-style: italic;
  letter-spacing: 0.035em;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.6);
}
.account-vault-tabs {
  display: inline-flex;
  padding: 3px;
  gap: 3px;
  border: 1px solid rgb(var(--brass-rgb) / 0.3);
  border-radius: 5px;
  background: rgba(3, 9, 19, 0.68);
}
.account-vault-tab {
  min-width: 88px;
  padding: 6px 15px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--color-desert-sand);
  background: transparent;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: 140ms ease;
}
.account-vault-tab:hover {
  color: var(--color-celestial-gold);
  border-color: rgb(var(--brass-rgb) / 0.28);
}
.account-vault-tab.is-active {
  color: #171105;
  border-color: rgb(var(--brass-rgb) / 0.8);
  background: linear-gradient(180deg, #efd27e, #bd8434);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.42), 0 4px 14px rgba(0, 0, 0, 0.3);
}
.bank-storage-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
}
.bank-storage-tab {
  position: relative;
  min-width: 112px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px;
  border: 1px solid rgb(var(--brass-rgb) / 0.28);
  border-radius: 5px;
  color: var(--color-desert-sand);
  background: linear-gradient(180deg, rgba(14, 31, 55, 0.92), rgba(4, 12, 25, 0.95));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  text-align: left;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease, transform 140ms ease;
}
button.bank-storage-tab:hover {
  color: var(--color-celestial-gold);
  border-color: rgb(var(--brass-rgb) / 0.62);
  transform: translateY(-1px);
}
.bank-storage-tab.is-active {
  color: #fff1bd;
  border-color: rgb(var(--brass-rgb) / 0.88);
  background: linear-gradient(180deg, rgb(var(--brass-rgb) / 0.2), rgba(7, 18, 34, 0.96));
  box-shadow: inset 0 0 18px rgb(var(--brass-rgb) / 0.1), 0 0 14px rgb(var(--brass-rgb) / 0.12);
}
.bank-storage-tab-number {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(var(--brass-rgb) / 0.42);
  border-radius: 3px;
  color: var(--color-celestial-gold);
  background: rgba(2, 8, 17, 0.72);
  font-family: var(--font-serif);
  font-size: 0.8rem;
  font-weight: 800;
}
.bank-storage-tab-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.bank-storage-tab-copy strong {
  font-family: var(--font-serif);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.bank-storage-tab-copy small {
  margin-top: 4px;
  color: var(--color-lavender-grey);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.58rem;
  white-space: nowrap;
}
.bank-storage-tab.is-locked {
  min-width: 132px;
  padding-right: 6px;
  opacity: 0.78;
}
.bank-storage-tab.is-locked > img {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid rgb(var(--brass-rgb) / 0.25);
  border-radius: 3px;
  object-fit: cover;
  filter: saturate(0.72) brightness(0.78);
}
.bank-storage-tab-buy {
  margin-left: auto;
  padding: 4px 6px;
  border: 1px solid rgb(var(--brass-rgb) / 0.52);
  border-radius: 3px;
  color: var(--color-celestial-gold);
  background: rgb(var(--brass-rgb) / 0.1);
  font-family: var(--font-serif);
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 140ms ease;
}
.bank-storage-tab-buy:hover {
  color: #171105;
  border-color: rgb(var(--brass-rgb) / 0.9);
  background: var(--color-celestial-gold);
}
.bank-storage-tab-new {
  position: absolute;
  top: -7px;
  right: -5px;
  padding: 2px 5px;
  border: 1px solid rgba(253, 224, 71, 0.65);
  border-radius: 999px;
  color: #fff7ba;
  background: #6f4b08;
  font-family: var(--font-serif);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bank-storage-tab.is-new {
  animation: bank-tab-attention 1.45s ease-in-out infinite;
}
.is-shop-focus {
  animation: bank-tab-shop-focus 1.1s ease-in-out 3;
}
@keyframes bank-tab-attention {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 206, 112, 0.05), inset 0 0 12px rgba(244, 206, 112, 0.05); }
  50% { box-shadow: 0 0 0 4px rgba(244, 206, 112, 0.1), 0 0 20px rgba(244, 206, 112, 0.32), inset 0 0 18px rgba(244, 206, 112, 0.13); }
}
@keyframes bank-tab-shop-focus {
  50% { border-color: rgb(var(--brass-rgb) / 0.95); box-shadow: 0 0 22px rgb(var(--brass-rgb) / 0.42); }
}
@media (prefers-reduced-motion: reduce) {
  .bank-storage-tab.is-new,
  .is-shop-focus { animation: none; }
}
.account-vault-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-lavender-grey);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
}
.account-vault-shared-badge {
  padding: 4px 8px;
  border: 1px solid rgba(74, 222, 128, 0.4);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.28);
  font-family: var(--font-serif);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.account-vault-intro {
  min-height: 17px;
  margin: 0;
  color: var(--color-lavender-grey);
  font-size: 0.72rem;
  line-height: 1.45;
}
.account-vault-page--bank .account-vault-layout {
  min-height: 0;
}
.account-vault-bank-main,
.account-vault-bank-inventory {
  height: 100%;
}
.account-vault-bank-grid,
.account-vault-bank-inventory-grid {
  display: contents;
}
.account-vault-toolbar-action {
  padding: 4px 10px;
  border: 1px solid rgb(var(--brass-rgb) / 0.42);
  border-radius: 3px;
  color: var(--color-celestial-gold);
  background: rgb(var(--brass-rgb) / 0.09);
  font-family: var(--font-serif);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: 140ms ease;
}
.account-vault-toolbar-action:hover {
  border-color: rgb(var(--brass-rgb) / 0.72);
  background: rgb(var(--brass-rgb) / 0.16);
}
.account-vault-toolbar-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}
.account-vault-toolbar-action.is-active {
  border-color: rgb(var(--brass-rgb) / 0.78);
  color: var(--color-ivory-beige);
  background: rgb(var(--brass-rgb) / 0.2);
}
.account-vault-toolbar-action.is-primary {
  border-color: rgba(74, 222, 128, 0.58);
  color: #bbf7d0;
  background: rgba(21, 128, 61, 0.3);
}
.account-vault-toolbar-action.is-primary:hover:not(:disabled) {
  border-color: rgba(74, 222, 128, 0.82);
  background: rgba(21, 128, 61, 0.46);
}
.account-vault-bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 7px;
  border: 1px solid rgb(var(--brass-rgb) / 0.2);
  border-radius: 5px;
  background: rgba(2, 8, 18, 0.58);
}
.account-vault-bulk-toolbar__summary {
  min-width: 0;
  margin-left: auto;
  color: var(--color-lavender-grey);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  white-space: nowrap;
}
.account-vault-lock-notice {
  padding: 8px 11px;
  border: 1px solid rgba(248, 113, 113, 0.42);
  border-radius: 4px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.22);
  font-size: 0.72rem;
}
.account-vault-loading {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--color-desert-sand);
  font-family: var(--font-serif);
  font-style: italic;
}
.account-vault-layout {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(295px, 350px);
  gap: 18px;
  overflow: hidden;
}
.account-vault-main,
.account-vault-inventory {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgb(var(--brass-rgb) / 0.26);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(11, 25, 48, 0.88), rgba(4, 12, 25, 0.92));
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.24), 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: border-color 140ms ease, background 140ms ease;
}
.account-vault-main.is-drop-target,
.account-vault-inventory.is-drop-target {
  border-color: rgb(var(--brass-rgb) / 0.82);
  background: linear-gradient(180deg, rgb(var(--brass-rgb) / 0.12), rgba(4, 12, 25, 0.94));
}
.account-vault-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.bank-active-tab-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.bank-tab-name-input {
  width: min(220px, 42vw);
  height: 28px;
  padding: 0 8px;
  border: 1px solid rgb(var(--brass-rgb) / 0.58);
  border-radius: 4px;
  color: var(--color-celestial-gold);
  background: rgba(3, 9, 19, 0.94);
  font: 700 0.78rem/1 var(--font-serif);
  outline: 0;
  user-select: text !important;
}
.bank-tab-name-input:focus {
  border-color: rgb(var(--brass-rgb) / 0.92);
  box-shadow: 0 0 12px rgb(var(--brass-rgb) / 0.16);
}
.bank-tab-rename-button {
  padding: 4px 7px;
  border: 1px solid rgb(var(--brass-rgb) / 0.34);
  border-radius: 4px;
  color: var(--color-celestial-gold);
  background: rgb(var(--brass-rgb) / 0.08);
  font: 800 0.52rem/1 var(--font-ui, inherit);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bank-tab-rename-button:hover,
.bank-tab-rename-button:focus-visible {
  border-color: rgb(var(--brass-rgb) / 0.72);
  background: rgb(var(--brass-rgb) / 0.16);
}
.bank-tab-rename-button--cancel {
  color: var(--color-lavender-grey);
  border-color: rgba(144, 136, 168, 0.3);
  background: rgba(144, 136, 168, 0.08);
}
.account-vault-section-heading h3 {
  margin: 0;
  color: var(--color-celestial-gold);
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
}
.account-vault-section-heading span,
.account-vault-inventory-hint {
  color: var(--color-lavender-grey);
  font-size: 0.61rem;
  line-height: 1.35;
}
.account-vault-source-tabs {
  align-self: flex-start;
}
.account-vault-source-tabs .account-vault-tab {
  min-width: 74px;
  padding: 5px 11px;
  font-size: 0.58rem;
}
.account-vault-inventory-hint { margin: -2px 0 0; }
.account-vault-grid,
.account-vault-inventory-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  align-content: start;
  gap: 6px;
  padding: 3px;
  overflow-y: auto;
}
.account-vault-grid { flex: 1; }
.account-vault-inventory-grid {
  flex: 1;
  grid-template-columns: repeat(auto-fill, minmax(55px, 1fr));
}
.account-vault-slot {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(107, 114, 128, 0.62);
  border-radius: 5px;
  background: rgba(1, 7, 16, 0.78);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.35);
  cursor: grab;
  transition: transform 120ms ease, filter 120ms ease, border-color 120ms ease;
}
.account-vault-slot:hover:not(:disabled) {
  z-index: 2;
  transform: translateY(-1px) scale(1.035);
  filter: brightness(1.12);
}
.account-vault-slot.is-selected {
  z-index: 2;
  border-color: var(--color-celestial-gold);
  box-shadow:
    inset 0 0 0 1px rgb(var(--brass-rgb) / 0.75),
    0 0 0 2px rgba(245, 196, 81, 0.2),
    0 0 14px rgba(245, 196, 81, 0.36);
  cursor: pointer;
}
.account-vault-slot:disabled { cursor: wait; opacity: 0.72; }
.account-vault-slot.is-empty {
  border-color: rgba(51, 65, 85, 0.56);
  background: rgba(0, 4, 10, 0.34);
  cursor: default;
}
.account-vault-slot.rarity-uncommon { border-color: rgba(34, 197, 94, 0.72); }
.account-vault-slot.rarity-rare {
  border-width: 1px;
  border-color: #7dd3fc;
}
.account-vault-slot.rarity-epic { border-color: var(--rarity-epic); }
.account-vault-slot.rarity-legendary { border-color: rgba(245, 158, 11, 0.9); }
.account-vault-slot.rarity-mythic {
  border-color: var(--rarity-mythic);
  border-style: double;
  border-width: 3px;
  box-shadow: 0 0 12px color-mix(in srgb, var(--rarity-mythic) 42%, transparent);
}
.account-vault-slot.rarity-living {
  border-color: var(--rarity-living);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 32%, transparent);
}
.account-vault-slot.is-blocked {
  cursor: not-allowed;
  filter: saturate(0.35) brightness(0.62);
}
.account-vault-slot.is-level-locked {
  box-shadow:
    inset 0 0 0 1px rgba(127, 29, 29, 0.46),
    0 0 10px rgba(239, 68, 68, 0.2);
}
.account-vault-slot.is-level-locked .account-vault-slot-image {
  filter: saturate(0.34) brightness(0.58);
}
.account-vault-slot-image {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  object-fit: cover;
  pointer-events: none;
}
.account-vault-slot-icon { font-size: 1.7rem; pointer-events: none; }
.account-vault-slot-count {
  position: absolute;
  right: 2px;
  bottom: 2px;
  z-index: 2;
  padding: 0 3px;
  border-radius: 3px;
  color: #fff;
  background: rgba(2, 6, 23, 0.82);
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.3;
  pointer-events: none;
}
.account-vault-slot-lock {
  position: absolute;
  top: -4px;
  left: -4px;
  z-index: 4;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(248, 113, 113, 0.72);
  border-radius: 50%;
  color: #fee2e2;
  background: #4c1016;
  font-size: 0.55rem;
  filter: none;
}
.account-vault-slot-use-lock {
  top: -4px;
  right: -4px;
  left: auto;
}
.account-vault-history {
  border-top: 1px solid rgb(var(--brass-rgb) / 0.18);
  padding-top: 6px;
}
.account-vault-history-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  color: var(--color-desert-sand);
  font-family: var(--font-serif);
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.account-vault-history-list {
  max-height: 94px;
  margin-top: 6px;
  overflow-y: auto;
  color: var(--color-lavender-grey);
  font-size: 0.62rem;
}
.account-vault-history-list > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) minmax(72px, auto);
  gap: 7px;
  padding: 4px 3px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}
.account-vault-history-list strong {
  overflow: hidden;
  color: var(--color-parchment);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-vault-history-list .is-deposit { color: #86efac; }
.account-vault-history-list .is-withdraw { color: #93c5fd; }
@media (max-width: 900px) {
  .account-vault-page { height: auto; min-height: 100%; overflow: visible; }
  .account-vault-layout { display: flex; flex-direction: column; overflow: visible; }
  .account-vault-main,
  .account-vault-inventory { min-height: 420px; overflow: visible; }
  .account-vault-grid,
  .account-vault-inventory-grid { max-height: 55vh; }
  .account-vault-header { align-items: flex-start; }
  .account-vault-header-meta { flex-direction: column; align-items: flex-end; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .account-vault-tab,
  .account-vault-main,
  .account-vault-inventory,
  .account-vault-slot { transition: none; }
  .account-vault-slot:hover:not(:disabled) { transform: none; }
}

/* High-visibility Loot Rules controls. */
.loot-rules-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-height: min(900px, calc(100dvh - 32px));
  border-color: rgb(var(--brass-rgb) / 0.72);
  box-shadow:
    0 34px 100px rgb(0 0 0 / 0.82),
    0 0 34px rgb(var(--brass-rgb) / 0.09),
    inset 0 1px rgb(255 245 215 / 0.09);
}

.loot-rules-editor { padding: 26px; }
.loot-rules-header { gap: 22px; padding-bottom: 18px; }
.loot-rules-kicker { font-size: 10px; }
.loot-rules-header h2 { font-size: 28px; }
.loot-rules-header p {
  max-width: 760px;
  font-size: 13px;
  line-height: 1.55;
}
.loot-rules-close {
  width: 40px;
  height: 40px;
  border-color: rgb(var(--brass-rgb) / 0.58);
  color: rgb(var(--parchment-rgb) / 0.94);
}
.loot-rule-presets {
  margin-top: 18px;
  padding: 16px;
  border-color: rgb(var(--brass-rgb) / 0.34);
  background:
    radial-gradient(circle at 100% 0%, rgb(var(--royal-rgb) / 0.17), transparent 42%),
    rgb(0 0 0 / 0.22);
}
.loot-rule-presets__heading { margin-bottom: 13px; }
.loot-rule-presets__heading h3 { font-size: 16px; }
.loot-rule-presets__heading span {
  color: rgb(var(--parchment-rgb) / 0.9);
  font-size: 11px;
}
.loot-rule-presets__grid { gap: 12px; }
.loot-rule-preset {
  min-height: 92px;
  padding: 14px;
  border-color: rgb(var(--lavender-rgb) / 0.25);
  background: linear-gradient(180deg, rgb(var(--surface-rgb) / 0.78), rgb(2 8 18 / 0.76));
}
.loot-rule-preset strong { font-size: 13px; }
.loot-rule-preset span {
  color: rgb(var(--parchment-rgb) / 0.88);
  font-size: 11px;
  line-height: 1.45;
}
.loot-rule-summary {
  margin: 14px 0;
  padding: 11px 14px;
  border-left-width: 3px;
  background: linear-gradient(90deg, rgb(var(--brass-rgb) / 0.15), transparent);
  font-size: 12px;
}
.loot-rules-apply-owned {
  padding: 9px 13px;
  font-size: 10px;
}
.loot-rule-grid { gap: 14px; }
.loot-rule-card {
  padding: 16px;
  border-color: rgb(var(--lavender-rgb) / 0.22);
  background: linear-gradient(180deg, rgb(var(--surface-rgb) / 0.82), rgb(2 8 18 / 0.76));
  opacity: 1;
}
.loot-rule-card.is-enabled {
  border-color: rgb(89 220 145 / 0.58);
  box-shadow:
    inset 0 1px rgb(220 255 233 / 0.08),
    0 0 18px rgb(57 220 130 / 0.08);
}
.loot-rule-card-head { margin-bottom: 14px; }
.loot-rule-card-head h3 { font-size: 17px; }
.loot-rule-field {
  gap: 7px;
  margin-top: 11px;
  font-size: 10px;
}
.loot-rule-field select,
.loot-rule-field input[type="number"],
.loot-rule-field .loot-rule-select-trigger {
  min-height: 40px;
  padding: 9px 11px;
  font-size: 13px;
}
.loot-rule-field .loot-rule-select-trigger:disabled,
.loot-rule-field input:disabled {
  color: rgb(var(--parchment-rgb) / 0.68);
  opacity: 0.72;
}
.loot-rule-check {
  gap: 9px;
  margin-top: 12px;
  color: rgb(var(--parchment-rgb) / 0.96);
  font-size: 12px;
  line-height: 1.4;
}
.loot-rule-check input {
  width: 16px;
  height: 16px;
}
.loot-rule-preview {
  margin-top: 12px;
  padding-top: 11px;
  color: rgb(var(--parchment-rgb) / 0.94);
  font-size: 11px;
  line-height: 1.55;
}
.loot-rules-safety {
  margin-top: 14px;
  padding: 12px 15px;
  border-color: rgb(86 148 197 / 0.4);
}
.loot-rules-safety strong { font-size: 11px; }
.loot-rules-safety p { font-size: 11px; }
.loot-rule-history { margin-top: 14px; padding-top: 14px; }
.loot-rule-history-head h3 { font-size: 15px; }
.loot-rule-history-row strong { font-size: 12px; }
.loot-rule-history-row span,
.loot-rule-history-empty { font-size: 11px; }

.loot-rule-card:not(.is-enabled) {
  border-color: rgb(var(--brass-rgb) / 0.32);
  background: linear-gradient(180deg, rgb(var(--surface-rgb) / 0.68), rgb(2 8 18 / 0.72));
  opacity: 0.82;
}

.loot-rule-toggle {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.loot-rule-toggle {
  min-width: 62px;
  min-height: 32px;
  padding: 7px 10px 7px 21px;
  border-color: rgb(var(--brass-rgb) / 0.62);
  background: linear-gradient(180deg, rgb(var(--brass-rgb) / 0.18), rgb(0 0 0 / 0.28));
  color: rgb(var(--brass-rgb) / 0.98);
  font-size: 9px;
  box-shadow: 0 0 12px rgb(var(--brass-rgb) / 0.14), inset 0 1px rgb(255 248 220 / 0.08);
}

.loot-rule-toggle::before {
  position: absolute;
  top: 50%;
  left: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--brass-rgb) / 0.9);
  box-shadow: 0 0 8px rgb(var(--brass-rgb) / 0.62);
  content: "";
  transform: translateY(-50%);
}

.loot-rule-toggle.is-on {
  border-color: rgb(89 220 145 / 0.82);
  background: linear-gradient(180deg, rgb(48 145 92 / 0.42), rgb(15 72 48 / 0.38));
  color: rgb(154 255 196);
  box-shadow: 0 0 17px rgb(57 220 130 / 0.3), inset 0 1px rgb(220 255 233 / 0.14);
}

.loot-rule-toggle.is-on::before {
  background: rgb(135 255 184);
  box-shadow: 0 0 10px rgb(85 255 155 / 0.92);
}

.loot-rule-toggle::after {
  position: absolute;
  top: -45%;
  bottom: -45%;
  left: -35%;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgb(255 249 218 / 0.48), transparent);
  content: "";
  pointer-events: none;
  transform: skewX(-20deg);
  animation: loot-rule-shine 3.2s ease-in-out infinite;
}

.loot-rule-toggle.is-on::after {
  background: linear-gradient(90deg, transparent, rgb(204 255 224 / 0.56), transparent);
  animation-duration: 2.6s;
}

@keyframes loot-rule-shine {
  0%, 62% { left: -35%; opacity: 0; }
  70% { opacity: 1; }
  88%, 100% { left: 125%; opacity: 0; }
}

@media (max-width: 620px) {
  .loot-rules-editor { padding: 15px; }
  .loot-rules-header h2 { font-size: 24px; }
  .loot-rule-preset { min-height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  .loot-rule-toggle::after { animation: none !important; }
}
/* Subclass bonus rows expose their mechanics through the global foreground help overlay. */
.talent-subclass-bonus-help {
  cursor: help;
  transition: border-color 140ms ease, background-color 140ms ease, filter 140ms ease;
}
.talent-subclass-bonus-help:hover,
.talent-subclass-bonus-help:focus-visible {
  filter: brightness(1.14);
}
.talent-subclass-bonus-help:focus-visible {
  outline: 1px solid rgb(var(--brass-rgb) / 0.78);
  outline-offset: 2px;
}
.talent-subclass-bonus-help__label {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: rgb(var(--brass-rgb) / 0.55);
  text-underline-offset: 3px;
}
.talent-subclass-bonus-help__mark {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgb(var(--brass-rgb) / 0.52);
  border-radius: 50%;
  color: rgb(var(--brass-rgb));
  background: rgb(var(--indigo-rgb) / 0.7);
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  .talent-subclass-bonus-help { transition: none; }
}
.inventory-item-recipe-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  padding: 0.1rem 0;
  border: 0;
  color: var(--color-celestial-gold, #ffd666);
  background: transparent;
  font-size: 11px;
  line-height: 1.3;
  text-align: left;
  text-decoration-line: underline;
  text-decoration-color: rgb(var(--brass-rgb) / 0.68);
  text-underline-offset: 2px;
  cursor: pointer;
  transition: color 120ms ease, filter 120ms ease;
}
.inventory-item-recipe-link:hover,
.inventory-item-recipe-link:focus-visible {
  color: #ffe89a;
  filter: brightness(1.12);
}
.inventory-item-recipe-link:focus-visible {
  outline: 1px solid rgb(var(--brass-rgb) / 0.82);
  outline-offset: 2px;
}
.inventory-item-recipe-link__icon {
  flex: 0 0 1rem;
  width: 1rem;
  text-align: center;
  text-decoration: none;
}
.inventory-item-recipe-link__copy {
  min-width: 0;
  flex: 1 1 auto;
}
.inventory-item-recipe-link__label {
  font-weight: 600;
}
.inventory-item-recipe-link__detail {
  margin-left: 0.25rem;
  color: inherit;
  opacity: 0.78;
}
.inventory-item-recipe-link__arrow {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}
@media (prefers-reduced-motion: reduce) {
  .inventory-item-recipe-link { transition: none; }
}
.inventory-select-toggle {
  min-height: 34px;
  min-width: 112px;
  padding: 6px 10px !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
}

.inventory-bulk-toolbar {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  padding: 9px 10px;
  border: 1px solid rgb(var(--brass-rgb) / 0.36);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgb(var(--indigo-rgb) / 0.88), rgba(5, 11, 22, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 8px 18px rgba(0, 0, 0, 0.24);
}

.inventory-bulk-toolbar__summary {
  min-width: 185px;
  flex: 1 1 185px;
  color: var(--color-desert-sand);
  font-size: 11px;
  line-height: 1.35;
}

.inventory-bulk-rarity-threshold {
  width: 118px;
  flex: 0 0 118px;
}

.inventory-bulk-rarity-threshold__trigger {
  width: 100%;
}

.inventory-bulk-confirm-toggle {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  gap: 7px;
  padding: 5px 9px;
  border: 1px solid rgb(var(--brass-rgb) / 0.32);
  border-radius: 4px;
  background: rgba(5, 12, 25, 0.72);
  color: rgba(225, 214, 190, 0.76);
  cursor: pointer;
  font: 800 10px/1.15 var(--font-ui, inherit);
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.inventory-bulk-confirm-toggle.is-enabled {
  border-color: rgba(245, 216, 119, 0.56);
  color: #f4ddaa;
}

.inventory-bulk-confirm-toggle input {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  accent-color: var(--color-celestial-gold);
}

.inventory-bulk-toolbar__utility,
.inventory-bulk-toolbar__action {
  min-height: 31px;
  border: 1px solid rgb(var(--brass-rgb) / 0.35);
  border-radius: 4px;
  padding: 6px 10px;
  font-family: var(--font-serif);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  line-height: 1.15;
  text-transform: uppercase;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.inventory-bulk-toolbar__utility {
  background: rgba(5, 12, 25, 0.7);
  color: var(--color-desert-sand);
}

.inventory-bulk-toolbar__action.is-sell {
  border-color: rgba(74, 222, 128, 0.5);
  background: rgba(21, 128, 61, 0.25);
  color: #bbf7d0;
}

.inventory-bulk-toolbar__action.is-bank {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(30, 64, 175, 0.24);
  color: #dbeafe;
}

.inventory-bulk-toolbar__action.is-salvage {
  min-width: 116px;
  padding: 6px 10px;
  font-size: 10px;
}

.inventory-bulk-toolbar button:hover:not(:disabled) {
  border-color: rgb(var(--brass-rgb) / 0.76);
  color: var(--color-parchment);
}

.inventory-bulk-toolbar button:active:not(:disabled) {
  transform: translateY(1px);
}

.inventory-bulk-toolbar button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.modal-overlay > .panel-painted.w-80[role="dialog"] {
  width: min(460px, calc(100vw - 32px)) !important;
  padding: 28px !important;
}

.modal-overlay > .panel-painted.w-80[role="dialog"] > h3 {
  font-size: 1.45rem !important;
  line-height: 1.2 !important;
}

.modal-overlay > .panel-painted.w-80[role="dialog"] > p {
  color: rgba(244, 235, 215, 0.9) !important;
  font-size: 0.98rem !important;
  font-style: normal !important;
  line-height: 1.55 !important;
}

.inventory-confirm-preference {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: -8px 0 18px;
  padding: 10px 12px;
  border: 1px solid rgb(var(--brass-rgb) / 0.28);
  border-radius: 5px;
  background: rgba(6, 12, 25, 0.58);
  color: rgba(244, 235, 215, 0.88);
  cursor: pointer;
  font: 700 12px/1.35 var(--font-body, inherit);
}

.inventory-confirm-preference:hover {
  border-color: rgb(var(--brass-rgb) / 0.58);
  background: rgba(15, 24, 45, 0.78);
}

.inventory-confirm-preference input {
  width: 15px;
  height: 15px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: var(--color-celestial-gold);
}

.inventory-action-amount {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px minmax(44px, 58px) 32px 44px;
  align-items: center;
  gap: 5px;
  margin: 0 12px 8px;
  padding: 8px;
  border: 1px solid rgb(var(--brass-rgb) / 0.3);
  border-radius: 5px;
  background: rgba(4, 9, 20, 0.68);
}

.inventory-action-amount__label {
  min-width: 0;
  overflow: hidden;
  color: var(--color-desert-sand);
  font-family: var(--font-serif);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.inventory-action-amount button,
.inventory-action-amount input {
  height: 31px;
  width: 100%;
  min-width: 0;
  border: 1px solid rgb(var(--brass-rgb) / 0.42);
  border-radius: 4px;
  background: rgba(12, 21, 40, 0.92);
  color: var(--color-parchment);
  text-align: center;
}

.inventory-action-amount input {
  padding: 0 4px;
  font: 700 12px/1 var(--font-mono);
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    background-color 120ms ease;
}

.inventory-action-amount button {
  position: relative;
  overflow: hidden;
  cursor: var(--vespera-cursor-pointer);
  font-weight: 800;
  transition:
    transform 80ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    background-color 120ms ease,
    color 120ms ease;
}

.inventory-action-amount button:not(:disabled):hover {
  border-color: rgb(var(--brass-rgb) / 0.9);
  background: rgb(var(--brass-rgb) / 0.18);
  color: var(--color-celestial-gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 10px rgb(var(--brass-rgb) / 0.2);
}

.inventory-action-amount button:not(:disabled):active {
  transform: translateY(1px) scale(0.94);
  border-color: rgb(var(--brass-rgb) / 1);
  background: rgb(var(--brass-rgb) / 0.3);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.55),
    0 0 13px rgb(var(--brass-rgb) / 0.34);
}

.inventory-action-amount button:focus-visible,
.inventory-action-amount input:focus-visible {
  outline: 2px solid var(--color-celestial-gold);
  outline-offset: 2px;
  border-color: rgb(var(--brass-rgb) / 1);
  box-shadow: 0 0 12px rgb(var(--brass-rgb) / 0.32);
}

.inventory-action-amount input:focus-visible {
  background: rgba(18, 31, 57, 0.98);
}

.inventory-action-amount button:disabled {
  cursor: not-allowed;
  border-color: rgba(111, 104, 128, 0.28);
  background: rgba(8, 14, 27, 0.62);
  color: #6f6880;
  opacity: 0.48;
}

.inventory-action-amount__max {
  padding-inline: 3px;
  color: var(--color-celestial-gold) !important;
  font: 800 9px/1 var(--font-serif);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .inventory-bulk-toolbar__summary {
    flex-basis: 100%;
  }

  .inventory-bulk-rarity-threshold {
    flex: 1 1 132px;
    width: auto;
  }

  .inventory-bulk-toolbar__utility,
  .inventory-bulk-toolbar__action {
    flex: 1 1 132px;
  }
}

.dungeon-signature-mechanic {
  position: relative;
  z-index: 2;
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  overflow: visible;
  border: 1px solid rgba(219, 166, 72, 0.48);
  border-radius: 0.55rem;
  background:
    linear-gradient(135deg, rgba(65, 24, 33, 0.86), rgba(8, 18, 36, 0.94)),
    radial-gradient(circle at 85% 0%, rgba(230, 154, 51, 0.18), transparent 46%);
  box-shadow: inset 0 0 20px rgba(249, 115, 22, 0.06), 0 8px 24px rgba(0, 0, 0, 0.22);
}
.dungeon-signature-mechanic__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.dungeon-signature-mechanic__header > div {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}
.dungeon-signature-mechanic__eyebrow {
  color: #d7a550;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.dungeon-signature-mechanic__header strong {
  color: #fff0d0;
  font-family: var(--font-serif, serif);
  font-size: 0.9rem;
  letter-spacing: 0.025em;
}
.dungeon-signature-mechanic__status {
  flex: 0 0 auto;
  max-width: 55%;
  color: #f6d58d;
  font-size: 0.68rem;
  font-weight: 750;
  text-align: right;
}
.dungeon-signature-mechanic__track {
  height: 0.42rem;
  margin-top: 0.55rem;
  overflow: hidden;
  border: 1px solid rgba(255, 231, 183, 0.16);
  border-radius: 999px;
  background: rgba(3, 9, 20, 0.82);
}
.dungeon-signature-mechanic__track > span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #9b2d36, #e28c36 66%, #f3d27a);
  box-shadow: 0 0 12px rgba(238, 164, 63, 0.45);
  transition: width 220ms ease;
}
.dungeon-signature-mechanic--overheated .dungeon-signature-mechanic__track > span,
.dungeon-signature-mechanic--exposed .dungeon-signature-mechanic__track > span,
.dungeon-signature-mechanic--passed .dungeon-signature-mechanic__track > span {
  background: linear-gradient(90deg, #277b68, #5bc795, #b8f4bd);
}
.dungeon-signature-mechanic--reflecting {
  border-color: rgba(232, 90, 103, 0.72);
  box-shadow: inset 0 0 24px rgba(225, 44, 74, 0.13), 0 0 20px rgba(225, 44, 74, 0.08);
}
.dungeon-signature-mechanic p {
  margin: 0.5rem 0 0;
  color: rgba(232, 225, 214, 0.78);
  font-size: 0.65rem;
  line-height: 1.35;
}
.dungeon-signature-mechanic p.dungeon-signature-mechanic__description {
  color: rgba(245, 237, 222, 0.92);
  font-size: 0.7rem;
}
.dungeon-signature-mechanic p.dungeon-signature-mechanic__counter {
  margin-top: 0.3rem;
}
.dungeon-signature-mechanic p b { color: #d7a550; }
@media (max-width: 760px) {
  .dungeon-signature-mechanic__header { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
  .dungeon-signature-mechanic__status { max-width: 100%; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  .dungeon-signature-mechanic__track > span { transition: none; }
}

/* Dungeon Journal */
.dungeon-journal {
  --journal-gold: #d7a550;
  --journal-ink: #07111f;
  min-height: 100%;
  padding: clamp(1rem, 2.2vw, 2rem);
  color: #e9e1d4;
  background:
    radial-gradient(circle at 82% 0%, rgba(100, 66, 145, 0.16), transparent 30rem),
    radial-gradient(circle at 0% 15%, rgba(18, 93, 113, 0.12), transparent 34rem);
}
.dungeon-journal-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 1rem 1.2rem 1.15rem;
  border: 1px solid rgba(215, 165, 80, 0.28);
  border-radius: 0.9rem;
  background: linear-gradient(115deg, rgba(8, 18, 33, 0.96), rgba(20, 15, 35, 0.94));
  box-shadow: inset 0 1px rgba(255, 245, 216, 0.06), 0 16px 45px rgba(0, 0, 0, 0.24);
}
.dungeon-journal-eyebrow,
.dungeon-journal-build > span,
.dungeon-journal-dungeon-header > div:first-child > span,
.dungeon-journal-enemy > header > div:nth-child(2) > p,
.dungeon-journal-section__heading p {
  margin: 0 0 0.3rem;
  color: #d7a550;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}
.dungeon-journal-hero h1 {
  margin: 0;
  color: #f5eddf;
  font: italic 700 clamp(1.8rem, 3vw, 2.7rem)/1.05 var(--font-serif, Georgia, serif);
  letter-spacing: 0.02em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}
.dungeon-journal-hero > div:first-child > p:last-child {
  max-width: 54rem;
  margin: 0.5rem 0 0;
  color: rgba(219, 211, 220, 0.7);
  font-size: 0.95rem;
  line-height: 1.55;
}
.dungeon-journal-build {
  position: relative;
  min-width: 15rem;
  padding: 0.75rem 1rem;
  overflow: hidden;
  border: 1px solid rgba(215, 165, 80, 0.32);
  border-radius: 0.65rem;
  background: linear-gradient(135deg, rgba(94, 57, 15, 0.25), rgba(4, 12, 24, 0.82));
}
.dungeon-journal-build::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.22rem;
  background: #d7a550;
}
.dungeon-journal-build--arcanist::before { background: #38bdf8; }
.dungeon-journal-build--warden::before { background: #34d399; }
.dungeon-journal-build--nightblade::before { background: #a855f7; }
.dungeon-journal-build strong,
.dungeon-journal-build small { display: block; }
.dungeon-journal-build strong { color: #fff2d1; font-family: var(--font-serif, Georgia, serif); font-size: 1.08rem; }
.dungeon-journal-build small { margin-top: 0.28rem; color: rgba(232, 224, 214, 0.76); font-size: 0.78rem; }
.dungeon-journal-shell {
  display: grid;
  grid-template-columns: minmax(18rem, 21rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.dungeon-journal-dungeons {
  position: sticky;
  top: 0.75rem;
  max-height: calc(100vh - 8rem);
  padding: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(132, 151, 184, 0.2);
  border-radius: 0.8rem;
  background: linear-gradient(180deg, rgba(7, 17, 31, 0.97), rgba(8, 12, 24, 0.97));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}
.dungeon-journal-dungeons > label {
  display: block;
  margin: 0 0 0.4rem;
  color: rgba(233, 225, 212, 0.68);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.dungeon-journal-dungeons > input {
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0.62rem 0.68rem;
  border: 1px solid rgba(131, 151, 187, 0.24);
  border-radius: 0.45rem;
  outline: none;
  color: #f2ebdf;
  background: rgba(2, 8, 17, 0.72);
  font-size: 0.88rem;
}
.dungeon-journal-dungeons > input:focus { border-color: rgba(215, 165, 80, 0.65); box-shadow: 0 0 0 2px rgba(215, 165, 80, 0.1); }
.dungeon-journal-dungeons nav {
  display: grid;
  gap: 0.38rem;
  max-height: calc(100vh - 13.4rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(215, 165, 80, 0.38) rgba(2, 7, 14, 0.4);
}
.dungeon-journal-dungeons nav button {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.58rem;
  border: 1px solid transparent;
  border-radius: 0.55rem;
  text-align: left;
  color: rgba(229, 222, 211, 0.72);
  background: transparent;
  transition: 130ms ease;
}
.dungeon-journal-dungeons nav button:hover { border-color: rgba(132, 151, 184, 0.23); background: rgba(45, 57, 81, 0.28); }
.dungeon-journal-dungeons nav button.is-active {
  border-color: rgba(215, 165, 80, 0.46);
  color: #fff0d1;
  background: linear-gradient(100deg, rgba(116, 75, 24, 0.34), rgba(19, 28, 45, 0.42));
  box-shadow: inset 3px 0 #d7a550;
}
.dungeon-journal-dungeons nav img { width: 3.2rem; height: 3.2rem; border-radius: 0.42rem; object-fit: cover; filter: saturate(0.9); }
.dungeon-journal-dungeons nav span,
.dungeon-journal-dungeons nav strong,
.dungeon-journal-dungeons nav small { display: block; min-width: 0; }
.dungeon-journal-dungeons nav strong { color: rgba(239, 232, 221, 0.9); font-size: 0.92rem; line-height: 1.25; white-space: normal; }
.dungeon-journal-dungeons nav small { margin-top: 0.24rem; color: rgba(203, 213, 230, 0.76); font-size: 0.76rem; line-height: 1.3; }
.dungeon-journal-dossier {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(132, 151, 184, 0.2);
  border-radius: 0.9rem;
  background: linear-gradient(160deg, rgba(7, 16, 29, 0.97), rgba(10, 12, 24, 0.98));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
}
.dungeon-journal-dungeon-header {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  min-height: 10rem;
  padding: 1.3rem 1.5rem;
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid rgba(215, 165, 80, 0.22);
  background: linear-gradient(90deg, rgba(5, 13, 26, 0.98) 12%, rgba(6, 14, 27, 0.86) 55%, rgba(6, 13, 24, 0.45)), var(--journal-art) center 42% / cover;
}
.dungeon-journal-dungeon-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(3, 8, 16, 0.92), transparent 72%);
}
.dungeon-journal-dungeon-header h2 { margin: 0; color: #fff0d5; font: italic 700 clamp(1.4rem, 2.5vw, 2.1rem)/1.1 var(--font-serif, Georgia, serif); }
.dungeon-journal-dungeon-header p { max-width: 48rem; margin: 0.45rem 0 0; color: rgba(239, 232, 221, 0.84); font-size: 0.88rem; line-height: 1.55; }
.dungeon-journal-dungeon-header > div:last-child { display: grid; justify-items: center; min-width: 5rem; padding: 0.6rem; border: 1px solid rgba(215, 165, 80, 0.32); background: rgba(3, 9, 18, 0.68); }
.dungeon-journal-dungeon-header > div:last-child strong { color: #f0c878; font: 700 1.5rem/1 var(--font-serif, Georgia, serif); }
.dungeon-journal-dungeon-header > div:last-child span { margin-top: 0.25rem; color: rgba(238, 230, 217, 0.72); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em; }
.dungeon-journal-encounter-tabs {
  display: flex;
  gap: 0.42rem;
  padding: 0.7rem;
  overflow-x: auto;
  border-bottom: 1px solid rgba(132, 151, 184, 0.16);
  background: rgba(2, 8, 17, 0.68);
}
.dungeon-journal-encounter-tabs button {
  display: grid;
  grid-template-columns: auto 2.6rem auto;
  align-items: center;
  gap: 0.45rem;
  flex: 1 0 9rem;
  max-width: 14rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(132, 151, 184, 0.15);
  border-radius: 0.42rem;
  color: rgba(225, 218, 208, 0.66);
  background: rgba(25, 34, 52, 0.34);
  font-size: 0.8rem;
  text-align: left;
}
.dungeon-journal-encounter-tabs button > span { color: rgba(226, 181, 104, 0.76); font: 700 0.7rem/1 var(--font-mono, monospace); }
.dungeon-journal-encounter-tabs button img { width: 2.6rem; height: 2.6rem; border-radius: 50%; object-fit: cover; }
.dungeon-journal-encounter-tabs button.is-active { border-color: rgba(215, 165, 80, 0.48); color: #fff0d5; background: rgba(106, 70, 25, 0.28); box-shadow: inset 0 -2px #d7a550; }
.dungeon-journal-enemy { padding: clamp(0.85rem, 2vw, 1.4rem); }
.dungeon-journal-enemy > header {
  display: grid;
  grid-template-columns: 5.8rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(132, 151, 184, 0.18);
  background: linear-gradient(100deg, rgba(24, 33, 52, 0.55), rgba(13, 18, 32, 0.68));
}
.dungeon-journal-enemy__portrait { position: relative; width: 5.8rem; height: 5.8rem; padding: 0.2rem; border: 1px solid rgba(215, 165, 80, 0.52); background: rgba(2, 8, 16, 0.9); transform: rotate(-1deg); }
.dungeon-journal-enemy__portrait img { width: 100%; height: 100%; object-fit: cover; }
.dungeon-journal-enemy > header h3 { margin: 0; color: #fff2dd; font: italic 700 clamp(1.25rem, 2vw, 1.7rem)/1.1 var(--font-serif, Georgia, serif); }
.dungeon-journal-enemy > header > div:nth-child(2) > span { color: rgba(226, 218, 208, 0.74); font-size: 0.86rem; }
.dungeon-journal-enemy__identity { display: flex; align-items: flex-end; flex-direction: column; gap: 0.3rem; }
.dungeon-journal-enemy__identity span { padding: 0.3rem 0.6rem; border: 1px solid rgba(132, 151, 184, 0.24); border-radius: 999px; color: rgba(235, 228, 217, 0.84); background: rgba(5, 11, 22, 0.66); font-size: 0.72rem; text-transform: capitalize; }
.dungeon-journal-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.45rem; margin-top: 0.55rem; }
.dungeon-journal-stat-grid > div { padding: 0.55rem 0.65rem; border: 1px solid rgba(132, 151, 184, 0.14); background: rgba(4, 10, 20, 0.56); }
.dungeon-journal-stat-grid span,
.dungeon-journal-stat-grid strong { display: block; }
.dungeon-journal-stat-grid span { color: rgba(195, 205, 222, 0.72); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; }
.dungeon-journal-stat-grid strong { margin-top: 0.22rem; color: #f0d5a1; font: 700 1.05rem/1.2 var(--font-mono, monospace); }
.dungeon-journal-section { margin-top: 0.8rem; padding: 1rem; border: 1px solid rgba(132, 151, 184, 0.2); background: rgba(4, 10, 20, 0.56); }
.dungeon-journal-section > h4,
.dungeon-journal-section__heading h4 { margin: 0 0 0.65rem; color: #f4eadb; font: 700 1.05rem/1.2 var(--font-serif, Georgia, serif); }
.dungeon-journal-ability-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.45rem; }
.dungeon-journal-ability-grid article { padding: 0.78rem; border: 1px solid rgba(132, 151, 184, 0.2); border-left: 2px solid #8293ae; background: rgba(15, 24, 40, 0.66); }
.dungeon-journal-ability-grid article.is-signature { border-color: rgba(215, 165, 80, 0.34); border-left-color: #d7a550; background: linear-gradient(120deg, rgba(91, 58, 19, 0.25), rgba(18, 20, 35, 0.64)); }
.dungeon-journal-ability-grid article > div { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.dungeon-journal-ability-grid strong { color: #f7ead4; font-size: 0.88rem; }
.dungeon-journal-ability-grid article > div span { color: #dcb36c; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; }
.dungeon-journal-ability-grid p { margin: 0.38rem 0 0; color: rgba(230, 223, 215, 0.82); font-size: 0.84rem; line-height: 1.5; }
.dungeon-journal-ability-grid small { display: block; margin-top: 0.5rem; color: rgba(238, 215, 171, 0.88); font-size: 0.74rem; line-height: 1.45; }
.dungeon-journal-counter-plan { border-color: rgba(215, 165, 80, 0.3); background: linear-gradient(130deg, rgba(66, 44, 18, 0.14), rgba(5, 12, 23, 0.72)); }
.dungeon-journal-section__heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.65rem; }
.dungeon-journal-section__heading h4 { margin: 0; }
.dungeon-journal-section__heading small { display: block; margin-top: 0.28rem; color: rgba(225, 220, 214, 0.78); font-size: 0.82rem; line-height: 1.45; }
.dungeon-journal-section__heading > span { padding: 0.36rem 0.58rem; border: 1px solid rgba(87, 205, 164, 0.34); color: #91e2c4; background: rgba(12, 76, 57, 0.24); font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; }
.dungeon-journal-element-check { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.8rem; margin: 0 0 0.7rem; padding: 0.7rem 0.8rem; border: 1px solid rgba(107, 169, 208, 0.3); background: linear-gradient(90deg, rgba(28, 71, 100, 0.28), rgba(8, 18, 31, 0.62)); box-shadow: inset 3px 0 #6ba9d0; }
.dungeon-journal-element-check > span { color: #9bd4f3; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.1em; }
.dungeon-journal-element-check strong { display: block; color: #f4e8d8; font-size: 0.92rem; }
.dungeon-journal-element-check p { margin: 0.22rem 0 0; color: rgba(226, 232, 239, 0.84); font-size: 0.82rem; line-height: 1.45; }
.dungeon-journal-counter-columns { display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 0.55rem; }
.dungeon-journal-counter-columns > div { min-width: 0; padding: 0.72rem; border: 1px solid rgba(132, 151, 184, 0.18); background: rgba(2, 8, 17, 0.48); }
.dungeon-journal-counter-columns h5 { margin: 0; color: rgba(246, 224, 183, 0.96); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.dungeon-journal-counter-column-heading { min-height: 3.25rem; margin-bottom: 0.58rem; }
.dungeon-journal-counter-column-heading p { margin: 0.25rem 0 0; color: rgba(213, 220, 231, 0.72); font-size: 0.76rem; line-height: 1.4; }
.dungeon-journal-counter-list { display: grid; gap: 0.4rem; }
.dungeon-journal-counter-ability { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 0.62rem; padding: 0.58rem; border: 1px solid rgba(132, 151, 184, 0.18); background: rgba(23, 31, 48, 0.66); }
.dungeon-journal-counter-ability > img { width: 3rem; height: 3rem; border: 1px solid rgba(215, 165, 80, 0.34); object-fit: cover; }
.dungeon-journal-counter-ability__title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.25rem; }
.dungeon-journal-counter-ability strong { color: #f3e8d8; font-size: 0.86rem; }
.dungeon-journal-counter-ability__badges { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.22rem; }
.dungeon-journal-counter-ability__badges > span { padding: 0.15rem 0.3rem; border: 1px solid rgba(76, 181, 145, 0.32); color: #7cdbb9; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em; }
.dungeon-journal-counter-ability__badges > .dungeon-journal-counter-ability__role { border-color: rgba(215, 165, 80, 0.38); color: #e7bd72; background: rgba(93, 60, 17, 0.2); }
.dungeon-journal-counter-ability p,
.dungeon-journal-empty { margin: 0.28rem 0 0; color: rgba(225, 220, 214, 0.86); font-size: 0.83rem; line-height: 1.5; }
.dungeon-journal-counter-columns ul { display: grid; gap: 0.38rem; margin: 0; padding: 0; list-style: none; }
.dungeon-journal-counter-columns li { position: relative; padding-left: 0.9rem; color: rgba(233, 227, 219, 0.84); font-size: 0.82rem; line-height: 1.5; }
.dungeon-journal-counter-columns li::before { content: ""; position: absolute; top: 0.42rem; left: 0; width: 0.3rem; height: 0.3rem; border: 1px solid #d7a550; transform: rotate(45deg); }
.dungeon-journal-lower-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(14rem, 0.8fr); gap: 0.7rem; }
.dungeon-journal-loot { display: grid; gap: 0.4rem; max-height: 24rem; overflow-y: auto; }
.dungeon-journal-loot > button { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) auto; align-items: center; gap: 0.7rem; width: 100%; padding: 0.52rem 0.6rem; border: 1px solid rgba(132, 151, 184, 0.18); color: inherit; text-align: left; background: rgba(18, 27, 43, 0.58); cursor: help; transition: border-color 120ms ease, background 120ms ease, transform 120ms ease; }
.dungeon-journal-loot > button:hover,
.dungeon-journal-loot > button:focus-visible { border-color: rgba(215, 165, 80, 0.55); outline: none; background: rgba(49, 50, 61, 0.72); box-shadow: inset 3px 0 #d7a550; transform: translateX(1px); }
.dungeon-journal-loot__visual { position: relative; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; overflow: hidden; border: 1px solid rgba(215, 165, 80, 0.3); border-radius: 0.2rem; background: rgba(76, 55, 22, 0.35); }
.dungeon-journal-loot__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dungeon-journal-loot__coin { display: grid; place-items: center; width: 100%; height: 100%; color: #e4bc71; font-size: 0.72rem; font-weight: 800; }
.dungeon-journal-loot span strong,
.dungeon-journal-loot span small { display: block; }
.dungeon-journal-loot span strong { color: #f0e7da; font-size: 0.82rem; text-transform: capitalize; }
.dungeon-journal-loot span small { margin-top: 0.15rem; color: rgba(204, 214, 230, 0.78); font-size: 0.76rem; }
.dungeon-journal-loot > button > b { color: #e2c48b; font: 700 0.76rem/1 var(--font-mono, monospace); white-space: nowrap; }
.dungeon-journal-lore { position: relative; overflow: hidden; background: linear-gradient(140deg, rgba(55, 40, 26, 0.18), rgba(10, 14, 25, 0.68)); }
.dungeon-journal-lore::after { content: "“"; position: absolute; right: 0.6rem; bottom: -1.4rem; color: rgba(215, 165, 80, 0.08); font: 700 8rem/1 Georgia, serif; }
.dungeon-journal-lore blockquote { margin: 0; padding-left: 0.9rem; border-left: 2px solid rgba(215, 165, 80, 0.58); color: #eee0cc; font: italic 0.9rem/1.6 var(--font-serif, Georgia, serif); }
.dungeon-journal-lore > p { position: relative; z-index: 1; margin: 0.8rem 0 0; color: rgba(226, 221, 215, 0.8); font-size: 0.84rem; line-height: 1.55; }
.dungeon-journal-empty--page { padding: 3rem; text-align: center; }
@media (max-width: 1450px) {
  .dungeon-journal-counter-columns { grid-template-columns: 1fr 1fr; }
  .dungeon-journal-counter-columns > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 1050px) {
  .dungeon-journal-shell { grid-template-columns: 1fr; }
  .dungeon-journal-dungeons { position: static; max-height: none; }
  .dungeon-journal-dungeons nav { display: flex; max-height: none; overflow-x: auto; }
  .dungeon-journal-dungeons nav button { flex: 0 0 15rem; }
  .dungeon-journal-counter-columns { grid-template-columns: 1fr 1fr; }
  .dungeon-journal-counter-columns > div:last-child { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .dungeon-journal { padding: 0.55rem; }
  .dungeon-journal-hero { align-items: stretch; flex-direction: column; }
  .dungeon-journal-build { min-width: 0; }
  .dungeon-journal-section__heading { align-items: flex-start; flex-direction: column; }
  .dungeon-journal-element-check { grid-template-columns: 1fr; gap: 0.35rem; }
  .dungeon-journal-dungeon-header { align-items: flex-start; flex-direction: column; min-height: 12rem; }
  .dungeon-journal-enemy > header { grid-template-columns: 4.6rem 1fr; }
  .dungeon-journal-enemy__portrait { width: 4.6rem; height: 4.6rem; }
  .dungeon-journal-enemy__identity { grid-column: 1 / -1; align-items: flex-start; flex-flow: row wrap; }
  .dungeon-journal-stat-grid { grid-template-columns: 1fr 1fr; }
  .dungeon-journal-counter-columns,
  .dungeon-journal-lower-grid { grid-template-columns: 1fr; }
  .dungeon-journal-counter-columns > div:last-child { grid-column: auto; }
}

/* Crafting Wishlist */
.crafting-wishlist-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  text-align: left;
}
.crafting-wishlist-tab__label {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  min-width: 0;
}
.crafting-wishlist-tab__star {
  color: #f0c76f;
  font-size: 1.05rem;
  line-height: 1;
  filter: drop-shadow(0 0 6px rgba(215, 165, 80, 0.3));
}
.crafting-wishlist-tab.is-active .crafting-wishlist-tab__star { color: #241504; filter: none; }
.crafting-wishlist-tab__badge {
  display: grid;
  place-items: center;
  min-width: 1.55rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border: 1px solid rgba(111, 235, 188, 0.68);
  border-radius: 999px;
  color: #b8f4d9;
  background: rgba(14, 100, 72, 0.55);
  box-shadow: 0 0 10px rgba(65, 207, 153, 0.22);
  font: 800 0.72rem/1 var(--font-mono, monospace);
}
.crafting-wishlist-tab.is-active .crafting-wishlist-tab__badge {
  border-color: rgba(20, 94, 69, 0.42);
  color: #09291e;
  background: rgba(75, 185, 143, 0.7);
  box-shadow: none;
}
.crafting-wishlist {
  margin: 0.35rem 0 0.8rem;
  overflow: hidden;
  border: 1px solid rgba(215, 165, 80, 0.28);
  border-radius: 0.7rem;
  background:
    radial-gradient(circle at 100% 0%, rgba(151, 103, 43, 0.15), transparent 20rem),
    linear-gradient(135deg, rgba(8, 16, 29, 0.94), rgba(15, 14, 27, 0.94));
  box-shadow: inset 0 1px rgba(255, 245, 220, 0.05), 0 12px 30px rgba(0, 0, 0, 0.16);
}
.crafting-wishlist > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(215, 165, 80, 0.15);
  background: rgba(5, 11, 22, 0.44);
}
.crafting-wishlist > header span,
.crafting-wishlist > header h4,
.crafting-wishlist > header p { margin: 0; }
.crafting-wishlist > header > div:first-child > span { color: #d7a550; font-size: 0.48rem; font-weight: 900; letter-spacing: 0.18em; }
.crafting-wishlist > header h4 { color: #f1e5d2; font: italic 700 1rem/1.1 var(--font-serif, Georgia, serif); }
.crafting-wishlist > header p { margin-top: 0.2rem; color: rgba(211, 204, 196, 0.58); font-size: 0.57rem; }
.crafting-wishlist__summary { display: grid; min-width: 4.2rem; padding: 0.35rem 0.5rem; border: 1px solid rgba(215, 165, 80, 0.26); text-align: center; background: rgba(58, 39, 18, 0.24); }
.crafting-wishlist__summary strong { color: #f0cc88; font: 700 0.95rem/1 var(--font-mono, monospace); }
.crafting-wishlist__summary span { margin-top: 0.18rem; color: rgba(225, 215, 201, 0.58); font-size: 0.48rem; text-transform: uppercase; }
.crafting-wishlist-combined {
  margin: 0.7rem 0.8rem 0;
  padding: 0.7rem;
  border: 1px solid rgba(215, 165, 80, 0.28);
  border-radius: 0.5rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(215, 165, 80, 0.1), transparent 38%),
    rgba(6, 13, 24, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.crafting-wishlist-combined > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}
.crafting-wishlist-combined > header h5,
.crafting-wishlist-combined > header p { margin: 0; }
.crafting-wishlist-combined > header h5 {
  flex: 0 0 auto;
  color: #f2d8a3;
  font: 800 0.78rem/1.15 var(--font-ui, sans-serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.crafting-wishlist-combined > header p {
  color: rgba(211, 204, 196, 0.58);
  font-size: 0.56rem;
  line-height: 1.35;
  text-align: right;
}
.crafting-wishlist-combined__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 0.4rem;
}
.crafting-wishlist-combined__item {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) minmax(12rem, auto);
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.42rem;
  border: 1px solid rgba(125, 145, 177, 0.14);
  border-left-width: 2px;
  background: rgba(13, 22, 36, 0.64);
}
.crafting-wishlist-combined__item.is-ready { border-left-color: rgba(74, 207, 154, 0.72); }
.crafting-wishlist-combined__item.is-missing { border-left-color: rgba(224, 158, 72, 0.76); }
.crafting-wishlist-combined__identity {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}
.crafting-wishlist-combined__identity img,
.crafting-wishlist-combined__identity > span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(215, 165, 80, 0.2);
  border-radius: 0.3rem;
  object-fit: cover;
  color: #d8ad67;
  background: rgba(4, 10, 20, 0.76);
}
.crafting-wishlist-combined__identity strong {
  overflow: hidden;
  color: #e9dfd1;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.crafting-wishlist-combined__counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(3.5rem, 1fr));
  gap: 0.28rem;
}
.crafting-wishlist-combined__counts > span {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.26rem 0.34rem;
  border-left: 1px solid rgba(125, 145, 177, 0.15);
  text-align: right;
}
.crafting-wishlist-combined__counts small {
  color: rgba(190, 198, 210, 0.52);
  font-size: 0.43rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.crafting-wishlist-combined__counts b {
  color: #e7ded2;
  font: 800 0.66rem/1 var(--font-mono, monospace);
}
.crafting-wishlist-combined__counts .is-ready b { color: #70d7af; }
.crafting-wishlist-combined__counts .is-missing b { color: #efb569; }
@media (max-width: 760px) {
  .crafting-wishlist-combined > header { align-items: flex-start; flex-direction: column; }
  .crafting-wishlist-combined > header p { text-align: left; }
  .crafting-wishlist-combined__grid { grid-template-columns: 1fr; }
  .crafting-wishlist-combined__item { grid-template-columns: 1fr; }
}
.crafting-wishlist__empty { padding: 0.85rem; color: rgba(204, 198, 191, 0.55); font-size: 0.62rem; text-align: center; }
.crafting-wishlist__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 0.5rem; padding: 0.6rem; }
.crafting-wishlist-card { min-width: 0; padding: 0.6rem; border: 1px solid rgba(125, 145, 177, 0.16); border-radius: 0.48rem; background: rgba(4, 10, 20, 0.55); transition: 140ms ease; }
.crafting-wishlist-card.is-ready { border-color: rgba(67, 194, 145, 0.46); box-shadow: inset 0 0 22px rgba(21, 128, 91, 0.08); }
.crafting-wishlist-card__top { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; align-items: center; gap: 0.52rem; }
.crafting-wishlist-card__top > img,
.crafting-wishlist-card__fallback { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid rgba(215, 165, 80, 0.25); border-radius: 0.35rem; object-fit: cover; color: #d7a550; background: rgba(12, 18, 31, 0.78); }
.crafting-wishlist-card__top > div strong,
.crafting-wishlist-card__top > div small { display: block; }
.crafting-wishlist-card__top > div strong { overflow: hidden; color: #eee3d3; font-size: 0.67rem; text-overflow: ellipsis; white-space: nowrap; }
.crafting-wishlist-card__top > div small { margin-top: 0.15rem; color: rgba(178, 187, 205, 0.53); font-size: 0.5rem; text-transform: capitalize; }
.crafting-wishlist-card__unpin,
.crafting-recipe-wishlist-toggle {
  display: grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border: 1px solid rgba(215, 165, 80, 0.28);
  border-radius: 50%;
  color: #e7bf70;
  background: rgba(59, 40, 18, 0.42);
  font-size: 0.9rem;
  transition: 130ms ease;
}
.crafting-recipe-wishlist-toggle { flex: 0 0 auto; color: rgba(215, 165, 80, 0.55); background: rgba(5, 10, 20, 0.52); }
.crafting-recipe-wishlist-toggle:hover,
.crafting-recipe-wishlist-toggle.is-pinned,
.crafting-wishlist-card__unpin:hover { border-color: rgba(240, 200, 120, 0.66); color: #ffd98d; background: rgba(105, 69, 25, 0.42); box-shadow: 0 0 12px rgba(215, 165, 80, 0.14); }
.crafting-wishlist-card__status { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0.48rem 0; }
.crafting-wishlist-card__status > span,
.crafting-wishlist-card__status > b { padding: 0.16rem 0.34rem; border: 1px solid rgba(215, 165, 80, 0.18); font-size: 0.48rem; text-transform: uppercase; letter-spacing: 0.05em; }
.crafting-wishlist-card__status .is-ready { border-color: rgba(62, 205, 149, 0.32); color: #7de3bd; background: rgba(16, 106, 75, 0.18); }
.crafting-wishlist-card__status .is-missing { border-color: rgba(226, 161, 65, 0.3); color: #ebbd73; background: rgba(116, 71, 15, 0.17); }
.crafting-wishlist-card__status > b { color: #e49393; font-weight: 700; }
.crafting-wishlist-materials { display: grid; gap: 0.22rem; }
.crafting-wishlist-materials > div { display: grid; grid-template-columns: 1.8rem minmax(0, 1fr) auto; align-items: center; gap: 0.42rem; padding: 0.28rem 0.36rem; border: 1px solid rgba(125, 145, 177, 0.1); background: rgba(17, 25, 40, 0.5); }
.crafting-wishlist-materials img,
.crafting-wishlist-materials > div > span:first-child { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; object-fit: cover; color: #c49e5d; background: rgba(4, 10, 20, 0.72); }
.crafting-wishlist-materials > div > span:nth-child(2) strong,
.crafting-wishlist-materials > div > span:nth-child(2) small { display: block; }
.crafting-wishlist-materials strong { color: rgba(230, 222, 212, 0.82); font-size: 0.56rem; }
.crafting-wishlist-materials small { color: rgba(174, 184, 203, 0.5); font-size: 0.47rem; }
.crafting-wishlist-materials > div > b { font: 700 0.56rem/1 var(--font-mono, monospace); }
.crafting-wishlist-materials > div > b.is-owned { color: #65cea8; }
.crafting-wishlist-materials > div > b.is-missing { color: #e6ae64; }
.crafting-wishlist-card__actions { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.48rem; }
.crafting-wishlist-card__actions button,
.crafting-wishlist-subrecipe button { padding: 0.28rem 0.46rem; border: 1px solid rgba(215, 165, 80, 0.24); border-radius: 0.3rem; color: rgba(232, 216, 185, 0.82); background: rgba(72, 48, 19, 0.2); font-size: 0.5rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.crafting-wishlist-card__actions button:hover:not(:disabled),
.crafting-wishlist-subrecipe button:hover { border-color: rgba(215, 165, 80, 0.58); color: #ffe1a4; }
.crafting-wishlist-card__actions button:disabled { cursor: not-allowed; opacity: 0.35; }
.crafting-wishlist-plan { display: grid; gap: 0.38rem; margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid rgba(215, 165, 80, 0.14); }
.crafting-wishlist-plan > section { padding: 0.42rem; border: 1px solid rgba(125, 145, 177, 0.11); background: rgba(4, 9, 18, 0.48); }
.crafting-wishlist-plan > section > header { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.crafting-wishlist-plan > section > header strong { color: #eadfce; font-size: 0.58rem; }
.crafting-wishlist-plan > section > header span { color: #d2aa68; font: 700 0.5rem/1 var(--font-mono, monospace); }
.crafting-wishlist-subrecipe { display: flex; flex-wrap: wrap; align-items: center; gap: 0.32rem; margin-top: 0.35rem; }
.crafting-wishlist-subrecipe > span { margin-right: auto; color: rgba(199, 195, 190, 0.63); font-size: 0.52rem; }
.crafting-wishlist-sources { display: grid; gap: 0.24rem; margin-top: 0.35rem; }
.crafting-wishlist-sources > div { display: grid; grid-template-columns: minmax(6rem, auto) 1fr; gap: 0.35rem; padding: 0.26rem 0.32rem; border-left: 2px solid rgba(105, 133, 166, 0.42); background: rgba(18, 26, 41, 0.5); }
.crafting-wishlist-sources strong { color: rgba(220, 214, 205, 0.76); font-size: 0.5rem; }
.crafting-wishlist-sources span { color: rgba(174, 183, 201, 0.55); font-size: 0.48rem; }
.crafting-wishlist--page {
  min-height: 26rem;
  margin: 0;
  border-color: rgba(215, 165, 80, 0.38);
  box-shadow: inset 0 1px rgba(255, 245, 220, 0.07), 0 18px 42px rgba(0, 0, 0, 0.22);
}
.crafting-wishlist--page > header { padding: 1rem 1.1rem; }
.crafting-wishlist--page > header > div:first-child > span { font-size: 0.68rem; }
.crafting-wishlist--page > header h4 { font-size: 1.35rem; }
.crafting-wishlist--page > header p { max-width: 54rem; margin-top: 0.35rem; font-size: 0.78rem; line-height: 1.5; }
.crafting-wishlist--page .crafting-wishlist__summary { min-width: 5.5rem; padding: 0.55rem 0.7rem; }
.crafting-wishlist--page .crafting-wishlist__summary strong { font-size: 1.15rem; }
.crafting-wishlist--page .crafting-wishlist__summary span { font-size: 0.65rem; }
.crafting-wishlist--page .crafting-wishlist__empty { display: grid; place-items: center; min-height: 18rem; padding: 2rem; font-size: 0.9rem; line-height: 1.55; }
.crafting-wishlist--page .crafting-wishlist__grid { grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr)); gap: 0.75rem; padding: 0.8rem; }
.crafting-wishlist--page .crafting-wishlist-card { padding: 0.78rem; }
.crafting-wishlist--page .crafting-wishlist-card__top { grid-template-columns: 3.25rem minmax(0, 1fr) auto; gap: 0.7rem; }
.crafting-wishlist--page .crafting-wishlist-card__top > img,
.crafting-wishlist--page .crafting-wishlist-card__fallback { width: 3.25rem; height: 3.25rem; }
.crafting-wishlist--page .crafting-wishlist-card__top > div strong { font-size: 0.86rem; }
.crafting-wishlist--page .crafting-wishlist-card__top > div small { font-size: 0.66rem; }
.crafting-wishlist--page .crafting-wishlist-card__status { margin: 0.62rem 0; }
.crafting-wishlist--page .crafting-wishlist-card__status > span,
.crafting-wishlist--page .crafting-wishlist-card__status > b { padding: 0.24rem 0.42rem; font-size: 0.64rem; }
.crafting-wishlist--page .crafting-wishlist-materials { gap: 0.32rem; }
.crafting-wishlist--page .crafting-wishlist-materials > div { grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 0.55rem; padding: 0.38rem 0.48rem; }
.crafting-wishlist--page .crafting-wishlist-materials img,
.crafting-wishlist--page .crafting-wishlist-materials > div > span:first-child { width: 2.2rem; height: 2.2rem; }
.crafting-wishlist--page .crafting-wishlist-materials strong { font-size: 0.72rem; }
.crafting-wishlist--page .crafting-wishlist-materials small { font-size: 0.62rem; }
.crafting-wishlist--page .crafting-wishlist-materials > div > b { font-size: 0.72rem; }
.crafting-wishlist--page .crafting-wishlist-card__actions { gap: 0.42rem; margin-top: 0.62rem; }
.crafting-wishlist--page .crafting-wishlist-card__actions button,
.crafting-wishlist--page .crafting-wishlist-subrecipe button { padding: 0.38rem 0.58rem; font-size: 0.64rem; }
.crafting-wishlist--page .crafting-wishlist-plan > section > header strong { font-size: 0.72rem; }
.crafting-wishlist--page .crafting-wishlist-plan > section > header span,
.crafting-wishlist--page .crafting-wishlist-subrecipe > span,
.crafting-wishlist--page .crafting-wishlist-sources strong,
.crafting-wishlist--page .crafting-wishlist-sources span { font-size: 0.62rem; line-height: 1.4; }
@media (max-width: 700px) {
  .crafting-wishlist > header { align-items: flex-start; }
  .crafting-wishlist__grid { grid-template-columns: 1fr; }
  .crafting-wishlist-sources > div { grid-template-columns: 1fr; }
}

/* Gathering orders */
.gather-crafting-queue-notice {
  display: grid;
  gap: 0.32rem;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 2px solid rgba(226, 185, 91, 0.72);
  border-radius: 0.5rem;
  background:
    linear-gradient(90deg, rgba(177, 115, 24, 0.24), rgba(24, 38, 55, 0.94) 48%, rgba(177, 115, 24, 0.16)),
    rgba(10, 22, 35, 0.96);
  color: #f7e7b5;
  box-shadow:
    inset 4px 0 0 #e2b95b,
    0 10px 24px rgba(0, 0, 0, 0.34),
    0 0 22px rgba(226, 185, 91, 0.1);
  text-align: center;
}
.gather-crafting-queue-notice strong {
  color: #ffd978;
  font-family: var(--font-serif);
  font-size: clamp(0.8rem, 1vw, 1rem);
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}
.gather-crafting-queue-notice span {
  font-size: clamp(0.7rem, 0.86vw, 0.84rem);
  font-weight: 750;
  line-height: 1.45;
}
.gather-queue-panel {
  position: relative;
  overflow: hidden;
  padding: 0.85rem;
  border: 1px solid rgba(210, 173, 92, 0.34);
  border-radius: 0.55rem;
  background:
    radial-gradient(circle at 0 0, rgba(74, 142, 100, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(3, 13, 20, 0.96), rgba(10, 20, 27, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 18px 36px rgba(0, 0, 0, 0.22);
}
.gather-queue-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(121, 211, 145, 0.55), transparent 24%) top left / 36% 1px no-repeat,
    linear-gradient(180deg, rgba(210, 173, 92, 0.48), transparent 38%) top left / 1px 56% no-repeat;
}
@media (min-width: 981px) {
  .gather-queue-panel {
    display: grid;
    grid-template-columns: minmax(20rem, 1fr) auto;
    grid-template-rows: auto 10.75rem;
    column-gap: 1rem;
    row-gap: 0.42rem;
    align-items: center;
    padding: 0.68rem 0.78rem;
  }
  .gather-queue-header { display: contents !important; }
  .gather-queue-heading {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }
  .gather-queue-composer {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }
  .gather-queue-track,
  .gather-queue-empty {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
.gather-queue-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.78rem;
}
.gather-queue-heading {
  display: flex;
  align-items: center;
  min-width: 12rem;
  gap: 0.68rem;
}
.gather-queue-heading__mark {
  display: grid;
  flex: 0 0 2.05rem;
  width: 2.05rem;
  height: 2.05rem;
  place-items: center;
  border: 1px solid rgba(137, 218, 157, 0.42);
  border-radius: 50%;
  color: #9ce3ad;
  background: rgba(20, 75, 48, 0.32);
  box-shadow: 0 0 18px rgba(74, 192, 111, 0.12);
  font-size: 0.6rem;
}
.gather-queue-heading h3 {
  margin: 0;
  color: #f0e2c3;
  font: 800 0.86rem/1.1 var(--font-ui);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gather-queue-heading__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.48rem;
}
.gather-queue-total-time {
  display: inline-flex;
  align-items: baseline;
  gap: 0.22rem;
  padding: 0.28rem 0.48rem;
  border: 1px solid rgba(137, 218, 157, 0.34);
  border-radius: 999px;
  color: #bcecc8;
  background: rgba(31, 104, 66, 0.24);
  font: 700 0.56rem/1 var(--font-mono, monospace);
  white-space: nowrap;
}
.gather-queue-total-time b {
  color: rgba(204, 181, 130, 0.82);
  font: 900 0.49rem/1 var(--font-ui);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gather-queue-heading p {
  max-width: 34rem;
  margin: 0.2rem 0 0;
  color: rgba(181, 198, 190, 0.66);
  font-size: 0.63rem;
  line-height: 1.35;
}
.gather-queue-composer {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.48rem;
}
.gather-queue-lanes,
.gather-queue-presets {
  display: inline-flex;
  gap: 0.22rem;
}
.gather-queue-lane,
.gather-queue-presets button,
.gather-queue-clear {
  min-height: 2rem;
  padding: 0.42rem 0.58rem;
  border: 1px solid rgba(196, 164, 99, 0.25);
  border-radius: 0.3rem;
  color: rgba(226, 216, 194, 0.68);
  background: rgba(34, 40, 38, 0.6);
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gather-queue-controls {
  min-height: 3.35rem;
  align-items: stretch;
}
.gather-queue-controls .production-queue-toggle,
.gather-queue-controls .production-pause-all,
.gather-queue-controls .gather-queue-clear {
  min-height: 3.35rem;
}
.gather-queue-order.is-paused {
  border-color: rgba(222, 187, 105, 0.4);
  background: linear-gradient(145deg, rgba(35, 29, 18, 0.96), rgba(10, 15, 19, 0.95));
  box-shadow: inset 0 0 0 1px rgba(240, 208, 120, 0.05);
}
.gather-queue-lane {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.gather-queue-lane span {
  color: rgba(126, 215, 151, 0.66);
  font: 800 0.5rem/1 var(--font-mono, monospace);
}
.gather-queue-lane.is-active,
.gather-queue-presets button.is-active {
  border-color: rgba(133, 222, 158, 0.54);
  color: #c7f4d1;
  background: rgba(31, 104, 66, 0.34);
  box-shadow: inset 0 0 0 1px rgba(133, 222, 158, 0.08);
}
.gather-queue-amount-card {
  display: grid;
  grid-template-areas:
    "amount presets"
    "help help";
  grid-template-columns: 8.5rem max-content;
  align-items: end;
  gap: 0.3rem 0.46rem;
  min-height: 3.35rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid rgba(196, 164, 99, 0.22);
  border-radius: 0.38rem;
  background: linear-gradient(180deg, rgba(22, 34, 36, 0.74), rgba(8, 17, 22, 0.78));
  box-shadow: inset 0 1px rgba(255, 238, 194, 0.035);
}
.gather-queue-amount {
  grid-area: amount;
  display: grid;
  gap: 0.22rem;
  min-width: 8.5rem;
}
.gather-queue-amount > span {
  color: rgba(221, 195, 137, 0.88);
  font-size: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.gather-queue-amount input {
  width: 8.5rem;
  height: 2rem;
  padding: 0 0.58rem;
  border: 1px solid rgba(202, 172, 107, 0.36);
  border-radius: 0.3rem;
  outline: none;
  color: #f2e4c5;
  background: rgba(2, 9, 15, 0.86);
  font: 800 0.68rem/1 var(--font-mono, monospace);
}
.gather-queue-amount input:focus {
  border-color: rgba(137, 224, 163, 0.66);
  box-shadow: 0 0 0 2px rgba(70, 174, 103, 0.12);
}
.gather-queue-amount-card .gather-queue-presets {
  grid-area: presets;
  align-items: end;
}
.gather-queue-amount-help {
  grid-area: help;
  max-width: none;
  color: rgba(181, 198, 190, 0.64);
  font-size: 0.48rem;
  font-weight: 650;
  line-height: 1.3;
}
.gather-queue-end-toggle {
  display: grid;
  min-width: 10.5rem;
  min-height: 3.35rem;
  align-content: center;
  gap: 0.35rem;
  padding: 0.48rem 0.68rem;
  border: 1px solid rgba(196, 164, 99, 0.28);
  border-radius: 0.38rem;
  color: rgba(226, 216, 194, 0.72);
  background:
    linear-gradient(180deg, rgba(35, 43, 39, 0.78), rgba(19, 27, 27, 0.74));
  box-shadow: inset 0 1px rgba(255, 238, 194, 0.04);
  text-align: left;
}
.gather-queue-end-toggle:hover,
.gather-queue-end-toggle:focus-visible {
  border-color: rgba(133, 222, 158, 0.46);
  outline: none;
}
.gather-queue-end-toggle__label {
  color: rgba(204, 181, 130, 0.72);
  font-size: 0.48rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  line-height: 1;
  text-transform: uppercase;
}
.gather-queue-end-toggle__value {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.025em;
  line-height: 1.1;
  text-transform: uppercase;
}
.gather-queue-end-toggle__value i {
  position: relative;
  flex: 0 0 1.45rem;
  width: 1.45rem;
  height: 0.78rem;
  border: 1px solid rgba(194, 181, 151, 0.26);
  border-radius: 999px;
  background: rgba(3, 10, 15, 0.72);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.42);
}
.gather-queue-end-toggle__value i::after {
  content: "";
  position: absolute;
  top: 0.12rem;
  left: 0.13rem;
  width: 0.46rem;
  height: 0.46rem;
  border-radius: 50%;
  background: rgba(201, 194, 175, 0.72);
  transition: transform 150ms ease, background-color 150ms ease;
}
.gather-queue-end-toggle.is-active {
  border-color: rgba(133, 222, 158, 0.5);
  color: #c9f2d2;
  background:
    linear-gradient(180deg, rgba(31, 104, 66, 0.38), rgba(16, 56, 40, 0.3));
  box-shadow:
    inset 0 0 0 1px rgba(133, 222, 158, 0.07),
    0 0 18px rgba(62, 181, 99, 0.06);
}
.gather-queue-end-toggle.is-active .gather-queue-end-toggle__value i {
  border-color: rgba(137, 224, 163, 0.5);
  background: rgba(34, 118, 73, 0.58);
}
.gather-queue-end-toggle.is-active .gather-queue-end-toggle__value i::after {
  transform: translateX(0.7rem);
  background: #bdf2c9;
}
@media (prefers-reduced-motion: reduce) {
  .gather-queue-end-toggle__value i::after { transition: none; }
}
.gather-queue-clear {
  border-color: rgba(205, 102, 88, 0.3);
  color: #e4a89e;
  background: rgba(92, 35, 34, 0.23);
}
.gather-queue-clear:hover {
  border-color: rgba(225, 118, 100, 0.58);
  color: #ffd0c6;
}
.gather-queue-empty {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px dashed rgba(130, 173, 143, 0.24);
  border-radius: 0.4rem;
  color: rgba(175, 194, 185, 0.58);
  background: rgba(3, 11, 17, 0.38);
  text-align: center;
}
.gather-queue-empty span {
  display: grid;
  width: 1.65rem;
  height: 1.65rem;
  place-items: center;
  border: 1px solid rgba(130, 205, 151, 0.26);
  border-radius: 50%;
  color: #82ce97;
  font-weight: 900;
}
.gather-queue-empty p {
  margin: 0;
  font-size: 0.62rem;
}
.gather-queue-track {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 5rem));
  grid-auto-columns: minmax(20.5rem, 21.5rem);
  grid-auto-flow: column;
  align-items: stretch;
  gap: 0.55rem;
  height: 10.75rem;
  max-height: 10.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.08rem 0 0.32rem;
  scrollbar-color: rgba(158, 128, 72, 0.64) rgba(0, 0, 0, 0.2);
  scrollbar-width: thin;
}
.gather-queue-order {
  display: grid;
  min-width: 0;
  height: 100%;
  grid-template-columns: 2.7rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem;
  border: 1px solid rgba(133, 153, 148, 0.2);
  border-radius: 0.38rem;
  background: linear-gradient(145deg, rgba(10, 20, 27, 0.96), rgba(4, 11, 17, 0.94));
}
.gather-queue-order.is-active {
  border-color: rgba(124, 218, 150, 0.48);
  background:
    radial-gradient(circle at 0 50%, rgba(61, 151, 88, 0.13), transparent 48%),
    linear-gradient(145deg, rgba(10, 29, 23, 0.96), rgba(4, 13, 18, 0.94));
  box-shadow: inset 3px 0 0 rgba(112, 215, 139, 0.58);
}
.gather-queue-order__visual {
  position: relative;
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  place-items: center;
  border: 1px solid rgba(205, 174, 108, 0.28);
  border-radius: 0.3rem;
  color: #9edcad;
  background: rgba(2, 8, 13, 0.78);
}
.gather-queue-order__visual img,
.gather-queue-order__visual > span {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.24rem;
}
.gather-queue-order__visual > span {
  display: grid;
  place-items: center;
  padding: 0.65rem;
}
.gather-queue-order__visual svg { width: 100%; height: 100%; }
.gather-queue-order__visual b {
  position: absolute;
  right: -0.28rem;
  bottom: -0.28rem;
  display: grid;
  min-width: 1.05rem;
  height: 1.05rem;
  place-items: center;
  border: 1px solid rgba(211, 176, 102, 0.48);
  border-radius: 50%;
  color: #f1dfb7;
  background: #111b22;
  font: 800 0.46rem/1 var(--font-mono, monospace);
}
.gather-queue-order__body { min-width: 0; }
.gather-queue-order__top,
.gather-queue-order__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}
.gather-queue-order__top strong {
  min-width: 0;
  overflow: hidden;
  color: #ede1c8;
  font-size: 0.67rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gather-queue-order__state {
  flex: 0 0 auto;
  color: #7dd59a;
  font-size: 0.46rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.gather-queue-order:not(.is-active) .gather-queue-order__state { color: #c7a563; }
.gather-queue-order.is-waiting {
  border-color: rgba(226, 185, 91, 0.58);
  box-shadow: inset 0 0 0 1px rgba(226, 185, 91, 0.1);
}
.gather-queue-order.is-waiting .gather-queue-order__state { color: #ffd978; }
.gather-queue-order__meta {
  margin-top: 0.22rem;
  color: rgba(171, 190, 181, 0.58);
  font-size: 0.5rem;
}
.gather-queue-order__meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gather-queue-order__meta b {
  flex: 0 0 auto;
  color: rgba(227, 210, 174, 0.82);
  font: 700 0.5rem/1 var(--font-mono, monospace);
}
.gather-queue-order__progress {
  height: 0.23rem;
  margin-top: 0.36rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
}
.gather-queue-order__progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5bb87a, #d8b268);
}
.gather-queue-order__actions {
  display: grid;
  grid-template-columns: repeat(2, 1.55rem);
  gap: 0.2rem;
}
.gather-queue-order__actions button {
  display: grid;
  width: 1.55rem;
  height: 1.55rem;
  place-items: center;
  border: 1px solid rgba(195, 164, 101, 0.24);
  border-radius: 0.25rem;
  color: #d6c49d;
  background: rgba(43, 38, 29, 0.54);
  font-size: 0.7rem;
  font-weight: 900;
}
.gather-queue-order__actions button:hover:not(:disabled) {
  border-color: rgba(133, 217, 156, 0.5);
  color: #bcf0c9;
  background: rgba(28, 79, 49, 0.4);
}
.gather-queue-order__actions .is-front {
  border-color: rgba(91, 184, 122, 0.42);
  color: #bcf0c9;
  background: rgba(28, 79, 49, 0.34);
}
.gather-queue-order__actions button:disabled { cursor: not-allowed; opacity: 0.25; }
.gather-queue-order.is-active .gather-queue-order__actions {
  display: flex;
  grid-template-columns: none;
  align-items: center;
}
.gather-queue-order__actions .gather-queue-session-loot {
  display: grid;
  width: auto;
  min-width: 6.4rem;
  height: 2.7rem;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.32rem;
  padding: 0.34rem 0.5rem;
  border-color: rgba(133, 222, 158, 0.4);
  color: #c7f4d1;
  background: linear-gradient(180deg, rgba(31, 104, 66, 0.42), rgba(14, 55, 39, 0.42));
  text-align: left;
}
.gather-queue-session-loot > span:first-child {
  grid-row: 1 / 3;
  align-self: center;
  color: #d8b268;
  font-size: 0.72rem;
}
.gather-queue-session-loot > span:nth-child(2) {
  align-self: end;
  font-size: 0.48rem;
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.gather-queue-session-loot > b {
  align-self: start;
  color: #f0e2c3;
  font: 800 0.6rem/1.2 var(--font-mono, monospace);
}
.gather-queue-order__actions .gather-queue-session-loot:hover,
.gather-queue-order__actions .gather-queue-session-loot:focus-visible {
  border-color: rgba(151, 235, 174, 0.72);
  color: #e2f9e8;
  background: linear-gradient(180deg, rgba(39, 126, 78, 0.55), rgba(18, 70, 49, 0.52));
  outline: none;
}
.gather-queue-order__actions .is-remove {
  border-color: rgba(199, 92, 82, 0.24);
  color: #d99a91;
  background: rgba(77, 29, 29, 0.38);
}
.gather-node-actions {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.42rem;
}
.gather-node-actions > button { width: 100%; min-width: 0 !important; margin: 0 !important; }
.gather-node-queue-action {
  min-height: 38px;
  padding: 0.48rem 0.42rem;
  gap: 0.3rem;
  border: 1px solid rgba(123, 209, 148, 0.44);
  border-radius: 0.3rem;
  color: #bcebc8;
  background: linear-gradient(180deg, rgba(41, 103, 64, 0.76), rgba(22, 63, 42, 0.82));
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gather-node-queue-action span {
  display: grid;
  flex: 0 0 1rem;
  width: 1rem;
  height: 1rem;
  place-items: center;
  border: 1px solid rgba(173, 236, 190, 0.34);
  border-radius: 50%;
  font-size: 0.65rem;
}
.gather-node-queue-action:hover:not(:disabled) {
  border-color: rgba(151, 235, 174, 0.72);
  color: #e2f9e8;
  filter: brightness(1.08);
}
.gather-node-queue-action:disabled { cursor: not-allowed; filter: saturate(0.45); opacity: 0.45; }
.gather-node-queue-action--topline {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 18;
  width: auto;
  max-width: min(170px, 68%);
  min-height: 26px;
  padding: 3px 9px 3px 5px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1;
  white-space: nowrap;
}
.gather-node-queue-action--topline span {
  flex-basis: 0.9rem;
  width: 0.9rem;
  height: 0.9rem;
  font-size: 0.58rem;
}

.gather-node-storage {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.38rem;
}

.gather-node-storage-chip {
  display: flex;
  min-width: 0;
  min-height: 27px;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.27rem 0.48rem;
  border: 1px solid rgba(188, 236, 200, 0.24);
  border-radius: 0.34rem;
  background: linear-gradient(180deg, rgba(9, 31, 28, 0.76), rgba(4, 17, 20, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 3px 9px rgba(0, 0, 0, 0.16);
}

.gather-node-storage-chip--bags {
  border-color: rgba(126, 220, 150, 0.3);
  background: linear-gradient(180deg, rgba(24, 70, 47, 0.68), rgba(7, 30, 25, 0.78));
}

.gather-node-storage-chip--bank {
  border-color: rgba(220, 181, 102, 0.3);
  background: linear-gradient(180deg, rgba(73, 55, 29, 0.62), rgba(29, 25, 19, 0.8));
}

.gather-node-storage-label {
  min-width: 0;
  overflow: hidden;
  color: rgba(210, 222, 210, 0.72);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.055em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.gather-node-storage-count {
  flex: 0 0 auto;
  color: #c9f2d2;
  font: 900 10px/1 var(--font-mono, monospace);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
}

.gather-node-storage-chip--bank .gather-node-storage-count {
  color: #f1cf8a;
}

.gather-node-card--with-processed {
  height: 326px !important;
}

.gather-node-card--with-processed .gather-node-lock-ribbon {
  top: 46px;
  bottom: auto;
}

.gather-node-storage-chip--processed {
  grid-column: 1 / -1;
  border-color: rgba(147, 185, 232, 0.34);
  background:
    linear-gradient(180deg, rgba(31, 51, 78, 0.72), rgba(10, 22, 38, 0.84));
}

.gather-node-storage-processed-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 0.5rem;
}

.gather-node-storage-processed-name {
  min-width: 0;
  overflow: hidden;
  color: #dce9fb;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gather-node-storage-chip--processed .gather-node-storage-count {
  color: #b9d5fb;
}

/* Keep the gathered item readable instead of squeezing it beside two counters. */
.gather-node-metric--drop {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center !important;
  justify-content: normal !important;
  gap: 0.38rem 0.55rem;
}

.gather-node-metric--drop > .gather-node-drop-chip {
  width: 100%;
  max-width: none !important;
}

.gather-node-metric--drop > .gather-node-storage {
  grid-column: 1 / -1;
}

@media (max-width: 520px) {
  .gather-node-storage {
    gap: 0.3rem;
  }

  .gather-node-storage-chip {
    padding-inline: 0.4rem;
  }
}

.gather-session-loot-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 5, 9, 0.72);
  backdrop-filter: blur(5px);
}
.gather-session-loot-dialog {
  display: flex;
  width: min(34rem, calc(100vw - 2rem));
  max-height: min(42rem, calc(100vh - 2rem));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(210, 173, 92, 0.48);
  border-radius: 0.62rem;
  color: #e9dec7;
  background:
    radial-gradient(circle at 0 0, rgba(59, 143, 87, 0.16), transparent 35%),
    linear-gradient(150deg, rgba(6, 18, 25, 0.99), rgba(3, 10, 16, 0.99));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.72), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}
.gather-session-loot-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.82rem;
  border-bottom: 1px solid rgba(210, 173, 92, 0.18);
}
.gather-session-loot-dialog > header span {
  color: #83d69b;
  font-size: 0.52rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.gather-session-loot-dialog > header h3 {
  margin: 0.15rem 0 0;
  color: #f1e2c1;
  font: 800 1.08rem/1.1 var(--font-ui);
  letter-spacing: 0.035em;
  text-transform: uppercase;
}
.gather-session-loot-dialog > header p {
  margin: 0.28rem 0 0;
  color: rgba(190, 205, 197, 0.66);
  font-size: 0.62rem;
  line-height: 1.35;
}
.gather-session-loot-dialog > header > button {
  display: grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(205, 102, 88, 0.32);
  border-radius: 0.34rem;
  color: #e5aca2;
  background: rgba(92, 35, 34, 0.25);
  font-size: 1rem;
}
.gather-session-loot-dialog > header > button:hover,
.gather-session-loot-dialog > header > button:focus-visible {
  border-color: rgba(225, 118, 100, 0.62);
  color: #ffd0c6;
  outline: none;
}
.gather-session-loot-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  padding: 0.78rem 1rem;
}
.gather-session-loot-summary > div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(133, 222, 158, 0.22);
  border-radius: 0.4rem;
  background: rgba(20, 65, 43, 0.24);
}
.gather-session-loot-summary span {
  color: rgba(201, 214, 205, 0.68);
  font-size: 0.56rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gather-session-loot-summary strong {
  color: #d8edcf;
  font: 900 0.86rem/1 var(--font-mono, monospace);
}
.gather-session-loot-list {
  display: grid;
  gap: 0.4rem;
  min-height: 0;
  overflow-y: auto;
  padding: 0 1rem 1rem;
  scrollbar-color: rgba(158, 128, 72, 0.64) rgba(0, 0, 0, 0.2);
  scrollbar-width: thin;
}
.gather-session-loot-item {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.46rem 0.58rem;
  border: 1px solid rgba(166, 181, 171, 0.16);
  border-radius: 0.38rem;
  background: rgba(5, 14, 20, 0.7);
}
.gather-session-loot-item > img,
.gather-session-loot-item__fallback {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border: 1px solid rgba(210, 173, 92, 0.26);
  border-radius: 0.3rem;
  object-fit: cover;
  color: #d8b268;
  background: rgba(2, 8, 13, 0.78);
}
.gather-session-loot-item > strong {
  min-width: 0;
  overflow: hidden;
  color: #ede1c8;
  font-size: 0.7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gather-session-loot-item > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(4.8rem, auto));
  gap: 0.35rem;
}
.gather-session-loot-item > div > span {
  display: grid;
  gap: 0.18rem;
  color: rgba(183, 199, 191, 0.58);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gather-session-loot-item > div b {
  color: #c9edcf;
  font: 850 0.66rem/1 var(--font-mono, monospace);
}
.gather-session-loot-empty {
  margin: 0 1rem 1rem;
  padding: 1.5rem 1rem;
  border: 1px dashed rgba(130, 173, 143, 0.28);
  border-radius: 0.4rem;
  color: rgba(182, 199, 190, 0.66);
  background: rgba(3, 11, 17, 0.38);
  font-size: 0.67rem;
  text-align: center;
}

@media (max-width: 980px) {
  .gather-queue-header { flex-direction: column; }
  .gather-queue-composer { width: 100%; justify-content: flex-start; }
  .gather-queue-track { grid-auto-columns: minmax(17rem, 18rem); }
}
@media (max-width: 620px) {
  .gather-queue-panel { padding: 0.68rem; }
  .gather-queue-heading { min-width: 0; align-items: flex-start; }
  .gather-queue-heading p { font-size: 0.58rem; }
  .gather-queue-heading__title-row { align-items: flex-start; }
  .gather-queue-composer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .gather-queue-lanes { grid-column: 1 / -1; }
  .gather-queue-lane { flex: 1; justify-content: center; }
  .gather-queue-amount-card {
    grid-column: 1 / -1;
    width: 100%;
    grid-template-areas:
      "amount"
      "presets"
      "help";
    grid-template-columns: minmax(0, 1fr);
  }
  .gather-queue-amount { min-width: 0; }
  .gather-queue-amount input { width: 100%; }
  .gather-queue-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow-x: auto; }
  .gather-queue-presets button { min-width: 2.9rem; padding-inline: 0.42rem; }
  .gather-queue-end-toggle { grid-column: 1 / -1; width: 100%; min-height: 3.1rem; }
  .gather-queue-controls { grid-column: 1 / -1; width: 100%; }
  .gather-queue-controls > button { flex: 1 1 0; }
  .gather-queue-clear { width: 100%; }
  .gather-queue-track { grid-auto-columns: minmax(14.5rem, 84vw); }
  .gather-queue-order.is-active { grid-template-columns: 2.7rem minmax(0, 1fr); }
  .gather-queue-order.is-active .gather-queue-order__actions {
    grid-column: 1 / -1;
    width: 100%;
  }
  .gather-queue-order__actions .gather-queue-session-loot { flex: 1; }
  .gather-queue-empty { align-items: flex-start; padding: 0.7rem; text-align: left; }
  .gather-node-actions { grid-template-columns: 1fr; }
  .gather-node-card { height: auto !important; min-height: 338px; }
  .gather-session-loot-summary { grid-template-columns: 1fr; }
  .gather-session-loot-item { grid-template-columns: 2.2rem minmax(0, 1fr); }
  .gather-session-loot-item > img,
  .gather-session-loot-item__fallback { width: 2.2rem; height: 2.2rem; }
  .gather-session-loot-item > div { grid-column: 1 / -1; }
}
/* Crownroad Caravans */
.caravan-page {
  --caravan-brass: #d7b36b;
  --caravan-brass-soft: rgba(215, 179, 107, 0.2);
  --caravan-ink: #07111d;
  --caravan-panel: rgba(8, 17, 29, 0.9);
  --caravan-line: rgba(215, 179, 107, 0.25);
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  color: #e8dfcb;
  padding: clamp(0.25rem, 1vw, 1rem);
}

.caravan-page button {
  font-family: var(--font-ui, inherit);
}

.caravan-page-header,
.caravan-section-heading,
.caravan-active-heading,
.caravan-dispatch-footer,
.caravan-raid-modal-header,
.caravan-raid-modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.caravan-page-header {
  padding: clamp(1rem, 2.5vw, 2rem);
  border: 1px solid var(--caravan-line);
  background:
    linear-gradient(105deg, rgba(6, 13, 24, 0.97), rgba(15, 28, 42, 0.86)),
    url("./caravan/crownroad-backdrop.webp") center 46% / cover;
  box-shadow: inset 0 1px rgba(255, 233, 175, 0.08), 0 18px 50px rgba(0, 0, 0, 0.32);
  position: relative;
  overflow: hidden;
}

.caravan-page-header::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(3, 8, 16, 0.18), transparent 58%, rgba(3, 8, 16, 0.48));
}

.caravan-page-header > * {
  position: relative;
  z-index: 1;
}

.caravan-page h1,
.caravan-page h2,
.caravan-page h3 {
  font-family: var(--font-serif, Georgia, serif);
  color: #f4e7c4;
  margin: 0;
}

.caravan-page h1 {
  font-size: clamp(1.8rem, 4vw, 3.35rem);
  line-height: 1;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.72);
}

.caravan-page h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); }
.caravan-page h3 { font-size: 1.08rem; }

.caravan-page p {
  color: rgba(223, 215, 197, 0.72);
  line-height: 1.5;
}

.caravan-kicker {
  display: block;
  margin-bottom: 0.45rem;
  color: #d7b36b;
  font-size: 0.63rem;
  font-weight: 900;
  letter-spacing: 0.19em;
}

.caravan-header-status,
.caravan-stake-seal,
.caravan-raid-attempts {
  min-width: 12rem;
  display: grid;
  gap: 0.18rem;
  justify-items: end;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(215, 179, 107, 0.28);
  background: rgba(3, 9, 17, 0.75);
  box-shadow: inset 0 0 24px rgba(215, 179, 107, 0.05);
}

.caravan-header-status strong,
.caravan-stake-seal strong,
.caravan-raid-attempts strong {
  color: #f4d88f;
  font-size: 1.05rem;
}

.caravan-header-status small,
.caravan-stake-seal small,
.caravan-raid-attempts span {
  color: rgba(225, 216, 194, 0.62);
  font-size: 0.7rem;
}

.caravan-live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #6fb98f;
  box-shadow: 0 0 12px rgba(111, 185, 143, 0.78);
}

.caravan-live-dot.is-maintenance { background: #d6a45a; box-shadow: 0 0 12px rgba(214, 164, 90, 0.7); }

.caravan-maintenance-banner {
  margin-top: 0.65rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(214, 164, 90, 0.42);
  background: rgba(82, 52, 14, 0.42);
  color: #f3d19a;
  font-size: 0.82rem;
}

.caravan-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--caravan-line);
}

.caravan-tabs button {
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  background: rgba(5, 12, 21, 0.66);
  color: rgba(229, 218, 194, 0.68);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 160ms ease;
}

.caravan-tabs button:hover,
.caravan-tabs button.is-active {
  border-color: rgba(215, 179, 107, 0.48);
  color: #f4dfac;
  background: linear-gradient(180deg, rgba(90, 61, 23, 0.44), rgba(13, 25, 38, 0.78));
}

.caravan-tabs button span {
  display: inline-flex;
  min-width: 1.25rem;
  height: 1.25rem;
  align-items: center;
  justify-content: center;
  margin-left: 0.45rem;
  border-radius: 999px;
  background: #8e342c;
  color: #fff0da;
  font-size: 0.65rem;
}

.caravan-mine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem);
  gap: 0.75rem;
  padding-top: 0.75rem;
}

.caravan-active-card,
.caravan-dispatch-card,
.caravan-ledger,
.caravan-raid-board,
.caravan-reports {
  border: 1px solid var(--caravan-line);
  background: linear-gradient(145deg, rgba(10, 21, 34, 0.94), rgba(5, 12, 21, 0.96));
  box-shadow: inset 0 1px rgba(255, 233, 175, 0.05), 0 14px 38px rgba(0, 0, 0, 0.24);
}

.caravan-active-card,
.caravan-dispatch-card,
.caravan-raid-board,
.caravan-reports { padding: clamp(0.8rem, 1.8vw, 1.35rem); }
.caravan-ledger { padding: 1rem; }

.caravan-ledger ul {
  display: grid;
  gap: 0.65rem;
  padding: 0;
  margin: 1rem 0;
  list-style: none;
}

.caravan-ledger li {
  position: relative;
  padding-left: 1.15rem;
  color: rgba(226, 218, 200, 0.72);
  font-size: 0.76rem;
  line-height: 1.45;
}

.caravan-ledger li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42rem;
  width: 0.4rem;
  height: 0.4rem;
  transform: rotate(45deg);
  border: 1px solid #d7b36b;
  background: rgba(215, 179, 107, 0.16);
}

.caravan-pity {
  display: grid;
  gap: 0.4rem;
  padding: 0.8rem;
  border: 1px solid rgba(137, 98, 196, 0.35);
  background: rgba(35, 19, 60, 0.35);
}

.caravan-pity > span,
.caravan-pity small { color: rgba(220, 203, 239, 0.72); font-size: 0.7rem; }
.caravan-pity > strong { color: #d4b9f2; }
.caravan-pity > div { height: 0.35rem; background: rgba(0, 0, 0, 0.48); overflow: hidden; }
.caravan-pity > div span { display: block; height: 100%; background: linear-gradient(90deg, #7550a5, #c7a6ed); box-shadow: 0 0 8px #8f66bb; }

.caravan-section-heading { margin-bottom: 1rem; }
.caravan-section-heading.is-small { align-items: center; margin: 1.15rem 0 0.65rem; }
.caravan-section-heading p { margin: 0.35rem 0 0; font-size: 0.8rem; }

.caravan-route-grid,
.caravan-protection-grid,
.caravan-scout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.caravan-route-card,
.caravan-protection-card {
  min-width: 0;
  padding: 0.85rem;
  text-align: left;
  border: 1px solid rgba(177, 158, 123, 0.2);
  background: rgba(4, 11, 19, 0.72);
  color: #dfd5bf;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.caravan-route-card:hover,
.caravan-protection-card:hover { transform: translateY(-2px); border-color: rgba(215, 179, 107, 0.52); }
.caravan-route-card.is-selected,
.caravan-protection-card.is-selected { border-color: #d7b36b; background: linear-gradient(145deg, rgba(85, 57, 20, 0.35), rgba(7, 18, 29, 0.88)); box-shadow: inset 0 0 28px rgba(215, 179, 107, 0.07), 0 0 18px rgba(215, 179, 107, 0.08); }
.caravan-route-card[data-route="black"].is-selected { border-color: #b06576; background: linear-gradient(145deg, rgba(79, 20, 36, 0.48), rgba(7, 13, 23, 0.9)); }
.caravan-route-card[data-route="safe"].is-selected { border-color: #6fae87; background: linear-gradient(145deg, rgba(20, 66, 48, 0.42), rgba(7, 17, 25, 0.9)); }

.caravan-route-card > div:first-child { display: flex; flex-direction: column; gap: 0.22rem; }
.caravan-route-card > div span { color: #c49b63; font-size: 0.58rem; font-weight: 900; letter-spacing: 0.16em; }
.caravan-route-card > div strong { color: #f0dfb5; font-family: var(--font-serif, Georgia, serif); font-size: 1.05rem; }
.caravan-route-card p,
.caravan-protection-card p { min-height: 2.1rem; margin: 0.5rem 0 0.65rem; font-size: 0.7rem; }
.caravan-route-card dl,
.caravan-target-card dl { display: grid; gap: 0.3rem; margin: 0; }
.caravan-route-card dl div,
.caravan-target-card dl div { display: flex; justify-content: space-between; gap: 0.5rem; }
.caravan-route-card dt,
.caravan-target-card dt { color: rgba(218, 208, 186, 0.55); font-size: 0.65rem; }
.caravan-route-card dd,
.caravan-target-card dd { color: #ead198; font-size: 0.68rem; font-weight: 800; }

.caravan-protection-card { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 0.2rem 0.65rem; }
.caravan-protection-card strong,
.caravan-protection-card small,
.caravan-protection-card p { grid-column: 2; }
.caravan-protection-card strong { color: #ead9b3; font-size: 0.83rem; }
.caravan-protection-card small { color: #c5a66e; font-size: 0.66rem; }
.caravan-protection-card p { min-height: 0; margin: 0.35rem 0 0; }
.caravan-plan-icon { grid-row: 1 / span 3; width: 2rem; height: 2rem; border: 1px solid rgba(215, 179, 107, 0.35); border-radius: 50%; background: radial-gradient(circle, rgba(215, 179, 107, 0.25), transparent 70%); position: relative; }
.caravan-plan-icon::after { content: ""; position: absolute; inset: 0.48rem; border: 2px solid #d7b36b; transform: rotate(45deg); }
.caravan-plan-icon.is-smoke::after { border-radius: 50%; border-style: dotted; }
.caravan-plan-icon.is-shrine::after { transform: none; border-width: 0 2px 2px 0; }

.caravan-insured-badge {
  padding: 0.4rem 0.6rem;
  border: 1px solid rgba(91, 187, 148, 0.42);
  background: rgba(20, 75, 57, 0.34);
  color: #9be0c1;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.caravan-dispatch-footer { align-items: center; margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid var(--caravan-line); }
.caravan-dispatch-footer > div { display: grid; gap: 0.2rem; }
.caravan-dispatch-footer strong { color: #ead8af; font-size: 0.8rem; }
.caravan-dispatch-footer span { color: rgba(221, 211, 189, 0.62); font-size: 0.68rem; }

.caravan-primary-button,
.caravan-secondary-button,
.caravan-close-button {
  min-height: 2.45rem;
  padding: 0 1rem;
  border: 1px solid rgba(215, 179, 107, 0.52);
  background: linear-gradient(180deg, rgba(135, 91, 31, 0.85), rgba(78, 49, 17, 0.92));
  color: #fff0c5;
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: 150ms ease;
}
.caravan-primary-button:hover:not(:disabled) { filter: brightness(1.18); box-shadow: 0 0 18px rgba(215, 179, 107, 0.18); }
.caravan-primary-button.is-danger { border-color: rgba(194, 81, 67, 0.65); background: linear-gradient(180deg, #85392f, #4b1e1a); }
.caravan-secondary-button,
.caravan-close-button { border-color: rgba(171, 160, 137, 0.32); background: rgba(7, 16, 27, 0.84); color: #d9cdb4; }
.caravan-primary-button:disabled,
.caravan-secondary-button:disabled { cursor: not-allowed; opacity: 0.42; filter: grayscale(0.35); }

.caravan-travel-stage {
  position: relative;
  min-height: clamp(15rem, 32vw, 24rem);
  overflow: hidden;
  border: 1px solid rgba(215, 179, 107, 0.32);
  background: #07111d;
  isolation: isolate;
}
.caravan-stage-sky,
.caravan-stage-distant,
.caravan-stage-road { position: absolute; inset: 0; pointer-events: none; }
.caravan-stage-sky { background: url("./caravan/crownroad-backdrop.webp") center / cover; transform: scale(1.08); animation: caravan-sky-drift 38s ease-in-out infinite alternate; }
.caravan-stage-distant { background: linear-gradient(180deg, rgba(3, 9, 18, 0.06) 0%, rgba(7, 16, 26, 0.12) 50%, rgba(3, 7, 13, 0.68) 100%); }
.caravan-stage-road { top: 60%; background: repeating-linear-gradient(100deg, rgba(206, 176, 126, 0.11) 0 7%, rgba(0, 0, 0, 0.08) 7% 14%); filter: blur(0.5px); animation: caravan-road-rush 1.9s linear infinite; }
.caravan-stage-wagon-wrap { position: absolute; z-index: 4; width: clamp(17rem, 44vw, 34rem); left: 50%; bottom: 2%; transform: translateX(-50%); animation: caravan-wagon-roll 1.2s ease-in-out infinite; }
.caravan-stage-wagon { display: block; width: 100%; max-height: 18rem; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.66)); user-select: none; }
.caravan-stage-shadow { position: absolute; left: 18%; right: 4%; bottom: 2%; height: 12%; background: radial-gradient(ellipse, rgba(0, 0, 0, 0.72), transparent 68%); filter: blur(5px); }
.caravan-stage-guard { position: absolute; left: 49%; bottom: 29%; width: 12%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 2px solid rgba(239, 207, 139, 0.72); box-shadow: 0 0 0 3px rgba(5, 11, 19, 0.74), 0 0 20px rgba(215, 179, 107, 0.28); }
.caravan-stage-plan { position: absolute; right: 2%; bottom: 10%; padding: 0.32rem 0.48rem; border: 1px solid rgba(215, 179, 107, 0.35); background: rgba(3, 9, 17, 0.82); color: #e1c890; font-size: 0.58rem; font-weight: 900; letter-spacing: 0.07em; text-transform: uppercase; }
.caravan-stage-crates { position: absolute; right: 16%; bottom: 31%; display: flex; gap: 0.16rem; }
.caravan-stage-crates span { width: clamp(0.6rem, 1.5vw, 0.95rem); height: clamp(0.5rem, 1.3vw, 0.8rem); border: 1px solid #c79b5c; background: linear-gradient(135deg, #8d5e30, #4d301b); box-shadow: inset 0 0 0 1px rgba(255, 221, 151, 0.13); }
.caravan-stage-crates span.is-stolen { border-color: rgba(194, 81, 67, 0.45); background: rgba(72, 24, 20, 0.36); opacity: 0.35; }
.caravan-stage-dust { position: absolute; z-index: 3; bottom: 8%; width: 16rem; height: 5rem; border-radius: 50%; background: radial-gradient(ellipse, rgba(186, 150, 98, 0.23), transparent 70%); filter: blur(8px); animation: caravan-dust 2.8s linear infinite; }
.caravan-stage-dust--one { left: 35%; }
.caravan-stage-dust--two { left: 48%; animation-delay: -1.3s; }
.caravan-stage-progress { position: absolute; z-index: 8; left: 0.65rem; right: 0.65rem; bottom: 0.55rem; height: 0.3rem; background: rgba(0, 0, 0, 0.58); overflow: hidden; }
.caravan-stage-progress span { display: block; height: 100%; background: linear-gradient(90deg, #7b5630, #e0bd72); box-shadow: 0 0 10px rgba(224, 189, 114, 0.45); transition: width 800ms linear; }
.caravan-stage-impact { position: absolute; z-index: 10; left: 51%; top: 28%; color: #ffb69e; font: 900 clamp(1.2rem, 3vw, 2.3rem) var(--font-ui, sans-serif); text-shadow: 0 2px 0 #4f1713, 0 0 18px rgba(255, 74, 53, 0.75); animation: caravan-impact 480ms ease-out both; }
.caravan-stage-impact.is-critical { color: #ffd474; transform: scale(1.15); }
.caravan-travel-stage[data-route="safe"] { border-color: rgba(101, 184, 145, 0.42); }
.caravan-travel-stage[data-route="black"] { border-color: rgba(185, 78, 99, 0.52); }
.caravan-travel-stage[data-route="black"] .caravan-stage-distant { background: linear-gradient(180deg, rgba(56, 8, 24, 0.1), rgba(15, 3, 13, 0.72)); }

@keyframes caravan-sky-drift { from { transform: scale(1.08) translateX(-1.4%); } to { transform: scale(1.11) translateX(1.4%); } }
@keyframes caravan-road-rush { from { background-position: 0 0; } to { background-position: -17rem 0; } }
@keyframes caravan-wagon-roll { 0%, 100% { transform: translateX(-50%) translateY(0) rotate(-0.15deg); } 50% { transform: translateX(-50%) translateY(-4px) rotate(0.18deg); } }
@keyframes caravan-dust { 0% { transform: translateX(4rem) scale(0.55); opacity: 0; } 35% { opacity: 0.7; } 100% { transform: translateX(-12rem) scale(1.25); opacity: 0; } }
@keyframes caravan-impact { from { transform: translateY(0) scale(0.7); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(-2.2rem) scale(1.05); opacity: 0; } }

.caravan-active-heading { margin-bottom: 0.65rem; }
.caravan-active-heading p { margin: 0.25rem 0 0; font-size: 0.75rem; }
.caravan-countdown { display: grid; justify-items: end; }
.caravan-countdown strong { color: #f1d388; font: 900 1.25rem var(--font-mono, monospace); }
.caravan-countdown span { color: rgba(227, 218, 197, 0.62); font-size: 0.67rem; }
.caravan-active-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin: 0.65rem 0; }
.caravan-active-grid > div { display: grid; gap: 0.18rem; padding: 0.7rem; border: 1px solid rgba(215, 179, 107, 0.18); background: rgba(3, 10, 18, 0.55); }
.caravan-active-grid span { color: rgba(219, 208, 184, 0.55); font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.1em; }
.caravan-active-grid strong { color: #ead5a5; font-size: 0.77rem; }
.caravan-active-grid small { color: rgba(211, 202, 181, 0.58); font-size: 0.63rem; }
.caravan-active-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.7rem; }

.caravan-equipment-strip { display: flex; flex-wrap: wrap; gap: 0.35rem; min-height: 2.45rem; }
.caravan-equipment-slot { width: 2.45rem; height: 2.45rem; display: grid; place-items: center; border: 1px solid rgba(158, 147, 126, 0.3); background: #08111d; overflow: visible; }
.caravan-equipment-slot[data-rarity="legendary"] { border-color: rgba(218, 177, 89, 0.72); box-shadow: inset 0 0 10px rgba(218, 177, 89, 0.08); }
.caravan-equipment-slot[data-rarity="mythic"] { border-color: rgba(198, 107, 74, 0.72); }
.caravan-equipment-slot img { width: 100%; height: 100%; object-fit: cover; }
.caravan-equipment-slot span { color: #d3b571; font-size: 0.6rem; }
.caravan-equipment-strip.is-compact .caravan-equipment-slot { width: 2rem; height: 2rem; }
.caravan-equipment-empty { color: rgba(215, 206, 185, 0.45); font-size: 0.68rem; align-self: center; }
.caravan-equipment-slot {
  cursor: help;
  border-radius: 0.22rem;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.caravan-equipment-slot:hover,
.caravan-equipment-slot:focus-visible {
  border-color: rgba(232, 204, 142, 0.9);
  box-shadow: 0 0 0 1px rgba(232, 204, 142, 0.25), 0 0 16px rgba(95, 174, 222, 0.18);
  outline: none;
  transform: translateY(-1px);
}
.caravan-item-tooltip {
  position: fixed;
  z-index: 2147483645;
  box-sizing: border-box;
  width: min(21rem, calc((100vw / var(--vespera-ui-scale, 1)) - 24px));
  max-height: calc((100vh / var(--vespera-ui-scale, 1)) - 24px);
  max-height: calc((100dvh / var(--vespera-ui-scale, 1)) - 24px);
  overflow: auto;
  pointer-events: none;
  padding: 0.85rem;
  border: 1px solid rgba(214, 169, 79, 0.68);
  border-radius: 0.42rem;
  background:
    linear-gradient(90deg, transparent, rgba(214, 169, 79, 0.52), transparent) top / 82% 1px no-repeat,
    radial-gradient(circle at 15% 0%, rgba(43, 105, 154, 0.22), transparent 48%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.995), rgba(2, 7, 15, 0.998));
  color: rgba(243, 235, 218, 0.96);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.78), 0 0 24px rgba(33, 106, 164, 0.14);
  font-family: var(--font-ui, var(--font-body, serif));
}
.caravan-item-tooltip[data-rarity="rare"] { border-color: rgba(84, 188, 238, 0.82); }
.caravan-item-tooltip[data-rarity="epic"] { border-color: rgba(176, 113, 232, 0.84); }
.caravan-item-tooltip[data-rarity="legendary"] { border-color: rgba(226, 183, 83, 0.88); }
.caravan-item-tooltip[data-rarity="mythic"] { border-color: rgba(225, 92, 100, 0.9); }
.caravan-item-tooltip header {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  align-items: center;
  gap: 0.72rem;
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(214, 169, 79, 0.22);
}
.caravan-item-tooltip header > img,
.caravan-item-tooltip header > span {
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  object-fit: cover;
  border: 1px solid rgba(214, 169, 79, 0.46);
  border-radius: 0.3rem;
  background: #050c16;
}
.caravan-item-tooltip header small {
  display: block;
  margin-bottom: 0.18rem;
  color: rgba(114, 204, 239, 0.82);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.caravan-item-tooltip header strong {
  display: block;
  color: #f6ecd8;
  font-size: 0.92rem;
  line-height: 1.2;
}
.caravan-item-tooltip > p {
  margin: 0.72rem 0;
  color: rgba(224, 215, 197, 0.78);
  font-size: 0.72rem;
  line-height: 1.48;
}
.caravan-item-tooltip dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.32rem 0.8rem;
  margin: 0.72rem 0 0;
  padding-top: 0.68rem;
  border-top: 1px solid rgba(214, 169, 79, 0.18);
  font-size: 0.7rem;
}
.caravan-item-tooltip dt { color: rgba(220, 213, 198, 0.72); }
.caravan-item-tooltip dd {
  margin: 0;
  color: #8ee4bb;
  font-weight: 850;
  text-align: right;
}

.caravan-target-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.65rem; }
.caravan-target-card { padding: 0.8rem; border: 1px solid rgba(215, 179, 107, 0.2); background: rgba(4, 11, 19, 0.72); }
.caravan-target-card.is-dangerous { border-color: rgba(185, 76, 79, 0.46); }
.caravan-target-card.is-favored { border-color: rgba(90, 173, 133, 0.4); }
.caravan-target-card header { display: grid; grid-template-columns: 2.8rem minmax(0, 1fr) auto; gap: 0.6rem; align-items: center; }
.caravan-target-card header > img { width: 2.8rem; height: 2.8rem; border-radius: 50%; object-fit: cover; border: 1px solid rgba(215, 179, 107, 0.45); }
.caravan-target-card header span { color: #c09b63; font-size: 0.55rem; font-weight: 900; letter-spacing: 0.13em; }
.caravan-target-card h3 { font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.caravan-target-card header p { margin: 0.12rem 0 0; font-size: 0.62rem; }
.caravan-match-badge { color: #e2c98e; font-size: 0.6rem; text-transform: uppercase; }
.caravan-target-route { display: flex; justify-content: space-between; margin: 0.7rem 0 0.5rem; padding: 0.45rem; background: rgba(0, 0, 0, 0.24); }
.caravan-target-route span { color: #d3b678; font-size: 0.66rem; font-weight: 900; }
.caravan-target-route span[data-route="safe"] { color: #88c8a3; }
.caravan-target-route span[data-route="black"] { color: #d8889a; }
.caravan-target-route strong { color: #e7dcc4; font-size: 0.66rem; }
.caravan-target-card dl { margin: 0.65rem 0; }
.caravan-target-card > button { width: 100%; }

.caravan-raid-modal-layer { position: fixed; z-index: 12000; inset: 0; display: grid; place-items: center; padding: 1rem; }
.caravan-raid-modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(1, 5, 10, 0.82); backdrop-filter: blur(6px); }
.caravan-raid-modal { position: relative; z-index: 1; width: min(68rem, 96vw); max-height: 94vh; overflow-y: auto; padding: 1rem; border: 1px solid rgba(215, 179, 107, 0.5); background: linear-gradient(145deg, #0b1827, #050c15); box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72); }
.caravan-raid-modal-header p { margin: 0.25rem 0 0; font-size: 0.72rem; }
.caravan-raid-modal .caravan-travel-stage { min-height: clamp(15rem, 34vw, 23rem); margin-top: 0.7rem; }
.caravan-scout-grid { margin-top: 0.65rem; }
.caravan-scout-card { display: grid; gap: 0.2rem; padding: 0.65rem; border: 1px solid rgba(215, 179, 107, 0.18); background: rgba(1, 7, 13, 0.5); }
.caravan-scout-card span,
.caravan-scout-loadout > span { color: rgba(219, 209, 187, 0.55); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.1em; }
.caravan-scout-card strong { color: #ecd39a; font-size: 0.78rem; }
.caravan-scout-card small { color: rgba(218, 207, 184, 0.64); font-size: 0.63rem; }
.caravan-scout-loadout { display: grid; gap: 0.4rem; margin: 0.65rem 0; }
.caravan-duel-hud { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.7rem; margin-top: 0.55rem; }
.caravan-duel-side { display: grid; gap: 0.25rem; }
.caravan-duel-side.is-defender { text-align: right; }
.caravan-duel-side strong { color: #d9c9a8; font-size: 0.66rem; }
.caravan-duel-bar { height: 0.45rem; overflow: hidden; background: rgba(0, 0, 0, 0.62); }
.caravan-duel-bar span { display: block; height: 100%; background: linear-gradient(90deg, #7c2d2d, #d3664f); transition: width 220ms linear; }
.caravan-duel-side.is-defender .caravan-duel-bar span { margin-left: auto; background: linear-gradient(90deg, #d2a85d, #7d5428); }
.caravan-duel-result { color: #c5a86d; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.12em; }
.caravan-duel-result.is-settled { color: #f2d588; font-size: 0.8rem; }
.caravan-replay-line { min-height: 2rem; display: grid; place-items: center; padding: 0.45rem; border: 1px solid rgba(215, 179, 107, 0.16); background: rgba(2, 8, 14, 0.62); color: #ddcda9; font-size: 0.73rem; }
.caravan-replay-line.is-critical { color: #ffd578; text-shadow: 0 0 10px rgba(255, 213, 120, 0.35); }
.caravan-raid-modal-actions { align-items: center; margin-top: 0.7rem; }
.caravan-raid-modal-actions > span { color: rgba(218, 207, 184, 0.64); font-size: 0.69rem; }

.caravan-report-list { display: grid; gap: 0.45rem; }
.caravan-report-list article { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr) auto; gap: 0.7rem; align-items: center; padding: 0.7rem; border: 1px solid rgba(215, 179, 107, 0.16); background: rgba(3, 10, 18, 0.58); }
.caravan-report-list article[data-outcome="lost"] { border-color: rgba(188, 72, 72, 0.35); }
.caravan-report-icon { width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid rgba(215, 179, 107, 0.42); background: radial-gradient(circle, rgba(215, 179, 107, 0.22), rgba(5, 12, 21, 0.72)); position: relative; }
.caravan-report-icon::after { content: ""; position: absolute; inset: 0.55rem; border: 2px solid #d7b36b; transform: rotate(45deg); }
.caravan-report-icon.is-raid::after { border-color: #c86758; }
.caravan-report-list strong { color: #ead8b0; font-size: 0.78rem; }
.caravan-report-list p { margin: 0.15rem 0; font-size: 0.69rem; }
.caravan-report-list small { color: rgba(210, 200, 179, 0.48); font-size: 0.6rem; }
.caravan-report-list b { color: #9ed3a6; font-size: 0.75rem; }
.caravan-empty-state { padding: 2rem; border: 1px dashed rgba(215, 179, 107, 0.22); color: rgba(219, 210, 190, 0.5); text-align: center; font-size: 0.76rem; }

.caravan-hold { display: grid; gap: 0.45rem; margin-top: 0.8rem; padding-top: 0.8rem; border-top: 1px solid rgba(215, 179, 107, 0.2); }
.caravan-hold p { margin: 0; font-size: 0.68rem; }
.caravan-hold button { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: 0.45rem; padding: 0.35rem; border: 1px solid rgba(215, 179, 107, 0.25); background: rgba(4, 10, 18, 0.7); color: #e3d2ae; text-align: left; }
.caravan-hold button img { width: 2rem; height: 2rem; object-fit: cover; }
.caravan-hold button span { font-size: 0.67rem; }
.caravan-hold button strong { color: #d8b56f; font-size: 0.62rem; }

.caravan-page--offline { max-width: 48rem; margin: 3rem auto; padding: 2rem; border: 1px solid rgba(215, 179, 107, 0.25); background: rgba(6, 14, 24, 0.92); text-align: center; }

@media (max-width: 1040px) {
  .caravan-mine-layout { grid-template-columns: 1fr; }
  .caravan-ledger { order: 2; }
  .caravan-target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .caravan-page { padding: 0; }
  .caravan-page-header,
  .caravan-section-heading,
  .caravan-active-heading,
  .caravan-dispatch-footer,
  .caravan-raid-modal-header,
  .caravan-raid-modal-actions { flex-direction: column; align-items: stretch; }
  .caravan-header-status,
  .caravan-stake-seal,
  .caravan-raid-attempts { min-width: 0; justify-items: start; }
  .caravan-tabs { overflow-x: auto; }
  .caravan-tabs button { flex: 0 0 auto; }
  .caravan-route-grid,
  .caravan-protection-grid,
  .caravan-scout-grid,
  .caravan-target-grid,
  .caravan-active-grid { grid-template-columns: 1fr; }
  .caravan-travel-stage { min-height: 13.5rem; }
  .caravan-stage-wagon-wrap { width: 19rem; left: 54%; }
  .caravan-target-card h3 { white-space: normal; }
  .caravan-duel-hud { grid-template-columns: 1fr; }
  .caravan-duel-side.is-defender { text-align: left; }
  .caravan-duel-side.is-defender .caravan-duel-bar span { margin-left: 0; }
  .caravan-duel-result { text-align: center; }
  .caravan-report-list article { grid-template-columns: 2rem minmax(0, 1fr); }
  .caravan-report-list article > b { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .caravan-stage-sky,
  .caravan-stage-road,
  .caravan-stage-wagon-wrap,
  .caravan-stage-dust,
  .caravan-stage-impact { animation: none !important; }
}

.reduce-motion .caravan-stage-sky,
.reduce-motion .caravan-stage-road,
.reduce-motion .caravan-stage-wagon-wrap,
.reduce-motion .caravan-stage-dust,
.reduce-motion .caravan-stage-impact { animation: none !important; }

/* Crownroad Caravans visual revamp */
.caravan-page {
  --caravan-brass: #f0c96e;
  --caravan-brass-soft: rgba(240, 201, 110, 0.2);
  --caravan-ink: #08192a;
  --caravan-panel: rgba(10, 30, 48, 0.94);
  --caravan-line: rgba(240, 201, 110, 0.29);
  color: #f3ead5;
  background:
    radial-gradient(circle at 76% 3%, rgba(63, 134, 150, 0.16), transparent 32rem),
    radial-gradient(circle at 18% 22%, rgba(202, 142, 54, 0.1), transparent 28rem),
    linear-gradient(150deg, rgba(10, 29, 47, 0.84), rgba(5, 16, 28, 0.88));
}

.caravan-page-header {
  min-height: 10rem;
  align-items: center;
  border-color: rgba(248, 211, 125, 0.45);
  background:
    linear-gradient(92deg, rgba(6, 24, 40, 0.96) 0%, rgba(7, 28, 46, 0.82) 40%, rgba(7, 25, 39, 0.18) 72%),
    url("./caravan/crownroad-backdrop-v2.webp") center 58% / cover;
  box-shadow: inset 0 1px rgba(255, 242, 197, 0.16), 0 20px 48px rgba(2, 10, 18, 0.34);
}

.caravan-page-header::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f3c767 24%, #75d0c1 74%, transparent);
  opacity: 0.8;
}

.caravan-page-header::after {
  background: radial-gradient(circle at 84% 10%, rgba(255, 214, 128, 0.16), transparent 18rem);
}

.caravan-page h1,
.caravan-page h2,
.caravan-page h3 { color: #fff0c8; }
.caravan-page h1 { text-shadow: 0 3px 24px rgba(1, 8, 14, 0.7), 0 0 30px rgba(243, 199, 103, 0.1); }
.caravan-page p { color: rgba(235, 227, 208, 0.78); }
.caravan-kicker { color: #f4c968; }

.caravan-header-status,
.caravan-stake-seal,
.caravan-raid-attempts {
  border-color: rgba(247, 207, 116, 0.46);
  background: linear-gradient(145deg, rgba(12, 39, 57, 0.91), rgba(7, 22, 36, 0.91));
  box-shadow: inset 0 1px rgba(255, 240, 194, 0.11), 0 8px 26px rgba(0, 0, 0, 0.22);
}

.caravan-header-status strong,
.caravan-stake-seal strong,
.caravan-raid-attempts strong { color: #ffdf91; }

.caravan-tabs button {
  background: linear-gradient(180deg, rgba(13, 36, 54, 0.88), rgba(7, 22, 36, 0.9));
  color: rgba(241, 231, 208, 0.72);
}

.caravan-tabs button:hover,
.caravan-tabs button.is-active {
  border-color: rgba(244, 200, 98, 0.62);
  color: #ffe2a0;
  background: linear-gradient(180deg, rgba(94, 70, 31, 0.7), rgba(11, 36, 54, 0.94));
  box-shadow: inset 0 1px rgba(255, 237, 181, 0.12), 0 0 20px rgba(223, 173, 70, 0.09);
}

.caravan-active-card,
.caravan-dispatch-card,
.caravan-ledger,
.caravan-raid-board,
.caravan-reports {
  border-color: rgba(239, 199, 106, 0.29);
  background:
    radial-gradient(circle at 90% 0%, rgba(63, 133, 148, 0.08), transparent 23rem),
    linear-gradient(145deg, rgba(12, 35, 54, 0.97), rgba(7, 22, 37, 0.98));
  box-shadow: inset 0 1px rgba(255, 237, 181, 0.07), 0 16px 38px rgba(0, 0, 0, 0.25);
}

.caravan-ledger li { color: rgba(238, 228, 205, 0.78); }
.caravan-pity {
  border-color: rgba(167, 130, 230, 0.54);
  background: linear-gradient(140deg, rgba(57, 34, 90, 0.52), rgba(21, 29, 59, 0.56));
  box-shadow: inset 0 0 25px rgba(151, 112, 218, 0.08);
}

.caravan-route-card,
.caravan-protection-card,
.caravan-target-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(193, 186, 158, 0.25);
  background: linear-gradient(150deg, rgba(14, 40, 58, 0.92), rgba(7, 24, 39, 0.93));
}

.caravan-route-card::before,
.caravan-protection-card::before,
.caravan-target-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(126, 204, 192, 0.68), transparent);
  opacity: 0.38;
}

.caravan-route-card:hover,
.caravan-protection-card:hover,
.caravan-target-card:hover {
  transform: translateY(-3px);
  border-color: rgba(246, 207, 117, 0.6);
  box-shadow: 0 13px 25px rgba(0, 0, 0, 0.19), inset 0 1px rgba(255, 239, 191, 0.08);
}

.caravan-route-card.is-selected,
.caravan-protection-card.is-selected {
  border-color: #f0c96e;
  background: linear-gradient(145deg, rgba(100, 73, 28, 0.56), rgba(10, 39, 56, 0.96));
  box-shadow: inset 0 0 32px rgba(232, 186, 87, 0.08), 0 0 22px rgba(215, 169, 65, 0.1);
}

.caravan-route-card[data-route="safe"].is-selected {
  border-color: #83d8ad;
  background: linear-gradient(145deg, rgba(26, 92, 70, 0.56), rgba(8, 35, 47, 0.96));
}

.caravan-route-card[data-route="black"].is-selected {
  border-color: #d989a0;
  background: linear-gradient(145deg, rgba(102, 38, 61, 0.58), rgba(16, 29, 47, 0.96));
}

.caravan-route-card > div strong,
.caravan-protection-card strong,
.caravan-dispatch-footer strong,
.caravan-active-grid strong { color: #ffe2a1; }
.caravan-route-card dd,
.caravan-target-card dd { color: #ffdc8a; }

.caravan-primary-button {
  border-color: rgba(255, 218, 128, 0.72);
  background: linear-gradient(180deg, #b27a29, #704617);
  color: #fff4d1;
  box-shadow: inset 0 1px rgba(255, 244, 207, 0.18), 0 8px 18px rgba(0, 0, 0, 0.2);
}

.caravan-primary-button:hover:not(:disabled) {
  filter: brightness(1.13) saturate(1.08);
  box-shadow: 0 0 24px rgba(244, 198, 96, 0.23), inset 0 1px rgba(255, 247, 218, 0.25);
}

.caravan-secondary-button,
.caravan-close-button {
  border-color: rgba(118, 203, 189, 0.38);
  background: linear-gradient(180deg, rgba(20, 57, 73, 0.94), rgba(8, 30, 46, 0.96));
  color: #dff4eb;
}

.caravan-secondary-button:hover:not(:disabled),
.caravan-close-button:hover { border-color: rgba(127, 220, 204, 0.7); background: linear-gradient(180deg, rgba(27, 76, 88, 0.96), rgba(10, 38, 54, 0.97)); }

.caravan-travel-stage {
  min-height: clamp(18rem, 35vw, 27rem);
  border: 2px solid rgba(245, 202, 104, 0.46);
  background: #16334a;
  box-shadow: inset 0 0 0 1px rgba(255, 239, 188, 0.06), 0 14px 34px rgba(0, 0, 0, 0.24);
}

.caravan-stage-sky {
  background: url("./caravan/crownroad-backdrop-v2.webp") center 62% / cover;
  transform: scale(1.025);
  filter: saturate(1.06) contrast(1.02);
  animation: caravan-sky-drift-v2 34s ease-in-out infinite alternate;
}

.caravan-stage-distant {
  background:
    linear-gradient(180deg, rgba(13, 41, 60, 0.03) 0%, rgba(11, 35, 48, 0.04) 52%, rgba(5, 18, 26, 0.36) 100%),
    linear-gradient(90deg, rgba(5, 18, 28, 0.12), transparent 36%, rgba(14, 40, 51, 0.04));
}

.caravan-stage-sunwash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 15% 18%, rgba(255, 210, 116, 0.21), transparent 31%);
  mix-blend-mode: screen;
}

.caravan-stage-badges {
  position: absolute;
  z-index: 9;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  pointer-events: none;
}

.caravan-stage-badges > span {
  display: grid;
  gap: 0.05rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid rgba(255, 224, 147, 0.5);
  background: linear-gradient(145deg, rgba(7, 27, 40, 0.88), rgba(11, 43, 55, 0.78));
  color: #f7e4b3;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.caravan-stage-badges b { color: #ffce70; font-size: 0.55rem; letter-spacing: 0.13em; }
.caravan-stage-route-badge[data-route="safe"] b { color: #91e3b5; }
.caravan-stage-route-badge[data-route="black"] b { color: #f09aaf; }
.caravan-stage-cargo-badge { text-align: right; }

.caravan-stage-wagon-wrap {
  width: clamp(25rem, 59vw, 48rem);
  left: 48%;
  bottom: -0.3%;
  animation: caravan-wagon-roll-v2 1.16s ease-in-out infinite;
}

.caravan-stage-wagon {
  max-height: 22rem;
  filter: drop-shadow(0 14px 13px rgba(0, 0, 0, 0.48)) drop-shadow(0 0 10px rgba(255, 202, 98, 0.1));
}

.caravan-stage-shadow { left: 9%; right: 3%; bottom: 1%; height: 10%; background: radial-gradient(ellipse, rgba(4, 10, 12, 0.57), transparent 70%); }
.caravan-stage-crates { display: none; }
.caravan-stage-guard {
  left: 52%;
  bottom: 38%;
  width: 10%;
  border-color: rgba(255, 220, 133, 0.92);
  box-shadow: 0 0 0 3px rgba(8, 29, 39, 0.86), 0 0 22px rgba(255, 200, 89, 0.38);
}

.caravan-stage-plan {
  right: 9%;
  bottom: 11%;
  border-color: rgba(255, 217, 125, 0.58);
  background: linear-gradient(145deg, rgba(7, 27, 41, 0.91), rgba(18, 58, 68, 0.87));
  color: #ffe09a;
  box-shadow: inset 0 1px rgba(255, 240, 194, 0.1), 0 5px 15px rgba(0, 0, 0, 0.24);
}

.caravan-stage-dust {
  bottom: 6%;
  width: 13rem;
  height: 3.5rem;
  background: radial-gradient(ellipse, rgba(221, 167, 93, 0.2), transparent 68%);
  filter: blur(9px);
  animation: caravan-dust-v2 3.1s linear infinite;
}

.caravan-stage-progress {
  left: 0.8rem;
  right: 0.8rem;
  bottom: 0.6rem;
  height: 0.42rem;
  overflow: visible;
  border: 1px solid rgba(255, 232, 167, 0.38);
  background: rgba(7, 22, 28, 0.74);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.33);
}

.caravan-stage-progress span {
  position: relative;
  background: linear-gradient(90deg, #5fc3ae, #f3c864 72%, #ffe6a5);
  box-shadow: 0 0 14px rgba(239, 193, 90, 0.48);
}

.caravan-stage-progress span::after {
  content: "";
  position: absolute;
  right: -0.32rem;
  top: 50%;
  width: 0.68rem;
  height: 0.68rem;
  transform: translateY(-50%) rotate(45deg);
  border: 1px solid #fff0bd;
  background: #e3ad47;
  box-shadow: 0 0 12px rgba(255, 213, 119, 0.72);
}

.caravan-stage-strike {
  position: absolute;
  z-index: 9;
  top: 49%;
  left: 43%;
  width: 26%;
  height: 0.2rem;
  transform: rotate(-19deg);
  background: linear-gradient(90deg, transparent, #fff5c7 42%, #f2a45f 62%, transparent);
  box-shadow: 0 0 14px #ffb45e;
  animation: caravan-stage-strike 460ms ease-out both;
}
.caravan-stage-strike.is-defender { left: 30%; transform: rotate(19deg) scaleX(-1); }
.caravan-stage-strike.is-critical { height: 0.32rem; box-shadow: 0 0 20px #ffd36f, 0 0 36px rgba(255, 116, 57, 0.72); }

.caravan-stage-impact {
  left: auto;
  right: 23%;
  top: 35%;
  padding: 0.12rem 0.35rem;
  color: #fff1d1;
  text-shadow: 0 2px 0 #6d1f16, 0 0 18px rgba(255, 96, 56, 0.8);
}
.caravan-stage-impact.is-defender { left: 28%; right: auto; }
.caravan-stage-impact.is-heal { color: #a9f1bf; text-shadow: 0 2px 0 #155632, 0 0 18px rgba(69, 220, 127, 0.72); }

.caravan-active-grid > div,
.caravan-scout-card {
  border-color: rgba(235, 197, 110, 0.25);
  background: linear-gradient(145deg, rgba(12, 43, 60, 0.76), rgba(7, 27, 43, 0.76));
  box-shadow: inset 0 1px rgba(255, 240, 194, 0.05);
}

.caravan-target-card.is-favored { border-color: rgba(102, 210, 158, 0.55); }
.caravan-target-card.is-dangerous { border-color: rgba(222, 113, 123, 0.58); }
.caravan-target-route { background: rgba(4, 21, 33, 0.54); border: 1px solid rgba(238, 200, 112, 0.12); }

.caravan-raid-modal-backdrop { background: rgba(2, 12, 19, 0.76); backdrop-filter: blur(9px) saturate(1.12); }
.caravan-raid-modal {
  width: min(76rem, 96vw);
  border-color: rgba(246, 204, 107, 0.6);
  background:
    radial-gradient(circle at 50% 0%, rgba(44, 113, 123, 0.12), transparent 30rem),
    linear-gradient(145deg, #0e2a40, #071a2c 72%);
  box-shadow: inset 0 1px rgba(255, 241, 194, 0.09), 0 28px 90px rgba(0, 0, 0, 0.65);
}
.caravan-raid-modal .caravan-travel-stage { min-height: clamp(18rem, 34vw, 26rem); }

.caravan-battle-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8.5rem, auto) minmax(0, 1fr);
  align-items: stretch;
  gap: 0.7rem;
  margin-top: 0.7rem;
  padding: 0.7rem;
  border: 1px solid rgba(239, 198, 103, 0.35);
  background: linear-gradient(105deg, rgba(77, 30, 31, 0.56), rgba(8, 30, 45, 0.9) 48%, rgba(78, 58, 24, 0.54));
  box-shadow: inset 0 1px rgba(255, 240, 191, 0.08);
}
.caravan-battle-panel.is-victory { border-color: rgba(117, 222, 172, 0.54); }
.caravan-battle-panel.is-defeat { border-color: rgba(221, 116, 117, 0.56); }

.caravan-combatant {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr) auto;
  grid-template-rows: auto 0.55rem;
  gap: 0.38rem 0.65rem;
  align-items: center;
  min-width: 0;
  padding: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 20, 31, 0.56);
}
.caravan-combatant.is-defender { direction: rtl; text-align: right; }
.caravan-combatant.is-defender > * { direction: ltr; }
.caravan-combatant img { grid-row: 1 / span 2; width: 3.4rem; height: 3.4rem; object-fit: cover; border-radius: 50%; border: 2px solid #ca6a5d; box-shadow: 0 0 18px rgba(208, 79, 63, 0.24); }
.caravan-combatant.is-defender img { border-color: #e6bd62; box-shadow: 0 0 18px rgba(227, 181, 79, 0.25); }
.caravan-combatant-copy { display: grid; min-width: 0; }
.caravan-combatant-copy span { color: #e68974; font-size: 0.53rem; font-weight: 900; letter-spacing: 0.13em; }
.caravan-combatant.is-defender .caravan-combatant-copy span { color: #e7c56f; }
.caravan-combatant-copy strong { overflow: hidden; color: #fff0d0; font-size: 0.78rem; text-overflow: ellipsis; white-space: nowrap; }
.caravan-combatant-copy small { color: rgba(235, 226, 205, 0.65); font-size: 0.61rem; }
.caravan-combatant > b { color: #f6d7b1; font: 900 0.78rem var(--font-mono, monospace); }
.caravan-combatant-bar { grid-column: 2 / 4; height: 0.55rem; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); background: rgba(1, 8, 13, 0.72); }
.caravan-combatant-bar span { display: block; height: 100%; background: linear-gradient(90deg, #9d3635, #e67857); box-shadow: 0 0 10px rgba(225, 93, 72, 0.35); transition: width 420ms ease; }
.caravan-combatant.is-defender .caravan-combatant-bar span { margin-left: auto; background: linear-gradient(90deg, #f1ce75, #a2762f); box-shadow: 0 0 10px rgba(240, 198, 90, 0.32); }

.caravan-battle-emblem { display: grid; align-content: center; justify-items: center; min-width: 8.5rem; padding: 0.35rem; text-align: center; }
.caravan-battle-emblem i { width: 2.35rem; height: 2.35rem; display: grid; place-items: center; border: 1px solid rgba(255, 218, 129, 0.52); border-radius: 50%; background: radial-gradient(circle, rgba(219, 164, 64, 0.3), rgba(8, 29, 43, 0.72)); color: #ffdfa0; font: 900 0.72rem var(--font-serif, Georgia, serif); }
.caravan-battle-emblem strong { margin-top: 0.25rem; color: #ffe098; font-size: 0.68rem; letter-spacing: 0.13em; }
.caravan-battle-emblem small { color: rgba(238, 227, 204, 0.61); font-size: 0.57rem; }
.caravan-battle-panel.is-victory .caravan-battle-emblem strong { color: #9ce7bd; text-shadow: 0 0 14px rgba(87, 213, 145, 0.32); }
.caravan-battle-panel.is-defeat .caravan-battle-emblem strong { color: #f0978b; }

.caravan-battle-feed {
  margin-top: 0.65rem;
  border: 1px solid rgba(239, 198, 103, 0.24);
  background: rgba(4, 19, 31, 0.68);
  overflow: hidden;
}
.caravan-battle-feed > header { display: flex; justify-content: space-between; padding: 0.45rem 0.65rem; border-bottom: 1px solid rgba(239, 198, 103, 0.16); background: rgba(18, 53, 67, 0.5); }
.caravan-battle-feed > header strong { color: #f0c96e; font-size: 0.58rem; letter-spacing: 0.15em; }
.caravan-battle-feed > header span { color: rgba(231, 224, 208, 0.58); font-size: 0.61rem; }
.caravan-battle-feed > div { display: grid; }
.caravan-battle-feed p { display: grid; grid-template-columns: 2.3rem 4.1rem minmax(0, 1fr); gap: 0.5rem; align-items: center; min-height: 2rem; margin: 0; padding: 0.35rem 0.65rem; border-bottom: 1px solid rgba(255, 255, 255, 0.045); opacity: 0.55; }
.caravan-battle-feed p.is-current { opacity: 1; background: linear-gradient(90deg, rgba(43, 110, 119, 0.22), transparent); box-shadow: inset 3px 0 #64c9b5; }
.caravan-battle-feed p.is-critical { color: #ffd981; text-shadow: 0 0 12px rgba(255, 200, 93, 0.2); }
.caravan-battle-feed p.is-heal { color: #a6ebbc; }
.caravan-battle-feed p span { color: rgba(236, 226, 205, 0.52); font: 700 0.6rem var(--font-mono, monospace); }
.caravan-battle-feed p b { color: #e0bd73; font-size: 0.56rem; letter-spacing: 0.1em; }
.caravan-battle-feed p em { overflow: hidden; font-size: 0.68rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.caravan-battle-summary { display: block; padding: 0.55rem; color: #ffe29c; text-align: center; font-size: 0.7rem; }

@keyframes caravan-sky-drift-v2 { from { transform: scale(1.025) translateX(-0.6%); } to { transform: scale(1.055) translateX(0.7%); } }
@keyframes caravan-wagon-roll-v2 { 0%, 100% { transform: translateX(-50%) translateY(0) rotate(-0.1deg); } 50% { transform: translateX(-50%) translateY(-3px) rotate(0.12deg); } }
@keyframes caravan-dust-v2 { 0% { transform: translateX(4rem) scale(0.5); opacity: 0; } 38% { opacity: 0.65; } 100% { transform: translateX(-10rem) scale(1.2); opacity: 0; } }
@keyframes caravan-stage-strike { from { opacity: 0; filter: blur(5px); } 30% { opacity: 1; filter: blur(0); } to { opacity: 0; transform: translateX(4rem) rotate(-19deg) scaleX(1.25); } }

@media (max-width: 720px) {
  .caravan-travel-stage { min-height: 15.5rem; }
  .caravan-stage-wagon-wrap { width: 25rem; left: 52%; }
  .caravan-stage-badges { top: 0.45rem; left: 0.45rem; right: 0.45rem; }
  .caravan-stage-badges > span { padding: 0.35rem 0.45rem; font-size: 0.52rem; }
  .caravan-battle-panel { grid-template-columns: 1fr; }
  .caravan-battle-emblem { min-width: 0; grid-template-columns: auto 1fr; gap: 0.45rem; text-align: left; }
  .caravan-battle-emblem i { grid-row: 1 / span 2; }
  .caravan-battle-emblem strong,
  .caravan-battle-emblem small { justify-self: start; margin: 0; }
  .caravan-combatant.is-defender { direction: ltr; text-align: left; }
  .caravan-combatant.is-defender .caravan-combatant-bar span { margin-left: 0; }
  .caravan-battle-feed p { grid-template-columns: 2rem 3.4rem minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .caravan-stage-sunwash,
  .caravan-stage-strike { animation: none !important; }
}

.reduce-motion .caravan-stage-sunwash,
.reduce-motion .caravan-stage-strike { animation: none !important; }

/* Caravan interaction and live-road clarity */
.caravan-inline-notice {
  position: sticky;
  z-index: 90;
  top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.65rem 0;
  padding: 0.72rem 0.85rem;
  border: 1px solid rgba(106, 205, 181, 0.48);
  background: linear-gradient(105deg, rgba(7, 38, 48, 0.98), rgba(7, 24, 39, 0.98));
  color: #dff7e9;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.42), inset 0 1px rgba(255, 255, 255, 0.05);
  font-size: 0.74rem;
  font-weight: 800;
}
.caravan-inline-notice.is-error { border-color: rgba(224, 105, 100, 0.68); color: #ffd6d0; background: linear-gradient(105deg, rgba(65, 22, 25, 0.98), rgba(25, 17, 29, 0.98)); }
.caravan-inline-notice.is-warning { border-color: rgba(235, 184, 83, 0.62); color: #ffe6a8; background: linear-gradient(105deg, rgba(60, 42, 15, 0.98), rgba(22, 23, 31, 0.98)); }
.caravan-inline-notice button { border: 0; background: transparent; color: currentColor; font-size: 1.25rem; line-height: 1; cursor: pointer; }

.caravan-stage-timer {
  position: absolute;
  z-index: 11;
  right: 0.85rem;
  bottom: 1.35rem;
  display: grid;
  justify-items: end;
  gap: 0.08rem;
  min-width: 7.4rem;
  padding: 0.45rem 0.62rem;
  border: 1px solid rgba(255, 222, 139, 0.62);
  background: linear-gradient(145deg, rgba(4, 24, 35, 0.94), rgba(9, 44, 53, 0.91));
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.38), inset 0 1px rgba(255, 244, 207, 0.08);
  pointer-events: none;
}
.caravan-stage-timer span { color: #9ee8d2; font-size: 0.54rem; font-weight: 900; letter-spacing: 0.12em; }
.caravan-stage-timer strong { color: #ffe09a; font: 900 1.05rem var(--font-mono, monospace); letter-spacing: 0.04em; }

.caravan-raid-modal-header {
  position: sticky;
  z-index: 30;
  top: -1rem;
  margin: -1rem -1rem 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(246, 204, 107, 0.35);
  background: linear-gradient(180deg, rgba(10, 38, 55, 0.99), rgba(7, 25, 41, 0.97));
  box-shadow: 0 9px 20px rgba(0, 0, 0, 0.25);
}
.caravan-raid-header-actions { display: flex; align-items: center; gap: 0.45rem; flex: 0 0 auto; }
.caravan-modal-notice { margin: 0.65rem 0; padding: 0.65rem 0.75rem; border: 1px solid rgba(225, 101, 98, 0.58); background: rgba(62, 20, 25, 0.82); color: #ffd3cd; font-size: 0.72rem; font-weight: 800; }

.caravan-raid-attempts b,
.caravan-raid-attempts small { display: block; margin-top: 0.14rem; }
.caravan-raid-attempts b { color: #8fe0c8; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.07em; }
.caravan-raid-attempts small { color: rgba(236, 224, 196, 0.65); font: 700 0.62rem var(--font-mono, monospace); }

.caravan-chest-loading {
  min-height: min(30rem, 70vh);
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.7rem;
  padding: 2rem;
  text-align: center;
}
.caravan-chest-loading strong { color: #ffe0a0; font: 900 clamp(1.2rem, 2.6vw, 2rem) var(--font-serif, Georgia, serif); }
.caravan-chest-loading p { margin: 0; color: rgba(224, 218, 199, 0.7); font-size: 0.75rem; }
.caravan-road-spinner { width: 2.7rem; height: 2.7rem; border: 3px solid rgba(114, 219, 191, 0.22); border-top-color: #eec76e; border-radius: 50%; animation: caravan-road-spin 780ms linear infinite; }
@keyframes caravan-road-spin { to { transform: rotate(360deg); } }

@media (max-width: 720px) {
  .caravan-raid-modal-header { top: -0.65rem; margin: -0.65rem -0.65rem 0.6rem; padding: 0.7rem; }
  .caravan-raid-header-actions { width: 100%; }
  .caravan-raid-header-actions > button { flex: 1; }
  .caravan-stage-timer { right: 0.5rem; bottom: 1.2rem; min-width: 6.8rem; }
}

/* Frontier automatic routes: Progress and Shop are the only command tabs. */
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (min-width: 1180px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress.frontier-progress-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: minmax(8.2rem, 1fr) 4.2rem !important;
    max-height: none !important;
    overflow-y: auto !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-progress-card {
    min-height: 0;
    overflow: hidden;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-region-mastery {
    gap: 0.2rem;
    margin-top: 0.25rem;
    padding: 0.28rem 0.34rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-region-mastery__label {
    font-size: 0.54rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-region-mastery__stats {
    gap: 0.2rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-region-mastery__stats > span {
    padding: 0.16rem 0.28rem;
    font-size: 0.58rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-progress-reward-row {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(5rem, 100%), 1fr));
    gap: 0.2rem !important;
    margin-top: 0.22rem;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-hud-chip {
    min-width: 0 !important;
    min-height: 2rem !important;
    padding: 0.24rem 0.34rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-hud-chip__icon {
    width: 1rem !important;
    height: 1rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-hud-chip__value {
    font-size: 0.7rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-hud-chip__label {
    font-size: 0.48rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-progress-card--route {
    grid-column: auto;
  }
}

/* Academy tab headers share one hierarchy while retaining each section's artwork and controls. */
.academy-section-header {
  padding: 22px 24px;
  border-color: rgba(180, 150, 91, 0.18) !important;
}

.academy-section-header--bestiary .academy-bestiary-study-panel {
  position: relative;
  overflow: hidden;
  border-color: rgba(218, 180, 105, 0.48) !important;
  background:
    radial-gradient(circle at 88% 0%, rgba(141, 102, 202, 0.22), transparent 42%),
    linear-gradient(145deg, rgba(18, 29, 48, 0.98), rgba(12, 9, 27, 0.98)) !important;
  box-shadow:
    0 14px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 239, 199, 0.08);
}

.academy-section-header--bestiary .academy-bestiary-study-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, #7866d8, #dcb76b 62%, transparent);
  content: "";
}

.academy-section-header--bestiary .academy-bestiary-study-entry {
  border-color: rgba(177, 148, 220, 0.44) !important;
  background: linear-gradient(110deg, rgba(43, 31, 76, 0.88), rgba(12, 23, 39, 0.96)) !important;
  box-shadow:
    inset 3px 0 0 rgba(220, 183, 107, 0.82),
    0 7px 18px rgba(0, 0, 0, 0.28);
}

.academy-section-header--bestiary .academy-bestiary-study-entry img {
  border: 1px solid rgba(224, 190, 124, 0.52);
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.34);
}

.zone-themed-main {
  scrollbar-gutter: stable;
}

.academy-section-header--atelier {
  align-items: flex-start;
}

.academy-section-header__copy {
  max-width: 760px;
}

.academy-section-header__eyebrow {
  color: rgba(221, 180, 97, 0.82);
  font: 900 10px/1.2 var(--font-ui, var(--font-body, sans-serif));
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.academy-section-header__title,
.academy-atelier-intro .academy-section-header__title {
  margin: 5px 0 0;
  color: var(--color-ivory-beige, #f1e6c8);
  font: 800 30px/1.1 var(--font-serif, Georgia, serif);
  font-style: normal;
  letter-spacing: -0.015em;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.64);
}

.academy-section-header__description,
.academy-atelier-intro .academy-section-header__description {
  max-width: 720px;
  margin: 10px 0 0;
  color: rgba(203, 197, 213, 0.76);
  font: 400 13px/1.6 var(--font-body, sans-serif);
  font-style: normal;
}

.academy-section-header--observatory {
  min-height: 230px;
  padding: 0;
}

.academy-section-header__observatory-content {
  min-height: 230px;
  padding: 22px 24px;
}

.academy-section-header__observatory-image {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
}

@media (max-width: 620px) {
  .academy-section-header,
  .academy-section-header__observatory-content {
    padding: 18px;
  }

  .academy-section-header__title,
  .academy-atelier-intro .academy-section-header__title {
    font-size: 26px;
  }

  .academy-section-header__observatory-image {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
  }
}

/* Keep real-player and test-bot portraits readable after the base Caravan rules. */
.caravan-page .caravan-target-card header {
  grid-template-columns: 4.25rem minmax(0, 1fr);
  align-items: center;
}

.caravan-page .caravan-target-card header > img {
  width: 4.25rem;
  height: 4.25rem;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 18%;
  border: 2px solid rgba(244, 203, 106, 0.68);
  box-shadow: 0 0 0 3px rgba(6, 24, 37, 0.76), 0 8px 20px rgba(0, 0, 0, 0.28);
}


/* Frontier command rail redesign: clean war-table hierarchy, no navy card stack. */
.frontier-region-expedition.frontier-page-shell--open {
  --frontier-war-coal: rgba(9, 8, 11, 0.985);
  --frontier-war-iron: rgba(22, 18, 21, 0.975);
  --frontier-war-iron-soft: rgba(31, 24, 29, 0.9);
  --frontier-war-line: rgba(196, 154, 75, 0.42);
  --frontier-war-line-soft: rgba(196, 154, 75, 0.2);
  --frontier-war-ivory: #f3e6c7;
  --frontier-war-muted: rgba(205, 194, 181, 0.7);
  --frontier-war-violet: rgba(103, 67, 132, 0.28);
  --frontier-war-crimson: #a93832;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  isolation: isolate;
  border: 1px solid var(--frontier-war-line) !important;
  border-radius: 3px !important;
  background:
    radial-gradient(circle at 88% 0%, var(--frontier-war-violet), transparent 34%),
    linear-gradient(145deg, var(--frontier-war-iron), var(--frontier-war-coal) 72%) !important;
  color: var(--frontier-war-ivory) !important;
  box-shadow:
    0 18px 46px rgba(0, 0, 0, 0.48),
    inset 0 1px rgba(255, 232, 177, 0.055) !important;
  backdrop-filter: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel::before,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel::before,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 0 auto;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(220, 178, 92, 0.86), rgba(118, 76, 142, 0.48), transparent);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel > *,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel > *,
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel > * {
  position: relative;
  z-index: 1;
}

/* Node Briefing: one encounter sheet with a strong identity row and clean stat rails. */
.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
  padding: 0 !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-header {
  margin: 0 !important;
  padding: 13px 15px 11px !important;
  border-bottom: 1px solid var(--frontier-war-line-soft);
  background: linear-gradient(90deg, rgba(53, 37, 38, 0.34), rgba(16, 13, 18, 0.18));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-briefing-eyebrow {
  color: #d9ad58 !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.18em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-title {
  margin-top: 0.22rem !important;
  color: var(--frontier-war-ivory) !important;
  font-family: var(--font-serif, Georgia, serif) !important;
  font-size: clamp(1.15rem, 1.12vw, 1.42rem) !important;
  font-style: normal !important;
  font-weight: 800 !important;
  line-height: 1.03 !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.72) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-subtitle {
  color: var(--frontier-war-muted) !important;
  font-size: 0.67rem !important;
  font-weight: 700 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-number-chip {
  border: 1px solid rgba(211, 170, 84, 0.45) !important;
  border-radius: 2px !important;
  background: rgba(12, 10, 13, 0.72) !important;
  color: #ecc66f !important;
  box-shadow: inset 0 -2px rgba(211, 170, 84, 0.12) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
  margin: 0 !important;
  padding: 13px 15px !important;
  gap: 0.7rem !important;
  background: rgba(5, 4, 7, 0.2);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
  width: 64px !important;
  height: 64px !important;
  border: 1px solid rgba(218, 177, 91, 0.48) !important;
  border-radius: 2px !important;
  outline: 3px solid rgba(6, 5, 8, 0.8);
  box-shadow: 0 0 0 4px rgba(122, 79, 139, 0.18), 0 10px 24px rgba(0, 0, 0, 0.5) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats,
.frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
  gap: 0.34rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip,
.frontier-region-expedition.frontier-page-shell--open .frontier-node-reward .frontier-hud-chip {
  min-height: 2.1rem !important;
  padding: 0.32rem 0.42rem !important;
  border: 0 !important;
  border-left: 2px solid rgba(193, 151, 73, 0.54) !important;
  border-radius: 0 !important;
  background: rgba(4, 3, 6, 0.5) !important;
  box-shadow: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip:nth-child(1) {
  border-left-color: rgba(175, 61, 59, 0.78) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-stats .frontier-hud-chip:nth-child(3) {
  border-left-color: rgba(137, 116, 151, 0.76) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-node-actions {
  margin: 0 !important;
  padding: 0 15px 14px !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-fight-button {
  min-height: 2.55rem !important;
  height: 2.55rem !important;
  border: 1px solid rgba(231, 123, 101, 0.72) !important;
  border-radius: 2px !important;
  background: linear-gradient(180deg, #ad312e, #721714) !important;
  color: #fff0d2 !important;
  box-shadow: inset 0 1px rgba(255, 223, 183, 0.15), 0 8px 18px rgba(65, 7, 10, 0.28) !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.08em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-fight-button:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: none !important;
}

/* Command rail: clean tab bar and broad content sections. */
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
  padding: 0 !important;
  gap: 0 !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 6px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--frontier-war-line-soft) !important;
  border-radius: 0 !important;
  background: rgba(5, 4, 7, 0.58) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs .frontier-command-tab {
  min-height: 2.45rem !important;
  border: 1px solid transparent !important;
  border-radius: 2px !important;
  background: transparent !important;
  color: rgba(211, 199, 181, 0.62) !important;
  font-size: 0.72rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.12em !important;
  box-shadow: none !important;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs .frontier-command-tab:hover {
  border-color: rgba(196, 154, 75, 0.22) !important;
  color: #e7cf9a !important;
  transform: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tabs .frontier-command-tab--active {
  border-color: rgba(218, 175, 88, 0.56) !important;
  background: linear-gradient(180deg, rgba(88, 64, 31, 0.58), rgba(35, 27, 25, 0.72)) !important;
  color: #fff0c3 !important;
  box-shadow: inset 0 -2px rgba(226, 180, 83, 0.62) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop {
  min-height: 0 !important;
  margin: 0 !important;
  padding: 11px 12px 14px !important;
  gap: 9px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-color: rgba(196, 154, 75, 0.35) rgba(5, 4, 7, 0.45);
  scrollbar-width: thin;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body::-webkit-scrollbar {
  width: 5px;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body::-webkit-scrollbar-thumb {
  background: rgba(196, 154, 75, 0.34);
}

/* Progress: three restrained ledger sections instead of tooltip-heavy nested cards. */
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress.frontier-progress-stack {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  grid-auto-rows: auto !important;
  align-content: start !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card,
.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card--wide {
  grid-column: auto !important;
  min-height: 0 !important;
  padding: 0.8rem 0.85rem !important;
  border: 1px solid var(--frontier-war-line-soft) !important;
  border-left: 3px solid rgba(204, 159, 74, 0.7) !important;
  border-radius: 2px !important;
  background: linear-gradient(100deg, rgba(41, 31, 27, 0.48), rgba(12, 10, 14, 0.3)) !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card--route {
  border-left-color: rgba(119, 78, 145, 0.78) !important;
  background: linear-gradient(100deg, rgba(50, 31, 61, 0.38), rgba(12, 10, 14, 0.28)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 0.75rem !important;
  border-left-color: rgba(141, 111, 82, 0.78) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__label,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-title {
  color: #edc66f !important;
  font-size: 0.66rem !important;
  letter-spacing: 0.13em !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-card__note {
  margin-top: 0.32rem !important;
  color: var(--frontier-war-muted) !important;
  font-size: 0.69rem !important;
  font-weight: 650 !important;
  line-height: 1.35 !important;
  white-space: normal !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-mastery {
  margin-top: 0.55rem !important;
  padding: 0.48rem 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(196, 154, 75, 0.13) !important;
  border-bottom: 1px solid rgba(196, 154, 75, 0.13) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-mastery__stats > span {
  border: 0 !important;
  border-bottom: 1px solid rgba(196, 154, 75, 0.28) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-mastery--prominent {
  gap: 0.45rem !important;
  margin-top: 0.5rem !important;
  padding: 0.62rem 0.68rem !important;
  border: 1px solid rgba(101, 214, 176, 0.42) !important;
  border-radius: 0.42rem !important;
  background: linear-gradient(135deg, rgba(18, 91, 71, 0.3), rgba(5, 27, 28, 0.68)) !important;
  box-shadow: inset 0 1px 0 rgba(207, 255, 235, 0.06), 0 0 18px rgba(74, 202, 158, 0.08);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-mastery--prominent .frontier-region-mastery__label {
  color: #bff6df !important;
  font-size: 0.66rem !important;
  line-height: 1.2 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-mastery--prominent .frontier-region-mastery__stats > span {
  padding: 0.3rem 0.48rem !important;
  border: 1px solid rgba(123, 235, 194, 0.38) !important;
  border-radius: 0.28rem !important;
  background: rgba(3, 25, 24, 0.72) !important;
  color: #d3ffed !important;
  font-size: 0.72rem !important;
  line-height: 1.15 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-region-mastery__note {
  color: rgba(220, 235, 230, 0.76);
  font-size: 0.64rem;
  font-weight: 650;
  line-height: 1.35;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-progress-reward-row {
  margin-top: 0.52rem !important;
}

/* Shop: readable quartermaster rows with visible descriptions and restrained cost/gain blocks. */
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-auto-rows: auto !important;
  align-content: start !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer {
  position: relative !important;
  min-height: 0 !important;
  padding: 0.78rem 0.8rem !important;
  border: 1px solid var(--frontier-war-line-soft) !important;
  border-radius: 2px !important;
  background: linear-gradient(100deg, rgba(39, 30, 28, 0.58), rgba(11, 9, 13, 0.34)) !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, #d3a54f, rgba(116, 71, 139, 0.72));
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer:hover {
  border-color: rgba(211, 165, 79, 0.42) !important;
  background: linear-gradient(100deg, rgba(46, 34, 29, 0.66), rgba(16, 11, 18, 0.42)) !important;
  transform: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__row {
  display: grid !important;
  grid-template-columns: 2.8rem minmax(0, 1fr) 5.2rem !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  gap: 0.68rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 2.8rem !important;
  height: 2.8rem !important;
  padding: 0.3rem !important;
  border: 1px solid rgba(200, 158, 77, 0.34) !important;
  border-radius: 2px !important;
  background: rgba(4, 3, 6, 0.72) !important;
  box-shadow: inset 0 0 16px rgba(110, 72, 133, 0.12) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__copy {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  gap: 0.25rem !important;
  min-width: 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__title {
  grid-column: 1 !important;
  grid-row: 1 !important;
  overflow: visible !important;
  color: var(--frontier-war-ivory) !important;
  font-size: 0.94rem !important;
  line-height: 1.1 !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__desc {
  grid-column: 1 !important;
  grid-row: 2 !important;
  display: -webkit-box !important;
  overflow: hidden !important;
  color: var(--frontier-war-muted) !important;
  font-size: 0.64rem !important;
  font-weight: 600 !important;
  line-height: 1.28 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__meta,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__copy > .frontier-hud-chip-row {
  grid-column: 1 !important;
  grid-row: 3 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 0.8rem minmax(0, 1fr) !important;
  gap: 0.3rem !important;
  width: 100% !important;
  margin: 0.12rem 0 0 !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-hud-chip {
  min-height: 1.85rem !important;
  padding: 0.25rem 0.34rem !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(196, 154, 75, 0.24) !important;
  border-radius: 0 !important;
  background: rgba(3, 3, 5, 0.38) !important;
  box-shadow: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-hud-chip-arrow {
  display: grid !important;
  place-items: center !important;
  width: 0.8rem !important;
  overflow: hidden;
  color: #c79848 !important;
  font-size: 0.58rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-action {
  grid-column: 3 !important;
  grid-row: 1 !important;
  align-self: center !important;
  width: 100% !important;
  min-height: 2.35rem !important;
  padding: 0.42rem 0.5rem !important;
  border-radius: 2px !important;
}

/* Shared resource blocks and actions: brass, charcoal, no blue. */
.frontier-region-expedition.frontier-page-shell--open .frontier-hud-chip {
  border-color: rgba(196, 154, 75, 0.25) !important;
  background: rgba(5, 4, 7, 0.54) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:not(:disabled),
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action:not(:disabled) {
  border-color: rgba(232, 195, 113, 0.72) !important;
  border-radius: 2px !important;
  background: linear-gradient(180deg, #e0bc69, #ae7a31) !important;
  color: #16100a !important;
  box-shadow: inset 0 1px rgba(255, 246, 210, 0.24), 0 7px 14px rgba(0, 0, 0, 0.22) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-action:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade:disabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action:disabled {
  border-color: rgba(159, 135, 109, 0.24) !important;
  border-radius: 2px !important;
  background: linear-gradient(180deg, rgba(38, 32, 33, 0.92), rgba(17, 14, 17, 0.96)) !important;
  color: rgba(210, 198, 181, 0.5) !important;
}

/* Active Seals button strip: an engraved footer, not a blue widget bar. */
.frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
  background:
    radial-gradient(circle at 50% 110%, rgba(92, 55, 119, 0.28), transparent 46%),
    linear-gradient(180deg, rgba(24, 19, 21, 0.98), rgba(8, 7, 10, 0.985)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket {
  border: 1px solid rgba(193, 150, 73, 0.38) !important;
  border-radius: 3px !important;
  background:
    linear-gradient(145deg, rgba(34, 27, 29, 0.96), rgba(8, 7, 10, 0.98)) !important;
  box-shadow: inset 0 0 0 3px rgba(5, 4, 7, 0.68), 0 8px 18px rgba(0, 0, 0, 0.34) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket--selected {
  border-color: rgba(236, 198, 112, 0.9) !important;
  background:
    radial-gradient(circle at 50% 45%, rgba(112, 70, 140, 0.3), transparent 68%),
    linear-gradient(145deg, rgba(45, 33, 37, 0.98), rgba(10, 8, 12, 0.98)) !important;
  box-shadow: inset 0 0 0 3px rgba(5, 4, 7, 0.6), 0 0 18px rgba(168, 118, 66, 0.28) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-rank-action {
  border: 1px solid rgba(196, 154, 75, 0.38) !important;
  border-radius: 2px !important;
  background: linear-gradient(180deg, rgba(50, 38, 34, 0.96), rgba(20, 16, 19, 0.98)) !important;
  color: #e8cf98 !important;
}

/* Progress and Shop deliberately have no mouseover help surfaces. */
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]::before,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-panel [data-help]::after {
  content: none !important;
  display: none !important;
}

/* Let the desktop command rail reach the bottom of the Frontier shell. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    bottom: 0 !important;
    max-height: calc(100% - var(--frontier-briefing-height) - 10px) !important;
  }

  body:has(.frontier-region-expedition.frontier-page-shell--open) .vespera-menu-tutorial-launcher {
    right: 14px;
    bottom: 8px;
    min-height: 44px;
    border-color: rgba(196, 154, 75, 0.4);
    background:
      radial-gradient(circle at 0% 50%, rgba(102, 62, 126, 0.2), transparent 48%),
      linear-gradient(145deg, rgba(24, 19, 22, 0.98), rgba(8, 7, 10, 0.99));
  }
}

@media (max-width: 1180px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail__support {
    padding-bottom: 4.5rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    overflow: visible !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress {
    max-height: none !important;
    overflow: visible !important;
  }
}

@media (max-width: 620px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__row {
    grid-template-columns: 2.45rem minmax(0, 1fr) 4.4rem !important;
    gap: 0.48rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__icon {
    width: 2.4rem !important;
    height: 2.4rem !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer__desc {
    -webkit-line-clamp: 1;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-card {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-bastion-upgrade {
    width: 100% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-tab,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-offer {
    transition: none !important;
  }
}


/* Frontier command rail live-fit correction: intrinsic rows scroll instead of overlapping. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    --frontier-briefing-height: clamp(250px, 32vh, 288px) !important;
  }
}

/* Frontier viewport-fit guard: keep the fixed HUD inside the visible game area. */
@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open {
    height: calc(100dvh - 9.75rem) !important;
    max-height: calc(100dvh - 9.75rem) !important;
    overflow: hidden !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail,
  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage,
  .frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock {
    min-height: 0 !important;
    max-height: 100% !important;
  }
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress.frontier-progress-stack {
  grid-template-rows: none !important;
  grid-auto-rows: max-content !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-progress-card,
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--progress .frontier-progress-card--wide {
  height: max-content !important;
  min-height: max-content !important;
}


/* Frontier Shop live-fit correction: each offer keeps its full cost and reward ledger. */
.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop {
  grid-auto-rows: max-content !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-command-tab-body--shop .frontier-command-offer {
  height: max-content !important;
  min-height: max-content !important;
}


/* Frontier responsive stack: map first, control rail second, with no shared grid row. */
@media (max-width: 1180px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail {
    position: relative !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    gap: 8px !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    min-height: clamp(500px, 64vh, 680px) !important;
    transform: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-stage-rail__support {
    position: relative !important;
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 8px 8px 4.5rem !important;
    overflow: visible !important;
    border: 1px solid var(--frontier-war-line-soft) !important;
    border-radius: 3px !important;
    background: rgba(7, 6, 9, 0.8) !important;
    box-shadow: none !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-bottom-dock {
    position: relative !important;
    inset: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto !important;
    gap: 8px !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    pointer-events: auto !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel,
  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    position: relative !important;
    inset: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-briefing-panel {
    order: 1 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-command-panel {
    order: 2 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-socket-panel {
    order: 3 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-map-bottombar {
    inset: auto 12px 12px !important;
  }
}

@media (max-width: 620px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-map-stage {
    min-height: 430px !important;
  }
}


/* Frontier responsive briefing: keep portrait and stat columns in their intended grid cells. */
@media (max-width: 1180px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    align-items: center !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-art {
    display: block !important;
    width: 64px !important;
    height: 64px !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-body .space-y-3 {
    grid-column: 2 !important;
    width: auto !important;
    min-width: 0 !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats,
  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    display: grid !important;
    width: 100% !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-node-reward {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}






/* Weekly Events hub */
.weekly-events-page { display: grid; grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - 4.5rem); min-height: 36rem; overflow: hidden; padding: 0.75rem; color: #e8eadf; background: radial-gradient(circle at 50% 0%, rgba(48, 127, 132, 0.2), transparent 36%), linear-gradient(155deg, rgba(5, 24, 38, 0.96), rgba(8, 19, 38, 0.98)); }
.weekly-events-header { display: flex; justify-content: space-between; gap: 1.25rem; align-items: center; min-height: 8rem; padding: 1rem 1.25rem; border: 1px solid rgba(242, 201, 103, 0.45); background: linear-gradient(90deg, rgba(5, 26, 42, 0.86), rgba(8, 45, 55, 0.7)), url("./caravan/crownroad-backdrop-v2.webp") center 60% / cover; box-shadow: inset 0 1px rgba(255, 240, 192, 0.1), 0 14px 34px rgba(0, 0, 0, 0.24); }
.weekly-events-header > div:first-child { max-width: 46rem; }
.weekly-events-header span { color: #e8b95d; font-size: 0.59rem; font-weight: 900; letter-spacing: 0.16em; }
.weekly-events-header h1 { margin: 0.25rem 0 0.2rem; color: #fff0c9; font: 700 clamp(2rem, 4vw, 3.2rem)/0.95 var(--font-serif, Georgia, serif); }
.weekly-events-header p { margin: 0; color: rgba(226, 233, 222, 0.82); font-size: 0.8rem; }
.weekly-events-next { display: grid; min-width: 12rem; gap: 0.16rem; padding: 0.75rem 0.9rem; border: 1px solid rgba(242, 201, 103, 0.42); background: rgba(5, 25, 38, 0.86); text-align: right; backdrop-filter: blur(7px); }
.weekly-events-next strong { color: #ffda7c; font: 800 1.7rem/1 var(--font-serif, Georgia, serif); }
.weekly-events-next small { color: rgba(212, 225, 218, 0.7); text-transform: capitalize; }
.weekly-event-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); min-height: 0; gap: 0.7rem; margin-top: 0.7rem; }
.weekly-event-grid--single { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.weekly-event-grid--empty { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.weekly-events-empty { display: grid; place-content: center; justify-items: center; gap: 0.55rem; min-height: 16rem; padding: 2rem; border: 1px solid rgba(119, 191, 180, 0.24); background: radial-gradient(circle at 50% 0%, rgba(67, 139, 145, 0.12), transparent 52%), rgba(4, 19, 32, 0.76); text-align: center; }
.weekly-events-empty span { color: #e8b95d; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.18em; }
.weekly-events-empty strong { color: #fff0c9; font: 700 clamp(1.45rem, 3vw, 2.35rem)/1 var(--font-serif, Georgia, serif); }
.weekly-events-empty p { max-width: 34rem; margin: 0; color: rgba(216, 229, 222, 0.72); font-size: 0.76rem; line-height: 1.5; }
.weekly-event-card { position: relative; min-height: 0; overflow: hidden; border: 1px solid rgba(119, 191, 180, 0.34); background: #081d2d; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24); transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
.weekly-event-card:hover:not(.is-disabled) { transform: translateY(-3px); border-color: rgba(245, 203, 103, 0.68); box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32), 0 0 24px rgba(72, 170, 161, 0.09); }
.weekly-event-card.is-active { border-color: rgba(255, 206, 93, 0.88); box-shadow: 0 0 0 1px rgba(255, 218, 126, 0.15), 0 14px 36px rgba(0, 0, 0, 0.3), 0 0 28px rgba(255, 185, 54, 0.14); }
.weekly-event-card.is-disabled { filter: saturate(0.55); opacity: 0.72; }
.weekly-event-card__art { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 20, 31, 0.02), rgba(4, 20, 31, 0.2) 38%, rgba(5, 22, 35, 0.96) 74%), var(--weekly-event-art) center / cover; transition: transform 400ms ease; }
.weekly-event-card:hover .weekly-event-card__art { transform: scale(1.025); }
.weekly-event-card__beta { position: absolute; z-index: 2; top: 0.85rem; right: 1rem; left: 1rem; padding: 0.72rem 0.85rem; border: 2px solid rgba(255, 202, 91, 0.92); border-left: 0.34rem solid #ef775f; color: #fff1be; font-size: clamp(0.78rem, 1.05vw, 1rem); font-weight: 950; line-height: 1.25; letter-spacing: 0.035em; text-align: center; text-transform: uppercase; background: linear-gradient(90deg, rgba(105, 31, 25, 0.94), rgba(81, 54, 18, 0.94)); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), 0 0 20px rgba(239, 119, 95, 0.14); }
.weekly-event-card__body { position: absolute; z-index: 1; inset: auto 0 0; padding: 0.85rem 1rem; }
.weekly-event-card__status { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; }
.weekly-event-card__status span { font-size: clamp(0.69rem, 0.82vw, 0.8rem); font-weight: 850; line-height: 1.3; }
.weekly-event-card__status b { padding: 0.3rem 0.45rem; border: 1px solid rgba(121, 204, 183, 0.35); background: rgba(5, 30, 40, 0.78); color: #bfe9dc; font-size: 0.56rem; letter-spacing: 0.08em; }
.weekly-event-card.is-active .weekly-event-card__status b { border-color: rgba(255, 213, 105, 0.55); color: #ffe19b; }
.weekly-event-card h2 { margin: 0.35rem 0 0.2rem; color: #fff0c7; font: 700 clamp(1.35rem, 2.4vw, 2rem)/1 var(--font-serif, Georgia, serif); }
.weekly-event-card p { max-width: 39rem; min-height: 2.6rem; margin: 0; color: rgba(226, 237, 231, 0.86); font-size: clamp(0.76rem, 0.9vw, 0.88rem); line-height: 1.45; }
.weekly-event-card footer { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }
.weekly-event-card footer small { color: rgba(219, 230, 224, 0.76); font-size: clamp(0.7rem, 0.8vw, 0.8rem); line-height: 1.35; }
.weekly-event-card button,
.weekly-event-back { padding: 0.7rem 0.9rem; border: 1px solid rgba(241, 202, 108, 0.55); background: linear-gradient(180deg, rgba(42, 84, 81, 0.96), rgba(13, 47, 55, 0.97)); color: #fff0c5; font-size: 0.66rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.weekly-event-card button:hover:not(:disabled),
.weekly-event-back:hover { border-color: rgba(255, 220, 133, 0.9); background: linear-gradient(180deg, rgba(55, 111, 99, 0.97), rgba(17, 61, 67, 0.98)); }
.weekly-event-card button:disabled { cursor: not-allowed; opacity: 0.5; }
.weekly-event-detail { min-height: 100%; background: #061728; }
.weekly-event-back { position: sticky; z-index: 30; top: 0.5rem; margin: 0.7rem 0 0 0.7rem; }

@media (min-width: 821px) and (max-width: 1500px) {
  .weekly-events-page { overflow-y: auto; }
  .weekly-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .weekly-event-card { min-height: 17rem; }
}

@media (max-width: 1180px) {
  .weekly-events-page { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  .weekly-event-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .weekly-event-card { min-height: 17rem; }
}

@media (max-width: 820px) {
  .weekly-events-page { height: auto; min-height: 100%; overflow: visible; }
  .weekly-events-header { align-items: stretch; flex-direction: column; }
  .weekly-events-next { text-align: left; }
  .weekly-event-grid { grid-template-columns: 1fr; grid-template-rows: none; }
  .weekly-event-card { min-height: 17rem; }
}

@media (max-width: 560px) {
  .weekly-events-page { padding: 0.6rem; }
  .weekly-events-header { min-height: 10rem; padding: 1rem; }
  .weekly-event-card { min-height: 16rem; }
  .weekly-event-card footer { align-items: stretch; flex-direction: column; }
}

/* Codex ability taxonomy and critical-strike rules */
.codex-ability-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.48rem;
  border: 1px solid;
  border-radius: 999px;
  font-family: var(--font-ui, sans-serif);
  font-size: 0.625rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}
.codex-tag--damage { border-color: rgba(168, 135, 79, 0.6); background: rgba(168, 135, 79, 0.12); color: #eadba5; }
.codex-tag--dot { border-color: rgba(155, 100, 95, 0.6); background: rgba(155, 100, 95, 0.12); color: #e0aaa2; }
.codex-tag--poison { border-color: rgba(120, 150, 109, 0.6); background: rgba(120, 150, 109, 0.12); color: #bcd8ad; }
.codex-tag--crit { border-color: rgba(147, 118, 173, 0.6); background: rgba(147, 118, 173, 0.12); color: #d8c0ea; }
.codex-tag--guaranteed-crit { border-color: rgba(212, 173, 85, 0.72); background: rgba(212, 173, 85, 0.16); color: #ffe49a; box-shadow: 0 0 10px rgba(212, 173, 85, 0.12); }
.codex-tag--heal { border-color: rgba(97, 158, 142, 0.6); background: rgba(97, 158, 142, 0.12); color: #aee1d3; }
.codex-tag--shield { border-color: rgba(102, 137, 163, 0.6); background: rgba(102, 137, 163, 0.12); color: #b9d6ea; }
.codex-tag--buff { border-color: rgba(126, 118, 134, 0.6); background: rgba(126, 118, 134, 0.12); color: #d0c8d7; }
.codex-crit-rules {
  border: 1px solid rgba(168, 135, 79, 0.55);
  background: linear-gradient(135deg, rgba(168, 135, 79, 0.12), rgba(11, 14, 25, 0.82));
  box-shadow: inset 0 1px rgba(255, 232, 176, 0.06);
}
.codex-crit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  color: #bdb5c5;
  font-size: 0.875rem;
}
.codex-crit-rule {
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  line-height: 1.55;
}
@media (max-width: 760px) {
  .codex-crit-grid { grid-template-columns: 1fr; }
}


/* World Boss Chest reward reveal */
.world-boss-chest-reveal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(1, 5, 12, 0.88);
  backdrop-filter: blur(8px);
  animation: world-boss-chest-backdrop-in 180ms ease-out both;
}

.world-boss-chest-reveal {
  --chest-gold: #e6bd64;
  --chest-gold-bright: #ffe3a0;
  --chest-ink: #050c17;
  position: relative;
  width: min(42rem, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.5rem;
  border: 1px solid rgba(230, 189, 100, 0.68);
  border-radius: 0.65rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(116, 77, 178, 0.2), transparent 38%),
    linear-gradient(160deg, rgba(13, 30, 45, 0.98), rgba(5, 12, 23, 0.99) 62%, rgba(12, 18, 29, 0.99));
  box-shadow:
    0 2rem 5rem rgba(0, 0, 0, 0.72),
    0 0 0 1px rgba(255, 229, 166, 0.08) inset,
    0 0 2.5rem rgba(116, 77, 178, 0.14);
  color: #f4e8cf;
  animation: world-boss-chest-panel-in 220ms cubic-bezier(0.2, 0.78, 0.28, 1) both;
}

.world-boss-chest-reveal::before {
  content: "";
  position: absolute;
  inset: 0.35rem;
  pointer-events: none;
  border: 1px solid rgba(230, 189, 100, 0.12);
  border-radius: 0.4rem;
}

.world-boss-chest-reveal__close {
  position: absolute;
  z-index: 2;
  top: 0.75rem;
  right: 0.75rem;
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(230, 189, 100, 0.32);
  border-radius: 0.3rem;
  background: rgba(3, 9, 17, 0.78);
  color: rgba(244, 232, 207, 0.78);
  font: 700 1.2rem/1 var(--font-ui, sans-serif);
}

.world-boss-chest-reveal__close:hover,
.world-boss-chest-reveal__close:focus-visible {
  border-color: var(--chest-gold);
  color: #fff4d7;
  outline: none;
}

.world-boss-chest-reveal__header {
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
}

.world-boss-chest-reveal__chest {
  width: 7.25rem;
  height: 7.25rem;
  object-fit: contain;
  filter: drop-shadow(0 0.9rem 1.1rem rgba(0, 0, 0, 0.52));
}

.world-boss-chest-reveal__eyebrow {
  margin-top: 0.25rem;
  color: var(--chest-gold);
  font: 900 0.66rem/1 var(--font-ui, sans-serif);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.world-boss-chest-reveal h2 {
  margin: 0.55rem 2rem 0;
  color: var(--chest-gold-bright);
  font: 700 clamp(1.5rem, 4vw, 2.15rem)/1.1 var(--font-serif, Georgia, serif);
  letter-spacing: 0.015em;
}

.world-boss-chest-reveal__header p {
  margin: 0.55rem 0 0;
  color: rgba(225, 218, 204, 0.72);
  font: 600 0.78rem/1.45 var(--font-body, sans-serif);
}

.world-boss-chest-reveal__rewards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.world-boss-chest-reveal__reward {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  min-height: 4.2rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(144, 166, 188, 0.2);
  border-radius: 0.42rem;
  background: linear-gradient(110deg, rgba(15, 31, 47, 0.9), rgba(5, 13, 24, 0.78));
  box-shadow: 0 1px rgba(255, 255, 255, 0.025) inset;
}

.world-boss-chest-reveal__reward[data-rarity="rare"] {
  border-color: rgba(96, 165, 250, 0.42);
}

.world-boss-chest-reveal__reward[data-rarity="epic"] {
  border-color: rgba(192, 132, 252, 0.48);
}

.world-boss-chest-reveal__reward[data-rarity="legendary"] {
  border-color: rgba(251, 191, 36, 0.52);
  background: linear-gradient(110deg, rgba(67, 44, 15, 0.48), rgba(8, 14, 24, 0.86));
}

.world-boss-chest-reveal__reward-icon {
  width: 3.25rem;
  height: 3.25rem;
  object-fit: contain;
  border: 1px solid rgba(230, 189, 100, 0.24);
  border-radius: 0.34rem;
  background: rgba(1, 6, 13, 0.74);
}

.world-boss-chest-reveal__reward-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #eadfc7;
  font: 750 0.8rem/1.25 var(--font-ui, sans-serif);
}

.world-boss-chest-reveal__reward-amount {
  color: var(--chest-gold-bright);
  font: 900 0.84rem/1 var(--font-mono, monospace);
  white-space: nowrap;
}

.world-boss-chest-reveal__continue {
  display: block;
  min-width: 10rem;
  margin: 1.15rem auto 0;
  padding: 0.72rem 1.4rem;
  border: 1px solid rgba(230, 189, 100, 0.72);
  border-radius: 0.32rem;
  background: linear-gradient(180deg, rgba(91, 66, 31, 0.96), rgba(43, 30, 16, 0.98));
  color: #fff0c7;
  font: 900 0.7rem/1 var(--font-ui, sans-serif);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 0.65rem 1.4rem rgba(0, 0, 0, 0.3);
}

.world-boss-chest-reveal__continue:hover,
.world-boss-chest-reveal__continue:focus-visible {
  border-color: var(--chest-gold-bright);
  filter: brightness(1.12);
  outline: none;
}

@keyframes world-boss-chest-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes world-boss-chest-panel-in {
  from { opacity: 0; transform: translateY(0.7rem) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 560px) {
  .world-boss-chest-reveal-backdrop { padding: 0.65rem; }
  .world-boss-chest-reveal { max-height: calc(100vh - 1.3rem); padding: 1.1rem; }
  .world-boss-chest-reveal__chest { width: 5.8rem; height: 5.8rem; }
  .world-boss-chest-reveal__rewards { grid-template-columns: 1fr; }
  .world-boss-chest-reveal__reward { min-height: 3.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .world-boss-chest-reveal-backdrop,
  .world-boss-chest-reveal { animation: none; }
}

/* Inventory and Event Calendar should size to the space below the persistent HUD,
   not create a second viewport-height page inside the scrolling main region. */
@media (min-width: 821px) {
  main[data-tutorial-page="inventory"],
  main[data-tutorial-page="weekly_events"] {
    padding: 0.5rem !important;
    overflow-y: hidden !important;
    overscroll-behavior: none;
  }

  main[data-tutorial-page="inventory"] > [data-tutorial-id="tutorial-inventory-panel"] {
    box-sizing: border-box;
    width: 100%;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
  }

  main[data-tutorial-page="inventory"] .inventory-desktop-grid {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    flex: 1 1 auto;
    overflow: hidden !important;
  }

  main[data-tutorial-page="weekly_events"] > div,
  main[data-tutorial-page="weekly_events"] > div > div {
    height: 100%;
    min-height: 0 !important;
  }

  main[data-tutorial-page="weekly_events"] .weekly-events-page {
    box-sizing: border-box;
    width: 100%;
    height: 100% !important;
    min-height: 0 !important;
  }

  main[data-tutorial-page="weekly_events"] .weekly-event-detail:has(> .caravan-page) {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
}

@media (min-width: 821px) and (max-height: 900px) {
  .weekly-events-page {
    padding: 0.5rem;
  }

  .weekly-events-header {
    min-height: 6.25rem;
    padding: 0.7rem 1rem;
  }

  .weekly-events-header h1 {
    margin: 0.18rem 0 0.12rem;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
  }

  .weekly-events-header p {
    font-size: 0.72rem;
  }

  .weekly-events-next {
    min-width: 10.5rem;
    padding: 0.58rem 0.72rem;
  }

  .weekly-events-next strong {
    font-size: 1.4rem;
  }

  .weekly-event-grid {
    gap: 0.5rem;
    margin-top: 0.5rem;
  }

  .weekly-event-card__body {
    padding: 0.62rem 0.78rem;
  }

  .weekly-event-card h2 {
    margin: 0.25rem 0 0.12rem;
    font-size: clamp(1.18rem, 2vw, 1.65rem);
  }

  .weekly-event-card p {
    min-height: 2rem;
    font-size: clamp(0.72rem, 0.82vw, 0.8rem);
    line-height: 1.36;
  }

  .weekly-event-card footer {
    margin-top: 0.34rem;
  }

  .weekly-event-card button,
  .weekly-event-back {
    padding: 0.55rem 0.72rem;
  }

  main[data-tutorial-page="inventory"] .inventory-stat-panel,
  main[data-tutorial-page="inventory"] .inventory-bonus-panel {
    padding: 6px !important;
  }

  main[data-tutorial-page="inventory"] .inventory-stat-panel__primary > div:last-child > div {
    min-height: 25px;
    padding-top: 3px !important;
    padding-bottom: 3px !important;
  }

  main[data-tutorial-page="inventory"] .inventory-stat-panel__secondary button {
    padding-top: 3px !important;
    padding-bottom: 3px !important;
  }

  main[data-tutorial-page="inventory"] .inventory-bonus-panel__list > div {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }
}

/* Target-owned combat effects: player rail left, enemy rail right. */
.combat-screen-effect-pair {
  position: relative;
  z-index: 45;
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  align-self: end;
  display: grid;
  grid-template-columns:
    minmax(
      0,
      min(
        var(--combat-effect-player-width, 42rem),
        calc((100% - 1rem) / 2)
      )
    )
    minmax(
      0,
      min(
        var(--combat-effect-enemy-width, 42rem),
        calc((100% - 1rem) / 2)
      )
    );
  justify-content: space-between;
  gap: clamp(1rem, 6vw, 6rem);
  width: 100%;
  padding: 0 0 0.35rem;
  overflow: visible;
  pointer-events: none;
}

.combat-screen-effect-pair > * {
  pointer-events: auto;
}

.combat-screen-fight-grid > .combat-screen-effect-pair {
  min-width: 0;
}

@media (min-width: 1400px) {
  .combat-screen-fight-grid > .combat-screen-effect-pair {
    grid-template-columns:
      minmax(0, var(--combat-effect-player-width, 42rem))
      minmax(0, var(--combat-effect-enemy-width, 42rem));
    gap: 0;
  }
}

.dungeon-combat-active-card > .combat-screen-effect-pair {
  margin: 0;
  padding-right: 0.75rem;
  padding-left: 0.75rem;
}

.combat-screen-effect-rail {
  position: relative;
  z-index: 46;
  display: flex;
  min-width: 0;
  min-height: 2.35rem;
  width: 100%;
  align-items: center;
  gap: 0.55rem;
  padding: 0.22rem 0.5rem;
  overflow: visible;
  border: 1px solid rgba(217, 184, 129, 0.28);
  border-radius: 0.3rem;
  background: linear-gradient(90deg, rgba(3, 8, 15, 0.96), rgba(8, 17, 29, 0.82));
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 210, 0.055),
    0 8px 20px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(3px);
}

.combat-screen-effect-rail--player {
  justify-self: start;
  border-left-color: rgba(104, 198, 174, 0.56);
}

.combat-screen-effect-rail--enemy {
  justify-self: end;
  flex-direction: row-reverse;
  border-right-color: rgba(216, 91, 91, 0.58);
  background: linear-gradient(270deg, rgba(3, 8, 15, 0.96), rgba(28, 10, 15, 0.82));
}

.combat-screen-effect-rail__label {
  flex: 0 0 auto;
  color: rgba(238, 217, 179, 0.78);
  font: 900 0.54rem/1 var(--font-ui);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.combat-screen-effect-rail .combat-screen-status-row {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 1.9rem !important;
  max-height: none !important;
  margin: 0 !important;
  align-items: center;
}

.combat-screen-effect-rail--enemy .combat-screen-status-row {
  justify-content: flex-end;
}

.combat-screen-status-tile {
  --status-tone: #8ea8e8;
  position: relative;
  display: grid;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  overflow: visible !important;
  border: 1px solid color-mix(in srgb, var(--status-tone) 62%, rgba(255, 255, 255, 0.18));
  border-radius: 0.26rem;
  background: rgba(2, 6, 12, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.68),
    0 0 12px color-mix(in srgb, var(--status-tone) 26%, transparent);
}

.combat-screen-status-tile__icon {
  width: 100%;
  height: 100%;
  border-radius: 0.2rem;
  object-fit: cover;
}

.combat-screen-status-tile__fallback {
  color: var(--status-tone);
  font: 900 0.55rem/1 var(--font-mono);
}

.combat-screen-status-tile__source,
.combat-screen-status-tile__badge {
  position: absolute;
  z-index: 3;
  display: block;
  border-radius: 0.14rem;
  background: rgba(2, 6, 12, 0.94);
  font-family: var(--font-ui);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
}

.combat-screen-status-tile__source {
  top: -0.3rem;
  left: -0.26rem;
  padding: 0.11rem 0.18rem;
  border: 1px solid color-mix(in srgb, var(--status-tone) 54%, rgba(255, 255, 255, 0.12));
  color: color-mix(in srgb, var(--status-tone) 78%, white);
  font-size: 0.42rem;
  letter-spacing: 0.025em;
}

.combat-screen-status-tile--source-enemy .combat-screen-status-tile__source {
  border-color: rgba(231, 102, 102, 0.64);
  color: #f4a1a1;
}

.combat-screen-status-tile__badge {
  right: -0.24rem;
  bottom: -0.28rem;
  min-width: 0.9rem;
  padding: 0.1rem 0.16rem;
  border: 1px solid color-mix(in srgb, var(--status-tone) 48%, rgba(255, 255, 255, 0.1));
  color: rgba(244, 238, 222, 0.96);
  font-size: 0.48rem;
  text-align: center;
}

.combat-screen-status-tile__progress {
  position: absolute;
  right: 0.1rem;
  bottom: 0.08rem;
  left: 0.1rem;
  z-index: 2;
  height: 0.13rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(2, 6, 12, 0.78);
}

.combat-screen-status-tile__progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--status-tone);
  transition: width 1s linear;
}

.dungeon-combat-screen .dungeon-combat-hud-dock {
  gap: 0.42rem !important;
}

.dungeon-combat-screen .dungeon-combat-hud-dock > .combat-screen-mercenary-panel,
.dungeon-combat-screen .dungeon-combat-hud-dock > .dungeon-signature-mechanic {
  flex: 0 0 auto;
  width: 100%;
  margin: 0 !important;
}

.dungeon-combat-screen .dungeon-combat-hud-dock > .combat-screen-mercenary-panel {
  z-index: 3;
}

.dungeon-combat-screen .dungeon-combat-hud-dock > .dungeon-signature-mechanic {
  z-index: 2;
}

@media (max-width: 1023px) {
  .combat-screen-effect-pair {
    gap: 0.5rem;
    padding-right: 0.25rem;
    padding-left: 0.25rem;
  }

  .combat-screen-effect-rail {
    min-height: 2rem;
    padding-right: 0.3rem;
    padding-left: 0.3rem;
  }

  .combat-screen-effect-rail__label {
    font-size: 0.46rem;
  }
}

/* World Boss briefing: full desktop fit with no nested scrolling. */
.world-boss-modal-backdrop {
  padding: 6px;
}

.world-boss-modal-shell.world-boss-modal-shell--v2 {
  width: min(1600px, calc(100vw - 12px));
  height: min(900px, calc(100dvh - 12px));
  max-height: calc(100dvh - 12px);
  overflow: hidden;
}

.world-boss-modal-shell--v2 .world-boss-modal-hero {
  flex: 0 0 auto;
  padding: 8px 12px;
}

.world-boss-modal-shell--v2 .world-boss-modal-tabs {
  margin: 6px 10px 0;
  padding: 4px;
}

.world-boss-modal-shell--v2 .world-boss-modal-tabs button {
  min-height: 30px;
}

.world-boss-modal-shell--v2 .world-boss-modal-scroll {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow: visible;
  overscroll-behavior: auto;
  scrollbar-gutter: auto;
  scrollbar-width: none;
}

.world-boss-modal-shell--v2 .world-boss-modal-scroll::-webkit-scrollbar,
.world-boss-modal-shell--v2::-webkit-scrollbar {
  display: none;
}

.world-boss-modal-shell--v2 .world-boss-result-panel {
  margin: 6px 10px 0;
  padding: 6px 8px;
}

.world-boss-modal-shell--v2 .world-boss-result-panel__summary {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.2;
}

.world-boss-modal-shell--v2 .world-boss-result-cache {
  grid-template-columns: 180px minmax(0, 1fr) auto;
  align-items: center;
  gap: 5px 10px;
  margin-top: 5px;
  padding: 6px 8px;
}

.world-boss-modal-shell--v2 .world-boss-result-cache__header {
  grid-column: 1;
  grid-row: 1;
}

.world-boss-modal-shell--v2 .world-boss-result-cache p {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-modal-shell--v2 .world-boss-result-cache__contents {
  grid-column: 1 / 3;
  grid-row: 2;
  min-width: 0;
}

.world-boss-modal-shell--v2 .world-boss-result-cache__open {
  grid-column: 3;
  grid-row: 1 / 3;
  justify-self: end;
  white-space: nowrap;
}

.world-boss-modal-shell--v2 .world-boss-modal-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 7px;
  padding: 6px 10px;
}

.world-boss-modal-shell--v2 .world-boss-panel {
  padding: 7px;
}

.world-boss-modal-shell--v2 .world-boss-panel--abilities {
  grid-column: 1 / -1;
}

.world-boss-modal-shell--v2 .world-boss-ability-list {
  gap: 6px;
  margin-top: 6px;
}

.world-boss-modal-shell--v2 .world-boss-ability-card {
  padding: 5px;
}

.world-boss-modal-shell--v2 .world-boss-stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin-top: 6px;
}

.world-boss-modal-shell--v2 .world-boss-stat {
  padding: 6px;
}

.world-boss-modal-shell--v2 .world-boss-drop-list {
  gap: 5px;
  margin-top: 6px;
}

.world-boss-modal-shell--v2 .world-boss-performance-details {
  flex: 0 0 auto;
  margin: 0 10px 6px;
}

.world-boss-modal-shell--v2 .world-boss-performance-details > summary {
  padding: 7px 9px;
}

.world-boss-modal-shell--v2 .world-boss-modal-footer {
  padding: 7px 10px;
}

.world-boss-reward-items {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.world-boss-reward-items__label {
  flex: 0 0 auto;
  max-width: 170px;
  color: #93c5fd;
  font: 900 8px/1.15 var(--font-ui, inherit);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.world-boss-reward-items__rail {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.world-boss-reward-item {
  position: relative;
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 6px;
  background: linear-gradient(145deg, rgba(17, 36, 62, 0.92), rgba(2, 9, 20, 0.94));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  cursor: help;
  outline: none;
  appearance: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.world-boss-reward-item:hover,
.world-boss-reward-item:focus-visible {
  z-index: 2;
  border-color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 72%, #ffffff);
  box-shadow:
    0 0 16px color-mix(in srgb, var(--boss-accent-2, #60a5fa) 28%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.world-boss-reward-item img {
  width: 100%;
  height: 100%;
  border-radius: 5px;
  object-fit: cover;
}

.world-boss-reward-item b {
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 18px;
  max-width: 36px;
  overflow: hidden;
  padding: 3px 4px;
  border: 1px solid rgba(147, 197, 253, 0.56);
  border-radius: 999px;
  background: rgba(1, 7, 16, 0.96);
  color: #dbeafe;
  font: 900 8px/1 var(--font-mono, monospace);
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.46);
}

.world-boss-cache-contents .world-boss-reward-items {
  align-items: flex-start;
}

.world-boss-cache-contents .world-boss-reward-items__label {
  width: 76px;
  padding-top: 4px;
}

.world-boss-reward-hover {
  --reward-hover-color: #60a5fa;
  position: fixed;
  z-index: 2147483647;
  display: grid;
  width: min(292px, calc((100vw / var(--vespera-ui-scale, 1)) - 24px));
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--reward-hover-color) 62%, rgba(255, 255, 255, 0.22));
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--reward-hover-color) 18%, transparent), transparent 46%),
    rgba(2, 8, 18, 0.985);
  color: #f4e8d0;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.72), 0 0 22px color-mix(in srgb, var(--reward-hover-color) 14%, transparent);
  pointer-events: none;
}

.world-boss-reward-hover[data-rarity="legendary"] { --reward-hover-color: #facc15; }
.world-boss-reward-hover[data-rarity="rare"] { --reward-hover-color: #60a5fa; }
.world-boss-reward-hover[data-rarity="currency"] { --reward-hover-color: #fbbf24; }

.world-boss-reward-hover__icon {
  width: 54px;
  height: 54px;
  border: 1px solid color-mix(in srgb, var(--reward-hover-color) 62%, transparent);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.32);
  object-fit: cover;
}

.world-boss-reward-hover__copy {
  min-width: 0;
}

.world-boss-reward-hover__copy > span {
  display: block;
  color: color-mix(in srgb, var(--reward-hover-color) 76%, #ffffff);
  font: 900 8px/1 var(--font-ui, inherit);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.world-boss-reward-hover__copy strong,
.world-boss-reward-hover__copy b {
  display: block;
}

.world-boss-reward-hover__copy strong {
  margin-top: 4px;
  color: #fff4d6;
  font: 900 14px/1.1 var(--font-serif, inherit);
}

.world-boss-reward-hover__copy b {
  margin-top: 3px;
  color: color-mix(in srgb, var(--reward-hover-color) 78%, #ffffff);
  font: 900 11px/1.1 var(--font-mono, monospace);
}

.world-boss-reward-hover__copy p {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: rgba(216, 207, 188, 0.78);
  font: 650 10px/1.3 var(--font-body, inherit);
}

@media (max-height: 760px) {
  .world-boss-modal-shell.world-boss-modal-shell--v2 {
    height: calc(100dvh - 6px);
    max-height: calc(100dvh - 6px);
  }

  .world-boss-modal-shell--v2 .world-boss-modal-hero {
    padding-block: 6px;
  }

  .world-boss-modal-shell--v2 .world-boss-modal-title {
    font-size: 22px;
  }

  .world-boss-modal-shell--v2 .world-boss-modal-copy,
  .world-boss-modal-shell--v2 .world-boss-modal-chips {
    margin-top: 3px;
  }

  .world-boss-modal-shell--v2 .world-boss-modal-chips span {
    padding: 3px 5px;
    font-size: 8px;
  }

  .world-boss-modal-shell--v2 .world-boss-war-chest-panel {
    margin-top: 5px;
    padding: 6px;
  }

  .world-boss-modal-shell--v2 .world-boss-result-panel {
    margin-top: 5px;
  }

  .world-boss-modal-shell--v2 .world-boss-modal-grid {
    padding-block: 5px;
  }

  .world-boss-modal-shell--v2 .world-boss-modal-footer {
    padding-block: 6px;
  }
}

/* World Boss stays an inset modal at every global UI scale. */
.world-boss-modal-backdrop.vespera-modal-viewport {
  width: calc(100vw / var(--vespera-ui-scale));
  height: calc(100vh / var(--vespera-ui-scale));
  height: calc(100dvh / var(--vespera-ui-scale));
  padding: 12px;
  overflow: hidden;
}

.world-boss-modal-shell.world-boss-modal-shell--v2.vespera-modal-frame {
  display: flex;
  flex-direction: column;
  width: min(1600px, calc((100vw / var(--vespera-ui-scale)) - 24px));
  height: min(900px, calc((100dvh / var(--vespera-ui-scale)) - 24px));
  min-height: 0;
  max-height: calc((100dvh / var(--vespera-ui-scale)) - 24px);
  overflow: hidden;
}

.world-boss-modal-shell--v2 .world-boss-modal-hero,
.world-boss-modal-shell--v2 .world-boss-modal-tabs,
.world-boss-modal-shell--v2 .world-boss-war-chest-panel,
.world-boss-modal-shell--v2 .world-boss-modal-footer {
  flex: 0 0 auto;
}

.world-boss-modal-shell--v2 .world-boss-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.world-boss-modal-shell--v2 .world-boss-modal-scroll::-webkit-scrollbar {
  display: block;
  width: 8px;
}

/* Combat ability details use a body-level portal, so only the tooltip is promoted. */
.combat-ability-dock,
.combat-ability-dock > div:last-child,
.combat-ability-dock .combat-ability-slot {
  position: relative;
  overflow: visible !important;
}

.combat-ability-tooltip-portal {
  isolation: isolate;
}

/* Frontier rolled Seal decision */
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-manage-action--pending {
  border-color: rgba(247, 196, 78, 0.75) !important;
  box-shadow: 0 0 18px rgba(247, 196, 78, 0.22) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal--pending {
  width: min(720px, calc(100vw - 32px)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal--pending .frontier-seal-modal__grid {
  grid-template-columns: minmax(0, 1fr) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card--pending {
  border-color: rgba(247, 196, 78, 0.58) !important;
  background: linear-gradient(145deg, rgba(46, 31, 9, 0.86), rgba(3, 12, 23, 0.94)) !important;
  box-shadow: inset 0 0 24px rgba(247, 196, 78, 0.08), 0 14px 34px rgba(0, 0, 0, 0.34) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__discard {
  min-height: 36px !important;
  width: 100% !important;
  border: 1px solid rgba(186, 197, 216, 0.24) !important;
  border-radius: 5px !important;
  background: rgba(8, 18, 32, 0.78) !important;
  color: rgba(224, 228, 235, 0.82) !important;
  font: 800 10px/1 var(--font-body, inherit) !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__close:disabled {
  cursor: not-allowed !important;
  opacity: 0.58 !important;
}

@media (max-width: 720px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal--pending .frontier-seal-modal__equipped {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Frontier Seal collection: numbered active slots; reserve Seals stay in the card inventory. */
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__equipped {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal--pending .frontier-seal-modal__equipped {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__slot-label,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-label,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card-slot {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(229, 187, 87, 0.42) !important;
  border-radius: 4px !important;
  background: rgba(3, 10, 20, 0.94) !important;
  color: #f2cc69 !important;
  font: 800 9px/1 var(--font-body, inherit) !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-socket__slot-label {
  position: absolute !important;
  z-index: 3 !important;
  top: 0.18rem !important;
  left: 50% !important;
  min-height: 1rem !important;
  padding: 0.12rem 0.28rem !important;
  transform: translateX(-50%) !important;
  pointer-events: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-label {
  position: absolute !important;
  z-index: 2 !important;
  top: 0.22rem !important;
  left: 0.22rem !important;
  min-height: 1rem !important;
  padding: 0.12rem 0.28rem !important;
  pointer-events: none !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card-state-stack {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  gap: 0.28rem !important;
  margin-left: auto !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card-slot {
  min-height: 1.15rem !important;
  padding: 0.16rem 0.36rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-group {
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid rgba(154, 181, 214, 0.14);
  border-radius: 6px;
  background: rgba(3, 12, 24, 0.38);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot-group .frontier-seal-modal__slot-grid {
  margin-top: 0.45rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot--reserve {
  border-color: rgba(167, 138, 210, 0.32) !important;
  background: linear-gradient(180deg, rgba(25, 18, 46, 0.78), rgba(6, 14, 29, 0.88)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__slot--swap-target {
  cursor: pointer !important;
  border-color: rgba(255, 220, 124, 0.78) !important;
  box-shadow: inset 0 0 18px rgba(255, 206, 92, 0.08), 0 0 0 1px rgba(255, 220, 124, 0.2) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card--reserve {
  border-color: rgba(167, 138, 210, 0.34) !important;
  background: linear-gradient(145deg, rgba(24, 17, 45, 0.82), rgba(3, 12, 24, 0.94)) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card--selected-reserve {
  border-color: rgba(255, 220, 124, 0.78) !important;
  box-shadow: inset 0 0 22px rgba(255, 206, 92, 0.08), 0 0 0 1px rgba(255, 220, 124, 0.18) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__card--swap-target {
  border-color: rgba(108, 218, 159, 0.54) !important;
  box-shadow: inset 0 0 18px rgba(64, 205, 132, 0.06) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__grid {
  max-height: min(34rem, calc(100vh - 15.5rem)) !important;
  overflow-y: auto !important;
  padding-right: 0.3rem !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__rank {
  width: 100% !important;
  min-height: 32px !important;
  margin-top: 0.45rem !important;
  border-radius: 5px !important;
  font-size: 10px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

@media (max-width: 900px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__equipped {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Frontier Seal automation. */
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__header-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__automation-open,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__toggle,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__filter,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__lock {
  border: 1px solid rgba(153, 182, 215, 0.28);
  border-radius: 5px;
  background: rgba(4, 15, 29, 0.88);
  color: rgba(224, 232, 241, 0.78);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__automation-open {
  min-height: 34px;
  padding: 0.45rem 0.72rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__automation-open--enabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__toggle--enabled,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__filter--selected,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__lock--protected {
  border-color: rgba(92, 223, 151, 0.58);
  background: rgba(20, 94, 61, 0.24);
  color: rgb(115, 234, 169);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation {
  display: grid;
  grid-template-columns: minmax(16rem, 1.05fr) minmax(22rem, 1.65fr) auto;
  align-items: center;
  gap: 0.8rem 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid rgba(75, 190, 135, 0.3);
  border-radius: 7px;
  background:
    radial-gradient(circle at 10% 0%, rgba(46, 162, 109, 0.1), transparent 48%),
    linear-gradient(135deg, rgba(5, 23, 35, 0.96), rgba(4, 13, 28, 0.96));
  box-shadow: inset 0 1px 0 rgba(179, 235, 208, 0.04);
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__title {
  color: var(--frontier-ui-gold);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__copy {
  margin: 0.2rem 0 0;
  color: rgba(211, 222, 232, 0.68);
  font-size: 10px;
  line-height: 1.4;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__toggle {
  min-width: 76px;
  min-height: 32px;
  padding: 0.42rem 0.62rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__rules {
  min-width: 0;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__rule-label,
.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__history {
  color: rgba(209, 224, 235, 0.66);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-top: 0.3rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__filter {
  min-height: 27px;
  padding: 0.34rem 0.5rem;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__rule-note {
  display: block;
  margin-top: 0.3rem;
  color: rgba(192, 207, 220, 0.58);
  font-size: 9px;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__history {
  max-width: 12rem;
  line-height: 1.5;
  text-align: right;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__lock {
  min-height: 21px;
  padding: 0.2rem 0.4rem;
  white-space: nowrap;
}

@media (max-width: 1080px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation {
    grid-template-columns: minmax(0, 1fr);
  }

  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__history {
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 680px) {
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal__header-actions,
  .frontier-region-expedition.frontier-page-shell--open .frontier-seal-automation__top {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: minmax(0, 1fr);
  }
}

.frontier-region-expedition.frontier-page-shell--open
  .frontier-seal-modal:not(.frontier-seal-modal--pending) {
  height: min(760px, calc(100vh - 56px)) !important;
  grid-template-rows: auto auto auto minmax(0, 1fr) !important;
}

.frontier-region-expedition.frontier-page-shell--open .frontier-seal-modal--pending {
  grid-template-rows: auto auto minmax(0, 1fr) !important;
}

.frontier-region-expedition.frontier-page-shell--open
  .frontier-seal-modal:not(.frontier-seal-modal--pending)
  .frontier-seal-modal__grid {
  align-self: stretch !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
}

.world-boss-registration-alert-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 34%, rgba(61, 92, 128, 0.24), transparent 45%), rgba(2, 7, 15, 0.84);
  backdrop-filter: blur(7px);
}

.world-boss-registration-alert {
  display: block !important;
  grid-template-columns: none !important;
  grid-template-rows: none !important;
  width: min(560px, calc(100vw - 32px));
  box-sizing: border-box;
  padding: 28px;
  border: 1px solid rgba(222, 184, 91, 0.72);
  background: linear-gradient(145deg, rgba(5, 17, 31, 0.99), rgba(7, 27, 40, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 238, 182, 0.12);
}

.world-boss-registration-alert__eyebrow {
  color: #dec16c;
  font: 700 10px/1.2 var(--font-ui, sans-serif);
  letter-spacing: 0.24em;
}

.world-boss-registration-alert h2 {
  margin: 8px 0 10px;
  color: #fff2c9;
  font: 700 clamp(22px, 4vw, 34px)/1.05 var(--font-serif, serif);
  letter-spacing: 0.035em;
}

.world-boss-registration-alert p {
  margin: 0;
  color: rgba(222, 231, 241, 0.78);
  font-size: 13px;
  line-height: 1.55;
}

.world-boss-registration-alert__fight {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 20px;
  padding: 12px;
  border: 1px solid rgba(91, 191, 220, 0.32);
  background: rgba(4, 12, 25, 0.72);
}

.world-boss-registration-alert__fight img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid rgba(222, 184, 91, 0.58);
}

.world-boss-registration-alert__fight div {
  display: grid;
  gap: 5px;
}

.world-boss-registration-alert__fight strong {
  color: #f7e7b0;
  font-size: 14px;
}

.world-boss-registration-alert__fight span {
  color: rgba(169, 213, 228, 0.78);
  font: 700 11px/1.3 var(--font-ui, sans-serif);
  letter-spacing: 0.04em;
}

.world-boss-registration-alert__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

.world-boss-registration-alert__actions button {
  min-height: 40px;
  padding-inline: 18px;
}

.world-boss-launch-bonus {
  border-color: rgba(250, 204, 21, 0.7) !important;
  color: #fde68a !important;
  background: rgba(113, 63, 18, 0.45) !important;
}

@media (max-width: 560px) {
  .world-boss-registration-alert-backdrop {
    padding: 12px;
  }

  .world-boss-registration-alert {
    padding: 20px;
  }

  .world-boss-registration-alert__actions {
    display: grid;
  }
}

/* Triphamr's Beer Mug: isolated visual-only intoxication effect. */
.beer-vision-effect {
  position: fixed;
  inset: -2px;
  z-index: 2147483647;
  pointer-events: none !important;
  user-select: none;
  background: radial-gradient(
    circle at 50% 45%,
    rgba(255, 210, 120, 0.015),
    rgba(43, 20, 8, 0.12)
  );
  opacity: 0;
  backdrop-filter: blur(0) saturate(1) brightness(1);
  -webkit-backdrop-filter: blur(0) saturate(1) brightness(1);
  animation: beer-vision-drunk 8s ease-in-out both;
  will-change: opacity, backdrop-filter;
}

@keyframes beer-vision-drunk {
  0% {
    opacity: 0;
    backdrop-filter: blur(0) saturate(1) brightness(1);
    -webkit-backdrop-filter: blur(0) saturate(1) brightness(1);
  }
  18% {
    opacity: 0.46;
    backdrop-filter: blur(1.5px) saturate(1.06) brightness(1.01);
    -webkit-backdrop-filter: blur(1.5px) saturate(1.06) brightness(1.01);
  }
  46% {
    opacity: 0.92;
    backdrop-filter: blur(6px) saturate(1.18) brightness(1.04);
    -webkit-backdrop-filter: blur(6px) saturate(1.18) brightness(1.04);
  }
  62% {
    opacity: 0.82;
    backdrop-filter: blur(4.5px) saturate(0.9) brightness(0.98);
    -webkit-backdrop-filter: blur(4.5px) saturate(0.9) brightness(0.98);
  }
  78% {
    opacity: 0.48;
    backdrop-filter: blur(2px) saturate(1.04) brightness(1);
    -webkit-backdrop-filter: blur(2px) saturate(1.04) brightness(1);
  }
  100% {
    opacity: 0;
    backdrop-filter: blur(0) saturate(1) brightness(1);
    -webkit-backdrop-filter: blur(0) saturate(1) brightness(1);
  }
}

html.reduce-motion .beer-vision-effect {
  animation-name: beer-vision-drunk-reduced;
}

@keyframes beer-vision-drunk-reduced {
  0%,
  100% {
    opacity: 0;
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
  }
  25%,
  68% {
    opacity: 0.22;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .beer-vision-effect {
    animation-name: beer-vision-drunk-reduced;
  }
}

/* Codex: focused DoT and Poison mechanics reference. */
.dot-codex {
  --dot-gold: #d6ad5e;
  --dot-poison: #8fbc76;
  --dot-bleed: #d17b70;
  --dot-arcane: #aa91ca;
  display: grid;
  gap: 1rem;
  color: var(--color-parchment, #eee4d0);
}

.dot-codex__hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 10rem;
  gap: 1rem;
  overflow: hidden;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid rgb(var(--brass-rgb, 190 150 77) / 0.48);
  border-radius: 0.8rem;
  background:
    radial-gradient(circle at 88% 30%, rgba(108, 151, 82, 0.18), transparent 25%),
    linear-gradient(125deg, rgba(21, 30, 39, 0.98), rgba(12, 18, 28, 0.98));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 18px 42px rgba(0, 0, 0, 0.24);
}

.dot-codex__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.16;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 100% 2rem;
  pointer-events: none;
}

.dot-codex__hero-copy { align-self: center; }

.dot-codex__kicker,
.dot-codex__formula > span,
.dot-codex__example > span {
  color: var(--dot-gold);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.dot-codex__hero h3 {
  margin: 0.32rem 0 0.5rem;
  color: #fff2cf;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 3.15rem);
  line-height: 1.05;
}

.dot-codex__hero p {
  max-width: 48rem;
  margin: 0;
  color: #c8c4bd;
  font-size: 1rem;
  line-height: 1.7;
}

.dot-codex__sigil {
  position: relative;
  align-self: center;
  width: 8.5rem;
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid rgba(143, 188, 118, 0.5);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 188, 118, 0.24), rgba(143, 188, 118, 0.04) 55%, transparent 57%);
  box-shadow: 0 0 2.5rem rgba(92, 152, 70, 0.14), inset 0 0 1.5rem rgba(92, 152, 70, 0.12);
}

.dot-codex__sigil::before,
.dot-codex__sigil::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 1px;
  height: 76%;
  background: rgba(143, 188, 118, 0.32);
  transform: translate(-50%, -50%) rotate(45deg);
}

.dot-codex__sigil::after { transform: translate(-50%, -50%) rotate(-45deg); }

.dot-codex__sigil i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.85rem;
  aspect-ratio: 1;
  border: 1px solid rgba(206, 237, 177, 0.7);
  border-radius: 50%;
  background: #6e945d;
  box-shadow: 0 0 0.8rem rgba(143, 188, 118, 0.65);
  transform: translate(-50%, -50%) rotate(calc(var(--dot-ring) * 72deg)) translateY(-3.15rem);
}

.dot-codex__hero-facts {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(214, 173, 94, 0.2);
}

.dot-codex__hero-facts span {
  padding: 0.38rem 0.62rem;
  border: 1px solid rgba(214, 173, 94, 0.24);
  border-radius: 999px;
  background: rgba(214, 173, 94, 0.065);
  color: #d8ccb0;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.dot-codex__section {
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.3vw, 1.5rem);
  border: 1px solid rgba(155, 166, 179, 0.17);
  border-radius: 0.7rem;
  background: linear-gradient(145deg, rgba(20, 28, 39, 0.94), rgba(13, 20, 30, 0.94));
}

.dot-codex__section--poison { border-top-color: rgba(143, 188, 118, 0.6); }
.dot-codex__section--standard { border-top-color: rgba(209, 123, 112, 0.58); }
.dot-codex__section--families { border-top-color: rgba(170, 145, 202, 0.52); }
.dot-codex__section--crit { border-top-color: rgba(214, 173, 94, 0.55); }

.dot-codex__section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.85rem;
}

.dot-codex__section-heading > span {
  min-width: 2rem;
  padding-top: 0.18rem;
  color: var(--dot-gold);
  font-family: Cinzel, Georgia, serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.dot-codex__section-heading h4,
.dot-codex__overview-card h5,
.dot-codex__flow h5,
.dot-codex__example h5,
.dot-codex__rule-grid h5 {
  margin: 0;
  color: #f0e6d0;
}

.dot-codex__section-heading h4 {
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.08rem, 2.3vw, 1.35rem);
  line-height: 1.25;
}

.dot-codex__section-heading p {
  margin: 0.25rem 0 0;
  color: #999fa8;
  font-size: 0.88rem;
  line-height: 1.55;
}

.dot-codex__overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.dot-codex__overview-card,
.dot-codex__flow article,
.dot-codex__rule-grid article,
.dot-codex__crit-grid article {
  border: 1px solid rgba(155, 166, 179, 0.16);
  border-radius: 0.55rem;
  background: rgba(7, 13, 21, 0.52);
}

.dot-codex__overview-card {
  position: relative;
  overflow: hidden;
  min-height: 10rem;
  padding: 1rem;
}

.dot-codex__overview-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--card-accent);
}

.dot-codex__overview-card.is-poison { --card-accent: var(--dot-poison); }
.dot-codex__overview-card.is-bleed { --card-accent: var(--dot-bleed); }
.dot-codex__overview-card.is-ability { --card-accent: var(--dot-arcane); }

.dot-codex__overview-card > span {
  color: var(--card-accent);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.dot-codex__overview-card h5 { margin-top: 0.52rem; font-size: 1rem; }
.dot-codex__overview-card p,
.dot-codex__flow p,
.dot-codex__formula p,
.dot-codex__example p,
.dot-codex__rule-grid p,
.dot-codex__crit-grid p,
.dot-codex__scaling-row p,
.dot-codex__faq-list p {
  margin: 0.45rem 0 0;
  color: #acb0b6;
  font-size: 0.86rem;
  line-height: 1.62;
}

.dot-codex__flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.dot-codex__flow article { position: relative; padding: 0.9rem; }
.dot-codex__flow article:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.1rem;
  right: -0.42rem;
  z-index: 1;
  width: 0.7rem;
  height: 0.7rem;
  border-top: 1px solid var(--dot-poison);
  border-right: 1px solid var(--dot-poison);
  transform: rotate(45deg);
}

.dot-codex__flow b,
.dot-codex__crit-grid b {
  color: var(--dot-poison);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.dot-codex__flow h5 { margin-top: 0.35rem; font-size: 0.92rem; }

.dot-codex__formula-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(15rem, 0.75fr);
  gap: 0.7rem;
}

.dot-codex__formula,
.dot-codex__example {
  padding: 1rem;
  border: 1px solid rgba(143, 188, 118, 0.26);
  border-radius: 0.55rem;
  background: rgba(9, 17, 22, 0.72);
}

.dot-codex__formula.is-bleed,
.dot-codex__example.is-bleed { border-color: rgba(209, 123, 112, 0.3); }

.dot-codex__formula strong {
  display: block;
  margin: 0.32rem 0 0.55rem;
  color: #e8e0ce;
  font-size: 0.94rem;
}

.dot-codex__formula code,
.dot-codex__example code {
  display: block;
  overflow-x: auto;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.3);
  color: #d4eac8;
  font-size: clamp(0.72rem, 1.4vw, 0.83rem);
  line-height: 1.45;
  white-space: nowrap;
}

.dot-codex__example h5 { margin: 0.32rem 0 0.55rem; font-size: 0.95rem; }

.dot-codex__important,
.dot-codex__plain-note {
  margin: 0;
  padding: 0.78rem 0.9rem;
  border-left: 3px solid var(--dot-poison);
  background: rgba(143, 188, 118, 0.08);
  color: #d0d5ca;
  font-size: 0.88rem;
  line-height: 1.55;
}

.dot-codex__plain-note {
  border-left-color: var(--dot-bleed);
  background: rgba(209, 123, 112, 0.075);
}

.dot-codex__family-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.42rem;
}

.dot-codex__family-strip span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.62rem 0.42rem;
  border: 1px solid rgba(170, 145, 202, 0.24);
  border-radius: 0.45rem;
  background: rgba(170, 145, 202, 0.06);
  color: #d0c5dd;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.dot-codex__family-strip i {
  flex: 0 0 auto;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0.55rem currentColor;
}

.dot-codex__family-strip .is-burn { color: #e39a64; }
.dot-codex__family-strip .is-bleed { color: #d17b70; }
.dot-codex__family-strip .is-frost { color: #8cc9db; }
.dot-codex__family-strip .is-shadeflame { color: #b18bd2; }
.dot-codex__family-strip .is-venom { color: #8fbc76; }
.dot-codex__family-strip .is-generic { color: #c7c3bc; }

.dot-codex__rule-grid,
.dot-codex__crit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.dot-codex__rule-grid article { padding: 0.9rem; }
.dot-codex__rule-grid h5 { font-size: 0.9rem; }

.dot-codex__crit-grid article {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.68rem;
  padding: 0.9rem;
}

.dot-codex__crit-grid b { color: var(--dot-gold); }
.dot-codex__crit-grid p { margin: 0; }

.dot-codex__scaling-table {
  overflow: hidden;
  border: 1px solid rgba(155, 166, 179, 0.18);
  border-radius: 0.55rem;
}

.dot-codex__scaling-head,
.dot-codex__scaling-row {
  display: grid;
  grid-template-columns: minmax(10rem, 0.34fr) minmax(0, 0.66fr);
  gap: 1rem;
  padding: 0.72rem 0.9rem;
}

.dot-codex__scaling-head {
  background: rgba(214, 173, 94, 0.1);
  color: var(--dot-gold);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.dot-codex__scaling-row { border-top: 1px solid rgba(155, 166, 179, 0.12); }
.dot-codex__scaling-row:nth-child(odd) { background: rgba(255, 255, 255, 0.015); }
.dot-codex__scaling-row strong { color: #ded4bd; font-size: 0.85rem; }
.dot-codex__scaling-row p { margin: 0; }

.dot-codex__faq-list { display: grid; gap: 0.48rem; }

.dot-codex__faq-list details {
  border: 1px solid rgba(155, 166, 179, 0.17);
  border-radius: 0.48rem;
  background: rgba(6, 12, 20, 0.48);
}

.dot-codex__faq-list summary {
  position: relative;
  padding: 0.8rem 2.6rem 0.8rem 0.9rem;
  color: #e3dac8;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.dot-codex__faq-list summary::-webkit-details-marker { display: none; }
.dot-codex__faq-list summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0.9rem;
  color: var(--dot-gold);
  font-size: 1.15rem;
  transform: translateY(-50%);
}
.dot-codex__faq-list details[open] summary::after { content: "\2212"; }
.dot-codex__faq-list p { margin: 0; padding: 0 0.9rem 0.9rem; }

@media (max-width: 900px) {
  .dot-codex__overview-grid { grid-template-columns: 1fr; }
  .dot-codex__overview-card { min-height: 0; }
  .dot-codex__flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dot-codex__flow article::after { display: none; }
  .dot-codex__formula-row { grid-template-columns: 1fr; }
  .dot-codex__family-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .dot-codex { gap: 0.72rem; }
  .dot-codex__hero { grid-template-columns: 1fr; padding: 1rem; }
  .dot-codex__sigil { position: absolute; top: 0.65rem; right: -1.5rem; z-index: -1; width: 7rem; opacity: 0.45; }
  .dot-codex__hero-copy { padding-right: 2rem; }
  .dot-codex__hero h3 { font-size: 1.8rem; }
  .dot-codex__hero-facts { gap: 0.35rem; }
  .dot-codex__hero-facts span { font-size: 0.61rem; }
  .dot-codex__section { padding: 0.82rem; }
  .dot-codex__section-heading { gap: 0.5rem; }
  .dot-codex__flow,
  .dot-codex__rule-grid,
  .dot-codex__crit-grid { grid-template-columns: 1fr; }
  .dot-codex__family-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dot-codex__scaling-head { display: none; }
  .dot-codex__scaling-row { grid-template-columns: 1fr; gap: 0.28rem; }
  .dot-codex__formula code,
  .dot-codex__example code { font-size: 0.68rem; }
}

/* Mercenary Codex */
.merc-codex {
  --merc-gold: #d8b66c;
  --merc-gold-soft: rgba(216, 182, 108, 0.16);
  --merc-teal: #79afa8;
  --merc-blue: #7697b6;
  --merc-ink: rgba(7, 15, 25, 0.96);
  display: grid;
  gap: 0.9rem;
  color: #d8d9d8;
}

.merc-codex__hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, 0.48fr);
  gap: 1.1rem;
  min-height: 15rem;
  padding: 1.35rem;
  border: 1px solid rgba(216, 182, 108, 0.38);
  border-radius: 0.8rem;
  background:
    linear-gradient(102deg, rgba(7, 15, 25, 0.98) 0%, rgba(13, 27, 39, 0.95) 57%, rgba(28, 28, 34, 0.92) 100%),
    radial-gradient(circle at 88% 35%, rgba(121, 175, 168, 0.2), transparent 42%);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.035), 0 1rem 2.5rem rgba(0, 0, 0, 0.2);
}

.merc-codex__hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--merc-gold), var(--merc-teal), transparent);
  opacity: 0.72;
}

.merc-codex__hero-copy {
  align-self: center;
  min-width: 0;
}

.merc-codex__kicker,
.merc-codex__formula-grid article > span,
.merc-codex__example > span {
  color: var(--merc-gold);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.merc-codex__hero h3 {
  margin: 0.35rem 0 0.6rem;
  color: #f0e5cd;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
  text-shadow: 0 0 1.2rem rgba(216, 182, 108, 0.12);
}

.merc-codex__hero p {
  max-width: 48rem;
  margin: 0;
  color: #adb9c1;
  font-size: 0.94rem;
  line-height: 1.72;
}

.merc-codex__hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.merc-codex__hero-facts span {
  padding: 0.38rem 0.58rem;
  border: 1px solid rgba(121, 175, 168, 0.28);
  border-radius: 0.3rem;
  background: rgba(121, 175, 168, 0.07);
  color: #b7d1cc;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.merc-codex__portraits {
  position: relative;
  align-self: stretch;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
  min-width: 0;
}

.merc-codex__portraits img {
  width: 100%;
  height: 6rem;
  object-fit: cover;
  object-position: 50% 18%;
  border: 1px solid rgba(216, 182, 108, 0.24);
  border-radius: 0.35rem;
  filter: saturate(0.8) contrast(1.05) brightness(0.82);
  box-shadow: inset 0 0 1rem rgba(0, 0, 0, 0.35);
}

.merc-codex__portraits img:nth-child(even) { transform: translateY(0.48rem); }

.merc-codex__section {
  overflow: hidden;
  padding: 1rem;
  border: 1px solid rgba(145, 159, 171, 0.18);
  border-top: 2px solid rgba(121, 175, 168, 0.46);
  border-radius: 0.62rem;
  background: linear-gradient(145deg, rgba(9, 20, 32, 0.96), rgba(7, 14, 24, 0.92));
}

.merc-codex__section--rank { border-top-color: rgba(216, 182, 108, 0.72); }
.merc-codex__section--roster { border-top-color: rgba(118, 151, 182, 0.62); }
.merc-codex__section--duties { border-top-color: rgba(155, 129, 181, 0.58); }

.merc-codex__section-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.88rem;
}

.merc-codex__section-heading > span {
  display: grid;
  place-items: center;
  flex: 0 0 2rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(216, 182, 108, 0.35);
  border-radius: 999px;
  color: var(--merc-gold);
  font-family: Cinzel, Georgia, serif;
  font-size: 0.69rem;
  font-weight: 800;
}

.merc-codex__section-heading h4,
.merc-codex__progress-grid h5,
.merc-codex__merc h5,
.merc-codex__duty-grid h5 {
  margin: 0;
  color: #e5dcc8;
  font-family: Cinzel, Georgia, serif;
}

.merc-codex__section-heading h4 { font-size: 1.15rem; }

.merc-codex__section-heading p {
  margin: 0.22rem 0 0;
  color: #8293a0;
  font-size: 0.78rem;
  line-height: 1.55;
}

.merc-codex__rank-callout {
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-left: 3px solid var(--merc-gold);
  background: linear-gradient(90deg, rgba(216, 182, 108, 0.13), rgba(216, 182, 108, 0.025));
  color: #e4dbc9;
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.62;
}

.merc-codex__formula-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.72rem;
}

.merc-codex__formula-grid article {
  min-width: 0;
  padding: 0.72rem;
  border: 1px solid rgba(216, 182, 108, 0.2);
  border-radius: 0.42rem;
  background: rgba(2, 9, 16, 0.42);
}

.merc-codex__formula-grid code {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 0.45rem;
  color: #c7d6d5;
  font-family: "Roboto Mono", Consolas, monospace;
  font-size: 0.71rem;
  line-height: 1.48;
  white-space: normal;
}

.merc-codex__formula-copy { color: inherit; font: inherit; letter-spacing: normal; text-transform: none; }
.merc-codex__formula-copy--zh { display: none; }
html[lang="zh-CN"] .merc-codex__formula-copy--en { display: none; }
html[lang="zh-CN"] .merc-codex__formula-copy--zh { display: inline; }

.merc-codex__rank-table {
  overflow: hidden;
  border: 1px solid rgba(143, 157, 169, 0.16);
  border-radius: 0.42rem;
}

.merc-codex__rank-row {
  display: grid;
  grid-template-columns: minmax(5.6rem, 0.65fr) minmax(9rem, 1.4fr) minmax(8rem, 1fr) minmax(6rem, 0.75fr);
  gap: 0.65rem;
  align-items: center;
  padding: 0.58rem 0.72rem;
  border-top: 1px solid rgba(143, 157, 169, 0.12);
  color: #aab8c0;
  font-size: 0.75rem;
}

.merc-codex__rank-row:first-child { border-top: 0; }
.merc-codex__rank-row:nth-child(odd) { background: rgba(255, 255, 255, 0.018); }
.merc-codex__rank-row strong { color: #efd89e; }

.merc-codex__rank-row.is-head {
  border-top: 0;
  background: rgba(216, 182, 108, 0.1);
  color: #bcae91;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.merc-codex__example {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.25rem 0.7rem;
  align-items: center;
  margin-top: 0.72rem;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(121, 175, 168, 0.24);
  border-radius: 0.42rem;
  background: rgba(121, 175, 168, 0.055);
}

.merc-codex__example > span { grid-row: 1 / span 2; }
.merc-codex__example strong { color: #d8d0bf; font-size: 0.82rem; }
.merc-codex__example p { margin: 0; color: #9dabb3; font-size: 0.76rem; line-height: 1.5; }

.merc-codex__progress-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.58rem;
}

.merc-codex__progress-grid article,
.merc-codex__duty-grid article {
  position: relative;
  min-width: 0;
  padding: 0.82rem;
  border: 1px solid rgba(121, 175, 168, 0.17);
  border-radius: 0.45rem;
  background: rgba(4, 12, 20, 0.44);
}

.merc-codex__progress-grid b {
  color: rgba(216, 182, 108, 0.7);
  font-family: Cinzel, Georgia, serif;
  font-size: 0.68rem;
}

.merc-codex__progress-grid > article > span {
  float: right;
  color: var(--merc-teal);
  font-size: 0.72rem;
  font-weight: 800;
}

.merc-codex__progress-grid h5 { margin-top: 0.48rem; font-size: 0.92rem; }

.merc-codex__progress-grid p,
.merc-codex__duty-grid p {
  margin: 0.42rem 0 0;
  color: #8999a4;
  font-size: 0.74rem;
  line-height: 1.55;
}

.merc-codex__plain-note {
  margin: 0.65rem 0 0;
  padding: 0.68rem 0.78rem;
  border: 1px solid rgba(118, 151, 182, 0.2);
  border-radius: 0.4rem;
  background: rgba(118, 151, 182, 0.055);
  color: #a8b5bd;
  font-size: 0.75rem;
  line-height: 1.55;
}

.merc-codex__roster-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.62rem;
}

.merc-codex__merc {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  min-width: 0;
  min-height: 9.2rem;
  border: 1px solid rgba(118, 151, 182, 0.2);
  border-radius: 0.48rem;
  background: linear-gradient(125deg, rgba(9, 19, 30, 0.92), rgba(5, 12, 20, 0.85));
}

.merc-codex__merc::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(216, 182, 108, 0.55), transparent);
}

.merc-codex__merc > img {
  width: 100%;
  height: 100%;
  min-height: 9.2rem;
  object-fit: cover;
  object-position: 50% 18%;
  border-right: 1px solid rgba(216, 182, 108, 0.17);
  filter: saturate(0.82) contrast(1.05) brightness(0.84);
}

.merc-codex__merc-copy {
  min-width: 0;
  padding: 0.68rem;
}

.merc-codex__merc-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(145, 159, 171, 0.12);
}

.merc-codex__merc h5 { font-size: 0.84rem; line-height: 1.3; }

.merc-codex__merc-heading span {
  display: block;
  margin-top: 0.12rem;
  color: #7f9aab;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
}

.merc-codex__merc-heading b {
  flex: 0 0 auto;
  padding: 0.22rem 0.35rem;
  border: 1px solid rgba(216, 182, 108, 0.25);
  border-radius: 0.25rem;
  color: #cfb978;
  font-size: 0.58rem;
}

.merc-codex__merc p {
  margin: 0.42rem 0 0;
  color: #8e9da7;
  font-size: 0.68rem;
  line-height: 1.47;
}

.merc-codex__merc p.is-passive { color: #b8c6b5; }
.merc-codex__merc p.is-active { color: #b9c5d1; }

.merc-codex__duty-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.merc-codex__duty-grid article {
  padding-left: 3rem;
  border-color: rgba(155, 129, 181, 0.2);
}

.merc-codex__duty-grid b {
  position: absolute;
  top: 0.85rem;
  left: 0.82rem;
  color: #a78dbb;
  font-family: Cinzel, Georgia, serif;
  font-size: 0.72rem;
}

.merc-codex__duty-grid h5 { font-size: 0.86rem; }

.merc-codex__faq-list { display: grid; gap: 0.48rem; }

.merc-codex__faq-list details {
  overflow: hidden;
  border: 1px solid rgba(145, 159, 171, 0.17);
  border-radius: 0.42rem;
  background: rgba(3, 10, 17, 0.42);
}

.merc-codex__faq-list summary {
  position: relative;
  padding: 0.72rem 2.4rem 0.72rem 0.82rem;
  color: #d8d1c3;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.merc-codex__faq-list summary::-webkit-details-marker { display: none; }

.merc-codex__faq-list summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 0.82rem;
  color: var(--merc-gold);
  font-size: 1rem;
  transform: translateY(-50%);
}

.merc-codex__faq-list details[open] summary::after { content: "\2212"; }

.merc-codex__faq-list p {
  margin: 0;
  padding: 0 0.82rem 0.78rem;
  color: #8e9da7;
  font-size: 0.74rem;
  line-height: 1.58;
}

@media (max-width: 980px) {
  .merc-codex__hero { grid-template-columns: minmax(0, 1fr) 13rem; }
  .merc-codex__portraits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .merc-codex__portraits img { height: 4.4rem; }
  .merc-codex__portraits img:nth-child(even) { transform: none; }
  .merc-codex__formula-grid { grid-template-columns: 1fr; }
  .merc-codex__rank-row { grid-template-columns: minmax(5rem, 0.65fr) minmax(8rem, 1.35fr) minmax(8rem, 1fr) minmax(5.5rem, 0.75fr); }
  .merc-codex__roster-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .merc-codex { gap: 0.72rem; }
  .merc-codex__hero { grid-template-columns: 1fr; min-height: 0; padding: 1rem; }
  .merc-codex__hero h3 { font-size: 1.9rem; }
  .merc-codex__hero-facts span { font-size: 0.58rem; }
  .merc-codex__portraits { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.22rem; }
  .merc-codex__portraits img { height: 3.6rem; border-radius: 0.22rem; }
  .merc-codex__section { padding: 0.8rem; }
  .merc-codex__section-heading { gap: 0.5rem; }
  .merc-codex__rank-table { overflow: visible; border: 0; }
  .merc-codex__rank-row,
  .merc-codex__rank-row.is-head { grid-template-columns: 1fr; gap: 0.2rem; margin-top: 0.42rem; padding: 0.65rem; border: 1px solid rgba(143, 157, 169, 0.15); border-radius: 0.38rem; }
  .merc-codex__rank-row.is-head { display: none; }
  .merc-codex__rank-row span { overflow-wrap: anywhere; }
  .merc-codex__example { grid-template-columns: 1fr; }
  .merc-codex__example > span { grid-row: auto; }
  .merc-codex__progress-grid,
  .merc-codex__duty-grid { grid-template-columns: 1fr; }
  .merc-codex__merc { grid-template-columns: 4.4rem minmax(0, 1fr); }
  .merc-codex__merc > img { min-height: 10.5rem; }
  .merc-codex__merc-heading { flex-direction: column; }
}

/* Owner-only leaderboard moderation */
.leaderboard-moderation-ban,
.wall-of-shame-unban {
  min-width: 58px;
  padding: 6px 10px;
  border: 1px solid rgba(248, 113, 113, 0.58);
  border-radius: 5px;
  color: #fecaca;
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.78), rgba(69, 10, 10, 0.9));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.06), 0 5px 14px rgba(0, 0, 0, 0.32);
  font-family: var(--font-ui, sans-serif);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  cursor: pointer;
}

.leaderboard-moderation-ban:hover,
.leaderboard-moderation-ban:focus-visible,
.wall-of-shame-unban:hover,
.wall-of-shame-unban:focus-visible {
  border-color: #fca5a5;
  color: #fff1f2;
  background: linear-gradient(180deg, rgba(153, 27, 27, 0.9), rgba(79, 7, 7, 0.96));
  outline: none;
}

.leaderboard-moderation-ban.is-row {
  flex: 0 0 auto;
}

.leaderboard-moderation-status {
  max-width: 680px;
  margin: -8px auto 18px;
  padding: 9px 13px;
  border: 1px solid rgba(216, 183, 109, 0.34);
  border-radius: 7px;
  color: #ead9b0;
  background: rgba(7, 12, 24, 0.88);
  font-family: var(--font-ui, sans-serif);
  font-size: 12px;
  text-align: center;
}

/* Wall of Shame leaderboard */
.wall-of-shame-panel {
  position: relative;
  isolation: isolate;
  min-height: clamp(430px, 62vh, 720px);
  overflow: hidden;
  border: 1px solid rgba(204, 165, 91, 0.42);
  border-radius: 14px;
  background: #050914;
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.56),
    inset 0 0 0 1px rgba(185, 137, 221, 0.08),
    inset 0 0 70px rgba(0, 0, 0, 0.3);
}

.wall-of-shame-panel::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(203, 169, 103, 0.18);
  border-radius: 10px;
  box-shadow: inset 0 0 26px rgba(151, 94, 196, 0.08);
}

.wall-of-shame-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.92) contrast(1.04);
}

.wall-of-shame-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(2, 6, 15, 0.72) 0%, rgba(2, 6, 15, 0.08) 34%, rgba(2, 6, 15, 0.08) 72%, rgba(2, 6, 15, 0.58) 100%),
    radial-gradient(circle at 50% 11%, rgba(5, 10, 22, 0.08) 0%, rgba(5, 10, 22, 0.72) 88%);
}

.wall-of-shame-copy {
  position: relative;
  z-index: 2;
  display: flex;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(26px, 4.4vw, 58px) 24px 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: auto;
}

.wall-of-shame-kicker {
  margin: 0;
  color: #d8b76d;
  font-family: var(--font-ui, sans-serif);
  font-size: clamp(10px, 0.82vw, 13px);
  font-weight: 900;
  letter-spacing: 0.32em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 2px 8px #000, 0 0 16px rgba(216, 183, 109, 0.34);
}

.wall-of-shame-kicker::after {
  content: "";
  display: block;
  width: min(260px, 52vw);
  height: 1px;
  margin: 14px auto 0;
  background: linear-gradient(90deg, transparent, rgba(216, 183, 109, 0.78), transparent);
  box-shadow: 0 0 10px rgba(216, 183, 109, 0.26);
}

.wall-of-shame-message {
  margin: 15px 0 0;
  color: #f0e5cb;
  font-family: var(--font-display, var(--font-serif, serif));
  font-size: clamp(28px, 3.6vw, 56px);
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.06;
  text-wrap: balance;
  text-shadow: 0 3px 12px #000, 0 0 28px rgba(129, 83, 176, 0.28);
}

.wall-of-shame-name {
  margin: 0;
  padding: 7px 18px 8px;
  border: 1px solid rgba(216, 183, 109, 0.58);
  border-radius: 4px;
  color: #f3d58c;
  background: linear-gradient(180deg, rgba(18, 14, 23, 0.86), rgba(6, 8, 16, 0.9));
  box-shadow: inset 0 1px rgba(255, 241, 194, 0.08), 0 7px 20px rgba(0, 0, 0, 0.42);
  font-family: var(--font-serif, serif);
  font-size: clamp(15px, 1.35vw, 21px);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-shadow: 0 2px 8px #000;
}

.wall-of-shame-list {
  display: grid;
  width: min(100%, 620px);
  margin-top: 22px;
  gap: 10px;
}

.wall-of-shame-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 14px;
  padding: 12px;
  border: 1px solid rgba(216, 183, 109, 0.3);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(14, 12, 20, 0.9), rgba(5, 8, 16, 0.94));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  text-align: left;
}

.wall-of-shame-entry .wall-of-shame-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wall-of-shame-steam-id,
.wall-of-shame-date {
  color: rgba(226, 216, 194, 0.68);
  font-family: var(--font-ui, sans-serif);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.wall-of-shame-date {
  grid-column: 1;
}

.wall-of-shame-unban {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.wall-of-shame-unban:disabled {
  opacity: 0.55;
  cursor: wait;
}

.wall-of-shame-empty {
  margin: 4px 0 0;
  color: rgba(240, 229, 203, 0.78);
  font-family: var(--font-ui, sans-serif);
  font-size: 13px;
}

@media (max-width: 720px) {
  .wall-of-shame-panel {
    min-height: 500px;
  }

  .wall-of-shame-art {
    object-position: 50% 58%;
  }

  .wall-of-shame-copy {
    padding-inline: 16px;
  }

  .wall-of-shame-name {
    padding: 6px 13px 7px;
  }

  .wall-of-shame-entry {
    grid-template-columns: minmax(0, 1fr);
  }

  .wall-of-shame-date,
  .wall-of-shame-unban {
    grid-column: 1;
    grid-row: auto;
  }

  .wall-of-shame-unban {
    width: fit-content;
  }
}

/* Inventory remains page-scrollable; Crafting owns scrolling inside its recipe panes. */
main[data-tutorial-page="inventory"] {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior-y: contain;
  scrollbar-gutter: stable;
}

@media (min-width: 821px) {
  main[data-tutorial-page="inventory"] {
    display: flex !important;
    flex-direction: column;
    overscroll-behavior-y: contain;
  }

  main[data-tutorial-page="inventory"] > .relative.z-10,
  main[data-tutorial-page="inventory"]
    > .relative.z-10
    > .relative.opacity-100 {
    box-sizing: border-box;
    height: 100% !important;
    max-height: none !important;
  }

  main[data-tutorial-page="inventory"]
    [data-tutorial-id="tutorial-inventory-panel"] {
    height: 100% !important;
    max-height: none !important;
    min-height: 44rem !important;
  }

  main[data-tutorial-page="inventory"] .inventory-desktop-grid {
    flex: 1 1 auto;
    height: auto !important;
    max-height: none !important;
    min-height: 44rem !important;
  }
}


/* Escape game menu: a compact, viewport-bounded control surface at every UI scale. */
.escape-game-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: flex;
  width: calc(100vw / var(--vespera-ui-scale, 1));
  height: calc(100vh / var(--vespera-ui-scale, 1));
  height: calc(100dvh / var(--vespera-ui-scale, 1));
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(68, 48, 104, 0.22), transparent 48%),
    rgba(1, 6, 13, 0.82);
  backdrop-filter: blur(7px);
}

.escape-game-menu {
  display: flex;
  width: min(540px, calc((100vw / var(--vespera-ui-scale, 1)) - 32px));
  max-height: calc((100dvh / var(--vespera-ui-scale, 1)) - 32px);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(214, 175, 83, 0.66);
  border-radius: 12px;
  color: #efe7d4;
  background:
    linear-gradient(145deg, rgba(19, 27, 46, 0.98), rgba(5, 11, 23, 0.99)),
    #07101f;
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.68),
    0 0 0 1px rgba(249, 216, 132, 0.08) inset,
    0 0 34px rgba(118, 78, 174, 0.16);
}

.escape-game-menu__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(214, 175, 83, 0.28);
  background: linear-gradient(90deg, rgba(80, 53, 19, 0.27), rgba(9, 17, 32, 0.72));
}

.escape-game-menu__eyebrow {
  margin: 0 0 4px;
  color: #d5ad50;
  font-family: var(--font-ui, sans-serif);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.24em;
  line-height: 1;
  text-transform: uppercase;
}

.escape-game-menu__header h2 {
  margin: 0;
  color: #fff3ce;
  font-family: var(--font-display, var(--font-serif, serif));
  font-size: 25px;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.72);
}

.escape-game-menu__close-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.escape-game-menu__key-hint {
  color: #8f9bad;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.escape-game-menu__close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(214, 175, 83, 0.4);
  border-radius: 7px;
  color: #dbc47d;
  background: rgba(3, 9, 18, 0.76);
  font-size: 23px;
  line-height: 1;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.escape-game-menu__close:hover,
.escape-game-menu__close:focus-visible {
  border-color: rgba(246, 205, 103, 0.86);
  color: #fff2bd;
  background: rgba(79, 55, 18, 0.62);
  outline: none;
}

.escape-game-menu__body {
  min-height: 0;
  padding: 16px 18px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.escape-game-menu__section {
  overflow: hidden;
  border: 1px solid rgba(99, 122, 157, 0.28);
  border-radius: 9px;
  background: rgba(5, 13, 25, 0.68);
}

.escape-game-menu__section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border-bottom: 1px solid rgba(99, 122, 157, 0.22);
  color: #dcb65f;
  background: rgba(18, 31, 51, 0.72);
}

.escape-game-menu__section-title > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(220, 182, 95, 0.42);
  border-radius: 50%;
  color: #f4d685;
  font-size: 13px;
}

.escape-game-menu__section-title h3 {
  margin: 0;
  font-family: var(--font-ui, sans-serif);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.escape-game-menu__section-title p {
  margin: 2px 0 0;
  color: #7f8da2;
  font-size: 9px;
  line-height: 1.3;
}

.escape-game-menu__characters + .escape-game-menu__section {
  margin-top: 13px;
}

.escape-game-menu__character-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 10px;
}

.escape-game-menu__character {
  display: grid;
  min-width: 0;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 6px;
  overflow: hidden;
  border: 1px solid rgba(99, 122, 157, 0.28);
  border-radius: 7px;
  color: #d9e1eb;
  background: linear-gradient(
    145deg,
    rgba(20, 33, 54, 0.84),
    rgba(7, 15, 28, 0.9)
  );
  text-align: left;
  transition:
    border-color 140ms ease,
    color 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.escape-game-menu__character:hover:not(:disabled),
.escape-game-menu__character:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(232, 194, 99, 0.74);
  color: #fff0b7;
  background: linear-gradient(
    145deg,
    rgba(64, 48, 25, 0.82),
    rgba(12, 24, 41, 0.94)
  );
  outline: none;
}

.escape-game-menu__character.is-current {
  cursor: default;
  border-color: rgba(99, 218, 146, 0.55);
  color: #c9f7da;
  background: linear-gradient(
    145deg,
    rgba(15, 75, 48, 0.48),
    rgba(7, 26, 26, 0.82)
  );
  box-shadow: 0 0 0 1px rgba(125, 239, 171, 0.06) inset;
  opacity: 1;
}

.escape-game-menu__character.is-selected {
  border-color: rgba(246, 205, 103, 0.88);
  color: #fff0b7;
  background: linear-gradient(
    145deg,
    rgba(84, 60, 22, 0.88),
    rgba(14, 28, 47, 0.96)
  );
  box-shadow:
    0 0 0 1px rgba(255, 224, 132, 0.14) inset,
    0 0 14px rgba(220, 174, 63, 0.14);
}

.escape-game-menu__character:disabled:not(.is-current) {
  cursor: wait;
  opacity: 0.5;
}

.escape-game-menu__character-portrait {
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid rgba(214, 175, 83, 0.36);
  border-radius: 6px;
  background: #07111d;
}

.escape-game-menu__character-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  transform-origin: 50% 0%;
}

.escape-game-menu__character-details {
  display: block;
  min-width: 0;
}

.escape-game-menu__character-details strong {
  display: block;
  overflow: hidden;
  color: inherit;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.escape-game-menu__character-details small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #8392a6;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.escape-game-menu__character.is-current
  .escape-game-menu__character-details
  small {
  color: #89e9ae;
}

.escape-game-menu__character.is-selected
  .escape-game-menu__character-details
  small {
  color: #f4d685;
}

.escape-game-menu__character-confirm {
  padding: 0 10px 10px;
}

.escape-game-menu__switch-character {
  width: 100%;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid rgba(214, 175, 83, 0.58);
  border-radius: 7px;
  color: #f8dda0;
  background: linear-gradient(
    180deg,
    rgba(118, 82, 24, 0.68),
    rgba(61, 41, 13, 0.7)
  );
  font-family: var(--font-ui, sans-serif);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    transform 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.escape-game-menu__switch-character:hover:not(:disabled),
.escape-game-menu__switch-character:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(247, 211, 113, 0.92);
  background: linear-gradient(
    180deg,
    rgba(145, 100, 28, 0.82),
    rgba(76, 49, 13, 0.8)
  );
  outline: none;
}

.escape-game-menu__switch-character:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.escape-game-menu__control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 13px;
  border-bottom: 1px solid rgba(99, 122, 157, 0.15);
}

.escape-game-menu__control-row strong,
.escape-game-menu__volume strong {
  display: block;
  color: #eee4cd;
  font-size: 13px;
  font-weight: 800;
}

.escape-game-menu__control-row p {
  margin: 3px 0 0;
  color: #7f8da2;
  font-size: 10px;
  line-height: 1.35;
}

.escape-game-menu__toggle {
  min-width: 82px;
  padding: 8px 12px;
  border: 1px solid rgba(112, 128, 151, 0.46);
  border-radius: 7px;
  color: #b5bfce;
  background: rgba(21, 31, 47, 0.76);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.escape-game-menu__toggle.is-on {
  border-color: rgba(65, 204, 130, 0.62);
  color: #91efb9;
  background: rgba(13, 75, 49, 0.58);
}

.escape-game-menu__toggle:hover,
.escape-game-menu__toggle:focus-visible {
  border-color: rgba(232, 194, 99, 0.72);
  color: #ffedae;
  outline: none;
}

.escape-game-menu__volume {
  display: block;
  padding: 12px 13px 14px;
}

.escape-game-menu__volume > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.escape-game-menu__volume b {
  color: #d5ad50;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.escape-game-menu__volume input {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  cursor: pointer;
  accent-color: #d7af50;
}

.escape-game-menu__save-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
  padding: 12px 13px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 9px;
  color: #bae6fd;
  background: linear-gradient(90deg, rgba(8, 47, 73, 0.72), rgba(18, 43, 64, 0.42));
}

.escape-game-menu__save-status > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(103, 232, 249, 0.5);
  border-radius: 50%;
  color: #67e8f9;
  background: rgba(8, 51, 68, 0.72);
  font-size: 10px;
}

.escape-game-menu__save-status strong {
  display: block;
  font-size: 12px;
}

.escape-game-menu__save-status p {
  margin: 3px 0 0;
  color: #87aabd;
  font-size: 10px;
  line-height: 1.35;
}

.escape-game-menu__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 13px;
}

.escape-game-menu__actions button {
  min-height: 43px;
  padding: 10px 14px;
  border-radius: 8px;
  font-family: var(--font-ui, sans-serif);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.escape-game-menu__actions button:hover:not(:disabled),
.escape-game-menu__actions button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
  outline: none;
}

.escape-game-menu__settings {
  border: 1px solid rgba(214, 175, 83, 0.52);
  color: #f3d987;
  background: linear-gradient(180deg, rgba(105, 75, 24, 0.52), rgba(54, 38, 14, 0.5));
}

.escape-game-menu__settings:hover:not(:disabled),
.escape-game-menu__settings:focus-visible:not(:disabled) {
  border-color: rgba(247, 211, 113, 0.88);
  background: linear-gradient(180deg, rgba(132, 94, 27, 0.68), rgba(70, 47, 14, 0.62));
}

.escape-game-menu__quit {
  border: 1px solid rgba(239, 68, 68, 0.46);
  color: #fecaca;
  background: linear-gradient(180deg, rgba(100, 25, 34, 0.54), rgba(58, 15, 23, 0.58));
}

.escape-game-menu__quit:hover:not(:disabled),
.escape-game-menu__quit:focus-visible:not(:disabled) {
  border-color: rgba(248, 113, 113, 0.82);
  background: linear-gradient(180deg, rgba(126, 31, 42, 0.7), rgba(77, 18, 27, 0.7));
}

.escape-game-menu__actions button:disabled {
  cursor: wait;
  opacity: 0.5;
}

@media (max-width: 620px) {
  .escape-game-menu-backdrop {
    padding: 10px;
  }

  .escape-game-menu {
    width: min(540px, calc((100vw / var(--vespera-ui-scale, 1)) - 20px));
    max-height: calc((100dvh / var(--vespera-ui-scale, 1)) - 20px);
  }

  .escape-game-menu__header {
    padding: 14px 15px;
  }

  .escape-game-menu__key-hint {
    display: none;
  }

  .escape-game-menu__body {
    padding: 12px;
  }

  .escape-game-menu__control-row {
    gap: 10px;
  }

  .escape-game-menu__character-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .escape-game-menu__actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .escape-game-menu *,
  .escape-game-menu *::before,
  .escape-game-menu *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* World Boss briefing v3.
   Reversal: set WORLD_BOSS_BRIEFING_LAYOUT_V3 to false in GameView-Bdbw4Cpc.js.
   The compatibility wrapper then falls back to display: contents and the legacy layout returns. */
.world-boss-modal-content-layout {
  display: contents;
}

.world-boss-modal-backdrop--briefing-v3 {
  background:
    radial-gradient(circle at 50% 8%, rgba(80, 128, 165, 0.24), transparent 46%),
    rgba(2, 10, 18, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.world-boss-modal-shell--briefing-v3 {
  --world-boss-v3-surface: rgba(13, 31, 49, 0.96);
  --world-boss-v3-surface-raised: rgba(18, 40, 62, 0.96);
  --world-boss-v3-surface-soft: rgba(24, 48, 71, 0.78);
  --world-boss-v3-border: rgba(148, 181, 205, 0.28);
  --world-boss-v3-border-strong: rgba(177, 207, 226, 0.42);
  --world-boss-v3-text: #f8edd8;
  --world-boss-v3-muted: #c8c5bb;
  border-color: color-mix(in srgb, var(--boss-accent, #facc15) 48%, #7da3bd);
  background:
    radial-gradient(circle at 82% 0%, color-mix(in srgb, var(--boss-accent-2, #60a5fa) 25%, transparent), transparent 34%),
    radial-gradient(circle at 8% 28%, color-mix(in srgb, var(--boss-accent, #facc15) 12%, transparent), transparent 38%),
    linear-gradient(145deg, #10263c, #0d2034 52%, #09192b);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.58),
    0 0 42px color-mix(in srgb, var(--boss-accent, #facc15) 18%, transparent),
    inset 0 0 0 1px rgba(255, 255, 255, 0.055);
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-hero {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px) auto;
  gap: 16px;
  padding: 14px 16px;
  border-bottom-color: var(--world-boss-v3-border);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--boss-accent, #facc15) 11%, transparent), transparent 52%),
    rgba(17, 38, 58, 0.72);
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-hero::before {
  opacity: 0.78;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-kicker,
.world-boss-modal-shell--briefing-v3 .world-boss-panel__title {
  font-size: 11px;
  letter-spacing: 0.16em;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-title {
  margin-top: 5px;
  color: var(--world-boss-v3-text);
  font-size: clamp(30px, 2.2vw, 38px);
  line-height: 1;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-epithet {
  margin-top: 5px;
  font-size: 13px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-copy {
  max-width: 820px;
  margin-top: 7px;
  color: var(--world-boss-v3-muted);
  font-size: 14px;
  line-height: 1.4;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-copy strong {
  color: #fff1a9;
  font-size: 1.08em;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-chips {
  gap: 6px;
  margin-top: 8px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-chips span {
  padding: 5px 8px;
  border-color: var(--world-boss-v3-border);
  background: rgba(5, 17, 29, 0.54);
  color: #e4dfd3;
  font-size: 10px;
  letter-spacing: 0.07em;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-prize {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  justify-items: start;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid color-mix(in srgb, var(--boss-accent, #facc15) 42%, var(--world-boss-v3-border));
  border-radius: 9px;
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--boss-accent, #facc15) 10%, transparent), transparent),
    rgba(7, 21, 35, 0.72);
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.025);
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-prize__icon {
  width: 62px;
  height: 62px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-prize__label {
  max-width: none;
  color: #fff0a8;
  font-size: 15px;
  line-height: 1.22;
  text-align: left;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-close {
  position: static;
  min-height: 38px;
  padding: 0 12px;
  border-color: var(--world-boss-v3-border-strong);
  background: rgba(11, 27, 43, 0.94);
  font-size: 10px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-nav {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 9px 12px 0;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-tabs {
  display: inline-grid;
  width: max-content;
  grid-template-columns: repeat(3, minmax(118px, auto));
  align-self: flex-start;
  gap: 3px;
  margin: 0;
  padding: 3px;
  border-color: var(--world-boss-v3-border);
  background: rgba(7, 20, 34, 0.72);
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-tabs button {
  min-width: 118px;
  min-height: 36px;
  padding: 8px 16px;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-tabs button.is-active {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--boss-accent, #facc15) 22%, transparent), rgba(20, 45, 68, 0.84));
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--boss-accent, #facc15) 68%, #ffffff);
}

.world-boss-auto-register-toggle {
  position: relative;
  display: inline-flex;
  min-width: 196px;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 7px 10px 7px 14px;
  border: 1px solid rgba(83, 191, 125, 0.58);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(27, 94, 59, 0.7), rgba(8, 40, 29, 0.88));
  box-shadow: inset 0 0 18px rgba(74, 222, 128, 0.08);
  color: #c8f7d5;
  font: 900 10px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
  cursor: var(--vespera-cursor-pointer);
}

.world-boss-auto-register-toggle[data-help]::after {
  content: attr(data-help) !important;
  display: block !important;
  position: absolute;
  z-index: 2147483000;
  top: calc(100% + 8px);
  right: 0;
  width: max-content;
  max-width: min(280px, calc(100vw - 32px));
  padding: 9px 11px;
  border: 1px solid rgba(121, 226, 158, 0.58);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(9, 34, 27, 0.99), rgba(3, 18, 15, 0.99));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.62);
  color: #effff3;
  font: 700 12px/1.35 var(--font-body, inherit);
  letter-spacing: 0.02em;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    visibility 120ms ease;
}

.world-boss-auto-register-toggle[data-help]:hover,
.world-boss-auto-register-toggle[data-help]:focus-visible {
  z-index: 2147483000;
}

.world-boss-auto-register-toggle[data-help]:hover::after,
.world-boss-auto-register-toggle[data-help]:focus-visible::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.world-boss-auto-register-toggle strong {
  display: grid;
  min-width: 46px;
  min-height: 26px;
  place-items: center;
  border: 1px solid rgba(157, 255, 188, 0.3);
  border-radius: 999px;
  background: rgba(2, 20, 13, 0.76);
  color: #a8d8b5;
}

.world-boss-auto-register-toggle.is-on {
  border-color: #6ee7a2;
  background: linear-gradient(180deg, rgba(30, 137, 77, 0.92), rgba(9, 70, 42, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(227, 255, 235, 0.22),
    0 0 19px rgba(74, 222, 128, 0.22);
  color: #effff3;
}

.world-boss-auto-register-toggle.is-on strong {
  border-color: rgba(217, 255, 226, 0.66);
  background: #bdf7cb;
  color: #073d20;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-content-layout {
  display: grid;
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: minmax(0, 1.42fr) minmax(360px, 0.82fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}

.world-boss-modal-shell--briefing-v3[data-world-boss-tab="selection"] .world-boss-modal-content-layout {
  display: block;
  overflow: hidden;
}

.world-boss-planner {
  height: 100%;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--world-boss-v3-border);
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 0%, rgba(53, 121, 157, 0.14), transparent 42%),
    rgba(8, 24, 39, 0.88);
  box-sizing: border-box;
}

.world-boss-planner__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.world-boss-planner__kicker {
  color: #75e6b3;
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.15em;
}

.world-boss-planner__header h3 {
  margin: 4px 0 0;
  color: #fff1d6;
  font-size: 20px;
}

.world-boss-planner__header p {
  max-width: 800px;
  margin: 4px 0 0;
  color: #c8c5bb;
  font-size: 12px;
  line-height: 1.35;
}

.world-boss-planner__count {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid rgba(110, 231, 162, 0.38);
  border-radius: 7px;
  background: rgba(10, 67, 43, 0.54);
  color: #bff7d0;
  font-size: 11px;
  letter-spacing: 0.08em;
}

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

.world-boss-planner-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 264px;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(148, 181, 205, 0.25);
  border-radius: 8px;
  background: linear-gradient(155deg, rgba(23, 49, 72, 0.96), rgba(7, 22, 36, 0.98));
  color: #e8e4db;
  text-align: left;
  cursor: var(--vespera-cursor-pointer);
}

.world-boss-planner-card:hover,
.world-boss-planner-card:focus-visible {
  border-color: color-mix(in srgb, var(--boss-accent, #facc15) 60%, #9dc7df);
  outline: none;
  transform: translateY(-1px);
}

.world-boss-planner-card.is-selected {
  border-color: #6ee7a2;
  background:
    linear-gradient(155deg, rgba(25, 88, 60, 0.92), rgba(7, 32, 27, 0.98));
  box-shadow: inset 0 0 0 1px rgba(110, 231, 162, 0.18);
}

.world-boss-planner-card.is-disabled {
  opacity: 0.66;
  cursor: default;
}

.world-boss-planner[aria-busy="true"] .world-boss-planner-card {
  cursor: wait;
  opacity: 0.76;
}

.world-boss-planner-card__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: #b8c8d4;
  font: 900 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.12em;
}

.world-boss-planner-card__status {
  color: #b8c8d4;
}

.world-boss-planner-card__status--selected,
.world-boss-planner-card__status--registered {
  color: #8ff0b3;
}

.world-boss-planner-card__status--missed {
  color: #e6a0a0;
}

.world-boss-planner-card__time {
  color: #ffe9a8;
  font-size: 11px;
}

.world-boss-planner-card__boss {
  display: grid;
  min-width: 0;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.world-boss-planner-card__portrait {
  width: 54px;
  height: 54px;
  border: 1px solid rgba(223, 196, 130, 0.35);
  border-radius: 7px;
  object-fit: cover;
}

.world-boss-planner-card__boss strong,
.world-boss-planner-card__boss span,
.world-boss-planner-card__loot strong,
.world-boss-planner-card__loot small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.world-boss-planner-card__boss strong {
  color: #fff1d6;
  font-size: 13px;
  white-space: nowrap;
}

.world-boss-planner-card__boss span {
  margin-top: 3px;
  color: #aebac3;
  font-size: 9px;
  white-space: nowrap;
}

.world-boss-planner-card__loot {
  display: grid;
  min-width: 0;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  border: 1px solid rgba(246, 205, 100, 0.26);
  border-radius: 7px;
  background: rgba(5, 16, 29, 0.7);
}

.world-boss-planner-card__loot img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.world-boss-planner-card__loot span {
  color: #d8b867;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.world-boss-planner-card__loot strong {
  margin-top: 3px;
  color: #fff0ae;
  font-size: 12px;
  line-height: 1.15;
}

.world-boss-planner-card__loot small {
  margin-top: 4px;
  color: #b9c1c6;
  font-size: 9px;
  white-space: nowrap;
}

.world-boss-planner-card__action {
  display: grid;
  min-height: 28px;
  margin-top: auto;
  place-items: center;
  border: 1px solid rgba(148, 181, 205, 0.2);
  border-radius: 5px;
  background: rgba(5, 16, 28, 0.65);
  color: #c6d2d9;
  font: 800 9px/1 var(--font-ui, inherit);
  letter-spacing: 0.04em;
}

.world-boss-planner-card.is-selected .world-boss-planner-card__action {
  border-color: rgba(110, 231, 162, 0.38);
  color: #bff7d0;
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-scroll,
.world-boss-modal-shell--briefing-v3 .world-boss-modal-grid {
  display: contents;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-panel,
.world-boss-modal-shell--briefing-v3 .world-boss-result-panel,
.world-boss-modal-shell--briefing-v3 .world-boss-panel,
.world-boss-modal-shell--briefing-v3 .world-boss-performance-details {
  margin: 0;
  border-color: var(--world-boss-v3-border);
  background:
    linear-gradient(145deg, rgba(51, 82, 105, 0.12), transparent 42%),
    var(--world-boss-v3-surface);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.025),
    0 10px 28px rgba(0, 0, 0, 0.16);
}

.world-boss-modal-shell--briefing-v3[data-world-boss-tab="prepare"] .world-boss-war-chest-panel {
  grid-column: 1;
  grid-row: 1;
}

.world-boss-modal-shell--briefing-v3[data-world-boss-tab="prepare"] .world-boss-panel--abilities {
  grid-column: 2;
  grid-row: 1;
}

.world-boss-modal-shell--briefing-v3 .world-boss-result-panel {
  grid-column: 1;
  grid-row: 2;
}

.world-boss-modal-shell--briefing-v3 .world-boss-performance-details {
  grid-column: 2;
  grid-row: 2;
}

.world-boss-modal-shell--briefing-v3[data-world-boss-tab="rewards"] .world-boss-modal-content-layout {
  grid-template-columns: minmax(360px, 0.86fr) minmax(0, 1.14fr);
}

.world-boss-modal-shell--briefing-v3[data-world-boss-tab="rewards"] .world-boss-panel--gear {
  grid-column: 1;
  grid-row: 1;
}

.world-boss-modal-shell--briefing-v3[data-world-boss-tab="rewards"] .world-boss-panel--drops {
  grid-column: 2;
  grid-row: 1;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-panel,
.world-boss-modal-shell--briefing-v3 .world-boss-panel--abilities,
.world-boss-modal-shell--briefing-v3 .world-boss-panel--gear,
.world-boss-modal-shell--briefing-v3 .world-boss-panel--drops {
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-panel {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  padding: 16px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-panel__header {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--world-boss-v3-border);
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-panel__round {
  color: var(--world-boss-v3-muted);
  font-size: 11px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-meter {
  margin-top: 11px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-meter__topline,
.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-lane__topline {
  font-size: 12px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-meter__stats,
.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-lane__footer {
  color: var(--world-boss-v3-muted);
  font-size: 12px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-meter__lanes {
  gap: 10px;
  margin-top: 11px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-lane {
  padding: 11px 12px;
  border-color: rgba(117, 177, 219, 0.42);
  background: linear-gradient(135deg, rgba(48, 102, 142, 0.2), rgba(10, 27, 43, 0.82));
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-lane--sustain {
  border-color: rgba(91, 195, 129, 0.42);
  background: linear-gradient(135deg, rgba(40, 128, 75, 0.2), rgba(10, 27, 43, 0.82));
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-panel__cap-note {
  margin-top: 10px;
  padding: 8px 10px;
  color: #d7d1c3;
  font-size: 12px;
  line-height: 1.45;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-panel__empty {
  align-self: start;
  margin-top: 10px;
  padding: 13px;
  border-color: rgba(199, 215, 226, 0.22);
  background: rgba(18, 40, 61, 0.58);
  color: #d8d4c9;
  font-size: 14px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-list {
  flex: 1 1 auto;
  max-height: none;
  min-height: 0;
  gap: 8px;
  margin-top: 10px;
  overflow-y: auto;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-row {
  padding: 9px;
  border-color: rgba(197, 216, 229, 0.18);
  background: rgba(18, 40, 61, 0.72);
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-row__copy strong {
  font-size: 14px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-war-chest-row__copy span {
  font-size: 11px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-panel {
  padding: 16px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-panel--abilities,
.world-boss-modal-shell--briefing-v3 .world-boss-panel--gear,
.world-boss-modal-shell--briefing-v3 .world-boss-panel--drops {
  display: flex;
  flex-direction: column;
}

.world-boss-modal-shell--briefing-v3 .world-boss-ability-list {
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-ability-card {
  grid-template-columns: 62px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 11px;
  border-color: rgba(189, 211, 225, 0.2);
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--boss-accent-2, #60a5fa) 12%, transparent), transparent),
    var(--world-boss-v3-surface-raised);
}

.world-boss-modal-shell--briefing-v3 .world-boss-ability-card__sigil {
  width: 36px;
  height: 36px;
  font-size: 12px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-ability-card__icon-frame {
  width: 58px;
  height: 58px;
  border-radius: 10px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-ability-card__number {
  right: 3px;
  bottom: 3px;
  min-width: 18px;
  height: 18px;
  font-size: 9px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-ability-card__name,
.world-boss-modal-shell--briefing-v3 .world-boss-gear-card__name,
.world-boss-modal-shell--briefing-v3 .world-boss-drop-row__name {
  color: var(--world-boss-v3-text);
  font-size: 16px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-ability-card__text,
.world-boss-modal-shell--briefing-v3 .world-boss-gear-card__rule,
.world-boss-modal-shell--briefing-v3 .world-boss-drop-row__meta {
  color: var(--world-boss-v3-muted);
  font-size: 12px;
  line-height: 1.35;
}

.world-boss-modal-shell--briefing-v3 .world-boss-ability-card__counter {
  margin-top: 5px;
  color: color-mix(in srgb, var(--boss-accent-2, #60a5fa) 60%, #f6ead3);
  font-size: 12px;
  line-height: 1.35;
}

.world-boss-modal-shell--briefing-v3 .world-boss-result-panel {
  padding: 12px 14px;
  background:
    linear-gradient(135deg, rgba(43, 124, 78, 0.2), transparent 46%),
    var(--world-boss-v3-surface);
}

.world-boss-modal-shell--briefing-v3 .world-boss-result-panel__summary {
  margin-top: 6px;
  color: #e5dfd1;
  font-size: 12px;
  line-height: 1.35;
}

.world-boss-modal-shell--briefing-v3 .world-boss-result-cache {
  grid-template-columns: minmax(155px, auto) minmax(0, 1fr) auto;
  gap: 7px 12px;
  margin-top: 8px;
  padding: 9px 10px;
  border-color: rgba(112, 176, 224, 0.4);
  background: rgba(18, 48, 75, 0.72);
}

.world-boss-modal-shell--briefing-v3 .world-boss-result-cache__header {
  grid-column: 1;
  grid-row: 1;
  font-size: 10px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-result-cache p {
  grid-column: 2;
  grid-row: 1;
  overflow: hidden;
  color: #cfcbc0;
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.world-boss-modal-shell--briefing-v3 .world-boss-result-cache__contents {
  grid-column: 1 / 3;
  grid-row: 2;
}

.world-boss-modal-shell--briefing-v3 .world-boss-result-cache__open {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: end;
  width: auto;
  min-width: 150px;
  min-height: 36px;
  padding: 8px 12px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-performance-details {
  align-self: start;
  overflow: hidden;
}

.world-boss-modal-shell--briefing-v3 .world-boss-performance-details > summary {
  min-height: 42px;
  padding: 10px 12px;
  background: rgba(21, 43, 64, 0.76);
}

.world-boss-modal-shell--briefing-v3 .world-boss-performance-details > summary strong {
  font-size: 11px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-performance-details > summary span {
  color: var(--world-boss-v3-muted);
  font-size: 11px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-performance-details .world-boss-result-grid {
  gap: 8px;
  padding: 0 10px 10px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-result-row {
  padding: 5px 7px;
  font-size: 11px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-gear-card {
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 13px;
  margin-top: 12px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-gear-card__icon {
  width: 82px;
  height: 82px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 13px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-stat {
  padding: 10px;
  background: rgba(24, 49, 73, 0.72);
}

.world-boss-modal-shell--briefing-v3 .world-boss-stat span {
  color: var(--world-boss-v3-muted);
  font-size: 10px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-stat strong {
  margin-top: 6px;
  font-size: 16px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-drop-list {
  min-height: 0;
  flex: 1 1 auto;
  gap: 7px;
  margin-top: 11px;
  padding-right: 4px;
  overflow-y: auto;
}

.world-boss-modal-shell--briefing-v3 .world-boss-drop-row {
  padding: 9px;
  border-color: color-mix(in srgb, var(--drop-rarity-border) 72%, var(--world-boss-v3-border));
  background: var(--drop-rarity-bg, rgba(19, 40, 61, 0.78));
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-footer {
  min-height: 56px;
  padding: 9px 12px;
  border-top-color: var(--world-boss-v3-border);
  background: rgba(8, 23, 37, 0.94);
}

.world-boss-modal-shell--briefing-v3 .world-boss-modal-footer__note {
  color: #cbc8bf;
  font-size: 12px;
}

.world-boss-modal-shell--briefing-v3 .world-boss-join-button {
  width: auto;
  min-width: 188px;
  min-height: 38px;
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 10px;
}

@media (max-height: 760px) and (min-width: 1051px) {
  .world-boss-modal-shell--briefing-v3 .world-boss-modal-hero {
    gap: 10px;
    padding: 9px 12px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-title {
    font-size: 27px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-copy {
    margin-top: 4px;
    font-size: 12px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-chips {
    margin-top: 5px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-chips span {
    padding: 3px 6px;
    font-size: 9px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-prize {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 6px 8px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-prize__icon {
    width: 48px;
    height: 48px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-content-layout {
    gap: 8px;
    padding: 8px;
  }

  .world-boss-planner {
    padding: 9px;
  }

  .world-boss-planner__header {
    margin-bottom: 7px;
  }

  .world-boss-planner-card {
    min-height: 226px;
    gap: 5px;
    padding: 7px;
  }

  .world-boss-planner-card__boss {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .world-boss-planner-card__portrait {
    width: 42px;
    height: 42px;
  }

  .world-boss-planner-card__loot {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 5px;
  }

  .world-boss-planner-card__loot img {
    width: 40px;
    height: 40px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-war-chest-panel,
  .world-boss-modal-shell--briefing-v3 .world-boss-panel {
    padding: 10px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-ability-list {
    gap: 7px;
    margin-top: 7px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-ability-card {
    padding: 7px;
  }
}

@media (max-width: 1050px) {
  .world-boss-modal-shell--briefing-v3 .world-boss-modal-hero {
    grid-template-columns: minmax(0, 1fr) 160px auto;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-prize {
    grid-template-columns: 48px minmax(0, 1fr);
    padding: 7px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-prize__icon {
    width: 48px;
    height: 48px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-content-layout {
    display: block;
    min-height: 0;
    padding: 10px;
    overflow-y: auto;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-nav {
    flex-wrap: wrap;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-tabs {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .world-boss-auto-register-toggle {
    width: 100%;
  }

  .world-boss-modal-shell--briefing-v3[data-world-boss-tab="selection"] .world-boss-modal-content-layout {
    overflow-y: auto;
  }

  .world-boss-planner {
    height: auto;
  }

  .world-boss-planner__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-scroll {
    display: block;
    overflow: visible;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-modal-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 0;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-war-chest-panel,
  .world-boss-modal-shell--briefing-v3 .world-boss-result-panel,
  .world-boss-modal-shell--briefing-v3 .world-boss-panel,
  .world-boss-modal-shell--briefing-v3 .world-boss-performance-details {
    width: 100%;
    height: auto;
    margin: 0 0 10px;
  }

  .world-boss-modal-shell--briefing-v3 .world-boss-ability-list {
    grid-template-rows: none;
  }
}

@media (max-width: 680px) {
  .world-boss-war-chest-battles__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .world-boss-war-chest-battles__header span {
    text-align: left;
  }

  .world-boss-war-chest-battles__tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .world-boss-planner__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .world-boss-planner__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Player card: replace duplicate class-effect icons with one equal utility row. */
.sidebar-character-card.scc2 .scc2-utility-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 6px;
  margin-top: 3px;
}

.sidebar-character-card.scc2 .scc2-utility-row .scc2-utility-tile {
  position: relative;
  inset: auto;
  display: grid;
  width: 100%;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0 2px;
  place-items: center;
  border-radius: 6px;
  box-sizing: border-box;
  overflow: hidden;
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-combat-automation-button {
  top: auto;
  left: auto;
  font-size: 8px;
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-damage-report-button {
  top: auto;
  left: auto;
  font-size: 8px;
}

.sidebar-character-card.scc2 .scc2-utility-row .scc2-stats-chip {
  top: auto;
  right: auto;
  z-index: 1;
  border-color: rgba(121, 199, 255, 0.56);
  background:
    radial-gradient(circle at 50% 0%, rgba(121, 199, 255, 0.24), transparent 68%),
    linear-gradient(150deg, rgba(8, 35, 52, 0.98), rgba(4, 10, 18, 0.98));
  cursor: var(--vespera-cursor-pointer);
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-stats-chip:hover,
.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-stats-chip:focus-visible {
  border-color: rgba(165, 243, 252, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 16px rgba(56, 189, 248, 0.48);
  outline: none;
  transform: translateY(-1px);
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-stats-label {
  max-width: 100%;
  overflow: hidden;
  font-size: 7px;
  letter-spacing: 0.06em;
  text-overflow: clip;
  white-space: nowrap;
}

.sidebar-character-card.scc2 .scc2-utility-row .scc2-level {
  top: auto;
  right: auto;
  min-width: 0;
  padding: 3px 2px;
  align-content: center;
  border: 1px solid rgba(217, 184, 129, 0.6);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 231, 168, 0.18), transparent 64%),
    linear-gradient(150deg, rgba(35, 26, 20, 0.98), rgba(5, 10, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 205, 0.14),
    0 5px 13px rgba(0, 0, 0, 0.52);
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-level:focus-visible {
  border-color: rgba(255, 224, 145, 0.96);
  box-shadow:
    inset 0 1px 0 rgba(255, 249, 220, 0.2),
    0 0 16px rgba(217, 184, 129, 0.4);
  outline: none;
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-level-label {
  font-size: 6px;
  letter-spacing: 0.07em;
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-level-num {
  font-size: 13px;
  line-height: 1;
}

.zone-themed-sidebar
  .sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-utility-tile {
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 2px !important;
  border-radius: 6px !important;
}

.zone-themed-sidebar
  .sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-level-num {
  font-size: 13px !important;
}

.zone-themed-sidebar
  .sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-stats-label {
  font-size: 7px !important;
}

.sidebar-character-card.scc2 .scc2-utility-row .scc2-utility-tile {
  border: 1px solid rgba(217, 184, 129, 0.62);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 231, 168, 0.2), transparent 55%),
    linear-gradient(150deg, rgba(32, 25, 31, 0.98), rgba(5, 10, 18, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 205, 0.18),
    0 5px 13px rgba(0, 0, 0, 0.52),
    0 0 12px rgba(217, 184, 129, 0.18);
  color: #ffe7a8 !important;
  font-family: var(--font-ui, sans-serif) !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-shadow: 0 0 8px rgba(217, 184, 129, 0.52) !important;
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-utility-tile
  > * {
  color: #ffe7a8 !important;
  font-family: var(--font-ui, sans-serif) !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-shadow: 0 0 8px rgba(217, 184, 129, 0.52) !important;
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-utility-tile:hover,
.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-utility-tile:focus-visible,
.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-utility-tile.is-open,
.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-combat-automation-button.is-auto-combat-on {
  border-color: rgba(255, 224, 145, 0.95);
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 231, 168, 0.27), transparent 58%),
    linear-gradient(150deg, rgba(39, 30, 34, 0.98), rgba(7, 12, 20, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 249, 220, 0.25),
    0 7px 18px rgba(0, 0, 0, 0.68),
    0 0 17px rgba(217, 184, 129, 0.38);
  color: #fff4cf;
  text-shadow: 0 0 8px rgba(217, 184, 129, 0.62);
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-combat-automation-button.is-auto-combat-on,
.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-combat-automation-button.is-auto-combat-on:hover,
.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-combat-automation-button.is-auto-combat-on:focus-visible,
.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-combat-automation-button.is-auto-combat-on.is-open {
  border-color: rgba(74, 222, 128, 0.96) !important;
  background:
    radial-gradient(circle at 50% 18%, rgba(134, 239, 172, 0.26), transparent 58%),
    linear-gradient(150deg, rgba(13, 54, 39, 0.98), rgba(3, 20, 15, 0.98)) !important;
  box-shadow:
    inset 0 1px 0 rgba(220, 252, 231, 0.22),
    0 7px 18px rgba(0, 0, 0, 0.66),
    0 0 8px rgba(74, 222, 128, 0.9),
    0 0 20px rgba(34, 197, 94, 0.48) !important;
  color: #bbf7d0 !important;
  text-shadow: 0 0 9px rgba(74, 222, 128, 0.86) !important;
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-utility-tile:hover
  > *,
.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-utility-tile:focus-visible
  > *,
.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-utility-tile.is-open
  > * {
  color: #fff4cf !important;
}

.sidebar-character-card.scc2
  .scc2-utility-row
  .scc2-damage-report-button::after {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-character-card.scc2 .scc2-utility-row .scc2-utility-tile {
    transition: none !important;
  }
}

/* Settings: keep the essential game actions first, prominent, and distinct. */
main[data-tutorial-page="settings"] {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

main[data-tutorial-page="settings"] > .relative.z-10,
main[data-tutorial-page="settings"]
  > .relative.z-10
  > .relative.opacity-100 {
  width: 100%;
  min-width: 0;
}

.settings-page-layout {
  box-sizing: border-box;
  width: min(100%, 56rem);
  max-width: 56rem;
  margin-inline: auto;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.settings-page-layout > * {
  order: 2;
}

.settings-page-layout > .settings-page-title {
  order: 0;
}

.settings-page-layout > .settings-game-panel {
  order: 1;
}

.settings-game-panel {
  border-color: rgba(217, 184, 129, 0.56) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 184, 129, 0.14), transparent 42%),
    linear-gradient(145deg, rgba(15, 23, 36, 0.94), rgba(4, 10, 18, 0.96)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 245, 205, 0.11),
    0 12px 30px rgba(0, 0, 0, 0.26);
}

.settings-game-action {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.025em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 8px 18px rgba(0, 0, 0, 0.32);
  transition:
    transform 150ms ease,
    filter 150ms ease,
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.settings-game-action--character {
  color: #fff0b8 !important;
  border-color: rgba(245, 196, 85, 0.86) !important;
  background: linear-gradient(145deg, rgba(137, 89, 20, 0.98), rgba(66, 42, 11, 0.98)) !important;
}

.settings-game-action--discord {
  color: #ffffff !important;
  border-color: rgba(158, 171, 255, 0.94) !important;
  background: linear-gradient(145deg, #6571f5, #3c45ad) !important;
}

.settings-game-action--quit {
  color: #ffe4e6 !important;
  border-color: rgba(248, 113, 113, 0.88) !important;
  background: linear-gradient(145deg, rgba(153, 27, 27, 0.98), rgba(69, 10, 10, 0.98)) !important;
}

.settings-game-action:hover {
  filter: brightness(1.14);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 11px 24px rgba(0, 0, 0, 0.38);
}

.settings-game-action:focus-visible {
  outline: 2px solid #ffe29a;
  outline-offset: 3px;
}

.settings-game-action:disabled {
  filter: grayscale(0.3);
  transform: none;
}

.settings-game-utilities {
  align-items: stretch;
}

.settings-window-mode,
.settings-release-info {
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.settings-window-mode__button {
  min-width: 0;
  min-height: 42px;
}

.settings-release-info dl {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
}

.settings-release-info dd {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 639px) {
  .settings-game-utilities {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .settings-game-action {
    transition: none;
  }

  .settings-game-action:hover {
    transform: none;
  }
}

/* Cross-platform in-game select: avoids Chromium/OS popup failures on Linux and Proton. */
.vespera-select {
  position: relative;
  min-width: 0;
  width: 100%;
}

.vespera-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(207, 167, 88, 0.28);
  border-radius: 4px;
  outline: none;
  background: rgba(3, 10, 20, 0.9);
  color: rgba(245, 240, 232, 0.94);
  font: 700 12px/1.25 var(--font-body, sans-serif);
  text-align: left;
  cursor: pointer;
}

.vespera-select__trigger:hover:not(:disabled),
.vespera-select__trigger:focus-visible,
.vespera-select__trigger[aria-expanded="true"] {
  border-color: rgba(229, 190, 105, 0.68);
  box-shadow:
    0 0 0 2px rgba(222, 180, 97, 0.09),
    0 8px 20px rgba(0, 0, 0, 0.24);
}

.vespera-select__trigger:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.vespera-select__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vespera-select__chevron {
  flex: 0 0 auto;
  color: rgba(239, 195, 105, 0.88);
  font: 900 16px/1 var(--font-ui, sans-serif);
  transition: transform 120ms ease;
}

.vespera-select__trigger[aria-expanded="true"] .vespera-select__chevron {
  transform: rotate(180deg);
}

.vespera-select__menu {
  position: fixed;
  z-index: 2147483647;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid rgba(222, 180, 97, 0.58);
  border-radius: 6px;
  background:
    linear-gradient(180deg, rgba(14, 25, 42, 0.995), rgba(3, 9, 18, 0.998));
  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.78),
    inset 0 1px 0 rgba(255, 239, 197, 0.09);
  color: #f1e9da;
  scrollbar-color: rgba(203, 163, 91, 0.58) rgba(3, 8, 16, 0.9);
}

.vespera-select__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: rgba(238, 230, 213, 0.92);
  font: 700 12px/1.25 var(--font-body, sans-serif);
  text-align: left;
}

.vespera-select__option:hover:not(:disabled),
.vespera-select__option:focus-visible:not(:disabled),
.vespera-select__option.is-selected {
  outline: none;
  border-color: rgba(222, 180, 97, 0.42);
  background: rgba(81, 57, 98, 0.43);
  color: #f6d990;
}

.vespera-select__option:disabled {
  cursor: not-allowed;
  opacity: 0.36;
}

.vespera-select__check {
  flex: 0 0 auto;
  color: #80e7c2;
  font-weight: 900;
}

@media (prefers-reduced-motion: reduce) {
  .vespera-select__chevron {
    transition: none;
  }
}

.ui-scale-menu-wrap > .ui-scale-menu-arrow {
  display: none;
}

.gem-picker-family-rule {
  margin-bottom: 12px;
  padding: 9px 11px;
  border: 1px solid rgba(218, 164, 75, 0.42);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(76, 47, 20, 0.42), rgba(27, 20, 35, 0.58));
  color: rgba(244, 219, 160, 0.94);
  font: 700 12px/1.45 var(--font-body, sans-serif);
}

.gem-picker-option-wrap {
  min-width: 0;
}

.gem-picker-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(109, 116, 136, 0.72);
  border-radius: 8px;
  background: rgba(31, 41, 55, 0.32);
  color: inherit;
  text-align: left;
  transition:
    background-color 120ms ease,
    border-color 120ms ease;
}

.gem-picker-option:hover:not(:disabled),
.gem-picker-option:focus-visible:not(:disabled) {
  outline: none;
  border-color: rgba(168, 112, 211, 0.86);
  background: rgba(55, 65, 81, 0.52);
}

.gem-picker-option__icon {
  flex: 0 0 auto;
}

.gem-picker-option__body {
  flex: 1 1 auto;
  min-width: 0;
}

.gem-picker-option--blocked {
  cursor: not-allowed;
  border-color: rgba(196, 105, 73, 0.5);
  background:
    linear-gradient(135deg, rgba(73, 28, 28, 0.34), rgba(24, 22, 31, 0.5));
  opacity: 0.68;
}

.gem-picker-option--blocked .gem-picker-option__icon {
  filter: grayscale(0.78);
  opacity: 0.64;
}

.gem-picker-family-limit {
  margin-top: 5px;
  color: rgba(255, 184, 137, 0.98);
  font: 800 11px/1.35 var(--font-body, sans-serif);
}

@media (prefers-reduced-motion: reduce) {
  .gem-picker-option {
    transition: none;
  }
}

/* Compact Celestial Forge header: keep its controls beside the title and surface masteries immediately. */
.celestial-forge-tab {
  min-height: 0;
  padding: clamp(0.65rem, 0.9vw, 0.9rem);
}

.celestial-forge-crucible {
  min-height: 0;
  padding: 0.65rem 0.8rem;
}

.celestial-forge-crucible__glow {
  inset: auto 28% -1.4rem 28%;
  height: 4rem;
}

.celestial-forge-crucible__content {
  display: grid;
  grid-template-columns: minmax(11rem, 0.42fr) minmax(0, 1.58fr);
  gap: clamp(0.65rem, 1vw, 1rem);
}

.celestial-forge-crucible__copy {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  max-width: none;
}

.celestial-forge-crucible__kicker {
  display: none;
}

.celestial-forge-crucible__title {
  margin-top: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1;
  white-space: nowrap;
}

.celestial-forge-crucible__controls {
  grid-template-columns: minmax(13rem, 1.25fr) minmax(10.5rem, 0.85fr) minmax(9.5rem, 0.7fr);
  align-items: stretch;
  width: 100%;
  gap: 0.5rem;
}

.celestial-forge-crucible__counter {
  grid-template-columns: 3rem minmax(0, 1fr);
  min-height: 4rem;
  padding: 0.5rem 0.65rem;
}

.celestial-forge-crucible__flame {
  width: 2.75rem;
  height: 2.75rem;
}

.celestial-forge-crucible__numbers strong {
  font-size: clamp(1.3rem, 1.7vw, 1.65rem);
}

.celestial-forge-crucible__tier {
  min-height: 4rem;
  padding: 0.5rem 0.65rem;
}

.celestial-forge-crucible__tier-head > span:first-child strong {
  font-size: 1.5rem;
}

.celestial-forge-crucible__tier-head strong {
  font-size: 1.25rem;
}

.celestial-forge-unmake-button {
  min-height: 4rem;
}

@media (max-width: 1180px) {
  .celestial-forge-crucible__content {
    grid-template-columns: 1fr;
  }

  .celestial-forge-crucible__controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .celestial-forge-unmake-button {
    grid-column: 1 / -1;
    min-height: 2.75rem;
  }
}

@media (max-width: 980px) {
  .celestial-forge-branches {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .celestial-forge-crucible__copy {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
  }

  .celestial-forge-crucible__controls {
    grid-template-columns: 1fr;
  }

  .celestial-forge-unmake-button {
    grid-column: auto;
  }
}

/* Frontier inline combat: preserve the full route map above the live encounter. */
.frontier-region-expedition.frontier-page-shell--open.frontier-page-shell--combat-active {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.frontier-page-shell--combat-active .frontier-stage-rail,
.frontier-inline-combat-panel {
  flex: 0 0 auto;
  align-self: stretch;
}

main:has(.frontier-page-shell--combat-active) {
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.frontier-inline-combat-panel {
  display: block !important;
  grid-column: 1 / -1 !important;
  box-sizing: border-box;
  flex: 0 0 calc(100% - 16px) !important;
  align-self: stretch !important;
  width: calc(100% - 16px) !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: clamp(820px, calc(100dvh - 72px), 1060px) !important;
  height: auto !important;
  margin: 12px 8px 20px;
  overflow: visible !important;
  border: 1px solid rgba(214, 169, 79, 0.28);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 0%, rgba(214, 169, 79, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(7, 14, 24, 0.98), rgba(3, 7, 13, 0.99));
  box-shadow:
    0 20px 46px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 232, 176, 0.04);
}

.frontier-inline-combat-panel > .combat-screen-root--embedded,
.frontier-inline-combat-panel .combat-screen-layout,
.frontier-inline-combat-panel .combat-screen-field-column,
.frontier-inline-combat-panel .combat-screen-fight-card,
.frontier-inline-combat-panel .combat-screen-fight-field,
.frontier-inline-combat-panel .combat-stage-shell {
  box-sizing: border-box !important;
  align-self: stretch !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 100%;
  height: auto;
  overflow: visible !important;
}

.frontier-inline-combat-panel .combat-screen-feed-dock {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.frontier-inline-combat-panel .combat-screen-info-body {
  overflow-y: auto;
  overscroll-behavior: contain;
}

@media (min-width: 1181px) {
  .frontier-region-expedition.frontier-page-shell--open.frontier-page-shell--combat-active > .frontier-stage-rail {
    position: relative !important;
    inset: auto !important;
    height: calc(100dvh - 9.75rem) !important;
    min-height: calc(100dvh - 9.75rem) !important;
    max-height: calc(100dvh - 9.75rem) !important;
    flex: none;
  }
}

@media (min-width: 1024px) {
  .frontier-inline-combat-panel > .combat-screen-root--embedded {
    display: flex !important;
    flex: 1 1 auto !important;
  }

  .frontier-inline-combat-panel .combat-screen-layout,
  .frontier-inline-combat-panel .combat-screen-fight-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) !important;
    grid-template-rows: minmax(420px, 1fr) minmax(300px, auto) !important;
    gap: 0.75rem !important;
    min-height: inherit !important;
  }

  .frontier-inline-combat-panel .combat-screen-field-column {
    grid-column: 1 / -1 !important;
    grid-row: 1 / -1 !important;
    width: 100%;
  }

  .frontier-inline-combat-panel .combat-stage-shell {
    grid-column: 1 / -1;
    grid-row: 1;
    min-height: 420px !important;
    height: auto !important;
  }

  .frontier-inline-combat-panel .combat-screen-hud-dock {
    position: relative;
    left: auto;
    bottom: auto;
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: auto;
    min-height: 300px;
  }

  .frontier-inline-combat-panel .combat-screen-feed-dock {
    position: relative;
    inset: auto;
    right: auto;
    bottom: auto;
    z-index: 70;
    grid-column: 2;
    grid-row: 2;
    width: min(520px, 100%);
    height: var(--tower-combat-info-height, 289px);
    min-height: var(--tower-combat-info-height, 289px);
    max-height: var(--tower-combat-info-height, 289px);
    margin-top: var(--tower-combat-info-offset, 0.7rem);
    align-self: start;
    overflow: hidden;
  }
}

/* Frontier fight clarity: green means enter combat; red is reserved for Stop. */
.frontier-region-expedition.frontier-page-shell--open
  .frontier-fight-button:not(.frontier-fight-button--stop):not(:disabled) {
  border-color: rgba(126, 244, 181, 0.78) !important;
  background:
    linear-gradient(180deg, rgba(38, 151, 96, 0.98), rgba(10, 75, 53, 0.99)) !important;
  color: #effff6 !important;
  box-shadow:
    inset 0 1px 0 rgba(210, 255, 229, 0.24),
    0 0 0 1px rgba(0, 0, 0, 0.42),
    0 12px 25px rgba(11, 104, 69, 0.3) !important;
}

.frontier-region-expedition.frontier-page-shell--open
  .frontier-fight-button:not(.frontier-fight-button--stop):not(:disabled):hover {
  border-color: rgba(181, 255, 215, 0.94) !important;
  background:
    linear-gradient(180deg, rgba(52, 183, 117, 0.99), rgba(13, 91, 63, 0.99)) !important;
  box-shadow:
    inset 0 1px 0 rgba(226, 255, 239, 0.3),
    0 0 0 1px rgba(0, 0, 0, 0.46),
    0 0 24px rgba(53, 200, 130, 0.34) !important;
}

.frontier-region-expedition.frontier-page-shell--open
  .frontier-fight-button--stop:not(:disabled) {
  border-color: rgba(244, 150, 126, 0.7) !important;
  background:
    linear-gradient(180deg, rgba(166, 47, 40, 0.98), rgba(78, 16, 20, 0.99)) !important;
  color: #fff0e8 !important;
}

.frontier-region-expedition.frontier-page-shell--open
  .frontier-combat-blocked-message {
  display: flex;
  align-items: flex-start;
  gap: 0.42rem;
  border-color: rgba(242, 176, 84, 0.58);
  background:
    linear-gradient(180deg, rgba(88, 51, 16, 0.9), rgba(37, 23, 12, 0.94));
  color: #ffe3a8;
  font-weight: 750;
  line-height: 1.35;
}

.frontier-region-expedition.frontier-page-shell--open
  .frontier-combat-blocked-message::before {
  content: "⚠";
  flex: 0 0 auto;
  color: #ffc761;
  font-size: 0.78rem;
  line-height: 1.1;
}

/* Character portraits: keep the frame inside the card and crop game art to a face-and-chest bust. */
.sidebar-character-card.scc2 {
  box-sizing: border-box;
  border-color: transparent !important;
}

.sidebar-character-card.scc2::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 20;
  box-sizing: border-box;
  border: 1px solid color-mix(in srgb, var(--scc2-class, #d9b881) 72%, #f6e7bd);
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(2, 6, 12, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.sidebar-character-card.scc2 .scc2-hero {
  box-sizing: border-box;
  overflow: hidden !important;
}

.sidebar-character-card.scc2 .scc2-hero-art--class,
.sidebar-character-card.scc2 .scc2-hero-art--subclass-alternate {
  object-position: 50% 0%;
  transform: scale(1.85);
  transform-origin: 50% 15%;
}

.dungeon-combat-screen
  .dungeon-combat-player-portrait
  img.dungeon-combat-player-portrait--art {
  object-position: 50% 0% !important;
  transform: scale(1.85);
  transform-origin: 50% 15%;
}

.dungeon-combat-screen
  .dungeon-combat-player-portrait
  img.dungeon-combat-player-portrait--custom {
  object-position: 50% 50% !important;
  transform: none;
}

.combat-screen-player-art > img.combat-player-portrait--art {
  object-position: 50% 0% !important;
  transform: scale(1.85);
  transform-origin: 50% 15%;
}

.combat-screen-player-art > img.combat-player-portrait--custom {
  object-position: 50% 50% !important;
  transform: none;
}

/* Crownroad Caravans: own only the space beneath the Event Calendar back
   button and respond to the page's real width beside the character rail. */
.caravan-page {
  min-width: 0;
  max-width: 100%;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  container-name: caravan-page;
  container-type: inline-size;
}

.caravan-page-header {
  flex-wrap: wrap;
}

.caravan-page-header > div:first-child,
.caravan-mine-layout > *,
.caravan-active-card,
.caravan-dispatch-card,
.caravan-ledger,
.caravan-raid-board,
.caravan-reports,
.caravan-manifest-preview,
.caravan-manifest-legendary {
  min-width: 0;
}

.caravan-page h1,
.caravan-page h2,
.caravan-page h3,
.caravan-page p,
.caravan-page strong,
.caravan-page small {
  overflow-wrap: anywhere;
}

@media (min-width: 821px) {
  main[data-tutorial-page="weekly_events"]
    .weekly-event-detail:has(> .caravan-page) {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  main[data-tutorial-page="weekly_events"]
    .weekly-event-detail:has(> .caravan-page)
    > .weekly-event-back {
    position: relative;
    top: auto;
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 0.5rem 0 0.45rem 0.5rem;
  }

  main[data-tutorial-page="weekly_events"]
    .weekly-event-detail:has(> .caravan-page)
    > .caravan-page {
    flex: 1 1 0;
    width: 100%;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow-y: auto;
  }
}

@container caravan-page (max-width: 1050px) {
  .caravan-mine-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .caravan-ledger {
    order: 2;
  }

  .caravan-target-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .caravan-manifest-preview {
    grid-template-columns: minmax(6rem, 8rem) minmax(0, 1fr);
  }

  .caravan-manifest-legendary {
    grid-column: 1 / -1;
    grid-template-columns: minmax(5rem, 6rem) minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  .caravan-manifest-legendary > header {
    grid-column: 1 / -1;
  }
}

@container caravan-page (max-width: 720px) {
  .caravan-page-header,
  .caravan-section-heading,
  .caravan-active-heading,
  .caravan-dispatch-footer,
  .caravan-raid-modal-header,
  .caravan-raid-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .caravan-header-status,
  .caravan-stake-seal,
  .caravan-raid-attempts {
    width: 100%;
    min-width: 0;
    justify-items: start;
  }

  .caravan-tabs {
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .caravan-tabs button {
    flex: 0 0 auto;
  }

  .caravan-route-grid,
  .caravan-protection-grid,
  .caravan-scout-grid,
  .caravan-target-grid,
  .caravan-active-grid,
  .caravan-manifest-preview,
  .caravan-manifest-legendary {
    grid-template-columns: minmax(0, 1fr);
  }

  .caravan-manifest-legendary,
  .caravan-manifest-legendary > header {
    grid-column: auto;
  }

  .caravan-dispatch-footer > button,
  .caravan-active-actions > button,
  .caravan-raid-modal-actions > button {
    width: 100%;
  }
}

@media (min-width: 821px) and (max-height: 900px) {
  .caravan-page {
    padding: 0.35rem 0.5rem max(0.75rem, env(safe-area-inset-bottom));
  }

  .caravan-page-header {
    min-height: 7.25rem;
    padding: 0.75rem 1rem;
  }

  .caravan-page h1 {
    font-size: clamp(1.65rem, 3vw, 2.55rem);
  }

  .caravan-page-header p {
    margin: 0.4rem 0 0;
    font-size: 0.76rem;
  }

  .caravan-header-status {
    padding: 0.55rem 0.7rem;
  }

  .caravan-tabs {
    padding: 0.4rem 0;
  }

  .caravan-tabs button {
    min-height: 2.15rem;
  }

  .caravan-mine-layout {
    padding-top: 0.45rem;
  }

  .caravan-active-card,
  .caravan-dispatch-card,
  .caravan-raid-board,
  .caravan-reports {
    padding: 0.85rem;
  }
}

@media (max-width: 820px) {
  main[data-tutorial-page="weekly_events"]
    .weekly-event-detail:has(> .caravan-page) {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  main[data-tutorial-page="weekly_events"]
    .weekly-event-detail:has(> .caravan-page)
    > .caravan-page {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .caravan-page {
    scrollbar-gutter: auto;
  }

  .caravan-primary-button,
  .caravan-secondary-button,
  .caravan-close-button,
  .caravan-tabs button {
    min-height: 2.75rem;
  }
}

.settings-page-layout .quick-access-keybind-capturing {
  font-style: italic !important;
}

/* Forged Character Grade emblems: every tier keeps the same layout footprint. */
.character-grade-rank {
  --grade-width: 112px;
  --grade-height: 3.55rem;
  --grade-font-size: 3.55rem;
  --grade-letter-spacing: -0.065em;
  --grade-fill: linear-gradient(180deg, #f7f7f3 0%, #a8afb6 46%, #4e555d 100%);
  --grade-stroke: #111820;
  --grade-ridge: rgba(255, 255, 255, 0.58);
  --grade-depth: rgba(0, 0, 0, 0.94);
  --grade-aura: rgba(176, 194, 211, 0.18);
  width: var(--grade-width);
  min-width: var(--grade-width);
  max-width: var(--grade-width);
  height: var(--grade-height);
  padding: 0;
  overflow: visible;
  white-space: nowrap;
  font-family: "Bahnschrift SemiCondensed", "Bahnschrift", "Arial Narrow", Arial, sans-serif !important;
  font-size: var(--grade-font-size);
  font-style: normal;
  font-variant: normal;
  font-weight: 900;
  font-stretch: condensed;
  line-height: 1;
  letter-spacing: var(--grade-letter-spacing);
  text-transform: uppercase;
  transform: none;
  background: var(--grade-fill);
  background-position: 0% 50%;
  background-size: 100% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px var(--grade-stroke);
  filter: drop-shadow(0 4px 2px rgba(0, 0, 0, 0.72));
  text-shadow:
    0 -1px 0 var(--grade-ridge),
    0 1px 0 rgba(255, 255, 255, 0.16),
    1px 2px 0 var(--grade-stroke),
    2px 3px 0 var(--grade-depth),
    0 0 12px var(--grade-aura);
  animation: none;
}

.character-grade-rank::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 22% 7% 14%;
  border: 1px solid color-mix(in srgb, var(--grade-aura) 62%, transparent);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, color-mix(in srgb, var(--grade-aura) 78%, transparent), transparent 70%);
  opacity: 0.72;
  filter: blur(5px);
  pointer-events: none;
}

.character-grade-rank::after {
  content: none;
}

.character-grade-rank--d {
  --grade-fill: linear-gradient(180deg, #e1e4e6 0%, #899198 45%, #444b52 100%);
  --grade-stroke: #20262c;
  --grade-aura: rgba(149, 161, 172, 0.12);
}

.character-grade-rank--c {
  --grade-fill: linear-gradient(180deg, #ffffff 0%, #c7d2dc 42%, #697b89 100%);
  --grade-stroke: #1d2a35;
  --grade-aura: rgba(190, 214, 233, 0.16);
}

.character-grade-rank--b {
  --grade-fill: linear-gradient(180deg, #f2fdff 0%, #70d4ff 38%, #1675b5 72%, #063f72 100%);
  --grade-stroke: #031e35;
  --grade-aura: rgba(63, 188, 255, 0.28);
}

.character-grade-rank--a {
  --grade-fill: linear-gradient(180deg, #fff9db 0%, #efcf72 37%, #a96d22 72%, #59310b 100%);
  --grade-stroke: #352008;
  --grade-aura: rgba(228, 173, 68, 0.24);
}

.character-grade-rank--a-plus {
  --grade-fill: linear-gradient(180deg, #ffffff 0%, #ffe58a 25%, #f5b52e 52%, #a84e0e 82%, #542007 100%);
  --grade-stroke: #371504;
  --grade-ridge: rgba(255, 255, 255, 0.82);
  --grade-aura: rgba(255, 183, 45, 0.34);
}

.character-grade-rank--s {
  --grade-fill: linear-gradient(180deg, #ffffff 0%, #fff0a2 21%, #ffbe2e 46%, #d44a20 72%, #65140d 100%);
  --grade-stroke: #300806;
  --grade-ridge: rgba(255, 255, 255, 0.9);
  --grade-aura: rgba(255, 106, 39, 0.34);
}

.character-grade-rank--s-plus {
  --grade-fill: linear-gradient(135deg, #ffffff 0%, #ffec9c 22%, #ffab2e 47%, #ef3d4f 72%, #671238 100%);
  --grade-stroke: #270512;
  --grade-ridge: rgba(255, 255, 255, 0.92);
  --grade-aura: rgba(255, 88, 100, 0.38);
}

.character-grade-rank--s-2 {
  --grade-fill: linear-gradient(125deg, #ffffff 0%, #9bf3ff 21%, #3ac5ff 42%, #8271ff 64%, #ff70c8 82%, #561060 100%);
  --grade-stroke: #0b1237;
  --grade-ridge: rgba(255, 255, 255, 0.96);
  --grade-aura: rgba(75, 207, 255, 0.42);
}

.character-grade-rank--s-3 {
  --grade-fill: linear-gradient(125deg, #ffffff 0%, #fff5ae 17%, #75e9ff 35%, #a987ff 53%, #ff75b5 70%, #ffbd45 86%, #69214c 100%);
  --grade-stroke: #170b30;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(169, 126, 255, 0.48);
}

.character-grade-rank--s-prime {
  --grade-font-size: 2.18rem;
  --grade-letter-spacing: 0.015em;
  --grade-fill: linear-gradient(118deg, #ffffff 0%, #d9fbff 20%, #9fa8ff 40%, #ffe47b 59%, #ff8ce0 77%, #542f91 100%);
  --grade-stroke: #160b36;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(185, 137, 255, 0.58);
}

.character-grade-rank--x {
  --grade-fill: linear-gradient(180deg, #ffffff 0%, #ffaf95 20%, #ff493d 48%, #a50928 76%, #37000e 100%);
  --grade-stroke: #270009;
  --grade-ridge: #fff0e8;
  --grade-aura: rgba(255, 47, 58, 0.5);
}

.character-grade-rank--x-plus {
  --grade-fill: linear-gradient(130deg, #ffffff 0%, #ffb8f0 19%, #ff48bf 41%, #a831ff 64%, #3b126f 100%);
  --grade-stroke: #21052f;
  --grade-ridge: #fff1fe;
  --grade-aura: rgba(230, 63, 255, 0.52);
}

.character-grade-rank--x-2 {
  --grade-fill: linear-gradient(125deg, #ffffff 0%, #a9ffff 18%, #36ddff 39%, #5472ff 60%, #d541ff 81%, #351069 100%);
  --grade-stroke: #081635;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(61, 216, 255, 0.56);
}

.character-grade-rank--x-3 {
  --grade-font-size: 3.1rem;
  --grade-fill: linear-gradient(115deg, #ffffff 0%, #8fffff 15%, #7c8cff 31%, #ef6bff 48%, #ff5d6f 64%, #ffd85d 80%, #ffffff 100%);
  --grade-stroke: #15072e;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(255, 93, 202, 0.62);
}

.character-grade-rank--x-gosu {
  --grade-font-size: 2.08rem;
  --grade-letter-spacing: 0.025em;
  --grade-fill: linear-gradient(112deg, #ffffff 0%, #fff3b0 17%, #ffca43 34%, #ffffff 50%, #ff5368 67%, #b52fff 83%, #ffffff 100%);
  --grade-stroke: #0b0614;
  --grade-ridge: #ffffff;
  --grade-depth: #19031f;
  --grade-aura: rgba(255, 207, 74, 0.68);
  -webkit-text-stroke-width: 1.15px;
}

.character-grade-rank--y {
  --grade-fill: linear-gradient(180deg, #ffffff 0%, #a9fff0 20%, #25e3bd 46%, #087b7a 74%, #032f43 100%);
  --grade-stroke: #021c26;
  --grade-ridge: #efffff;
  --grade-aura: rgba(48, 239, 204, 0.58);
}

.character-grade-rank--y-plus {
  --grade-fill: linear-gradient(128deg, #ffffff 0%, #b8fff3 18%, #3fe4c5 38%, #3d8cff 62%, #6335d4 82%, #1f0b4f 100%);
  --grade-stroke: #071331;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(65, 232, 205, 0.62);
}

.character-grade-rank--y-2 {
  --grade-fill: linear-gradient(120deg, #ffffff 0%, #8fffe2 18%, #43dbff 36%, #7275ff 56%, #dc62ff 76%, #391078 100%);
  --grade-stroke: #07123a;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(98, 220, 255, 0.66);
}

.character-grade-rank--y-3 {
  --grade-font-size: 3.1rem;
  --grade-fill: linear-gradient(112deg, #ffffff 0%, #fff1a8 16%, #63f4e1 33%, #55a5ff 50%, #b66cff 67%, #ff7dcc 83%, #ffffff 100%);
  --grade-stroke: #10072e;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(108, 221, 255, 0.72);
}

.character-grade-rank--y-gosu {
  --grade-font-size: 2.08rem;
  --grade-letter-spacing: 0.025em;
  --grade-fill: linear-gradient(110deg, #ffffff 0%, #8ffff0 16%, #ffffff 32%, #6e91ff 49%, #ff79d8 66%, #ffe77b 83%, #ffffff 100%);
  --grade-stroke: #07051c;
  --grade-ridge: #ffffff;
  --grade-depth: #071731;
  --grade-aura: rgba(119, 248, 228, 0.78);
  -webkit-text-stroke-width: 1.15px;
}

.character-grade-rank--z {
  --grade-fill: linear-gradient(180deg, #ffffff 0%, #ffe98a 18%, #ffb92e 42%, #e04c32 66%, #6e123c 84%, #220622 100%);
  --grade-stroke: #21030d;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(255, 178, 48, 0.7);
}

.character-grade-rank--z-plus {
  --grade-fill: linear-gradient(126deg, #ffffff 0%, #ffd77b 17%, #ff5f59 36%, #e345e9 57%, #6b55ff 77%, #17073c 100%);
  --grade-stroke: #1f031c;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(255, 83, 161, 0.74);
}

.character-grade-rank--z-2 {
  --grade-fill: linear-gradient(116deg, #ffffff 0%, #fff3a1 14%, #ff8a5e 29%, #ef59ff 45%, #6688ff 61%, #5ff4e2 78%, #ffffff 100%);
  --grade-stroke: #130426;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(237, 91, 255, 0.8);
}

.character-grade-rank--z-3 {
  --grade-font-size: 3.1rem;
  --grade-fill: linear-gradient(108deg, #ffffff 0%, #ffe76e 13%, #ffffff 26%, #ff5d9d 40%, #b569ff 54%, #5fc7ff 68%, #69ffe2 82%, #ffffff 100%);
  --grade-stroke: #0c031d;
  --grade-ridge: #ffffff;
  --grade-aura: rgba(255, 222, 95, 0.86);
}

.character-grade-rank--z-gosu {
  --grade-font-size: 2.08rem;
  --grade-letter-spacing: 0.025em;
  --grade-fill: linear-gradient(105deg, #ffffff 0%, #fff4a8 14%, #ffffff 28%, #ff8fcf 42%, #ffffff 56%, #7ee9ff 70%, #ffffff 84%, #ffd75d 100%);
  --grade-stroke: #05030d;
  --grade-ridge: #ffffff;
  --grade-depth: #1d0925;
  --grade-aura: rgba(255, 239, 158, 0.92);
  -webkit-text-stroke-width: 1.2px;
}

.character-grade-rank--s-plus,
.character-grade-rank--s-2,
.character-grade-rank--s-3,
.character-grade-rank--s-prime,
.character-grade-rank--x,
.character-grade-rank--x-plus,
.character-grade-rank--x-2,
.character-grade-rank--x-3,
.character-grade-rank--x-gosu,
.character-grade-rank--y,
.character-grade-rank--y-plus,
.character-grade-rank--y-2,
.character-grade-rank--y-3,
.character-grade-rank--y-gosu,
.character-grade-rank--z,
.character-grade-rank--z-plus,
.character-grade-rank--z-2,
.character-grade-rank--z-3,
.character-grade-rank--z-gosu {
  background-size: 230% 230%;
  animation: characterGradeForgedSweep 6.8s ease-in-out infinite;
}

.character-grade-rank--s-prime::after,
.character-grade-rank--x-plus::after,
.character-grade-rank--x-2::after,
.character-grade-rank--x-3::after,
.character-grade-rank--x-gosu::after,
.character-grade-rank--y-2::after,
.character-grade-rank--y-3::after,
.character-grade-rank--y-gosu::after,
.character-grade-rank--z-plus::after,
.character-grade-rank--z-2::after,
.character-grade-rank--z-3::after,
.character-grade-rank--z-gosu::after {
  content: "";
  position: absolute;
  right: 5%;
  top: 2%;
  width: 0.24em;
  height: 0.24em;
  background: radial-gradient(circle, #ffffff 0 17%, #fff2ad 18% 38%, transparent 42%);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 7px var(--grade-aura));
  pointer-events: none;
  animation: characterGradeForgedSpark 2.4s ease-in-out infinite;
}

.inventory-stat-panel .character-grade-rank {
  --grade-width: 88px;
  --grade-height: 2.35rem;
  --grade-font-size: 2.35rem;
  width: var(--grade-width);
  min-width: var(--grade-width);
  max-width: var(--grade-width);
  height: var(--grade-height);
  font-size: var(--grade-font-size) !important;
  line-height: 1;
  transform: none;
}

.inventory-stat-panel .character-grade-rank--s-prime {
  --grade-font-size: 1.48rem;
}

.inventory-stat-panel .character-grade-rank--x-3 {
  --grade-font-size: 2.02rem;
}

.inventory-stat-panel .character-grade-rank--x-gosu {
  --grade-font-size: 1.38rem;
}

.inventory-stat-panel .character-grade-rank--y-3,
.inventory-stat-panel .character-grade-rank--z-3 {
  --grade-font-size: 2.02rem;
}

.inventory-stat-panel .character-grade-rank--y-gosu,
.inventory-stat-panel .character-grade-rank--z-gosu {
  --grade-font-size: 1.38rem;
}

html:lang(zh-CN) .character-grade-rank,
html:lang(zh-TW) .character-grade-rank {
  --grade-font-size: 1.62rem;
  --grade-letter-spacing: 0.045em;
  text-transform: none;
}

html:lang(zh-CN) .inventory-stat-panel .character-grade-rank,
html:lang(zh-TW) .inventory-stat-panel .character-grade-rank {
  --grade-font-size: 1.2rem;
}

@keyframes characterGradeForgedSweep {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes characterGradeForgedSpark {
  0%,
  100% {
    opacity: 0.28;
    transform: scale(0.72) rotate(0deg);
  }

  50% {
    opacity: 1;
    transform: scale(1.08) rotate(45deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .character-grade-rank,
  .character-grade-rank::after {
    animation: none !important;
  }
}

.reduce-motion .character-grade-rank,
.reduce-motion .character-grade-rank::after {
  animation: none !important;
}

.gear-synthesis {
  --synthesis-cyan: #8ce8ff;
  --synthesis-violet: #a78bfa;
  position: relative;
  display: flex;
  height: 100%;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(140, 232, 255, 0.18);
  border-radius: 0.85rem;
  background:
    radial-gradient(circle at 74% 44%, rgba(82, 39, 148, 0.22), transparent 34%),
    linear-gradient(145deg, rgba(7, 15, 31, 0.98), rgba(15, 13, 32, 0.98));
  box-shadow:
    inset 0 0 52px rgba(7, 14, 29, 0.72),
    0 18px 44px rgba(0, 0, 0, 0.28);
  color: #e7e5ef;
}

.gear-synthesis::before {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image:
    linear-gradient(rgba(140, 232, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 232, 255, 0.025) 1px, transparent 1px);
  background-size: 30px 30px;
  content: "";
  pointer-events: none;
}

.gear-synthesis__header {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 1px solid rgba(140, 232, 255, 0.11);
  background: linear-gradient(90deg, rgba(14, 32, 51, 0.86), rgba(26, 15, 49, 0.6));
}

.gear-synthesis__header h3,
.gear-synthesis--locked h3 {
  margin: 0.08rem 0 0.12rem;
  color: #f4edcf;
  font-family: Cinzel, Georgia, serif;
  font-size: clamp(1.05rem, 1.5vw, 1.42rem);
  letter-spacing: 0.035em;
  text-shadow: 0 0 18px rgba(140, 232, 255, 0.2);
}

.gear-synthesis__header p {
  max-width: 44rem;
  margin: 0;
  color: #aaa7bb;
  font-size: 0.72rem;
  line-height: 1.35;
}

.gear-synthesis__eyebrow {
  color: var(--synthesis-cyan);
  font-size: 0.57rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gear-synthesis__rule {
  display: grid;
  min-width: 13rem;
  gap: 0.12rem;
  padding: 0.48rem 0.65rem;
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 0.55rem;
  background: rgba(14, 11, 31, 0.72);
  text-align: right;
}

.gear-synthesis__rule strong {
  color: #dcc8ff;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.gear-synthesis__rule span {
  color: #8f8ba5;
  font-size: 0.58rem;
  line-height: 1.3;
}

.gear-synthesis__body {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.9fr);
}

.gear-synthesis__selection {
  display: flex;
  min-height: 0;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
}

.gear-synthesis__slots {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.42rem;
}

.gear-synthesis-slot {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 4.25rem;
  place-items: center;
  gap: 0.1rem;
  padding: 0.35rem 0.2rem;
  overflow: hidden;
  border: 1px dashed rgba(140, 232, 255, 0.22);
  border-radius: 0.58rem;
  background: linear-gradient(160deg, rgba(13, 28, 47, 0.7), rgba(20, 12, 37, 0.68));
  color: #918da2;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.gear-synthesis-slot:not(:disabled):hover {
  border-color: rgba(140, 232, 255, 0.58);
  box-shadow: 0 0 18px rgba(83, 196, 255, 0.13);
  transform: translateY(-1px);
}

.gear-synthesis-slot.is-filled {
  border-style: solid;
  border-color: rgba(167, 139, 250, 0.42);
  background:
    radial-gradient(circle at 50% 20%, rgba(140, 232, 255, 0.12), transparent 55%),
    rgba(17, 13, 37, 0.88);
}

.gear-synthesis-slot img {
  width: 2.25rem;
  height: 2.25rem;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.55));
}

.gear-synthesis-slot strong {
  width: 100%;
  overflow: hidden;
  color: #e7e2ef;
  font-size: 0.58rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gear-synthesis-slot small {
  color: #a58ec7;
  font-size: 0.5rem;
}

.gear-synthesis-slot__number {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border: 1px solid rgba(140, 232, 255, 0.18);
  border-radius: 50%;
  color: rgba(140, 232, 255, 0.55);
  font-family: Cinzel, Georgia, serif;
}

.gear-synthesis__eligible {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(117, 111, 145, 0.18);
  border-radius: 0.62rem;
  background: rgba(7, 12, 25, 0.62);
}

.gear-synthesis__eligible-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.48rem 0.62rem;
  border-bottom: 1px solid rgba(117, 111, 145, 0.16);
}

.gear-synthesis__eligible-heading strong {
  color: #d9d3e3;
  font-size: 0.67rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gear-synthesis__eligible-heading span {
  color: #8ce8ff;
  font-size: 0.58rem;
}

.gear-synthesis__filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.45rem 0.62rem;
  border-bottom: 1px solid rgba(117, 111, 145, 0.16);
  background: rgba(10, 17, 32, 0.66);
}

.gear-synthesis__filter {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.gear-synthesis__filter > span {
  color: #918ba2;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gear-synthesis__filter-trigger {
  width: 100%;
  min-height: 2rem;
  padding: 0.36rem 1.65rem 0.36rem 0.55rem !important;
  border: 1px solid rgba(140, 232, 255, 0.22) !important;
  border-radius: 0.42rem !important;
  background: rgba(12, 21, 37, 0.92) !important;
  color: #d9d3e3 !important;
  font-size: 0.62rem !important;
}

.gear-synthesis__filter-trigger:hover,
.gear-synthesis__filter-trigger:focus-visible {
  border-color: rgba(140, 232, 255, 0.52) !important;
  box-shadow: 0 0 0 1px rgba(140, 232, 255, 0.12);
  outline: none;
}

.gear-synthesis__batch-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.45rem 0.62rem;
  border-bottom: 1px solid rgba(117, 111, 145, 0.16);
  background: rgba(8, 14, 28, 0.72);
}

.gear-synthesis__batch-actions button {
  min-height: 2rem;
  padding: 0.38rem 0.55rem;
  border: 1px solid rgba(140, 232, 255, 0.28);
  border-radius: 0.42rem;
  background: rgba(17, 27, 47, 0.94);
  color: #d8eaf0;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.gear-synthesis__batch-actions button.is-primary {
  border-color: rgba(245, 196, 92, 0.58);
  background: linear-gradient(135deg, rgba(104, 67, 17, 0.94), rgba(141, 91, 18, 0.94));
  color: #fff1bd;
}

.gear-synthesis__batch-actions button:not(:disabled):hover,
.gear-synthesis__batch-actions button:not(:disabled):focus-visible {
  border-color: rgba(140, 232, 255, 0.7);
  box-shadow: 0 0 0 1px rgba(140, 232, 255, 0.12);
  outline: none;
}

.gear-synthesis__batch-actions button.is-primary:not(:disabled):hover,
.gear-synthesis__batch-actions button.is-primary:not(:disabled):focus-visible {
  border-color: rgba(255, 218, 126, 0.92);
  box-shadow: 0 0 16px rgba(245, 196, 92, 0.2);
}

.gear-synthesis__batch-actions button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.gear-synthesis__eligible-list {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0.35rem;
  overflow-y: auto;
  padding: 0.45rem;
}

.gear-synthesis__eligible-list button {
  display: grid;
  min-width: 0;
  grid-template-columns: 2.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.38rem;
  padding: 0.34rem 0.42rem;
  border: 1px solid rgba(126, 114, 154, 0.2);
  border-radius: 0.48rem;
  background: rgba(18, 20, 38, 0.78);
  color: #e1dce8;
  text-align: left;
  transition:
    border-color 130ms ease,
    background 130ms ease;
}

.gear-synthesis__eligible-list button:not(:disabled):hover {
  border-color: rgba(140, 232, 255, 0.45);
  background: rgba(25, 35, 56, 0.94);
}

.gear-synthesis__eligible-list button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.gear-synthesis__eligible-list img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.gear-synthesis__eligible-list button > span {
  display: grid;
  min-width: 0;
}

.gear-synthesis__eligible-list strong {
  overflow: hidden;
  font-size: 0.62rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gear-synthesis__eligible-list small {
  overflow: hidden;
  color: #9792a8;
  font-size: 0.5rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gear-synthesis__eligible-list b {
  color: var(--synthesis-cyan);
  font-size: 1rem;
}

.gear-synthesis__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.2rem 0.6rem;
  color: #817d91;
  font-size: 0.64rem;
  text-align: center;
}

.gear-synthesis__protection-note {
  margin: 0;
  color: #7f7b8e;
  font-size: 0.54rem;
  line-height: 1.25;
}

.gear-synthesis__altar {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  border-left: 1px solid rgba(140, 232, 255, 0.12);
  background:
    radial-gradient(circle at 50% 48%, rgba(83, 52, 148, 0.25), transparent 46%),
    linear-gradient(180deg, rgba(12, 21, 37, 0.45), rgba(8, 8, 22, 0.74));
}

.gear-synthesis__altar::before {
  position: absolute;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(140, 232, 255, 0.1);
  border-radius: 50%;
  box-shadow:
    inset 0 0 42px rgba(124, 58, 237, 0.15),
    0 0 56px rgba(83, 196, 255, 0.08);
  content: "";
}

.gear-synthesis__altar-idle {
  position: relative;
  z-index: 2;
  display: grid;
  max-width: 19rem;
  place-items: center;
  gap: 0.42rem;
  padding: 0.8rem;
  text-align: center;
}

.gear-synthesis__core {
  display: grid;
  width: 4.1rem;
  height: 4.1rem;
  place-items: center;
  border: 1px solid rgba(140, 232, 255, 0.38);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(200, 245, 255, 0.22), rgba(80, 41, 145, 0.28) 48%, rgba(9, 10, 26, 0.8) 70%);
  box-shadow:
    inset 0 0 20px rgba(140, 232, 255, 0.18),
    0 0 26px rgba(124, 58, 237, 0.2);
}

.gear-synthesis__core span {
  color: #d9f7ff;
  font-family: Cinzel, Georgia, serif;
  font-size: 1.35rem;
  text-shadow: 0 0 12px #8ce8ff;
}

.gear-synthesis__altar-idle > strong {
  color: #eee8d8;
  font-family: Cinzel, Georgia, serif;
  font-size: 0.82rem;
}

.gear-synthesis__altar-idle > p {
  margin: 0;
  color: #9690a6;
  font-size: 0.6rem;
  line-height: 1.35;
}

.gear-synthesis__action {
  min-width: 10.5rem;
  margin-top: 0.15rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(140, 232, 255, 0.58);
  border-radius: 0.48rem;
  background: linear-gradient(135deg, #27627b, #5b3aa4);
  box-shadow: 0 0 22px rgba(99, 102, 241, 0.22);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.gear-synthesis__action:disabled {
  border-color: rgba(113, 105, 131, 0.25);
  background: rgba(42, 40, 56, 0.65);
  box-shadow: none;
  color: #777283;
  cursor: not-allowed;
}

.gear-synthesis__altar-idle > small {
  color: #716c7d;
  font-size: 0.51rem;
}

.gear-synthesis__storm {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.gear-synthesis__storm i {
  position: absolute;
  top: -12%;
  left: 50%;
  width: 0.18rem;
  height: 72%;
  opacity: 0;
  background: linear-gradient(#fff, #9be8ff 42%, transparent);
  box-shadow:
    0 0 8px #fff,
    0 0 24px #80dfff;
  clip-path: polygon(35% 0, 100% 0, 63% 38%, 100% 38%, 16% 100%, 42% 49%, 0 49%);
  transform-origin: top center;
}

.gear-synthesis__storm i:nth-child(1) {
  transform: translateX(-50%) rotate(-8deg);
}

.gear-synthesis__storm i:nth-child(2) {
  left: 33%;
  height: 55%;
  transform: rotate(12deg) scale(0.7);
}

.gear-synthesis__storm i:nth-child(3) {
  left: 69%;
  height: 52%;
  transform: rotate(-15deg) scale(0.62);
}

.gear-synthesis__storm span {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: #dffaff;
}

.gear-synthesis--charging .gear-synthesis__core {
  animation: gearSynthesisCharge 680ms ease-in-out infinite alternate;
}

.gear-synthesis--charging .gear-synthesis__altar-idle {
  animation: gearSynthesisTremor 90ms linear infinite;
}

.gear-synthesis--strike .gear-synthesis__storm i {
  animation: gearSynthesisBolt 520ms steps(2, end) both;
}

.gear-synthesis--strike .gear-synthesis__storm i:nth-child(2) {
  animation-delay: 80ms;
}

.gear-synthesis--strike .gear-synthesis__storm i:nth-child(3) {
  animation-delay: 140ms;
}

.gear-synthesis--strike .gear-synthesis__storm span {
  animation: gearSynthesisFlash 520ms ease-out both;
}

.gear-synthesis--strike .gear-synthesis__core {
  animation: gearSynthesisImpact 520ms ease-out both;
}

.gear-synthesis-reward {
  --synthesis-reward-rgb: 140, 232, 255;
  position: relative;
  isolation: isolate;
  z-index: 3;
  display: grid;
  width: min(92%, 23rem);
  place-items: center;
  gap: 0.4rem;
  padding: 1rem;
  border: 2px solid rgba(var(--synthesis-reward-rgb), 0.68);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 50% 18%, rgba(var(--synthesis-reward-rgb), 0.2), transparent 45%),
    linear-gradient(155deg, rgba(14, 18, 37, 0.98), rgba(7, 7, 21, 0.98));
  box-shadow:
    0 0 18px rgba(var(--synthesis-reward-rgb), 0.42),
    0 0 72px rgba(var(--synthesis-reward-rgb), 0.2),
    inset 0 0 38px rgba(var(--synthesis-reward-rgb), 0.1);
  animation: gearSynthesisRewardReveal 560ms cubic-bezier(0.16, 1, 0.3, 1) both;
  text-align: center;
}

.gear-synthesis-reward.rarity-uncommon {
  --synthesis-reward-rgb: 103, 232, 145;
}

.gear-synthesis-reward.rarity-rare {
  --synthesis-reward-rgb: 96, 165, 250;
}

.gear-synthesis-reward.rarity-epic {
  --synthesis-reward-rgb: 192, 132, 252;
}

.gear-synthesis-reward.rarity-legendary {
  --synthesis-reward-rgb: 245, 196, 92;
}

.gear-synthesis-reward.rarity-mythic {
  --synthesis-reward-rgb: 222, 139, 255;
}

.gear-synthesis-reward::before {
  position: absolute;
  inset: 0.45rem;
  z-index: -1;
  border: 1px solid rgba(var(--synthesis-reward-rgb), 0.2);
  border-radius: 0.7rem;
  box-shadow: inset 0 0 46px rgba(var(--synthesis-reward-rgb), 0.08);
  content: "";
  pointer-events: none;
}

.gear-synthesis-reward__burst {
  position: absolute;
  inset: -8rem;
  z-index: -2;
  opacity: 0.48;
  background: repeating-conic-gradient(
    from 0deg,
    transparent 0deg 8deg,
    rgba(var(--synthesis-reward-rgb), 0.62) 9deg 10deg,
    transparent 11deg 23deg
  );
  mask-image: radial-gradient(circle, transparent 0 19%, #000 31%, transparent 67%);
  pointer-events: none;
  animation:
    gearSynthesisRewardBurst 16s linear infinite,
    gearSynthesisRewardPulse 1.6s ease-in-out infinite alternate;
}

.gear-synthesis-reward__complete {
  color: rgb(var(--synthesis-reward-rgb));
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-shadow: 0 0 12px rgba(var(--synthesis-reward-rgb), 0.85);
  text-transform: uppercase;
}

.gear-synthesis-reward__image {
  display: grid;
  width: 7.6rem;
  height: 7.6rem;
  place-items: center;
  border: 1px solid rgba(var(--synthesis-reward-rgb), 0.52);
  border-radius: 0.8rem;
  outline: none;
  background:
    radial-gradient(circle at 50% 42%, rgba(var(--synthesis-reward-rgb), 0.25), transparent 66%),
    rgba(6, 8, 20, 0.5);
  box-shadow:
    0 0 24px rgba(var(--synthesis-reward-rgb), 0.38),
    inset 0 0 30px rgba(var(--synthesis-reward-rgb), 0.15);
  cursor: help;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.gear-synthesis-reward__image:hover,
.gear-synthesis-reward__image:focus-visible {
  border-color: rgba(var(--synthesis-reward-rgb), 0.95);
  box-shadow:
    0 0 32px rgba(var(--synthesis-reward-rgb), 0.65),
    0 0 68px rgba(var(--synthesis-reward-rgb), 0.28),
    inset 0 0 34px rgba(var(--synthesis-reward-rgb), 0.2);
  transform: scale(1.05);
}

.gear-synthesis-reward__image img {
  width: 6.2rem;
  height: 6.2rem;
  object-fit: contain;
  filter:
    drop-shadow(0 9px 12px rgba(0, 0, 0, 0.72))
    drop-shadow(0 0 9px rgba(var(--synthesis-reward-rgb), 0.38));
}

.gear-synthesis-reward h4 {
  margin: 0;
  color: #fff1c7;
  font-family: Cinzel, Georgia, serif;
  font-size: 1.08rem;
  text-shadow: 0 0 15px rgba(var(--synthesis-reward-rgb), 0.38);
}

.gear-synthesis-reward > p {
  margin: 0;
  color: #bbb3ca;
  font-size: 0.61rem;
}

.gear-synthesis-reward__actions {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.34rem;
  margin-top: 0.28rem;
}

.gear-synthesis-reward__actions button {
  min-width: 0;
  padding: 0.44rem 0.25rem;
  border: 1px solid rgba(126, 114, 154, 0.32);
  border-radius: 0.42rem;
  background: rgba(30, 26, 48, 0.9);
  color: #c8c1d3;
  font-size: 0.56rem;
  font-weight: 800;
}

.gear-synthesis-reward__actions button:hover {
  border-color: rgba(140, 232, 255, 0.5);
  color: #fff;
}

.gear-synthesis-reward__actions button.is-primary {
  border-color: rgba(var(--synthesis-reward-rgb), 0.72);
  background: linear-gradient(135deg, rgba(35, 104, 126, 0.95), rgba(83, 52, 151, 0.95));
  box-shadow: 0 0 18px rgba(var(--synthesis-reward-rgb), 0.16);
  color: #fff;
}

.gear-synthesis__status {
  position: absolute;
  right: 0.8rem;
  bottom: 0.55rem;
  z-index: 6;
  max-width: 24rem;
  margin: 0;
  padding: 0.42rem 0.62rem;
  border: 1px solid rgba(248, 113, 113, 0.36);
  border-radius: 0.42rem;
  background: rgba(53, 15, 25, 0.94);
  color: #fecaca;
  font-size: 0.58rem;
}

.gear-synthesis--locked {
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  overflow-y: auto;
  padding: 2rem;
  text-align: center;
}

.gear-synthesis--locked p {
  margin: 0;
  color: #a8a2b4;
  font-size: 0.76rem;
}

.gear-synthesis--locked > strong {
  color: #d5c8e7;
  font-size: 0.66rem;
}

.gear-synthesis__lock-sigil {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  place-items: center;
  border: 1px solid rgba(140, 232, 255, 0.26);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 63, 160, 0.22), transparent 68%);
  color: rgba(140, 232, 255, 0.72);
  font-family: Cinzel, Georgia, serif;
  font-size: 1.5rem;
  box-shadow: 0 0 28px rgba(83, 196, 255, 0.08);
}

@keyframes gearSynthesisCharge {
  from {
    box-shadow:
      inset 0 0 20px rgba(140, 232, 255, 0.18),
      0 0 22px rgba(124, 58, 237, 0.2);
    transform: scale(1);
  }

  to {
    box-shadow:
      inset 0 0 26px rgba(216, 249, 255, 0.42),
      0 0 46px rgba(99, 102, 241, 0.48);
    transform: scale(1.08);
  }
}

@keyframes gearSynthesisTremor {
  0%,
  100% {
    transform: translate(0, 0);
  }

  25% {
    transform: translate(-1px, 1px);
  }

  75% {
    transform: translate(1px, -1px);
  }
}

@keyframes gearSynthesisBolt {
  0% {
    opacity: 0;
  }

  12%,
  26%,
  52% {
    opacity: 1;
  }

  20%,
  40%,
  100% {
    opacity: 0;
  }
}

@keyframes gearSynthesisFlash {
  0% {
    opacity: 0;
  }

  12% {
    opacity: 0.78;
  }

  100% {
    opacity: 0;
  }
}

@keyframes gearSynthesisImpact {
  0% {
    filter: brightness(1);
    transform: scale(1);
  }

  18% {
    filter: brightness(3);
    transform: scale(1.22);
  }

  100% {
    filter: brightness(1);
    transform: scale(0.25);
  }
}

@keyframes gearSynthesisRewardReveal {
  from {
    filter: brightness(2.3);
    opacity: 0;
    transform: translateY(1rem) scale(0.72);
  }

  to {
    filter: brightness(1);
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes gearSynthesisRewardBurst {
  to {
    transform: rotate(360deg);
  }
}

@keyframes gearSynthesisRewardPulse {
  from {
    opacity: 0.28;
    scale: 0.92;
  }

  to {
    opacity: 0.58;
    scale: 1.04;
  }
}

@media (max-width: 980px) {
  .gear-synthesis {
    overflow-y: auto;
  }

  .gear-synthesis__header {
    align-items: stretch;
  }

  .gear-synthesis__rule {
    min-width: 10rem;
  }

  .gear-synthesis__body {
    min-height: 34rem;
    grid-template-columns: 1fr;
  }

  .gear-synthesis__altar {
    min-height: 17rem;
    border-top: 1px solid rgba(140, 232, 255, 0.12);
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .gear-synthesis__header {
    flex-direction: column;
    gap: 0.5rem;
  }

  .gear-synthesis__rule {
    text-align: left;
  }

  .gear-synthesis__slots {
    grid-template-columns: repeat(5, minmax(3.5rem, 1fr));
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .gear-synthesis__eligible-list {
    grid-template-columns: 1fr;
  }

  .gear-synthesis__filters {
    grid-template-columns: 1fr;
  }

  .gear-synthesis__batch-actions {
    grid-template-columns: 1fr;
  }

  .gear-synthesis__selection {
    min-height: 23rem;
  }

  .gear-synthesis-reward__actions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gear-synthesis *,
  .gear-synthesis *::before,
  .gear-synthesis *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.reduce-motion .gear-synthesis *,
.reduce-motion .gear-synthesis *::before,
.reduce-motion .gear-synthesis *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
/* Tower rebirth is feature-flagged; these styles are inert while the flag is disabled. */
.tower-rebirth-gate,
.tower-rebirth-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(185, 156, 255, 0.58);
  background:
    radial-gradient(circle at 15% 0%, rgba(125, 76, 210, 0.26), transparent 48%),
    linear-gradient(125deg, rgba(18, 12, 38, 0.97), rgba(7, 20, 38, 0.98));
  box-shadow: inset 0 0 38px rgba(105, 70, 180, 0.12), 0 10px 34px rgba(0, 0, 0, 0.3);
}
.tower-rebirth-gate::after,
.tower-rebirth-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 52%, rgba(126, 220, 255, 0.08));
}
.tower-rebirth-gate__copy,
.tower-rebirth-banner > div,
.tower-rebirth-gate__actions { position: relative; z-index: 1; }
.tower-rebirth-gate__copy { max-width: 880px; }
.tower-rebirth-gate__eyebrow,
.tower-rebirth-banner__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: #cdbaff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.tower-rebirth-gate h3,
.tower-rebirth-banner strong {
  color: #fff2c9;
  font-family: var(--font-serif);
  font-size: 21px;
}
.tower-rebirth-gate p { margin: 7px 0; color: #d9e3f0; line-height: 1.45; }
.tower-rebirth-gate small { display: block; color: #f0b8a9; }
.tower-rebirth-gate__details { display: grid; gap: 5px; margin: 10px 0; color: #b9c8d8; font-size: 12px; }
.tower-rebirth-gate__details span { display: block; }
.tower-rebirth-gate__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.tower-rebirth-gate--compact { padding-block: 12px; }
.tower-rebirth-gate--compact .tower-rebirth-gate__copy small { display: none; }
.tower-rebirth-banner__archive {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  color: #aebbd0;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.tower-rebirth-banner__archive b { margin-top: 4px; color: #f1d99d; font-size: 12px; }
.tower-ascension-live { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tower-ascension-live span { border: 1px solid rgba(196, 166, 101, .28); border-radius: 8px; padding: 6px 9px; color: #e8d9b5; background: rgba(0, 0, 0, .18); }
.tower-ascension-crafting { display: grid; gap: 8px; }
.tower-ascension-crafting > div { display: flex; flex-wrap: wrap; gap: 8px; }
.tower-ascension-milestones { display: grid; gap: 8px; }
.tower-ascension-milestones article { border-left: 2px solid rgba(196, 166, 101, .45); padding: 6px 10px; background: rgba(0, 0, 0, .14); }
.tower-ascension-milestones article strong,
.tower-ascension-milestones article span { display: block; }
.tower-ascension-milestones article span { color: #aebbc9; font-size: 12px; }
.tower-ascension-milestones article p { color: #aebbc9; font-size: 13px; margin-top: 4px; }
.tower-ascent-tile--elite {
  border-color: rgba(202, 166, 84, 0.9) !important;
  box-shadow: 0 0 0 1px rgba(143, 103, 235, 0.62), 0 0 16px rgba(175, 126, 38, 0.2), inset 0 0 20px rgba(104, 72, 204, 0.23);
}
.tower-ascent-tile--apex { border-color: rgba(255, 205, 103, 0.9) !important; box-shadow: 0 0 18px rgba(255, 183, 68, 0.22), inset 0 0 22px rgba(127, 76, 210, 0.24); }
.tower-nameplate-chip--elite {
  border-color: rgba(190, 155, 255, 0.68) !important;
  background: linear-gradient(135deg, rgba(79, 45, 138, 0.28), rgba(154, 99, 35, 0.18)) !important;
  color: #e8d9ff !important;
}
.tower-combat-elite-frame {
  border-color: rgba(213, 174, 84, 0.9) !important;
  box-shadow: 0 0 0 1px rgba(139, 95, 231, 0.62), 0 0 28px rgba(169, 116, 35, 0.22), inset 0 0 30px rgba(94, 57, 161, 0.18) !important;
}
.tower-combat-elite-frame--apex {
  border-color: rgba(255, 215, 116, 0.98) !important;
  box-shadow: 0 0 0 1px rgba(255, 191, 66, 0.62), 0 0 36px rgba(255, 175, 53, 0.34), inset 0 0 34px rgba(135, 78, 216, 0.22) !important;
}
.combat-screen-enemy-frame--elite {
  border-color: rgba(206, 168, 81, 0.86) !important;
  box-shadow: 0 0 0 1px rgba(139, 96, 232, 0.48), 0 0 18px rgba(190, 132, 38, 0.2);
}
.combat-screen-enemy-frame--apex {
  border-color: rgba(255, 218, 125, 0.98) !important;
  box-shadow: 0 0 0 1px rgba(255, 189, 60, 0.66), 0 0 24px rgba(255, 178, 51, 0.34);
}
.combat-screen-elite-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 7px;
  padding: 2px 7px;
  border: 1px solid rgba(221, 181, 89, 0.78);
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(91, 53, 154, 0.86), rgba(116, 73, 24, 0.92));
  color: #f5df9d;
  font-family: var(--font-ui);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  vertical-align: middle;
  box-shadow: 0 0 12px rgba(170, 113, 30, 0.2);
}
.combat-screen-elite-badge--apex {
  border-color: rgba(255, 222, 128, 0.96);
  background: linear-gradient(135deg, rgba(112, 61, 174, 0.94), rgba(165, 104, 20, 0.98));
  color: #fff0b8;
  box-shadow: 0 0 16px rgba(255, 181, 49, 0.35);
}
.scc2-rebirth-badge {
  position: absolute;
  z-index: 5;
  top: 8px;
  left: 8px;
  padding: 4px 7px;
  border: 1px solid rgba(209, 184, 255, 0.72);
  border-radius: 5px;
  background: linear-gradient(135deg, rgba(35, 18, 68, 0.94), rgba(10, 28, 49, 0.94));
  color: #f6e9ff;
  box-shadow: 0 0 15px rgba(130, 86, 225, 0.36);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .tower-rebirth-gate,
  .tower-rebirth-banner { align-items: stretch; flex-direction: column; }
  .tower-rebirth-gate__actions { width: 100%; }
  .tower-rebirth-gate__actions button { flex: 1; }
  .tower-rebirth-banner__archive { align-items: flex-start; }
}

/* Compact production Mastery loadout switcher shared by live activity screens. */
.t2-mastery-quick-switcher {
  --t2-mastery-accent: 217, 184, 129;
  --t2-mastery-accent-strong: #f2d58d;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 5px;
  border: 1px solid rgba(var(--t2-mastery-accent), 0.28);
  border-radius: 7px;
  background:
    radial-gradient(circle at 50% 0%, rgba(var(--t2-mastery-accent), 0.11), transparent 62%),
    linear-gradient(180deg, rgba(12, 22, 35, 0.96), rgba(5, 13, 24, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 10px 24px rgba(0, 0, 0, 0.24);
  container: t2-mastery-switcher / inline-size;
  isolation: isolate;
}

.t2-mastery-quick-switcher--gathering {
  --t2-mastery-accent: 113, 208, 147;
  --t2-mastery-accent-strong: #a9efbd;
  flex: 1 1 420px;
  width: min(100%, 620px);
  max-width: 620px;
  margin-inline: auto;
}

.t2-mastery-quick-switcher--crafting {
  --t2-mastery-accent: 197, 139, 222;
  --t2-mastery-accent-strong: #e4b5f1;
  width: min(100%, 640px);
  justify-self: center;
}

.t2-mastery-quick-switcher--combat {
  --t2-mastery-accent: 225, 165, 102;
  --t2-mastery-accent-strong: #ffd18d;
  width: min(100%, 760px);
  margin: 0 auto 8px;
}

.dungeon-combat-toolbar > .t2-mastery-quick-switcher--combat {
  flex: 1 1 430px;
  width: auto;
  max-width: 680px;
  margin: 0 12px;
}

.t2-mastery-quick-switcher__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0 4px 0 3px;
  color: rgba(var(--t2-mastery-accent), 0.82);
  font: 900 9px/1 var(--font-ui, sans-serif);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
}

.t2-mastery-quick-switcher__label svg {
  width: 15px;
  height: 15px;
  overflow: visible;
  fill: rgba(var(--t2-mastery-accent), 0.18);
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.t2-mastery-quick-switcher__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}

.t2-mastery-quick-switcher__option {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  overflow: hidden;
  border: 1px solid rgba(158, 169, 192, 0.18);
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(29, 41, 58, 0.78), rgba(10, 18, 31, 0.86));
  color: rgba(226, 219, 202, 0.72);
  font-family: var(--font-ui, sans-serif);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition:
    border-color 140ms ease,
    background 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.t2-mastery-quick-switcher__option:hover {
  border-color: rgba(var(--t2-mastery-accent), 0.52);
  color: #f5ead1;
  transform: translateY(-1px);
}

.t2-mastery-quick-switcher__option:focus-visible {
  outline: 2px solid rgba(var(--t2-mastery-accent), 0.88);
  outline-offset: 2px;
}

.t2-mastery-quick-switcher__option.is-active {
  border-color: rgba(var(--t2-mastery-accent), 0.86);
  background:
    radial-gradient(circle at 25% 0%, rgba(var(--t2-mastery-accent), 0.24), transparent 64%),
    linear-gradient(180deg, rgba(43, 48, 54, 0.96), rgba(18, 23, 31, 0.96));
  color: var(--t2-mastery-accent-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 246, 214, 0.12),
    inset 3px 0 0 rgba(var(--t2-mastery-accent), 0.84),
    0 0 14px rgba(var(--t2-mastery-accent), 0.12);
}

.t2-mastery-quick-switcher__option.is-active::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--t2-mastery-accent-strong);
  box-shadow: 0 0 7px rgba(var(--t2-mastery-accent), 0.9);
}

.t2-mastery-quick-switcher__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding-inline: 4px;
  border: 1px solid rgba(var(--t2-mastery-accent), 0.22);
  border-radius: 4px;
  background: rgba(var(--t2-mastery-accent), 0.07);
  color: rgba(var(--t2-mastery-accent), 0.72);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.t2-mastery-quick-switcher__name {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.035em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.t2-mastery-quick-switcher__count {
  padding-right: 5px;
  color: rgba(213, 220, 233, 0.52);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.t2-mastery-quick-switcher__option.is-active .t2-mastery-quick-switcher__count {
  color: rgba(var(--t2-mastery-accent), 0.78);
}

@container t2-mastery-switcher (max-width: 560px) {
  .t2-mastery-quick-switcher__label { display: none; }
}

@container t2-mastery-switcher (max-width: 460px) {
  .t2-mastery-quick-switcher__count { display: none; }
  .t2-mastery-quick-switcher__option {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

.crafting-progress-strip {
  grid-template-columns:
    52px
    minmax(190px, 0.32fr)
    minmax(380px, 0.78fr)
    minmax(0, 1.2fr);
}

@media (max-width: 1420px) {
  .t2-mastery-quick-switcher__label { display: none; }
  .crafting-progress-strip {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .crafting-progress-strip > .t2-mastery-quick-switcher--crafting,
  .crafting-progress-strip__actions {
    grid-column: 1 / -1;
  }
  .crafting-progress-strip > .t2-mastery-quick-switcher--crafting {
    width: 100%;
  }
  .crafting-progress-strip__actions {
    flex-wrap: wrap;
  }
  .crafting-progress-strip__queue {
    flex-basis: 100%;
    width: 100%;
  }
}

@media (max-width: 1160px) {
  .crafting-progress-strip {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .crafting-progress-strip > .t2-mastery-quick-switcher--crafting,
  .crafting-progress-strip__actions {
    grid-column: 1 / -1;
  }
  .crafting-progress-strip > .t2-mastery-quick-switcher--crafting {
    width: 100%;
  }
  .crafting-progress-strip__actions {
    flex-wrap: wrap;
  }
  .crafting-progress-strip__queue {
    flex-basis: 100%;
    width: 100%;
  }
  .dungeon-combat-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }
  .dungeon-combat-toolbar > .t2-mastery-quick-switcher--combat {
    order: 3;
    flex-basis: 100%;
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 900px) {
  .t2-mastery-quick-switcher--gathering {
    order: 2;
    flex-basis: 100%;
    max-width: none;
  }
  .gather-header-actions { order: 3; }
  .t2-mastery-quick-switcher__count { display: none; }
  .t2-mastery-quick-switcher__option {
    grid-template-columns: auto minmax(0, 1fr);
  }
}

@media (max-width: 580px) {
  .t2-mastery-quick-switcher { padding: 4px; }
  .t2-mastery-quick-switcher__options { gap: 3px; }
  .t2-mastery-quick-switcher__option {
    display: flex;
    justify-content: center;
    min-height: 32px;
    padding-inline: 5px;
  }
  .t2-mastery-quick-switcher__index { display: none; }
  .t2-mastery-quick-switcher__name {
    font-size: 9px;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .t2-mastery-quick-switcher__option { transition: none; }
}

/* Keep the dungeon Mastery profiles in the reserved strip above the combat panel. */
@media (min-width: 1024px) {
  .combat-screen-root.dungeon-combat-screen {
    overflow: visible !important;
  }

  .dungeon-combat-screen .dungeon-combat-shell,
  .dungeon-combat-screen .dungeon-combat-toolbar {
    overflow: visible !important;
  }

  .dungeon-combat-screen .dungeon-combat-toolbar {
    position: relative;
  }

  .dungeon-combat-screen
    .dungeon-combat-toolbar
    > .t2-mastery-quick-switcher--combat {
    position: absolute;
    z-index: 80;
    top: -58px;
    left: 50%;
    transform: translateX(-50%);
    order: initial;
    width: min(760px, calc(100% - 24px));
    max-width: 760px;
    margin: 0;
  }
}
