@import url('./layout.css?v=1023');
@import url('./buttons.css?v=1023');
@import url('./enemy.css?v=1023');
@import url('./skills.css?v=1023');
@import url('./heroes.css?v=1023');
@import url('./ui.css?v=1023');
@import url('./chronicle-delve.css?v=1023');
@import url('./tournament.css?v=1023');
@import url('./asteroids.css?v=1023');

/* v108: make the Adventure scene truly edge-to-edge after all imported component rules. */
#adventure .card{
  width:100%;
  min-height:100%;
  padding:0;
  border-left:0;
  border-right:0;
  border-radius:0;
  display:flex;
  flex-direction:column;
}
#adventure .enemy{
  flex:1 1 auto;
  min-height:0;
  padding-left:12px;
  padding-right:12px;
  display:flex;
  flex-direction:column;
}
#adventure .enemy-battlefield{
  flex:1 1 auto;
  margin-left:-12px;
  margin-right:-12px;
  width:calc(100% + 24px);
}
#adventure .combat-ground-zone{
  flex:0 0 auto;
  width:100%;
  margin:0;
  padding:0 12px 12px;
}
@media(max-width:620px){
  #adventure .enemy-battlefield{margin-left:-12px;margin-right:-12px;width:calc(100% + 24px)}
}


/* v314: normalize the primary heading spacing across non-Adventure tabs. */
#character > .tab-content-wrap > .card:first-child > .card-title-row:first-child,
#heroes > .tab-content-wrap > .card:first-child > .card-title-row:first-child,
#legacy > .tab-content-wrap > .card:first-child > .card-title-row:first-child{
  margin-bottom:12px;
}
#skills > .tab-content-wrap > .card:first-child > h2:first-child,
#artifacts > .tab-content-wrap > .card:first-child > h2:first-child,
#archives > .card:first-child > h2:first-child{
  margin:0 0 12px;
}

/* Equipment uses the same shared tab content wrapper as the other primary panels. */
#equipment > .tab-content-wrap > .card:first-child > .card-title-row:first-child{margin-bottom:12px}

/* v616/v617: compact, title-free top controls across non-Adventure progression tabs. */
:root{--panel-toolbar-control-height:40px;--panel-toolbar-action-min-width:92px}
.panel-top-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:0;
  margin:0 0 14px;
}
.panel-top-toolbar .upgrade-quantity{margin:0;justify-content:flex-start;min-width:0}
.panel-top-toolbar>.panel-action-button,
.panel-top-toolbar>.talents-open-button{
  box-sizing:border-box;
  min-width:var(--panel-toolbar-action-min-width);
  min-height:var(--panel-toolbar-control-height);
  padding:8px 12px;
}
.hero-upgrade-quantity .quantity-selector button{
  box-sizing:border-box;
  min-width:54px;
  min-height:var(--panel-toolbar-control-height);
  padding:8px 11px;
}
.heroes-top-toolbar .hero-stats-button{margin-left:auto}
.equipment-main-heading{align-items:center}
.artifacts-top-toolbar{justify-content:flex-end;margin-top:14px}
.artifacts-top-toolbar .upgrade-quantity{flex:0 1 auto;margin-left:auto}
.artifacts-top-toolbar .quantity-selector button{
  box-sizing:border-box;
  min-width:54px;
  min-height:var(--panel-toolbar-control-height);
  padding:8px 11px;
}
.artifacts-top-toolbar .artifact-upgrade-mode-toggle{min-width:54px!important}

/* Character uses the same segmented-tab language as Skills. */
.character-panel-tabs{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:0}
.character-panel{min-width:0}
.character-player-upgrade-quantity{margin:0 0 14px!important;justify-content:flex-end!important}
#character .arcane-runes-card,#character .inheritances-card{margin-top:0}
#character .arcane-runes-heading,#character .inheritances-heading{margin-bottom:12px}
#character .arcane-runes-heading>p,#character .inheritances-heading>p{margin:0;max-width:760px;line-height:1.4}

/* The x/% mode control is intentionally distinct from amount choices. */
.artifact-upgrade-mode-toggle{
  color:#ffe8ff;
  border-color:rgba(221,132,255,.62)!important;
  background:linear-gradient(180deg,#70408a,#4e2b66)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 0 0 1px rgba(142,75,174,.14);
}
.artifact-upgrade-mode-toggle:hover:not(:disabled){background:linear-gradient(180deg,#82509c,#5c3474)!important;border-color:rgba(235,165,255,.8)!important}

@media(max-width:520px){
  .panel-top-toolbar{gap:7px;margin-bottom:11px}
  .panel-top-toolbar .quantity-selector{gap:4px}
  .character-panel-tabs{gap:4px}
  .character-panel-tabs button{font-size:.78rem;padding:6px 4px}
}
@media(max-width:360px){
  .hero-upgrade-quantity .quantity-selector button,
  .artifacts-top-toolbar .quantity-selector button{min-width:44px;padding-inline:6px}
  .artifacts-top-toolbar .artifact-upgrade-mode-toggle{min-width:44px!important}
  .heroes-top-toolbar>.panel-action-button{min-width:78px;padding-inline:9px}
}

/* v792: cohesive glass/cosmic control system across progression panels and dialogs. */
:root{
  --control-radius:10px;
  --control-border:rgba(155,177,221,.32);
  --control-surface-top:rgba(51,66,99,.92);
  --control-surface-bottom:rgba(27,37,61,.96);
  --control-text:#eef4ff;
  --control-muted:#b8c5de;
}

/* Shared interaction language without changing navigation/combat geometry. */
.panel-action-button,
.talents-open-button,
.dialog-actions button,
.dialog-close-button,
.equipment-equip-button,
.equipment-sell-button,
.equipment-set-rarity-tab,
.talent-level-step,
.talent-reset-button,
.chronicle-game-button,
.legacy-stage-milestone-claim,
#prestigeButton{
  transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .12s ease,color .15s ease,opacity .15s ease;
}
.panel-action-button:active:not(:disabled),
.talents-open-button:active:not(:disabled),
.dialog-actions button:active:not(:disabled),
.equipment-equip-button:active:not(:disabled),
.equipment-sell-button:active:not(:disabled),
.equipment-set-rarity-tab:active:not(:disabled),
.talent-level-step:active:not(:disabled),
.talent-reset-button:active:not(:disabled),
.chronicle-game-button:active:not(:disabled),
.legacy-stage-milestone-claim:active:not(:disabled),
#prestigeButton:active:not(:disabled){transform:translateY(1px)}

/* Section accents used by toolbar actions. */
.character-main-card{--control-accent-rgb:154,126,245}
.heroes-main-card{--control-accent-rgb:103,207,157}
.skills-main-card{--control-accent-rgb:92,205,234}
.artifacts-main-card{--control-accent-rgb:229,163,83}
.equipment-main-card{--control-accent-rgb:225,154,90}
.legacy-invoke-card{--control-accent-rgb:178,145,236}

.panel-action-button,
.talents-open-button{
  border:1px solid rgba(var(--control-accent-rgb,132,166,226),.48);
  border-radius:var(--control-radius);
  background:
    linear-gradient(180deg,rgba(var(--control-accent-rgb,132,166,226),.24),rgba(var(--control-accent-rgb,132,166,226),.10)),
    linear-gradient(180deg,rgba(34,45,72,.96),rgba(18,27,48,.98));
  color:var(--control-text);
  font-weight:850;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 5px 14px rgba(0,0,0,.18);
}
.panel-action-button:hover:not(:disabled),
.talents-open-button:hover:not(:disabled){
  border-color:rgba(var(--control-accent-rgb,132,166,226),.78);
  background:
    linear-gradient(180deg,rgba(var(--control-accent-rgb,132,166,226),.34),rgba(var(--control-accent-rgb,132,166,226),.15)),
    linear-gradient(180deg,rgba(39,52,82,.98),rgba(21,31,54,.99));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.09),0 7px 18px rgba(0,0,0,.24),0 0 16px rgba(var(--control-accent-rgb,132,166,226),.10);
  transform:translateY(-1px);
}

/* Every upgrade-quantity control shares one exact visual system. */
.quantity-selector,
.character-main-card .quantity-selector,
.heroes-main-card .quantity-selector,
.skills-main-card .quantity-selector,
.artifacts-main-card .quantity-selector{
  gap:4px;
  padding:4px;
  border:1px solid rgba(139,158,200,.28)!important;
  border-radius:12px;
  background:linear-gradient(180deg,rgba(13,20,37,.92),rgba(8,13,27,.96))!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035),0 5px 15px rgba(0,0,0,.16);
}
.quantity-selector button{
  box-sizing:border-box;
  min-width:54px;
  min-height:38px;
  padding:7px 10px;
  border:1px solid transparent;
  border-radius:8px;
  background:linear-gradient(180deg,rgba(48,60,86,.76),rgba(27,37,61,.82));
  color:#aebbd3;
  font-weight:850;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025);
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease,color .14s ease,transform .1s ease;
}
.quantity-selector button:hover:not(:disabled){
  border-color:rgba(145,172,226,.35);
  background:linear-gradient(180deg,rgba(58,74,105,.88),rgba(32,45,72,.90));
  color:#e4ecff;
}
.quantity-selector button:active:not(:disabled){transform:translateY(1px)}
.quantity-selector button.active{
  border-color:rgba(153,190,255,.76);
  background:linear-gradient(180deg,#526da8,#354e82);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.11),0 0 0 1px rgba(110,154,229,.13),0 0 14px rgba(88,137,224,.16);
}
.artifact-upgrade-mode-toggle{
  min-width:54px!important;
  border-color:rgba(191,144,225,.52)!important;
  background:linear-gradient(180deg,rgba(92,59,117,.92),rgba(55,38,82,.94))!important;
  color:#f3ddff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06)!important;
}
.artifact-upgrade-mode-toggle:hover:not(:disabled){
  border-color:rgba(218,172,247,.76)!important;
  background:linear-gradient(180deg,rgba(111,70,139,.96),rgba(65,44,94,.96))!important;
}

/* One upgrade-button construction, with accents inherited from each progression theme. */
/* v793: regular Player upgrades use astral blue so shared purple milestone buttons remain immediately distinct. */
.character-main-card .relic-style-button{--upgrade-accent-rgb:78,162,238}
.character-main-card .arcane-rune-button{--upgrade-accent-rgb:228,166,77}
.character-main-card .inheritance-upgrade-button{--upgrade-accent-rgb:94,190,181}
.heroes-main-card .hero-upgrade-button{--upgrade-accent-rgb:103,207,157}
.heroes-main-card .super-state-hero-button,
.heroes-main-card .super-state-hero-upgrade-button{--upgrade-accent-rgb:226,190,102}
.skills-main-card .skill-buy-button{--upgrade-accent-rgb:92,205,234}
.artifacts-main-card .artifact-discover-button{--upgrade-accent-rgb:229,163,83}
.artifacts-main-card .artifact-owned .artifact-upgrade-button{--upgrade-accent-rgb:var(--artifact-tier-rgb)}
.milestone-button{--upgrade-accent-rgb:180,112,239!important}

.character-main-card .relic-style-button,
.heroes-main-card .relic-style-button,
.skills-main-card .skill-buy-button,
.artifacts-main-card .artifact-upgrade-button{
  border:0;
  border-left:1px solid rgba(var(--upgrade-accent-rgb,115,170,225),.62);
  border-radius:0;
  background:
    linear-gradient(180deg,rgba(var(--upgrade-accent-rgb,115,170,225),.38),rgba(var(--upgrade-accent-rgb,115,170,225),.14)),
    linear-gradient(180deg,rgba(28,38,62,.98),rgba(12,19,36,.99));
  color:#f7faff;
  box-shadow:inset 1px 0 0 rgba(255,255,255,.035),inset 0 1px 0 rgba(255,255,255,.055);
}
.character-main-card .relic-style-button:hover:not(:disabled),
.heroes-main-card .relic-style-button:hover:not(:disabled),
.skills-main-card .skill-buy-button:hover:not(:disabled),
.artifacts-main-card .artifact-upgrade-button:hover:not(:disabled){
  border-left-color:rgba(var(--upgrade-accent-rgb,115,170,225),.92);
  background:
    linear-gradient(180deg,rgba(var(--upgrade-accent-rgb,115,170,225),.52),rgba(var(--upgrade-accent-rgb,115,170,225),.20)),
    linear-gradient(180deg,rgba(34,46,73,.99),rgba(15,23,42,.99));
  box-shadow:inset 1px 0 0 rgba(255,255,255,.06),inset 0 1px 0 rgba(255,255,255,.08),0 0 18px rgba(var(--upgrade-accent-rgb,115,170,225),.10);
}
.character-main-card .relic-style-button .upgrade-button-header,
.heroes-main-card .relic-style-button .upgrade-button-header,
.skills-main-card .skill-buy-button .upgrade-button-header,
.artifacts-main-card .artifact-upgrade-button .upgrade-button-header{
  background:rgba(5,9,20,.33);
  border-bottom-color:rgba(var(--upgrade-accent-rgb,115,170,225),.22);
  color:rgb(var(--upgrade-accent-rgb,200,220,255));
  text-shadow:0 1px 8px rgba(0,0,0,.38);
}
.character-main-card .relic-style-button .upgrade-button-main,
.heroes-main-card .relic-style-button .upgrade-button-main,
.skills-main-card .skill-buy-button .upgrade-button-main,
.artifacts-main-card .artifact-upgrade-button .upgrade-button-main{color:#f7faff;text-shadow:0 1px 9px rgba(0,0,0,.28)}


/* Legacy actions use the new indigo/gold language while destructive reset remains visually serious. */
.legacy-invoke-card .legacy-stage-milestone-claim{
  border:1px solid rgba(229,194,105,.58);
  background:linear-gradient(180deg,rgba(113,91,165,.96),rgba(62,51,112,.98));
  color:#fff3cc;
  font-weight:900;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 5px 16px rgba(0,0,0,.22),0 0 14px rgba(225,185,84,.08);
}
.legacy-invoke-card .legacy-stage-milestone-claim:hover:not(:disabled){border-color:rgba(255,220,133,.82);background:linear-gradient(180deg,rgba(130,103,184,.98),rgba(72,59,125,.99));transform:translateY(-1px)}
.legacy-invoke-card #prestigeButton{
  border:1px solid rgba(205,139,162,.55);
  background:linear-gradient(180deg,rgba(101,55,88,.97),rgba(54,34,68,.99));
  color:#ffe9f1;
  font-weight:900;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 8px 24px rgba(0,0,0,.24),0 0 18px rgba(178,145,236,.10);
}
.legacy-invoke-card #prestigeButton:hover:not(:disabled){border-color:rgba(232,164,188,.78);background:linear-gradient(180deg,rgba(119,64,101,.99),rgba(65,40,79,.99));transform:translateY(-1px)}

/* Equipment actions and set controls follow the meteor/starfield palette. */
.equipment-main-card .equipment-equip-button{
  border:1px solid rgba(207,143,245,.48);
  background:linear-gradient(180deg,rgba(116,70,149,.94),rgba(67,43,101,.96));
  color:#f7eaff;
  font-weight:850;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 4px 12px rgba(0,0,0,.18);
}
.equipment-main-card .equipment-equip-button:hover:not(:disabled){border-color:rgba(229,177,255,.72);background:linear-gradient(180deg,rgba(134,82,169,.97),rgba(78,50,116,.98));transform:translateY(-1px)}
.equipment-main-card .equipment-sell-button{
  border:1px solid rgba(229,173,91,.46);
  background:linear-gradient(180deg,rgba(116,80,47,.93),rgba(70,48,33,.96));
  color:#ffe8c2;
  font-weight:850;
}
.equipment-main-card .equipment-sell-button:hover:not(:disabled){border-color:rgba(245,194,113,.72);background:linear-gradient(180deg,rgba(133,92,53,.96),rgba(79,54,36,.98));transform:translateY(-1px)}
.equipment-set-rarity-tabs{gap:5px;padding:5px;border-color:rgba(222,168,93,.25);background:linear-gradient(180deg,rgba(18,17,31,.86),rgba(10,16,27,.90))}
.equipment-set-rarity-tab{
  min-height:40px;
  border-width:1px;
  border-radius:9px;
  background:linear-gradient(180deg,rgba(255,255,255,.04),rgba(255,255,255,.015));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.equipment-set-rarity-tab:hover:not(:disabled){opacity:.94;background:linear-gradient(180deg,rgba(255,255,255,.075),rgba(255,255,255,.028));transform:translateY(-1px)}
.equipment-set-rarity-tab.active{background:linear-gradient(180deg,rgba(255,255,255,.12),rgba(255,255,255,.045));box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 0 14px color-mix(in srgb,currentColor 20%,transparent)}

/* Standard dialogs: persistent close control plus clear confirm/cancel hierarchy. */
.game-dialog{--dialog-accent-rgb:137,168,230}
.talent-dialog{--dialog-accent-rgb:124,168,238}
.hero-chronicles-dialog{--dialog-accent-rgb:141,123,226}
.hero-stats-dialog{--dialog-accent-rgb:111,164,218}
.equipment-sets-dialog{--dialog-accent-rgb:226,161,87}
.dialog-close-button{
  border:1px solid rgba(var(--dialog-accent-rgb,137,168,230),.42);
  border-radius:10px;
  background:linear-gradient(180deg,rgba(39,50,78,.88),rgba(18,27,47,.94));
  color:#eaf1ff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 4px 12px rgba(0,0,0,.16);
}
.dialog-close-button:hover:not(:disabled){
  border-color:rgba(var(--dialog-accent-rgb,137,168,230),.72);
  background:linear-gradient(180deg,rgba(50,64,98,.94),rgba(24,35,59,.96));
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08),0 5px 16px rgba(0,0,0,.22),0 0 14px rgba(var(--dialog-accent-rgb,137,168,230),.10);
}
.dialog-actions button{
  min-width:108px;
  border:1px solid var(--control-border);
  border-radius:var(--control-radius);
  background:linear-gradient(180deg,var(--control-surface-top),var(--control-surface-bottom));
  color:var(--control-text);
  font-weight:850;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 5px 14px rgba(0,0,0,.18);
}
.dialog-actions button:hover:not(:disabled){border-color:rgba(178,199,240,.52);background:linear-gradient(180deg,rgba(62,78,113,.96),rgba(33,45,72,.98));transform:translateY(-1px)}
.dialog-actions button.primary,
#gameDialogConfirm.primary{
  border-color:rgba(129,174,243,.66);
  background:linear-gradient(180deg,#526fa9,#354f82);
  color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10),0 6px 18px rgba(0,0,0,.22),0 0 16px rgba(88,137,224,.12);
}
.dialog-actions button.primary:hover:not(:disabled),
#gameDialogConfirm.primary:hover:not(:disabled){border-color:rgba(164,202,255,.84);background:linear-gradient(180deg,#607fbb,#3e5c93)}
.dialog-actions button.danger,
#gameDialogConfirm.danger{
  border-color:rgba(207,112,134,.62);
  background:linear-gradient(180deg,#7a4351,#552f3b);
  color:#fff0f3;
}
.dialog-actions button.danger:hover:not(:disabled),
#gameDialogConfirm.danger:hover:not(:disabled){border-color:rgba(235,146,166,.82);background:linear-gradient(180deg,#8d4d5d,#633744)}
#gameDialogCancel{border-color:rgba(137,153,183,.34);background:linear-gradient(180deg,rgba(46,57,82,.92),rgba(27,36,58,.96));color:#c6d1e5}
#gameDialogCancel:hover:not(:disabled){border-color:rgba(171,188,221,.54);color:#f1f5ff}

/* Talent controls keep each tree's color while sharing the new construction. */
.talent-tree-tab{
  border-radius:11px;
  background:linear-gradient(180deg,rgba(35,46,72,.96),rgba(18,27,46,.98));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.04),0 4px 13px rgba(0,0,0,.16);
}
.talent-tree-tab.active{
  background:linear-gradient(180deg,rgba(var(--talent-theme-rgb),.34),rgba(var(--talent-theme-rgb),.12)),linear-gradient(180deg,#263653,#17243c);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 0 0 1px rgba(var(--talent-theme-rgb),.16),0 0 18px rgba(var(--talent-theme-rgb),.20);
}
.talent-level-step{
  border-radius:10px;
  background:linear-gradient(180deg,rgba(var(--talent-theme-rgb),.34),rgba(var(--talent-theme-rgb),.13)),linear-gradient(180deg,#263653,#17243c);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06),0 4px 12px rgba(0,0,0,.18);
}
.talent-reset-button{
  border:1px solid rgba(207,112,134,.55);
  border-radius:10px;
  background:linear-gradient(180deg,#713f4d,#4d2d39);
  color:#ffe9ee;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.055),0 4px 13px rgba(0,0,0,.18);
}
.talent-reset-button:hover:not(:disabled){border-color:rgba(235,146,166,.78);background:linear-gradient(180deg,#824958,#5a3341);transform:translateY(-1px)}

/* Hero Chronicles / Delve buttons use the same glass button language. */
.chronicle-game-button{
  border-radius:11px;
  font-weight:850;
}
.chronicle-game-button-primary{
  border-color:rgba(151,139,239,.66);
  background:linear-gradient(180deg,rgba(94,79,188,.98),rgba(52,45,119,.99));
}
.chronicle-game-button-secondary{
  border-color:rgba(122,151,207,.38);
  background:linear-gradient(180deg,rgba(42,57,87,.95),rgba(20,30,50,.98));
}

@media(max-width:520px){
  .quantity-selector button{min-width:44px;padding-inline:6px}
  .dialog-actions button{min-width:94px}
}
