/* Hero sheet header (hero-sheet.js markup, loaded after account.css): the portrait stands full height in a band,
   the same picture lies blurred behind it and the name sits on top. The vitals stay sticky under the band.
   --hs-pic is set by hero-fx.js from the portrait itself; without it the band is a plain panel.
   Phone: no blur at all, the portrait is the cover and the name overlaps its lower edge. */
@media(min-width:861px){
  .hs{column-gap:36px;row-gap:26px;align-items:start}
  .hs-side,.hs-main{display:contents}
  .hs::before,.hs::after{content:"";grid-area:1/1/2/-1;align-self:stretch;border-radius:4px;pointer-events:none}
  /* the blur fades to the page at the edges and is cut at the band: no halo outside the frame */
  .hs::before{background:var(--hs-pic,none) 50% 22%/cover no-repeat;filter:blur(30px) saturate(.9) brightness(.6);clip-path:inset(0 round 4px);opacity:0}
  .hs.has-bg::before{opacity:.6}
  .hs::after{border:1px solid var(--rule-2);
    background:linear-gradient(90deg,color-mix(in srgb,var(--ink) 34%,transparent) 0%,color-mix(in srgb,var(--ink) 80%,transparent) 40%,color-mix(in srgb,var(--ink) 92%,transparent) 100%),
      linear-gradient(180deg,transparent 55%,color-mix(in srgb,var(--ink) 55%,transparent) 100%)}
  .hs:not(.has-bg)::after{background:var(--ink-2)}
  /* the frame is a fixed 3:4 at the top of the band, the blur fills the band under it when the text is taller.
     Stretched to the band it stayed 308px wide and grew to 800px tall: cover zoomed the art in up to 2.6x and cut half the face */
  .hs-portrait{grid-area:1/1;align-self:start;justify-self:stretch;aspect-ratio:3/4;position:relative;z-index:1;display:grid;margin:22px 0 22px 22px}
  .hs-portrait .hc-pic.big{aspect-ratio:auto;max-height:none;min-height:0}
  .hs-head{grid-area:1/2;position:relative;z-index:1;padding:26px 30px 22px 0;min-width:0}
  .hs-head h1{margin-top:8px;text-wrap:balance}
  .hs-head .hs-rank{margin-bottom:4px}
  /* panels inside the band let the picture through a little */
  .hs.has-bg .hs-head .hd-status,.hs.has-bg .hs-head .hs-quote{background:color-mix(in srgb,var(--ink-2) 78%,transparent)}
  .hs-tools{grid-area:2/1;position:sticky;top:76px;align-self:start;max-height:calc(100vh - 92px);overflow:auto;scrollbar-width:thin}
  .hs-body{grid-area:2/2;min-width:0}
}
@media(min-width:861px) and (prefers-reduced-motion:no-preference){
  .hs::before{transition:opacity .7s var(--ease)}
}
@media(max-width:860px){
  .hs{gap:14px}
  .hs-portrait{width:auto;justify-self:stretch;margin:0 -28px}
  .hs-portrait .hc-pic.big{aspect-ratio:1/1;max-height:440px;width:100%;border:0;border-radius:0;
    -webkit-mask-image:linear-gradient(180deg,#000 58%,transparent 100%);mask-image:linear-gradient(180deg,#000 58%,transparent 100%)}
  .hs-portrait .hc-pic.big.empty{aspect-ratio:16/9}
  .hs-portrait .hc-rank{left:28px}
  .hs-portrait .hc-flag{right:28px}
  .hs-head{position:relative;z-index:1;margin-top:-84px}
  .hs:has(.hc-pic.empty) .hs-head{margin-top:0}
}
/* «Сейчас: …» under the name: the ember dot of a hero in play now (the campaigns pill), a hollow one otherwise.
   The dot rides the first line and a long place wraps under the text, not under the dot */
.hs-now{margin:0 0 10px;font-size:15px;line-height:1.45;color:var(--bone-dim)}
.hs-now > *{display:inline-block;padding-left:16px;text-indent:-16px}
.hs-now > *::before{content:"";display:inline-block;width:7px;height:7px;margin-right:9px;border-radius:50%;vertical-align:1px;box-shadow:inset 0 0 0 1.5px var(--bone-faint)}
.hs-now.live{color:var(--ember-hi)}
.hs-now.live > *::before{background:var(--ember);box-shadow:0 0 0 3px rgba(224,122,58,.25),0 0 10px var(--ember)}
.hs-now a{color:inherit;text-decoration:underline;text-decoration-color:color-mix(in srgb,currentColor 45%,transparent);text-underline-offset:3px}
.hs-now a:hover{text-decoration-color:currentColor}
/* the vitals row under the rank path: one panel, a hairline between the cells, labels in the small caps of the site */
.hs-rank + .hs-vit{margin-top:-6px}   /* the rank's 22px bottom margin collapses with this: 16px under the honour bar */
.hs-vit{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);margin:0;border:1px solid var(--rule-2);border-radius:4px;background:var(--ink-2)}
.hs.has-bg .hs-vit{background:color-mix(in srgb,var(--ink-2) 78%,transparent)}
.hs-vc{display:grid;align-content:start;gap:4px;min-width:0;padding:11px 14px 12px}
.hs-vc + .hs-vc{border-left:1px solid var(--rule)}
.hs-vit .cap{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hs-vv{display:grid;justify-items:start;gap:7px}
.hs-vv b{font-family:var(--sans);font-weight:600;font-size:22px;line-height:1.2;font-variant-numeric:tabular-nums;color:var(--bone);overflow-wrap:normal}
.hs-vv small{font-size:14px;font-weight:400;line-height:1.3;color:var(--bone-faint)}
.hs-vv .hs-vn{display:block;margin-top:2px}
.hs-vv .unk{font-size:14px;font-weight:400;color:var(--bone-faint)}
.hs-vit .hs-pips{gap:4px}
.hs-vit .hs-pips i{width:11px;height:11px;border-width:1.5px}
.hs-vit .hs-pips.hp i{border-radius:2px;transform:rotate(45deg) scale(.86)}
/* touch: the line is a 44px target, the padding sits over the gaps around it */
@media(max-width:860px){
  .hs-now{margin:-9px 0 -1px}
  .hs-now > *{padding-top:11px;padding-bottom:11px}
}
/* a phone column is too narrow for four or five cells: two by two, an odd last cell takes the whole row (three cells keep one row) */
@media(max-width:600px){
  .hs-vit:has(.hs-vc:nth-child(4)){grid-auto-flow:row;grid-template-columns:repeat(2,minmax(0,1fr))}
  .hs-vit:has(.hs-vc:nth-child(4)) .hs-vc:nth-child(odd){border-left:0}
  .hs-vit:has(.hs-vc:nth-child(4)) .hs-vc:nth-child(n+3){border-top:1px solid var(--rule)}
  .hs-vit:has(.hs-vc:nth-child(4)) .hs-vc:last-child:nth-child(odd){grid-column:1/-1}
  .hs-vc{padding:10px 12px 11px}
  .hs-vv b{font-size:20px}
}
@media(max-width:720px){
  .hs-portrait{margin:0 -16px}
  .hs-portrait .hc-rank{left:16px}
  .hs-portrait .hc-flag{right:16px}
}
/* tablet: a full-width cover 440px tall showed a strip across the face, 1.3x past the 640px art; the cover stops at a
   square of 440 in the middle once it fits the column (472px and up), phones keep the full-width one */
@media(min-width:473px) and (max-width:860px){
  .hs-portrait{justify-self:center;width:440px;max-width:100%;margin:0}
  /* the square melts into the page at the sides as it already does at the bottom */
  .hs-portrait .hc-pic.big{
    -webkit-mask-image:linear-gradient(180deg,#000 58%,transparent 100%),linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent);-webkit-mask-composite:source-in;
    mask-image:linear-gradient(180deg,#000 58%,transparent 100%),linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent);mask-composite:intersect}
  .hs-portrait .hc-rank{left:14px}
  .hs-portrait .hc-flag{right:14px}
}
