@layer reset, base, layout, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, ul { margin: 0; }
  button, input, select { font: inherit; }
  button, a, input, select { -webkit-tap-highlight-color: transparent; }
  button { cursor: pointer; }
  button:disabled { cursor: not-allowed; }
  a { color: inherit; }
  svg { flex-shrink: 0; }
  [hidden] { display: none !important; }
}

@layer base {
  :root {
    color-scheme: light;
    --signal-red: #be1821;
    --signal-cobalt: #164fd1;
    --signal-teal: #007c6a;
    --signal-violet: #6930c3;
    --signal-orange: #b74800;
    --signal-green: #176f36;
    --navy: #172b47;
    --navy-deep: #112139;
    --blue: #2857bf;
    --blue-pale: #edf2fd;
    --paper: #f2f5f8;
    --ink: #172b47;
    --muted: #64748b;
    --line: #e2e8ef;
    --green: #28745c;
    --gold: #eab75d;
    --red: #b93842;
    --body: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
    --display: "Bahnschrift", "Arial Narrow", "Segoe UI", sans-serif;
    font-family: var(--body);
    font-size: 15px;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
  }
  body { min-width: 340px; line-height: 1.55; }
  button { border: 0; }
  button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 3px solid #b77d19;
    outline-offset: 4px;
  }
  h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; }
  h1 { font-size: clamp(30px, 3vw, 42px); letter-spacing: -1.1px; }
  h2 { font-size: 22px; letter-spacing: -.45px; }
  h3 { font-size: 18px; letter-spacing: -.2px; }
  .muted { color: var(--muted); }
  .small { font-size: 13px; }
  .numeric { font-variant-numeric: tabular-nums; }
  .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .icon { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .skip-link { position: fixed; left: 12px; top: -100px; z-index: 100; padding: 12px; background: white; border-radius: 6px; }
  .skip-link:focus { top: 12px; }
  ::selection { background: #cad9ff; }
}

@layer layout {
  .app-shell { min-height: 100vh; display: grid; grid-template-columns: 226px minmax(0, 1fr); }
  .sidebar { background: var(--navy); color: white; padding: 30px 18px 22px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
  .brand { display: flex; align-items: center; min-width: 0; min-height: 36px; }
  .brand-logo { display: block; width: 160px; max-width: 100%; height: auto; }
  .sidebar .brand { padding-left: 10px; }
  .sidebar-player { padding: 31px 14px 24px; border-bottom: 1px solid #ffffff20; margin-bottom: 22px; }
  .player-monogram { width: 54px; height: 54px; border-radius: 50%; background: #ffffff12; display: grid; place-items: center; font: 500 22px var(--display); margin-bottom: 13px; border: 1px solid #ffffff2c; }
  .sidebar-player strong { display: block; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
  .sidebar-player p { color: #b5c3d5; font-size: 12px; margin-top: 5px; }
  .nav-links { display: grid; gap: 5px; }
  .nav-link { display: flex; align-items: center; gap: 12px; color: #bbc8d9; background: transparent; border-radius: 7px; padding: 12px 14px; text-align: left; font-weight: 500; }
  .nav-link:hover { background: #ffffff0a; color: white; }
  .nav-link[aria-current="page"] { background: #ffffff12; color: white; box-shadow: inset 3px 0 var(--gold); }
  .sidebar-bottom { margin-top: auto; padding: 26px 12px 0; color: #a8bad0; font-size: 12px; }
  .sidebar-bottom p + p { margin-top: 8px; }
  .sidebar-bottom .icon { width: 14px; height: 14px; vertical-align: -3px; margin-right: 4px; }
  .workspace { min-width: 0; }
  .topbar { height: 76px; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: white; border-bottom: 1px solid var(--line); }
  .topbar-date { display: flex; align-items: center; gap: 10px; font-size: 13px; }
  .save-indicator { display: flex; align-items: center; gap: 7px; color: var(--green); font-size: 12px; white-space: nowrap; }
  .save-dot { height: 6px; width: 6px; border-radius: 50%; background: currentColor; }
  .main-content { max-width: 1450px; margin: 0 auto; padding: 35px 42px 42px; }
  .page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 27px; }
  .page-heading p { color: var(--muted); margin-top: 8px; max-width: 65ch; }
  .week-badge { font-size: 13px; background: white; padding: 7px 11px; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; }
  .dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 23px; align-items: start; }
  .column-stack { display: grid; gap: 23px; min-width: 0; }
  .content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
  .panel { background: white; border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
  .panel-heading { padding: 22px 24px 16px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
  .panel-heading h2 { font-size: 20px; }
  .panel-body { padding: 0 24px 24px; }
  .panel-description { color: var(--muted); font-size: 13px; margin-bottom: 19px; }
  .spaced { margin-top: 24px; }
}

@layer components {
  .button { min-height: 43px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; border-radius: 7px; padding: 10px 17px; font-size: 14px; font-weight: 600; text-decoration: none; background: var(--blue); color: white; border: 1px solid transparent; line-height: 1.4; }
  .button:hover { background: #204ba8; }
  .button.secondary { background: white; color: var(--ink); border-color: #cfd8e4; }
  .button.secondary:hover { background: var(--paper); }
  .button.soft { background: var(--blue-pale); color: var(--blue); }
  .button.soft:hover { background: #dee7fd; }
  .button.gold { background: var(--gold); color: #263048; }
  .button.gold:hover { background: #f4c675; }
  .button.danger { background: white; border-color: #e8bec2; color: var(--red); }
  .button.danger:hover { background: #fff3f4; }
  .button.full { width: 100%; }
  .button:disabled { opacity: .45; }
  .text-button { background: transparent; color: var(--blue); padding: 3px 0; font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
  .text-button:hover { text-decoration: underline; }
  .text-button .icon { width: 15px; height: 15px; }
  .crest { width: 60px; height: 68px; display: block; filter: drop-shadow(0 3px 3px #00000010); }
  .crest.tiny { width: 25px; height: 29px; }
  .crest.medium { width: 43px; height: 49px; }
  .fixture-card { background: var(--navy); color: white; border-radius: 16px; padding: 24px 29px 26px; position: relative; isolation: isolate; overflow: hidden; }
  .fixture-card::before { content: ""; position: absolute; z-index: -1; width: 350px; height: 350px; border: 1px solid #ffffff09; border-radius: 50%; right: -175px; top: -130px; box-shadow: 0 0 0 45px #ffffff03, 0 0 0 90px #ffffff02; }
  .fixture-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: #c4d0e1; }
  .fixture-meta strong { color: white; font-weight: 500; }
  .matchup { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 27px 0 23px; text-align: center; }
  .match-team { display: grid; justify-items: center; gap: 10px; }
  .match-team strong { font: 500 clamp(16px, 1.55vw, 23px) var(--display); }
  .match-team > span { font-size: 11px; color: #b4c3d7; }
  .match-score { font: 500 44px var(--display); white-space: nowrap; letter-spacing: -1px; }
  .match-time { font: 400 24px var(--display); color: #c2d0e2; }
  .match-caption { display: block; font: 11px var(--body); letter-spacing: 0; color: #c2d0e2; margin-top: 4px; }
  .fixture-footer { border-top: 1px solid #ffffff20; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
  .fixture-footer p { color: #b6c7dc; font-size: 12px; max-width: 27ch; }
  .fixture-footer .button { flex-shrink: 0; }
  .result-strip { display: flex; justify-content: center; flex-wrap: wrap; gap: 21px; padding: 0 0 16px; color: #d4dfec; font-size: 12px; }
  .result-strip b { color: white; font-size: 17px; margin-right: 4px; }
  .fixture-stats { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
  .fixture-stats:last-child { margin-bottom: 0; }
  .fixture-stats h3 { color: var(--ink); font-size: 16px; }
  .fixture-stats dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 2px 20px; margin: 8px 0 0; }
  .fixture-stats dl div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .fixture-stats dd { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .fixture-appearance { margin: 0 0 14px; text-align: center; color: #d4dfec; font-size: 12px; }
  .fixture-appearance strong, .fixture-footer strong { color: white; }
  .fixture-timeline { list-style: none; padding: 0; margin: 7px 0 0; }
  .fixture-timeline li { display: grid; grid-template-columns: 42px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .fixture-timeline li:last-child { border-bottom: 0; }

  .match-playback { min-height: 100vh; min-height: 100dvh; padding: clamp(20px, 6vw, 65px) 16px; background: #e9eef4; }
  .playback-shell { max-width: 770px; margin-inline: auto; }
  .playback-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
  .playback-heading h1 { font-size: clamp(29px, 5vw, 42px); }
  .playback-kicker { color: #526883; font-size: 13px; font-weight: 600; }
  .playback-controls { display: flex; flex-wrap: wrap; gap: 8px; }
  .playback-scoreboard { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, auto) minmax(0, 1fr); align-items: center; gap: clamp(6px, 3vw, 24px); padding: clamp(14px, 4vw, 29px); color: white; background: var(--navy); border-radius: 12px 12px 0 0; }
  .playback-team { min-width: 0; display: grid; place-items: center; gap: 5px; text-align: center; overflow-wrap: anywhere; font-size: clamp(12px, 2.5vw, 17px); }
  .playback-team .crest { width: 33px; height: 38px; }
  .playback-score { display: grid; place-items: center; gap: 2px; white-space: nowrap; font: 600 clamp(28px, 7vw, 52px)/1 var(--display); font-variant-numeric: tabular-nums; }
  .playback-clock { color: #f6ce87; font: 600 14px var(--body); }
  .playback-progress { display: block; width: 100%; height: 4px; appearance: none; border: 0; background: #354b66; accent-color: var(--gold); }
  .playback-progress::-webkit-progress-bar { background: #354b66; }
  .playback-progress::-webkit-progress-value { background: var(--gold); }
  .playback-progress::-moz-progress-bar { background: var(--gold); }
  .playback-feed { padding: clamp(13px, 3.5vw, 24px); background: #fff; border: 1px solid #d3deeb; border-top: 0; border-radius: 0 0 12px 12px; }
  .playback-feed h2 { margin-bottom: 12px; font-size: 18px; }
  .playback-events { display: grid; align-content: start; gap: 2px; height: clamp(220px, 40vh, 370px); overflow-y: auto; scrollbar-gutter: stable; margin: 0; padding: 0 4px 0 0; list-style: none; }
  .playback-events:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
  .playback-event { display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); gap: 8px; padding: 8px 10px; border-top: 1px solid #e4ebf3; font-size: 14px; }
  .playback-minute { color: #50617b; font-variant-numeric: tabular-nums; font-weight: 600; }
  .playback-copy { overflow-wrap: anywhere; }
  .playback-goal { background: #fff2d6; border-color: #e9c585; border-inline-start: 3px solid #a66513; }
  .playback-goal .playback-copy { color: #5a3610; font-weight: 700; }
  .playback-player { background: #edf2fd; border-color: #cfdbf3; }
  .playback-period { background: #eff3f8; color: #304865; font-weight: 600; }
  .playback-shell .button { white-space: nowrap; }
  .fixture-replay { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
  .fixture-event-minute { color: var(--ink); font-variant-numeric: tabular-nums; }
  .player-ribbon { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); padding: 19px 0; background: #fff; border-radius: 12px 12px 0 0; }
  .ribbon-stat { padding: 0 20px; border-right: 1px solid var(--line); }
  .ribbon-stat:last-child { border-right: 0; }
  .ribbon-stat span { font-size: 12px; color: var(--muted); display: block; }
  .ribbon-stat strong { font: 500 29px var(--display); line-height: 1.5; }
  .ribbon-stat small { font-size: 12px; color: var(--muted); margin-left: 3px; }
  .condition-grid { display: grid; gap: 13px; padding: 18px 23px; }
  .meter-label { display: flex; align-items: center; justify-content: space-between; font-size: 12px; gap: 15px; margin-bottom: 7px; }
  .meter-label b { font-weight: 600; }
  .meter-track { height: 5px; background: #eaf0f5; border-radius: 3px; overflow: hidden; }
  .meter-fill { height: 100%; background: var(--blue); border-radius: 3px; }
  .meter-fill.green { background: #3d8c71; }
  .meter-fill.gold { background: #bd8c36; }
  .preparation-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 15px; }
  .preparation-slots { display: flex; gap: 5px; }
  .preparation-slot { width: 19px; height: 6px; border-radius: 2px; background: #dde5ef; }
  .preparation-slot.available { background: var(--blue); }
  .quick-training { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
  .quick-training select { flex: 1; min-width: 0; }
  select, input[type="text"], input[type="number"] { border: 1px solid #cdd7e2; border-radius: 6px; padding: 10px 12px; background: #fff; color: var(--ink); min-height: 43px; width: 100%; }
  select { padding-right: 25px; }
  input::placeholder { color: #8b98aa; }
  .preparation-help { color: var(--muted); font-size: 12px; margin-top: 12px; }
  .preparation-help summary { cursor: pointer; }
  .contract-hint { background: #fff7e8; border: 1px solid #f0dba9; border-radius: 8px; padding: 14px 17px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
  .contract-hint p { font-size: 12px; color: #735a2b; margin-top: 3px; }
  .contract-hint strong { font-size: 14px; }
  .mini-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
  .mini-table th { font-weight: 500; color: var(--muted); font-size: 11px; padding: 9px 8px; text-align: center; background: #f8fafc; }
  .mini-table th:first-child, .mini-table td:first-child { padding-left: 20px; }
  .mini-table th:nth-child(2), .mini-table td:nth-child(2) { text-align: left; }
  .mini-table td { border-bottom: 1px solid #edf0f4; padding: 10px 8px; text-align: center; }
  .mini-table tr:last-child td { border-bottom: 0; }
  .mini-table .my-team td { background: var(--blue-pale); color: #244b9f; font-weight: 600; }
  .table-team { display: inline-flex; gap: 9px; align-items: center; vertical-align: middle; }
  .table-team .crest.tiny { width: 20px; height: 23px; }
  .table-scroll { overflow-x: auto; padding-bottom: 2px; }
  .full-table { font-size: 14px; min-width: 640px; }
  .full-table th { font-size: 12px; }
  .full-table td { padding: 14px 11px; }
  .full-table th:first-child, .full-table td:first-child { width: 52px; }
  .full-table td:nth-child(2) { width: 40%; }
  .table-points { font-weight: 700; }
  .activity-list { list-style: none; padding: 0; }
  .activity-item { display: flex; gap: 12px; padding: 15px 0; border-bottom: 1px solid #edf0f4; }
  .activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
  .activity-symbol { width: 31px; height: 31px; display: grid; place-items: center; color: var(--blue); border-radius: 8px; background: var(--blue-pale); flex-shrink: 0; }
  .activity-symbol .icon { width: 17px; height: 17px; }
  .activity-item strong { font-size: 13px; font-weight: 600; display: block; }
  .activity-item p { font-size: 12px; color: var(--muted); margin-top: 3px; }
  .activity-item time { font-size: 11px; color: var(--muted); display: block; margin-top: 5px; }
  .empty-copy { color: var(--muted); font-size: 13px; padding: 20px 0; }
  .training-list { padding: 0 24px 10px; }
  .training-row { display: grid; grid-template-columns: 125px minmax(70px, 1fr) 44px 94px; gap: 17px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .training-row:last-child { border: 0; }
  .training-row .skill-name { font-size: 14px; font-weight: 600; }
  .training-row .skill-value { font: 500 22px var(--display); text-align: right; }
  .training-row .button { min-height: 36px; padding: 8px 11px; font-size: 12px; }
  .training-row .skill-gain { font-size: 11px; color: var(--muted); margin-top: 2px; }
  .training-focus-note { display: grid; gap: 4px; margin: 0 24px 10px; padding: 12px 14px; border: 1px solid #dae5f7; border-radius: 8px; background: #f3f7ff; font-size: 12px; }
  .training-focus-note span { color: var(--muted); }
  .pes-training-body { padding: 0 24px 24px; }
  .pes-category-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .pes-category-option { position: relative; min-width: 0; }
  .pes-category { width: 100%; height: 100%; min-width: 0; min-height: 92px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: white; text-align: left; }
  .pes-category span { display: block; font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
  .pes-category small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
  .pes-category .pes-category-average { margin-top: 8px; font-size: 15px; font-weight: 500; color: var(--ink); }
  .pes-category .pes-category-gain { color: var(--green); font-size: 10px; }
  .pes-category[aria-pressed="true"] { border-color: var(--blue); background: var(--blue-pale); box-shadow: inset 0 -2px var(--blue); }
  .pes-category[aria-pressed="true"] .pes-category-label { color: var(--blue); }
  .pes-category-tooltip { position: absolute; z-index: 15; left: 0; top: 100%; width: min(300px, calc(100vw - 74px)); padding: 15px; border: 1px solid #cbd6e5; border-radius: 8px; background: white; box-shadow: 0 7px 22px #172b4724; color: var(--ink); visibility: hidden; opacity: 0; pointer-events: none; text-align: left; }
  .pes-category-option:nth-child(3n - 1) .pes-category-tooltip { left: 50%; transform: translateX(-50%); }
  .pes-category-option:nth-child(3n) .pes-category-tooltip { left: auto; right: 0; }
  .pes-category-option[data-tooltip-hover="true"], .pes-category-option[data-tooltip-touch="true"], .pes-category-option:has(.pes-category:focus-visible) { z-index: 16; }
  .pes-category-option[data-tooltip-hover="true"]:not([data-tooltip-dismissed="true"]) .pes-category-tooltip, .pes-category-option[data-tooltip-touch="true"]:not([data-tooltip-dismissed="true"]) .pes-category-tooltip, .pes-category-option:has(.pes-category:focus-visible):not([data-tooltip-dismissed="true"]) .pes-category-tooltip { visibility: visible; opacity: 1; pointer-events: auto; }
  .pes-category-option[data-tooltip-dismissed="true"] .pes-category-tooltip { visibility: hidden; opacity: 0; pointer-events: none; }
  .pes-category-tooltip > strong { display: block; font-size: 13px; margin-bottom: 10px; }
  .pes-category-tooltip dl { margin: 0; }
  .pes-category-tooltip dl > div, .pes-category-tooltip li, .pes-category-tooltip-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 11px; }
  .pes-category-tooltip dl > div { padding-block: 3px; }
  .pes-category-tooltip dt { color: var(--muted); }
  .pes-category-tooltip dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .pes-category-tooltip ul { list-style: none; margin-block: 10px; padding: 8px 0; border-block: 1px solid var(--line); }
  .pes-category-tooltip li { padding-block: 3px; }
  .pes-category-tooltip li b { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
  .pes-category-tooltip-total strong { color: var(--green); font-size: 16px; font-variant-numeric: tabular-nums; }
  .pes-category-tooltip p { color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 9px; }
  .pes-category-heading { margin-top: 26px; margin-bottom: 16px; }
  .pes-category-heading h3 { font-size: 24px; }
  .pes-category-heading p { margin-top: 5px; font-size: 13px; color: var(--muted); }
  .pes-drill-picker { display: flex; flex-direction: column; gap: 7px; }
  .pes-drill { padding: 12px 14px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); text-align: left; }
  .pes-drill > span:last-child { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.5; }
  .pes-drill .pes-drill-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
  .pes-drill[aria-pressed="true"] { border-color: var(--blue); background: #f7f9fe; }
  .pes-drill-title > span { color: var(--blue); }
  .pes-analysis-note { padding: 11px 0 0; font-size: 12px; color: var(--blue); }
  .pes-attribute-table { border-collapse: collapse; width: 100%; margin-top: 22px; table-layout: fixed; }
  .pes-attribute-table caption { text-align: left; font-weight: 600; font-size: 14px; padding-bottom: 13px; }
  .pes-attribute-table thead th { padding: 0 0 8px; color: var(--muted); text-align: left; font-size: 11px; font-weight: 500; border-bottom: 1px solid var(--line); }
  .pes-attribute-table th:first-child { width: 41%; padding-right: 10px; }
  .pes-attribute-table th:nth-child(2) { width: 25%; }
  .pes-attribute-table tbody th, .pes-attribute-table td { padding-block: 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
  .pes-attribute-table tbody th strong { font-size: 13px; display: block; font-weight: 600; overflow-wrap: anywhere; }
  .pes-attribute-table tbody th > span { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 2px; }
  .pes-rating { font-family: var(--display); font-size: 20px; white-space: nowrap; }
  .pes-rating-next { color: var(--green); font-size: 15px; }
  .pes-attribute-gain { padding-left: 7px; }
  .pes-attribute-gain strong { display: block; font-size: 15px; color: var(--green); line-height: 1.2; }
  .pes-attribute-gain > span { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
  .pes-progress { height: 3px; max-width: 108px; background: #e5ede9; overflow: hidden; margin-top: 5px; border-radius: 2px; }
  .pes-progress > span { display: block; height: 100%; background: var(--green); }
  .pes-training-explanation { font-size: 11px; color: var(--muted); margin-top: 13px; line-height: 1.65; }
  .pes-training-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
  .pes-training-action > div { display: grid; gap: 1px; }
  .pes-training-action strong { font-size: 13px; font-weight: 600; }
  .pes-training-action span { font-size: 11px; color: var(--muted); }
  .pes-training-blocked { margin-top: 12px; color: var(--red); font-size: 12px; }
  .pes-training-support { margin: 0 0 15px; }
  .pes-training-support > div { display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; border-bottom: 1px solid var(--line); }
  .pes-training-support dt { color: var(--muted); font-size: 13px; }
  .pes-training-support dd { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
  .pes-effect-negative { color: var(--red); }
  .pes-effect-positive { color: var(--green); }
  .pes-quick-gains { font-size: 12px; color: var(--green); line-height: 1.6; margin-top: 3px; }
  .pes-quick-details { margin: 10px 0 18px; }
  .pes-trait-panel { margin-top: 24px; }
  .pes-trait-event { padding: 20px; border-left: 3px solid var(--blue); background: #f7f9fe; border-radius: 0 7px 7px 0; }
  .pes-trait-event-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
  .pes-trait-event-heading h3 { font-size: 23px; }
  .pes-trait-event-heading > span { font-size: 12px; color: var(--muted); }
  .pes-trait-event > p { font-size: 13px; color: var(--muted); margin-top: 10px; max-width: 75ch; }
  .pes-trait-target { margin: 18px 0; padding: 12px 0; border-block: 1px solid #dce4f3; }
  .pes-trait-target > strong { font-size: 15px; color: var(--blue); }
  .pes-trait-target > span { font-size: 11px; color: var(--muted); margin-left: 8px; }
  .pes-trait-target p { color: var(--muted); font-size: 12px; margin-top: 4px; }
  .pes-event-requirements { display: flex; flex-wrap: wrap; gap: 7px 18px; list-style: none; padding: 0; margin-top: 11px; }
  .pes-event-requirements li { display: flex; align-items: baseline; gap: 7px; font-size: 11px; color: var(--muted); }
  .pes-event-requirements li strong { font-weight: 600; font-variant-numeric: tabular-nums; }
  .pes-event-requirements .pes-requirement-met { color: var(--green); }
  .pes-trait-choices { display: grid; gap: 12px; }
  .pes-trait-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 20px; padding-bottom: 13px; border-bottom: 1px solid #dce4f3; }
  .pes-trait-choice h4, .pes-catalog-trait h4 { margin: 0; font-size: 14px; font-weight: 600; }
  .pes-trait-choice p { color: var(--muted); font-size: 12px; margin-top: 3px; }
  .pes-trait-chance { display: inline-block; font-size: 12px; font-weight: 600; color: var(--blue); margin-top: 6px; }
  .pes-trait-cost { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
  .pes-trait-choice .pes-trait-blocked { grid-column: 1 / -1; color: var(--red); margin-top: 7px; }
  .pes-trait-event .pes-trait-event-help { font-size: 11px; margin-top: 13px; }
  .pes-trait-empty { padding: 18px 20px; border: 1px dashed var(--line); border-radius: 7px; }
  .pes-trait-empty h3 { font-size: 18px; }
  .pes-trait-empty p, .pes-trait-empty-copy { color: var(--muted); font-size: 13px; margin-top: 7px; }
  .pes-trait-collection { margin-top: 25px; }
  .pes-trait-collection h3, .pes-trait-history h3 { font-size: 18px; }
  .pes-unlocked-traits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; align-items: start; }
  .pes-unlocked-trait { border: 1px solid #d5e4dd; background: #f6faf7; border-radius: 6px; padding: 10px 12px; }
  .pes-unlocked-trait summary { font-size: 13px; font-weight: 600; color: var(--green); cursor: pointer; }
  .pes-unlocked-trait > span { font-size: 10px; color: var(--muted); display: block; margin-top: 7px; }
  .pes-unlocked-trait p, .pes-unlocked-trait small { font-size: 11px; color: var(--muted); display: block; margin-top: 5px; }
  .pes-trait-catalog { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; }
  .pes-trait-catalog > summary { cursor: pointer; font-size: 14px; font-weight: 600; }
  .pes-trait-catalog > summary span { margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--muted); }
  .pes-trait-catalog-help { margin-top: 12px; color: var(--muted); font-size: 12px; }
  .pes-trait-group { margin-top: 22px; }
  .pes-trait-group h3 { font-size: 19px; margin-bottom: 10px; }
  .pes-trait-catalog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .pes-catalog-trait { padding: 12px 0; border-top: 1px solid var(--line); }
  .pes-catalog-trait > span { font-size: 10px; color: var(--muted); }
  .pes-catalog-trait p { color: var(--muted); font-size: 12px; margin-top: 6px; }
  .pes-catalog-trait ul { list-style: none; padding: 0; margin-top: 9px; }
  .pes-catalog-trait li { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); padding-block: 3px; }
  .pes-catalog-trait li strong { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .pes-catalog-trait .pes-requirement-met { color: var(--green); }
  .pes-catalog-trait .pes-trait-requirement-note { font-size: 11px; }
  .pes-trait-history { margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
  .pes-trait-history ul { list-style: none; padding: 0; }
  .pes-trait-history li { margin-top: 13px; }
  .pes-trait-history strong { font-size: 13px; }
  .pes-trait-history p { color: var(--muted); font-size: 12px; }
  .pes-trait-history time { color: var(--muted); font-size: 10px; }
  .club-benefits-link { margin-top: 10px; }
  .club-overview { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: white; }
  .club-overview-identity { display: flex; align-items: center; min-width: 0; gap: 18px; }
  .club-overview h2 { margin: 4px 0; font-size: 29px; overflow-wrap: anywhere; }
  .club-overview p { color: var(--muted); font-size: 13px; }
  .club-overview .club-eyebrow { color: var(--blue); font-size: 11px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; }
  .club-picker { min-width: 220px; max-width: 300px; }
  .club-picker label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 5px; }
  .club-world-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
  .club-coach-identity { display: flex; align-items: center; gap: 16px; }
  .club-coach-identity h3 { margin-bottom: 4px; }
  .club-coach-portrait { display: block; flex: none; width: 112px; height: 112px; object-fit: cover; border-radius: 2px; background: #e6e8e8; }
  .club-level-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .club-level-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe; }
  .club-level-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; min-height: 41px; }
  .club-level-heading h3 { font: 600 14px var(--body); line-height: 1.45; }
  .club-level-heading strong { font: 500 27px var(--display); white-space: nowrap; line-height: 1; }
  .club-level-heading small { font: 400 13px var(--body); color: var(--muted); }
  .club-level-meter { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin: 9px 0 12px; }
  .club-level-meter span { height: 5px; background: #e4eaf1; border-radius: 2px; }
  .club-level-meter .filled { background: #447a9d; }
  .club-level-card p, .club-maintenance-note { font-size: 12px; }
  .club-level-card p { color: var(--muted); line-height: 1.6; }
  .club-maintenance-note { display: block; color: #9b6817; margin-top: 8px; }
  .club-benefit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; }
  .club-benefit { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 9px; }
  .club-benefit.active { border-color: #c9dfd5; background: #f6faf8; }
  .club-benefit.pending { border-color: #eadbbd; background: #fffcf5; }
  .club-benefit.inactive { background: #f8fafc; }
  .club-benefit-heading { display: flex; flex-wrap: wrap; align-items: start; gap: 7px 10px; margin-bottom: 10px; }
  .club-benefit-heading h3 { font: 600 13px var(--body); line-height: 1.5; }
  .club-status { display: inline-flex; align-items: center; width: fit-content; padding: 2px 7px; font-size: 10px; line-height: 1.6; border-radius: 4px; white-space: nowrap; }
  .club-status.active { color: #23644e; background: #e0efe7; }
  .club-status.inactive { color: #637389; background: #eaf0f5; }
  .club-status.pending, .club-status.progressing { color: #805c24; background: #f7edda; }
  .club-benefit > p { color: var(--muted); font-size: 12px; }
  .club-benefit .club-benefit-scope { color: #8b672d; margin-top: 8px; }
  .club-benefit-footer { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #dce8e2; color: var(--muted); font-size: 10px; }
  .club-data-list { margin: 14px 0 0; }
  .club-data-line { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; border-top: 1px solid var(--line); padding: 10px 0; font-size: 12px; }
  .club-data-line:last-child { padding-bottom: 0; }
  .club-data-line dt { color: var(--muted); }
  .club-data-line dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
  .club-finance-level { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .club-finance-level strong { font: 500 25px var(--display); }
  .club-finance-level > span { font-size: 13px; color: var(--muted); }
  .club-trend { font-size: 11px; color: var(--muted); white-space: nowrap; }
  .club-section-copy { color: var(--muted); font-size: 12px; line-height: 1.7; }
  .club-stadium-name { margin-bottom: 5px; overflow-wrap: anywhere; }
  .club-data-list + .club-section-copy { margin-top: 16px; }
  .club-project-progress { display: block; width: 100%; height: 7px; margin: 15px 0; border: 0; border-radius: 4px; overflow: hidden; accent-color: var(--blue); background: #e9eff5; }
  .club-project-progress::-webkit-progress-bar { background: #e9eff5; border-radius: 4px; }
  .club-project-progress::-webkit-progress-value { background: var(--blue); border-radius: 4px; }
  .club-project-progress::-moz-progress-bar { background: var(--blue); border-radius: 4px; }
  .club-project-effect { font-size: 12px; color: var(--green); }
  .club-profile-list > div + div { margin-top: 20px; }
  .club-profile-heading { display: flex; justify-content: space-between; gap: 12px; }
  .club-profile-heading h3 { font: 600 13px var(--body); }
  .club-profile-heading > span { font-size: 12px; color: var(--muted); }
  .club-profile-list p { font-size: 12px; color: var(--muted); }
  .club-history { list-style: none; padding: 0; margin: 0; }
  .club-history li { display: grid; grid-template-columns: 115px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .club-history li:first-child { padding-top: 0; }
  .club-history li:last-child { border-bottom: 0; padding-bottom: 0; }
  .club-history time { color: var(--muted); font-size: 12px; padding-top: 2px; }
  .club-history strong { font-size: 13px; }
  .club-history p { font-size: 12px; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
  .club-academy-list { list-style: none; padding: 0; margin-top: 12px; display: grid; gap: 7px; }
  .club-academy-list li { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); font-size: 12px; }
  .club-academy-list span { color: var(--muted); }
  .player-life-meters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
  .player-life-meters .meter-label { flex-wrap: wrap; gap: 3px; }
  .player-life-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .player-life-actions article { display: flex; flex-direction: column; align-items: start; padding: 15px; border: 1px solid var(--line); border-radius: 9px; }
  .player-life-actions h3, .player-life-interview h3 { font: 600 14px var(--body); }
  .player-life-actions p { flex: 1; margin: 7px 0 14px; color: var(--muted); font-size: 12px; }
  .player-life-actions .button { font-size: 12px; min-height: 38px; padding: 8px 11px; }
  .player-life-interview { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
  .player-life-control { display: flex; align-items: stretch; gap: 9px; margin-top: 9px; }
  .player-life-control select { flex: 1; min-width: 0; font-size: 13px; }
  .player-life-control .button { flex-shrink: 0; font-size: 12px; padding: 9px 12px; }
  .player-life-effect { font-size: 11px; color: var(--muted); margin-top: 8px; }
  .player-position-details { border-top: 1px solid var(--line); margin-top: 21px; padding-top: 17px; }
  .player-position-details summary { cursor: pointer; font-size: 13px; font-weight: 600; }
  .player-position-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 15px; }
  .player-position-item { display: grid; gap: 4px; padding: 10px; background: #f6f8fb; border: 1px solid var(--line); border-radius: 6px; font-size: 11px; }
  .player-position-item strong { font-size: 12px; }
  .player-position-item small { color: var(--muted); }
  .player-life-label { display: block; margin-top: 19px; font-size: 12px; font-weight: 600; }
  .player-traits { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
  .player-traits > span { padding: 9px 11px; background: #f0f3f7; border-radius: 6px; font-size: 12px; }
  .player-traits > .earned { background: #e9f4ed; color: var(--green); }
  .player-traits small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; }
  .rest-block { background: #f5f8fa; border-radius: 9px; padding: 20px; margin-top: 22px; }
  .rest-block p { margin: 8px 0 16px; color: var(--muted); font-size: 13px; }
  .quote-card { padding: 27px; border-left: 3px solid var(--gold); background: white; border-radius: 0 10px 10px 0; }
  .quote-card p { font-size: 14px; margin-top: 12px; color: var(--muted); }
  .finance-amount { font: 500 48px var(--display); letter-spacing: -1px; margin: 2px 0 18px; }
  .finance-line { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding: 14px 0; font-size: 14px; }
  .finance-line span { color: var(--muted); }
  .finance-line strong { font-weight: 600; }
  .contract-status { color: var(--green); display: inline-flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 13px; }
  .contract-status.pending { color: #916315; }
  .contract-club { display: flex; gap: 15px; align-items: center; margin-bottom: 25px; }
  .contract-club h2 { font-size: 25px; }
  .contract-club p { font-size: 13px; color: var(--muted); margin-top: 5px; }
  .contract-body { padding: 26px; }
  .contract-note { margin: 17px 0; color: var(--muted); font-size: 13px; }
  .round-picker { display: flex; align-items: center; gap: 12px; }
  .round-picker select { min-width: 135px; }
  .fixture-list { padding: 0 24px 10px; }
  .fixture-row { display: grid; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); gap: 12px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .fixture-row:last-child { border: 0; }
  .fixture-row .home { display: flex; justify-content: flex-end; align-items: center; gap: 10px; text-align: right; }
  .fixture-row .away { display: flex; align-items: center; gap: 10px; }
  .fixture-row-score { text-align: center; background: var(--paper); padding: 4px 7px; font: 500 18px var(--display); border-radius: 5px; }
  .fixture-row.mine .fixture-row-score { background: var(--blue-pale); color: var(--blue); }
  .record-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
  .record-block + .record-block { border-top: 1px solid var(--line); padding-top: 25px; margin-top: 27px; }
  .record-block p { color: var(--muted); font-size: 13px; max-width: 66ch; margin-top: 10px; }
  .football-grid { grid-template-columns: minmax(0, 1.35fr) minmax(300px, 1fr); }
  .football-grid input { min-width: 0; }
  .football-grid .player-result-fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.2fr); }
  .football-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; padding: 5px 0 23px; }
  .football-teams > div { display: grid; gap: 5px; min-width: 0; }
  .football-teams > div:last-child { text-align: right; }
  .football-teams strong { font: 600 clamp(18px, 1.8vw, 24px) var(--display); overflow-wrap: anywhere; }
  .football-teams span, .football-teams small { font-size: 11px; color: var(--muted); }
  .football-teams .football-versus { color: var(--blue); font: 500 20px var(--display); }
  .football-player { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); padding: 15px 0 0; margin-bottom: 16px; }
  .football-player .icon { color: var(--blue); }
  .football-player p { color: var(--muted); font-size: 12px; }
  .football-player strong { display: block; color: var(--ink); font-size: 14px; margin-top: 3px; }
  .football-note { background: #f7f9fc; border-left: 3px solid #c8d5e8; padding: 12px 14px; color: var(--muted); font-size: 12px; margin: 0 0 17px; }
  .football-note:last-child { margin-bottom: 0; }
  .football-note strong { color: var(--ink); }
  .football-checks { list-style: none; padding: 0; margin-top: 20px; }
  .football-checks li { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
  .football-checks li:last-child { border-bottom: 0; }
  .football-checks .icon { width: 17px; height: 17px; margin-top: 1px; }
  .football-checks .passed .icon { color: var(--green); }
  .football-checks .pending .icon { color: var(--red); }
  .football-warnings { margin-top: 15px; padding: 12px 14px 12px 29px; background: #fff7e8; border-radius: 6px; color: #735a2b; font-size: 12px; }
  .football-warnings li + li { margin-top: 8px; }
  .football-steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; }
  .football-steps li { padding: 0 0 14px 5px; }
  .football-steps li::marker { color: var(--blue); font-weight: 600; }
  .football-steps strong { color: var(--ink); }
  .relationship { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
  .relationship > .icon { color: var(--muted); width: 20px; }
  .relationship > div { flex: 1; }
  .boot-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 18px; color: var(--muted); }
  .boot-ball { width: 45px; height: 45px; border: 2px solid var(--navy); border-radius: 50%; display: block; background: conic-gradient(from 30deg, transparent 0 15%, #172b4717 15% 35%, transparent 35% 70%, #172b4717 70% 90%, transparent 90%); }
  body:has(.creation) { min-width: 0; }
  .creation {
    --route: var(--signal-red);
    --route-marker: #d82128;
    --route-shadow: color-mix(in srgb, var(--route) 78%, #15181b);
    --navy: #15181b;
    --navy-deep: #15181b;
    --ink: #15181b;
    --blue: var(--route);
    --blue-pale: color-mix(in srgb, var(--route) 8%, #fff);
    --paper: #f4f5f3;
    --muted: #535e65;
    --line: #cdd3d7;
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-block-size: 520px;
    block-size: 100vh;
    block-size: 100dvh;
    color: var(--ink);
    background: #dfe3e4;
  }
  .creation-stepper [data-creation-step="0"] {
    --route: var(--signal-red);
    --route-marker: #d82128;
  }
  .creation:has(.creation-flow[data-active-step="1"]),
  .creation-stepper [data-creation-step="1"] {
    --route: var(--signal-cobalt);
    --route-marker: #2868ee;
  }
  .creation:has(.creation-flow[data-active-step="2"]),
  .creation-stepper [data-creation-step="2"] {
    --route: var(--signal-teal);
    --route-marker: #00977a;
  }
  .creation:has(.creation-flow[data-active-step="3"]),
  .creation-stepper [data-creation-step="3"] {
    --route: var(--signal-violet);
    --route-marker: #8545e8;
  }
  .creation:has(.creation-flow[data-active-step="4"]),
  .creation-stepper [data-creation-step="4"] {
    --route: var(--signal-orange);
    --route-marker: #e05d00;
  }
  .creation:has(.creation-flow[data-active-step="5"]),
  .creation-stepper [data-creation-step="5"] {
    --route: var(--signal-green);
    --route-marker: #25864a;
  }
  .creation::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(127deg, transparent 70%, #f8f9f9 70% 70.2%, transparent 70.2%),
      linear-gradient(127deg, transparent 72%, #cfd5d9 72% 72.2%, transparent 72.2%),
      linear-gradient(127deg, #f4f5f3 0 62%, #dfe3e4 62% 78%, #d7dddf 78%);
  }
  .creation ::selection { background: color-mix(in srgb, var(--route) 23%, #fff); color: var(--ink); }
  .creation-masthead { position: relative; border-bottom: 1px solid var(--line); color: var(--ink); background: #fcfdfd; }
  .creation-masthead::after {
    content: "";
    position: absolute;
    inset: auto 0 -1px auto;
    width: clamp(70px, 15vw, 205px);
    height: 3px;
    background: var(--route-marker);
    clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%);
  }
  .creation-masthead > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; max-width: 1180px; min-height: 70px; margin: 0 auto; padding: 10px clamp(16px, 3vw, 34px); }
  .creation-masthead .text-button { color: var(--ink); font-size: 13px; font-weight: 700; text-align: right; }
  .creation-content { display: grid; grid-template-rows: auto minmax(0, 1fr); inline-size: 100%; max-inline-size: 1180px; min-block-size: 0; margin: 0 auto; padding: 27px clamp(14px, 3vw, 34px) 32px; }
  .creation-title { position: relative; isolation: isolate; margin-bottom: 23px; padding-inline-start: clamp(14px, 2vw, 25px); }
  .creation-title h1 {
    font-size: clamp(32px, 4.3vw, 62px);
    font-stretch: condensed;
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.035em;
    text-transform: uppercase;
    transform: skewX(-6deg);
    transform-origin: left bottom;
  }
  .creation-title::before {
    content: "";
    position: absolute;
    inset: 9% auto 6% 0;
    width: clamp(8px, 1.2vw, 16px);
    background: var(--route-marker);
    clip-path: polygon(47% 0, 100% 0, 53% 100%, 0 100%);
  }
  .creation-title::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 0 0 auto;
    width: 26%;
    pointer-events: none;
    background:
      linear-gradient(128deg, transparent 40%, var(--route-marker) 40% 43%, transparent 43%),
      linear-gradient(128deg, transparent 47%, #bbc3c8 47% 48%, transparent 48%),
      linear-gradient(128deg, transparent 53%, #dce1e4 53%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 13% 100%);
  }
  .creation-flow { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-block-size: 0; }
  .creation-stepper { border: 1px solid var(--line); background: white; }
  .creation-stepper ol { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; list-style: none; margin: 0; padding: 0; background: var(--line); }
  .creation-stepper li { min-width: 0; }
  .creation-stepper button { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 51px; width: 100%; padding: 6px 4px; color: var(--ink); background: #fff; font-size: 14px; font-weight: 700; }
  .creation-stepper button:hover:enabled:not([aria-current="step"]) { background: color-mix(in srgb, var(--route) 8%, #fff); }
  .creation-stepper button[aria-current="step"] { color: white; background: var(--route); }
  .creation-stepper button[aria-current="step"]::after {
    content: "";
    position: absolute;
    inset: 0 0 0 auto;
    width: 15px;
    pointer-events: none;
    background: linear-gradient(126deg, transparent 40%, #ffffff54 40% 48%, transparent 48% 58%, #ffffff36 58% 62%, transparent 62%);
  }
  .creation-stepper button:disabled { color: var(--muted); background: #f0f2f3; cursor: default; }
  .creation-stepper button:focus-visible { outline-offset: -5px; }
  .creation-step-number { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; border: 1px solid color-mix(in srgb, var(--route) 60%, #aeb7bd); box-shadow: inset 0 -3px var(--route-marker); color: var(--route); font-size: 12px; line-height: 1; font-variant-numeric: tabular-nums; }
  .creation-stepper li:has(~ li button[aria-current="step"]) .creation-step-number { color: var(--route); border-color: var(--route); }
  .creation-stepper button[aria-current="step"] .creation-step-number { color: var(--route); background: white; border-color: white; box-shadow: none; }
  .creation-stage { position: relative; display: grid; grid-template-rows: minmax(0, 1fr); min-block-size: 0; border-inline: 1px solid var(--line); background: white; }
  .creation-panel { position: relative; min-block-size: 0; overflow-y: auto; scrollbar-gutter: stable; padding: clamp(15px, 2.55vw, 28px); }
  .creation-panel:focus-visible { outline: 3px solid var(--ink); outline-offset: -4px; }
  .creation-stage .form-error { position: absolute; z-index: 1; inset-inline: clamp(15px, 2.55vw, 28px); inset-block-end: 10px; margin: 0; pointer-events: none; }
  .creation-stage:has(.form-error:not([hidden])) .creation-panel { padding-block-end: 74px; scroll-padding-block-end: 74px; }
  .creation-panel-heading { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
  .creation-panel-heading::before { content: ""; width: 7px; height: 18px; flex: 0 0 7px; background: var(--route-marker); clip-path: polygon(36% 0, 100% 0, 64% 100%, 0 100%); }
  .creation-panel-heading h2 { font-size: clamp(22px, 2.3vw, 28px); font-weight: 700; }
  .creation-identity { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; max-width: 630px; margin-top: 21px; }
  .creation-identity .form-field { margin-bottom: 0; }
  .creation :is(input[type="text"], select) { border-color: #aeb7bd; border-radius: 0; }
  .creation :is(button, input, select):focus-visible { outline-color: var(--ink); }
  .creation-footer { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 16px; padding: 10px clamp(15px, 2.55vw, 28px) max(10px, env(safe-area-inset-bottom)); border: 1px solid var(--line); background: #f1f3f4; }
  .creation-actions { display: flex; justify-content: end; align-items: center; gap: 8px; }
  .creation .button { border-radius: 0; }
  .creation .button:not(.secondary):hover { background: var(--route-shadow); }
  .creation .button.secondary { border-color: #aeb7bd; }
  .creation-actions button { flex-shrink: 0; font-weight: 750; }
  .creation-actions .button[type="submit"] { background: linear-gradient(127deg, transparent 89%, #fff3 89% 92%, transparent 92%), var(--route); }
  .creation-back .icon { transform: rotate(180deg); }
  .creation-license { position: relative; display: grid; grid-template-columns: 68px minmax(0, 1fr) minmax(66px, 109px); align-items: center; gap: 12px; max-width: 475px; padding: 8px; overflow: hidden; isolation: isolate; color: var(--ink); background: #fff; border: 1px solid #aeb7bd; box-shadow: inset 3px 0 var(--route-marker); }
  .creation-license::before { content: ""; position: absolute; inset: 0 0 0 auto; width: 29%; z-index: -1; pointer-events: none; background: repeating-linear-gradient(128deg, #edf0f1 0 6px, #e3e7e9 6px 7px); clip-path: polygon(32% 0, 100% 0, 100% 100%, 0 100%); }
  .creation-license::after { content: ""; position: absolute; inset: 0 0 auto auto; width: 25px; height: 7px; background: var(--route-marker); clip-path: polygon(7px 0, 100% 0, 100% 100%, 0 100%); pointer-events: none; }
  .license-portrait { align-self: center; width: 100%; aspect-ratio: 1; overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
  .license-portrait .portrait-art { border-radius: 0; }
  .license-portrait .player-portrait { display: block; width: 100%; height: 100%; }
  .license-identity { min-width: 0; }
  .license-title { display: flex; align-items: center; gap: 4px; margin-bottom: 3px; color: var(--route); font-size: 10px; font-weight: 750; line-height: 1.25; }
  .license-title .icon { width: 13px; height: 13px; }
  .license-identity strong { display: block; font: 750 22px/1.1 var(--display); overflow-wrap: anywhere; }
  .license-data { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 7px; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.3; }
  .license-data span:first-child { font-weight: 700; }
  .license-club { display: grid; justify-items: center; gap: 3px; min-width: 0; padding-left: 6px; border-left: 1px solid var(--line); color: var(--ink); text-align: center; font-size: 10px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
  .license-crest { display: grid; place-items: center; width: 38px; height: 38px; }
  .license-crest .crest { width: 100%; height: 100%; }
  .license-crest .icon { width: 21px; height: 21px; color: var(--muted); }
  .form-field { display: grid; gap: 8px; margin-bottom: 20px; }
  .form-field > label, .form-field > legend { font-size: 13px; font-weight: 600; }
  .form-field small { font-size: 12px; color: var(--muted); }
  fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
  .creation-club-layout { display: grid; grid-template-columns: minmax(228px, .78fr) minmax(0, 1.85fr); align-items: start; gap: clamp(14px, 2.4vw, 25px); }
  .club-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .club-option { position: relative; cursor: pointer; display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 7px; min-height: 54px; padding: 7px; border: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 650; line-height: 1.2; }
  .club-option > .crest { width: 32px; height: 36px; }
  .club-option-short { display: none; }
  .club-kit-preview { min-width: 0; overflow: hidden; border: 1px solid var(--line); background: #f8f9f9; }
  .club-kit-preview-heading { display: flex; align-items: center; gap: 9px; min-height: 52px; padding: 6px 12px; border-bottom: 1px solid var(--line); box-shadow: inset 3px 0 var(--route-marker); }
  .club-kit-preview-heading .crest { width: 34px; height: 38px; }
  .club-kit-preview-heading h3 { font-size: 18px; }
  .club-kit-preview-heading p { color: var(--muted); font-size: 11px; }
  .club-kit-specimens { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); }
  .club-kit-specimen { display: grid; min-width: 0; margin: 0; background: #f3f5f5; }
  .club-kit-specimen:nth-child(2) { background: #e6e9eb; }
  .club-kit-art { display: grid; place-items: center; justify-self: center; min-width: 0; aspect-ratio: 220 / 252; max-height: 327px; padding: clamp(8px, 2.2vw, 27px); }
  .club-kit-art .club-kit { display: block; width: min(100%, 236px); height: auto; aspect-ratio: 220 / 252; }
  .club-kit-specimen figcaption { padding: 8px 5px; border-top: 1px solid var(--line); color: var(--ink); background: #fff; font-size: 12px; font-weight: 700; text-align: center; }
  .appearance-options { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
  .appearance-option { position: relative; display: block; cursor: pointer; min-width: 0; padding: 4px; border: 1px solid var(--line); background: #fff; }
  .portrait-art { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; }
  .creation .portrait-art { border-radius: 0; }
  .painted-portrait { display: block; width: 100%; height: 100%; object-fit: cover; }
  .portrait-fallback { display: block; height: 100%; }
  .portrait-fallback .player-portrait { display: block; width: 100%; height: 100%; }
  .appearance-option > .portrait-art, .appearance-option > .player-portrait { display: block; width: 100%; align-self: center; }
  .appearance-indicator { position: absolute; top: 11px; right: 11px; display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid #858f95; background: #fff; }
  .appearance-option:has(input:checked) .appearance-indicator { border-color: var(--route); background: var(--route); }
  .appearance-option:has(input:checked) .appearance-indicator::after { content: ""; width: 8px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
  .customization-cards + .customization-cards { margin-top: 22px; }
  .customization-cards legend { padding: 0; margin-bottom: 8px; color: var(--navy); font-size: 15px; font-weight: 600; }
  .customization-cards legend > span { margin-left: 5px; color: var(--muted); font-size: 11px; font-weight: 400; }
  .customization-options { display: grid; gap: 8px; }
  .creation-physical-options { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
  .creation-physical-options .customization-cards { grid-column: span 3; margin: 0; }
  .creation-physical-options .customization-cards:last-child { grid-column: span 2; }
  .body-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .foot-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kit-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .equipment-options { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .customization-option { position: relative; display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0; min-height: 48px; padding: 5px 5px 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; text-align: center; }
  .creation :is(.club-option, .appearance-option, .customization-option):hover { background: var(--paper); }
  .creation :is(.club-option, .appearance-option, .customization-option):has(input:checked) { border-color: var(--route); background: var(--blue-pale); box-shadow: inset 0 0 0 1px var(--route); }
  .creation :is(.club-option, .appearance-option, .customization-option, .customization-default):has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
  .customization-option img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
  .physical-art { display: block; width: 100%; aspect-ratio: 3 / 4; overflow: hidden; background: #dfe3e4; }
  [data-physical-field="height"] .physical-art { background: linear-gradient(#5f7289, #708297 52%, #6d8095); }
  [data-physical-field="weight"] .physical-art { background: linear-gradient(#6c8098, #6c8097 52%, #8393a8); }
  .physical-art img { width: 100%; height: 100%; border-radius: 0; object-fit: contain; }
  .foot-options .physical-art img { object-fit: cover; }
  .creation-physical-options .customization-option strong { line-height: 1.25; }
  .kit-options img { width: auto; max-width: 100%; max-height: 292px; aspect-ratio: auto; object-fit: contain; }
  .customization-option > small { padding: 0 2px; color: var(--muted); font-size: 11px; }
  .equipment-options .customization-option { padding: 0; justify-items: stretch; overflow: hidden; text-align: left; }
  .equipment-art { display: block; width: 100%; aspect-ratio: 1; overflow: hidden; background: var(--paper); }
  .equipment-art img { object-fit: contain; }
  .equipment-art img[data-native-equipment-image] { height: 100%; object-fit: cover; border-radius: 0; transform: scale(1.11); }
  .equipment-placeholder { display: none; place-items: center; height: 100%; color: var(--muted); font-size: 10px; }
  .equipment-art:has(img[hidden]) .equipment-placeholder { display: grid; }
  .equipment-caption { display: grid; padding: 6px 9px 8px; }
  .equipment-caption strong { font-size: 12px; }
  .equipment-caption small { color: var(--muted); font-size: 11px; }
  .equipment-check { display: none; position: absolute; right: 5px; top: 5px; padding: 3px; background: var(--route); color: white; }
  .equipment-check .icon { display: block; width: 15px; height: 15px; }
  .equipment-options .customization-option:has(input:checked) .equipment-check { display: block; }
  .equipment-toolbar, .equipment-status, .equipment-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .equipment-toolbar { justify-content: space-between; margin-bottom: 9px; }
  .equipment-filter, .equipment-pagination select { min-height: 36px; width: auto; padding-block: 4px; font-size: 12px; }
  .equipment-pagination { justify-content: end; margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
  .equipment-pagination .button { width: 36px; min-height: 36px; padding: 0; font-size: 21px; }
  .equipment-pagination span { margin-right: auto; }
  .equipment-status p { color: var(--blue); font-size: 12px; font-weight: 600; }
  .customization-default { display: flex; align-items: center; min-height: 36px; padding: 5px 9px; border: 1px solid var(--line); cursor: pointer; color: var(--muted); font-size: 12px; }
  .customization-default:has(input:checked) { color: var(--route); background: var(--blue-pale); border-color: var(--route); font-weight: 650; }
  .creation .motion-gallery {
    --gallery-turf: #262c30;
    --gallery-track: #f1f3f3;
    --gallery-ink: var(--ink);
    --gallery-card-line: var(--line);
    --gallery-selection: var(--route);
  }
  .creation :is(.motion-gallery-category-group, .motion-gallery-category-group button, .motion-gallery-pages button, .motion-gallery-card, .motion-gallery-stage, .motion-gallery-play, .motion-gallery-status) { border-radius: 0; }
  .creation .motion-option-symbol { stroke: var(--muted); }
  .creation .motion-gallery-art > .motion-option-symbol { stroke: #e1e4e5; }
  .creation .motion-gallery-thumb-pending { background: repeating-linear-gradient(126deg, #242a2d 0 13px, #333b3f 13px 14px); }
  .creation :is(.motion-gallery-thumb img[src^="data:"], .motion-gallery-art canvas) { filter: saturate(.25); }
  .creation .motion-gallery-config { background: #15181bea; }
  .creation .motion-gallery-card:hover { border-color: var(--route); }
  .creation .motion-gallery-card[aria-pressed="true"] { color: var(--route); }
  .creation .motion-gallery-card[aria-pressed="true"]::after { border-radius: 0; color: #fff; }
  .creation :is(.motion-gallery-category-group button[aria-pressed="true"], .motion-gallery-pages button[aria-current="page"]) { border-color: var(--route); background: var(--route); }
  .sidebar-portrait { display: block; width: 76px; margin: 0 0 9px; padding: 0; border: 0; border-radius: 2px; background: transparent; color: inherit; cursor: pointer; }
  .sidebar-portrait .player-portrait { display: block; width: 100%; }
  .sidebar-portrait .portrait-art { border-radius: 2px; }
  .portrait-unselected { display: grid; justify-items: center; gap: 5px; padding: 12px 4px; border: 1px dashed var(--line); font-size: 11px; }
  .portrait-unselected .icon { width: 25px; height: 25px; }
  #portrait-dialog .appearance-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #portrait-dialog .appearance-option:has(input:checked) { border-color: var(--route-ink, var(--route)); box-shadow: inset 0 0 0 1px var(--route-ink, var(--route)); }
  #portrait-dialog .appearance-option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
  .form-error { background: #fff1f2; color: #9a2833; border: 1px solid #edc5ca; border-radius: 7px; font-size: 13px; padding: 11px 13px; margin: 12px 0; }
  .toast { position: fixed; bottom: 25px; left: 50%; transform: translateX(-50%); max-width: min(620px, calc(100vw - 32px)); padding: 14px 21px; background: var(--navy-deep); color: white; border-radius: 9px; box-shadow: 0 8px 32px #172b4730; z-index: 100; font-size: 13px; }
  .toast.error { background: #902c39; }
  dialog { border: 0; border-radius: 15px; padding: 0; width: min(520px, calc(100vw - 28px)); max-height: calc(100vh - 40px); box-shadow: 0 25px 100px #07192f40; color: var(--ink); }
  dialog::backdrop { background: #10243d90; backdrop-filter: blur(3px); }
  .dialog-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 25px 27px 20px; gap: 15px; border-bottom: 1px solid var(--line); }
  .dialog-header h2 { font-size: 25px; }
  .dialog-header p { color: var(--muted); font-size: 12px; margin-top: 7px; }
  .icon-button { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; background: var(--paper); color: var(--ink); flex-shrink: 0; }
  .dialog-content { padding: 24px 27px 27px; }
  .score-inputs { display: grid; grid-template-columns: 1fr 22px 1fr; text-align: center; align-items: end; gap: 18px; margin-bottom: 25px; }
  .score-side { display: grid; justify-items: center; gap: 9px; }
  .score-side label { font-size: 12px; font-weight: 600; }
  .score-side input { font: 500 38px var(--display); max-width: 100px; text-align: center; padding: 6px; }
  .score-separator { font: 30px var(--display); padding-bottom: 10px; color: var(--muted); }
  .player-result-fields { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 15px; }
  .player-result-fields input { font-variant-numeric: tabular-nums; }
  .dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 23px; }
  .dialog-content > p { font-size: 13px; color: var(--muted); }
  .error-page { max-width: 620px; margin: 15vh auto; background: white; padding: 40px; border-radius: 12px; border: 1px solid var(--line); }
  .error-page p { color: var(--muted); margin: 18px 0; }
}

@layer responsive {
  @media (max-width: 860px) {
    .creation-physical-options { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 8px; }
    .creation-physical-options .customization-cards, .creation-physical-options .customization-cards:last-child { grid-column: span 1; }
    .foot-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @media (max-width: 620px) {
    .creation-masthead > div { min-height: 62px; }
    .creation-content { padding-top: 20px; }
    .creation-title { margin-bottom: 16px; }
    .creation-title h1 { font-size: clamp(24px, 6.65vw, 39px); }
    .creation-title::after { display: none; }
    .creation-stepper ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .creation-stepper button { min-height: 42px; font-size: 12px; gap: 5px; }
    .creation-stepper button[aria-current="step"]::after { width: 10px; }
    .creation-step-number { width: 19px; height: 19px; flex-basis: 19px; font-size: 10px; }
    .creation-footer { grid-template-columns: minmax(0, 1fr); gap: 7px; }
    .creation-license { max-width: none; grid-template-columns: 48px minmax(0, 1fr) minmax(64px, 83px); gap: 7px; padding: 6px; }
    .license-identity strong { font-size: 18px; }
    .license-data { font-size: 10px; }
    .license-crest { width: 28px; height: 28px; }
    .creation-actions .button { min-height: 38px; padding-block: 7px; }
    [data-creation-panel="profile"] { padding-block: 12px 10px; }
    [data-creation-panel="profile"] .creation-panel-heading { margin-bottom: 12px; }
    .appearance-options { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 6px; }
    .appearance-indicator { top: 8px; right: 8px; }
    .creation-identity { grid-template-columns: 1fr; gap: 6px; margin-top: 8px; }
    .creation-identity .form-field { gap: 5px; }
    .creation-identity :is(input, select) { padding-block: 8px; }
    .creation-physical-options { grid-template-columns: minmax(0, 1fr); }
    .kit-options img { max-height: 220px; }
    .kit-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .equipment-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .equipment-toolbar { column-gap: 6px; }
    .equipment-pagination { flex: 0 0 100%; }
    .equipment-caption { padding-inline: 6px; }
    .equipment-caption strong { font-size: 11px; }
    .equipment-pagination .button { width: 32px; }
    .creation-club-layout { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .club-options { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
    .club-option { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 2px; min-height: 49px; padding: 4px 1px; font-size: 10px; }
    .club-option > .crest { width: 27px; height: 29px; }
    .club-option-name { display: none; }
    .club-option-short { display: block; }
    .club-kit-preview-heading { gap: 7px; min-height: 45px; padding: 5px 9px; }
    .club-kit-preview-heading .crest { width: 28px; height: 31px; }
    .club-kit-preview-heading h3 { font-size: 15px; }
    .club-kit-specimen figcaption { padding-block: 5px; }
  }
  @media (max-width: 380px) {
    .creation-footer { padding-inline: 10px; }
    .creation-actions .button { padding-inline: 10px; }
    .creation-actions .button .icon { width: 15px; height: 15px; }
    .creation .motion-gallery-art { max-height: 150px; }
  }
  @media (min-width: 1600px) { .main-content { padding-top: 45px; } .dashboard-grid { gap: 28px; } .column-stack { gap: 28px; } }
  @media (max-width: 1180px) {
    .app-shell { grid-template-columns: 190px minmax(0, 1fr); }
    .sidebar { padding-left: 12px; padding-right: 12px; }
    .sidebar .brand { padding-left: 6px; }
    .main-content { padding: 28px; }
    .topbar { padding: 0 28px; }
    .dashboard-grid { grid-template-columns: minmax(0, 1.3fr) minmax(265px, 1fr); gap: 18px; }
    .fixture-card { padding: 22px; }
    .fixture-footer { align-items: stretch; flex-direction: column; }
    .fixture-footer p { max-width: none; }
    .match-team strong { font-size: 17px; }
    .ribbon-stat { padding: 0 15px; }
  }
  @media (max-width: 960px) {
    .dashboard-grid, .content-grid { grid-template-columns: 1fr; }
    .club-world-grid { grid-template-columns: 1fr; }
    .club-world-grid > aside { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .fixture-footer { flex-direction: row; align-items: center; }
    .dashboard-grid > .column-stack:last-child { grid-template-columns: 1fr 1fr; align-items: start; }
  }
  @media (max-width: 720px) {
    .app-shell { display: block; }
    .sidebar { position: static; height: auto; padding: 16px 18px 0; }
    .sidebar .brand { padding-left: 0; }
    .sidebar-player, .sidebar-bottom { display: none; }
    .nav-links { grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 0; margin-top: 17px; overflow-x: auto; }
    .nav-link { flex-direction: column; gap: 5px; align-items: center; padding: 10px 3px 12px; font-size: 11px; border-radius: 0; }
    .nav-link[aria-current="page"] { box-shadow: inset 0 -3px var(--gold); }
    .nav-link .icon { width: 19px; height: 19px; }
    .topbar { height: 55px; padding: 0 19px; }
    .main-content { padding: 23px 17px 35px; }
    .page-heading { margin-bottom: 22px; align-items: flex-start; }
    .page-heading h1 { font-size: 32px; }
    .page-heading p { font-size: 13px; }
    .week-badge { font-size: 11px; padding: 6px 8px; margin-top: 4px; }
    .dashboard-grid > .column-stack:last-child { grid-template-columns: 1fr; }
    .fixture-card { padding: 20px; }
    .match-team strong { font-size: 19px; }
    .match-team .crest { width: 53px; height: 60px; }
    .match-score { font-size: 39px; }
    .match-time { font-size: 22px; }
    .fixture-footer { gap: 13px; }
    .fixture-footer .button { font-size: 12px; padding: 10px 12px; }
    .panel-heading { padding: 20px 20px 15px; }
    .panel-body { padding: 0 20px 20px; }
    .training-list { padding-left: 19px; padding-right: 19px; }
    .training-row { grid-template-columns: 92px minmax(40px, 1fr) 30px 82px; gap: 10px; }
    .training-row .skill-name { font-size: 13px; }
    .training-row .button { padding-left: 7px; padding-right: 7px; }
    .training-focus-note { margin-inline: 19px; }
    .pes-training-body { padding: 0 19px 20px; }
    .pes-category-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pes-category { min-height: 88px; padding: 10px 11px; }
    .pes-category-option:nth-child(n) .pes-category-tooltip { left: 0; right: auto; transform: none; }
    .pes-category-option:nth-child(2n) .pes-category-tooltip { left: auto; right: 0; }
    .pes-rating { font-size: 18px; }
    .pes-rating-next { font-size: 13px; }
    .pes-attribute-table th:first-child { width: 40%; padding-right: 6px; }
    .pes-attribute-table th:nth-child(2) { width: 27%; }
    .pes-attribute-table tbody th strong { font-size: 12px; }
    .pes-attribute-gain > span { font-size: 9px; }
    .pes-trait-event { padding: 16px; }
    .pes-trait-choice { grid-template-columns: 1fr; gap: 9px; }
    .pes-trait-choice .button { justify-self: start; }
    .pes-unlocked-traits, .pes-trait-catalog-grid { grid-template-columns: 1fr; }
    .club-overview { align-items: stretch; flex-direction: column; padding: 20px; gap: 18px; }
    .club-overview h2 { font-size: 25px; }
    .club-picker { max-width: none; min-width: 0; }
    .club-world-grid { gap: 20px; }
    .club-world-grid > aside { grid-template-columns: 1fr; }
    .club-level-grid, .club-benefit-grid { grid-template-columns: 1fr; }
    .club-level-heading { min-height: auto; }
    .club-history li { grid-template-columns: 1fr; gap: 5px; }
    .player-life-meters { grid-template-columns: 1fr; gap: 13px; }
    .player-life-actions { grid-template-columns: 1fr; }
    .player-life-control { flex-wrap: wrap; }
    .player-life-control select { flex-basis: 180px; }
    .contract-hint { align-items: flex-start; }
    .contract-hint .button { font-size: 12px; white-space: nowrap; }
    .dialog-header { padding: 22px; }
    .dialog-content { padding: 22px; }
    .score-inputs { gap: 10px; }
    .player-result-fields { gap: 9px; }
    .player-result-fields .form-field > label { font-size: 12px; }
    .fixture-row { gap: 9px; font-size: 12px; }
    .fixture-row .crest { width: 19px; height: 23px; }
    .football-teams { gap: 10px; }
    .football-teams strong { font-size: 20px; }
    .error-page { margin: 8vh 18px; padding: 28px; }
  }
  @media (prefers-reduced-motion: no-preference) {
    button, a.button { transition: background-color .15s, border-color .15s; }
    dialog[open] { animation: dialog-open .15s ease-out; }
    @keyframes dialog-open { from { opacity: .5; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
  }
}
