:root {
  color-scheme: light;
  --ink: #17251e;
  --muted: #718078;
  --line: #e4eae5;
  --paper: #ffffff;
  --canvas: #f4f7f4;
  --green: var(--theme-174b35, #174b35);
  --green-dark: #102c21;
  --green-active: #28523f;
  --green-soft: #e8f2eb;
  --gold: #c29a52;
  --sidebar-width: 200px;
  --shadow: 0 16px 50px rgb(22 42 30 / 9%);
  --font-bump: 1px;
  --dashboard-section-gap: 12px;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html { overscroll-behavior-y: contain; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; padding-bottom: env(safe-area-inset-bottom, 0px); background: var(--canvas); color: var(--ink); font-size: calc(16px + var(--font-bump)); }
button, input, select { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
html:has(#match-dialog[aria-hidden="false"], #player-drawer[aria-hidden="false"], #relations-drawer[aria-hidden="false"]) { overflow: hidden; }
.match-dialog, .player-drawer, .dialog-match-content, .player-profile-scroll, .relations-table-scroll { overscroll-behavior: contain; }
.theme-random { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 31; display: grid; width: 40px; height: 40px; padding: 9px; place-items: center; border: 1px solid #fff; border-radius: 50%; color: #fff; background: var(--green); box-shadow: 0 3px 12px rgb(0 0 0 / 30%); cursor: pointer; touch-action: none; }
.theme-random { display: none; }
html.welcome-splash-visible .theme-random { visibility: hidden; }
.theme-random:focus-visible { outline: 3px solid var(--green-active); outline-offset: 3px; }
.theme-random svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.theme-random svg path { fill: currentColor; }
.theme-readout { display: none; }
html.theme-palette-open { overflow: hidden; }
.theme-palette { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); overflow: auto; overscroll-behavior: contain; background: #f4f7f4; }
.theme-palette-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.theme-palette-header h2 { margin: 0; color: #263d2d; font-size: 18px; }
.theme-palette-close { width: 44px; height: 44px; border: 0; background: transparent; color: #263d2d; cursor: pointer; font-size: 30px; }
.theme-palette-grid { display: grid; width: min(100%, 800px); grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 4px; margin: auto; padding: 12px 0; }
.theme-palette-swatch { aspect-ratio: 1; min-width: 0; padding: 0; border: 1px solid rgb(0 0 0 / 15%); border-radius: 2px; cursor: pointer; }
.theme-palette-swatch.is-nearest { box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px #111; }
.theme-palette-swatch:focus-visible, .theme-palette-close:focus-visible { outline: 3px solid #111; outline-offset: -3px; }
@media (hover: none) {
  .theme-random { bottom: calc(env(safe-area-inset-bottom, 0px) + 25px); }
  .theme-readout { position: absolute; left: 50%; top: calc(100% + 2px); display: grid; justify-items: center; padding: 2px 4px; border: 0; border-radius: 4px; color: var(--green-dark); background: #fff; font: 600 7px/1.2 monospace; white-space: nowrap; pointer-events: none; transform: translateX(-50%); }
}

.site-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; width: var(--sidebar-width); flex-direction: column; gap: 20px; padding: 16px 12px; overflow: hidden auto; border-right: 1px solid var(--line); background: #eef2ef; }
.sidebar-heading { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px; }
.brand { display: inline-flex; min-width: 0; gap: 4px; align-items: center; padding: 0; border: 0; color: var(--ink); background: transparent; cursor: pointer; text-align: left; }
.brand-mark, .brand-copy { display: block; flex: 0 0 auto; background-image: url("archive/2001-2007/index00.gif"); background-repeat: no-repeat; background-size: 100px auto; mix-blend-mode: multiply; }
.brand-mark { width: 36px; height: 36px; background-position: -32px -1px; }
.brand-copy { width: 93px; height: 29px; background-position: -3px -38px; }
.sidebar-toggle { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 6px; color: #52645a; background: transparent; cursor: pointer; font-size: calc(17px + var(--font-bump)); }
.sidebar-toggle:hover { background: #e2e9e4; }
.sidebar-nav { display: grid; align-content: start; gap: 5px; }
.sidebar-link { display: flex; min-height: 42px; align-items: center; gap: 13px; padding: 0 12px; border: 0; border-radius: 7px; color: #3e5145; background: transparent; cursor: pointer; font-size: calc(13px + var(--font-bump)); text-align: left; white-space: nowrap; }
.sidebar-link.active { color: #164c34; background: #fff; box-shadow: 0 1px 4px rgb(29 52 37 / 8%); font-weight: 700; }
.sidebar-link.future { color: #6f7e74; cursor: default; }
.sidebar-icon { display: grid; width: 20px; flex: 0 0 auto; place-items: center; color: #23714b; font-size: calc(18px + var(--font-bump)); }
.archive-menu > .sidebar-link { width: 100%; }
.archive-menu > .sidebar-link.active { background: transparent; box-shadow: none; font-weight: 400; }
.archive-menu > .sidebar-link::after { content: ""; width: 6px; height: 6px; flex: 0 0 auto; margin-left: auto; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.archive-menu > .sidebar-link[aria-expanded="true"]::after { transform: rotate(135deg); }
.sidebar-collapsed .archive-menu > .sidebar-link::after { display: none; }
.archive-submenu { padding-left: 32px; }
.archive-submenu[hidden], .sidebar-collapsed .archive-submenu { display: none; }
.archive-sublink { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; color: #3e5145; background: transparent; cursor: pointer; font-size: calc(13px + var(--font-bump)); text-align: left; }
.archive-sublink[aria-current="page"] { color: #164c34; background: #fff; font-weight: 700; }
.sidebar-link:not(.active):hover, .archive-menu > .sidebar-link.active:hover, .archive-sublink:not([aria-current="page"]):hover { background: #e1e6e2; }
.archive-title.player-stats-title { margin-bottom: 10px; font-family: inherit; letter-spacing: normal; }
.archive-frame { display: block; width: 100%; height: calc(100vh - 90px); min-height: 500px; border: 1px solid var(--line); background: white; zoom: 1.25; transition: opacity 350ms ease; }
.archive-modern .archive-frame { zoom: 1; }
.archive-frame-fading { opacity: 0; }
@media (max-width: 760px) { .archive-frame { height: calc(var(--archive-mobile-height, 500px) / var(--archive-mobile-zoom, 1)); min-height: 0; zoom: var(--archive-mobile-zoom, 1); } }
@media (prefers-reduced-motion: reduce) { .archive-frame { transition: none; } }
.mobile-archive-menu { position: relative; }
.mobile-archive-menu summary { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; color: #52645a; background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; }
.mobile-archive-menu summary::-webkit-details-marker { display: none; }
.mobile-archive-menu summary.active { border-color: var(--theme-b7d2bd, #b7d2bd); color: var(--theme-174b35, #174b35); background: #e8f2eb; }
.mobile-archive-menu div { position: absolute; z-index: 20; display: grid; min-width: 130px; gap: 4px; padding: 5px; background: #eef2ef; }
.sidebar-collapsed .site-sidebar { width: 48px; padding: 10px 3px; }
.sidebar-collapsed .sidebar-heading { flex-direction: column; justify-content: flex-start; gap: 0; }
.sidebar-collapsed .brand { display: none; }
.sidebar-collapsed .sidebar-link { justify-content: center; padding: 0; }
.sidebar-collapsed .sidebar-label { display: none; }
.sidebar-collapsed .sidebar-toggle { width: 40px; height: 40px; }
.main-content { min-width: 0; margin-left: var(--sidebar-width); }
.sidebar-collapsed .main-content { margin-left: 48px; }

.page-shell { width: calc(100% - 40px); max-width: 1600px; margin: 0 auto; }
.page-shell:has(.match-panel) { padding-bottom: 12px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 25px; margin-bottom: 20px; }
.page-heading .eyebrow { margin: 0; }
.page-heading h1 { margin: 0; color: #183528; font: 700 calc(21px + var(--font-bump)) Georgia, "Times New Roman", serif; }
.eyebrow { margin: 0 0 9px; color: var(--green); font-size: calc(10px + var(--font-bump)); font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow span { margin: 0 7px; color: #a5b4aa; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font: 700 calc(clamp(28px, 4vw, 37px) + var(--font-bump)) Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.subtitle { margin: 0; color: var(--muted); font-size: calc(14px + var(--font-bump)); }

.stats-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin: 28px 0 22px; }
.stats-grid[hidden], #summary[hidden] { display: none; }
#summary { width: 100%; gap: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
#summary .stat-card { border: 0; border-radius: 0; background: transparent; }
#summary.matches-view, #summary.players-view { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.player-stats-title { position: relative; display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; min-height: 40px; align-items: center; gap: 8px; margin: 14px 0 -14px; padding: 3px 8px; border: 1px solid var(--theme-dce8df, #dce8df); border-radius: 6px; color: var(--theme-466451, #466451); background: var(--theme-edf4ef, #edf4ef); font-size: calc(16px + var(--font-bump)); font-weight: 700; text-align: center; }
.player-stats-title[hidden] { display: none; }
#player-stats-title:has(#metrics-toggle[aria-pressed="false"]):has(#diagram-toggle[aria-expanded="true"]) { margin-bottom: 14px; }
.player-stats-title > span { grid-column: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-actions { display: flex; grid-column: 3; justify-self: end; align-items: center; gap: 6px; }
.title-actions .view-tab { min-height: 30px; padding: 0 10px; white-space: nowrap; }
.title-actions .title-icon-button { display: grid; width: 34px; padding: 0; place-items: center; }
.title-actions .title-icon-button, .title-actions .title-icon-button.active,
.title-actions .player-stats-profile:hover, .title-actions .player-stats-profile:focus-visible { border-color: var(--theme-dce8df, #dce8df); color: var(--theme-466451, #466451); background: var(--theme-edf4ef, #edf4ef); }
#player-stats-title { display: flex; justify-content: center; }
#player-stats-title[hidden] { display: none; }
#player-stats-title > span { flex: 0 1 auto; }
#player-stats-title .title-actions { flex: 0 0 auto; }
#player-stats-title, #player-stats-title .title-icon-button, #player-stats-title .title-icon-button.active,
#player-stats-title .player-stats-profile:hover, #player-stats-title .player-stats-profile:focus-visible { color: var(--theme-466451, #466451); background: #fff; }
.title-icon-button svg { width: 18px; height: 18px; }
#metrics-toggle[aria-pressed="false"] svg, #diagram-toggle[aria-expanded="false"] svg { opacity: .35; }
.player-stats-profile:hover, .player-stats-profile:focus-visible { border-color: var(--theme-b7cdbd, #b7cdbd); background: var(--theme-f5faf6, #f5faf6); }
.player-stats-grid { grid-template-columns: repeat(var(--stat-others, 7), minmax(0, 1fr)) minmax(0, var(--debut-w, 1fr)); gap: 8px; margin-top: -10px; margin-bottom: var(--dashboard-section-gap); }
.player-stats-grid[hidden] { display: none; }
.stat-card { min-height: 88px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.stat-card[hidden] { display: none; }
.player-stats-grid .stat-card { min-height: 75px; padding: 12px 13px; }
.stat-rank { float: right; display: grid; min-width: 22px; aspect-ratio: 1; place-items: center; margin: -8px -8px 0 3px; padding: 3px; border-radius: 50%; color: #326345; background: #e4f2e7; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.stat-label { display: block; margin-bottom: 9px; color: var(--muted); font-size: calc(9px + var(--font-bump)); }
.stat-card strong { font: 700 calc(clamp(10px, 1.5vw, 20px) + var(--font-bump)) Georgia, "Times New Roman", serif; letter-spacing: -.03em; }
.player-stats-grid .stat-label { min-height: 25px; margin-bottom: 4px; font-size: calc(9px + var(--font-bump)); line-height: 1.3; }
.player-stats-grid .stat-card strong, .score-card strong { white-space: nowrap; }
.data-notice { margin: 0 0 18px; padding: 12px 15px; border: 1px solid #eadbb8; border-radius: 7px; color: #6f5626; background: #fff9eb; font-size: calc(12px + var(--font-bump)); line-height: 1.55; }

.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); box-shadow: 0 2px 8px rgb(31 51 38 / 3%); }
.back-to-top { position: fixed; top: 83.333vh; left: 50vw; z-index: 12; display: grid; width: 48px; height: 48px; place-items: center; padding: 0; border: 1px solid var(--theme-8fbf9f, #8fbf9f); border-radius: 50%; color: var(--theme-466451, #466451); background: var(--theme-e3f1e7, #e3f1e7); box-shadow: 0 5px 16px rgb(22 66 40 / 30%); cursor: pointer; touch-action: manipulation; transform: translate(-50%, -50%); }
.back-to-top[hidden] { display: none; }
.back-to-top:hover { background: var(--theme-e3f1e7, #e3f1e7); }
.back-to-top:focus-visible { outline: 3px solid #9ed5ad; outline-offset: 3px; }
.back-to-top svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 21px 23px 17px; }
.panel-heading-actions { display: flex; align-items: center; gap: 8px; }
.panel-heading .eyebrow { margin-bottom: 4px; }
h2 { margin-bottom: 0; font: 700 calc(21px + var(--font-bump)) Georgia, "Times New Roman", serif; }
.view-tabs { display: inline-flex; gap: 8px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.view-tab { min-height: 32px; padding: 0 13px; border: 1px solid #dfe6e1; border-radius: 6px; color: #607367; background: #fff; cursor: pointer; font-size: calc(12px + var(--font-bump)); font-weight: 600; }
.view-tabs .view-tab { min-height: 38px; padding: 0 26px; border: 2px solid #e2c066; font-weight: 700; }
.view-tabs .view-tab.active { border-color: #d4a017; color: #2f4d3a; background: #fff4cc; }
.match-panel .view-tabs .view-tab { border-color: var(--green-active); }
.match-panel .view-tabs .view-tab.active { border-color: var(--green-active); color: #fff; background: var(--green-active); }
.site-sidebar, .stat-card strong { --font-bump: 0px; }
.view-tab.active { border-color: var(--theme-dce8df, #dce8df); color: var(--theme-466451, #466451); background: var(--theme-edf4ef, #edf4ef); box-shadow: none; }
.table-sort-button { display: inline-flex; max-width: 100%; align-items: flex-end; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.table-sort-button::after { flex: 0 0 auto; padding-left: 4px; color: #9aa79e; content: "↕"; }
th[aria-sort="ascending"] .table-sort-button::after { color: var(--theme-286742, #286742); content: "↑"; }
th[aria-sort="descending"] .table-sort-button::after { color: var(--theme-286742, #286742); content: "↓"; }
.smart-search { position: relative; z-index: 3; display: flex; align-items: center; gap: 6px; padding: 0 14px 8px; }
.smart-search-section { position: sticky; top: calc(var(--statistics-view-nav-height, 0px) + var(--player-stats-title-height, 0px)); z-index: 7; margin-bottom: var(--dashboard-section-gap); padding-top: 8px; border: 1px solid var(--theme-dce8df, #dce8df); border-radius: 6px; background: #fff; }
@media (max-width: 760px) {
  .smart-search-section { top: calc(var(--mobile-primary-nav-height, 0px) + var(--statistics-view-nav-height, 0px) + var(--player-stats-title-height, 0px)); }
}
.smart-search-field { flex: 1 1 auto; }
.smart-search .smart-search-field { border-color: var(--theme-dce8df, #dce8df); background: var(--theme-f5faf6, #f5faf6); }
.smart-search .smart-search-field .search-icon { color: var(--theme-466451, #466451); }
.smart-search .view-tab { flex: 0 0 auto; height: 38px; white-space: nowrap; }
.smart-help { position: relative; flex: 0 0 auto; }
.smart-help summary { display: flex; align-items: center; list-style: none; }
.smart-help summary::-webkit-details-marker { display: none; }
.smart-examples { position: absolute; top: calc(100% + 5px); right: 0; z-index: 5; display: grid; width: min(420px, 86vw); max-height: 360px; gap: 2px; overflow: auto; overscroll-behavior: contain; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow); }
.smart-examples-title { position: sticky; top: -7px; z-index: 1; margin: -7px -7px 4px; padding: 9px 16px 8px; border-bottom: 1px solid #e4eae5; color: var(--theme-1f5a3a, #1f5a3a); background: var(--theme-f5faf6, #f5faf6); font-size: calc(12px + var(--font-bump)); font-weight: 700; }
.smart-examples button { padding: 7px 9px; border: 0; border-radius: 4px; color: #46574c; background: transparent; cursor: pointer; font: inherit; font-size: calc(12px + var(--font-bump)); text-align: left; }
.smart-examples button:hover { background: #f2f7f3; }
.smart-search-result { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 14px 10px; }
.smart-search-result[hidden] { display: none; }
.smart-chip { padding: 3px 9px; border: 1px solid var(--theme-dce8df, #dce8df); border-radius: 999px; color: var(--theme-466451, #466451); background: var(--theme-edf4ef, #edf4ef); font-size: calc(11px + var(--font-bump)); font-weight: 600; }
.smart-note { color: var(--muted); font-size: calc(11px + var(--font-bump)); }
.filters { position: relative; z-index: 4; display: grid; grid-template-columns: minmax(60px, .7fr) minmax(84px, .9fr) minmax(82px, 1fr) minmax(82px, 1fr) minmax(106px, 1.15fr) minmax(83px, .9fr) minmax(88px, 1fr) minmax(90px, 1fr); gap: 5px; padding: 0 14px 17px; }
.filters[hidden] { display: none; }
.search-field { display: flex; align-items: center; min-width: 0; height: 38px; padding: 0 8px; border: 1px solid #dfe6e1; border-radius: 6px; background: #fff; }
.contribution-filter { display: flex; min-width: 0; align-items: center; gap: 5px; min-height: 38px; padding: 0 5px; border: 1px solid #dfe6e1; border-radius: 6px; color: #47584d; background: #fff; cursor: pointer; font-size: calc(10px + var(--font-bump)); white-space: nowrap; }
.contribution-filter input { margin: 0; accent-color: var(--green); }
.contribution-filter.disabled { color: #98a49b; background: #f8faf8; cursor: default; }
.contribution-filter input:disabled { cursor: default; pointer-events: none; }
.search-icon { margin-right: 4px; color: #819187; font-size: calc(19px + var(--font-bump)); line-height: 1; transform: rotate(-15deg); }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: calc(12px + var(--font-bump)); }
.search-field:focus-within, .range-filter:focus-within, .filter-menu[open] { border-color: #77a28a; box-shadow: 0 0 0 3px rgb(68 133 91 / 10%); }
.range-filter { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; height: 38px; padding: 0 6px; border: 1px solid #dfe6e1; border-radius: 6px; color: #9aa59d; background: #fff; }
.range-filter label { min-width: 0; flex: 1; }
.range-filter input { width: 100%; min-width: 0; border: 0; outline: 0; color: #47584d; background: transparent; font-size: calc(11px + var(--font-bump)); }
.range-filter input::-webkit-inner-spin-button, .range-filter input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.filter-menu { position: relative; min-width: 0; height: 38px; border: 1px solid #dfe6e1; border-radius: 6px; background: #fff; }
.filter-menu[open] { z-index: 1; }
.filter-menu summary { display: flex; height: 100%; align-items: center; gap: 3px; padding: 0 5px; color: #47584d; cursor: pointer; font-size: calc(10px + var(--font-bump)); list-style: none; white-space: nowrap; }
.filter-menu summary::-webkit-details-marker { display: none; }
.filter-menu summary::after { margin-left: auto; color: #748279; content: "⌄"; font-size: calc(14px + var(--font-bump)); }
.filter-selection { color: var(--green); font-weight: 700; }
.filter-options { position: absolute; top: calc(100% + 5px); left: 0; z-index: 2; display: grid; min-width: 155px; max-height: 260px; gap: 2px; overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow); }
.filter-options label { display: flex; align-items: center; gap: 8px; padding: 6px 7px; border-radius: 4px; color: #46574c; cursor: pointer; font-size: calc(11px + var(--font-bump)); white-space: nowrap; }
.filter-options label:hover { background: #f2f7f3; }
.filter-options input { margin: 0; accent-color: var(--green); }
.clear-filters { height: 38px; padding: 0 5px; border: 1px solid var(--theme-b7cdbd, #b7cdbd); border-radius: 6px; color: #8a978e; background: var(--theme-f5faf6, #f5faf6); cursor: pointer; font-weight: 600; font-size: calc(12px + var(--font-bump)); white-space: nowrap; }
.clear-filters:hover { border-color: var(--theme-b7cdbd, #b7cdbd); background: var(--theme-f5faf6, #f5faf6); }
.clear-filters.active { border-color: var(--theme-8fbf9f, #8fbf9f); color: var(--theme-1f5a3a, #1f5a3a); background: var(--theme-e3f1e7, #e3f1e7); font-weight: 700; }
.diagram-panel { position: relative; margin: 0 23px 17px; border: 1px solid #e4eae5; border-radius: 8px; background: #fbfcfb; }
.diagram-panel[hidden], .player-chart-section[hidden] { display: none; }
.dashboard-diagrams { margin: 0 0 var(--dashboard-section-gap); }
.dashboard-diagrams .diagram-panel { margin: 0; }
.chart-section { padding: 12px 17px 10px; }
.chart-section + .chart-section { border-top: 1px solid #e7ece8; }
#diagram-panel .timeline-plot .lb-year-scroll { touch-action: pan-y; }
#diagram-panel .timeline-plot.chart-pannable .lb-year-scroll { cursor: grab; }
#diagram-panel .timeline-plot.chart-gesturing .lb-year-scroll { cursor: grabbing; }
.chart-heading { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 17px 3px; }
.chart-heading h3 { min-width: 0; flex: 1 1 350px; margin: 0; color: #33483a; font-size: calc(14px + var(--font-bump)); }
.chart-note { margin: 0; padding: 0 17px; color: #77877b; font-size: calc(11px + var(--font-bump)); line-height: 1.4; }
.timeline-plot { padding: 0 17px 12px; }
.timeline-plot .lb-empty { color: #77877b; font-size: calc(11px + var(--font-bump)); }
.player-chart-section:not([hidden]) { border-top: 1px solid #e7ece8; }
.chart-tooltip { position: fixed; z-index: 30; width: min(340px, calc(100vw - 24px)); padding: 10px 12px; border: 1px solid #dce5de; border-radius: 7px; color: #34463a; background: #fff; box-shadow: 0 8px 28px rgb(22 42 30 / 16%); font-size: calc(11px + var(--font-bump)); line-height: 1.45; pointer-events: none; }
.chart-tooltip[hidden] { display: none; }
.chart-tooltip-title, .chart-tooltip-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.chart-tooltip-title { padding-bottom: 5px; border-bottom: 1px solid #edf1ee; }
.chart-tooltip-title strong { min-width: 0; overflow-wrap: anywhere; }
.chart-tooltip-title b { flex: 0 0 auto; white-space: nowrap; }
.chart-tooltip-meta { padding: 5px 0 7px; color: #758279; font-size: calc(10px + var(--font-bump)); }
.chart-tooltip-meta span:first-child { min-width: 0; overflow-wrap: anywhere; }
.chart-tooltip-meta span:last-child { flex: 0 0 auto; }
.chart-tooltip-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 6px; padding-top: 3px; }
.chart-tooltip-row strong { color: #526358; }
.chart-tooltip-row span { min-width: 0; overflow-wrap: anywhere; }
.chart-zoom { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: center; gap: 4px 12px; padding: 8px 17px; border-top: 1px solid #e7ece8; color: #68786e; background: #fbfcfb; font-size: calc(11px + var(--font-bump)); }
.chart-zoom-label { white-space: nowrap; }
.chart-range-slider { position: relative; grid-column: 1 / -1; height: 28px; min-width: 0; touch-action: pan-y; }
.chart-range-track { position: absolute; top: 6px; right: 7px; left: 7px; height: 16px; border-radius: 8px; background: #e4eae5; }
.chart-range-thumb { position: absolute; top: 6px; left: var(--thumb-left); width: var(--thumb-width); height: 16px; padding: 0; border: 1px solid var(--theme-8fbf9f, #82ad91); border-radius: 8px; color: var(--theme-315940, #356847); background: var(--theme-b7d2bd, #b6d2bf); cursor: grab; touch-action: none; }
.chart-range-thumb span { display: block; font-size: 15px; line-height: 12px; }
.chart-range-thumb:active { cursor: grabbing; }
.chart-range-handle { position: absolute; top: 4px; left: var(--position); z-index: 1; width: 14px; height: 20px; padding: 0; border: 1px solid #fff; border-radius: 4px; background: var(--theme-286742, #286742); box-shadow: 0 1px 4px rgb(20 52 32 / 30%); cursor: ew-resize; transform: translateX(-50%); touch-action: none; }
.chart-range-handle:focus-visible, .chart-range-thumb:focus-visible { z-index: 2; outline: 3px solid rgb(68 133 91 / 30%); outline-offset: 2px; }
.chart-range-handle:disabled, .chart-range-thumb:disabled { opacity: .5; cursor: default; }
.chart-range-output { color: #89968d; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-modes { display: grid; width: 300px; min-width: 0; flex: 0 1 300px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.chart-modes[hidden] { display: none; }
#player-chart-modes button:first-child { grid-column: 2; }
.chart-modes button { min-height: 23px; padding: 0 9px; border: 1px solid #dfe6e1; border-radius: 5px; color: #607367; background: #fff; cursor: pointer; font-size: calc(10px + var(--font-bump)); }
.chart-modes button[aria-pressed="true"] { border-color: var(--theme-b7cdbd, #b7cdbd); color: var(--theme-315940, #315940); background: var(--theme-edf4ef, #edf4ef); font-weight: 700; }
.chart-modes button[data-match-chart-result="win"] { color: #26382c; background: #c2dacb; border-color: #a4c6b1; }
.chart-modes button[data-player-chart-part="goals"] { color: #26382c; background: #c3d7cc; border-color: #a4c4b1; }
.chart-modes button[data-match-chart-result="draw"] { color: #26382c; background: #f2e6c9; border-color: #dfcfa9; }
.chart-modes button[data-match-chart-result="loss"] { color: #26382c; background: #f2d8d4; border-color: #e2bdb6; }
.chart-modes button[data-player-chart-part="assists"] { color: #26382c; background: #e6f3ea; border-color: #c7dfce; }
.chart-modes button[aria-pressed="false"] { color: #59665d; background: #e9ecea; border-color: #c8d0ca; }
.table-scroll { position: relative; z-index: 1; max-height: min(calc(68vh + 57px), 817px); min-height: 300px; overflow: auto; }
.sticky-table-header { position: fixed; z-index: 5; overflow: hidden; background: #f5f8f5; touch-action: pan-y; }
.sticky-table-header[hidden] { display: none; }
.players-table-scroll[hidden] { display: none; }
table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; text-align: left; }
.table-scroll table { border-collapse: separate; border-spacing: 0; }
.number-column { width: 4%; }
.opponent-column { width: 18%; }
.result-column { width: 10%; }
.squad-column { width: 29%; }
.goals-column { width: 16%; }
.cup-column { width: 15%; }
.date-column { width: 8%; }
thead { background: #f5f8f5; }
th { position: sticky; top: 0; z-index: 10; height: 44px; padding: 0 12px; border-top: 1px solid #edf0ed; border-bottom: 1px solid #e6ebe7; color: #77867c; background: #f5f8f5; font-size: calc(10px + var(--font-bump)); font-weight: 700; letter-spacing: .03em; text-align: center; text-transform: uppercase; white-space: nowrap; }
.statistics-page .match-panel .table-scroll th { color: var(--theme-466451, #466451); background: var(--theme-f5faf6, #f5faf6); }
td { padding: 11px 12px; border-bottom: 1px solid #eef1ee; font-size: calc(12px + var(--font-bump)); }
tbody tr.match-row { transition: background .12s ease; }
tbody tr.match-row:hover { background: var(--theme-f5faf6, #f5faf6); }
tbody tr.match-row:last-child td { border-bottom: 0; }
.number-col { width: auto; padding-left: 14px; }
.number-cell { color: #849187; font-variant-numeric: tabular-nums; }
.match-cell { min-width: 0; }
.fixture { display: block; overflow: hidden; color: #27372d; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.fixture span { color: #8c9b90; font-weight: 400; }
.unknown-opponent { font-weight: 400; }
.fixture .unknown-opponent { color: inherit; }
.result-col { width: auto; }
.result-cell { width: auto; min-width: 0; padding-right: 3px; padding-left: 3px; white-space: nowrap; }
.score-badge { display: inline-flex; min-width: min(8.6em, 100%); flex-wrap: nowrap; align-items: center; justify-content: center; gap: 3px; padding: 4px 4px; border-radius: 5px; color: #425449; background: #f0f4f1; font-size: calc(11px + var(--font-bump)); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-badge > span { flex: 0 0 auto; white-space: nowrap; }
.score-halftime { white-space: pre; }
.score-badge.win { color: #1a6640; background: #e8f4eb; }
.score-badge.loss { color: #954f46; background: #fbefed; }
.score-badge.draw { color: #806528; background: #faf4e5; }
.squad-cell, .goals-cell { max-width: 0; overflow: hidden; color: #526258; font-size: calc(11px + var(--font-bump)); line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.cup-cell { color: #526258; }
.cup-cell strong { display: block; max-width: 100%; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.cup-cell small { display: block; margin-top: 4px; color: #97a198; font-size: calc(10px + var(--font-bump)); text-transform: capitalize; }
.date-cell { padding-right: 3px; padding-left: 3px; color: #708076; white-space: nowrap; font-variant-numeric: tabular-nums; }
.match-row { cursor: pointer; }
.match-row:focus-visible { outline: 2px solid #77a28a; outline-offset: -2px; }
.players-table { width: 100%; min-width: 0; table-layout: fixed; }
.player-name-column { width: 7%; }
.player-metric-column { width: 6%; }
#players-table-view .player-metric-column { width: 5.4%; }
.player-debut-column { width: 9%; }
.keepers-table .player-name-column { width: 8%; }
.keepers-table .player-metric-column { width: 6.1333%; }
.player-goal-difference-column { width: 8.4%; }
.keepers-table .player-goal-difference-column { width: 6.1333%; }
.players-table th { height: 44px; padding: 3px 4px; white-space: normal; overflow-wrap: anywhere; }
.players-table th button, .relations-table th button { padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; font: inherit; letter-spacing: inherit; text-align: center; text-transform: inherit; }
.players-table th button::after, .relations-table th button::after { padding-left: 2px; color: #9aa79e; content: "↕"; }
.players-table th[aria-sort="ascending"] button::after, .relations-table th[aria-sort="ascending"] button::after { color: var(--theme-286742, #286742); content: "↑"; }
.players-table th[aria-sort="descending"] button::after, .relations-table th[aria-sort="descending"] button::after { color: var(--theme-286742, #286742); content: "↓"; }
.players-table td { padding: 6px 4px; overflow: hidden; font-size: calc(12px + var(--font-bump)); font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.players-table td:not(:first-child) { text-align: right; }
.players-table td:first-child { text-overflow: ellipsis; }
.player-row { cursor: pointer; }
.player-row:hover { background: var(--theme-f5faf6, #f5faf6); }
.players-table tr.is-pinned td { position: sticky; top: var(--pinned-row-top, 44px); z-index: 4; background: var(--theme-e3f1e7, #e3f1e7); font-weight: 700; box-shadow: 0 1px 0 #b9d6c2; }
.player-relation-link { padding: 0; border: 0; color: var(--theme-315940, #315940); background: transparent; cursor: pointer; font: inherit; font-weight: 700; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; }
.player-relation-link:hover, .player-relation-link:focus-visible { text-decoration-color: currentColor; }
.empty-state { padding: 44px 15px; color: #87948b; text-align: center; }
.panel-footer { display: flex; justify-content: space-between; align-items: center; min-height: 29px; padding: 0 22px; border-top: 1px solid #edf0ed; color: #7c8980; font-size: calc(9px + var(--font-bump)); }
.site-footer { display: flex; justify-content: space-between; padding: 18px 3px 26px; color: #8a978d; font-size: calc(10px + var(--font-bump)); }

.match-drawer-backdrop { position: fixed; inset: 0; z-index: 20; background: rgb(11 27 19 / 45%); opacity: 0; transition: opacity .22s ease; }
.match-drawer-backdrop.open { opacity: 1; }
.match-dialog { position: fixed; inset: 0 0 0 auto; z-index: 21; display: block; width: min(720px, 100vw); height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; overflow: hidden; border: 0; border-left: 1px solid #e4eae5; border-radius: 0; color: var(--ink); background: #fff; box-shadow: -16px 0 50px rgb(22 42 30 / 15%); transform: translateX(100%); transition: transform .24s ease; }
.match-drawer-backdrop[hidden], .match-dialog[hidden] { display: none; }
.match-dialog.open { transform: translateX(0); }
.match-dialog.has-archive { display: grid; width: min(1440px, 100vw); grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (min-width: 960px) {
  .match-dialog.has-archive { grid-template-columns: minmax(0, 1fr) 720px; }
}
.match-dialog.has-archive[hidden] { display: none; }
.match-archive-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; background: #fff; }
.match-archive-panel[hidden] { display: none; }
.match-archive-header { position: relative; display: flex; flex: 0 0 auto; flex-direction: column; align-items: stretch; gap: 8px; padding: 18px 24px 8px; border-bottom: 1px solid #e8ede9; }
.match-archive-header label { display: flex; min-height: 22px; align-items: center; margin: 0; }
.match-archive-header select { min-width: 0; width: 100%; padding: 5px; border: 1px solid var(--theme-dce8df, #dce8df); border-radius: 4px; background: #fff; font: inherit; font-size: 12px; }
.match-archive-close { display: none; }
.match-archive-panel iframe { display: block; width: 100%; min-height: 0; flex: 1 1 auto; border: 0; background: #fff; }
#dialog-content { display: flex; height: 100%; min-height: 0; flex-direction: column; }
#match-dialog .dialog-page-outgoing { position: absolute; inset: 0; display: flex; height: 100%; min-height: 0; flex-direction: column; background: #fff; pointer-events: none; }
.dialog-top { position: relative; display: flex; flex: 0 0 auto; justify-content: space-between; gap: 18px; padding: 21px 40px 21px 24px; border-bottom: 1px solid #e8ede9; background: #fff; }
.dialog-top .eyebrow { display: flex; min-height: 22px; align-items: center; justify-content: center; gap: .35em; margin-bottom: 6px; }
.dialog-match-heading { min-width: 0; }
.dialog-match-title-line { display: flex; min-width: 0; align-items: baseline; gap: 2em; }
.dialog-title { margin: 0; font: 700 calc(22px + var(--font-bump)) Georgia, "Times New Roman", serif; }
.dialog-score { display: flex; align-items: center; gap: 10px; color: var(--green); font: 700 calc(25px + var(--font-bump)) Georgia, "Times New Roman", serif; white-space: nowrap; }
.dialog-score-line { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; color: var(--green); font: 700 calc(22px + var(--font-bump)) Georgia, "Times New Roman", serif; white-space: nowrap; }
.dialog-halftime { white-space: pre; }
.dialog-halftime { margin-left: 1ch; }
.dialog-score small { color: #829087; font: 500 calc(11px + var(--font-bump)) "Segoe UI", Arial, sans-serif; }
.dialog-close { position: absolute; top: 4px; right: 4px; display: grid; width: 25px; height: 25px; padding: 0; place-items: center; border: 1px solid var(--theme-dce8df, #dce8df); border-radius: 50%; color: var(--theme-466451, #466451); background: var(--theme-edf4ef, #edf4ef); cursor: pointer; font-size: 17px; line-height: 1; }
#match-dialog [data-close-dialog], #player-drawer-close { display: none; }
.dialog-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 13px 24px; border-bottom: 1px solid #eef1ee; color: #718078; font-size: calc(11px + var(--font-bump)); }
.dialog-meta > span { font-size: calc(1em + 1px); }
.dialog-meta .dialog-date { margin-left: auto; white-space: nowrap; }
.dialog-archive-slot { position: absolute; top: 18px; left: 20px; display: inline-flex; height: 22px; align-items: center; }
.dialog-archive-slot:empty { display: none; }
.dialog-archive-toggle { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; padding: 0; border: 0; color: #858b87; background: transparent; cursor: pointer; }
.dialog-archive-toggle[aria-pressed="true"] { color: #101010; }
.dialog-archive-toggle:focus-visible { outline: 2px solid var(--theme-23714b, #23714b); outline-offset: 2px; }
.dialog-archive-toggle svg { width: 16px; height: 16px; margin-right: auto; fill: none; stroke: currentColor; stroke-width: 1.8; }
.dialog-match-content { min-height: 0; flex: 1 1 auto; overflow: hidden; }
.dialog-match-layout { display: grid; width: 100%; height: 100%; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; }
.dialog-section { min-width: 0; min-height: 0; padding: 6px 20px 20px; border-bottom: 1px solid #eef1ee; }
.dialog-lineup { border-right: 1px solid #eef1ee; }
.dialog-timeline { overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.match-tabs { display: flex; gap: 5px; margin-bottom: 13px; }
.match-tabs[hidden] { display: none; }
.match-tab { flex: 1 1 0; min-width: 0; padding: 8px 4px; border: 1px solid #bdcbc1; border-radius: 6px; color: #43584a; background: #eef2ef; cursor: pointer; font-family: inherit; font-size: calc(11px + var(--font-bump)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.match-tab.active { border-color: #9fb8a6; color: var(--theme-315940, #315940); background: #dcebe0; }
.match-summary-error { margin-top: 12px; }
.match-summary { color: #415247; font-size: calc(13px + var(--font-bump)); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.match-summary-separator { display: block; text-align: center; }
.match-summary[hidden] { display: none; }
.dialog-section h3 { margin: 0 0 13px; color: #54655a; font-size: calc(11px + var(--font-bump)); letter-spacing: .08em; text-transform: uppercase; }
.dialog-timeline .match-event-heading { width: calc((100% - 5px) / 2); padding: 9px 5px 0; margin-bottom: 22px; text-align: center; }
@media (min-width: 761px) {
  .dialog-match-layout .dialog-lineup h3 { padding-top: 9px; margin-bottom: 22px; }
  .dialog-match-layout .dialog-lineup .lineup-pitch { height: calc(100% - 44px); }
}
.squad-detail { margin: 0; color: #415247; font-size: calc(13px + var(--font-bump)); font-weight: 700; line-height: 1.6; }
.lineup-pitch { position: relative; display: flex; height: calc(100% - 26px); min-height: 0; flex-direction: column; align-items: center; overflow: hidden; padding: 10px 8px 22px; border: 1px solid #d9e8dc; border-radius: 8px; color: #fff; background: repeating-linear-gradient(0deg, #3d805f 0, #3d805f 58px, #397a5b 58px, #397a5b 116px); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 15%); touch-action: pan-y; }
.pitch-surface-grass { background-image: url("assets/pitch-texture.svg?v=2"), repeating-linear-gradient(0deg, #3d805f 0, #3d805f 58px, #397a5b 58px, #397a5b 116px); }
.pitch-surface-concrete { background-color: #727a7c; background-image: url("assets/pitch-texture-contrast.svg?v=3"), linear-gradient(130deg, #7a8283, #626b6d); }
.pitch-surface-parquet { background-color: #dba65e; background-image: linear-gradient(rgb(70 35 10 / 24%), rgb(70 35 10 / 24%)), url("assets/pitch-texture.svg?v=2"), url("assets/pitch-parquet.svg?v=5"); background-size: auto, auto, 100% 100%; }
.pitch-surface-clay { background-color: #a94432; background-image: linear-gradient(rgb(35 12 7 / 13%), rgb(35 12 7 / 13%)), url("assets/pitch-texture.svg?v=2"), url("assets/pitch-clay.svg?v=5"), linear-gradient(130deg, #b65039, #963c2e); background-size: auto, auto, 100% 100%, auto; }
.pitch-surface-pvc { background-color: #327ba7; background-image: url("assets/pitch-texture-contrast.svg?v=3"), linear-gradient(135deg, #3d8bb7, #25648e); }
.pitch-surface-sand { background-color: #c5a870; background-image: url("assets/pitch-texture.svg?v=2"), url("assets/pitch-sand.svg?v=1"), linear-gradient(135deg, #d1b88a, #b6945f); background-size: auto, 100% 100%, auto; }
.pitch-surface-unknown { background: #777f7b; }
.pitch-stadium { position: absolute; z-index: 2; bottom: 7px; left: 8px; display: flex; max-width: 75%; align-items: center; gap: 3px; padding: 0; border: 0; color: #fff; background: none; font: 400 calc(9px + var(--font-bump)) "Segoe UI", Arial, sans-serif; text-align: left; text-shadow: 0 1px 3px rgb(0 0 0 / 85%); cursor: pointer; }
.pitch-stadium svg { width: 12px; height: 12px; flex: none; }
.pitch-stadium span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pitch-stadium:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.pitch-goal { position: relative; z-index: 1; width: 76px; height: 27px; flex: 0 0 auto; border: 2px solid rgb(255 255 255 / 70%); border-top: 0; background: rgb(255 255 255 / 9%); }
.lineup-goalkeeper { display: flex; width: 100%; justify-content: center; padding: 8px 0 12px; }
.dialog-lineup .lineup-pitch { --pitch-goal-height: 27px; }
.dialog-lineup .lineup-goalkeeper { position: relative; }
.dialog-lineup .lineup-goalkeeper::before { position: absolute; top: calc(-1 * var(--pitch-goal-height)); bottom: 0; width: 64%; height: auto; border: 1px solid rgb(255 255 255 / 42%); border-top: 0; content: ""; pointer-events: none; }
.lineup-field { display: flex; width: 100%; min-height: 0; flex: 1 1 auto; flex-direction: column; justify-content: space-around; gap: 8px; padding: 4px 0 10px; }
.lineup-row { display: flex; width: 100%; align-items: flex-start; justify-content: space-around; gap: 2px; }
.lineup-player { position: relative; z-index: 1; display: flex; width: calc(100% / var(--lineup-count, 1)); min-width: 0; flex-direction: column; align-items: center; gap: 4px; color: #fff; text-align: center; }
.lineup-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 2px solid rgb(255 255 255 / 90%); border-radius: 50%; color: #243a2d; background: linear-gradient(145deg, #fff, #e5eee7); box-shadow: 0 2px 5px rgb(13 39 24 / 25%); font-size: calc(12px + var(--font-bump)); font-weight: 800; }
.lineup-avatar-player { position: relative; overflow: hidden; padding: 0; appearance: none; border: 2px solid rgb(255 255 255 / 90%); cursor: pointer; font: 800 calc(12px + var(--font-bump)) "Segoe UI", Arial, sans-serif; }
.lineup-avatar-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.lineup-avatar-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.lineup-contribution { --contribution-size: 18.5px; position: absolute; z-index: 1; right: -7px; display: grid; width: var(--contribution-size); height: var(--contribution-size); place-items: center; border: 1px solid #d5dce1; border-radius: 50%; color: #101417; background: #fff; box-shadow: 0 1px 2px rgb(13 39 24 / 25%); pointer-events: none; }
.lineup-contribution-goal { top: 0; }
.lineup-contribution-assist { bottom: 0; }
.lineup-contribution svg { width: 14px; height: 14px; }
.lineup-contribution-count { position: absolute; top: 50%; right: calc(6px - var(--contribution-size)); display: grid; width: var(--contribution-size); height: var(--contribution-size); place-items: center; border: 1px solid #fff; border-radius: 50%; color: #fff; background: #101417; font: 700 13px/1 "Segoe UI", Arial, sans-serif; transform: translateY(-50%); }
.dialog-lineup .lineup-avatar { width: 36px; height: 36px; }
.dialog-lineup .lineup-contribution { --contribution-size: 17.5px; }
.dialog-lineup .lineup-contribution svg { width: 13.5px; height: 13.5px; }
.dialog-lineup .lineup-contribution-count { font-size: 12.4px; }
.lineup-avatar.goalkeeper { color: #fff; background: #e9ad3c; }
.lineup-avatar-player:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lineup-name { display: flex; max-width: 100%; align-items: baseline; justify-content: center; min-width: 0; gap: 3px; font-size: calc(10px + var(--font-bump)); white-space: nowrap; }
.lineup-player .player-link { display: block; min-width: 0; max-width: 100%; overflow: hidden; color: #fff; font-size: calc(10px + var(--font-bump)); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px rgb(12 41 24 / 65%); }
.lineup-rating { flex: none; }
.lineup-player .player-link:hover, .lineup-player .player-link:focus-visible { color: #fff; text-decoration-color: currentColor; }
.lineup-rating { color: white; font-size: calc(10px + var(--font-bump)); font-weight: 700; text-shadow: 0 1px 2px #0c2918; }
.lineup-rating.is-best { color: #ffd700; }
.dialog-lineup .lineup-rating::before { content: "("; }
.dialog-lineup .lineup-rating::after { content: ")"; }
.lineup-player.is-profile-selected .lineup-avatar-player { border-color: #fff; outline: 2px solid #9de7ff; outline-offset: 2px; box-shadow: 0 0 8px #48c8ff; }
.lineup-player .lineup-name.is-best, .lineup-player .lineup-name.is-best .player-link,
.lineup-player .lineup-name.is-best .player-link:hover, .lineup-player .lineup-name.is-best .player-link:focus-visible { color: #ffd700; }
.lineup-best-star { flex: none; color: #ffd700; }
.lineup-player.is-profile-selected .player-link, .lineup-player.is-profile-selected .lineup-rating, .lineup-player.is-profile-selected .lineup-best-star,
.lineup-player.is-profile-selected .lineup-name.is-best .player-link { color: #9de7ff; text-shadow: 0 0 4px #164c63, 0 1px 2px #0c2918; }
.lineup-missing { width: auto; font-size: calc(10px + var(--font-bump)); text-shadow: 0 1px 2px rgb(12 41 24 / 65%); }
.pitch-halfway { position: relative; display: grid; width: calc(100% + 16px); height: 1px; flex: 0 0 auto; place-items: center; margin-top: auto; background: rgb(255 255 255 / 42%); }
.pitch-halfway span { position: absolute; width: 46px; height: 46px; border: 1px solid rgb(255 255 255 / 42%); border-radius: 50%; }
.lineup-formation { position: absolute; right: 8px; bottom: 7px; color: rgb(255 255 255 / 78%); font-size: calc(9px + var(--font-bump)); font-weight: 700; }
.event-list { display: grid; gap: 10px; }
.event-item { position: relative; display: block; padding: 11px 12px; border: 1px solid #e9eeea; border-radius: 7px; background: #fff; }
.event-time { display: none; }
.event-item h4 { margin: 0; color: #27392e; font-size: calc(12px + var(--font-bump)); }
#match-dialog .event-item h4, #match-dialog .event-item .event-content strong { padding-left: 1ch; }
#match-dialog #match-events-panel > .squad-detail { padding-left: calc(13px + 1ch); }
.event-score { margin-right: 1em; }
.event-item p { margin: 7px 0 0; color: #718078; font-size: calc(12px + var(--font-bump)); line-height: 1.55; white-space: pre-wrap; }
.event-item details, details.event-item { display: block; }
details.event-item { padding: 0; }
details.event-item > summary { display: block; padding: 11px 12px; cursor: pointer; list-style: none; }
details.event-item > summary::-webkit-details-marker { display: none; }
.event-content { display: grid; gap: 6px; }
.event-content strong { color: #27392e; font-size: calc(12px + var(--font-bump)); }
.event-preview { overflow: hidden; color: #718078; font-size: calc(11px + var(--font-bump)); line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
details.event-item[open] .event-preview { display: none; }
details.event-item > p { margin: 0; padding: 0 12px 13px; }
.event-empty { margin: 0; color: #87948b; font-size: calc(12px + var(--font-bump)); }
.dialog-nav { position: sticky; bottom: 0; z-index: 2; display: flex; flex: 0 0 auto; justify-content: space-between; gap: 12px; margin-top: auto; padding: 13px 24px max(16px, env(safe-area-inset-bottom)); border-top: 1px solid #e8ede9; background: #fff; box-shadow: 0 -5px 15px rgb(31 51 38 / 5%); }
.dialog-nav button { padding: 8px 12px; border: 1px solid var(--theme-dce8df, #dce8df); border-radius: 6px; color: var(--theme-466451, #466451); background: var(--theme-edf4ef, #edf4ef); cursor: pointer; font-size: calc(11px + var(--font-bump)); }
.dialog-nav button:disabled { color: #aab4ad; background: #f3f5f3; cursor: default; }
.dialog-nav button[data-match-step] { font-weight: 700; }
.dialog-nav button[data-match-step]:not(:disabled) { border-color: #b7cbbd; color: var(--theme-315940, #315940); background: #e3ede5; }
.dialog-nav.match-dialog-nav { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; padding-right: 0; padding-left: 0; }
.match-nav-buttons { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 21px 0 20px; }
.player-link { padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; font: inherit; text-align: left; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 2px; }
.player-link:hover, .player-link:focus-visible { color: var(--green); text-decoration-color: currentColor; }
.squad-detail .player-link { color: var(--theme-315940, #315940); font-weight: 700; }
.player-drawer-backdrop { position: fixed; inset: 0; z-index: 22; background: rgb(11 27 19 / 45%); opacity: 0; transition: opacity .22s ease; }
.player-drawer-backdrop.open { opacity: 1; }
.player-drawer { position: fixed; inset: 0 0 0 auto; z-index: 23; width: min(430px, 100vw); padding: 24px; overflow-y: auto; border-left: 1px solid #e4eae5; background: #fff; box-shadow: -16px 0 50px rgb(22 42 30 / 15%); transform: translateX(100%); transition: transform .24s ease; }
#player-drawer:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
.map-drawer:not([hidden]) { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.map-drawer iframe { width: 100%; min-height: 0; flex: 1 1 auto; border: 0; background: #fff; }
#player-drawer .player-drawer-header { flex: 0 0 auto; }
#player-drawer { --profile-padding-x: 24px; --profile-padding-y: 24px; }
#player-drawer .player-drawer-header { margin: calc(-1 * var(--profile-padding-y)) calc(-1 * var(--profile-padding-x)) 0; padding: var(--profile-padding-y) calc(var(--profile-padding-x) + 10px) 1em var(--profile-padding-x); }
.player-profile-scroll { min-height: 0; flex: 1 1 auto; margin-top: 16px; overflow-y: auto; }
.player-drawer.open { transform: translateX(0); }
@media (max-width: 760px) and (orientation: portrait) {
  .match-dialog.has-archive { display: block; width: min(720px, 100vw); }
  .match-archive-panel { position: absolute; inset: 0; z-index: 2; touch-action: pan-y; transform: translateX(-100%); transition: transform .24s ease; box-shadow: -16px 0 50px rgb(22 42 30 / 15%); }
  .match-archive-panel.open { transform: translateX(0); }
  .match-archive-panel.closing { transform: translateX(-100%); }
  .match-archive-header { min-height: 44px; padding: 10px 48px 8px; }
  .match-archive-header label { justify-content: center; text-align: center; font-size: calc(8px + var(--font-bump)); }
  .match-archive-close { position: absolute; top: 4px; right: 4px; display: block; padding: 0 8px; border: 0; color: var(--theme-315940, #315940); background: transparent; font-size: 30px; line-height: 1; cursor: pointer; }
}
@media (min-width: 761px) {
  .player-drawer.with-match-profile { inset: var(--profile-top) var(--profile-right) auto auto; width: var(--profile-width); height: var(--profile-height); box-shadow: none; }
  .player-drawer-backdrop.with-match-profile { opacity: 0; pointer-events: none; }
}
.player-drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-right: 10px; }
.player-drawer-main { min-width: 0; flex: 1; padding-left: 1ch; }
.player-drawer-heading { display: flex; align-items: flex-start; gap: 15px; min-width: 0; flex: 1; }
.player-drawer-heading .eyebrow { margin-bottom: 7px; }
.player-drawer-heading h2 { overflow-wrap: anywhere; }
.player-portrait-column { display: flex; width: 94px; flex: 0 0 auto; align-items: center; flex-direction: column; gap: 16px; }
.player-profile-info { position: relative; display: flex; min-width: 0; min-height: 94px; flex: 1; align-items: center; }
.player-info-content { display: flex; width: 100%; min-width: 0; align-items: stretch; gap: 8px; }
.player-name-block { min-width: 0; padding-left: 2ch; }
.player-name-block h2 { margin: 0; }
.player-fullname { margin: 6px 0 0; color: var(--muted); font-size: calc(12px + var(--font-bump)); }
.player-avatar { position: relative; display: grid; width: 94px; height: 94px; flex: 0 0 auto; place-items: end center; padding: 0; overflow: hidden; border: 1px solid #e6ece7; border-radius: 50%; background: linear-gradient(145deg, #f0f5f1, #dfe9e2); cursor: pointer; }
.player-avatar:has(img:not([hidden])) { border: 0; }
.player-avatar:focus-visible { outline: 3px solid var(--theme-23714b, #23714b); outline-offset: 3px; }
.player-avatar:disabled { cursor: wait; opacity: .7; }
.player-avatar.is-local-only:disabled { cursor: default; opacity: 1; }
.player-photo-message { margin: 12px 0 0; color: #53665b; font-size: calc(12px + var(--font-bump)); }
.player-photo-message.is-error { color: #a13333; }
.player-silhouette { width: 100%; height: 100%; fill: #a7b7ab; }
.player-avatar.player-avatar-deceased { outline: 4px solid #000; outline-offset: 3px; }
.player-avatar.player-avatar-deceased:focus-visible { box-shadow: 0 0 0 9px var(--theme-23714b, #23714b); }
.player-avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.player-badges { display: grid; grid-template-columns: 94px minmax(0, 1fr); align-items: center; gap: 15px; padding-bottom: 32px; padding-left: 1ch; }
.player-badges:not(:has(.player-number:not([hidden]), .player-status:not([hidden])))::before { content: "\00a0"; padding: 6px 10px; visibility: hidden; font-size: calc(11px + var(--font-bump)); }
.player-number-slot { grid-column: 2; grid-row: 1; padding-left: 2ch; }
.player-number-slot:has(.player-number[hidden]) { display: none; }
.player-number { display: inline-block; padding: 6px 10px; border-radius: 20px; color: #535e12; background: #e5e9ec; font-size: calc(11px + var(--font-bump)); font-weight: 700; white-space: nowrap; }
.player-number[hidden] { display: none; }
.player-number-keeper { color: #303746; background: #f1f5d6; }
.player-status { grid-column: 1; grid-row: 1; justify-self: center; padding: 6px 10px; border-radius: 20px; color: #345b42; background: var(--theme-edf4ef, #edf4ef); font-size: calc(11px + var(--font-bump)); font-weight: 700; }
.player-status { color: #66746a; background: #f2f4f2; font-weight: 500; white-space: nowrap; }
.player-status.status-injured::after { display: inline-block; width: 12px; height: 12px; margin-left: 6px; background: linear-gradient(#c62828, #c62828) center / 4px 12px no-repeat, linear-gradient(#c62828, #c62828) center / 12px 4px no-repeat; content: ""; vertical-align: -1px; }
.player-status.status-retired { color: #9a4545; background: #fcf3f3; }
.player-status.status-deceased { color: #fff; background: #494949; }
.player-profile-fields { margin: 0; border-top: 1px solid var(--line); }
.player-profile-fields > div { display: grid; grid-template-columns: 145px 1fr; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.player-profile-fields[hidden], .player-profile-fields > div[hidden] { display: none; }
.player-profile-fields dt { color: var(--muted); font-size: calc(12px + var(--font-bump)); }
.player-profile-fields dd { margin: 0; color: var(--ink); font-size: calc(13px + var(--font-bump)); font-weight: 600; }
.player-biography { margin-top: 24px; color: var(--ink); font-size: calc(13px + var(--font-bump)); line-height: 1.6; overflow-wrap: anywhere; }
.player-biography p { margin: 0; white-space: pre-wrap; }
.player-biography.is-error { color: #a13333; }
.relations-drawer-backdrop { z-index: 24; }
.relations-drawer { z-index: 25; width: min(460px, 100vw); padding: 18px; }
.relations-drawer-heading h2 { font-size: calc(17px + var(--font-bump)); }
.relations-table-scroll { max-height: calc(100vh - 115px); margin-top: 14px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; }
.relations-table { width: 100%; min-width: 0; table-layout: fixed; }
.relations-table th { position: sticky; top: 0; z-index: 1; height: 38px; padding: 0 6px; background: #f5f8f5; font-size: calc(9px + var(--font-bump)); letter-spacing: .035em; }
.relations-table td { padding: 8px 6px; font-size: calc(12px + var(--font-bump)); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.relations-table th:not(:first-child), .relations-table td:not(:first-child) { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }

@media (max-width: 760px) {
  :root { --font-bump: 2px; }
  :root { --sidebar-width: 48px; }
  .site-sidebar { padding: 10px 3px; }
  .sidebar-heading { flex-direction: column; justify-content: flex-start; gap: 0; }
  .brand { display: none; }
  .sidebar-label { display: none; }
  .sidebar-link { justify-content: center; padding: 0; }
  .sidebar-toggle { width: 40px; height: 40px; }
  .main-content { margin-left: 48px; }
  body:not(.sidebar-collapsed) .site-sidebar { width: 200px; padding-right: 12px; padding-left: 12px; }
  body:not(.sidebar-collapsed) .sidebar-heading { flex-direction: row; gap: 8px; }
  body:not(.sidebar-collapsed) .brand { display: inline-flex; }
  body:not(.sidebar-collapsed) .brand-copy, body:not(.sidebar-collapsed) .sidebar-label { display: block; }
  body:not(.sidebar-collapsed) .sidebar-link { justify-content: flex-start; padding-right: 12px; padding-left: 12px; }
  body:not(.sidebar-collapsed) .main-content { margin-left: 200px; }
  .page-shell { width: calc(100% - 30px); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 20px; }
  #summary.matches-view, #summary.players-view { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .player-stats-grid { grid-template-columns: repeat(var(--stat-count, 8), minmax(0, 1fr)); gap: 3px; margin-top: -8px; }
  .player-stats-grid .stat-card { min-width: 0; padding: 5px 3px; }
  .player-stats-grid .stat-label { min-height: 20px; font-size: calc(clamp(6px, 1.3vw, 9px) + var(--font-bump)); overflow-wrap: anywhere; }
  .player-stats-grid .stat-card strong { font-size: calc(clamp(9px, 2vw, 16px) + var(--font-bump)); }
  .stat-card { min-height: 76px; padding: 13px 14px; }
  .stat-card strong { font-size: calc(21px + var(--font-bump)); }
  .stats-grid .stat-card strong { font-size: calc(clamp(10px, 1.5vw, 20px) + var(--font-bump)); }
  .stats-grid .stat-label { font-size: calc(9px + var(--font-bump)); }
  .score-card, .points-card { min-height: 66px; display: flex; align-items: center; justify-content: space-between; }
  .score-card .stat-label, .points-card .stat-label { margin: 0; }
  .filters { display: grid; grid-template-columns: minmax(50px, .7fr) minmax(58px, .8fr) minmax(65px, 1fr) minmax(65px, 1fr) minmax(86px, 1.1fr) minmax(72px, .9fr) minmax(78px, 1fr) minmax(82px, 1fr); gap: 4px; padding: 0 8px 14px; }
  .search-field, .range-filter, .filter-menu, .contribution-filter, .clear-filters { min-width: 0; }
  .search-field { padding-right: 4px; padding-left: 4px; }
  .contribution-filter { gap: 3px; padding-right: 3px; padding-left: 3px; font-size: calc(9px + var(--font-bump)); }
  .range-filter { gap: 2px; padding-right: 2px; padding-left: 2px; }
  .filter-menu summary { gap: 2px; padding-right: 3px; padding-left: 3px; font-size: calc(9px + var(--font-bump)); }
  .filter-menu summary::after { font-size: calc(12px + var(--font-bump)); }
  .clear-filters { padding: 0 3px; font-size: calc(11px + var(--font-bump)); }
  .filter-menu summary { justify-content: space-between; }
  .panel-heading { padding: 18px 15px 14px; }
  .table-scroll { min-height: 260px; max-height: 65vh; overflow: auto; }
  th, td { padding-right: 5px; padding-left: 5px; }
  .number-col { padding-left: 14px; }
  .panel-footer { min-height: 27px; padding: 0 13px; }
  .site-footer { padding-bottom: 18px; }
  .player-drawer { padding: 20px 17px; }
  #player-drawer { --profile-padding-x: 17px; --profile-padding-y: 20px; }
  .player-profile-fields > div { grid-template-columns: 125px 1fr; }
  .player-stats-title { font-size: calc(14px + var(--font-bump)); }
  .diagram-panel { margin-right: 14px; margin-left: 14px; }
  .player-name-column { width: 8%; }
  .player-metric-column { width: 5.4%; }
  .player-debut-column { width: 9%; }
  .player-goal-difference-column { width: 12.8%; }
  .keepers-table .player-name-column { width: 10%; }
  .keepers-table .player-metric-column { width: 6%; }
  .keepers-table .player-goal-difference-column { width: 12%; }
  .players-table th button { font-size: calc(8px + var(--font-bump)); }
  .players-table th button::after { padding-left: 1px; font-size: calc(7px + var(--font-bump)); }
  .players-table td { padding: 4px 2px; overflow-wrap: anywhere; font-size: calc(12px + var(--font-bump)); text-overflow: clip; white-space: normal; }
  .chart-heading { gap: 8px; }
  .chart-heading h3 { flex-basis: 100%; }
  .chart-modes { flex-wrap: nowrap; }
  .chart-modes button { padding: 0 6px; font-size: calc(9px + var(--font-bump)); }
  .chart-zoom { grid-template-columns: minmax(0, 1fr) max-content; gap: 6px 12px; }
  .chart-zoom-label { grid-column: 1; }
  .chart-range-slider { grid-row: 2; grid-column: 1 / -1; }
  .chart-range-output { grid-row: 1; grid-column: 2; text-align: right; }
}

@media (max-width: 400px) {
  .player-portrait-column { width: 80px; }
  .player-avatar { width: 80px; height: 80px; }
  .player-drawer-heading { gap: 10px; }
  .player-badges { grid-template-columns: 80px minmax(0, 1fr); gap: 10px; }
  .player-profile-info { min-height: 80px; }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .filters { grid-template-columns: minmax(52px, .7fr) minmax(68px, .8fr) minmax(72px, 1fr) minmax(72px, 1fr) minmax(92px, 1.1fr) minmax(75px, .9fr) minmax(78px, 1fr) minmax(80px, 1fr); gap: 4px; padding-right: 8px; padding-left: 8px; }
}

@media (max-width: 600px) {
  .dialog-match-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(290px, 1fr) minmax(0, 1fr); }
  .dialog-lineup { border-right: 0; }
}

@media (max-width: 430px) {
  .page-shell { width: calc(100% - 22px); }
  .filter-menu { flex-basis: 44%; }
  .dialog-top, .dialog-section { padding-right: 16px; padding-left: 16px; }
  .dialog-meta { padding-right: 16px; padding-left: 16px; }
  .dialog-match-title-line { align-items: center; flex-direction: column; gap: 5px; }
  .dialog-score-line { gap: 6px; font-size: calc(20px + var(--font-bump)); }
  .dialog-title { font-size: calc(19px + var(--font-bump)); }
}

@media (max-width: 760px) {
  :root { --dashboard-section-gap: 8px; }
  .site-sidebar { display: none; }
  .main-content, .sidebar-collapsed .main-content, body:not(.sidebar-collapsed) .main-content { margin-left: 0; }
  .page-shell { width: calc(100% - 16px); }
  .page-shell:has(.match-panel) { padding-bottom: calc(12px + var(--mobile-table-bottom-space, 0px)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 10px 0 8px; }
  #summary.matches-view, #summary.players-view { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #stat-goals-card, #stat-points-card { grid-column: span 2; }
  .stat-card { min-height: 60px; padding: 8px 10px; }
  .stat-label { margin-bottom: 4px; font-size: calc(9px + var(--font-bump)); }
  .stat-card strong, .stats-grid .stat-card strong { font-size: calc(15px + var(--font-bump)); }
  .stats-grid .stat-card { text-align: center; }
  .stats-grid .stat-label { text-align: center; }
  .score-card, .points-card { min-height: 60px; }
  .score-card, .points-card { flex-direction: column; justify-content: center; gap: 4px; }
  .player-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 0; margin-bottom: var(--dashboard-section-gap); }
  .player-stats-grid .stat-card { min-height: 58px; padding: 7px 6px; }
  .player-stats-grid .stat-rank { margin: -3px -1px 0 3px; }
  .player-stats-grid .stat-label { min-height: 22px; margin-bottom: 3px; font-size: calc(9px + var(--font-bump)); }
  .player-stats-grid .stat-card strong { font-size: calc(14px + var(--font-bump)); }
  .player-stats-title { min-height: 36px; margin: 8px 0 0; padding: 3px 5px; font-size: calc(13px + var(--font-bump)); }
  .title-actions { gap: 3px; }
  .title-actions .view-tab { min-height: 28px; flex: 0 0 auto; padding: 0 5px; font-size: calc(10px + var(--font-bump)); }
  .title-actions .title-icon-button { width: 30px; padding: 0; }

  .panel-heading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 10px 9px; }
  .view-tabs, .panel-heading-actions { display: flex; width: 100%; gap: 6px; }
  .view-tab { min-height: 38px; flex: 1 1 0; padding: 0 7px; font-size: calc(11px + var(--font-bump)); }
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 0 8px 10px; }
  .filters .clear-filters { grid-column: 1 / -1; }
  .filters .search-icon { display: none; }
  .range-filter { gap: 2px; padding: 0 3px; }
  .range-filter input { text-align: center; }
  .filters .search-field { padding: 0 4px; }
  .range-filter, .search-field, .filter-menu, .clear-filters { width: 100%; min-width: 0; height: 40px; }
  .contribution-filter { min-height: 40px; gap: 3px; padding: 0 4px; font-size: calc(9px + var(--font-bump)); line-height: 1.1; white-space: normal; }
  .contribution-filter input { flex: 0 0 auto; }
  .search-field { padding: 0 6px; }
  .search-field input { font-size: calc(11px + var(--font-bump)); }
  .filters .search-field input { font-size: calc(9px + var(--font-bump)); }
  .filter-menu summary { gap: 2px; padding: 0 5px; font-size: calc(9px + var(--font-bump)); }
  .filter-menu summary::after { font-size: calc(12px + var(--font-bump)); }
  .filter-options { min-width: 145px; max-width: min(220px, calc(100vw - 32px)); }
  .clear-filters { padding: 0 6px; font-size: calc(11px + var(--font-bump)); }

  .table-scroll { min-height: 260px; max-height: 65vh; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
  #match-table-view table { width: 900px; min-width: 900px; }
  .players-table-scroll table { width: 1200px; min-width: 1200px; }
  .players-table-scroll .cups-table { width: 1300px; min-width: 1300px; }
  th, td { padding-right: 7px; padding-left: 7px; }
  .players-table th { height: 44px; }
  #match-table-view th { font-size: calc(8px + var(--font-bump)); }
  .players-table td { padding: 6px 4px; font-size: calc(12px + var(--font-bump)); white-space: nowrap; }
  .panel-footer { min-height: 21px; padding: 0 10px; }
  .site-footer { padding: 12px 3px 16px; }

  .diagram-panel { margin-right: 0; margin-left: 0; }
  .chart-heading { flex-wrap: nowrap; gap: 4px; padding: 8px 9px 3px; }
  .chart-heading h3 { flex: 1 1 0; overflow: hidden; font-size: calc(11px + var(--font-bump)); text-overflow: ellipsis; white-space: nowrap; }
  .chart-note, .timeline-plot { padding-right: 9px; padding-left: 9px; }
  .chart-modes { width: min(156px, 60%); flex: 0 0 min(156px, 60%); gap: 3px; }
  .chart-modes button { min-height: 28px; padding: 0 2px; font-size: calc(8px + var(--font-bump)); }
  .chart-zoom { grid-template-columns: minmax(0, 1fr) max-content; gap: 6px 8px; padding: 7px 9px; font-size: calc(10px + var(--font-bump)); }
  .chart-range-slider { grid-row: 2; grid-column: 1 / -1; }
  .chart-range-output { grid-row: 1; grid-column: 2; }
  .chart-tooltip { width: min(300px, calc(100vw - 16px)); padding: 8px 9px; font-size: calc(10px + var(--font-bump)); }

  .dialog-top { position: relative; justify-content: center; gap: 6px; padding: 10px 48px; }
  .dialog-match-heading { width: 100%; text-align: center; }
  .dialog-match-title-line { justify-content: center; }
  .dialog-top .eyebrow { margin-bottom: 3px; font-size: calc(8px + var(--font-bump)); }
  .dialog-match-title-line { min-width: 0; align-items: center; gap: 6px; }
  .dialog-title { min-width: 0; flex: 1 1 auto; overflow: hidden; font-size: calc(18px + var(--font-bump)); text-overflow: ellipsis; white-space: nowrap; }
  .dialog-score-line { gap: 4px; font-size: calc(18px + var(--font-bump)); }
  .dialog-halftime { font-size: inherit; }
  .dialog-meta { gap: 4px 10px; padding: 6px 12px; font-size: calc(9px + var(--font-bump)); }
  .dialog-match-content { overflow-y: auto; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
  .dialog-match-layout { height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; }
  .dialog-nav.match-dialog-nav { grid-template-columns: minmax(0, 1fr); overflow-y: hidden; scrollbar-gutter: stable; }
  .match-nav-buttons { padding: 0 10px; }
  .dialog-section { padding: 5px 10px 8px; }
  .dialog-archive-slot { top: 10px; left: 10px; }
  .dialog-section h3 { margin-bottom: 5px; font-size: calc(9px + var(--font-bump)); }
  .match-tab { font-size: calc(11px + var(--font-bump)); }
  .dialog-lineup { height: min(52vh, 390px); min-height: 0; border-right: 0; }
  .lineup-pitch { height: calc(100% - 15px); padding: 4px 4px 15px; }
  .pitch-goal { width: 56px; height: 17px; }
  .dialog-lineup .lineup-pitch { --pitch-goal-height: 17px; }
  .lineup-goalkeeper { position: relative; padding: 3px 0 5px; }
  .lineup-goalkeeper::before { position: absolute; top: 0; width: 64%; height: 100%; border: 1px solid rgb(255 255 255 / 42%); border-top: 0; content: ""; }
  .lineup-field { gap: 2px; padding: 1px 0 4px; }
  .lineup-row { gap: 1px; }
  .lineup-player { gap: 1px; }
  .lineup-avatar { width: 32px; height: 32px; font-size: calc(10px + var(--font-bump)); }
  .lineup-contribution { --contribution-size: 15.5px; right: -6px; }
  .lineup-contribution svg { width: 12px; height: 12px; }
  .lineup-contribution-count { font-size: 11px; }
  .lineup-avatar-player { font: 800 calc(10px + var(--font-bump)) "Segoe UI", Arial, sans-serif; }
  .dialog-lineup .lineup-avatar-player { font-size: calc(11px + var(--font-bump)); }
  .lineup-name, .lineup-rating, .lineup-player .player-link, .lineup-missing { font-size: calc(8px + var(--font-bump)); }
  .pitch-halfway span { width: 28px; height: 28px; }
  .lineup-formation { right: 5px; bottom: 3px; font-size: calc(8px + var(--font-bump)); }
  .dialog-timeline { min-height: 180px; overflow: visible; }
}

@media (orientation: landscape) and (max-height: 560px) {
  .match-archive-header { padding-top: 5px; }
  .match-dialog { inset: 0; width: 100vw; height: 100dvh; border-left: 0; }
  .dialog-top { position: relative; justify-content: center; gap: 6px; padding: 5px 48px; }
  .dialog-match-heading { width: 100%; text-align: center; }
  .dialog-match-title-line { align-items: center; justify-content: center; gap: 12px; }
  .dialog-title { max-width: 55vw; overflow: hidden; font-size: clamp(15px, 2.8vh, 19px); text-overflow: ellipsis; white-space: nowrap; }
  .dialog-score-line { gap: 5px; font-size: clamp(15px, 2.8vh, 19px); }
  .dialog-meta { gap: 4px 12px; padding: 4px 12px; font-size: 9px; }
  .dialog-match-content { display: flex; flex: 1 1 auto; min-height: 0; overflow: hidden; }
  .dialog-match-layout { height: 100%; flex: 1 1 auto; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); grid-template-rows: minmax(0, 1fr); }
  .dialog-nav.match-dialog-nav { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
  .match-nav-buttons { gap: 8px; padding: 0 9px 0 8px; }
  .dialog-section { padding: 5px 8px; }
  .dialog-archive-slot { left: 8px; }
  .dialog-section h3 { margin-bottom: 4px; font-size: 9px; }
  .dialog-match-layout .dialog-lineup h3 { padding-top: 9px; margin-bottom: 13px; }
  .dialog-timeline .match-event-heading { margin-bottom: 13px; }
  .match-tab { font-size: calc(11px + var(--font-bump)); }
  .dialog-lineup { display: flex; height: auto; min-height: 0; flex-direction: column; border-right: 1px solid #eef1ee; }
  .lineup-pitch { height: auto; min-height: 0; flex: 1 1 auto; padding: 2px 4px 9px; }
  .dialog-match-layout .dialog-lineup .lineup-pitch { height: auto; }
  .pitch-goal { width: 46px; height: 12px; }
  .dialog-lineup .lineup-pitch { --pitch-goal-height: 12px; }
  .lineup-goalkeeper { flex: 0 0 auto; padding: 0; }
  .lineup-field { gap: 0; padding: 0; }
  .lineup-row { flex: 0 0 auto; }
  .lineup-player { gap: 0; }
  .lineup-avatar { width: 24px; height: 24px; font-size: 8px; }
  .lineup-contribution { --contribution-size: 11.75px; right: -5px; }
  .lineup-contribution svg { width: 9.5px; height: 9.5px; }
  .lineup-contribution-count { right: calc(5px - var(--contribution-size)); font-size: 8.5px; }
  .lineup-avatar-player { font-size: 8px;   }

  .lineup-name, .lineup-rating, .lineup-player .player-link, .lineup-missing { font-size: 8px; line-height: 1; }
  .pitch-halfway span { width: 30px; height: 30px; }
  .lineup-formation { right: 4px; bottom: 2px; font-size: 8px; }
  .dialog-timeline { overflow-y: auto; }
  .event-list { gap: 4px; }
  .event-item { padding: 5px 7px; }
  #match-dialog #match-events-panel > .squad-detail { padding-left: calc(8px + 1ch); }
  details.event-item > summary { padding: 5px 7px; }
  .event-item p, details.event-item > p { margin-top: 3px; padding: 0 7px 6px; }
  .dialog-nav { gap: 8px; padding: 5px 10px max(6px, env(safe-area-inset-bottom)); }
  .dialog-nav button { padding: 5px 8px; font-size: 10px; }
}

@media (max-width: 760px) and (orientation: landscape) and (max-height: 560px) {
  .dialog-lineup .lineup-avatar-player { font-size: 9px; }
}

@media (max-width: 760px) {
  .smart-search, .smart-search-result { padding-right: 8px; padding-left: 8px; }
  .smart-search { flex-wrap: nowrap; gap: 4px; }
  .smart-search-field { flex: 1 1 0; min-width: 0; }
  .smart-search .view-tab { flex: 0 0 auto; min-height: 40px; height: 40px; padding: 0 8px; }
  .smart-examples { max-height: min(60dvh, 380px); }
  #player-drawer { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }
  .match-archive-panel { padding-bottom: env(safe-area-inset-bottom, 0px); }
}
.smart-search .view-tab.active { border-color: var(--theme-8fbf9f, #8fbf9f); color: var(--theme-1f5a3a, #1f5a3a); background: var(--theme-e3f1e7, #e3f1e7); font-weight: 700; }
.smart-search .smart-action { display: grid; width: 38px; min-width: 38px; height: 38px; flex: 0 0 38px; padding: 0; place-items: center; }
.smart-search .smart-action svg { display: block; width: 20px; height: 20px; }
@media (max-width: 760px) {
  .smart-search .smart-action { width: 40px; min-width: 40px; height: 40px; flex-basis: 40px; padding: 0; }
}
#smart-search-button { border-color: var(--theme-b7cdbd, #b7cdbd); background: var(--theme-f5faf6, #f5faf6); }
#smart-search-button.active { border-color: var(--theme-8fbf9f, #8fbf9f); background: var(--theme-e3f1e7, #e3f1e7); }
.match-panel .panel-heading { padding-right: 14px; }
.match-panel .panel-heading-actions { justify-content: flex-end; }
#xlsx-export, .smart-search .smart-help-icon,
.smart-search .smart-help-icon:hover, .smart-search .smart-help-icon:focus-visible,
.smart-help[open] .smart-help-icon { display: grid; width: 38px; height: 38px; min-height: 38px; flex: 0 0 auto; padding: 0; place-items: center; border-color: var(--theme-dce8df, #dce8df); color: var(--theme-466451, #466451); background: var(--theme-edf4ef, #edf4ef); }
#xlsx-export svg, .smart-search .smart-help-icon svg { display: block; width: 20px; height: 20px; }
.smart-search .smart-help-icon, .smart-search .smart-help-icon:hover,
.smart-search .smart-help-icon:focus-visible, .smart-help[open] .smart-help-icon { background: var(--theme-f5faf6, #f5faf6); }
#xlsx-export[hidden] { display: none; }
@media (max-width: 760px) {
  .match-panel .panel-heading { padding-right: 8px; }
  .match-panel .panel-heading-actions { display: none; }
  .smart-search .smart-help-icon, .smart-search .smart-help-icon:hover,
  .smart-search .smart-help-icon:focus-visible, .smart-help[open] .smart-help-icon { width: 40px; height: 40px; min-height: 40px; }
}
.filters .filter-active, .smart-search .filter-active { border-color: var(--theme-8fbf9f, #8fbf9f); background: var(--theme-e3f1e7, #e3f1e7); }
.smart-search .smart-search-field.filter-active { background: var(--theme-f5faf6, #f5faf6); }
.smart-chip { border-color: var(--theme-8fbf9f, #8fbf9f); color: var(--theme-1f5a3a, #1f5a3a); background: var(--theme-e3f1e7, #e3f1e7); }
.smart-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.smart-search-result:has(.smart-chips:empty):has(#smart-search-note:empty) { display: none; }
.smart-search-field { flex-wrap: wrap; height: auto; min-height: 38px; gap: 4px; padding-top: 3px; padding-bottom: 3px; }
.smart-search-field input { flex: 1 1 120px; width: auto; height: 28px; }
.smart-chips .smart-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px 2px 9px; }
.smart-chip-remove { width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; color: var(--theme-1f5a3a, #1f5a3a); background: transparent; cursor: pointer; font: inherit; font-weight: 700; line-height: 1; }
.smart-chip-remove:hover { background: #b7d8c0; }
.smart-search-result { padding-bottom: 8px; }
@media (max-width: 760px) {
  .smart-search-field { flex-wrap: nowrap; height: 40px; overflow-x: auto; overflow-y: hidden; }
  .smart-search-field .search-icon, .smart-chips .smart-chip { flex: 0 0 auto; white-space: nowrap; }
  .smart-search-field input { flex: 1 0 120px; }
}
.player-stats-title { position: sticky; top: 0; z-index: 6; box-shadow: 0 -16px 0 var(--canvas); }
.cups-table .cup-name-column { width: 14%; }
.cups-table .cup-metric-column { width: 5.2%; }
.cups-table .cup-period-column { width: 6.4%; }
.cups-table th { padding: 3px 1px; letter-spacing: 0; }
.cups-table col:nth-child(1) { width: 9.5%; }
.cups-table col:nth-child(2), .cups-table col:nth-child(7) { width: 5.6%; }
.cups-table col:nth-child(3), .cups-table col:nth-child(4), .cups-table col:nth-child(8) { width: 6%; }
.cups-table col:nth-child(5) { width: 5%; }
.cups-table col:nth-child(6) { width: 7.2%; }
.cups-table col:nth-child(9), .cups-table col:nth-child(11), .cups-table col:nth-child(12), .cups-table col:nth-child(13), .cups-table col:nth-child(14) { width: 5.4%; }
.cups-table col:nth-child(10) { width: 4.4%; }
.cups-table col:nth-child(15), .cups-table col:nth-child(16) { width: 5.8%; }
.cups-table col:nth-child(17) { width: 5.2%; }
.cups-table col:nth-child(18) { width: 6.5%; }
.cups-table th button::after { padding-left: 1px; }
.cups-table td:first-child { font-weight: 700; white-space: nowrap; }
.cups-table td:first-child .player-relation-link { text-align: left; text-decoration: none; }
.cups-table td:first-child .player-relation-link:hover { text-decoration: underline; }
.cups-table td:last-child { text-align: center; }
.player-stats-title:not(.has-player) .player-stats-profile { display: none; }
@media (orientation: landscape) and (max-height: 560px) {
  #summary.matches-view, #summary.players-view { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 10px 0 8px; }
  #stat-goals-card, #stat-points-card { grid-column: auto; }
  #summary .stat-card { min-height: 56px; padding: 6px 4px; }
  #summary .stat-label { margin-bottom: 3px; font-size: calc(9px + var(--font-bump)); }
  #summary .stat-card strong { font-size: calc(14px + var(--font-bump)); white-space: nowrap; }
}

@media (min-width: 761px) {
  #player-stat-debut-card { grid-column: auto; }
}
.relations-drawer.wide { width: min(640px, 100vw); }
.relations-tabs { display: flex; flex-wrap: nowrap; gap: 5px; margin-top: 12px; }
.relations-tab { flex: 1 1 0; min-width: 0; min-height: 32px; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: clip; letter-spacing: -.02em; border: 1px solid var(--green-active); border-radius: 6px; color: #607367; background: #fff; cursor: pointer; font-size: calc(11px + var(--font-bump)); font-weight: 600; }
.relations-tab.active { border-color: var(--green-dark); color: #fff; background: var(--green-dark); font-weight: 700; }
.relations-note { margin: 10px 0 0; color: var(--muted); font-size: calc(11px + var(--font-bump)); line-height: 1.4; }
.relations-note[hidden], .relations-table-scroll[hidden] { display: none; }
.relations-matrix { table-layout: auto; }
.relations-matrix th, .relations-matrix td { width: 9%; padding-right: 3px; padding-left: 3px; }
.relations-matrix th:first-child, .relations-matrix td:first-child { width: 1%; text-align: left; padding-left: 8px; padding-right: 8px; white-space: nowrap; }
.relations-matrix th:nth-child(2), .relations-matrix td:nth-child(2) { font-weight: 700; }
.relations-matrix th { cursor: default; }
.relations-table th:last-child, .relations-table td:last-child { padding-right: 14px; }
@media (max-width: 760px) {
  .relations-drawer { padding: 12px; }
  .relations-matrix th, .relations-matrix td { padding-right: 1px; padding-left: 1px; font-size: calc(10px + var(--font-bump)); }
  .relations-matrix th:first-child, .relations-matrix td:first-child { padding-left: 4px; padding-right: 4px; }
  .relations-tabs { gap: 3px; background: var(--green-dark); }
  .relations-tab { min-height: 30px; padding: 2px 1px 5px; border-color: transparent; border-radius: 0; color: #f3f8f4; background: var(--green-dark); font-size: calc(11px + var(--font-bump)); letter-spacing: -.03em; white-space: normal; overflow-wrap: anywhere; }
  .relations-tab.active { border-color: transparent; color: #fff; box-shadow: inset 0 -3px 0 #fff; }
}
.relations-matrix tr.pinned-row td { position: sticky; top: 38px; z-index: 1; background: var(--theme-e3f1e7, #e3f1e7); font-weight: 700; box-shadow: 0 1px 0 #b9d6c2; }
.view-tabs > .view-tab { flex: 0 0 140px; width: 140px; padding: 0; }
@media (min-width: 761px) {
  .panel { overflow: clip; }
  .table-scroll { max-height: none; overflow: visible; }
  .table-scroll th { top: 40px; }
}
@media (max-width: 760px), (orientation: landscape) and (max-height: 560px) {
  .view-tabs > .view-tab { flex: 1 1 0; width: auto; }
  .filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .filters .clear-filters { grid-column: 1 / -1; }
  .player-stats-grid { --gap: 5px; display: flex; flex-wrap: wrap; gap: var(--gap); }
  .player-stats-grid[hidden] { display: none; }
  .player-stats-grid .stat-card { min-width: 0; }
  .player-stats-grid .stat-card[data-row="1"] { flex: 1 1 calc((100% - 4 * var(--gap)) / 5); }
  .player-stats-grid .stat-card[data-row="2"] { flex: 1 1 calc((100% - (var(--row2, 5) - 1) * var(--gap)) / var(--row2, 5)); }
  .player-stats-grid .stat-card strong { font-size: calc(clamp(12px, 3vw, 14px) + var(--font-bump)); }
  .player-stats-grid .stat-label { font-size: calc(clamp(7px, 1.6vw, 9px) + var(--font-bump)); overflow-wrap: anywhere; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .table-scroll { max-height: 65vh; overflow: auto; }
  #match-table-view table { width: 900px; min-width: 900px; }
  .players-table-scroll table { width: 1200px; min-width: 1200px; }
  .players-table-scroll .cups-table { width: 1300px; min-width: 1300px; }
  .table-scroll th { top: 0; }
  #match-table-view th { font-size: calc(8px + var(--font-bump)); }
  .players-table th button { font-size: calc(8px + var(--font-bump)); }
  .players-table th button::after { font-size: calc(7px + var(--font-bump)); }
}
.players-table-scroll .cups-table { width: 100%; min-width: 100%; table-layout: auto; }
.cups-table col:nth-child(n) { width: auto; }
.cups-table col:first-child { width: 1%; }
.cups-table td { padding-right: 1px; padding-left: 1px; white-space: nowrap; }
.cups-table th button { white-space: normal; overflow-wrap: anywhere; }
.cups-horizontal-scroll { display: none; }
@media (min-width: 1101px) {
  /* Clip horizontally without creating a vertical sticky scroll container. */
  #cups-table-view { overflow-x: clip; overflow-y: visible; }
  .cups-table th button { font-size: calc(10px + var(--font-bump)); }
  .cups-table th button::after { font-size: calc(9px + var(--font-bump)); }
  .cups-horizontal-scroll:not([hidden]) { display: block; width: 100%; overflow-x: auto; overflow-y: hidden; }
  .cups-horizontal-scroll > div { height: 1px; }
  .players-table-scroll .cups-table { transform: translateX(var(--cups-horizontal-offset, 0px)); }
}
@media (min-width: 761px) {
  #match-table-view table, #players-table-view table, #goalkeepers-table-view table,
  .players-table-scroll .cups-table { width: 100%; min-width: 0; table-layout: fixed; }
  #match-table-view th { padding-right: 3px; padding-left: 3px; white-space: normal; overflow-wrap: anywhere; }
  .cups-table col:first-child { width: 14%; }
  .cups-table col:nth-child(n+2):nth-child(-n+5), .cups-table col:nth-child(10) { width: 3%; }
  .cups-table col:nth-child(6), .cups-table col:nth-child(8), .cups-table col:nth-child(11),
  .cups-table col:nth-child(12), .cups-table col:nth-child(13) { width: 5%; }
  .cups-table col:nth-child(7), .cups-table col:nth-child(17) { width: 4%; }
  .cups-table col:nth-child(9), .cups-table col:nth-child(n+14):nth-child(-n+16) { width: 6%; }
  .cups-table col:nth-child(18) { width: 10%; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .players-table td { padding-right: 1px; padding-left: 1px; font-size: calc(9px + var(--font-bump)); }
  #match-table-view .number-column { width: 5%; }
  #match-table-view .opponent-column { width: 17%; }
  #match-table-view .result-column { width: 16%; }
  #match-table-view .squad-column { width: 23%; }
  #match-table-view .goals-column { width: 15%; }
  #match-table-view .cup-column { width: 12%; }
  #match-table-view .date-column { width: 12%; }
}
#players-table-view table, #goalkeepers-table-view table, .players-table-scroll .cups-table { table-layout: fixed; }
#players-table-view col:nth-child(n), #goalkeepers-table-view col:nth-child(n) { width: auto; }
#players-table-view col:first-child, #goalkeepers-table-view col:first-child { width: 1%; }
#players-table-view [data-player-sort="goalDifference"],
#goalkeepers-table-view [data-keeper-sort="goalDifference"] { white-space: nowrap; }
.players-table th:not(:first-child) { text-align: right; }
.players-table th button { display: inline-flex; max-width: 100%; align-items: flex-end; justify-content: flex-end; text-align: right; }
.players-table th button::after { flex: 0 0 auto; align-self: flex-end; }
.players-table th:first-child, .players-table th:first-child button { text-align: center; }
.players-table th:first-child button { justify-content: center; }
#players-table-view th:last-child, #cups-table-view th:last-child { text-align: center; }
#players-table-view th:nth-child(10), #players-table-view th:nth-child(17),
#cups-table-view th:nth-child(8), #cups-table-view th:nth-child(16),
#cups-table-view th:nth-child(17) { text-align: center; }
#players-table-view th:nth-child(10) button, #players-table-view th:nth-child(17) button,
#cups-table-view th:nth-child(8) button, #cups-table-view th:nth-child(16) button,
#cups-table-view th:nth-child(17) button, #cups-table-view th:last-child button {
  justify-content: center;
  text-align: center;
}
#players-table-view td:nth-child(10), #players-table-view td:nth-child(17),
#cups-table-view td:nth-child(8), #cups-table-view td:nth-child(16),
#cups-table-view td:nth-child(17) { text-align: center; }
.max-goals-label { white-space: nowrap; }
.match-unit { white-space: nowrap; }
#match-table-view .number-col, #match-table-view .result-col { text-align: right; }
#match-table-view th.result-col { text-align: center; }
#summary .stat-card { min-height: 75px; padding: 12px 13px; }
@media (max-width: 760px), (orientation: landscape) and (max-height: 560px) {
  #summary .stat-card { min-height: 58px; padding: 7px 6px; }
}
.page-shell.dashboard-synced #summary .stat-card,
.page-shell.dashboard-synced .player-stats-grid .stat-card { min-height: var(--dashboard-card-height); }
.player-stats-grid .stat-card strong { display: block; white-space: normal; overflow-wrap: anywhere; }
.page-shell #summary .stat-card strong { display: block; min-width: 0; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
#summary .stat-card { display: flex; min-width: 0; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
#summary .stat-label { text-align: center; }
@media (max-width: 760px) {
  #summary.matches-view, #summary.players-view { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
  #summary #stat-goals-card, #summary #stat-points-card { grid-column: auto; }
  #summary .stat-card { padding: 6px 2px; }
  #summary .stat-label { font-size: clamp(6px, 2vw, 9px); overflow-wrap: anywhere; }
  .page-shell #summary .stat-card strong { font-size: clamp(9px, 3vw, 15px); }
}
.players-table td:first-child, .relations-table td:first-child { padding-left: 8px; }
#cup-stats {
  grid-template-columns: repeat(calc(var(--stat-others, 9) - 2), minmax(0, 1fr)) minmax(max-content, 1.5fr) minmax(0, 1fr) minmax(max-content, 1fr);
}
#cup-stats .cup-stat-rate-card .stat-label,
#cup-stats .cup-stat-period-card strong { white-space: nowrap; overflow-wrap: normal; }
@media (min-width: 761px) and (max-width: 1300px) {
  #cup-stats .stat-card { padding-right: 8px; padding-left: 8px; }
}
@media (max-width: 430px) {
  #cup-stats .stat-card { padding-right: 3px; padding-left: 3px; }
}
@media (max-width: 340px) {
  #cup-stats .stat-card { padding-right: 2px; padding-left: 2px; }
}
@media (max-width: 1050px) {
  body:not(.sidebar-collapsed) #cup-stats { display: flex; flex-wrap: wrap; gap: 5px; }
  body:not(.sidebar-collapsed) #cup-stats[hidden] { display: none; }
  body:not(.sidebar-collapsed) #cup-stats .stat-card[data-row="1"] { flex: 1 1 calc((100% - 20px) / 5); }
}
@media (max-width: 850px) {
  #cup-stats { display: flex; flex-wrap: wrap; gap: 5px; }
  #cup-stats[hidden] { display: none; }
  #cup-stats .stat-card[data-row="1"] { flex: 1 1 calc((100% - 20px) / 5); }
}
@media (max-width: 1050px), (orientation: landscape) and (max-height: 560px) {
  #cup-stats .stat-card[data-row="2"] { flex: 1 1 0; }
  #cup-stats .cup-stat-rate-card[data-row="2"] { min-width: max-content; flex-grow: 1.5; }
  #cup-stats .cup-stat-period-card[data-row="2"] { min-width: max-content; }
}
.mobile-primary-nav { display: none; }
.statistics-view-nav { display: none; }
.section-scroll-hint { display: none; }
@media (min-width: 761px) {
  .statistics-view-nav { position: sticky; top: 0; z-index: 8; display: block; padding: 13px 0 8px; background: var(--canvas); }
  .statistics-view-nav .view-tabs { display: flex; width: 100%; }
  .statistics-view-nav .view-tab { display: flex; width: auto; min-width: 0; min-height: 38px; flex: 1 1 0; align-items: center; justify-content: center; padding: 5px 3px; border-color: var(--green-active); font-size: calc(12px + var(--font-bump)); overflow-wrap: anywhere; text-align: center; }
  .statistics-view-nav .view-tab.active { border-color: var(--green-dark); color: #fff; background: var(--green-dark); }
  #player-stats-title { display: grid; top: var(--statistics-view-nav-height, 0px); margin-top: calc(var(--dashboard-section-gap) - 8px); margin-bottom: calc(var(--dashboard-section-gap) - 28px); }
  #player-stats-title:has(#metrics-toggle[aria-pressed="false"]):has(#diagram-toggle[aria-expanded="false"]) { margin-bottom: 0; }
  #player-stats-title[hidden] { display: none; }
  .match-panel .panel-heading { display: none; }
}
@media (max-width: 760px) {
  html { background: #fff; }
  html:has(body.statistics-page) { background: var(--green-dark); }
  html:has(body.statistics-page #match-dialog[aria-hidden="false"], body.statistics-page #player-drawer[aria-hidden="false"], body.statistics-page #relations-drawer[aria-hidden="false"]) { background: #fff; }
  html.welcome-splash-visible, html.welcome-splash-visible:has(body.statistics-page) { background: #08160d; }
  body { background: linear-gradient(var(--green-dark) 0 1px, var(--canvas) 1px); }
  .statistics-view-nav { position: sticky; top: var(--mobile-primary-nav-height, 0px); z-index: 8; isolation: isolate; display: block; padding-top: 8px; background: var(--green-dark); }
  .statistics-view-nav::before { position: absolute; z-index: -1; inset: 0 auto 0 50%; width: 100vw; transform: translateX(-50%); background: var(--green-dark); content: ""; }
  .statistics-view-nav .view-tabs { display: flex; gap: 4px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .statistics-view-nav .view-tabs::-webkit-scrollbar { display: none; }
  .statistics-view-nav .view-tab { min-height: 38px; min-width: 0; flex: 1 1 0; padding: 5px 2px 13px; border: 0; border-radius: 0; color: #f3f8f4; background: var(--green-dark); font-size: calc(clamp(10px, 2.8vw, 12px) + var(--font-bump)); font-weight: 600; white-space: nowrap; }
  .statistics-view-nav .view-tab.active { color: #fff; background: var(--green-dark); box-shadow: inset 0 -3px 0 #fff; }
  .statistics-view-nav .view-tab:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }
  .match-panel .panel-heading { display: contents; }
  .match-dialog, #player-drawer { border-left: 0; }
  #match-archive-close { display: none; }
  #match-dialog .dialog-top, #match-dialog .dialog-meta, #match-dialog .match-archive-header { border-color: transparent; color: #f3f8f4; background: var(--green-dark); }
  #match-dialog .dialog-top .eyebrow, #match-dialog .dialog-score-line { color: #f3f8f4; }
  #match-dialog .match-archive-header .eyebrow, #match-dialog .match-archive-close { color: #f3f8f4; }
  #match-dialog .dialog-archive-toggle { color: #a4aaa6; }
  #match-dialog .dialog-archive-toggle[aria-pressed="true"] { color: #101010; }
  #match-dialog .dialog-archive-toggle:focus-visible { outline-color: #fff; }
  #player-drawer .player-drawer-header { color: #f3f8f4; background: var(--green-dark); }
  #player-drawer .player-fullname { color: #e0ebe3; }
  .mobile-primary-nav { position: sticky; top: 0; z-index: 9; isolation: isolate; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding-top: 10px; background: var(--green-dark); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .mobile-primary-nav::before { position: absolute; z-index: -1; inset: -1px auto 0 50%; width: 100vw; transform: translateX(-50%); background: var(--green-dark); content: ""; }
  .mobile-primary-nav > a, .mobile-primary-nav > .mobile-archive-menu { min-width: 0; }
  .mobile-primary-nav > a { display: block; padding-inline: 4px; text-align: center; white-space: nowrap; }
  .mobile-primary-nav > .mobile-archive-menu summary { justify-content: center; padding-inline: 4px; white-space: nowrap; }
  .mobile-primary-nav .mobile-archive-menu div { right: 0; white-space: nowrap; }
  .mobile-primary-nav a { padding: 8px 12px; border: 1px solid transparent; border-radius: 0; color: #f3f8f4; background: var(--green-dark); font-size: 14px; font-weight: 600; text-decoration: none; }
  .mobile-primary-nav .mobile-archive-menu summary { border-color: transparent; border-radius: 0; color: #f3f8f4; background: var(--green-dark); font-size: 14px; }
  .mobile-primary-nav > a { padding-inline: 4px; }
  .mobile-primary-nav a.active, .mobile-primary-nav .mobile-archive-menu summary.active { border-color: transparent; color: #fff; background: var(--green-active); text-decoration: none; }
  #player-stats-title { top: calc(var(--mobile-primary-nav-height, 0px) + var(--statistics-view-nav-height, 46px)); isolation: isolate; min-height: 54px; margin-top: 0; border-color: transparent; border-radius: 0; color: #f3f8f4; background: var(--green-dark); box-shadow: none; }
  .archive-title.player-stats-title { top: var(--mobile-primary-nav-height, 0px); }
  .section-scroll-hint { position: absolute; z-index: 1; top: 8px; bottom: 0; display: none; width: 16px; align-items: center; justify-content: center; color: #fff; background: var(--green-dark); font-size: 22px; pointer-events: none; }
  .section-scroll-hint-left { left: 0; }
  .section-scroll-hint-right { right: 0; }
  .has-scroll-left > .section-scroll-hint-left, .has-scroll-right > .section-scroll-hint-right { display: flex; }
  #player-stats-title::before { position: absolute; z-index: -1; inset: -1px auto -1px 50%; width: 100vw; transform: translateX(-50%); background: #fff; content: ""; }
  #player-stats-title .title-icon-button, #player-stats-title .title-icon-button.active,
  #player-stats-title .player-stats-profile:hover, #player-stats-title .player-stats-profile:focus-visible { border-color: transparent; color: var(--theme-466451, #466451); background: #fff; }
  #player-stats-title { color: var(--theme-466451, #466451); background: #fff; }
}
@media (max-width: 760px) {
  .statistics-page .page-shell { padding-bottom: calc(var(--mobile-primary-nav-height, 52px) + var(--statistics-view-nav-height, 46px) + var(--mobile-table-bottom-space, 0px) + 12px); }
  .statistics-page .mobile-primary-nav { position: fixed; top: auto; bottom: 0; left: 8px; right: 8px; padding: 0 0 calc(10px + env(safe-area-inset-bottom, 0px)); transition: transform .2s ease; }
  .statistics-page .statistics-view-nav { position: fixed; top: auto; bottom: var(--mobile-primary-nav-height, 52px); left: 2ch; right: 2ch; padding: 0 0 9.5px; font-size: calc(12px + var(--font-bump)); transition: transform .2s ease; }
  .statistics-page .back-to-top { top: min(calc(83.333vh - 48px), calc(100dvh - var(--mobile-primary-nav-height, 52px) - var(--statistics-view-nav-height, 46px) - 36px)); }
  .statistics-page .theme-random { bottom: calc(var(--mobile-primary-nav-height, 52px) + var(--statistics-view-nav-height, 46px) + 12px); }
  .statistics-page .statistics-view-nav .view-tabs { display: flex; width: 100%; justify-content: space-between; gap: 0; }
  .statistics-page .statistics-view-nav .view-tab { display: flex; width: auto; flex: 0 0 auto; align-items: center; justify-content: center; padding: 11.5px 0 5px; font-size: calc(12px + var(--font-bump)); font-weight: 700; text-align: center; }
  .statistics-page .statistics-view-nav .view-tab.active { box-shadow: inset 0 3px 0 #fff; }
  .statistics-page.mobile-nav-hidden .mobile-primary-nav { transform: translateY(100%); }
  .statistics-page.mobile-nav-hidden .statistics-view-nav { transform: translateY(var(--mobile-primary-nav-height, 52px)); }
  .statistics-page.mobile-nav-hidden:has(.mobile-primary-nav:focus-within) .mobile-primary-nav,
  .statistics-page.mobile-nav-hidden:has(.mobile-primary-nav:focus-within) .statistics-view-nav { transform: none; }
  .statistics-page #player-stats-title { top: 0; color: #f3f8f4; background: var(--green-dark); }
  .statistics-page #player-stats-title::before { background: var(--green-dark); }
  .statistics-page #player-stats-title .title-icon-button,
  .statistics-page #player-stats-title .title-icon-button.active,
  .statistics-page #player-stats-title .player-stats-profile:hover,
  .statistics-page #player-stats-title .player-stats-profile:focus-visible { color: #fff; background: var(--green-dark); }
  .statistics-page .smart-search-section { top: var(--player-stats-title-height, 0px); }
}
@media (max-width: 760px) and (orientation: landscape) {
  .statistics-page .statistics-view-nav .view-tab { padding: 7.5px 0 1px; line-height: 1.1; }
}
 .match-panel .table-scroll { min-height: 0; max-height: var(--statistics-table-height, none); overflow: auto; }
 .match-panel .table-scroll th { top: 0; }
@media (max-width: 760px) {
  .statistics-page .match-panel { overflow: clip; }
  .statistics-page .match-panel .table-scroll { max-height: none; }
}

@media (min-width: 1101px) {
  #cups-table-view { overflow-x: hidden; overflow-y: auto; }
}
.filters :is(.range-filter input, .search-field input, .contribution-filter, .filter-menu summary, .filter-options label, .clear-filters),
.smart-search :is(.smart-search-field input, .smart-chip, #smart-search-button, .smart-examples-title, .smart-examples button),
.smart-search-result :is(.smart-chip, .smart-note) { font-size: calc(12px + var(--font-bump)); }
.filters .contribution-filter { white-space: normal; }
@media (max-width: 760px) {
  .filters :is(.range-filter input, .search-field input, .contribution-filter, .filter-menu summary, .filter-options label, .clear-filters),
  .smart-search :is(.smart-search-field input, .smart-chip, #smart-search-button, .smart-examples-title, .smart-examples button),
  .smart-search-result :is(.smart-chip, .smart-note) { font-size: calc(9px + var(--font-bump)); }
}

#match-dialog .dialog-top { justify-content: center; padding: 18px 24px; }
#match-dialog .dialog-top { overflow: hidden; }
#match-dialog .dialog-heading-outgoing { position: absolute; inset: 18px 24px auto; width: auto; pointer-events: none; }
#match-dialog .dialog-match-heading { width: 100%; text-align: center; }
#match-dialog .dialog-title { max-width: 100%; }
.dialog-score-row { display: grid; width: 100%; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; margin-top: 6px; }
.dialog-score-row .dialog-score-line { justify-content: center; }
.match-step-arrow { display: grid; width: 64px; height: 52px; padding: 0; place-items: center; border: 0; color: var(--theme-315940, #315940); background: transparent; cursor: pointer; font-size: 36px; line-height: 1; }
.match-step-arrow:disabled { color: #c4cec7; cursor: default; }
.match-step-arrow:focus-visible { outline: 2px solid var(--theme-3c865c, #3c865c); outline-offset: -2px; }
#match-dialog .match-tabs { gap: 12px; margin-bottom: 13px; }
#match-dialog .match-tab { flex: 1 1 0; padding: 8px 2px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: #54655a; background: transparent; letter-spacing: normal; text-transform: none; }
#match-dialog .match-tab.active { border-bottom-color: var(--green-active); color: var(--green-dark); background: transparent; }
#match-dialog .match-tab[hidden], #match-dialog .dialog-section[hidden] { display: none; }
#match-dialog .dialog-meta > span { color: #85958a; }
.match-mobile-tabs-slot { display: none; }
@media (min-width: 761px) {
  #match-dialog .match-tab { padding: 9px 2px 0; font-size: calc(11px + var(--font-bump)); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  #match-dialog .dialog-top .eyebrow, #match-dialog .dialog-score-line { color: #174b35; }
  #match-dialog .match-tab.active, #match-dialog .squad-detail .player-link,
  #match-dialog .dialog-timeline .player-link:hover, #match-dialog .dialog-timeline .player-link:focus-visible { color: #315940; }
  #match-dialog .match-tabs:not(:has(.match-tab:not([hidden]) ~ .match-tab:not([hidden]))) .match-tab.active { border-bottom-color: transparent; }
}
@media (min-width: 761px) and (orientation: landscape) and (max-height: 560px) {
  #match-dialog .match-tab { font-size: 9px; }
}
@media (max-width: 760px) {
  #match-dialog .dialog-top { padding: 10px 12px; touch-action: pan-y; }
  #match-dialog .dialog-score-row { grid-template-columns: 38px minmax(0, 1fr) 38px; }
  #match-dialog .match-step-arrow { width: 38px; height: 34px; font-size: 30px; }
  #match-dialog .dialog-heading-outgoing { inset: 10px 12px auto; }
  #match-dialog .dialog-title { max-width: 100%; white-space: normal; }
  #match-dialog .match-step-arrow { color: #f3f8f4; }
  #match-dialog .match-step-arrow:disabled { color: #81968a; }
  #match-dialog #dialog-content { touch-action: auto; }
  #match-dialog .match-mobile-tabs-slot { display: flex; flex: 0 0 auto; min-width: 0; background: var(--green-dark); }
  #match-dialog .match-tabs-scroll { width: 22px; flex: 0 0 22px; padding: 0; border: 0; color: #fff; background: var(--green-dark); font-size: 22px; cursor: pointer; }
  #match-dialog .match-tabs-scroll:disabled { color: #81968a; }
  #match-dialog .match-tabs-scroll[hidden] { display: none; }
  #match-dialog .match-mobile-tabs-slot .match-tabs { display: flex; min-width: 0; flex: 1 1 auto; gap: 4px; overflow-x: auto; margin: 0; padding: 0 8px; scrollbar-width: none; touch-action: pan-x pan-y; }
  #match-dialog .match-mobile-tabs-slot .match-tabs::-webkit-scrollbar { display: none; }
  #match-dialog .match-mobile-tabs-slot .match-tab { min-width: max-content; min-height: 38px; flex: 1 1 0; padding: 5px 10px 13px; border: 0; color: #f3f8f4; background: var(--green-dark); font-size: calc(12px + var(--font-bump)); font-weight: 600; letter-spacing: normal; text-transform: none; white-space: nowrap; }
  #match-dialog .match-mobile-tabs-slot .match-tab.active { color: #fff; background: var(--green-dark); box-shadow: inset 0 -3px 0 #fff; }
  #match-dialog .match-mobile-tabs-slot .match-tabs:not(:has(.match-tab:not([hidden]) ~ .match-tab:not([hidden]))) .match-tab.active { box-shadow: none; }
  #match-dialog .dialog-meta > span { color: #c4d2c8; }
  #match-dialog .dialog-match-content { display: block; overflow-y: auto; }
  #match-dialog .dialog-match-layout { display: block; height: auto; }
  #match-dialog .dialog-lineup { height: min(52vh, 390px); padding-top: 12px; border-right: 0; }
  #match-dialog .dialog-lineup h3 { display: none; }
  #match-dialog .dialog-lineup .lineup-pitch { height: 100%; }
  #match-dialog .dialog-timeline { min-height: 0; padding-top: 12px; overflow: visible; }
}
