/* Forest Frontier v0.9.0 - restrained rarity shells and mythic item-icon effects */
.item-icon{position:relative;isolation:isolate;display:inline-grid;place-items:center;flex:0 0 auto;border:2px solid rgba(132,124,102,.78);border-radius:11px;background:linear-gradient(145deg,rgba(30,33,29,.96),rgba(7,10,9,.98));box-shadow:inset 0 1px rgba(255,255,255,.05),0 6px 16px rgba(0,0,0,.25);overflow:hidden}
.item-icon::before,.item-icon::after{content:"";position:absolute;inset:0;pointer-events:none;opacity:0}
.item-icon img{position:relative;z-index:2;display:block;width:100%;height:100%;object-fit:contain}
.item-icon-sm{width:42px;height:42px;border-radius:9px}.item-icon-md{width:54px;height:54px}.item-icon-lg{width:72px;height:72px;border-radius:14px}
.item-icon.uncommon{border-color:#67a76f;box-shadow:inset 0 0 18px rgba(78,150,90,.09),0 0 0 1px rgba(103,167,111,.13),0 6px 16px rgba(0,0,0,.24)}
.item-icon.rare{border-color:#55a8d7;box-shadow:inset 0 0 18px rgba(60,139,190,.10),0 0 0 1px rgba(85,168,215,.14),0 6px 16px rgba(0,0,0,.24)}
.item-icon.epic{border-color:#b983cc;background:radial-gradient(circle at 50% 45%,rgba(172,103,199,.15),transparent 62%),linear-gradient(145deg,rgba(30,25,34,.98),rgba(8,8,10,.99));box-shadow:inset 0 0 22px rgba(164,93,193,.16),0 0 0 1px rgba(185,131,204,.16),0 0 13px rgba(154,86,181,.16),0 6px 16px rgba(0,0,0,.25)}
.item-icon.epic::after{z-index:3;inset:-18% -45%;background:linear-gradient(112deg,transparent 36%,rgba(247,229,255,.46) 49%,rgba(211,173,228,.16) 54%,transparent 66%);transform:translateX(-135%) skewX(-16deg);animation:item-icon-sheen 5.8s ease-in-out infinite}
.item-icon.legendary{border-color:#d1a35f;background:radial-gradient(circle at 50% 42%,rgba(218,159,77,.18),transparent 62%),linear-gradient(145deg,rgba(37,29,19,.98),rgba(10,8,6,.99));box-shadow:inset 0 0 24px rgba(206,143,61,.18),0 0 0 1px rgba(220,170,91,.19),0 0 15px rgba(192,126,49,.18),0 6px 16px rgba(0,0,0,.25)}
.item-icon.legendary::before{z-index:1;opacity:.10;background:url("../assets/art/rune-mark.svg") center/78% no-repeat;mix-blend-mode:screen;animation:item-icon-rune-pulse 4.8s ease-in-out infinite}
.item-icon.legendary::after{z-index:3;inset:-20% -48%;background:radial-gradient(circle at 68% 28%,rgba(255,236,176,.8) 0 1.2px,transparent 2.2px),linear-gradient(112deg,transparent 35%,rgba(255,236,184,.5) 49%,rgba(226,165,75,.15) 55%,transparent 67%);transform:translateX(-138%) skewX(-16deg);animation:item-icon-sheen 5.2s ease-in-out infinite}
.item-icon.mythic{border-color:#78d7cb;background:radial-gradient(circle at 35% 30%,rgba(79,211,197,.18),transparent 45%),radial-gradient(circle at 68% 66%,rgba(157,99,209,.18),transparent 48%),linear-gradient(145deg,rgba(17,29,30,.98),rgba(12,8,18,.99));box-shadow:inset 0 0 26px rgba(86,205,194,.16),0 0 0 1px rgba(137,101,196,.20),0 0 17px rgba(91,195,185,.19),0 6px 16px rgba(0,0,0,.25)}
.item-icon.mythic::before{z-index:1;opacity:.12;background:url("../assets/art/rune-mark.svg") center/82% no-repeat;mix-blend-mode:screen;animation:item-icon-mythic-pulse 4.3s ease-in-out infinite}
.item-icon.mythic::after{z-index:3;inset:-22% -50%;background:radial-gradient(circle at 70% 26%,rgba(225,255,250,.9) 0 1.3px,transparent 2.4px),linear-gradient(112deg,transparent 34%,rgba(197,255,247,.48) 47%,rgba(200,166,241,.34) 54%,transparent 68%);transform:translateX(-140%) skewX(-16deg);animation:item-icon-sheen 4.9s ease-in-out infinite}
.item-icon.empty{opacity:.48;border-style:dashed;border-color:rgba(131,140,133,.62);box-shadow:none}
@keyframes item-icon-sheen{0%,64%{opacity:0;transform:translateX(-138%) skewX(-16deg)}70%{opacity:.72}82%{opacity:0;transform:translateX(138%) skewX(-16deg)}100%{opacity:0;transform:translateX(138%) skewX(-16deg)}}
@keyframes item-icon-rune-pulse{0%,100%{opacity:.07;transform:scale(.96)}50%{opacity:.14;transform:scale(1.04)}}
@keyframes item-icon-mythic-pulse{0%,100%{opacity:.08;filter:hue-rotate(0deg);transform:scale(.96)}50%{opacity:.16;filter:hue-rotate(24deg);transform:scale(1.05)}}
.inventory-grid .item:nth-child(3n+2) .item-icon.epic::after,
.inventory-grid .item:nth-child(3n+2) .item-icon.legendary::after,
.inventory-grid .item:nth-child(3n+2) .item-icon.mythic::after{animation-delay:-1.7s}
.inventory-grid .item:nth-child(3n) .item-icon.epic::after,
.inventory-grid .item:nth-child(3n) .item-icon.legendary::after,
.inventory-grid .item:nth-child(3n) .item-icon.mythic::after{animation-delay:-3.4s}
.item-card-layout{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;align-items:start;min-width:0}.item-card-copy{min-width:0}

/* Inventory: preserve two clear columns without crushing item text. */
body.theme-ashen .inventory-grid .item{padding:10px;border-width:1px 1px 1px 2px;border-color:rgba(76,74,64,.82);border-radius:11px;background:linear-gradient(100deg,rgba(22,27,24,.97),rgba(7,10,9,.98) 58%);box-shadow:inset 0 1px rgba(255,255,255,.025),0 7px 18px rgba(0,0,0,.2)}
body.theme-ashen .inventory-grid .item.common{border-left-color:#9b9d96}body.theme-ashen .inventory-grid .item.uncommon{border-left-color:#67a76f}body.theme-ashen .inventory-grid .item.rare{border-left-color:#55a8d7}body.theme-ashen .inventory-grid .item.epic{border-left-color:#b983cc}body.theme-ashen .inventory-grid .item.legendary{border-left-color:#d1a35f}body.theme-ashen .inventory-grid .item.mythic{border-left-color:#78d7cb}
body.theme-ashen .inventory-grid .item-summary{display:grid;grid-template-columns:minmax(0,1fr) 132px;gap:10px;align-items:stretch;min-width:0}
body.theme-ashen .inventory-grid .item-open-button{display:block;width:100%;min-width:0;padding:2px;text-align:left;overflow:hidden}
body.theme-ashen .inventory-grid .item-open-button>div{min-width:0}
body.theme-ashen .inventory-grid .item-card-layout{grid-template-columns:48px minmax(0,1fr);gap:10px}
body.theme-ashen .inventory-grid .item-card-name{font-size:16px;line-height:1.15;overflow-wrap:anywhere}
body.theme-ashen .inventory-grid .item-card-meta{font-size:11px;line-height:1.3}
body.theme-ashen .inventory-grid .inventory-item-stats{gap:3px;margin-top:6px}
body.theme-ashen .inventory-grid .inventory-item-stats .reward-stat-line{font-size:12px;line-height:1.22}
body.theme-ashen .inventory-grid .inventory-item-stats .reward-stat-comparison{font-size:11px}
body.theme-ashen .inventory-grid .item-quick-actions{display:grid;grid-template-rows:1fr 1fr;gap:8px;width:132px;align-self:stretch}
body.theme-ashen .inventory-grid .quick-equip-button,body.theme-ashen .inventory-grid .quick-sell-button{width:100%;min-width:0;min-height:44px;padding:7px 8px;border-radius:9px;font-size:14px;line-height:1.15;white-space:normal}

/* Equipped item details: rune bonuses render only once and equipped stats have no fake comparison. */
.hero-quick-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0}.hero-quick-stats span{display:grid;gap:2px;padding:7px 4px;border:1px solid rgba(73,72,63,.66);border-radius:8px;background:rgba(4,7,6,.62);color:#929994;font-size:8px;text-align:center;text-transform:uppercase;letter-spacing:.07em}.hero-quick-stats strong{color:#eee5d2;font-family:Georgia,serif;font-size:18px;line-height:1.05;letter-spacing:0}
.hero-progress-compact{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0}.hero-progress-row{min-width:0;padding:6px 7px;border:1px solid rgba(62,67,60,.5);border-radius:8px;background:rgba(4,7,6,.46)}.hero-progress-row .bar-label{margin-bottom:4px;font-size:9px}.hero-progress-row .bar{height:6px;margin:0}.hero-progress-row .bar-label span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hero-silhouette-wrap{position:absolute;left:50%;top:65px;transform:translateX(-50%);width:235px;height:330px;display:grid;place-items:center;pointer-events:none}
.hero-silhouette-wrap img{width:100%;height:100%;object-fit:contain;filter:saturate(.62) contrast(1.03) drop-shadow(0 18px 28px rgba(0,0,0,.5));opacity:.48}.hero-silhouette-wrap span{position:absolute;bottom:7px;padding:4px 12px;border:1px solid rgba(92,127,116,.42);border-radius:99px;background:rgba(5,9,8,.8);color:#91b8ae;font-size:9px;letter-spacing:.12em;text-transform:uppercase}
.hero-gear-slot{position:absolute;z-index:2;display:grid;grid-template-columns:auto minmax(0,1fr);gap:7px;align-items:center;width:142px;min-height:68px;padding:7px;text-align:left;border:2px solid rgba(91,88,74,.76);border-radius:12px;background:linear-gradient(145deg,rgba(23,28,24,.96),rgba(6,9,8,.98));box-shadow:0 10px 24px rgba(0,0,0,.3);color:#ddd8cb}
.hero-gear-slot:not(:disabled){cursor:pointer;touch-action:manipulation;user-select:none;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease,filter .16s ease}.hero-gear-slot:not(:disabled):hover{filter:brightness(1.06)}.hero-gear-slot:not(:disabled):active{filter:brightness(.96)}.hero-gear-slot:focus-visible{outline:2px solid rgba(99,190,174,.82);outline-offset:3px}.hero-gear-slot>*{pointer-events:none}.hero-gear-slot span{min-width:0;display:grid;gap:2px}.hero-gear-slot small{color:#a69e8b;font-size:8px;letter-spacing:.09em;text-transform:uppercase}.hero-gear-slot strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:Georgia,serif;font-size:12px}.hero-gear-slot em{font-size:8px;color:#8e9994;font-style:normal;line-height:1.2}.hero-gear-slot.empty{opacity:.64;border-style:dashed}.hero-gear-slot.empty strong{font-family:inherit;font-size:10px;color:#a1aaa4}.hero-gear-slot .item-icon{width:42px;height:42px}
.hero-gear-slot.uncommon{border-color:#5f9d68;box-shadow:0 0 0 1px rgba(95,157,104,.14),0 10px 24px rgba(0,0,0,.3)}.hero-gear-slot.rare{border-color:#4d9dcb;box-shadow:0 0 0 1px rgba(77,157,203,.15),0 10px 24px rgba(0,0,0,.3)}.hero-gear-slot.epic{border-color:#c15ee7;box-shadow:0 0 0 1px rgba(193,94,231,.16),0 10px 24px rgba(0,0,0,.3)}.hero-gear-slot.legendary{border-color:#cd8150;box-shadow:0 0 0 1px rgba(205,129,80,.16),0 10px 24px rgba(0,0,0,.3)}
.hero-gear-head{left:50%;top:10px;transform:translateX(-50%)}.hero-gear-weapon{left:12px;top:88px}.hero-gear-offhand{right:12px;top:88px}.hero-gear-armor{left:50%;top:190px;transform:translateX(-50%);width:150px}.hero-gear-gloves{left:12px;top:294px}.hero-gear-boots{right:12px;top:294px}

/* Battle reward: resources and rarity must be visible at a glance. */

@media(max-width:520px){.hero-quick-stats{gap:4px}.hero-quick-stats span{padding:6px 2px;font-size:7px}.hero-quick-stats strong{font-size:16px}.hero-progress-compact{grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}.hero-progress-row{padding:5px}.hero-progress-row .bar-label{font-size:8px}.hero-silhouette-wrap{top:58px;width:205px;height:300px}.hero-gear-slot{width:116px;min-height:60px;padding:5px;gap:5px}.hero-gear-slot .item-icon{width:36px;height:36px}.hero-gear-slot strong{font-size:10px}.hero-gear-slot small,.hero-gear-slot em{font-size:7px}.hero-gear-head{top:8px}.hero-gear-weapon,.hero-gear-offhand{top:72px}.hero-gear-weapon,.hero-gear-gloves{left:7px}.hero-gear-offhand,.hero-gear-boots{right:7px}.hero-gear-armor{top:170px;width:126px}.hero-gear-gloves,.hero-gear-boots{top:276px}
  body.theme-ashen .inventory-grid .item-summary{grid-template-columns:minmax(0,1fr) 116px;gap:8px}body.theme-ashen .inventory-grid .item-card-layout{grid-template-columns:43px minmax(0,1fr);gap:8px}body.theme-ashen .inventory-grid .item-card-name{font-size:14px}body.theme-ashen .inventory-grid .item-quick-actions{width:116px;gap:7px}body.theme-ashen .inventory-grid .quick-equip-button,body.theme-ashen .inventory-grid .quick-sell-button{min-height:40px;padding:6px;font-size:12px}
}
@media(max-width:390px){.hero-silhouette-wrap{width:188px;height:285px}.hero-gear-slot{width:106px}.hero-gear-armor{width:118px}.hero-gear-gloves,.hero-gear-boots{top:270px}
  body.theme-ashen .inventory-grid .item-summary{grid-template-columns:1fr}body.theme-ashen .inventory-grid .item-quick-actions{grid-template-columns:1fr 1fr;grid-template-rows:auto;width:100%}body.theme-ashen .inventory-grid .quick-equip-button,body.theme-ashen .inventory-grid .quick-sell-button{min-height:38px}
}

@media(prefers-reduced-motion:reduce){.item-icon.epic::after,.item-icon.legendary::after,.item-icon.mythic::after{animation:none;opacity:.12;transform:translateX(12%) skewX(-16deg)}.item-icon.legendary::before,.item-icon.mythic::before{animation:none}}
