/* Profile tab (PLAN 4 Profile): a hero band, then one rail + main layout shared by Overview and Improve */
.pf-page { display: flex; flex-direction: column; gap: var(--space-9); }
.pf-message { flex: 1; gap: var(--space-6); }

/* ---------- hero band: the most played champion's splash bleeding behind the page column ---------- */
.pf-hero { position: relative; isolation: isolate; display: flex; flex-direction: column; padding-top: var(--space-7); }
.pf-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-1 * var(--space-9));
  bottom: -48px;
  left: calc(50% - 50vw);
  right: calc(50% - 50vw);
  background: var(--splash) right 20% top 18% / min(1500px, 110vw) auto no-repeat;
  opacity: .5;
  -webkit-mask-image: linear-gradient(90deg, transparent 8%, #000 55%), linear-gradient(0deg, transparent 4%, #000 55%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 8%, #000 55%), linear-gradient(0deg, transparent 4%, #000 55%);
  mask-composite: intersect;
  pointer-events: none;
  animation: pf-splash-in 700ms var(--ease-out) both;
}
.pf-hero.no-splash::before { display: none; }
@keyframes pf-splash-in { from { opacity: 0; scale: 1.04; } }
.pf-hero-top { display: flex; align-items: center; gap: var(--space-9); min-height: 120px; }
.pf-hero-top .spacer { flex: 1; }
.pf-icon { position: relative; flex: none; }
.pf-icon-pic { width: 96px; height: 96px; border-radius: var(--radius-xl); border: 1px solid color-mix(in oklch, var(--amber) 55%, transparent); box-shadow: 0 0 0 4px color-mix(in oklch, var(--surface-0) 70%, transparent), 0 14px 34px -12px rgb(0 0 0 / .9); }
.pf-icon-level { position: absolute; left: 50%; bottom: -10px; translate: -50% 0; padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); border: 1px solid color-mix(in oklch, var(--amber) 55%, transparent); background: var(--surface-0); font: 600 var(--fs-sm)/1 var(--font-mono); color: var(--amber); }
.pf-title { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.pf-riot-id { display: flex; align-items: baseline; gap: var(--space-4); min-width: 0; }
.pf-head-name { font: 700 var(--fs-2xl)/1 var(--font-display); letter-spacing: .01em; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 24px rgb(0 0 0 / .7); }
.pf-head-tag { font: 600 var(--fs-xl)/1 var(--font-display); color: var(--text-3); }
.pf-hero-meta { display: flex; align-items: center; gap: var(--space-4); }
.pf-region { padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); border: 1px solid var(--hairline-strong); background: color-mix(in oklch, var(--surface-0) 60%, transparent); font: 600 var(--fs-xs)/1 var(--font-mono); letter-spacing: .08em; color: var(--text-2); }
.pf-title .pf-chips { margin: var(--space-1) 0 0; }

/* the solo rank beside the name */
.pf-hero-rank { flex: none; display: flex; align-items: center; gap: var(--space-6); padding: var(--space-5) var(--space-9) var(--space-5) var(--space-6); border: 1px solid var(--hairline-strong); border-radius: var(--radius-xl); background: linear-gradient(135deg, color-mix(in oklch, var(--surface-2) 75%, transparent), color-mix(in oklch, var(--surface-0) 70%, transparent)); backdrop-filter: blur(10px); box-shadow: var(--edge-light); }
.pf-hero-rank.unranked { padding-left: var(--space-9); }
.pf-hero-emblem { --emblem: 72px; }
.pf-hero-rank-text { display: flex; flex-direction: column; gap: var(--space-3); }
.pf-hero-tier { font: 700 var(--fs-xl)/1.1 var(--font-display); color: var(--text-1); }
.pf-hero-rank.unranked .pf-hero-tier { color: var(--text-3); }
.pf-hero-lp { font: 500 var(--fs-sm)/1 var(--font-mono); color: var(--text-3); }
.pf-hero-lp b { font-weight: 600; color: var(--text-1); }
.pf-hero-rank .pf-emblem-skel { width: 72px; height: 72px; }

/* views on the left, the update on the right, one hairline above */
.pf-hero-bar { display: flex; align-items: center; gap: var(--space-6); margin-top: var(--space-9); padding-top: var(--space-6); border-top: 1px solid var(--hairline); }
.pf-hero-bar .spacer { flex: 1; }
.bar-button.pf-update { flex: none; display: inline-grid; place-items: center; width: 34px; padding: 0; }
.pf-update .ui-svg { width: 16px; height: 16px; }
.pf-update:disabled { cursor: default; color: var(--text-3); }
.pf-update:disabled .ui-svg { animation: pf-spin 1s linear infinite; }
@keyframes pf-spin { to { rotate: 360deg; } }
.pf-updated { flex: none; font: 500 var(--fs-sm)/1 var(--font-ui); color: var(--text-3); white-space: nowrap; }

/* tags: what stands out against the player's own rank and role; problems in red, strengths in green */
.pf-chips { display: flex; flex-wrap: wrap; gap: var(--space-3); min-width: 0; margin-left: var(--space-8); }
.pf-chip { display: inline-flex; align-items: center; gap: var(--space-3); height: 28px; padding: 0 var(--space-5); border-radius: var(--radius-pill); border: 1px solid var(--hairline-strong); background: color-mix(in oklch, var(--surface-1) 80%, transparent); backdrop-filter: blur(6px); font: 600 var(--fs-sm)/1 var(--font-ui); color: var(--text-1); cursor: default; white-space: nowrap; }
.pf-chip .ui-svg { width: 13px; height: 13px; }
.pf-chip.good { border-color: color-mix(in oklch, var(--pos) 40%, transparent); background: linear-gradient(90deg, color-mix(in oklch, var(--pos) 12%, var(--surface-1)), color-mix(in oklch, var(--surface-1) 80%, transparent)); }
.pf-chip.good .ui-svg { color: var(--pos); }
.pf-chip.bad { border-color: color-mix(in oklch, var(--neg) 40%, transparent); background: linear-gradient(90deg, color-mix(in oklch, var(--neg) 12%, var(--surface-1)), color-mix(in oklch, var(--surface-1) 80%, transparent)); }
.pf-chip.bad .ui-svg { color: var(--neg); }
.pf-chip.main { border-color: color-mix(in oklch, var(--amber) 40%, transparent); }
.pf-chip-pic { width: 18px; height: 18px; border-radius: 50%; }

/* ---------- rail + main ---------- */
.pf-body { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); align-items: start; gap: var(--grid-gap); }
.pf-side { position: sticky; top: var(--pf-rail-top, 16px); display: flex; flex-direction: column; gap: var(--space-7); min-width: 0; }
.pf-side .panel { flex: none; gap: var(--space-6); }
.pf-main { display: flex; flex-direction: column; gap: var(--space-9); min-width: 0; }
.pf-queue-select { height: 28px; margin-left: auto; font-size: var(--fs-sm); }
.pf-champs > .panel-head { flex-wrap: wrap; row-gap: var(--space-3); }

/* a thin bar for any share */
.pf-bar { position: relative; display: block; height: 4px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.pf-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--text-3); }
.pf-lp-bar > span, .pf-share-bar > span { background: linear-gradient(90deg, color-mix(in oklch, var(--amber) 55%, transparent), var(--amber)); }
.pf-wr-bar { background: color-mix(in oklch, var(--loss) 45%, var(--surface-2)); }
.pf-wr-bar > span { background: var(--win); border-radius: 0; }
.pf-w { color: var(--win); }
.pf-l { color: var(--loss); }

/* ranked */
.pf-rank-body { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-6); }
.pf-rank-body + .pf-rank-body { padding-top: var(--space-6); border-top: 1px solid var(--hairline); }
.pf-emblem { --emblem: 64px; }
.pf-emblem-empty { width: 72px; height: 64px; border-radius: 50%; background: radial-gradient(circle, var(--surface-2) 40%, transparent 70%); }
.pf-rank-text { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.pf-rank-name { font: 700 var(--fs-xl)/1 var(--font-display); color: var(--text-1); }
.pf-rank-name.unranked { color: var(--text-3); font-size: var(--fs-lg); }
.pf-rank-lp { font: 500 var(--fs-sm)/1 var(--font-mono); color: var(--text-3); }
.pf-rank-lp b { font-weight: 600; color: var(--text-1); }
.pf-lp-bar { width: 100%; max-width: 120px; }
.pf-rank-record { display: flex; flex-direction: column; align-items: flex-end; gap: var(--space-3); }
.pf-rank-wr { font: 600 var(--fs-lg)/1 var(--font-mono); color: var(--text-1); }
.pf-rank-wl { font: 500 var(--fs-sm)/1 var(--font-mono); white-space: nowrap; }
.pf-rank-record .pf-wr-bar { width: 64px; }
.pf-emblem-skel { flex: none; width: 64px; height: 64px; border-radius: 50%; }
.pf-flex { display: flex; align-items: center; gap: var(--space-5); }
.pf-flex .num b { margin-right: var(--space-1); }
.skel.line.pf-skel-name { width: 110px; height: 18px; }
.skel.line.pf-skel-short { width: 60px; height: 12px; }
.skel.line.pf-skel-row { width: 100%; height: 36px; }
.skel.line.pf-skel-stat { width: 56px; height: 22px; }

/* champions and played with */
.pf-list { display: flex; flex-direction: column; gap: var(--space-1); }
.pf-champ { display: grid; grid-template-columns: minmax(0, 1fr) 64px 48px; align-items: center; gap: var(--space-5); margin: 0 calc(-1 * var(--space-4)); padding: var(--space-3) var(--space-4); border-radius: var(--radius-lg); color: inherit; text-decoration: none; }
.pf-champ:hover, .pf-champ:focus-visible { background: color-mix(in oklch, var(--surface-2) 80%, transparent); }
.pf-champ:hover .cell-name { color: var(--amber); }
.pf-champ .champ-cell { --cell-icon: 32px; }
.pf-champ .cell-role { font-size: var(--fs-xs); }
.pf-champ-kda { text-align: right; font-size: var(--fs-xs); color: var(--text-3); }
.pf-champ-kda b { margin-right: var(--space-2); font-size: var(--fs-md); color: var(--text-1); }
.pf-champ-wr { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-2); text-align: right; }
.pf-champ-wr b { font-size: var(--fs-md); font-weight: 600; color: var(--text-1); }
.pf-champ.few .pf-champ-wr b, .pf-mate.few .pf-champ-wr b { color: var(--text-3); }
.pf-champ.few .pf-wr-bar, .pf-mate.few .pf-wr-bar { opacity: .45; }
.pf-mate { display: grid; grid-template-columns: minmax(0, 1fr) auto 48px; align-items: center; gap: var(--space-5); padding: var(--space-3) 0; }
.pf-mate + .pf-mate { border-top: 1px solid var(--hairline); }
.pf-mate-games { font-size: var(--fs-sm); color: var(--text-3); white-space: nowrap; }
.pf-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; }
.pf-link:hover .pf-name, a.pf-player-name:hover { color: var(--amber); }
.pf-name { font: 600 var(--fs-md)/1.2 var(--font-ui); color: var(--text-1); }
.pf-tag { font: 500 var(--fs-sm)/1.2 var(--font-ui); color: var(--text-3); }

/* the long tail of champions waits behind a button */
.pf-more { align-self: stretch; height: 32px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-lg); background: color-mix(in oklch, var(--surface-2) 50%, transparent); font: 600 var(--fs-sm)/1 var(--font-ui); color: var(--text-2); cursor: pointer; transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast); }
.pf-more:hover, .pf-more:focus-visible { border-color: var(--line-3); background: var(--surface-2); color: var(--text-1); }

/* ---------- recent form: the ring, the averages, the champions and the roles ---------- */
.pf-summary-card { gap: var(--space-6); }
.pf-summary { display: grid; grid-template-columns: auto minmax(max-content, 1fr) repeat(2, minmax(0, 1fr)) auto auto; align-items: center; }
.pf-summary-cell { display: flex; flex-direction: column; justify-content: center; gap: var(--space-3); min-width: 0; height: 100%; padding: 0 var(--space-7); border-left: 1px solid var(--hairline); }
.pf-summary-cell:first-child { padding-left: 0; border-left: 0; }
.pf-summary-cell:last-child { padding-right: 0; }
.pf-summary-cell .stat-value { font-size: var(--fs-xl); line-height: 1.1; color: var(--text-1); }
.pf-summary-cell .stat-value.pos-text { color: var(--pos); }
.pf-summary-cell .stat-value.neg-text { color: var(--neg); }
.pf-summary-sub { font: 500 var(--fs-sm)/1 var(--font-mono); color: var(--text-3); white-space: nowrap; }
.pf-summary-cell .pf-share-bar { width: 100%; max-width: 88px; }
.pf-summary-ring { flex-direction: row; align-items: center; justify-content: flex-start; gap: var(--space-6); }
.skel.line.pf-skel-stat + .skel { margin-top: var(--space-3); }
.pf-summary > .pf-summary-stat { display: flex; flex-direction: column; gap: var(--space-3); padding-right: var(--space-7); }

/* the win rate as a ring that fills on arrival, wins in blue, losses in red */
@property --ring-fill { syntax: "<number>"; inherits: false; initial-value: 0; }
.pf-ring {
  --ring-fill: var(--share);
  position: relative;
  flex: none;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--space-2);
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(var(--win) calc(var(--ring-fill) * 1turn), color-mix(in oklch, var(--loss) 70%, var(--surface-2)) 0);
  transition: --ring-fill var(--dur-count) var(--ease-out);
}
.pf-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, var(--surface-2), var(--surface-1) 70%); box-shadow: inset 0 0 0 1px var(--hairline); }
.pf-ring-value { position: relative; font: 700 var(--fs-xl)/1 var(--font-mono); color: var(--text-1); }
.pf-ring-sub { position: relative; font: 600 var(--fs-xs)/1 var(--font-mono); color: var(--text-3); white-space: nowrap; }
.pf-enter .pf-ring { animation: pf-ring var(--dur-lockin) var(--ease-out) both; animation-delay: 120ms; }
@keyframes pf-ring { from { --ring-fill: 0; } }

/* the champions of the last games, most played first */
.pf-recent { display: grid; grid-template-columns: 24px auto auto; align-items: center; column-gap: var(--space-4); row-gap: var(--space-2); }
.pf-recent .sublabel { grid-column: 1 / -1; margin-bottom: var(--space-1); }
.pf-recent-champ { display: contents; }
.pf-recent-pic { width: 24px; height: 24px; border-radius: var(--radius-sm); }
.pf-recent .num { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; }
.pf-recent-wr b { margin-right: var(--space-2); font-size: var(--fs-sm); color: var(--text-1); }
.pf-recent-kda { text-align: right; color: var(--text-2); }
.pf-recent-kda::after { content: " KDA"; color: var(--text-4); }

/* the roles of the last games, one bar each */
.pf-roles { display: flex; align-items: flex-end; gap: var(--space-3); }
.pf-role { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); cursor: default; }
.pf-role-track { position: relative; display: flex; align-items: flex-end; width: 14px; height: 40px; border-radius: var(--radius-sm); background: var(--surface-2); overflow: hidden; }
.pf-role-track span { display: block; width: 100%; border-radius: inherit; background: linear-gradient(180deg, var(--amber), color-mix(in oklch, var(--amber) 45%, transparent)); }
.pf-role .role-svg { width: 14px; height: 14px; color: var(--text-2); }
.pf-role.none .role-svg { color: var(--text-4); }

/* ---------- match history ---------- */
.pf-history { display: flex; flex-direction: column; gap: var(--space-4); }
.pf-history-head { display: flex; align-items: baseline; gap: var(--space-5); }
.pf-history-head .spacer { flex: 1; }
.pf-section-title { margin: 0; font: 600 var(--fs-lg)/1.2 var(--font-display); letter-spacing: .02em; color: var(--text-1); }
.pf-history-hint { font: 500 var(--fs-sm)/1 var(--font-ui); color: var(--text-4); }
.pf-progress { flex: none; width: 120px; height: 4px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.pf-progress span { display: block; height: 100%; border-radius: inherit; background: var(--amber); transition: width var(--dur-fast); }
.pf-matches { display: flex; flex-direction: column; gap: var(--space-4); }

/* a day of games under one line that runs out to the edge */
.pf-day { flex: none; margin: 0; font: inherit; display: flex; align-items: center; gap: var(--space-5); padding: var(--space-6) 0 var(--space-1); }
.pf-day:first-child { padding-top: 0; }
.pf-day::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.pf-day-name { font: 600 var(--fs-md)/1 var(--font-display); letter-spacing: .03em; color: var(--text-1); }
.pf-day-count { font: 500 var(--fs-sm)/1 var(--font-ui); color: var(--text-3); }
.pf-day-record { padding: var(--space-2) var(--space-4); border-radius: var(--radius-pill); background: var(--surface-1); border: 1px solid var(--hairline); font: 600 var(--fs-xs)/1 var(--font-mono); }
.pf-day-record .pos-text { color: var(--win); }
.pf-day-record .neg-text { color: var(--loss); }

/* one game: a 4 px result edge and a tint that fades out; fixed columns so nothing drifts on wide screens */
.pf-match {
  --result: var(--text-4);
  flex: none;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  background: linear-gradient(90deg, color-mix(in oklch, var(--result) 14%, var(--surface-1)), var(--surface-1) 42%);
  box-shadow: inset 4px 0 0 var(--result), var(--edge-light);
  overflow: hidden;
  /* games scrolled out of the history box skip layout and paint */
  content-visibility: auto;
  contain-intrinsic-size: auto 92px;
}
.pf-match.win { --result: var(--win); }
.pf-match.loss { --result: var(--loss); }
.pf-match.skel-row { display: flex; height: 96px; }
.pf-match-line {
  position: relative;
  display: grid;
  grid-template-columns: 80px 92px 104px 56px 166px minmax(176px, 216px);
  justify-content: space-between;
  align-items: center;
  gap: var(--space-6);
  min-height: 96px;
  padding: var(--space-4) 44px var(--space-4) var(--space-8);
  cursor: pointer;
  transition: background var(--dur-fast);
}
.pf-match-line:hover { background: color-mix(in oklch, var(--surface-2) 45%, transparent); }
.pf-match-line:focus-visible { outline-offset: -2px; }
.pf-match-info { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.pf-result-line { display: flex; align-items: center; gap: var(--space-3); }
.pf-result { font: 700 var(--fs-lg)/1 var(--font-display); letter-spacing: .02em; color: var(--result); }
.pf-match.remake .pf-result { color: var(--text-3); }
.pf-queue { font: 600 var(--fs-sm)/1.1 var(--font-ui); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-match-meta { display: flex; flex-direction: column; gap: var(--space-2); }
.pf-duration { font: 500 var(--fs-sm)/1 var(--font-mono); color: var(--text-2); }
.pf-when { font: 500 var(--fs-xs)/1.2 var(--font-ui); color: var(--text-3); white-space: nowrap; }
.pf-place { padding: 2px var(--space-3); border-radius: var(--radius-sm); background: var(--surface-3); font: 600 var(--fs-xs)/1.2 var(--font-mono); color: var(--text-2); }
.pf-place.mvp { background: color-mix(in oklch, var(--amber) 22%, transparent); color: var(--amber); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--amber) 40%, transparent); }

.pf-loadout { display: flex; align-items: center; gap: var(--space-2); }
.pf-champion { position: relative; flex: none; margin-right: var(--space-1); }
.pf-champion-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--hairline-strong); }
.pf-level { position: absolute; right: -5px; bottom: -5px; min-width: 20px; padding: 2px 3px; border-radius: var(--radius-sm); border: 1px solid var(--hairline-strong); background: var(--surface-0); font: 600 var(--fs-xs)/1 var(--font-mono); text-align: center; color: var(--text-1); }
.pf-spells, .pf-runes { display: flex; flex-direction: column; gap: 2px; }
.pf-spell, .pf-keystone { width: 22px; height: 22px; border-radius: var(--radius-sm); }
.pf-runes { align-items: center; }
.pf-keystone { border-radius: 50%; background: var(--surface-0); }
.pf-secondary { width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: transparent; }

.pf-score { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.pf-kda { font: 600 18px/1 var(--font-mono); letter-spacing: -.02em; color: var(--text-1); white-space: nowrap; }
.pf-score-line { display: flex; flex-direction: column; gap: var(--space-2); font: 500 var(--fs-xs)/1 var(--font-mono); color: var(--text-3); white-space: nowrap; }
.pf-ratio b, .pf-kp b { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.pf-ratio.good b { color: var(--text-1); }
.pf-ratio.great b { color: var(--amber); }
.pf-farm { display: flex; flex-direction: column; gap: var(--space-4); }
.pf-inline-stat { display: inline-flex; align-items: center; gap: var(--space-3); font: 500 var(--fs-sm)/1 var(--font-mono); color: var(--text-2); }
.pf-inline-stat b { font-weight: 600; color: var(--text-1); }
.pf-inline-stat .ui-svg, .pf-inline-stat .gm-icon { width: 13px; height: 13px; color: var(--text-3); }
.pf-dot { margin: 0 var(--space-3); color: var(--text-4); }
.pf-items { display: grid; grid-template-columns: repeat(7, 22px); gap: 2px; }
.pf-item { width: 22px; height: 22px; border-radius: var(--radius-sm); box-shadow: 0 0 0 1px rgb(0 0 0 / .4); }
.pf-item.empty { background: color-mix(in oklch, var(--surface-0) 60%, transparent); box-shadow: inset 0 0 0 1px var(--hairline); }
.pf-items .pf-item:last-child { border-radius: 50%; }
.pf-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); min-width: 0; }
.pf-team { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pf-player { display: flex; align-items: center; gap: var(--space-3); min-width: 0; height: 15px; }
.pf-player-icon { flex: none; width: 15px; height: 15px; border-radius: 3px; }
.pf-player-icon .initials { font-size: 7px; }
.pf-player-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 var(--fs-xs)/1.2 var(--font-ui); color: var(--text-3); text-decoration: none; }
.pf-player.you .pf-player-name { font-weight: 700; color: var(--amber); }
/* open, the scoreboard lists the same ten players: the names make room but keep the line's width */
.pf-match.open .pf-teams { visibility: hidden; }

/* a game opens into its breakdown below the line */
.pf-expand { position: absolute; right: 10px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 24px; height: 48px; border-radius: var(--radius-md); background: color-mix(in oklch, var(--surface-2) 70%, transparent); color: var(--text-3); pointer-events: none; transition: background var(--dur-fast), color var(--dur-fast); }
.pf-match-line:hover .pf-expand { color: var(--text-1); background: var(--surface-3); }
.pf-expand .ui-svg { width: 14px; height: 14px; }
.pf-match.open { border-color: var(--hairline-strong); }
.pf-match.open .pf-expand { color: var(--amber); }

/* ---------- the breakdown: you vs your lane opponent, then both teams ---------- */
.pf-board { display: flex; flex-direction: column; gap: var(--space-5); padding: var(--space-6) var(--space-6) var(--space-6) var(--space-8); border-top: 1px solid var(--hairline); background: color-mix(in oklch, var(--surface-0) 55%, transparent); }
.pf-lane { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-4) var(--space-9); padding: var(--space-5) var(--space-6); border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: linear-gradient(90deg, color-mix(in oklch, var(--amber) 7%, var(--surface-1)), var(--surface-1) 50%); }
.pf-lane-title { display: inline-flex; align-items: center; gap: var(--space-3); font: 500 var(--fs-md)/1 var(--font-ui); color: var(--text-2); }
.pf-lane-title b { font-weight: 700; color: var(--text-1); }
.pf-lane-pic { width: 24px; height: 24px; border-radius: var(--radius-sm); }
.pf-lane-gap { display: inline-flex; align-items: center; gap: var(--space-3); font: 600 var(--fs-md)/1 var(--font-mono); color: var(--text-1); }
.pf-lane-gap .stat-icon .gm-icon, .pf-lane-gap .stat-icon .ui-svg { width: 15px; height: 15px; }
.pf-board-team { --team: var(--text-4); display: flex; flex-direction: column; padding: var(--space-2) var(--space-6) var(--space-3); border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: linear-gradient(90deg, color-mix(in oklch, var(--team) 10%, var(--surface-1)), var(--surface-1) 35%); box-shadow: inset 3px 0 0 var(--team); }
.pf-board-team.win { --team: var(--win); }
.pf-board-team.loss { --team: var(--loss); }
.pf-board-title { display: flex; align-items: center; gap: var(--space-7); padding: var(--space-4) 0 var(--space-2); }
.pf-board-result { font: 700 var(--fs-lg)/1 var(--font-display); color: var(--team); }
.pf-board-totals { display: inline-flex; align-items: center; gap: var(--space-6); font: 500 var(--fs-sm)/1 var(--font-ui); color: var(--text-2); }
.pf-total { display: inline-flex; align-items: center; gap: var(--space-2); font: 600 var(--fs-sm)/1 var(--font-mono); color: var(--text-2); }
.pf-total .gm-icon { width: 14px; height: 14px; }
.pf-total-obj { width: 16px; height: 16px; opacity: .75; }
.pf-board-head, .pf-board-row { display: grid; grid-template-columns: 40px 32px minmax(0, 1fr) 120px 60px 96px 44px 36px 166px; align-items: center; gap: var(--space-5); }
.pf-board-head { padding: var(--space-3) 0; font: 600 var(--fs-xs)/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.pf-board-head span:nth-child(2) { grid-column: 2 / 4; }
.pf-board-head .stat-icon { color: var(--text-3); }
.pf-board-row { min-height: 42px; padding: var(--space-1) 0; border-top: 1px solid var(--hairline); }
.pf-board-row.you { margin: 0 calc(-1 * var(--space-6)); padding: var(--space-1) var(--space-6); background: linear-gradient(90deg, color-mix(in oklch, var(--amber) 14%, transparent), color-mix(in oklch, var(--amber) 4%, transparent)); box-shadow: inset 2px 0 0 var(--amber); }
.pf-board-champ { position: relative; display: block; width: 30px; height: 30px; }
.pf-board-pic { width: 30px; height: 30px; border-radius: var(--radius-md); }
.pf-board-level { position: absolute; right: -4px; bottom: -4px; min-width: 15px; padding: 2px 2px 1px; border-radius: var(--radius-xs); background: var(--surface-0); font: 600 var(--fs-xs)/1 var(--font-mono); color: var(--text-2); text-align: center; }
.pf-board-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 var(--fs-md)/1.2 var(--font-ui); color: var(--text-1); text-decoration: none; }
.pf-board-name.you { font-weight: 700; color: var(--amber); }
a.pf-board-name:hover { color: var(--amber); }
.pf-board-stat { display: flex; flex-direction: column; gap: 4px; font: 600 var(--fs-sm)/1 var(--font-mono); color: var(--text-1); white-space: nowrap; }
.pf-board-stat small { font: 500 var(--fs-xs)/1 var(--font-ui); color: var(--text-3); }
.pf-board-damage { display: flex; flex-direction: column; gap: 5px; }
.pf-board-damage b { font: 600 var(--fs-sm)/1 var(--font-mono); color: var(--text-1); }
.pf-board-bar { height: 4px; border-radius: var(--radius-pill); background: var(--surface-3); overflow: hidden; }
.pf-board-bar span { display: block; height: 100%; border-radius: inherit; background: var(--text-3); }
.pf-board-team.win .pf-board-bar span { background: color-mix(in oklch, var(--win) 70%, var(--text-3)); }
.pf-board-team.loss .pf-board-bar span { background: color-mix(in oklch, var(--loss) 70%, var(--text-3)); }
.pf-board-row.you .pf-board-bar span { background: var(--amber); }
.pf-board-items { display: grid; grid-template-columns: repeat(7, 22px); gap: 2px; }
.pf-board-item { width: 22px; height: 22px; border-radius: var(--radius-xs); }
.pf-board-item.empty { background: color-mix(in oklch, var(--surface-0) 60%, transparent); box-shadow: inset 0 0 0 1px var(--hairline); }
.pf-champ-link { display: block; flex: none; border-radius: var(--radius-sm); }
.pf-champ-link:hover .pic { outline: 1px solid var(--amber); outline-offset: 1px; }

.pf-linked { flex: none; display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: var(--space-5); border-bottom: 1px solid var(--hairline); }

/* the page arriving: the rail, then games rising in turn */
.pf-enter .pf-match { animation: rise var(--dur-slow) var(--ease-out) both; animation-delay: calc(min(var(--i), 12) * 30ms); }
.pf-enter .pf-day, .pf-enter .pf-summary-card { animation: rise var(--dur-slow) var(--ease-out) both; }
.pf-enter .pf-side > .panel { animation: rise var(--dur-slow) var(--ease-out) both; }
.pf-enter .pf-side > .panel:nth-child(2) { animation-delay: 60ms; }
.pf-enter .pf-side > .panel:nth-child(3) { animation-delay: 120ms; }

@media (max-width: 1279px) {
  .pf-match-line { grid-template-columns: 76px 92px 100px 52px 166px minmax(150px, 1fr); gap: var(--space-5); }
}
@media (max-width: 1100px) {
  .pf-body { grid-template-columns: minmax(0, 1fr); }
  .pf-side { position: static; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
  .pf-hero-top { flex-wrap: wrap; gap: var(--space-7); }
}
@media (max-width: 840px) {
  .pf-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-7); }
  .pf-summary-cell { border-left: 0; padding: 0; }
  .pf-match-line { grid-template-columns: 76px 92px minmax(0, 1fr); padding-right: 40px; }
  .pf-farm, .pf-items, .pf-teams { display: none; }
  .pf-board-head, .pf-board-row { grid-template-columns: 40px 32px minmax(0, 1fr) 110px 56px; }
  .pf-board-head > :nth-child(n+6), .pf-board-row > :nth-child(n+6) { display: none; }
  .pf-hero-rank { width: 100%; }
}

/* the sheet over Live: a narrow scouting view from the right, the game still visible beside it */
.pf-sheet { position: fixed; inset: 0; z-index: 70; background: oklch(0 0 0 / .5); backdrop-filter: blur(2px); }
.pf-sheet[hidden] { display: none; }
.pf-sheet-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 96vw); padding: var(--space-7); background: linear-gradient(180deg, var(--surface-1), var(--surface-0) 240px); border-left: 1px solid var(--hairline-strong); box-shadow: var(--shadow-float); display: flex; flex-direction: column; gap: var(--space-4); animation: sheet-in var(--dur-slow) var(--ease-out); }
.pf-sheet-close { position: absolute; top: var(--space-7); right: var(--space-7); z-index: 1; }
.pf-sheet-body { flex: 1; min-height: 0; overflow-y: auto; }
.gm-player[data-riot-id] { cursor: pointer; }
@keyframes sheet-in { from { translate: 40px 0; opacity: 0; } }
.pf-sheet-view { display: flex; flex-direction: column; gap: var(--space-7); }
.pf-sheet-top { display: flex; align-items: flex-start; gap: var(--space-4); min-height: 34px; padding-right: 76px; }
.pf-sheet-top .bar-button { display: inline-flex; align-items: center; }
.pf-sheet-back { flex: none; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-sheet-full { margin-left: auto; text-decoration: none; }
.pf-sheet-head { display: flex; align-items: center; gap: var(--space-6); }
.pf-sheet-icon { flex: none; width: 56px; height: 56px; border-radius: var(--radius-lg); border: 1px solid color-mix(in oklch, var(--amber) 50%, transparent); }
.pf-sheet-head .pf-head-name { font-size: 26px; }
.pf-sheet-head .pf-head-tag { font-size: var(--fs-lg); }
.pf-sheet-head .pf-title .sublabel { color: var(--text-3); }
.pf-sheet-rank { display: flex; align-items: center; gap: var(--space-5); padding: var(--space-5) var(--space-6); border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: var(--surface-1); }
.pf-sheet-rank .pf-rank-name { font-size: var(--fs-lg); }
.pf-sheet-rank .num { margin-left: auto; font-size: var(--fs-sm); color: var(--text-2); }
.pf-sheet-rank .num b { margin-right: var(--space-1); }
.pf-sheet-emblem { --emblem: 40px; }
.pf-sheet-view .pf-flex { margin-top: calc(-1 * var(--space-4)); padding: 0 var(--space-6); font-size: var(--fs-sm); }
.pf-sheet-view .pf-chips { margin-left: 0; }
.pf-sheet-duo { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--radius-md); background: color-mix(in oklch, var(--amber) 8%, var(--surface-1)); font: 600 var(--fs-md)/1.2 var(--font-ui); color: var(--text-1); }
.pf-sheet-duo .ui-svg { width: 14px; height: 14px; color: var(--amber); }
.pf-sheet-duo .num { margin-left: auto; color: var(--text-3); }
.pf-sheet-champ-body { display: flex; align-items: center; gap: var(--space-6); }
.pf-sheet-champ-pic { flex: none; width: 48px; height: 48px; border-radius: var(--radius-lg); }
.pf-sheet-champ-text { display: flex; flex-direction: column; gap: var(--space-3); }
.pf-sheet-champ-text .num b { margin-right: var(--space-1); }
.pf-sheet-first { display: inline-flex; align-items: center; gap: var(--space-2); font: 600 var(--fs-md)/1 var(--font-ui); color: var(--amber); }
.pf-sheet-first .ui-svg { width: 14px; height: 14px; }
.pf-sheet-list { display: flex; flex-direction: column; gap: var(--space-2); }
.pf-sheet-game { --result: var(--text-4); display: grid; grid-template-columns: 28px 52px 96px 76px minmax(0, 1fr); align-items: center; gap: var(--space-5); min-height: 40px; padding: var(--space-2) var(--space-5); border-radius: var(--radius-md); box-shadow: inset 3px 0 0 var(--result); background: linear-gradient(90deg, color-mix(in oklch, var(--result) 12%, var(--surface-2)), var(--surface-2) 45%); color: inherit; text-decoration: none; }
.pf-sheet-game:hover, .pf-sheet-game:focus-visible { background: var(--surface-3); }
.pf-sheet-game.win { --result: var(--win); }
.pf-sheet-game.loss { --result: var(--loss); }
.pf-sheet-game-pic { width: 28px; height: 28px; border-radius: var(--radius-sm); }
.pf-sheet-result { font: 700 var(--fs-md)/1 var(--font-display); color: var(--result); }
.pf-sheet-game.remake .pf-sheet-result { color: var(--text-3); }
.pf-sheet-kda { font: 600 var(--fs-md)/1 var(--font-mono); color: var(--text-1); white-space: nowrap; }
.pf-sheet-game .pf-when { text-align: right; }
.pf-sheet-game-skel { height: 40px; }
.pf-sheet-message { padding: var(--space-9) 0; }
.pf-vision { display: inline-flex; align-items: center; gap: var(--space-3); }

.pf-board-row .pf-place { justify-self: start; text-align: center; min-width: 36px; }
.pf-board-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pf-board-who .pf-board-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-board-rank { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 16px; max-width: 100%; overflow: hidden; font: 600 var(--fs-xs)/1 var(--font-mono); color: var(--text-2); white-space: nowrap; }
.pf-board-rank small { color: var(--text-3); font-size: inherit; }
.pf-board-rank.unranked { color: var(--text-3); }
.pf-board-rank.loading .skel { display: block; width: 64px; height: 10px; border-radius: var(--radius-xs); }
.pf-board-emblem { --emblem: 16px; }

/* the match history scrolls inside its own box; everything else scrolls with the page */
@media (min-width: 1101px) {
  .pf-matches { max-height: calc(100vh - var(--top-h) - 120px); overflow-y: auto; scrollbar-gutter: stable; padding-right: var(--space-3); scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
  .pf-matches.locked { overflow-y: hidden; }
}
