/* === v0.8.15: simplified relic forge catalog and single item modal === */


/* v0.8.16: compact forge and explicit item rarity colors */


/* v0.8.17: path tabs and achievements placeholder */
body.theme-ashen .path-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0 14px}
body.theme-ashen .path-tab-button{display:flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:10px 12px;border:1px solid rgba(117,101,67,.38);border-radius:11px;background:rgba(7,11,10,.62);color:#8ca198;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;box-shadow:inset 0 0 0 1px rgba(12,32,27,.2)}
body.theme-ashen .path-tab-button.active{border-color:rgba(190,164,102,.6);background:linear-gradient(180deg,rgba(41,35,23,.88),rgba(18,20,17,.82));color:#e2d3a7;box-shadow:inset 0 0 0 1px rgba(103,89,55,.35),0 0 20px rgba(28,64,57,.18)}
body.theme-ashen .path-tab-button .path-tab-badge{position:static;min-width:16px;height:16px;padding:0 4px;border-radius:999px;background:#7f2f2a;color:#fff;line-height:16px;font-size:9px!important}
body.theme-ashen .path-panel{display:grid;gap:0}
body.theme-ashen .path-panel[hidden]{display:none!important}
body.theme-ashen .map-achievement-panel{margin-top:16px;padding-top:14px;border-top:1px solid rgba(117,101,67,.35)}
body.theme-ashen .achievement-placeholder{display:grid;gap:5px;padding:14px 15px;border:1px dashed rgba(83,128,116,.45);border-radius:12px;background:linear-gradient(180deg,rgba(11,18,18,.9),rgba(7,11,11,.72));text-align:left}
body.theme-ashen .achievement-placeholder strong{color:#e5d3a1;font:700 18px/1.15 Georgia,serif}
body.theme-ashen .achievement-placeholder small{color:#8da198;font-size:11px;line-height:1.45}


/* v0.8.18: opening screen visual and forced horizontal Path tabs */
body.theme-ashen .path-tabs{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
body.theme-ashen .path-tab-button{justify-content:center!important;min-width:0;padding:9px 4px!important;white-space:nowrap;font-size:10.5px}
body.theme-ashen .opening-story{color:#9daea7}
@media(max-width:380px){body.theme-ashen .path-tabs{gap:4px!important}body.theme-ashen .path-tab-button{padding:8px 2px!important;font-size:9.5px;letter-spacing:0}}

/* v0.8.19: reliable combat feedback, red incoming damage and visual boss progress */
body.theme-ashen .damage-float.received{
  color:#ff675c!important;
  text-shadow:0 2px 9px #000,0 0 15px #ff3b30,0 0 28px rgba(184,31,24,.72)!important;
}
body.theme-ashen .enemy-defeat-banner{animation:none!important}
body.theme-ashen .boss-progress-visual{display:flex;align-items:center;justify-content:center;gap:9px;min-height:24px}
body.theme-ashen .boss-progress-dots{display:flex;align-items:center;justify-content:center;gap:5px}
body.theme-ashen .boss-progress-dot{display:block;width:9px;height:9px;border:1px solid rgba(139,129,99,.62);border-radius:50%;background:#101513;box-shadow:inset 0 0 0 2px rgba(3,8,7,.78)}
body.theme-ashen .boss-progress-dot.filled{border-color:#d0b36b;background:linear-gradient(180deg,#e1c87e,#a98743);box-shadow:0 0 9px rgba(211,176,86,.38),inset 0 1px 0 rgba(255,247,201,.45)}
body.theme-ashen .boss-progress-visual strong{min-width:28px;color:#d8c58f;font-size:10px;letter-spacing:.05em}
@media(max-width:360px){body.theme-ashen .boss-progress-dots{gap:4px}body.theme-ashen .boss-progress-dot{width:8px;height:8px}}

/* v0.8.21: developer checkpoints */

/* v0.8.21: contextual quest rewards and cleaner showcase */

/* v0.8.22: randomized Ruins nodes and grouped rune insertion list */
body.theme-ashen .ruins-route-node.recovery { color:#86d8a0; border-color:rgba(88,158,108,.62); }
body.theme-ashen .ruins-route-node.altar { color:#c7a7ff; border-color:rgba(133,95,188,.62); }
body.theme-ashen .ruins-route-node.reward { color:#e4c36f; border-color:rgba(174,139,63,.66); }
body.theme-ashen .ruins-route-node.unknown,
body.theme-ashen .ruins-route-node.obscured { color:#7f8d88; border-style:dashed; background:linear-gradient(180deg,rgba(22,27,25,.9),rgba(10,13,12,.94)); }
body.theme-ashen .ruins-route-node.obscured .ruins-node-glyph { opacity:.72; }

/* v0.8.23: bottom-up Ruins route, explicit roads and readable encounter tiers */
body.theme-ashen .ruins-route-map{
  overflow:visible;
  padding:8px 7px 12px;
}
body.theme-ashen .ruins-route-map::before{display:none!important}
body.theme-ashen .ruins-route-direction{
  position:relative;
  z-index:4;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  color:#9eb0a9;
  font-size:9px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
}
body.theme-ashen .ruins-route-direction.top{margin:0 0 8px;color:#d7bd79}
body.theme-ashen .ruins-route-direction.top strong{font-size:16px;line-height:1}
body.theme-ashen .ruins-route-direction.bottom{
  display:grid;
  gap:2px;
  margin:9px 0 0;
  text-align:center;
  color:#78b7a4;
}
body.theme-ashen .ruins-route-direction.bottom small{
  color:#74867f;
  font-size:8px;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:none;
}
body.theme-ashen .ruins-route-canvas{
  position:relative;
  width:100%;
  min-width:0;
  height:var(--ruins-route-height);
}
body.theme-ashen .ruins-route-grid{
  position:relative;
  z-index:2;
  display:grid;
  gap:12px;
  width:100%;
}
body.theme-ashen .ruins-route-row{
  height:68px;
  min-height:68px;
  margin:0;
  gap:8px;
}
body.theme-ashen .ruins-node-spacer{min-height:68px;height:68px}
body.theme-ashen .ruins-route-lines{
  position:absolute;
  z-index:1;
  inset:0;
  width:100%;
  height:var(--ruins-route-height);
  overflow:visible;
  pointer-events:none;
}
body.theme-ashen .ruins-route-lines line{
  stroke:#33423d;
  stroke-width:2.2;
  stroke-linecap:round;
  opacity:.82;
  vector-effect:non-scaling-stroke;
}
body.theme-ashen .ruins-route-lines line.locked{stroke:#34413d;opacity:.58}
body.theme-ashen .ruins-route-lines line.available{
  stroke:#c5a65e;
  stroke-width:3.2;
  opacity:1;
  filter:drop-shadow(0 0 4px rgba(199,165,86,.55));
}
body.theme-ashen .ruins-route-lines line.active{
  stroke:#6fc4ab;
  stroke-width:4;
  opacity:1;
  filter:drop-shadow(0 0 5px rgba(78,180,148,.65));
}
body.theme-ashen .ruins-route-node{
  height:68px;
  min-height:68px;
  padding:7px 6px;
  scroll-margin-block:180px;
}
body.theme-ashen .ruins-route-node .ruins-node-copy strong{
  display:-webkit-box;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  white-space:normal;
  text-overflow:clip;
  font-size:9.5px;
  line-height:1.12;
}
body.theme-ashen .ruins-route-node .ruins-node-copy small{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:7.5px;
}
body.theme-ashen .ruins-route-node.normal{color:#cbd5d0;border-color:rgba(91,116,107,.66)}
body.theme-ashen .ruins-route-node.elite{color:#f0c66f;border-color:rgba(190,142,52,.76)}
body.theme-ashen .ruins-route-node.rare{color:#75d2ff;border-color:rgba(76,153,191,.8)}
body.theme-ashen .ruins-route-node.sacrifice{color:#e58b8b;border-color:rgba(164,73,73,.78)}
body.theme-ashen .ruins-route-node.altar{color:#cfb0ff;border-color:rgba(143,103,199,.78)}
body.theme-ashen .ruins-route-node.available{
  box-shadow:0 0 0 2px rgba(197,166,94,.22),0 0 22px rgba(197,166,94,.3);
}
@media(max-width:420px){
  body.theme-ashen .ruins-route-map{padding-inline:5px}
  body.theme-ashen .ruins-route-row{gap:5px}
  body.theme-ashen .ruins-route-node{padding:6px 4px;grid-template-columns:20px minmax(0,1fr);gap:3px}
  body.theme-ashen .ruins-route-node .ruins-node-glyph{font-size:17px}
  body.theme-ashen .ruins-route-node .ruins-node-copy strong{font-size:8.5px}
  body.theme-ashen .ruins-route-node .ruins-node-copy small{font-size:6.8px}
}

/* v0.8.24: compact rune icons in forge catalog */

/* v0.8.25: truthful shop recommendations and full-width empty showcase */

/* v0.8.26: technical split; obsolete vertical Path-tab override removed. */

/* v0.8.34 — restrained premium rune archive. */
body.theme-ashen .rune-vault-panel {
  align-content: start;
  grid-auto-rows: max-content;
  gap: 8px;
}
body.theme-ashen .rune-vault-help {
  align-self: start;
  min-height: 0;
  height: auto;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(77, 111, 100, .42);
  border-radius: 9px;
  background: rgba(8, 16, 14, .62);
}
body.theme-ashen .rune-vault-help:not([open]) > :not(summary) { display: none; }
body.theme-ashen .rune-vault-help summary {
  min-height: 38px;
  padding: 9px 10px;
  color: #aab7b1;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
body.theme-ashen .rune-vault-help summary::-webkit-details-marker { display: none; }
body.theme-ashen .rune-vault-help summary::before {
  content: '›';
  display: inline-block;
  margin-right: 5px;
  color: #79b7a8;
  transition: transform .16s ease;
}
body.theme-ashen .rune-vault-help[open] summary::before { transform: rotate(90deg); }
body.theme-ashen .rune-vault-help p {
  margin: 0;
  padding: 0 10px 9px;
  color: #8e9b95;
  font-size: 10px;
  line-height: 1.45;
}
body.theme-ashen .rune-vault-summary {
  align-self: start;
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  min-height: 24px;
  margin: 0;
  padding: 0 2px;
}
body.theme-ashen .rune-vault-summary > span {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  min-height: 0;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8f9d97;
  font-size: 10px;
}
body.theme-ashen .rune-vault-summary > span + span::before {
  content: '·';
  margin-right: 1px;
  color: #596761;
}
body.theme-ashen .rune-vault-summary strong { color: #cdbd8b; font-size: 12px; }
body.theme-ashen .rune-vault-tabs {
  align-self: start;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 34px;
  gap: 4px;
  margin: 0 0 2px;
}
body.theme-ashen .rune-vault-tab {
  min-width: 0;
  min-height: 34px;
  height: 34px;
  padding: 4px 3px;
  border: 1px solid rgba(88, 116, 105, .42);
  border-radius: 8px;
  background: rgba(9, 16, 14, .72);
  color: #929f99;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
body.theme-ashen .rune-vault-tab.active {
  border-color: rgba(105, 169, 153, .68);
  background: linear-gradient(180deg, rgba(20, 49, 43, .86), rgba(10, 25, 22, .9));
  color: #d2e5df;
  box-shadow: inset 0 1px 0 rgba(218, 240, 232, .05), 0 7px 16px rgba(0, 0, 0, .12);
}
body.theme-ashen .rune-family-list {
  display: grid;
  gap: 12px;
  min-width: 0;
}
body.theme-ashen .rune-family-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(91, 108, 100, .28);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(18, 25, 22, .96), rgba(7, 11, 10, .98));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(232, 224, 199, .025);
}
body.theme-ashen .rune-family-head {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  background: linear-gradient(180deg, rgba(24, 32, 28, .72), rgba(15, 21, 18, .58));
  box-shadow: inset 0 -1px 0 rgba(112, 128, 119, .16);
}
body.theme-ashen .rune-family-glyph {
  color: #83bcae;
  font-size: 19px;
  text-align: center;
  opacity: .95;
}
body.theme-ashen .rune-family-head > strong {
  color: #ded6c0;
  font-size: 13px;
  letter-spacing: .01em;
}
body.theme-ashen .rune-family-total {
  color: #77847e;
  font-size: 8.5px;
  white-space: nowrap;
}
body.theme-ashen .rune-family-tiers { display: grid; }
body.theme-ashen .rune-family-tier {
  --rune-quality: #aaa99e;
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(90px, 1fr) minmax(72px, auto) minmax(88px, auto);
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 7px 9px 7px 10px;
  border: 0;
  background: rgba(7, 12, 10, .32);
  box-shadow: inset 0 1px 0 rgba(91, 107, 99, .16);
}
body.theme-ashen .rune-family-tier:first-child { box-shadow: none; }
body.theme-ashen .rune-family-tier::before {
  content: '';
  position: absolute;
  inset: 9px auto 9px 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--rune-quality);
  opacity: .78;
}
body.theme-ashen .rune-family-tier.rune-common { --rune-quality: #aaa99e; }
body.theme-ashen .rune-family-tier.rune-uncommon { --rune-quality: #70aa83; }
body.theme-ashen .rune-family-tier.rune-rare { --rune-quality: #689dbb; }
body.theme-ashen .rune-family-tier.rune-epic { --rune-quality: #aa7fba; }
body.theme-ashen .rune-family-quality {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 32px;
  min-width: 0;
  border: 1px solid color-mix(in srgb, var(--rune-quality) 34%, rgba(105, 119, 111, .25));
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--rune-quality) 13%, transparent), transparent 64%),
    rgba(7, 12, 10, .72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}
body.theme-ashen .rune-quality-glyph {
  color: var(--rune-quality);
  font-size: 16px;
  line-height: 1;
  text-shadow: 0 0 8px color-mix(in srgb, var(--rune-quality) 28%, transparent);
}
body.theme-ashen .rune-quality-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body.theme-ashen .rune-family-effect {
  overflow: hidden;
  color: color-mix(in srgb, var(--rune-quality) 82%, #d8d2bf);
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: none;
}
body.theme-ashen .rune-family-tier-counts {
  display: grid;
  gap: 1px;
  color: #74807b;
  font-size: 8px;
  line-height: 1.2;
  white-space: nowrap;
}
body.theme-ashen .rune-family-tier-counts strong {
  color: #bdb28c;
  font-size: 9.5px;
  font-weight: 700;
}
body.theme-ashen .rune-family-tier-action {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}
body.theme-ashen .rune-family-upgrade {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  margin: 0;
  padding: 4px 7px;
  display: grid;
  gap: 0;
  border: 1px solid rgba(171, 146, 89, .28);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(62, 53, 35, .34), rgba(17, 18, 15, .56));
  color: #c8b981;
  box-shadow: inset 0 1px 0 rgba(239, 221, 163, .045);
  text-align: center;
}
body.theme-ashen .rune-family-upgrade:not(:disabled):hover,
body.theme-ashen .rune-family-upgrade:not(:disabled):focus-visible {
  border-color: rgba(190, 160, 91, .48);
  background: linear-gradient(180deg, rgba(76, 63, 39, .46), rgba(20, 20, 16, .62));
  color: #dec98d;
}
body.theme-ashen .rune-family-upgrade:disabled {
  border-color: rgba(106, 113, 106, .18);
  background: rgba(19, 22, 19, .4);
  color: #727a75;
  box-shadow: none;
  opacity: .74;
}
body.theme-ashen .rune-family-upgrade span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .01em;
}
body.theme-ashen .rune-family-upgrade span b {
  font-size: 14px;
  font-weight: 500;
  line-height: .75;
  opacity: .7;
}
body.theme-ashen .rune-family-upgrade small {
  color: inherit;
  opacity: .62;
  font-size: 7px;
}
body.theme-ashen .rune-family-max {
  color: #707b76;
  font-size: 8px;
  text-align: center;
}
body.theme-ashen .rune-family-empty {
  padding: 11px;
  color: #78847e;
  font-size: 9px;
}
@media (max-width: 380px) {
  body.theme-ashen .rune-vault-tab { font-size: 9px; padding-inline: 1px; }
}
@media (max-width: 350px) {
  body.theme-ashen .rune-family-tier {
    grid-template-columns: 30px minmax(0, 1fr) minmax(70px, auto);
  }
  body.theme-ashen .rune-family-tier-action { grid-column: 2 / -1; }
}

/* v0.9.1: compact combat viewport and grouped developer checkpoints */

body.theme-ashen .battle-action-dock .battle-meter-panel{
  margin:0 0 6px;
  padding:6px 8px 2px;
}
body.theme-ashen .battle-action-dock .attack-meter-heading{
  margin-bottom:4px;
  font-size:11px;
}
body.theme-ashen .battle-action-dock .attack-meter-heading span{
  font-size:9px;
}
body.theme-ashen .battle-action-dock .attack-meter{
  height:19px;
  padding:2px;
}
body.theme-ashen .battle-action-dock .attack-meter-labels{
  margin-top:3px;
  font-size:9px;
}
body.theme-ashen .battle-action-row button,
body.theme-ashen .battle-main-action{
  height:62px;
  min-height:62px;
  max-height:62px;
  overflow:hidden;
}
body.theme-ashen #attackButton{
  display:grid;
  grid-template-columns:auto minmax(0,auto) auto;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:7px 10px;
  line-height:1.05;
}
body.theme-ashen #attackButton .battle-action-icon{font-size:19px;line-height:1}
body.theme-ashen #attackButton .battle-action-label{min-width:0;font-size:16px;font-weight:900}
body.theme-ashen #attackButton small{font-size:11px;color:#f2d48c;white-space:nowrap}
body.theme-ashen #attackButton.crushing-ready .battle-action-label{font-size:15px}

@media(max-width:520px){
  body.theme-ashen .battle-screen{padding-bottom:205px}
  body.theme-ashen .battle-panel{padding:8px}
  body.theme-ashen .battle-panel .log-head{gap:6px}
  body.theme-ashen .battle-panel .log-head h2{font-size:24px;line-height:1.05}
  body.theme-ashen .battle-panel .section-label{font-size:10px}
  body.theme-ashen .auto-control-sticky{margin-bottom:6px;padding:4px}
  body.theme-ashen .auto-control-sticky .auto-battle-button{min-height:42px;padding:7px 8px}
  body.theme-ashen .tutorial-notice{margin:6px 0;padding:7px 9px;font-size:12px;line-height:1.25}
  body.theme-ashen .battle-stage{margin:5px 0 6px;padding:4px;gap:5px}
  body.theme-ashen .battle-stage .combatant{min-height:128px;padding:6px 5px}
  body.theme-ashen .battle-stage .figure{height:50px}
  body.theme-ashen .battle-stage .combatant-name{margin-bottom:3px;font-size:14px;line-height:1.05}
  body.theme-ashen .battle-stage .enemy-role{margin-bottom:2px;min-height:16px}
  body.theme-ashen .battle-stage .enemy-intent{margin:4px 0;padding:5px 4px;font-size:9px;line-height:1.12}
  body.theme-ashen .battle-stage .combat-hp{margin-top:4px;font-size:10px}
  body.theme-ashen .battle-stage .combat-bar{margin-top:3px}
  body.developer-mode.theme-ashen .battle-stage .combatant{min-height:145px}
  body.developer-mode.theme-ashen .battle-screen .enemy-stats{min-height:0;margin-top:5px;padding-top:4px;font-size:9px;line-height:1.2}
  body.theme-ashen .zone-progress{margin:5px 0}
  body.theme-ashen .combat-mechanics-status{gap:5px;margin:5px 0 6px;padding:7px 9px}
  body.theme-ashen .combat-mechanics-line,
  body.theme-ashen .crushing-charge-row{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:6px;
  }
  body.theme-ashen .combat-mechanics-line strong,
  body.theme-ashen .combat-mechanics-line span,
  body.theme-ashen .crushing-charge-row>span:first-child{font-size:10px;line-height:1.2}
  body.theme-ashen .crushing-charge-segments{align-self:center;grid-template-columns:repeat(3,28px);gap:4px}
  body.theme-ashen .heavy-sequence-state{padding:5px 7px;font-size:9.5px}
  body.theme-ashen .battle-action-dock{padding:5px}
  body.theme-ashen .battle-action-row{gap:5px}
  body.theme-ashen .battle-action-row button,
  body.theme-ashen .battle-main-action{height:58px;min-height:58px;max-height:58px;padding:7px 6px}
  body.theme-ashen #attackButton{gap:5px;padding-inline:7px}
  body.theme-ashen #attackButton .battle-action-label{font-size:15px}
  body.theme-ashen #attackButton.crushing-ready .battle-action-label{font-size:13px}
  body.theme-ashen #attackButton small{font-size:10px}
}

@media(max-width:360px){
  body.theme-ashen #attackButton .battle-action-label{font-size:13px}
  body.theme-ashen #attackButton.crushing-ready .battle-action-label{font-size:11px}
  body.theme-ashen #attackButton .battle-action-icon{font-size:16px}
  body.theme-ashen #attackButton small{font-size:9px}
  body.theme-ashen .crushing-charge-segments{grid-template-columns:repeat(3,22px)}
}
