/* 0.65.3 (n81) «Шапка профиля»: the mini-profile's head drawn as one composition — loaded after every part that
   decorates it (the cover, the seat, the accessory, the face art, the pet, the frames, the studio, the Alley star).
   Order for the eye: the person (a large face on the cover's edge, the name as the headline with its worn marks),
   their honours (title, studio, Alley star — one chip family), the numbers (one quiet line), the own action (small,
   beside the face). Nothing a person bought changes its drawing: the face and everything that sits on it (seat,
   hat, face art, bucket, pet with its bed) are drawn at their 56-px geometry and magnified together (zoom 1.5), so
   the seat's arms, the hat's brim and the pet's paws stay exactly where their artists put them. */

/* The cover: taller, the crop's «middle» a little higher (faces live in a still's upper half), a real shade at the
   top for the buttons and a long fade into the card under the face. */
.pp-card { --pph-cov: 190px; --pph-av: 84px; --pph-lap: 44px; }
.pp-card > .pcov-pp { height: var(--pph-cov); }
.pcov-pp .pcov:not([data-pos="top"]):not([data-pos="bot"]) .pcov-img { object-position: 50% 32%; }
.pcov-pp > .pcov::after {
  background: linear-gradient(180deg, rgba(6, 8, 12, .55) 0, rgba(6, 8, 12, .18) 58px, rgba(6, 8, 12, 0) 42%,
    rgba(14, 16, 22, .42) 64%, rgba(16, 19, 26, .86) 84%, var(--panel-2) 100%);
}
.pp-card > .pp-head.pcov-head { margin-top: calc(var(--pph-cov) - 20px - var(--pph-lap)); }

/* ✕ and the cover's buttons: dark glass that reads on snow and on night alike. */
.pp-card > .pp-close {
  z-index: 3; width: 34px; height: 34px; color: #fff; background: rgba(8, 10, 14, .62); border: 1px solid rgba(255, 255, 255, .24);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
.pp-card > .pp-close:hover { background: rgba(8, 10, 14, .85); color: #fff; }
.pp-card > .pp-close svg { width: 16px; height: 16px; }
.pcov-pp .pcov-film, .pcov-pp .pcov-act { height: 34px; background: rgba(8, 10, 14, .62); border-color: rgba(255, 255, 255, .24); box-shadow: 0 2px 10px rgba(0, 0, 0, .3); }
.pcov-pp .pcov-act { width: 34px; }

/* The head: a grid — the face's cell (84 px) with the own action beside it, the words under both, full width. */
.pp-card > .pp-head {
  position: relative; isolation: isolate; display: grid; align-items: start;
  grid-template-columns: var(--pph-avx, 0px) var(--pph-av) minmax(0, 1fr); grid-template-rows: var(--pph-av) auto;
  grid-template-areas: ". av act" "meta meta meta"; column-gap: 0; margin-bottom: 0; padding-right: 0;
}
.pp-card > .pp-head:has(> .seat) { --pph-avx: 10px; } /* a seat reaches 18 px left of the face: keep it off the card's edge */
/* Everything that is not the words or the action belongs to the face's cell (the absolutely placed parts take the
   cell as their box, so their «50 % − 28 px» still means «the face's middle»). */
.pp-card > .pp-head > :not(.pp-meta):not(.pp-acts) { grid-area: av; }
.pp-card > .pp-head > :is(.pp-av, .seat, .cacc, .face-art, .bkt, .cpet-ppbox) { zoom: 1.5; }
.pp-card > .pp-head > .pp-av { align-self: start; box-shadow: 0 0 0 1.5px rgba(8, 10, 14, .9), 0 6px 18px rgba(0, 0, 0, .45); }
.pp-card[data-pp-accent] > .pp-head > .pp-av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--pp-acc) 70%, transparent), 0 6px 18px rgba(0, 0, 0, .45); }
.pp-card > .pp-head > .seat { filter: drop-shadow(0 5px 10px rgba(0, 0, 0, .5)); } /* the seat stands out of the cover's picture */
.pp-card > .pp-head > .cpet-ppbox { justify-self: start; align-self: center; margin-left: 56px; } /* at the face's right edge, as before */
.pp-card > .pp-head > .pp-av:not(:has(img)) { font-size: 15px; } /* initials (×1.5 → 22 px) */

/* No cover: a calm band in the card's colour, so the face still sits on an edge. */
.pp-card > .pp-head:not(.pcov-head) { margin-top: 30px; }
.pp-card > .pp-head:not(.pcov-head)::before {
  content: ''; position: absolute; z-index: -1; left: -20px; right: -20px; top: -50px; height: 92px; pointer-events: none;
  background: radial-gradient(55% 130% at 84% -10%, color-mix(in srgb, var(--pp-acc, #9fb4ff) 34%, transparent), transparent 72%),
    radial-gradient(45% 120% at 8% -10%, color-mix(in srgb, var(--pp-acc, #c59bff) 22%, transparent), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--pp-acc, #3b4766) 34%, #262e42), color-mix(in srgb, var(--pp-acc, #3b4766) 16%, #1c2232));
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent); mask-image: linear-gradient(180deg, #000 72%, transparent);
}

/* The own action: small, beside the face, under the cover's edge. */
.pp-card > .pp-head > .pp-acts { grid-area: act; justify-self: end; align-self: end; margin: 0; }
.pp-card > .pp-head > .pp-acts > .pp-acts-own {
  min-height: 34px; padding: 0 13px 0 11px; gap: 7px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border-color: var(--line); background: rgba(255, 255, 255, .06); color: var(--text);
}
.pp-card > .pp-head > .pp-acts > .pp-acts-own .ppe-ico { color: var(--pp-acc, var(--accent)); }
.pp-card > .pp-head > .pp-acts > .pp-acts-own:hover { background: rgba(255, 255, 255, .11); }
.pp-card > .pp-head > .pp-acts > .pp-acts-own[aria-expanded="true"] { border-color: color-mix(in srgb, var(--pp-acc, var(--accent)) 60%, var(--line)); background: color-mix(in srgb, var(--pp-acc, var(--accent)) 14%, transparent); }

/* The words: the name, then the honours as chips, then the numbers. */
.pp-card > .pp-head > .pp-meta { grid-area: meta; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 6px; margin-top: 14px; }
.pp-card > .pp-head:has(> .seat) > .pp-meta { margin-top: 20px; } /* a seat reaches 18 px under the face */
.pp-card > .pp-head .pp-name {
  order: 0; flex: 1 1 100%; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px;
  font-size: 25px; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; overflow-wrap: anywhere;
}
.pp-card > .pp-head .pp-name[data-club-font="script"] { font-size: 34px; line-height: 1.05; }
.pp-card > .pp-head .pp-name:is([data-club-font="pixel"], [data-club-font="typewriter"]) { font-size: 21px; }
/* the worn marks after the name: one size, one baseline */
.pp-card > .pp-head .pp-name > .club-sig { margin: 0; font-size: 21px; line-height: 1; }
.pp-card > .pp-head .pp-name .club-bdg { display: inline-flex; }
.pp-card > .pp-head .pp-name .club-bdg .club-medal { width: 22px; height: 22px; vertical-align: middle; }
.pp-card > .pp-head .pp-name > .snd-pp { min-width: 30px; min-height: 30px; margin: 0; padding: 0; font-size: 17px; line-height: 1; opacity: .85; }
.pp-card > .pp-head .pp-name > .snd-pp:hover { opacity: 1; }
.pp-card > .pp-head .pp-name > .bday-pp-mk { font-size: 20px; }

/* honours: the title, the studio, the Alley star — one chip family, in the card's ONE gold (n84b: var(--gold) of 0.65.1 — the same
   colour, rim and tint as the body's title chips .pp-badge; the chips sit on the panel under the cover, so a light or a dark cover
   does not change what they are read against) */
.pp-card > .pp-head .pp-meta > :is(.pp-tt, .intro-pp, .star-pp) { order: 1; max-width: 100%; min-width: 0; margin: 0; }
.pp-card > .pp-head .pp-meta > :is(.pp-tt, .intro-pp),
.pp-card > .pp-head .pp-meta > .star-pp > .star-pp-go {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; max-width: 100%; padding: 0 12px 0 9px; border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gold) 42%, transparent); background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold);
  box-shadow: none; font-family: inherit; font-size: 13px; font-weight: 600;
}
.pp-card > .pp-head .pp-meta > .pp-tt::before { content: '★'; font-size: 12px; opacity: .85; }
.pp-card > .pp-head .pp-meta > :is(.pp-tt, .intro-pp):has(> button) { padding-right: 3px; }
.pp-card > .pp-head .pp-meta > .intro-pp .intro-pp-i { font-size: 13px; }
.pp-card > .pp-head .pp-meta > .star-pp { display: inline-flex; gap: 4px; }
.pp-card > .pp-head .pp-meta > .star-pp > .star-pp-go { min-width: 0; cursor: pointer; text-align: left; }
.pp-card > .pp-head .pp-meta > .star-pp > .star-pp-go:hover { border-color: color-mix(in srgb, var(--gold) 70%, transparent); background: color-mix(in srgb, var(--gold) 18%, transparent); }
.pp-card > .pp-head .pp-meta > .star-pp .star-em { flex: none; width: 22px; height: 22px; margin-left: -4px; }
.pp-card > .pp-head .pp-meta > .star-pp .star-pp-txt { flex-direction: row; align-items: baseline; gap: 6px; min-width: 0; }
.pp-card > .pp-head .pp-meta > .star-pp .star-pp-t { flex: none; font-size: 13px; }
.pp-card > .pp-head .pp-meta > .star-pp .star-pp-cap { font-size: 13px; color: color-mix(in srgb, var(--gold) 82%, transparent); }

/* the numbers: one quiet line */
.pp-card > .pp-head .pp-meta > .pp-sub { order: 2; flex: 1 1 100%; margin: 2px 0 0; gap: 4px 14px; font-size: 13px; color: var(--muted); }
.pp-card > .pp-head .pp-sub .pp-hi svg { width: 13px; height: 13px; }
.pp-card > .pp-head .pp-sub .club-badge { margin-left: 0; font-weight: 700; color: var(--text); }
.pp-card > .pp-head .pp-meta > :not(.pp-name):not(.pp-tt):not(.intro-pp):not(.star-pp):not(.pp-sub) { order: 3; }

/* The rows that stay under the head (somebody else's postcard / points / crown; the throw picker) */
.pp-card > .pp-acts { margin: 14px 0 2px; }

@media (max-width: 480px) {
  .pp-card { --pph-cov: 158px; --pph-lap: 40px; }
  .pp-card > .pp-head .pp-name { font-size: 23px; }
  .pp-card > .pp-head .pp-name[data-club-font="script"] { font-size: 31px; }
}
@media (max-width: 560px), (pointer: coarse) {
  .pp-card > .pp-head > .pp-acts > .pp-acts-own, .pp-card > .pp-head .pp-meta > .star-pp > .star-pp-go { min-height: 44px; }
}
@media (pointer: coarse) {
  .pp-card > .pp-close { width: 44px; height: 44px; right: 8px; top: 8px; }
  .pcov-pp .pcov-film, .pcov-pp .pcov-act { height: 44px; }
  .pcov-pp .pcov-act { width: 44px; }
  .pp-card > .pp-head .pp-name > .snd-pp { min-width: 44px; min-height: 44px; }
}
