/* The player's hall: one identity card leads; the record and progress keep their own quieter surfaces. */
.profile-page { gap: 20px; padding: 2px 4px 16px; scrollbar-gutter: stable; scroll-padding-top: 128px; }
.profile-page .profile-customise { flex: none; overflow: visible; }
.profile-load-error { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.profile-load-error p { margin: 0; color: var(--text); overflow-wrap: anywhere; }

/* The identity card (client council round 15): the equipped banner is the whole card's ground and the equipped frame its
   border; the avatar in its gilded mount, the name and the date's line sit low on the left; the featured champions stand
   in their alcoves on the right; the level and badges run along the card's base. Every part has a fixed size, so
   progress, choices or a frame arriving moves nothing (Tyler, 2026-10-29). The Store's preview draws this same card at
   its own scale (`.profile-identity.compact`, polish-store.css), so these rules are the card's, not the page's. */
.ms.profile-identity {
  position: relative; isolation: isolate; flex: none; display: block; min-height: 0; padding: 0; overflow: hidden;
  background: var(--bg-1) padding-box;
  box-shadow: 0 16px 36px var(--shadow), inset 0 1px var(--line-strong);
}
.profile-identity .profile-banner {
  position: absolute; inset: 0; z-index: -2; min-height: 0; height: auto; border: 0;
  background-size: cover; background-position: center 42%;
}
/* Moonlit scrims: the art stays bright across the top and behind the champions; a pool of shadow lies under the avatar
   and name and the base darkens under the level band, so the name stands out on any banner while the art still shows
   (client council round 17: the art was dim and the name had little contrast against it). The pool reaches past the
   name's line, so the name block reads before the art (round 19, Opus: the banner's art competed with the name). */
.profile-identity .profile-banner::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 58% 74% at 16% 78%, rgb(6 8 18 / 88%), rgb(6 8 18 / 58%) 58%, rgb(6 8 18 / 0%) 100%),
    linear-gradient(0deg, rgb(6 8 18 / 94%) 0, rgb(6 8 18 / 62%) 20%, rgb(6 8 18 / 10%) 46%, rgb(6 8 18 / 0%) 60%),
    linear-gradient(90deg, rgb(6 8 18 / 58%) 0, rgb(6 8 18 / 26%) 38%, rgb(6 8 18 / 0%) 60%);
}
/* The free Moonlit base is the arena map every account starts with: its tiles are toned to one moonlit navy and lit
   enough to read as the arena, with moonlight from the top right; the scrims above carry the name (client council
   rounds 16 and 17). Its tile contrast is kept low, so the map is a backdrop and not a second subject (round 19). */
.profile-identity .profile-banner.plain { background-color: #24355f; background-blend-mode: luminosity; filter: brightness(.98) contrast(.96) saturate(1.04); }
.profile-identity .profile-banner.plain::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 62% 110% at 70% 0, rgb(150 180 240 / 22%), transparent 70%);
}
/* The frame's corners keep their shape on a card wider than its art; its edges repeat between them. */
.profile-identity .card-frame-border {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  border: solid transparent; border-width: 45px 61px; border-image-slice: 15% 8%; border-image-repeat: round;
  image-rendering: pixelated;
}
.profile-identity .profile-identity-details {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-rows: minmax(0, 1fr) auto auto auto;
  grid-template-areas: 'look showcase' 'who showcase' 'progress progress' 'foot foot';
  gap: 0 32px;
  min-height: 412px;
  padding: 20px 32px 0;
  background: none;
  /* The base band reads its width from here (see the container rule after the card's parts). */
  container: profile-details / inline-size;
}
.profile-identity .profile-who-block { grid-area: who; display: flex; flex-direction: row; align-items: center; gap: 22px; min-width: 0; padding: 0 0 20px; }
/* Customise, the card's one action, is anchored in the card's top-right corner, clear of the featured champions under
   it and of an equipped frame's corner, so it belongs to the whole card rather than floating between the name and the
   showcase (client council round 17). Its place is fixed, so nothing that loads moves it. */
.profile-identity .profile-account-action { position: absolute; top: 20px; right: 24px; display: flex; }
.profile-identity:has(> .card-frame-border) .profile-account-action { top: 26px; right: 52px; }
.profile-identity .profile-customise-action { box-shadow: 0 8px 18px var(--shadow); }
.profile-identity .profile-avatar {
  position: relative; display: grid; place-items: center; flex: none; width: 128px; height: 128px; padding: 8px;
  border: 3px solid var(--trim); outline: 3px solid var(--bg-0);
  color: var(--you-light); background: radial-gradient(circle at 50% 38%, var(--bg-3), var(--bg-1) 74%);
  box-shadow: 0 0 0 6px rgb(201 162 74 / 22%), 0 14px 28px var(--shadow), inset 0 0 0 2px var(--trim-dark);
  font: 700 var(--t-l)/1 var(--font-body); image-rendering: pixelated;
}
.profile-identity .profile-avatar > img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
/* The free starting crest is 96 pixels: it keeps that size, centred, so its pixels stay square. */
.profile-identity .profile-avatar > img.default-avatar { width: 96px; height: 96px; object-fit: contain; }
.profile-identity .profile-avatar-retry { width: 100%; height: 100%; border: 0; color: var(--you-light); background: transparent; font: 700 var(--t-xs) var(--font-body); cursor: pointer; }
.profile-identity .profile-who-copy { display: flex; flex: 0 1 600px; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.profile-identity .profile-title { width: 100%; min-height: 1.2em; color: var(--you-light); text-shadow: 0 2px 0 var(--bg-0); }
/* The name, its tag and Change name are one line of one height; the editor opens over that line and the date's line
   below it, so opening or closing it moves nothing (Tyler, 2026-10-29). */
.profile-identity .profile-name-slot { flex: none; justify-content: center; height: 60px; min-height: 0; }
.profile-identity .profile-name-line { display: flex; align-items: baseline; gap: 4px 16px; min-width: 0; max-width: 100%; }
.profile-identity .profile-who { min-width: 0; overflow: hidden; font-size: 48px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 3px 0 var(--bg-0); }
.profile-identity .profile-who .faint { margin-left: 10px; color: var(--text-dim); font-size: var(--t-m); }
.profile-identity #profile-change-name { flex: none; padding: 4px 2px; }
.profile-identity .profile-name-edit, .profile-identity .profile-name-row { align-items: center; justify-content: flex-start; }
.profile-identity .profile-name-edit { position: absolute; top: 4px; left: 0; right: 0; z-index: 2; gap: 4px; padding: 0 8px 4px 0; background: var(--panel-flat); }
.profile-identity .profile-name-row .input { height: 40px; }
/* The join date and presence read as one quiet line under the name; Sign out is the Overview's account line's. */
.profile-identity .profile-meta { position: relative; display: flex; align-items: center; gap: 16px; width: 100%; min-width: 0; height: 30px; }
.profile-identity .profile-meta > :is(.dim, .pres) { flex: none; white-space: nowrap; }
.profile-identity .profile-meta > .dim { color: var(--text); }
.profile-identity .profile-identity-details:has(.profile-name-edit) .profile-meta { visibility: hidden; }

/* A new player's look is invited in the banner's empty upper half, level with Customise and above the name: a label on
   its own plate, as the featured champions' is, over one steel plate with the words, Choose a banner and the Store
   (client council round 21, Opus: the middle of a new player's banner was dead space). It is shorter than the row the
   card always holds there (at least 140px), so it moves nothing when it arrives. */
.profile-identity .profile-look {
  grid-area: look; align-self: start; justify-self: start; display: flex; flex-direction: column; align-items: flex-start;
  width: min(100%, 640px); min-width: 0; margin-top: 4px;
}
.profile-identity .profile-look h3 { margin: 0; padding: 6px 12px; color: var(--you-light); background: rgb(6 8 18 / 84%); border-left: 3px solid var(--trim); white-space: nowrap; }
.profile-look-plate {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 16px; width: 100%; padding: 12px 16px;
  background: linear-gradient(rgb(18 26 50 / 92%), rgb(6 8 18 / 94%));
  border: 1px solid var(--trim-dark); border-top: 2px solid var(--trim);
  box-shadow: inset 0 1px rgb(255 232 154 / 12%), 0 12px 28px var(--shadow);
}
.profile-look-plate p { margin: 0; color: var(--text); font-size: var(--t-s); line-height: 1.35; text-wrap: pretty; text-shadow: 0 2px 0 var(--bg-0); }
/* The Store is the quiet gold text way, as the history's Play is, so the plate has one framed button. */
.profile-look-store {
  min-height: 32px; padding: 4px 2px; color: var(--you-light); background: none; border: 0;
  font: 700 var(--t-s)/1.2 var(--font-body); white-space: nowrap; cursor: pointer;
}
.profile-look-store::after { content: ' →' / ''; }
.profile-look-store:is(:hover, .virtual-hover) { text-decoration: underline; text-underline-offset: 4px; }
.profile-look-store:focus-visible { outline: 2px solid var(--you-light); outline-offset: 2px; }

/* The featured champions: three alcoves on the banner, each champion at its in-game size on its own floor with its name
   on a plate, the slots still free left as empty alcoves. The showcase keeps one width whatever it holds, so choosing or
   removing a champion moves nothing else on the card. */
.profile-identity .profile-showcase { grid-area: showcase; align-self: end; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 588px; }
/* The label sits over the banner's brightest art, so it has its own plate (client council round 15). */
.profile-identity .profile-featured-label { padding: 6px 12px; color: var(--you-light); background: rgb(6 8 18 / 84%); border-left: 3px solid var(--trim); white-space: nowrap; }
.profile-identity .profile-featured {
  display: flex; flex-wrap: wrap; align-items: flex-end; align-content: flex-end; justify-content: center; gap: 8px 12px;
  width: 588px; height: 258px; min-height: 0; padding: 0;
}
/* Above pages.css's featured figure rule, which centres and spaces its parts for the old portrait row. */
.profile-identity .profile-featured .profile-featured-slot { position: relative; display: flex; flex: none; flex-direction: column; align-items: stretch; gap: 0; width: 188px; height: 258px; margin: 0; }
.profile-featured-stage {
  position: relative; display: flex; flex: 1; align-items: flex-end; justify-content: center; overflow: hidden;
  background: linear-gradient(rgb(6 8 18 / 8%), rgb(6 8 18 / 58%));
  border: 1px solid rgb(201 162 74 / 40%); border-bottom: 0;
  box-shadow: inset 0 1px rgb(255 232 154 / 16%);
}
/* A pool of moonlight on each alcove's floor. */
.profile-featured-stage::before {
  content: ''; position: absolute; left: 12%; right: 12%; bottom: 4px; height: 22px; pointer-events: none;
  background: radial-gradient(closest-side, rgb(255 232 154 / 34%), transparent);
}
.profile-featured-stage > .spr { flex: none; }
.profile-featured-slot figcaption {
  display: grid; place-items: center; flex: none; height: 38px; padding: 0 8px; overflow: hidden;
  color: var(--text); background: rgb(6 8 18 / 88%); border-top: 2px solid var(--trim);
  font: 700 var(--t-s)/1.2 var(--font-body); white-space: nowrap; text-overflow: ellipsis;
}
/* An empty place on the card is a dashed socket holding a faint pixel outline of a figure, at a whole multiple of its
   16px drawing, so it reads as room for a champion; it shows no number and no plus, since it is not a control (client
   council round 19: numbered boxes read as the numbers 1, 2 and 3). */
.profile-identity {
  --empty-figure: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%23a4b4d0' fill-opacity='.32' d='M6 2h4v1h1v4h-1v1h-1v1h3v1h1v1h1v5H2v-5h1v-1h1v-1h3V8H6V7H5V3h1z'/%3E%3C/svg%3E");
}
.profile-identity .profile-featured .profile-featured-slot.empty {
  display: block; border: 2px dashed rgb(164 180 208 / 34%);
  background: var(--empty-figure) 50% 100% / 96px 96px no-repeat, rgb(6 8 18 / 46%);
  image-rendering: pixelated;
}
/* With no champion chosen, while choices load, or when they fail, the showcase is one compact steel plate under its
   label, the label its tab: three empty sockets, the prompt and Choose champions, so the name and avatar lead
   (client council round 16). Its box is the same in each of those states, so a retry moves nothing. */
.profile-identity .profile-showcase.inviting { gap: 0; padding-bottom: 20px; }
.profile-identity .profile-showcase.inviting > .profile-featured {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: 'slots prompt' 'slots action'; align-items: center; justify-content: stretch; gap: 6px 22px;
  width: 100%; height: 112px; padding: 16px 20px;
  background: linear-gradient(rgb(18 26 50 / 92%), rgb(6 8 18 / 94%));
  border: 1px solid var(--trim-dark); border-top: 2px solid var(--trim);
  box-shadow: inset 0 1px rgb(255 232 154 / 12%), 0 12px 28px var(--shadow);
}
.profile-identity .profile-showcase.inviting > .profile-featured:not(:has(> .profile-featured-slots)) { grid-template-columns: minmax(0, 1fr) max-content; grid-template-rows: 1fr; grid-template-areas: none; }
.profile-featured-slots { grid-area: slots; display: flex; gap: 8px; }
.profile-featured-slots > i {
  display: block; flex: none; width: 64px; height: 64px;
  background: var(--empty-figure) 50% 100% / 48px 48px no-repeat, radial-gradient(circle at 50% 38%, var(--bg-2), var(--bg-0) 78%);
  border: 2px dashed rgb(164 180 208 / 40%); box-shadow: 0 0 0 1px var(--bg-0), inset 0 3px 8px rgb(0 0 0 / 60%);
  image-rendering: pixelated;
}
.profile-identity .profile-featured > :is(.profile-featured-prompt, [role="status"], [role="alert"]) {
  display: flex; align-items: center; min-height: 32px; min-width: 0; color: var(--text); text-shadow: 0 2px 0 var(--bg-0);
}
.profile-identity .profile-featured > .profile-featured-prompt { grid-area: prompt; align-self: end; font-size: var(--t-m); line-height: 1.3; }
.profile-identity .profile-featured > .profile-featured-slots ~ .btn { grid-area: action; justify-self: start; align-self: start; }
.profile-identity .profile-featured > .btn { flex: none; }
.profile-featured-pick:focus-visible { outline: 2px solid var(--you-light); outline-offset: 4px; }

/* The card's base: one band reads level, track and XP together, then badges, mastery and the featured achievement. Its
   fixed height holds while progress loads or a part changes; narrow cards fall back to two rows. */
.profile-identity :is(.profile-identity-progress, .profile-identity-status) {
  grid-area: progress; min-width: 0; height: 93px; margin: 0 -32px; padding: 0 32px;
  background: linear-gradient(rgb(12 18 36 / 90%), rgb(6 8 18 / 96%)); border-top: 2px solid var(--trim-dark);
  box-shadow: inset 0 1px rgb(255 232 154 / 10%);
}
.profile-identity-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.profile-identity .card-parts {
  display: grid; grid-template-columns: max-content minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 40px 40px;
  grid-template-areas: 'level level level' 'badges mastery achievement'; gap: 4px 24px; height: 92px;
  padding: 4px 0;
}
.profile-identity .card-crest { grid-area: level; min-width: 0; }
.profile-identity .card-crest img, .profile-identity .card-achievement img { width: 40px; height: 40px; flex: none; }
.profile-identity .card-badges-group { grid-area: badges; flex-wrap: nowrap; gap: 10px; min-width: 0; }
.profile-identity .card-badges-label { color: var(--text-dim); font: 400 var(--t-xs)/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; }
.profile-identity .card-mastery { grid-area: mastery; min-width: 0; }
.profile-identity .card-mastery-portrait { width: 40px; height: 40px; flex: none; }
.profile-identity .card-mastery-portrait .socket { width: 40px !important; height: 40px !important; }
.profile-identity .card-mastery-portrait .socket > img { width: 28px !important; height: 28px !important; }
.profile-identity .card-mastery-portrait > img { width: 40px; height: 40px; }
.profile-identity .card-achievement { grid-area: achievement; min-width: 0; }
.profile-identity :is(.card-mastery-label, .card-achievement figcaption) {
  display: -webkit-box; min-width: 0; overflow: hidden; overflow-wrap: anywhere;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.3;
}
.profile-identity .card-crest b { color: var(--you-light); font-size: var(--t-l); font-variant-numeric: tabular-nums; }
.profile-identity .card-crest .card-level { flex: 1; flex-direction: row; align-items: center; gap: 16px; }
.profile-identity .card-level-line { flex: none; align-items: baseline; line-height: 1.1; white-space: nowrap; }
.profile-identity-xp { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; color: var(--text); font-size: var(--t-s); line-height: 1.3; font-variant-numeric: tabular-nums; }
.profile-identity-xp progress { flex: 1; width: 100%; min-width: 24px; }
.profile-identity-xp span { white-space: nowrap; }
/* On the Profile the level reads as a meter, not a rule: the crest and level, a bar of at most 320px and the count
   beside it, so a new player's 0 / 100 XP no longer runs the card's width (client council round 18). The Store's
   smaller card keeps its own rules (polish-store.css). */
.profile-identity:not(.compact) .profile-identity-xp { flex: 0 1 auto; }
.profile-identity:not(.compact) .profile-identity-xp progress { flex: 0 1 320px; width: 320px; }
@container profile-details (min-width: 960px) {
  .profile-identity .card-parts {
    grid-template-columns: minmax(0, 1.7fr) 230px minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 48px;
    grid-template-areas: 'level badges mastery achievement'; gap: 0 20px; height: 64px; padding: 8px 0;
  }
  .profile-identity .card-parts:not(:has(.card-mastery, .card-achievement)) {
    grid-template-columns: minmax(0, 1.7fr) minmax(230px, 1fr); grid-template-areas: 'level badges';
  }
  .profile-identity .card-parts > :is(.card-badges-group, .card-mastery, .card-achievement) {
    align-self: stretch; padding-left: 20px; border-left: 1px solid var(--steel-line);
  }
  .profile-identity :is(.card-mastery-label, .card-achievement figcaption) { font-size: var(--t-s); }
  .profile-identity :is(.profile-identity-progress, .profile-identity-status) { height: 72px; }
  .profile-identity .profile-identity-progress .card-parts { margin-top: 4px; }
}
/* With nothing equipped beside it, the level alone runs the band's length, centred in its height, so no empty column or
   row is held for parts that are not there (client council round 16). */
.profile-identity .card-parts:not(:has(.card-badges-group, .card-mastery, .card-achievement)) {
  grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: 'level'; align-items: center;
}
.profile-identity .profile-foot { grid-area: foot; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; margin: 0; padding: 0; }
.profile-identity .profile-foot:has(> *) { margin: 0 -32px; padding: 14px 32px 16px; background: rgb(6 8 18 / 96%); }
.profile-page .profile-main { flex: none; gap: 16px; }
/* Every Profile track is a bold 12px bar with a lit steel rim and the kit's gold fill, so progress carries the page and an
   empty bar still reads as a bar (client council rounds 11 and 13). The track stays dark at zero;
   progress_render_fixture.cjs checks it is painted, not just valued. */
.profile-page progress { height: 12px; background: var(--bg-0); border: 1px solid var(--line-strong); box-shadow: 0 0 0 1px var(--bg-0), inset 0 2px 0 rgb(0 0 0 / 45%); }
.profile-page .profile-tabs { position: sticky; z-index: 5; top: 0; gap: 4px; background: var(--bg-1); border-bottom: 2px solid var(--steel-line); }
.profile-page .profile-tabs button { min-width: 126px; }

/* Customise scrolls with the whole page, below the sticky section tabs, under a compact live card: the name and the
   featured champions, smaller, without the base band or the Customise action that opened it. */
.profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-identity-details {
  grid-template-rows: auto auto; grid-template-areas: 'who showcase' 'foot foot'; align-items: end; min-height: 0; padding-bottom: 18px;
}
.profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-who-block { padding-bottom: 0; }
.profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-identity-details > :is(
  .profile-identity-progress, .profile-identity-status
), .profile-page:has(.profile-section:not([hidden]) > .profile-customise) :is(.profile-featured-label, .profile-account-action, .profile-look) { display: none; }
/* While editing, the showcase keeps the alcoves' height whatever it holds, so removing the last featured champion
   never changes the card's height and moves the controls under it (Tyler, 2026-10-29). */
.profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-showcase { zoom: .7; justify-content: flex-end; height: 258px; padding-bottom: 0; }
/* The invitation fills that same box, its parts centred, so choosing the first champion or removing the last changes
   what the box holds, never its size or place (browser_shell.cjs: "choosing champions, the mask and privacy moves
   nothing"). */
.profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-showcase.inviting > .profile-featured {
  grid-template-rows: auto auto; align-content: center; height: 258px;
}
.profile-page .profile-customise-head { top: 46px; z-index: 4; }

/* Goals leads with progress alone: the top bar names the account. */
.profile-page.profile-goals .profile-identity { display: none; }

/* Match and champion rows use the actual record; colour reinforces the written result. */
.profile-page .profile-stats { justify-content: space-between; gap: 0; padding: 14px 8px; background: var(--panel-steel); }
.profile-page .profile-stat { min-width: 85px; padding: 10px; }
.profile-page .profile-stat b { font-variant-numeric: tabular-nums; }
.profile-page .profile-tables { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.profile-page .profile-record { height: 390px; max-height: none; gap: 9px; padding: 18px; }
.profile-page .profile-record h3 { color: var(--you-light); }
.profile-page .profile-scope { padding-bottom: 10px; border-bottom: 1px solid var(--steel-line); }
.profile-page .profile-scroll { scrollbar-gutter: stable; }
.profile-match-list, .profile-champion-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.profile-match, .profile-champion-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 8px 12px;
  background: var(--plate);
  border-left: 3px solid var(--line-strong);
  color: var(--text);
}
.profile-match.profile-win { border-left-color: var(--you-deep); }
.profile-match.profile-loss { border-left-color: var(--enemy); }
.profile-match.profile-draw { border-left-color: var(--text-dim); }
.profile-match-main, .profile-match-result, .profile-champion-main, .profile-champion-rate { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.profile-match-main b, .profile-champion-main b { overflow-wrap: anywhere; }
.profile-match-main span, .profile-match-result span, .profile-champion-main span, .profile-champion-rate span { color: var(--text-dim); font-size: var(--t-xs); line-height: 1.35; }
.profile-match-result, .profile-champion-rate { text-align: right; font-variant-numeric: tabular-nums; }
.profile-match.profile-win .profile-match-result b { color: var(--you-light); }
.profile-match.profile-loss .profile-match-result b { color: var(--enemy); }
.profile-match.profile-draw .profile-match-result b { color: var(--text-dim); }
.profile-champion-rate b { color: var(--you-light); }

/* The Overview under the card: the history, then mastery and the badge case (client council round 15: identity and
   history here, the path on Goals, the goal on Home; round 17: no strip repeating the Goals tab beside Overview). */
.profile-page :is(.profile-empty, .profile-stats, .profile-record, .profile-mastery-panel, .profile-badge-case) {
  border: 1px solid var(--steel-line); border-image: none; background: var(--panel-flat); box-shadow: none;
}
.profile-page :is(.profile-empty, .profile-mastery-panel, .profile-badge-case) h3 { margin: 0; color: var(--you-light); }
/* An empty history is one strip: what will appear, and Play beside it. Play is a quiet gold text action, like Home's
   All modes: the top bar's PLAY leads the page and Customise is the card's one framed button (client council round 19:
   a framed Play competed with Customise). */
.profile-page .profile-empty {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'title play' 'text play';
  align-items: center; align-content: center; gap: 8px 24px; padding: 16px 24px; text-align: left;
}
.profile-page .profile-empty h3 { grid-area: title; }
.profile-page .profile-empty p { grid-area: text; margin: 0; color: var(--text); font-size: var(--t-m); }
.profile-page .profile-empty-play {
  grid-area: play; min-height: 40px; padding: 8px 6px; color: var(--you-light); background: none; border: 0;
  font: 700 var(--t-m)/1.2 var(--font-body); cursor: pointer;
}
.profile-empty-play::after { content: ' →' / ''; }
.profile-empty-play:is(:hover, .virtual-hover) { text-decoration: underline; text-underline-offset: 4px; }
.profile-overview-progress { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; min-width: 0; }
.profile-overview-progress[hidden] { display: none; }
.profile-mastery-panel, .profile-badge-case { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 18px 22px 20px; }
.profile-mastery-panel > p { margin: 0; color: var(--text); font-size: var(--t-m); line-height: 1.45; text-wrap: pretty; }
/* A new player's record is one compact band: the empty history and how mastery is earned side by side on one plate,
   split by a single rule, and the badge case the full width under it, so the page fits a 1080p screen without
   scrolling (client council round 17: mastery was a large box holding two lines of text). */
.profile-page .profile-overview:not([hidden]):has(> .profile-empty) { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 10px 0; }
.profile-overview:has(> .profile-empty) > * { grid-column: 1 / -1; }
.profile-overview:has(> .profile-empty) > .profile-empty { grid-column: 1; border-right: 0; }
.profile-overview:has(> .profile-empty) > .profile-overview-progress:not([hidden]) { display: contents; }
.profile-overview:has(> .profile-empty) .profile-mastery-panel { grid-column: 2; }
.profile-overview:has(> .profile-empty) .profile-badge-case { grid-column: 1 / -1; }
.profile-page .profile-mastery-panel.empty { justify-content: center; gap: 6px; padding: 10px 24px; }
.profile-page .profile-empty { padding-block: 14px; }
/* The band is one height before and after progress loads: the empty history holds the room of the mastery panel
   beside it (its heading and two lines), so Play under Match history does not drop when the panel arrives and the
   Overview still ends at the account line without scrolling (browser_shell at 1920x1080, 11 November 2026: the band
   grew from 77 to 106px, Play moved 14px and the page scrolled 13px). 98px: the panel's text measures 96 to 97px
   as the client's zoom rounds it. */
.profile-page .profile-overview:has(> .profile-empty) { --profile-band: 98px; }
.profile-overview:has(> .profile-empty) > .profile-empty, .profile-overview:has(> .profile-empty) .profile-mastery-panel.empty { min-height: var(--profile-band); }
/* The title's requirement, in the server's numbers, is the line's lit words (client council round 21, Sol). */
.profile-mastery-need { color: var(--you-light); font-weight: 700; white-space: nowrap; }
/* The badge case: every badge the server lists on its own tile, its art at its native 64 pixels in a recessed socket,
   its name on one line at body size and its state in words under it (client council rounds 16 and 17: small, wrapped
   names and tiny counts read as a disabled inventory). An unearned badge keeps its shape, symbol and some of its metal
   on a dark tile over the server's count; an earned one is lit on a gold-rimmed tile over a gold Earned plate. Between
   the name and the state, the server's condition says how the badge is earned (client council round 18: nine names and
   bare counts did not say how), at body size (round 19, Sol: the conditions were too small to read in nine narrow
   tiles). The tiles lie in rows of three, art beside the words; a case as wide as the page at 1920 by 1080 sets its
   heading and count in the first cell and the nine badges in two rows of five beside and under it, each condition in
   at most two lines of a 171px column, so the new player's Overview still fits the window at the old height
   (profile_overview_fixture.cjs). The case is the size container; its inner grid takes the layout. */
.profile-badge-case { container: badge-case / inline-size; display: block; padding: 12px 18px; }
.profile-badge-grid { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'title next count' 'list list list'; align-content: start; gap: 10px 16px; }
.profile-badge-case h3 { grid-area: title; align-self: center; }
.profile-badge-count { grid-area: count; margin: 0; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.profile-badge-case ul { grid-area: list; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.profile-badge-case li {
  display: grid; grid-template-columns: 76px auto minmax(0, 1fr); grid-template-rows: 1fr auto auto auto 1fr;
  grid-template-areas: 'art . .' 'art name name' 'art how how' 'art state track' 'art . .'; align-items: center; gap: 0 14px; min-width: 0;
  padding: 8px 12px 8px 10px; text-align: left;
  background: linear-gradient(rgb(255 255 255 / 3%), rgb(0 0 0 / 22%)), var(--bg-1);
  border: 1px solid var(--steel-line); box-shadow: inset 0 1px var(--plate-sheen);
}
.profile-badge-case img {
  grid-area: art; box-sizing: content-box; display: block; width: 64px; height: 64px; margin: 0; padding: 4px;
  background: radial-gradient(circle at 50% 40%, var(--bg-2), var(--bg-0) 76%);
  border: 2px solid var(--steel-line); box-shadow: 0 0 0 1px var(--bg-0), inset 0 3px 8px rgb(0 0 0 / 60%);
  image-rendering: pixelated;
}
.profile-badge-case li:not(.done) img { filter: saturate(.5) brightness(.78); }
.profile-badge-case li.done {
  background: linear-gradient(rgb(244 196 64 / 14%), rgb(244 196 64 / 3%)), var(--bg-1);
  border-color: var(--trim); box-shadow: inset 0 1px rgb(255 232 154 / 24%), 0 0 12px rgb(244 196 64 / 12%);
}
.profile-badge-case li.done img {
  background: radial-gradient(circle at 50% 40%, rgb(244 196 64 / 26%), var(--bg-1) 72%);
  border-color: var(--trim); box-shadow: 0 0 0 1px var(--bg-0), 0 0 14px var(--you-glow), inset 0 1px rgb(255 232 154 / 30%);
}
.profile-badge-case li > span { grid-area: name; min-width: 0; color: var(--text); font-size: var(--t-s); font-weight: 700; line-height: 1.25; text-wrap: balance; }
.profile-badge-how { grid-area: how; min-width: 0; margin-top: 2px; color: var(--text-dim); font: 400 var(--t-s)/1.25 var(--font-body); text-wrap: balance; }
.profile-badge-state { grid-area: state; justify-self: start; margin-top: 4px; color: var(--text); font: 400 var(--t-s)/1.2 var(--font-body); font-variant-numeric: tabular-nums; }
.profile-badge-case li.done > span { color: var(--you-light); }
.profile-badge-case li.done .profile-badge-state { padding: 2px 8px; color: var(--bg-0); background: var(--face-gold); font-weight: 700; }
/* Round 21 (Opus and Sol): nine equally muted tiles gave the case no order. A badge not started is quiet: its art
   dimmer and its count in the dim face. One with progress wears a moon rim, its art in fuller colour and its real count
   on a gold track beside the count. The next to earn by Goals' rule, named under the case's count, keeps the moon rim
   on its art socket, restrained, so it reads as the target without looking earned. Earned ones stay lit gold. */
.profile-badge-case li:not(.done, .started, .next) img { filter: saturate(.36) brightness(.62); }
.profile-badge-case li:not(.done, .started) .profile-badge-state { color: var(--text-dim); }
.profile-badge-case li.started {
  background: linear-gradient(rgb(164 196 255 / 7%), rgb(0 0 0 / 18%)), var(--bg-1);
  border-color: var(--line-strong); box-shadow: inset 0 1px rgb(200 220 255 / 16%);
}
.profile-badge-case li:is(.started, .next) img {
  filter: saturate(.85) brightness(.96); border-color: var(--text-dim);
  box-shadow: 0 0 0 1px var(--bg-0), 0 0 12px rgb(164 180 208 / 28%), inset 0 3px 8px rgb(0 0 0 / 50%);
}
.profile-badge-track { grid-area: track; align-self: center; width: 100%; min-width: 0; margin-top: 4px; }
.profile-page .profile-badge-track { height: 10px; }
/* The case's one target, under its count: the badge Goals names first. */
.profile-badge-next { grid-area: next; align-self: center; min-width: 0; margin: 0; overflow: hidden; color: var(--text-dim); font-size: var(--t-s); line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.profile-badge-next b { color: var(--text); }
/* At 1400px, five columns leave each condition 160px: the longest, "Finish a match in Top, Bottom and Jungle", breaks
   into two lines of at most 155px. The heading and count take the first cell, level with the first row's names, so
   nine badges fill two rows without a hole. The list spans the five columns and their gaps, so its columns are the
   grid's own. */
@container badge-case (min-width: 1400px) {
  .profile-badge-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: none; gap: 0 8px; }
  .profile-badge-case h3 { position: relative; z-index: 1; grid-area: 1 / 1; align-self: start; padding: 10px 8px 0; }
  .profile-badge-count { position: relative; z-index: 1; grid-area: 2 / 1; align-self: start; padding: 6px 8px 0; font-size: var(--t-l); line-height: 1.2; }
  .profile-badge-next { position: relative; z-index: 1; grid-area: 3 / 1; align-self: start; padding: 6px 8px 0; }
  .profile-badge-case ul { grid-area: 1 / 1 / 4 / -1; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .profile-badge-case li:first-child { grid-column-start: 2; }
}
@container badge-case (max-width: 760px) {
  .profile-badge-case ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Goals: the next goal and its reward lead, then the getting-started path, the next badges and More achievements, all
   on one plate that fills the page, so no heading lies on the backdrop's art and no navy is left under it (client
   council round 15). */
.profile-page.profile-goals > .profile-main, .profile-page.profile-goals .profile-section:not([hidden]) { flex: 1 0 auto; }
.profile-page .profile-progress {
  flex: 1 0 auto; gap: 26px; padding: 18px 28px 28px;
  background: var(--panel-flat); border: 1px solid var(--steel-line); box-shadow: inset 0 1px var(--plate-sheen);
}
.profile-page .goals-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; padding: 0; border-bottom: 0; }
.profile-page .goals-heading h3 { margin: 0; font: 400 var(--t-l)/1.2 var(--font-head); }
.profile-page .goals-heading p { color: var(--text); }
.profile-goals-group { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.profile-goals-group > :is(h4, p) { margin: 0; }
.profile-goals-group > h4.kit-label { color: var(--you-light); }
.profile-goal-feature { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.profile-goal-visual { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 10px; flex: 0 1 240px; min-width: 150px; }
.profile-goal-visual[hidden] { display: none; }
.profile-goal-art { grid-column: 1 / -1; display: block; min-height: 82px; background-color: var(--bg-1); background-size: cover; background-position: center; border: 1px solid var(--trim-dark); image-rendering: pixelated; }
.profile-goal-visual progress { width: 100%; min-width: 0; }
.profile-goal-balance { color: var(--text); font-size: var(--t-s); font-variant-numeric: tabular-nums; white-space: nowrap; }
.profile-goal-copy { flex: 1 1 170px; min-width: 0; }
.profile-goal-copy .pages-note { display: block; text-align: left; white-space: normal; }
.profile-page .profile-journey-top { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: 0; padding: 0; }
.profile-page .profile-goal, .profile-level-panel { min-width: 0; padding: 26px 30px; background: transparent; border: 0; }
.profile-page .profile-goal { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.profile-page .profile-goal h4 { margin: 0; color: var(--you-light); }
/* The lead's heading names its place on the path, so step 1 below reads as this goal rather than a second one (client
   council round 17). */
.profile-goal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.profile-goal-place {
  padding: 3px 10px; color: var(--text); background: var(--bg-0); border: 1px solid var(--trim-dark);
  font: 700 var(--t-xs)/1.2 var(--font-body); font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* The goal and its reward are the page's largest words, over a full-width bar with its count. */
.profile-page .profile-goal .goal-line { margin: 0; color: var(--text); font: 700 var(--t-l)/1.3 var(--font-body); text-wrap: pretty; }
.profile-page .profile-goal > .profile-goal-feature:has(> .profile-goal-visual:only-child) .profile-goal-visual { flex: 1 1 100%; max-width: 620px; gap: 6px 14px; }
.profile-page .profile-goal .profile-goal-balance { font-size: var(--t-m); font-weight: 700; }
.profile-goal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.profile-level-panel { display: flex; flex-direction: column; justify-content: center; gap: 14px; border-left: 1px solid var(--steel-line); }
.profile-level-panel .profile-progress-head { gap: 14px; }
.profile-level-panel h3 { color: var(--text); font: 400 var(--t-m)/1.2 var(--font-head); }
.profile-level-track { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.profile-level-track progress { width: 100%; min-width: 0; }
.profile-first-win { margin: 0; color: var(--text-dim); line-height: 1.4; }
/* One surface per list. A row's rule is drawn on its left and top edges; the list clips the rules on its outer edge, so
   wrapped rows are divided too and nothing doubles the list's own border. */
.profile-page :is(.profile-steps, .profile-achievements-more, .profile-mastery) {
  gap: 0; margin: 0; overflow: hidden; background: var(--panel-flat); border: 1px solid var(--steel-line);
}
.profile-page :is(.profile-steps, .profile-achievements-more, .profile-mastery) > li {
  background: transparent; border: 0; box-shadow: -1px 0 0 var(--steel-line), 0 -1px 0 var(--steel-line);
}
/* The getting-started path: the server's steps in order as one lit steel band of numbered cards, finished steps filled
   and the current goal framed in gold. Each name has the card's width, its reward on the line under it and its track
   at the card's foot, so the four tracks share a line (client council round 18: the reward beside the name squeezed it
   into three narrow lines). */
.profile-page .profile-steps {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  background: var(--panel-steel); border-color: var(--trim-dark); box-shadow: inset 0 1px var(--plate-sheen);
}
.profile-page .profile-steps li {
  position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); grid-template-rows: auto auto 1fr;
  grid-template-areas: 'num name' 'num reward' '. track'; align-items: start; gap: 4px 14px; padding: 18px 20px;
}
.profile-page .profile-steps li.current { background: linear-gradient(rgb(244 196 64 / 10%), rgb(244 196 64 / 3%)); box-shadow: inset 0 0 0 2px var(--trim), inset 0 3px 0 var(--you); }
/* The current step is the lead above: it keeps its own name in the card's normal place, and a gold Now plate stands
   where the other steps show their reward, so it reads as the lead's own item; its reward and bar are the lead's
   (client council round 19: a number and a chip in an empty card read as a placeholder). */
.profile-step-now {
  grid-area: reward; justify-self: start; margin-top: 4px; padding: 5px 12px; color: var(--bg-0); background: var(--face-gold);
  box-shadow: 0 0 0 2px var(--bg-0), 0 0 12px var(--you-glow); font: 400 var(--t-s)/1 var(--font-head); letter-spacing: 1px; text-transform: uppercase;
}
/* Above pages.css's first-span rule for step rows, so the number stays centred in its box. */
.profile-page .profile-steps .profile-step-number {
  grid-area: num; display: grid; place-items: center; flex: none; width: 36px; height: 36px; color: var(--you-light);
  background: var(--bg-0); border: 2px solid var(--trim-dark); font: 400 var(--t-s)/1 var(--font-head);
}
.profile-page .profile-steps li.done .profile-step-number { color: var(--bg-0); background: var(--you-deep); border-color: var(--you-deep); }
.profile-page .profile-steps li.current .profile-step-number { color: var(--bg-0); background: var(--face-gold); border-color: var(--trim); box-shadow: 0 0 0 3px var(--bg-0), 0 0 0 4px var(--trim-dark); }
.profile-page .profile-step-name { grid-area: name; display: block; min-width: 0; color: var(--text); font-size: var(--t-m); font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.profile-step-reward { grid-area: reward; color: var(--you-light); font-weight: 700; white-space: nowrap; }
.profile-step-track { grid-area: track; align-self: end; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-width: 0; margin-top: 10px; font-variant-numeric: tabular-nums; }
.profile-step-track progress { grid-column: 1; width: 100%; min-width: 0; }
.profile-step-track > b { grid-column: 2; }
.profile-steps li.done .profile-step-track > b { color: var(--you-light); }
.profile-page .profile-achievements { margin: 0; }
.profile-page .profile-achievements li {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: 1fr auto; grid-template-areas: 'badge details' '. progress';
  align-items: start; gap: 10px 14px;
}
.profile-page .profile-achievements li > img { grid-area: badge; width: 64px; height: 64px; }
/* Conditions read at body size and contrast and rewards in reward gold; rows grow to fit (client council round 14). */
.profile-page .profile-achievements li > span { grid-area: details; display: flex; flex-direction: column; min-width: 0; gap: 4px; font-size: var(--t-m); line-height: 1.35; overflow-wrap: anywhere; }
.profile-page .profile-achievements li > span > b { color: var(--text); }
.profile-page .profile-achievements li > span > .dim { color: var(--text); }
.profile-page .profile-achievements li > span > .faint { color: var(--you-light); font-size: var(--t-s); }
.profile-page .profile-achievements li.done .achievement-progress > b { color: var(--you-light); }
/* Each badge keeps its own shape, symbol and metal while unearned: muted, never greyed into one generic shield. */
.profile-page .profile-achievements li:not(.done) img { opacity: .9; filter: saturate(.5) brightness(.85); }
/* The closest achievements lead as larger steel tiles with no rim of their own; the rest follow as compact rows (client
   council rounds 12 and 13). These refine the general achievement rules above at equal specificity. */
.profile-page .profile-achievements-next { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.profile-page .profile-achievements-next li { padding: 18px; background: var(--panel-steel); border: 1px solid var(--steel-line); box-shadow: inset 0 1px var(--plate-sheen); }
.profile-page .profile-achievements-next li > span > b { color: var(--you-light); font-size: var(--t-m); }
.profile-page .profile-achievements-next li:not(.done) img { opacity: 1; filter: saturate(.8); }
.profile-page .profile-achievements-more { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* 32 pixels is exactly half the badge art, so its pixels stay square. */
.profile-page .profile-achievements-more li { grid-template-columns: 32px minmax(0, 1fr); gap: 6px 12px; padding: 12px 16px; }
.profile-page .profile-achievements-more li > img { width: 32px; height: 32px; }
.profile-page .profile-achievements-more[hidden] { display: none; }
/* More achievements is one closed steel bar: its name, how many it holds, and Show or Hide with a pixel chevron. */
.profile-more-heading { margin: 0; }
.profile-more-toggle {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 10px 18px; color: var(--text);
  background: var(--panel-steel); border: 1px solid var(--steel-line); font: inherit; text-align: left; cursor: pointer;
}
.profile-more-toggle:is(:hover, .virtual-hover) { background: var(--plate); border-color: var(--line-strong); }
.profile-more-toggle:focus-visible { outline: 2px solid var(--you-light); outline-offset: 2px; }
.profile-more-toggle > .kit-label { color: var(--you-light); }
.profile-more-count {
  min-width: 32px; padding: 3px 8px; color: var(--text); background: var(--bg-0); border: 1px solid var(--line-strong);
  font: 400 var(--t-s)/1.2 var(--font-head); text-align: center; font-variant-numeric: tabular-nums;
}
.profile-more-state { display: flex; align-items: center; gap: 10px; margin-left: auto; color: var(--text); font-size: var(--t-s); font-weight: 700; }
.profile-more-state::after {
  content: ''; width: 0; height: 0; border: 6px solid transparent; border-top-color: currentColor; border-bottom-width: 0; transform: translateY(1px);
}
.profile-more-toggle[aria-expanded="true"] .profile-more-state::after { border-top-width: 0; border-bottom: 6px solid currentColor; transform: translateY(-1px); }
.profile-more-toggle[aria-expanded="true"] { border-bottom-color: transparent; }
.profile-more:has(.profile-more-toggle) { gap: 0; }
.profile-page .achievement-progress { grid-area: progress; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; width: auto; min-width: 0; font-variant-numeric: tabular-nums; }
.profile-page .achievement-progress > b { grid-column: 2; grid-row: 1; }
.profile-page .achievement-progress progress { grid-column: 1; grid-row: 1; }
/* Each champion's mastery, on the Overview beside the badge case. */
.profile-page .profile-mastery { grid-template-columns: minmax(0, 1fr); max-height: 260px; overflow: hidden auto; }
.profile-page .profile-mastery li { min-width: 0; align-items: center; padding: 12px 16px; }
.profile-mastery-info { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.profile-mastery-title { color: var(--you-light); }
.profile-mastery-progress { display: flex; flex: 0 1 180px; flex-direction: column; gap: 6px; min-width: 0; color: var(--text); font-size: var(--t-xs); text-align: right; }
.profile-mastery-progress progress { width: 100%; }

/* The account line closes the Overview: who is signed in and Sign out, quiet and away from the card (client council
   round 21: Sign out beside Online put a destructive account action at the card's most-clicked place). A refusal takes
   the rest of the line, so it moves nothing; a long one scrolls sideways and takes keyboard focus. */
.profile-account-line { display: flex; align-items: center; gap: 16px; min-width: 0; height: 34px; margin: -4px 0 0; padding: 2px 8px 0; border-top: 1px solid var(--steel-line); }
.profile-account-line[hidden] { display: none; }
.profile-account-line h3 { flex: none; margin: 0; color: var(--text-dim); }
.profile-account-line p { flex: none; margin: 0; color: var(--text-dim); font-size: var(--t-s); white-space: nowrap; }
.profile-account-line p b { color: var(--text); }
.profile-account-line p .faint { margin-left: 2px; color: var(--text-dim); }
.profile-account-line #signout {
  flex: none; min-height: 30px; padding: 0 2px; border: 0; color: var(--text-dim); background: transparent;
  font: 400 var(--t-s)/1 var(--font-body); text-decoration: underline; text-decoration-color: var(--steel-line);
  text-underline-offset: 4px; cursor: pointer;
}
.profile-account-line #signout:is(:hover, .virtual-hover) { color: var(--text); text-decoration-color: currentColor; }
.profile-account-line #signout:focus-visible { outline: 2px solid var(--you-light); outline-offset: 2px; }
.profile-signout-status { display: flex; flex: 1 1 auto; align-items: center; min-width: 0; height: 28px; }
.profile-signout-status[hidden] { display: none; }
.profile-signout-status .profile-error {
  display: block; min-width: 0; max-width: 100%; max-height: 100%; padding: 2px 8px; overflow: auto hidden; white-space: nowrap;
  background: var(--panel-flat); border: 1px solid var(--enemy); scrollbar-width: thin;
}
.profile-signout-status .profile-error:focus-visible { outline: 2px solid var(--you-light); outline-offset: -2px; }

/* Compact desktops: the card keeps its parts and order at a smaller scale. */
@media (max-width: 1099.98px) {
  .profile-page .profile-identity-details { gap: 0 24px; min-height: 352px; padding: 16px 24px 0; }
  .profile-page :is(.profile-identity-progress, .profile-identity-status), .profile-page .profile-foot:has(> *) { margin-inline: -24px; padding-inline: 24px; }
  .profile-page .profile-who-block { gap: 18px; padding-bottom: 16px; }
  .profile-page .profile-avatar { width: 108px; height: 108px; padding: 3px; }
  .profile-page .profile-who { font-size: var(--t-xl-sm); }
  .profile-page .profile-who .faint { font-size: var(--t-s); }
  .profile-page .profile-name-slot { height: 52px; }
  .profile-page .profile-meta { gap: 14px; font-size: var(--t-s); }
  /* The alcoves at 72% leave the name, its tag, Change name and the date's line their full width at 1280; the label
     and the invitation keep that width at full text size. */
  .profile-page .profile-showcase { width: 424px; }
  .profile-page .profile-featured:has(> figure) { zoom: .72; }
  .profile-page .profile-showcase.inviting { padding-bottom: 16px; }
  /* The same height, so the prompt may take two lines over Choose champions. */
  .profile-page .profile-showcase.inviting > .profile-featured { gap: 4px 16px; padding: 12px 16px; }
  .profile-page .profile-featured-slots { gap: 6px; }
  .profile-page .profile-featured-slots > i { width: 48px; height: 48px; background-size: 32px 32px, auto; }
  .profile-page .profile-featured > .profile-featured-prompt { font-size: var(--t-xs); }
  .profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-showcase { zoom: .55; width: 588px; }
  .profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-featured:has(> figure) { zoom: 1; }
  .profile-page .profile-tables { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
  /* Mastery over the badge case, so each badge name keeps its one line. */
  .profile-overview-progress { grid-template-columns: minmax(0, 1fr); }
  .profile-page .profile-progress { padding-inline: 22px; }
}
@media (max-width: 1099.98px) {
  .profile-page .profile-identity-details { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'showcase' 'who' 'progress' 'foot'; grid-template-rows: auto auto auto auto; }
  .profile-page .profile-showcase { align-self: start; }
  .profile-page .profile-account-action { position: static; align-self: center; }
  .profile-page .profile-look { display: none; }
  .profile-page .profile-tables, .profile-page .profile-journey-top, .profile-overview-progress { grid-template-columns: minmax(0, 1fr); }
  .profile-level-panel { border-top: 1px solid var(--steel-line); border-left: 0; }
  .profile-page .profile-record { height: auto; max-height: 390px; }
}
@media (max-width: 760px) {
  .profile-page .profile-identity-details { padding: 16px; }
  .profile-page .profile-featured { width: 100%; height: auto; zoom: 1; }
  .profile-page .profile-stat { min-width: 80px; }
  .profile-match, .profile-champion-card { gap: 8px; padding: 8px; }
}
/* A phone held upright (Tyler, 2026-11-17: "a lot of the menus are kind of squished and they're not optimized for
   mobile"): one column at the phone's width. The section tabs keep one row, so the sticky Customise heading under them
   is not covered. Mobile council round 1 (both judges: the new player's card filled the first screen): the card is one
   compact row of avatar, name and date with Customise and Change name under it, a slim level strip, then the featured
   champions under their label (Opus: the prompt alone did not say what they were for), so the record shows below. */
@media (max-width: 600px) and (orientation: portrait) {
  html.touch .profile-page { gap: 16px; padding: 2px 0 16px; scroll-padding-top: 56px; }
  html.touch .profile-page .profile-tabs { flex-wrap: nowrap; }
  html.touch .profile-page .profile-tabs button.kit-tab { flex: 1 1 auto; min-width: 0; padding: 0 4px; font-size: var(--t-xs); letter-spacing: 0; } /* four tabs since Collection */
  html.touch .profile-page .profile-identity-details { grid-template-areas: 'who' 'progress' 'showcase' 'foot'; gap: 0; min-height: 0; padding: 12px 14px 0; }
  html.touch .profile-page :is(.profile-identity-progress, .profile-identity-status), html.touch .profile-page .profile-foot:has(> *) { margin-inline: -14px; padding-inline: 14px; }
  html.touch .profile-page .profile-showcase { width: 100%; padding: 10px 0 12px; }
  /* The invitation: its label over a plate holding the three empty sockets and Choose champions. */
  html.touch .profile-page .profile-showcase.inviting { gap: 0; padding: 10px 0 12px; }
  html.touch .profile-page .profile-showcase.inviting > .profile-featured { grid-template-columns: max-content minmax(0, 1fr); grid-template-rows: auto;
    grid-template-areas: 'slots action'; align-items: center; gap: 12px; height: auto; padding: 8px 10px; }
  html.touch .profile-page .profile-showcase.inviting > .profile-featured > .profile-featured-prompt { display: none; }
  html.touch .profile-page .profile-showcase.inviting > .profile-featured > .btn { justify-self: end; align-self: center; min-height: 44px; }
  html.touch .profile-page .profile-featured-label { padding: 5px 10px; font-size: var(--t-xs); }
  html.touch .profile-page .profile-featured-slots { gap: 4px; }
  html.touch .profile-page .profile-featured-slots > i { width: 40px; height: 40px; background-size: 32px 32px, auto; }
  html.touch .profile-page .profile-featured:has(> figure) { zoom: 1; flex-wrap: nowrap; justify-content: stretch; gap: 8px; width: 100%; height: auto; }
  html.touch .profile-page .profile-featured .profile-featured-slot { flex: 1 1 0; width: auto; min-width: 0; height: 176px; }
  html.touch .profile-page .profile-featured .profile-featured-slot.empty { background-size: 64px 64px, auto; }
  html.touch .profile-page .profile-featured-stage > .spr { zoom: .66; }
  html.touch .profile-page .profile-featured-slot figcaption { height: 34px; padding: 0 4px; font-size: var(--t-xs); }
  /* The level in one slim strip (the shared block below); badges, mastery and the achievement under it once earned. */
  html.touch .profile-page .card-parts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto;
    grid-template-areas: 'level level' 'badges badges' 'mastery achievement'; gap: 8px 16px; height: auto; padding: 0; }

  /* Customise's card: the alcoves over the name at the phone's width, one height whatever they hold. */
  html.touch .profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-identity-details { grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto; grid-template-areas: 'showcase' 'who' 'foot'; gap: 14px 0; }
  html.touch .profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-identity-details { padding-bottom: 14px; }
  html.touch .profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-showcase { zoom: 1; width: 100%; height: 176px; padding-bottom: 0; }
  html.touch .profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-showcase.inviting > .profile-featured { height: 176px; }
  html.touch .profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-who-block { padding-bottom: 0; }

  /* A new player's empty history over how mastery is earned, each its own plate. */
  html.touch .profile-page .profile-overview:not([hidden]):has(> .profile-empty) { grid-template-columns: minmax(0, 1fr); }
  html.touch .profile-page .profile-overview:has(> .profile-empty) > .profile-empty { border-right: 1px solid var(--steel-line); }
  html.touch .profile-page .profile-overview:has(> .profile-empty) .profile-mastery-panel { grid-column: 1 / -1; }
  html.touch .profile-page .profile-empty { gap: 8px 16px; padding: 14px 16px; }
  html.touch .profile-page .profile-empty p { font-size: var(--t-s); }
  html.touch .profile-page :is(.profile-mastery-panel, .profile-mastery-panel.empty) { padding: 14px 16px; }
  html.touch .profile-page .profile-mastery-panel > p { font-size: var(--t-s); }
  html.touch .profile-page .profile-stats { padding: 8px 4px; } html.touch .profile-page .profile-stat { min-width: 76px; padding: 8px 4px; }
  html.touch .profile-page .profile-record { padding: 14px; }
  html.touch .profile-match, html.touch .profile-champion-card { grid-template-columns: 40px minmax(0, 1fr) auto; }
  /* The badge case: its heading and count, the next badge on its own line, and the badges one to a row. */
  html.touch .profile-page .profile-badge-case { padding: 12px 14px; }
  html.touch .profile-page .profile-badge-grid { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'title count' 'next next' 'list list'; } html.touch .profile-page .profile-badge-next { white-space: normal; }
  html.touch .profile-page .profile-badge-case ul { grid-template-columns: minmax(0, 1fr); } html.touch .profile-page .profile-badge-case li { grid-template-columns: 64px auto minmax(0, 1fr); }
  html.touch .profile-page .profile-badge-case img { width: 56px; height: 56px; }
  html.touch .profile-page .profile-account-line { flex-wrap: wrap; height: auto; gap: 0 12px; padding: 6px 4px 0; }
  html.touch .profile-page .profile-account-line p { flex: 1 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  html.touch .profile-page .profile-account-line #signout { min-height: 40px; }

  /* Goals: the lead, the level and every list in one column. */
  html.touch .profile-page .profile-progress { gap: 22px; padding: 16px 14px 20px; }
  html.touch .profile-page .profile-goal, html.touch .profile-page .profile-level-panel { padding: 18px 16px; }
  html.touch .profile-page .profile-goal .goal-line { font-size: var(--t-m); }
  html.touch .profile-page .profile-steps li { padding: 14px; }
  html.touch .profile-page .profile-achievements-next li { padding: 14px; }
  html.touch .profile-page .profile-achievements-more { grid-template-columns: minmax(0, 1fr); }

  /* Customise: each line's name over its choices. */
  html.touch .profile-page .profile-customise { gap: 16px; padding: 14px 14px 18px; }
  html.touch .profile-page .profile-customise-head { top: 46px; margin: -14px -14px 0; padding: 14px 14px 6px; }
  html.touch .profile-page .profile-setline { flex-direction: column; align-items: stretch; gap: 10px; }
  html.touch .profile-page .profile-key { width: auto; }
  html.touch .profile-page .profile-banners > .profile-key { padding-top: 0; }
  html.touch .profile-page .profile-banners > .profile-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  html.touch .profile-page .profile-banner-choice { min-width: 0; }
  html.touch .profile-page .profile-thumb { width: 100%; height: auto; aspect-ratio: 124 / 72; }
  html.touch .profile-page .profile-audience { flex-direction: column; align-items: stretch; gap: 10px; }
  html.touch .profile-page .profile-audience > .profile-key { max-width: none; }
  html.touch .profile-page .profile-setline > .profile-help { min-width: 0; }
  html.touch .profile-page .profile-customise > .profile-help { margin-top: -4px; }
  html.touch .profile-page .profile-picks { max-width: none; }
  html.touch .profile-page .profile-privacy { gap: 14px; }
}
/* Both ways round (mobile council round 1, both judges): who this is in one compact block, the avatar beside the
   title, name and date, with Customise and Change name sharing the row under them. The name's parts join the block's
   grid (display: contents); the editor opens across the name's columns. The tag reads over any banner. Every button is
   44px as drawn: on its side the frame is zoomed to 0.8 to 1 (kit/scale.rs `touch_client_scale`; round 1, Sol). */
@media (max-width: 600px), (orientation: landscape) and (max-width: 1099.98px) {
  html.touch .profile-page { --tap: calc(44px / var(--client-scale, 1)); }
  html.touch .profile-page .profile-who-block { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto;
    grid-template-areas: 'avatar title title' 'avatar name name' 'avatar meta rename'; align-items: center; gap: 0 12px; padding-bottom: 10px; }
  html.touch .profile-page :is(.profile-who-copy, .profile-name-slot, .profile-name-line) { display: contents; }
  html.touch .profile-page .profile-avatar { grid-area: avatar; align-self: start; width: 64px; height: 64px; padding: 2px; }
  html.touch .profile-page .profile-avatar > img.default-avatar { width: 56px; height: 56px; }
  html.touch .profile-page .profile-title { grid-area: title; }
  html.touch .profile-page .profile-who { grid-area: name; font-size: var(--t-l); }
  html.touch .profile-page .profile-who .faint { margin-left: 8px; color: var(--text); font-size: var(--t-s); text-shadow: 0 2px 0 var(--bg-0), 0 0 6px var(--bg-0); }
  html.touch .profile-page .profile-name-slot > :not(.profile-name-line) { grid-column: 2 / -1; }
  html.touch .profile-page .profile-name-slot > .profile-name-edit { position: static; grid-row: 1 / span 3; }
  html.touch .profile-page #profile-change-name { grid-area: rename; min-height: var(--tap); }
  html.touch .profile-page:has(.profile-section:not([hidden]) > .profile-customise) #profile-change-name { grid-area: auto; grid-column: 2 / -1; justify-self: start; margin-top: 2px; }
  html.touch .profile-page .profile-name-row { flex-wrap: wrap; }
  html.touch .profile-page .profile-name-row .profile-help { flex: 1 1 100%; }
  html.touch .profile-page .profile-meta { grid-area: meta; flex-wrap: wrap; gap: 0 12px; height: auto; min-height: 0; font-size: var(--t-s); }
  /* "Online" on your own card says nothing to you (mobile council round 2, Opus). */
  html.touch .profile-page .profile-meta > .pres { display: none; }
  /* The section tabs in the main tabs' words and chosen look, as the Store's sub-tabs (polish-store.css; round 2, Opus). */
  html.touch .profile-page .profile-tabs .kit-tab { font: 700 var(--t-s)/1 var(--font-body); letter-spacing: 1px; }
  html.touch .profile-page .profile-tabs .kit-tab[aria-current="page"] { background: var(--you-soft); }
  /* The card's Customise only repeated the Customise tab over it (mobile council round 3, Opus), so a phone leaves it
     out, and Change name sits beside the date. Empty featured sockets wear a "+", which chooses champions
     (profile_identity.rs), not grey figures that read as broken. */
  html.touch .profile-page .profile-account-action { display: none; }
  /* Until mastery is earned, how it is earned is a footnote under its heading (mobile council round 3, Sol). */
  html.touch .profile-page .profile-mastery-panel.empty > p { color: var(--text-dim); font-size: var(--t-xs); line-height: 1.4; }
  html.touch .profile-page .profile-showcase .profile-featured-slots > i { display: grid; place-items: center; background: radial-gradient(circle at 50% 38%, var(--bg-2), var(--bg-0) 78%);
    border-color: rgb(232 196 92 / 55%); cursor: pointer; }
  html.touch .profile-page .profile-showcase .profile-featured-slots > i::before { content: '+' / ''; color: var(--you-light); font: 400 var(--t-l)/1 var(--font-head); }
  html.touch .profile-page :is(.profile-customise-action, .profile-featured .btn, .profile-tabs button, .profile-empty-play) { min-height: var(--tap); }
  html.touch .profile-page :is(.profile-identity-progress, .profile-identity-status) { height: auto; min-height: 0; padding-block: 6px; }
  html.touch .profile-page .card-crest img { width: 28px; height: 28px; }
  html.touch .profile-page .profile-identity-progress .card-parts { grid-template-rows: none; grid-auto-rows: auto; height: auto; padding: 0; }
}
/* A phone on its side: the frame is zoomed to 0.8 to 1 (kit/scale.rs `touch_client_scale`), so the alcoves are not
   zoomed again (at .72, or .55 on Customise, a champion's name was drawn at 7 to 10px). They keep the showcase's width
   at full size, the figures smaller and the names at reading size, as upright. Mobile council round 1 (both judges:
   the level band spanned the card with its right half empty, and the record lay below the screen): who this is and
   the level strip on the left, the featured champions or the invitation on the right, so the record starts in view. */
@media (orientation: landscape) and (max-width: 1099.98px) {
  html.touch .profile-page .profile-featured:has(> figure) { zoom: 1; flex-wrap: nowrap; justify-content: stretch; gap: 8px; width: 100%; height: auto; }
  html.touch .profile-page .profile-featured .profile-featured-slot { flex: 1 1 0; width: auto; min-width: 0; height: 176px; }
  html.touch .profile-page .profile-featured .profile-featured-slot.empty { background-size: 64px 64px, auto; }
  html.touch .profile-page .profile-featured-stage > .spr { zoom: .66; }
  html.touch .profile-page .profile-featured-slot figcaption { height: 34px; padding: 0 4px; font-size: var(--t-xs); }
  html.touch .profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-showcase { zoom: 1; width: 340px; height: 176px; }
  html.touch .profile-page:has(.profile-section:not([hidden]) > .profile-customise) .profile-showcase.inviting > .profile-featured { height: 176px; }
  html.touch .profile-page .profile-account-line #signout { min-height: var(--tap); }
  html.touch .profile-page .pages-switch { height: var(--tap); }
  /* A new player's card is short, so the empty Match history and its Play show in the first screen (mobile council
     round 2, Sol): who this is on the left, the invitation and then the level on the right, the prompt left out. */
  html.touch .profile-page .profile-identity-details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto;
    grid-template-areas: 'who showcase' 'who progress' 'foot foot'; align-items: center; gap: 0 20px; min-height: 0; padding: 8px 20px 0; }
  html.touch .profile-page .profile-who-block { padding-bottom: 8px; }
  html.touch .profile-page { gap: 8px; } html.touch .profile-page .profile-empty { padding-block: 12px; }
  html.touch .profile-page :is(.profile-identity-progress, .profile-identity-status) { align-self: start; margin-inline: 0; padding-inline: 0; border-top: 0; background: none; }
  html.touch .profile-page .profile-showcase { width: 100%; padding-bottom: 10px; }
  html.touch .profile-page .profile-showcase.inviting > .profile-featured { grid-template-areas: 'slots action'; gap: 6px 12px; height: auto; padding: 6px 12px; }
  html.touch .profile-page .profile-showcase.inviting > .profile-featured > .profile-featured-prompt { display: none; }
  html.touch .profile-page .profile-showcase.inviting { padding-bottom: 4px; }
  html.touch .profile-page .profile-featured-slots > i { width: 44px; height: 44px; background-size: 32px 32px, auto; }
  html.touch .profile-page .profile-featured > .profile-featured-prompt { font-size: var(--t-s); }
}
/* Change name reads as the game's other quiet links, gold and underlined, not as a caption (mobile council round 0). */
html.touch .profile-page #profile-change-name { color: var(--you-light); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
/* A small phone on its side (568x320): Choose champions under the empty sockets, Change name under the date (no room beside). */
@media (orientation: landscape) and (max-width: 699.98px) {
  html.touch .profile-page .profile-showcase.inviting > .profile-featured { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'slots' 'action'; }
  html.touch .profile-page .profile-showcase.inviting > .profile-featured > .btn { justify-self: stretch; } html.touch .profile-page #profile-change-name { justify-self: start; }
  html.touch .profile-page .profile-who-block { grid-template-areas: 'avatar title title' 'avatar name name' 'avatar meta meta' 'avatar rename rename'; }
}
