/* Forest Frontier v0.9.2 — mobile density, rune tutorial and combat feedback fixes. */

/* Rune tutorial: keep the selected item readable on narrow screens. */
body.theme-ashen .rune-tutorial-detail-note {
  display: grid;
  gap: 3px;
  margin: 0 0 10px;
  padding: 10px 11px;
  border: 1px solid rgba(91, 190, 169, .55);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(18, 54, 46, .82), rgba(7, 20, 17, .9));
  color: #b8d8d0;
  line-height: 1.35;
}
body.theme-ashen .rune-tutorial-detail-note strong { color: #79dec3; }

/* Parry/block feedback is separate from ordinary hit feedback. */
body.theme-ashen .combatant.defense-parry::after,
body.theme-ashen .combatant.defense-block::after {
  position: absolute;
  z-index: 22;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  padding: 5px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: rgba(3, 9, 8, .9);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: .1em;
  white-space: nowrap;
  pointer-events: none;
  animation: defense-confirm-v092 .72s ease-out both;
}
body.theme-ashen .combatant.defense-parry::after { content: "ПАРИРОВАНИЕ"; color: #80e8dc; box-shadow: 0 0 22px rgba(73, 211, 196, .45); }
body.theme-ashen .combatant.defense-block::after { content: "БЛОК"; color: #e7c67a; box-shadow: 0 0 22px rgba(211, 168, 78, .38); }
body.theme-ashen .damage-float.parry {
  color: #8cf1e5 !important;
  font-size: 39px !important;
  text-shadow: 0 2px 9px #000, 0 0 15px #29c9b8, 0 0 30px rgba(35, 179, 164, .65) !important;
  animation: parry-response-v092 1.35s cubic-bezier(.14,.74,.18,1) both !important;
}
body.theme-ashen .damage-float.counter {
  color: #f0ce82 !important;
  font-size: 38px !important;
  text-shadow: 0 2px 9px #000, 0 0 14px #d49d3f, 0 0 28px rgba(190, 126, 38, .62) !important;
  animation: counter-response-v092 1.3s cubic-bezier(.14,.74,.18,1) both !important;
}
body.theme-ashen .combatant.response-parry { animation: parry-card-v092 .62s ease-out both !important; }
body.theme-ashen .combatant.response-counter { animation: counter-card-v092 .62s ease-out both !important; }
@keyframes defense-confirm-v092 { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.72); } 24% { opacity: 1; transform: translate(-50%, -58%) scale(1.08); } 100% { opacity: 0; transform: translate(-50%, -92%) scale(.96); } }
@keyframes parry-response-v092 { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.7) rotate(-4deg); } 22% { opacity: 1; transform: translate(-50%, -4px) scale(1.16) rotate(2deg); } 76% { opacity: 1; transform: translate(-50%, -30px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -48px) scale(.92); } }
@keyframes counter-response-v092 { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.72); } 22% { opacity: 1; transform: translate(-50%, -4px) scale(1.12); } 100% { opacity: 0; transform: translate(-50%, -46px) scale(.92); } }
@keyframes parry-card-v092 { 0% { filter: brightness(1); transform: translateX(0); } 34% { filter: brightness(1.7) saturate(1.35); transform: translateX(-4px); box-shadow: 0 0 0 2px rgba(77, 222, 206, .58), 0 0 28px rgba(49, 183, 168, .28); } 100% { filter: brightness(1); transform: translateX(0); } }
@keyframes counter-card-v092 { 0% { filter: brightness(1); transform: translateX(0); } 34% { filter: brightness(1.55); transform: translateX(-4px); box-shadow: 0 0 0 2px rgba(226, 185, 93, .5), 0 0 24px rgba(191, 137, 48, .25); } 100% { filter: brightness(1); transform: translateX(0); } }

/* Shop showcase: icon must own its grid column and never cover the title. */

/* Inventory: keep actions in one compact row and show more cards at 360x760. */
@media (max-width: 420px) {
  body.theme-ashen.screen-inventory-active .screen-panel { padding: 10px; }
  body.theme-ashen.screen-inventory-active .screen-panel > .section-label { margin-bottom: 2px; }
  body.theme-ashen.screen-inventory-active .inventory-head { gap: 6px; margin-bottom: 8px; }
  body.theme-ashen.screen-inventory-active .inventory-head h2 { font-size: 22px; }
  body.theme-ashen.screen-inventory-active .inventory-head-actions {
    display: grid !important;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 6px;
    width: 100%;
  }
  body.theme-ashen.screen-inventory-active .inventory-head-actions > button,
  body.theme-ashen.screen-inventory-active .inventory-head-actions .inventory-bulk-actions { width: 100%; }
  body.theme-ashen.screen-inventory-active #inventoryRunesButton { min-height: 38px; padding: 6px; }
  body.theme-ashen.screen-inventory-active .inventory-bulk-actions { display: grid; grid-template-columns: 1fr; gap: 0; }
  body.theme-ashen.screen-inventory-active .inventory-sell-all { min-height: 38px; padding: 5px 7px; }
  body.theme-ashen.screen-inventory-active .inventory-sell-all span { font-size: 11px; }
  body.theme-ashen.screen-inventory-active .inventory-sell-all small { font-size: 9px; }
  body.theme-ashen.screen-inventory-active .inventory-grid { gap: 6px; }
  body.theme-ashen.screen-inventory-active .inventory-grid .item { padding: 7px; }
  body.theme-ashen.screen-inventory-active .inventory-grid .item-summary {
    grid-template-columns: minmax(0, 1fr) 92px !important;
    gap: 7px;
    align-items: stretch;
  }
  body.theme-ashen.screen-inventory-active .inventory-grid .item-card-layout { grid-template-columns: 38px minmax(0, 1fr); gap: 7px; }
  body.theme-ashen.screen-inventory-active .inventory-grid .item-card-layout > .item-icon { width: 38px; height: 38px; }
  body.theme-ashen.screen-inventory-active .inventory-grid .item-card-name { font-size: 14px; line-height: 1.08; }
  body.theme-ashen.screen-inventory-active .inventory-grid .item-card-meta { font-size: 10px; }
  body.theme-ashen.screen-inventory-active .inventory-grid .inventory-item-stats { margin-top: 4px; }
  body.theme-ashen.screen-inventory-active .inventory-grid .inventory-item-stats .reward-stat-line { font-size: 11px; line-height: 1.14; }
  body.theme-ashen.screen-inventory-active .inventory-grid .inventory-item-stats .reward-stat-comparison { font-size: 9.5px; }
  body.theme-ashen.screen-inventory-active .inventory-grid .item-socket-summary.compact { margin-top: 4px; }
  body.theme-ashen.screen-inventory-active .inventory-grid .item-quick-actions {
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr 1fr !important;
    width: 92px !important;
    gap: 5px;
  }
  body.theme-ashen.screen-inventory-active .inventory-grid .quick-equip-button,
  body.theme-ashen.screen-inventory-active .inventory-grid .quick-sell-button { min-height: 34px; padding: 5px; font-size: 11px; }
}

/* Hero tab: the equipment overview is a single-screen dashboard on short phones. */

@media (prefers-reduced-motion: reduce) {
  body.theme-ashen .combatant.defense-parry::after,
  body.theme-ashen .combatant.defense-block::after,
  body.theme-ashen .damage-float.parry,
  body.theme-ashen .damage-float.counter,
  body.theme-ashen .combatant.response-parry,
  body.theme-ashen .combatant.response-counter { animation: none !important; }
}
