/* Только автономный тестер. Цвета и размеры — из дизайн-системы сайта. */
#player_statistics_window {
  --stats-width: 1000px;
  position: relative;
  isolation: isolate;
}
.pst-mode-backdrop { position: absolute; inset: 0 0 auto; z-index: -1; width: 100%; height: clamp(280px, calc(48 * var(--pb-ui-vh, 1vh)), 520px); object-fit: cover; object-position: center 35%; opacity: .35; filter: brightness(.6); -webkit-mask-image: linear-gradient(to bottom, var(--pb-gray-1000), transparent); mask-image: linear-gradient(to bottom, var(--pb-gray-1000), transparent); pointer-events: none; }
.pst-mode-backdrop[hidden] { display: none; }
#player_statistics_window .container {
  max-width: var(--stats-width);
  padding-top: var(--pb-s-8);
  text-align: left;
}
.pst-top { display: flex; align-items: center; justify-content: space-between; gap: var(--pb-s-4); margin-bottom: var(--pb-s-8); }
.pst-back.btn { width: auto; min-height: var(--pb-control-h-sm); padding-inline: var(--pb-s-4); font-size: var(--pb-fs-sm); gap: var(--pb-s-2); }
.pst-back svg { width: 18px; height: 18px; }
.pst-caption { color: var(--pb-text-muted); font-size: var(--pb-fs-sm); }
.pst-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--pb-s-4); margin-bottom: var(--pb-s-6); }
.pst-heading h1 { margin: 0; font: 400 var(--pb-fs-4xl)/var(--pb-lh-tight) var(--pb-font-display); letter-spacing: .02em; }
.pst-heading p { margin: var(--pb-s-2) 0 0; color: var(--pb-text-muted); }
.pst-player { display: flex; gap: var(--pb-s-3); align-items: center; flex: none; }
.pst-avatar { width: 56px; height: 56px; flex: none; object-fit: cover; border-radius: 50%; overflow: hidden; background: var(--pb-surface-2); }
.pst-player strong { display: block; font-size: var(--pb-fs-xl); font-weight: 400; line-height: var(--pb-lh-snug); }
.pst-player small { color: var(--pb-text-muted); font-size: var(--pb-fs-sm); }
.pst-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--pb-s-3); margin-bottom: var(--pb-s-6); }
.pst-metric { background: var(--pb-surface); border: var(--pb-bw) solid var(--pb-line); border-radius: var(--pb-r-lg); padding: var(--pb-s-5); min-width: 0; }
.pst-metric dt { color: var(--pb-text-muted); font-size: var(--pb-fs-md); }
.pst-metric dd { margin: var(--pb-s-2) 0; font: 400 var(--pb-fs-4xl)/1 var(--pb-font-display); font-variant-numeric: tabular-nums; }
.pst-metric dd small { font: 400 var(--pb-fs-xl)/1 var(--pb-font); color: var(--pb-text-muted); }
.pst-metric p { margin: 0; color: var(--pb-text-faint); font-size: var(--pb-fs-sm); line-height: var(--pb-lh-snug); }
.pst-metrics dl { margin: 0; }
.pst-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--pb-s-4); margin-block: var(--pb-s-4) var(--pb-s-8); }
.pst-overview-insights { grid-template-columns: minmax(0, 1fr); }
.pst-panel { border: var(--pb-bw) solid var(--pb-line); border-radius: var(--pb-r-lg); padding: var(--pb-s-5); min-width: 0; }
.pst-panel h2, .pst-section-title { margin: 0; font: 400 var(--pb-fs-xl)/var(--pb-lh-snug) var(--pb-font-display); letter-spacing: .025em; }
.pst-panel > p { margin: var(--pb-s-2) 0 0; color: var(--pb-text-muted); font-size: var(--pb-fs-sm); }
.pst-panel-head { display: flex; justify-content: space-between; gap: var(--pb-s-3); align-items: baseline; margin-bottom: var(--pb-s-4); }
.pst-panel-head h2 { margin: 0; }
.pst-panel h2.pst-panel-head { margin-bottom: var(--pb-s-4); }
.pst-panel-head small { color: var(--pb-text-faint); font-size: var(--pb-fs-sm); }
.pst-progress { height: 6px; background: var(--pb-surface-3); border-radius: var(--pb-r-pill); overflow: hidden; }
.pst-progress > span { display: block; height: 100%; border-radius: inherit; background: var(--pb-cream); }
.pst-progress.is-success > span { background: var(--pb-mineral); }
.pst-progress-caption { display: flex; justify-content: space-between; gap: var(--pb-s-3); color: var(--pb-text-muted); font-size: var(--pb-fs-sm); margin-top: var(--pb-s-2); }
.pst-link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--pb-text); text-decoration: underline; text-underline-offset: 4px; font-size: var(--pb-fs-sm); }
.pst-insight { display: flex; align-items: center; justify-content: space-between; gap: var(--pb-s-4); margin-block: var(--pb-s-4); }
.pst-insight strong { font-weight: 400; font-size: var(--pb-fs-2xl); }
.pst-insight b { font: 400 var(--pb-fs-3xl)/1 var(--pb-font-display); color: var(--pb-mineral); }
.pst-section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--pb-s-4); margin-bottom: var(--pb-s-4); }
.pst-section-head p { margin: 0; color: var(--pb-text-faint); font-size: var(--pb-fs-sm); }
.pst-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pb-s-3); }
.pst-mode { position: relative; isolation: isolate; overflow: hidden; width: 100%; display: flex; align-items: center; gap: var(--pb-s-4); padding: var(--pb-s-5); text-align: left; border: var(--pb-bw) solid var(--pb-line); border-radius: var(--pb-r-lg); background: var(--pb-surface); cursor: pointer; transition: background var(--pb-dur), border-color var(--pb-dur); }
.pst-mode::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--pb-surface), transparent); pointer-events: none; }
.pst-mode:hover { background: var(--pb-surface-2); border-color: var(--pb-line-strong); }
.pst-mode:active { background: var(--pb-surface-3); }
.pst-mode > img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: .3; filter: brightness(.65); pointer-events: none; transform: scale(1); transition: transform calc(var(--pb-dur) * 3) var(--pb-ease); }
@media (hover: hover) and (pointer: fine) {
  .pst-mode:hover > img { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .pst-mode > img { transition: none; }
  .pst-mode:hover > img { transform: none; }
}
.pst-mode-body { flex: 1; min-width: 0; }
.pst-mode-title { display: block; font: 400 var(--pb-fs-xl)/var(--pb-lh-snug) var(--pb-font-display); }
.pst-mode-count { display: block; margin-top: var(--pb-s-1); font-size: var(--pb-fs-sm); color: var(--pb-text-faint); }
.pst-mode-value { display: block; margin-top: var(--pb-s-2); font-size: var(--pb-fs-md); color: var(--pb-text-muted); }
.pst-chevron { width: 18px; height: 18px; color: var(--pb-text-faint); flex: none; }
.pst-mode-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.pst-note { margin: var(--pb-s-5) 0 0; font-size: var(--pb-fs-sm); color: var(--pb-text-faint); line-height: var(--pb-lh-body); }
.pst-period { margin-bottom: var(--pb-s-6); display: flex; justify-content: space-between; align-items: center; gap: var(--pb-s-4); }
.pst-period .pb-segmented { width: min(100%, 340px); margin: 0; }
.pst-period .pb-segmented button { min-height: var(--pb-control-h-sm); }
.pst-period > span { color: var(--pb-text-muted); font-size: var(--pb-fs-sm); }
.pst-mode-heading { display: flex; gap: var(--pb-s-4); align-items: center; }
.pst-details .pst-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pst-details .pst-metric { padding: var(--pb-s-4); }
.pst-details .pst-metric dd { font-size: var(--pb-fs-3xl); }
.pst-details .pst-metrics.pst-metrics-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pst-details .pst-grid { align-items: start; }
.pst-list { margin: 0; }
.pst-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--pb-s-4); padding-block: var(--pb-s-3); border-bottom: var(--pb-bw) solid var(--pb-line); }
.pst-list > div:first-child { padding-top: 0; }
.pst-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.pst-list dt { color: var(--pb-text-muted); }
.pst-list dd { margin: 0; flex: none; font-variant-numeric: tabular-nums; font-size: var(--pb-fs-lg); }
.pst-category { padding-block: var(--pb-s-4); border-bottom: var(--pb-bw) solid var(--pb-line); }
.pst-category:first-of-type { padding-top: 0; }
.pst-category:last-child { border-bottom: 0; padding-bottom: 0; }
.pst-category-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--pb-s-4); margin-bottom: var(--pb-s-2); }
.pst-category-name { font-size: var(--pb-fs-lg); }
.pst-category small { color: var(--pb-text-faint); font-size: var(--pb-fs-sm); }
.pst-category strong { font-weight: 400; font-size: var(--pb-fs-xl); white-space: nowrap; }
.pst-recent, .pst-categories { grid-column: 1 / -1; }
.pst-recent-bars { display: grid; grid-template-columns: repeat(25, minmax(0, 1fr)); gap: var(--pb-s-1); margin-top: var(--pb-s-5); }
.pst-result { height: 32px; border-radius: var(--pb-r-xs); background: var(--pb-surface-3); border: var(--pb-bw) solid var(--pb-line-strong); }
.pst-result.is-first { background: var(--pb-cream); border-color: var(--pb-cream); }
.pst-result.is-prize { background: var(--pb-mineral); border-color: var(--pb-mineral); }
.pst-legend { display: flex; flex-wrap: wrap; gap: var(--pb-s-4); color: var(--pb-text-muted); font-size: var(--pb-fs-sm); margin-top: var(--pb-s-4); }
.pst-legend span { display: inline-flex; align-items: center; gap: var(--pb-s-2); }
.pst-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--pb-surface-3); border: var(--pb-bw) solid var(--pb-line-strong); }
.pst-legend .is-first { background: var(--pb-cream); border-color: var(--pb-cream); }
.pst-legend .is-prize { background: var(--pb-mineral); border-color: var(--pb-mineral); }
.pst-empty { text-align: center; padding: var(--pb-s-12) var(--pb-s-5); background: var(--pb-surface); border: var(--pb-bw) solid var(--pb-line); border-radius: var(--pb-r-lg); }
.pst-empty h2 { font: 400 var(--pb-fs-3xl)/var(--pb-lh-snug) var(--pb-font-display); margin: 0 0 var(--pb-s-3); }
.pst-empty p { max-width: 380px; margin: 0 auto; color: var(--pb-text-muted); }
@media (max-width: 620px) {
  #player_statistics_window .container { padding-inline: var(--pb-s-4); padding-top: var(--pb-s-5); }
  .pst-top { margin-bottom: var(--pb-s-6); }
  .pst-heading { flex-wrap: wrap; }
  .pst-heading h1 { font-size: var(--pb-fs-3xl); }
  .pst-player { width: 100%; }
  .pst-metrics { gap: var(--pb-s-2); }
  .pst-metric { padding: var(--pb-s-3); border-radius: var(--pb-r-md); }
  .pst-metric dt { font-size: var(--pb-fs-sm); }
  .pst-metric dd { font-size: var(--pb-fs-3xl); }
  .pst-metric dd small { font-size: var(--pb-fs-md); }
  .pst-metric p { font-size: var(--pb-fs-xs); }
  .pst-grid, .pst-mode-grid { grid-template-columns: minmax(0, 1fr); }
  .pst-mode-grid > :last-child:nth-child(odd) { grid-column: auto; }
  .pst-grid { gap: var(--pb-s-3); margin-bottom: var(--pb-s-6); }
  .pst-section-head { align-items: flex-start; flex-direction: column; gap: var(--pb-s-1); }
  .pst-panel { padding: var(--pb-s-4); }
  .pst-details .pst-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pst-period { flex-direction: column; align-items: stretch; gap: var(--pb-s-2); }
  .pst-period .pb-segmented { width: 100%; }
  .pst-mode-heading { gap: var(--pb-s-3); }
  .pst-recent-bars { gap: 3px; }
  .pst-result { height: 28px; border-radius: 3px; }
}
