/* Hero panels share the small painted frames used by the combat skill bar. */
#hero .v13-identity-title{display:flex;align-items:center;gap:7px;min-height:26px;flex-wrap:wrap;}
#hero .v13-identity-title h2{margin:0;line-height:1.15;}
#hero .v13-identity-level{display:inline-flex;align-items:center;justify-content:center;align-self:center;line-height:1;height:18px;padding:0 5px;white-space:nowrap;transform:none;margin:0;}
#hero .v13-vitals-panel{padding:10px;}
#hero .hero-combat-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:5px 0 0;margin-top:7px;}
#hero .hero-combat-stats>button{min-width:0;min-height:42px;display:flex;gap:5px;align-items:center;justify-content:flex-start;padding:5px 6px;border:0;border-right:1px solid #ded6bf70;background:none;text-align:left;}
#hero .hero-combat-stats>button[data-hero-stat="attack"]{grid-column:auto;}
#hero .hero-combat-stats>button:nth-child(4),#hero .hero-combat-stats>button:last-child{border-right:0;}
#hero .hero-combat-stats>button:nth-child(n+5){border-top:1px solid #ded6bf70;}
#hero .hero-combat-stats>button>i,#hero .hero-defense-art{width:16px;height:16px;flex:0 0 16px;display:grid;place-items:center;object-fit:contain;font-size:15px;line-height:1;}
#hero .hero-combat-stats strong{font:700 11px/1.25 Interface,sans-serif;white-space:nowrap;}
#hero .hero-combat-stats small{font:8px/1.25 Interface,sans-serif;margin-top:2px;white-space:nowrap;}
#hero .hero-combat-stats>button[aria-expanded="true"]{background:#e8efdf99;border-radius:5px;}
#hero .attribute-name>.attribute-symbol{width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;box-sizing:border-box;border:1px solid #ced9b9;border-radius:9px;background:#edf1df;}
#hero .attribute-name>.attribute-symbol>i{display:grid;place-items:center;width:100%;height:100%;padding:0;margin:0;line-height:1;font-size:18px;background:none;border:0;border-radius:0;}
#hero .hero-fold-symbol{display:grid;place-items:center;flex:0 0 34px;}
#hero .hero-fold-symbol>img{width:26px;height:26px;object-fit:contain;}
#hero .hero-loadout-content{padding:0 12px 12px;}
#hero .hero-loadout-slots{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;padding:9px 8px;border:1px solid #a4b89c;border-radius:12px;background:linear-gradient(140deg,#e1e9d8,#eef1e5);box-shadow:inset 0 0 0 3px #f6f8ee,0 2px 4px #596d4512;}
#hero .hero-loadout-slot{aspect-ratio:1;min-width:0;padding:0;border:0;background:none;position:relative;}
#hero .hero-loadout-slot>button{display:grid;place-items:center;position:relative;width:100%;height:100%;box-sizing:border-box;min-width:0;padding:4px;border:1px solid #718f78;border-radius:9px;background:linear-gradient(#fbfff3,#cbd9be);box-shadow:inset 0 0 0 2px #f1f7e5;transition:border-color .18s,box-shadow .18s,background .18s;}
#hero .hero-loadout-slot>button>img,#hero .hero-loadout-slot>button>.skill-art{width:100%;height:100%;max-width:none;max-height:none;object-fit:cover;border-radius:5px;}
#hero .hero-loadout-slot>button>small{position:absolute;left:3px;bottom:2px;min-width:13px;height:13px;display:grid;place-items:center;border-radius:4px;background:#fff9e8ed;font:700 8px/1 Interface,sans-serif;color:#6a6b52;}
#hero .hero-loadout-slot.selected>button{border-color:#39867a;box-shadow:inset 0 0 0 2px #deeee4,0 0 0 2px #64a39750;}
#hero .hero-loadout-slot.selected>button{animation:technique-select .32s ease-out;}
@keyframes technique-select{from{box-shadow:inset 0 0 0 2px #deeee4,0 0 0 4px #64a39770;}to{box-shadow:inset 0 0 0 2px #deeee4,0 0 0 2px #64a39750;}}
#hero .hero-loadout-hint{margin:7px 0 9px;padding:0;font:10px/1.4 Interface,sans-serif;color:#7a806f;}
#hero .hero-loadout-picker{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;}
#hero .hero-loadout-choice{position:relative;display:grid;place-items:center;aspect-ratio:1;min-width:0;min-height:0;padding:3px;border:1px solid #c9bb91;border-radius:8px;background:linear-gradient(#fff9e8,#eee6cd);box-shadow:inset 0 0 0 1px #fffdf0;transition:border-color .18s,box-shadow .18s;}
#hero .hero-loadout-choice>img,#hero .hero-loadout-choice>.skill-art{display:block;width:100%;height:100%;object-fit:cover;border-radius:5px;}
#hero .hero-loadout-choice>i{position:absolute;right:1px;top:1px;width:13px;height:13px;display:grid;place-items:center;border-radius:50%;background:#eef4e5;color:#578976;font:700 9px/1 Interface,sans-serif;}
#hero .hero-loadout-choice>small{position:absolute;left:2px;bottom:2px;padding:1px 3px;border-radius:3px;background:#fff7dfeb;color:#74755e;font:700 8px/1 Interface,sans-serif;}
#hero .hero-loadout-choice.inspected{border-color:#39867a;box-shadow:0 0 0 2px #7bad9b55;}
#hero .hero-technique-detail{margin-top:11px;padding:10px;border:1px solid #c8d3b3;border-radius:10px;background:linear-gradient(#fffdf3,#f4f4e6);}
#hero .hero-technique-detail>header{display:flex;align-items:center;gap:9px;}
#hero .hero-technique-detail>header>img,#hero .hero-technique-detail>header>.skill-art{width:40px;height:40px;flex:0 0 40px;object-fit:cover;border:1px solid #bbaa78;border-radius:7px;padding:2px;background:#eee5c9;}
#hero .hero-technique-detail>header strong{font:700 13px/1.3 Interface,sans-serif;}
#hero .hero-technique-detail>header small{display:block;margin-top:3px;color:#7d816f;font:9px/1.3 Interface,sans-serif;}
#hero .hero-technique-detail>p{font:11px/1.55 Interface,sans-serif;color:#666f61;margin:9px 0;}
#hero .hero-technique-facts{display:flex;align-items:center;gap:15px;padding:7px 0;border-top:1px solid #d9dfc9;color:#777e68;font:10px/1.3 Interface,sans-serif;}
#hero .hero-technique-facts>span{display:flex;align-items:center;gap:4px;}
#hero .hero-technique-detail>footer{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:7px;}
#hero .hero-technique-detail>footer>button{min-width:0;min-height:32px;padding:5px 6px;font:700 10px/1.2 Interface,sans-serif;display:flex;align-items:center;justify-content:center;gap:4px;border-radius:7px;}
#hero .hero-book-entry{display:flex;align-items:center;gap:12px;padding:13px;background:linear-gradient(110deg,#f4f4e6,#fff9e9);border:1px solid #c5cfb2;border-radius:12px;}
#hero .hero-book-art{width:36px;height:36px;display:grid;place-items:center;background:#e9efdc;border:1px solid #cbd6b5;border-radius:9px;}
#hero .hero-book-art>i{font-size:22px;line-height:1;color:#708d72;}
#hero .hero-book-copy{flex:1;min-width:0;}
#hero .equipment-grid{gap:8px;}
#hero .equipment-slot{border-radius:11px;transition:border-color .18s,box-shadow .18s,transform .18s;}
#hero .equipment-slot:active{transform:scale(.98);}
#hero .equipment-slot:focus-visible{outline:2px solid #5b9a89;outline-offset:2px;}
#hero .equipment-slot-art{display:grid;place-items:center;}
#hero .equipment-slot-art>img{object-fit:contain;transition:transform .25s;}
#hero .equipment-slot:focus-visible .equipment-slot-art>img{transform:translateY(-3px);}
@media(prefers-reduced-motion:reduce){#hero .equipment-slot,#hero .equipment-slot-art>img,#hero .hero-loadout-slot>button,#hero .hero-loadout-choice{transition:none;}}
@media(prefers-reduced-motion:reduce){#hero .hero-loadout-slot.selected>button{animation:none;}}

#hero .hero-combat-stats>button{position:relative;transition:background .18s,box-shadow .18s;border-radius:7px;}
#hero .hero-combat-stats>button[aria-expanded="true"]{background:linear-gradient(135deg,#edf4e5,#f6f5e7);box-shadow:inset 0 0 0 1px #79a48c70;}
#hero .hero-combat-stats>button[aria-expanded="true"]::after{content:"";position:absolute;bottom:2px;left:32%;right:32%;height:2px;border-radius:2px;background:#79a48c;}
#hero .hero-technique-facts img{width:13px;height:13px;object-fit:contain;}
#hero .hero-loadout-choice>small.passive-symbol{width:13px;height:13px;display:grid;place-items:center;padding:0;background:#f6f3deed;color:#708f7b;}
#hero .passive-symbol>i{font-size:9px;line-height:1;display:grid;place-items:center;}
#hero [data-drag-skill]{touch-action:pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;}
#hero .hero-loadout-slot>button.drop-ready{border-color:#88aa87;box-shadow:inset 0 0 0 2px #dbe9d4;}
#hero .hero-loadout-slot>button.drop-hover{border-color:#358572;box-shadow:inset 0 0 0 2px #c8e4d3,0 0 0 3px #83b89970;background:#e9f1dd;}
.v15-skill-drag-ghost{width:52px!important;height:52px!important;padding:3px!important;box-sizing:border-box!important;display:grid!important;place-items:center;border:1px solid #6e9c83!important;border-radius:8px!important;background:#f6f1dd!important;box-shadow:0 4px 10px #374d3538!important;overflow:hidden;pointer-events:none;}
.v15-skill-drag-ghost>img,.v15-skill-drag-ghost>.skill-art{display:block!important;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;padding:0!important;border:0!important;border-radius:5px!important;object-fit:cover;}
.knowledge-loadout{display:none!important;}
.icon>.semantic-icon{display:block;width:1em;height:1em;object-fit:contain;pointer-events:none;}
#hero .attribute-symbol>img{display:block;width:24px;height:24px;object-fit:contain;}
#hero .hero-loadout-choice>small.passive-symbol{left:3px!important;bottom:3px!important;width:12px!important;height:12px!important;min-width:12px!important;min-height:12px!important;max-width:12px!important;max-height:12px!important;padding:0!important;border:0!important;display:grid!important;place-items:center!important;background:#fff9e9e8!important;border-radius:3px!important;overflow:hidden;}
#hero .hero-loadout-choice>small.passive-symbol>img{width:11px!important;height:11px!important;min-width:0!important;max-width:11px!important;display:block;object-fit:contain;}
#hero .hero-loadout-hint{display:block;text-align:center;padding:0 3px;margin:7px 0 10px;font-size:9px;line-height:1.4;}
#hero .hero-book-art .semantic-icon{width:26px;height:26px;max-width:none;}
.valgard-effect-note.hero-note{background:linear-gradient(#fffdf2,#f3f4e5)!important;border-color:#becdaa!important;color:#65745e!important;box-shadow:0 5px 16px #42543b20!important;}
.valgard-effect-note.hero-note h3{color:#386b60!important;font-family:Interface,sans-serif;}
.valgard-effect-note.hero-note>header{border-color:#d5dec4!important;}
.valgard-effect-note.hero-note>header>button{background:#f5f4e5!important;border-color:#cbd6b9!important;color:#6b826f!important;}
.valgard-effect-note.hero-note .effect-note-text{color:#68745f;}
.valgard-effect-note.hero-note .effect-note-value{color:#4d7565!important;}
.valgard-effect-note.hero-note .effect-note-more{border-color:#d1dcc1!important;}
.valgard-effect-note.hero-note .effect-note-more>summary{color:#5a816d!important;}
.valgard-effect-note.hero-note .effect-note-growth{padding-top:7px;border-top:1px solid #d8dfca;}
.valgard-effect-note.hero-note{border:1px solid #747b70!important;}
.valgard-effect-note.hero-note::after{background:#f5f6e9!important;border-color:#747b70!important;}
.valgard-effect-note:not(.hero-note)::after{background:#ead4a7;border-color:#a88a55;}
.effect-note-more>summary:focus-visible{outline:1px solid #747b70!important;outline-offset:2px;border-radius:2px;}
#hero .v13-fold-panel>.fold-head{display:flex;align-items:center;gap:10px;min-height:36px;}
#hero .hero-fold-symbol{align-self:center;margin:0;}
#hero .hero-fold-copy{display:flex!important;flex:1;min-width:0;min-height:34px;flex-direction:column;justify-content:center;gap:3px;margin:0;padding:0;}
#hero .hero-fold-copy>strong{display:block;line-height:1.2;margin:0;padding:0;}
#hero .hero-fold-copy>small{display:block;line-height:1.2;margin:0;padding:0;}
#hero .hero-loadout{padding:0 11px;}
#hero .hero-loadout>.fold-head{min-height:52px;padding:8px 0;box-sizing:border-box;}
#hero{scrollbar-gutter:stable;overflow-x:hidden;}
.valgard-effect-note>.effect-note-body{box-sizing:border-box;scrollbar-gutter:stable;overflow-y:auto!important;}
@supports not (scrollbar-gutter:stable){#hero{overflow-y:scroll;}}
#hero .hero-book-art>.icon{display:grid;place-items:center;width:32px;height:32px;line-height:1;}
#hero .hero-book-art .semantic-icon{display:block;width:32px;height:32px;object-fit:contain;filter:none;transform:none;}
#hero .hero-technique-detail footer .icon[data-glyph="book"]{display:grid;place-items:center;width:16px;height:18px;flex:0 0 16px;}
#hero .hero-technique-detail footer .semantic-icon{width:16px;height:18px;object-fit:contain;}
.combat-popup.miss{color:#7c8278;}

/* Crop the transparent portrait inside its own window, without enlarging the row. */
.portrait-window{display:inline-block;position:relative;overflow:hidden;flex-shrink:0;vertical-align:middle;}
.portrait-window>img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 35%;}
.portrait-window.portrait-specialist>img{transform:scale(1.12);transform-origin:50% 40%;}
.admin-player>.portrait-window{width:32px;height:40px;border-radius:5px;}
#admin-player-preview>.portrait-window{width:58px;height:70px;border-radius:8px;}


/* A cold Mage entry waits for its own painted neutral, never the legacy sheet. */
#battle-root .battle-hero-sprite[data-role="mage"]:not(.has-frame-art){visibility:hidden;background-image:none!important}
#battle-root .battle-hero-sprite[data-role="mage"]{margin-left:0;aspect-ratio:1}

/* 05.11.2026: приёмы и пассивки на отдельных полках; пассивки круглые и в ячейках, и в списке */
#hero .hero-loadout-shelves{display:grid;gap:4px;margin-top:10px}
#hero .hero-loadout-shelf{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin:6px 1px 5px;font:600 11px/1.2 Interface,sans-serif;color:#536d5b}
#hero .hero-loadout-shelf small{font:400 10px/1.2 Interface,sans-serif;color:#938a70}
#hero .hero-loadout-picker{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;padding:0;max-width:none}
#hero .hero-loadout-slot.is-passive>button,#hero .hero-loadout-choice.is-passive{border-radius:50%}
#hero .hero-loadout-slot.is-passive>button{background:linear-gradient(#fff7e2,#ead8ad);border-color:#a98f58}
#hero .hero-loadout-slot.is-passive>button>img,#hero .hero-loadout-slot.is-passive>button>.skill-art,#hero .hero-loadout-choice.is-passive>img,#hero .hero-loadout-choice.is-passive>.skill-art{border-radius:50%}
#hero .hero-loadout-slot.is-passive>button>small{left:50%;bottom:-2px;transform:translateX(-50%)}
#hero .hero-loadout-choice.is-locked{filter:grayscale(1);opacity:.62;cursor:default}
#hero .hero-loadout-choice.is-locked>b{position:absolute;left:50%;bottom:-2px;transform:translateX(-50%);min-width:14px;padding:0 3px;border-radius:5px;background:#6d6a57;color:#fffbea;font:600 9px/13px Interface,sans-serif;text-align:center}
/* 05.11.2026: шапка героя как в рюкзаке; пассивки тоже квадратные, полки с названием по центру и линиями */
.hero-page-head{display:flex;align-items:center;gap:6px;margin:0 0 10px}
.hero-nameplate{display:flex;align-items:center;gap:7px;flex:1 1 0;min-width:0;height:34px;box-sizing:border-box;padding:0 4px 0 11px;border:1px solid #d8cda9;border-radius:10px;background:linear-gradient(180deg,#fdf8e8,#f3ecd5);box-shadow:inset 0 0 0 1px #fffdf4}
.hero-nameplate h2{min-width:0;margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:700 15px/1 Interface,sans-serif;color:#2f5a50}
.hero-nameplate strong{flex:none;padding:2px 5px;border:1px solid #cdd2b4;border-radius:5px;background:#e9eedb;font:600 9.5px/1.1 Interface,sans-serif;color:#607a5a}
.hero-rename{display:grid;place-items:center;flex:none;width:26px;height:26px;min-height:26px;margin-left:auto;padding:0;border:0;background:none;color:#7c8a70}
.hero-rename svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#hero .hero-xp-line{display:flex;justify-content:space-between;gap:8px;margin:0 1px 5px;font:500 11px/1.2 Interface,sans-serif;color:#6d7a62}
#hero .hero-xp-line i{font-style:normal;color:#a39b80}
#hero .hero-xp-line>span:last-child{font-variant-numeric:tabular-nums;color:#8a8268}
#hero .hero-xp-bar{height:4px;margin:0 0 10px}
#hero .hero-loadout-slot.is-passive>button,#hero .hero-loadout-choice.is-passive{border-radius:9px}
#hero .hero-loadout-slot.is-passive>button>img,#hero .hero-loadout-slot.is-passive>button>.skill-art,#hero .hero-loadout-choice.is-passive>img,#hero .hero-loadout-choice.is-passive>.skill-art{border-radius:5px}
#hero .hero-loadout-slot.is-passive>button{background:linear-gradient(#fbfff3,#cbd9be);border-color:#718f78}
#hero .hero-loadout-slot.is-passive>button>small{left:3px;bottom:2px;transform:none}
#hero .hero-loadout-shelves{gap:2px;margin-top:8px}
#hero .hero-loadout-shelf{display:flex;align-items:center;justify-content:center;gap:9px;margin:9px 0 7px;font:600 10.5px/1.2 Interface,sans-serif;letter-spacing:.06em;text-transform:uppercase;color:#8f875f}
#hero .hero-loadout-shelf:before,#hero .hero-loadout-shelf:after{content:"";flex:1;height:1px;background:linear-gradient(90deg,transparent,#d9ceaa)}
#hero .hero-loadout-shelf:after{background:linear-gradient(90deg,#d9ceaa,transparent)}
#hero .hero-loadout-shelf small{display:none}
#hero .hero-fold-symbol>img{display:block;width:24px;height:24px;margin:auto}
