/* v0.8.2 — chapter II resources, runes and relic smith */
body.theme-ashen .top-shards {
  color: #78c9bd;
  border-color: rgba(93, 177, 165, .35);
  background: rgba(18, 54, 52, .35);
}
.ruins-floor-rewards { color: var(--muted); line-height: 1.45; }
.item-socket-summary { display:flex; align-items:center; gap:8px; margin-top:7px; color:var(--muted); font-size:12px; }
.item-socket-summary.compact { margin-top:4px; }
.socket-glyphs { display:inline-flex; gap:4px; }
.socket-glyph { display:inline-grid; place-items:center; width:22px; height:22px; border:1px solid rgba(115,198,187,.45); border-radius:50%; background:rgba(5,16,16,.75); color:#75c8bb; font-size:12px; }
.socket-glyph.empty { color:#5c6664; border-color:#3d4745; }
.rune-shelf { display:flex; flex-wrap:wrap; gap:8px; }
.rune-chip,
.rune-install-button { border:1px solid rgba(103,176,165,.38); border-radius:9px; background:rgba(10,25,24,.72); color:#b9d9d3; }
.rune-chip { display:flex; flex-direction:column; gap:2px; padding:8px 10px; }
.rune-chip small,
.rune-install-button small { color:var(--muted); font-size:11px; }
.rune-install-button { min-height:42px; padding:7px 10px; }
.rune-install-button { display:flex; flex-direction:column; align-items:flex-start; }
.rune-uncommon { border-color:rgba(96,175,108,.62)!important; color:#8fd09a!important; }
.rune-rare { border-color:rgba(68,154,207,.68)!important; color:#83c9ef!important; }
.reward-relics { color:#76c8bc; font-weight:800; }
.ruins-floor-hidden { border-style:dashed; opacity:.78; }
.chapter-complete { border-color:rgba(113,195,180,.55); background:rgba(12,35,32,.45); }
.ruins-floor-rewards { margin-top:7px; color:#72b5ab; font-size:12px; }
@media (max-width: 430px) {
}

/* v0.8.2 final MVP alignment */
body.theme-ashen .stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.rune-glyph{display:inline-grid;place-items:center;min-width:30px;height:30px;border:1px solid currentColor;border-radius:50%;font-size:16px;box-shadow:0 0 12px currentColor}
.rune-common{color:#b9c6c2!important;border-color:rgba(158,176,170,.48)!important}
.rune-uncommon{color:#8fd09a!important;border-color:rgba(96,175,108,.62)!important}
.rune-rare{color:#83c9ef!important;border-color:rgba(68,154,207,.68)!important}

.item-detail-runes{display:grid;gap:5px;margin-top:8px}
.item-detail-runes>span{padding:7px 9px;border:1px solid currentColor;border-radius:8px;background:rgba(9,16,15,.65);font-size:12px}
.reward-relics{white-space:nowrap}

.ruins-floor-rewards{padding-top:2px}
.ruins-floor-card.completed .ruins-floor-status{color:#90c99a}

@media(max-width:700px){
  body.theme-ashen .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* v0.8.3: compact mobile rewards, expedition summary and development tools */
body.theme-ashen .ruins-result-detailed {
  display: grid;
  gap: 12px;
  padding: 14px;
  text-align: left;
}
body.theme-ashen .ruins-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
body.theme-ashen .ruins-summary-head span,
body.theme-ashen .ruins-summary-loot h4 {
  display: block;
  margin: 0 0 3px;
  color: #b99d67;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
body.theme-ashen .ruins-summary-head strong { display: block; color: #eee7d7; font: 700 20px/1.15 Georgia, serif; }
body.theme-ashen .ruins-summary-head > b { color: #76c5b1; white-space: nowrap; }
body.theme-ashen .ruins-summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
body.theme-ashen .ruins-summary-metrics > div {
  min-width: 0;
  padding: 9px 6px;
  border: 1px solid rgba(91, 124, 113, .35);
  border-radius: 8px;
  background: rgba(8, 14, 12, .55);
  text-align: center;
}
body.theme-ashen .ruins-summary-metrics span { display:block; color:#8fa099; font-size:10px; }
body.theme-ashen .ruins-summary-metrics strong { display:block; color:#e4d3a5; font-size:17px; }
body.theme-ashen .ruins-summary-unlocks { display:grid; gap:5px; }
body.theme-ashen .ruins-summary-unlocks span { padding:7px 9px; border-left:2px solid #62b59e; color:#a8d7c9; background:rgba(44,104,87,.12); }
body.theme-ashen .ruins-summary-drops { display:grid; gap:10px; }
body.theme-ashen .ruins-summary-loot { display:grid; gap:5px; }
body.theme-ashen .ruins-summary-loot > div { display:flex; justify-content:space-between; gap:10px; padding:7px 9px; border:1px solid rgba(84,103,96,.35); border-radius:7px; }
body.theme-ashen .ruins-summary-loot small { color:#9fa8a3; text-align:right; }
body.theme-ashen .ruins-summary-empty { color:#89938e; font-style:italic; }
body.theme-ashen .button-link { display:flex; align-items:center; justify-content:center; text-decoration:none; }
body.theme-ashen .tutorial-focus,
body.theme-ashen .tutorial-ready { animation: relicTutorialPulse 1.35s ease-in-out infinite; }
body.theme-ashen .damage-float { z-index: 18; isolation:isolate; }
body.theme-ashen .combatant { isolation:isolate; overflow:visible; }
@keyframes relicTutorialPulse { 0%,100%{box-shadow:0 0 0 0 rgba(103,203,171,.08)} 50%{box-shadow:0 0 0 4px rgba(103,203,171,.20),0 0 24px rgba(66,176,146,.18)} }
@media (max-width:560px) {
  body.theme-ashen .ruins-summary-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.theme-ashen .ruins-summary-loot > div { display:grid; gap:2px; }
  body.theme-ashen .ruins-summary-loot small { text-align:left; }
}

/* v0.8.5 — обучение Лавке, архив рун и надёжные цифры урона */
body.theme-ashen .damage-float.visible {
  opacity: 1;
}

body.theme-ashen .inventory-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

body.theme-ashen .runes-map-card {
  border-color: rgba(77, 179, 169, .36);
}

body.theme-ashen .rune-vault-panel {
  display: grid;
  gap: 18px;
}

body.theme-ashen .rune-vault-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.theme-ashen .rune-vault-summary > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(90, 145, 133, .34);
  border-radius: 11px;
  background: rgba(7, 16, 15, .72);
}

body.theme-ashen .rune-vault-summary span {
  color: #9ea8a1;
}

body.theme-ashen .rune-vault-summary strong {
  color: #d8c28b;
  font-size: 22px;
}

body.theme-ashen .rune-codex-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.theme-ashen .rune-codex-card,
body.theme-ashen .rune-vault-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid rgba(90, 145, 133, .28);
  border-radius: 11px;
  background: rgba(7, 14, 14, .75);
}

body.theme-ashen .rune-codex-card strong,
body.theme-ashen .rune-vault-row strong {
  display: block;
  color: #e1ddcf;
}

body.theme-ashen .rune-codex-card small,
body.theme-ashen .rune-vault-row small {
  display: block;
  margin-top: 3px;
  color: #9aa39d;
  line-height: 1.35;
}

body.theme-ashen .rune-vault-list {
  display: grid;
  gap: 8px;
}

body.theme-ashen .rune-vault-row.installed {
  border-color: rgba(190, 150, 78, .32);
}

body.theme-ashen .item-rune-bonuses {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-top: 7px;
}

body.theme-ashen .item-rune-bonuses span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid rgba(97, 166, 151, .24);
  border-radius: 7px;
  color: #9fcdbf;
  font-size: 12px;
  line-height: 1.25;
}

body.theme-ashen .item-rune-bonuses.compact {
  margin-top: 5px;
}

@media (max-width: 720px) {
  body.theme-ashen .inventory-head-actions {
    width: 100%;
    flex-direction: column;
  }
  body.theme-ashen .inventory-head-actions > button,
  body.theme-ashen .inventory-head-actions .inventory-bulk-actions {
    width: 100%;
  }
  body.theme-ashen .rune-codex-grid {
    grid-template-columns: 1fr;
  }
  body.theme-ashen .rune-vault-summary {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen .damage-float.show,
  body.theme-ashen .damage-float.visible {
    animation: none !important;
    opacity: 1 !important;
    transform: translate(-50%, -12px) !important;
  }
}

/* v0.8.5 — явное состояние закрытой Лавки */
body.theme-ashen .bottom-nav .nav-button.nav-locked,
body.theme-ashen .bottom-nav .nav-button:disabled {
  opacity: .42;
  filter: grayscale(.85);
  cursor: not-allowed;
}
body.theme-ashen .bottom-nav .nav-button.nav-locked .nav-glyph::after {
  content: '·';
  position: absolute;
  right: -2px;
  top: -7px;
  color: #b99452;
  font-size: 18px;
}

/* v0.8.5 — карта Руин, слияние рун и компактные мобильные награды */
body.theme-ashen .map-chapter-section { display:grid; gap:9px; margin-top:18px; }
body.theme-ashen .map-chapter-section:first-of-type { margin-top:10px; }
body.theme-ashen .map-section-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding:0 3px; border-bottom:1px solid rgba(118,103,72,.35); }
body.theme-ashen .map-section-head span { color:#8b9a93; font-size:10px; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }
body.theme-ashen .map-section-head strong { color:#d7c48f; font:700 15px/1.2 Georgia,serif; }
body.theme-ashen .future-chapter-card { opacity:.62; cursor:default; border-style:dashed; }
body.theme-ashen .future-chapter-card::before { content:'⌛'; margin-right:8px; color:#8e7d56; }

body.theme-ashen .ruins-active-run { display:grid; gap:12px; margin-top:12px; }
body.theme-ashen .ruins-active-run[hidden] { display:none; }
body.theme-ashen .ruins-route-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
body.theme-ashen .ruins-route-head h3 { margin:1px 0 0; color:#ece2ca; font:700 19px/1.2 Georgia,serif; }
body.theme-ashen .ruins-route-status { color:#8fcdbd; font-size:12px; font-weight:850; text-align:right; }
body.theme-ashen .ruins-route-map { position:relative; width:100%; overflow-x:auto; overflow-y:hidden; padding:8px 0 14px; border:1px solid rgba(88,116,107,.45); border-radius:12px; background:radial-gradient(circle at 50% 20%,rgba(54,116,99,.13),transparent 58%),rgba(6,12,11,.72); scrollbar-width:thin; }
body.theme-ashen .ruins-route-canvas { position:relative; min-width:420px; margin:0 auto; }
body.theme-ashen .ruins-route-canvas svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
body.theme-ashen .ruins-route-canvas line { stroke:#3a4843; stroke-width:3; stroke-linecap:round; opacity:.62; }
body.theme-ashen .ruins-route-canvas line.active { stroke:#68b69f; filter:drop-shadow(0 0 4px #5aa98e88); opacity:1; }
body.theme-ashen .ruins-route-node { position:absolute; z-index:2; width:70px; min-height:58px; padding:6px 4px; transform:translate(-50%,-50%); border:1px solid #46534e; border-radius:12px; background:linear-gradient(180deg,#18201d,#0d1211); color:#9da9a4; box-shadow:0 6px 18px #0008; display:grid; place-items:center; gap:2px; }
body.theme-ashen .ruins-route-node > span { font-size:20px; line-height:1; }
body.theme-ashen .ruins-route-node > small { max-width:64px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:8px; line-height:1.1; }
body.theme-ashen .ruins-route-node.completed { border-color:#4f7869; color:#82bda9; background:#101916; }
body.theme-ashen .ruins-route-node.completed::after { content:'✓'; position:absolute; right:-4px; top:-6px; width:18px; height:18px; display:grid; place-items:center; border-radius:50%; background:#477965; color:#e7fff6; font-size:11px; }
body.theme-ashen .ruins-route-node.available { border-color:#c0a05b; color:#f2d893; box-shadow:0 0 0 2px rgba(192,160,91,.2),0 0 24px rgba(192,160,91,.28); animation:routeNodePulse 1.5s ease-in-out infinite; }
body.theme-ashen .ruins-route-node.available:hover { transform:translate(-50%,-50%) scale(1.05); }
body.theme-ashen .ruins-route-node.event { color:#86d5c1; }
body.theme-ashen .ruins-route-node.rare { color:#6cc7ff; }
body.theme-ashen .ruins-route-node.boss { color:#ef9d7b; border-color:#8c4b3b; }
body.theme-ashen .ruins-route-node:disabled { cursor:default; opacity:.58; }
body.theme-ashen .ruins-leave-button { width:100%; }
@keyframes routeNodePulse { 50% { box-shadow:0 0 0 4px rgba(192,160,91,.1),0 0 30px rgba(192,160,91,.38); } }

body.theme-ashen .rune-codex-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
body.theme-ashen .rune-codex-card.compact { min-height:52px; padding:8px 9px; gap:8px; }
body.theme-ashen .rune-vault-list { gap:6px; }
body.theme-ashen .rune-vault-row.grouped { grid-template-columns:30px minmax(0,1fr) auto minmax(92px,auto); min-height:58px; padding:8px 9px; gap:8px; }
body.theme-ashen .rune-vault-copy { min-width:0; }
body.theme-ashen .rune-vault-copy strong,.rune-vault-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.theme-ashen .rune-count { min-width:32px; color:#e1d39f; font-size:15px; text-align:center; }
body.theme-ashen .rune-fuse-button { display:grid; gap:1px; min-width:96px; padding:7px 8px; font-size:10px; }
body.theme-ashen .rune-fuse-button small { color:#80b9aa; font-size:9px; }
body.theme-ashen .rune-vault-row.installed { grid-template-columns:30px minmax(0,1fr); min-height:50px; padding:8px 9px; }

body.theme-ashen .damage-float { z-index:24; min-width:54px; text-align:center; }
body.theme-ashen .damage-float::before { content:attr(data-label); position:absolute; left:50%; bottom:100%; transform:translateX(-50%); color:inherit; font-size:9px; font-weight:1000; letter-spacing:.12em; white-space:nowrap; }
body.theme-ashen .damage-float[data-label=""]::before { display:none; }
body.theme-ashen .damage-float.crit { color:#ffda58; font-size:44px; text-shadow:0 2px 9px #000,0 0 12px #ff9d00,0 0 28px #ff5d2e; animation:criticalDamageImpact 1.25s cubic-bezier(.12,.75,.18,1); }
body.theme-ashen .damage-float.perfect { color:#fff1aa; font-size:38px; text-shadow:0 2px 9px #000,0 0 20px #d8be65; }
body.theme-ashen .damage-float.heal { color:#4af27d !important; font-size:36px; text-shadow:0 2px 8px #000,0 0 15px #20c95d,0 0 28px #20c95d88 !important; }
body.theme-ashen .combatant.hit-critical { animation:criticalCardHit .56s ease-out; }
body.theme-ashen .combatant.hit-perfect { animation:perfectCardHit .46s ease-out; }
@keyframes criticalDamageImpact { 0%{opacity:0;transform:translate(-50%,14px) scale(.45) rotate(-7deg)} 18%{opacity:1;transform:translate(-50%,-4px) scale(1.3) rotate(3deg)} 35%{transform:translate(-50%,-12px) scale(.98)} 100%{opacity:0;transform:translate(-50%,-55px) scale(1.05)} }
@keyframes criticalCardHit { 20%{filter:brightness(2.2) saturate(1.7);box-shadow:inset 0 0 70px #ffb33188,0 0 36px #ff6a3288} }
@keyframes perfectCardHit { 25%{filter:brightness(1.8);box-shadow:inset 0 0 55px #e4cf7d66} }

body.theme-ashen .enemy-defeat-banner { top:43%; width:calc(100% - 8px); padding:12px 8px; font-size:12px; letter-spacing:.12em; border-width:2px; animation:defeatBannerReveal .8s ease both; }
body.theme-ashen .enemy-defeat-banner.boss { font-size:15px; padding:15px 8px; }
@keyframes defeatBannerReveal { 0%{opacity:0;transform:translate(-50%,-42%) scale(.72)} 24%{opacity:1;transform:translate(-50%,-50%) scale(1.06)} 100%{opacity:1;transform:translate(-50%,-50%) scale(1)} }
body.theme-ashen .enemy-power-intent { box-shadow:0 0 0 2px rgba(220,85,48,.34),0 0 34px rgba(220,70,30,.24); }
body.theme-ashen .enemy-intent { color:#ffd0b7; background:linear-gradient(180deg,#521f18,#28110e); border:1px solid #b85d43; font-weight:1000; letter-spacing:.05em; animation:dangerIntentPulse 1s ease-in-out infinite; }
@keyframes dangerIntentPulse { 50%{filter:brightness(1.25);box-shadow:0 0 20px #d84c3055} }

body.theme-ashen .ruins-result-detailed { max-height:min(66dvh,590px); overflow:hidden; padding:10px; }
body.theme-ashen .ruins-summary-head { margin-bottom:7px; }
body.theme-ashen .ruins-summary-head strong { font-size:17px; }
body.theme-ashen .ruins-summary-metrics.compact { grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
body.theme-ashen .ruins-summary-metrics.compact > div { min-width:0; padding:6px 4px; }
body.theme-ashen .ruins-summary-metrics.compact strong { font-size:14px; }
body.theme-ashen .ruins-summary-drops.compact-scroll { max-height:270px; overflow-y:auto; gap:7px; padding-right:2px; scrollbar-width:thin; }
body.theme-ashen .ruins-summary-group { display:grid; gap:4px; }
body.theme-ashen .ruins-summary-group h4 { margin:2px 0; color:#b5aa8b; font-size:10px; letter-spacing:.09em; text-transform:uppercase; }
body.theme-ashen .ruins-summary-drop-row { display:flex; justify-content:space-between; align-items:center; gap:8px; min-height:34px; padding:5px 7px; border:1px solid rgba(84,103,96,.35); border-radius:7px; background:rgba(7,12,11,.55); }
body.theme-ashen .ruins-summary-drop-row span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
body.theme-ashen .ruins-summary-drop-row small { flex:0 0 auto; color:#94a19b; font-size:9px; text-align:right; }

@media (max-width:600px) {
  body.theme-ashen .map-section-head { align-items:flex-start; flex-direction:column; gap:2px; }
  body.theme-ashen .ruins-route-head { display:grid; gap:4px; }
  body.theme-ashen .ruins-route-status { text-align:left; }
  body.theme-ashen .rune-codex-grid { grid-template-columns:1fr 1fr; }
  body.theme-ashen .rune-vault-row.grouped { grid-template-columns:28px minmax(0,1fr) 34px; }
  body.theme-ashen .rune-fuse-button { grid-column:2 / 4; width:100%; min-width:0; }
  body.theme-ashen .ruins-result-detailed { max-height:calc(100dvh - 220px); }
  body.theme-ashen .ruins-summary-metrics.compact { grid-template-columns:repeat(2,minmax(0,1fr)); }
  body.theme-ashen .ruins-summary-drops.compact-scroll { max-height:220px; }
  body.theme-ashen .ruins-summary-drop-row { align-items:flex-start; display:grid; gap:1px; }
  body.theme-ashen .ruins-summary-drop-row small { text-align:left; }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen .ruins-route-node.available,body.theme-ashen .enemy-intent { animation:none!important; }
  body.theme-ashen .damage-float.crit,body.theme-ashen .damage-float.perfect,body.theme-ashen .damage-float.heal { animation:none!important; opacity:1!important; }
}

/* v0.8.5 final overrides — reliable mobile layout and combat feedback */
body.theme-ashen,
body.theme-ashen * { box-sizing: border-box; }

/* Ruins route: static three-lane grid, no absolute canvas and no horizontal drift. */
body.theme-ashen .ruins-route-map {
  position: relative;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
  border-color: rgba(91, 132, 119, .48);
}
body.theme-ashen .ruins-route-map::before {
  content: '';
  position: absolute;
  top: 22px;
  bottom: 22px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, #435b53 8%, #435b53 92%, transparent);
  opacity: .55;
  pointer-events: none;
}
body.theme-ashen .ruins-route-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin: 0 0 10px;
}
body.theme-ashen .ruins-route-row:last-child { margin-bottom: 0; }
body.theme-ashen .ruins-node-spacer { min-height: 64px; }
body.theme-ashen .ruins-route-node {
  position: relative;
  inset: auto;
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 7px 5px;
  transform: none;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  justify-items: stretch;
  gap: 5px;
  border-radius: 10px;
  text-align: left;
  overflow: hidden;
}
body.theme-ashen .ruins-route-node.available:hover { transform: translateY(-1px); }
body.theme-ashen .ruins-route-node.current {
  border-color: #7ed1b8;
  color: #e9fff8;
  box-shadow: 0 0 0 2px rgba(99, 197, 166, .18), 0 0 24px rgba(71, 176, 142, .22);
}
body.theme-ashen .ruins-route-node.locked { opacity: .46; filter: grayscale(.25); }
body.theme-ashen .ruins-route-node.completed { opacity: .78; }
body.theme-ashen .ruins-route-node .ruins-node-glyph {
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}
body.theme-ashen .ruins-route-node .ruins-node-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}
body.theme-ashen .ruins-route-node .ruins-node-copy strong,
body.theme-ashen .ruins-route-node .ruins-node-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.theme-ashen .ruins-route-node .ruins-node-copy strong { font-size: 10px; line-height: 1.15; }
body.theme-ashen .ruins-route-node .ruins-node-copy small { color: #8f9d97; font-size: 8px; }
body.theme-ashen .ruins-route-node.completed::after { right: 2px; top: 2px; }

/* Compact, grouped rune vault. */
body.theme-ashen .rune-vault-panel { min-width: 0; overflow: hidden; }
body.theme-ashen .rune-vault-panel section { min-width: 0; }
body.theme-ashen .rune-vault-list { width: 100%; min-width: 0; }
body.theme-ashen .rune-stack-row {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 48px minmax(112px, auto);
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid rgba(79, 100, 92, .46);
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(20, 28, 25, .92), rgba(10, 15, 13, .92));
}
body.theme-ashen .rune-stack-row .rune-glyph { font-size: 22px; text-align: center; }
body.theme-ashen .rune-stack-copy,
body.theme-ashen .rune-stack-action,
body.theme-ashen .rune-stack-count { min-width: 0; }
body.theme-ashen .rune-stack-copy { display: grid; gap: 2px; }
body.theme-ashen .rune-stack-copy strong,
body.theme-ashen .rune-stack-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.theme-ashen .rune-stack-copy strong { color: #e5decb; font-size: 12px; }
body.theme-ashen .rune-stack-copy small { color: #94a19b; font-size: 10px; }
body.theme-ashen .rune-stack-count { display: grid; justify-items: center; line-height: 1.1; }
body.theme-ashen .rune-stack-count strong { color: #e5d29a; font-size: 15px; }
body.theme-ashen .rune-stack-count small { color: #87938d; font-size: 8px; }
body.theme-ashen .rune-stack-action { display: flex; justify-content: flex-end; }
body.theme-ashen .rune-stack-action .rune-fuse-button,
body.theme-ashen .rune-stack-action .rune-max-tier {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 7px 8px;
  font-size: 10px;
  line-height: 1.15;
  text-align: center;
}
body.theme-ashen .rune-max-tier { color: #8d9993; }
body.theme-ashen .rune-installed-item {
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid rgba(89, 115, 104, .42);
  border-radius: 9px;
  background: rgba(10, 16, 14, .72);
}
body.theme-ashen .rune-installed-head {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
body.theme-ashen .rune-installed-head strong,
body.theme-ashen .rune-installed-head small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.theme-ashen .rune-installed-head strong { color: #e6dfcb; font-size: 12px; }
body.theme-ashen .rune-installed-head small { color: #89968f; font-size: 9px; }
body.theme-ashen .rune-installed-chips { display: flex; flex-wrap: wrap; gap: 5px; }
body.theme-ashen .rune-chip {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid rgba(92, 132, 118, .38);
  border-radius: 999px;
  color: #bbd2c9;
  font-size: 9px;
  line-height: 1.2;
}

/* Rune tutorial: one focused action above the fold, all other navigation locked. */

/* Critical, power, heal and victory feedback. */
body.theme-ashen .damage-float.critical,
body.theme-ashen .damage-float.crit {
  color: #ffdf58 !important;
  font-size: 46px !important;
  font-weight: 1000;
  text-shadow: 0 2px 9px #000, 0 0 12px #ffb300, 0 0 30px #ff572e !important;
  animation: criticalDamageImpact 1.25s cubic-bezier(.12,.75,.18,1) both !important;
}
body.theme-ashen .damage-float.power {
  color: #ff795d !important;
  font-size: 42px !important;
  font-weight: 1000;
  text-shadow: 0 2px 9px #000, 0 0 15px #ff4e32, 0 0 30px #d82f1f !important;
  animation: powerDamageImpact 1.15s cubic-bezier(.16,.72,.2,1) both !important;
}
body.theme-ashen .damage-float.heal {
  color: #4af27d !important;
  font-size: 38px !important;
  font-weight: 1000;
  text-shadow: 0 2px 8px #000, 0 0 15px #20c95d, 0 0 28px #20c95d88 !important;
  animation: healNumberRise 1.05s ease-out both !important;
}
body.theme-ashen .combatant.hit-critical { animation: criticalCardHit .62s ease-out both !important; }
body.theme-ashen .combatant.hit-power { animation: powerCardHit .62s ease-out both !important; }
body.theme-ashen .combatant.heal-pulse { animation: healCardPulse .65s ease-out both !important; }
body.theme-ashen .power-defense-required {
  border-color: #ef694b !important;
  color: #fff1e8 !important;
  background: linear-gradient(180deg, #712d21, #35150f) !important;
  box-shadow: 0 0 0 3px rgba(232, 86, 52, .16), 0 0 24px rgba(232, 76, 42, .38) !important;
  animation: defendRequiredPulse .78s ease-in-out infinite !important;
}
body.theme-ashen .enemy-defeat-banner {
  z-index: 30;
  color: #f5df9f;
  background: linear-gradient(90deg, transparent, rgba(35, 28, 15, .96) 12%, rgba(35, 28, 15, .96) 88%, transparent);
  border-top: 2px solid #b99a53;
  border-bottom: 2px solid #b99a53;
  text-shadow: 0 2px 8px #000, 0 0 12px rgba(217, 179, 82, .65);
  box-shadow: 0 0 36px rgba(201, 155, 55, .22);
}
body.theme-ashen .enemy-defeat-banner.boss {
  color: #ffe0b4;
  border-color: #d06c4e;
  background: linear-gradient(90deg, transparent, rgba(65, 24, 17, .97) 10%, rgba(65, 24, 17, .97) 90%, transparent);
  text-shadow: 0 2px 8px #000, 0 0 18px rgba(234, 89, 55, .65);
}
@keyframes powerDamageImpact {
  0% { opacity: 0; transform: translate(-50%, 15px) scale(.48); }
  18% { opacity: 1; transform: translate(-50%, -4px) scale(1.28); }
  42% { transform: translate(-50%, -12px) scale(.98); }
  100% { opacity: 0; transform: translate(-50%, -48px) scale(1.04); }
}
@keyframes powerCardHit { 24% { filter: brightness(2.15) saturate(1.55); box-shadow: inset 0 0 72px #ff553888, 0 0 34px #d9362788; transform: translateX(-5px); } }
@keyframes healNumberRise { 0% { opacity: 0; transform: translate(-50%, 7px) scale(.72); } 22% { opacity: 1; transform: translate(-50%, -6px) scale(1.14); } 100% { opacity: 0; transform: translate(-50%, -45px) scale(1); } }
@keyframes healCardPulse { 35% { filter: brightness(1.55); box-shadow: inset 0 0 58px rgba(48, 222, 105, .36), 0 0 24px rgba(48, 222, 105, .24); } }
@keyframes defendRequiredPulse { 50% { filter: brightness(1.22); transform: translateY(-1px); } }

/* Potion copy and compact Ruins rewards/results. */
body.theme-ashen .ruins-heal-button { display: grid; gap: 1px; place-content: center; line-height: 1.1; }
body.theme-ashen .ruins-heal-button span { font-size: 12px; font-weight: 900; }
body.theme-ashen .ruins-heal-button small { color: #7fce9b; font-size: 9px; font-weight: 800; }
body.theme-ashen .battle-result-card.ruins-reward-compact,
body.theme-ashen .ruins-result-detailed,
body.theme-ashen .ruins-summary,
body.theme-ashen .reward-loot-content,
body.theme-ashen .reward-item-stat,
body.theme-ashen .reward-rune-drop {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
body.theme-ashen .ruins-result-detailed { overflow: hidden; }
body.theme-ashen .ruins-summary-drops.compact-scroll { width: 100%; min-width: 0; overflow-x: hidden; }
body.theme-ashen .ruins-summary-drop-row { width: 100%; min-width: 0; }
body.theme-ashen .ruins-summary-drop-row span { white-space: normal; overflow-wrap: anywhere; }

@media (max-width: 600px) {
  body.theme-ashen .ruins-route-map { padding: 8px 5px; }
  body.theme-ashen .ruins-route-row { gap: 5px; margin-bottom: 7px; }
  body.theme-ashen .ruins-node-spacer { min-height: 57px; }
  body.theme-ashen .ruins-route-node {
    min-height: 57px;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 3px;
    padding: 6px 4px;
  }
  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: 7px; }

  body.theme-ashen .rune-codex-grid { grid-template-columns: 1fr 1fr; gap: 5px; }
  body.theme-ashen .rune-codex-card.compact { min-height: 44px; padding: 6px; gap: 5px; }
  body.theme-ashen .rune-codex-card.compact .rune-glyph { font-size: 18px; }
  body.theme-ashen .rune-codex-card.compact strong { font-size: 10px; }
  body.theme-ashen .rune-codex-card.compact small { font-size: 8px; }
  body.theme-ashen .rune-stack-row {
    grid-template-columns: 25px minmax(0, 1fr) 38px;
    gap: 6px;
    padding: 7px;
  }
  body.theme-ashen .rune-stack-action { grid-column: 2 / 4; }
  body.theme-ashen .rune-stack-action .rune-fuse-button,
  body.theme-ashen .rune-stack-action .rune-max-tier { min-height: 32px; padding: 6px; }
  body.theme-ashen .rune-installed-head { display: grid; gap: 2px; }
  body.theme-ashen .ruins-result-detailed { max-height: calc(100dvh - 185px); padding: 8px; }
  body.theme-ashen .ruins-summary-drops.compact-scroll { max-height: 190px; }
}

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen .damage-float.critical,
  body.theme-ashen .damage-float.crit,
  body.theme-ashen .damage-float.power,
  body.theme-ashen .damage-float.heal {
    animation: none !important;
    opacity: 1 !important;
    transform: translate(-50%, -18px) !important;
  }
  body.theme-ashen .combatant.hit-critical,
  body.theme-ashen .combatant.hit-power,
  body.theme-ashen .combatant.heal-pulse,
  body.theme-ashen .power-defense-required { animation: none !important; }
}

