/* Club identity: the stadium provides the atmosphere; data stays on quiet surfaces. */
:root { --accent: #ffe500; --muted: #b9babe; }
body:has(#club-layout:not([hidden])) { display: block; background: #080a0b; }
.club-layout { background: radial-gradient(ellipse at 85% 0%, #ffe50009, transparent 45%), #080a0b; font-family: 'Bahnschrift', 'Segoe UI', sans-serif; }
.club-icon { width: 26px; height: 26px; flex: none; vertical-align: middle; }
.club-content { max-width: 1640px; padding: 0 20px 112px; min-width: 0; }
.club-header { position: relative; isolation: isolate; min-height: 220px; border: 0; border-radius: 0; margin: 0 -20px 24px; padding: 36px; overflow: hidden; background: linear-gradient(90deg, #060809d9, #080a0b15), linear-gradient(0deg, #080a0b, transparent 60%), url('stadion-oprawa.webp') center 52% / cover; }
.club-header h1 { font-family: 'Bahnschrift', 'Arial Narrow', sans-serif; font-size: clamp(2rem, 3.4vw, 3.7rem); font-weight: 750; letter-spacing: -.03em; text-shadow: 0 2px 20px #000; }
.club-header h1:focus { outline: none; }
.club-header h1 span { color: var(--accent); }
.club-header p { color: #f4f4f4; font-weight: 400; font-size: 1.1rem; margin-bottom: 8px; }
.club-header small { display: block; margin-top: 16px; text-transform: uppercase; letter-spacing: .15em; color: #d4d5d5; font-size: .75rem; }
.club-nav { z-index: 20; background: linear-gradient(#202223f5, #0b0d0efc); border-top: 1px solid #444647; box-shadow: 0 -6px 24px #0005; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); gap: 3px; }
.club-nav > button { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; min-height: 60px; color: #d0d2d2; font-size: .8rem; border-radius: 8px; }
.club-nav > button .club-icon { width: 27px; height: 27px; }
.club-nav > button[aria-current] { background: transparent; color: var(--accent); text-shadow: 0 0 18px #ffe50033; }
.club-nav > button[aria-current] .club-icon { filter: drop-shadow(0 0 8px #ffe50038); }
.club-nav-brand { display: none; }
.start-card { background: linear-gradient(125deg, #1b1d1ee8, #101213f5); border-color: #333638; box-shadow: 0 5px 16px #0002; border-radius: 14px; }
.club-layout h2 { font-weight: 700; letter-spacing: -.015em; }
.club-layout .league-save, .club-layout .primary { background: var(--accent); color: #111300; border-radius: 10px; box-shadow: 0 4px 20px #ffe5000b; }
/* WebKit otherwise keeps an oversized grid track for long fixture options. */
#club-lineup-section .league-editor,
#club-lineup-section label { grid-template-columns: minmax(0, 1fr); min-width: 0; }
#club-lineup-section select { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
#lineup-match-picker { overflow: hidden; }
.team-fixture > .match-timeline-toggle, .team-fixture > .match-timeline { grid-column: 1 / -1; }
.team-fixture > .team-fixture-date { grid-column: 1 / -1; text-align: center; margin: 0 0 8px; }
.team-fixture > .match-line { grid-column: 1 / -1; }
.team-fixture > .match-timeline-toggle { display: block; width: fit-content; justify-self: center; margin: 4px auto 0; }
.match-timeline { width: 100%; min-width: 0; padding: 12px 8px; text-align: left; background: #101314; border: 1px solid #343638; border-radius: 9px; }
.match-timeline h3 { margin: 0 0 12px; color: var(--accent); font-size: 1rem; }
.match-timeline h4 { margin: 12px 0 0; padding: 8px; background: #ffffff09; color: var(--muted); font-size: .78rem; text-align: center; text-transform: uppercase; letter-spacing: .06em; }
.match-timeline-sides, .match-timeline .match-timeline-row { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); gap: 6px; }
.match-timeline-sides { color: var(--muted); font-size: .85rem; font-weight: 600; text-align: center; }
.match-timeline-list { padding: 0; margin: 0; list-style: none; }
.match-timeline .match-timeline-row { align-items: center; min-height: 44px; border-bottom: 1px solid #ffffff0b; padding: 6px 0; font-size: .85rem; }
.match-timeline-side { min-width: 0; display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.match-timeline-side:first-child { flex-direction: row-reverse; justify-content: flex-start; text-align: right; }
.match-timeline-side small { color: var(--muted); font-size: .7rem; }
.match-timeline-minute { color: #fff; text-align: center; font-size: .78rem; font-variant-numeric: tabular-nums; }
.match-event-icon { display: inline-flex; align-items: center; justify-content: center; align-self: center; flex: 0 0 18px; min-height: 22px; font-size: 1rem; line-height: 1; transform: translateY(-1px); }
.match-timeline-assist { font-weight: 400; }
.match-assist-compact { display: none; }
@media (max-width: 600px) {
  .match-assist-full { display: none; }
  .match-assist-compact { display: inline; }
}
.match-assist-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 1em; margin-inline: 2px; vertical-align: middle; font-size: 1rem; line-height: 1; transform: translateY(-1px); }
.match-assist-icon > span { display: inline-block; transform: translateY(-5px); }
.match-event-yellow, .match-event-opponent_yellow, .match-event-red_direct, .match-event-red_second_yellow { flex-basis: 12px; min-height: 17px; height: 17px; border: 1px solid #e1b711; border-radius: 2px; background: #ffe500; }
.match-event-red_direct { background: #ec354a; border-color: #ec354a; }
.match-event-red_second_yellow { background: linear-gradient(135deg,#ffe500 49%,#ec354a 51%); border-color: #ec354a; }
.match-event-sub_in { color: #52d69a; font-weight: 800; }
.match-event-sub_out { color: #ff6c76; font-weight: 800; }
@media (max-width: 600px) { .match-timeline .match-timeline-row { font-size: .75rem; } .match-timeline-sides, .match-timeline .match-timeline-row { grid-template-columns: minmax(0, 1fr) 48px minmax(0, 1fr); gap: 4px; } }
.club-layout input, .club-layout select, .club-layout textarea { background-color: #101314; border: 1px solid #484b4d; border-radius: 9px; }
.club-layout :where(input:not([type='checkbox']):not([type='radio']), select) { min-height: 44px; }
.club-layout input:focus-visible, .club-layout select:focus-visible, .club-layout textarea:focus-visible { border-color: var(--accent); outline: 2px solid #ffe50029; outline-offset: 1px; }
.club-layout button { transition: background-color .15s, border-color .15s, color .15s; }
.club-layout button:not(:disabled):hover { filter: brightness(1.12); }
.club-layout .club-back { font-weight: 550; }
.club-layout .club-back:hover { color: #fff779; }
.club-layout .panel-tiles { gap: 16px; }
.club-layout .panel-tiles button { position: relative; min-height: 114px; background: linear-gradient(125deg, #23251a, #121515 70%); border-color: #454735; }
.club-layout .panel-tiles button .club-icon { color: var(--accent); margin: 0 auto 4px; width: 30px; height: 30px; }
.club-layout .panel-tiles button:not(:disabled):hover { border-color: var(--accent); background: linear-gradient(125deg, #33351b, #151717); }
.club-layout .substitution-dialog { background: #16191a; box-shadow: 0 24px 80px #0009; border-color: #4e5151; }
.club-layout .substitution-dialog::backdrop { background: #000b; backdrop-filter: blur(4px); }
/* Start */
.start-events .start-card { padding: 0; overflow: hidden; background: linear-gradient(#0b0d0ee8, #0b0d0e95), url('stadion-oprawa.webp') center bottom / cover; }
.start-events h2 { display: flex; align-items: center; gap: 10px; text-align: left; padding: 14px 18px; margin: 0; background: linear-gradient(90deg, #25292ac9, #131616d9); border-bottom: 1px solid #383b3b; }
.start-events h2 .club-icon, #league-heading .club-icon { color: var(--accent); }
.start-events .start-match-link > div { padding: 20px 12px 16px; }
.start-events #next-training { min-height: 145px; display: grid; place-items: center; padding: 20px; color: #f2f2f2; font-weight: 600; }
.start-events .match-line { gap: 8px; }
.start-events .match-line .team-badge { font-size: .95rem; gap: 10px; }
.start-events .match-line img { width: 72px; height: 72px; filter: drop-shadow(0 3px 8px #0006); }
.start-events .match-line strong { font-size: 1.8rem; color: #fff; }
.start-form { gap: 12px; padding: 3px 0; }
.start-form span { width: 42px; height: 42px; font-size: 1.2rem; border-radius: 7px; }
.start-form .win { background: linear-gradient(#07bd51, #008b3d); }
.start-form .loss { background: linear-gradient(#fa3040, #d31530); }
.start-balance > div + div { border-left: 1px solid #393b3b; }
.start-balance dd { color: var(--accent); font-size: 1.6rem; }
#league-heading { display: flex; align-items: center; gap: 10px; text-align: left !important; }
.league-table tbody tr:nth-child(odd):not(.club-team) td { background: #ffffff03; }
.league-table th, .league-table td { padding-block: 11px; border-bottom-color: #ffffff0b; }
.league-table .club-team td { background: #ffe50016; }
@media (min-width: 820px) {
  .team-data-table.team-league-table { background: #141718; }
  .team-league-table tbody td:first-child,
  .team-league-table tbody td:nth-child(2),
  .team-league-table thead tr:nth-child(2) th:first-child,
  .team-league-table thead tr:nth-child(2) th:nth-child(2),
  .team-league-table .team-league-spacer { background: #141718; }
  .team-league-table .team-club-highlight td:first-child,
  .team-league-table .team-club-highlight td:nth-child(2) { background: #252310; }
  .team-fixture { display: grid; grid-template-columns: minmax(0, 1fr) 10.5rem; align-items: center; gap: 4px 20px; min-height: 50px; padding: 9px 14px; }
  .team-fixture > .match-line { margin: 0; gap: 16px; grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr); }
  .team-fixture .match-line .team-badge { flex-direction: row; align-items: center; gap: 9px; font-size: .95rem; text-align: left; }
  .team-fixture .match-line .team-badge:first-child { justify-content: flex-end; text-align: right; }
  .team-fixture .match-line .team-badge:last-child { justify-content: flex-start; }
  .team-fixture .match-line img { width: 26px; height: 26px; }
  .team-fixture .match-line strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
  .team-fixture > small { margin: 0; font-size: .8rem; text-align: right; }
  .team-fixture > .team-fixture-scorers { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px 22px; max-width: none; width: 100%; padding-top: 6px; margin: 2px 0 0; font-size: .8rem; }
  .team-fixture-scorers > div { justify-content: flex-start; gap: 8px; }
  .team-fixture > .team-fixture-missing-scorers { grid-column: 1 / -1; text-align: center; font-size: .75rem; }
}
/* Individual training */
.team-standings-tabs { display: flex; gap: 4px; width: fit-content; padding: 4px; border: 1px solid #3a3e3f; border-radius: 10px; background: #101314; }
.team-standings-tabs button { padding: 9px 18px; min-height: 42px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.team-standings-tabs button[aria-pressed='true'] { background: var(--accent); color: #131500; }
.round-tabs { width: 100%; }
.round-tabs button { flex: 1; padding-inline: 8px; }
#training-round-tabs { grid-column: 1 / -1; }
.team-standings-panels { display: flex; width: 100%; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; }
.team-standings-panel { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.team-data-table.team-standings-table { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; background: transparent; }
.team-standings-table .standings-position { width: 4%; }
.team-standings-table .standings-name { width: 32%; }
.team-standings-table .standings-stat { width: 8%; }
.team-data-table.team-standings-table th, .team-data-table.team-standings-table td { text-align: center; vertical-align: middle; padding: 10px 4px; font-variant-numeric: tabular-nums; }
.team-data-table.team-standings-table th:nth-child(2), .team-data-table.team-standings-table td:nth-child(2) { text-align: left; white-space: normal; }
.team-standings-table .team-badge { display: flex; align-items: center; min-width: 0; width: 100%; gap: 8px; }
.team-standings-table .team-badge > span { min-width: 0; overflow-wrap: anywhere; }
.team-standings-table .team-badge img { width: 22px; height: 22px; }
.team-data-table.team-standings-table th:last-child, .team-data-table.team-standings-table td:last-child { color: #fff; font-weight: 700; }
.team-standings-table .team-club-highlight td:first-child { border-radius: 6px 0 0 6px; }
.team-standings-table .team-club-highlight td:last-child { border-radius: 0 6px 6px 0; }
@media (max-width: 600px) {
  #team-section:has(.team-standings-panels) { padding-inline: 8px; }
  .team-standings-tabs { width: 100%; }
  .team-standings-tabs button { flex: 1; padding-inline: 8px; font-size: .85rem; }
  .team-standings-table .standings-position { width: 5%; }
  .team-standings-table .standings-name { width: 33%; }
  .team-standings-table .standings-stat { width: 7.75%; }
  .team-data-table.team-standings-table { font-size: .75rem; }
  .team-data-table.team-standings-table th, .team-data-table.team-standings-table td { padding: 9px 1px; line-height: 1.35; }
  .team-data-table.team-standings-table thead th { font-size: .68rem; }
  .team-standings-table .team-badge { gap: 4px; font-size: .73rem; }
  .team-standings-table .team-badge img { width: 16px; height: 16px; }
}
.team-training-summary > div { align-content: center; }
.team-training-summary .team-attendance-card { gap: 14px; padding: 18px; }
.team-training-summary .team-attendance-visual { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; margin: 0; }
.team-attendance-ring { width: 112px; height: 112px; padding: 11px; border-radius: 50%; flex: none; }
.team-attendance-ring > div { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; background: #171b1c; }
.team-attendance-ring strong { color: var(--accent); font-size: 1.35rem; font-weight: 700; }
.team-attendance-legend { list-style: none; padding: 0; margin: 0; min-width: 130px; color: var(--muted); font-size: .82rem; font-weight: 400; }
.team-attendance-legend li { display: flex; align-items: center; gap: 7px; padding: 8px 0; }
.team-attendance-legend li + li { border-top: 1px solid #34393a; }
.team-attendance-legend i { display: block; width: 8px; height: 8px; flex: none; border-radius: 50%; }
.team-attendance-legend strong { margin-left: auto; color: #eceeee; font-size: .9rem; font-weight: 600; }
@media (max-width: 1000px) {
  .team-training-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-training-summary > div { display: grid; grid-template-columns: 1fr; text-align: center; }
  .team-training-summary > div:first-child { grid-row: 1; grid-column: 1; }
  .team-training-summary > div:last-child { grid-row: 1; grid-column: 2; }
  .team-training-summary .team-attendance-card { grid-row: 2; grid-column: 1 / -1; }
}
#individual-view { max-width: 1100px; }
#individual-view .club-header { margin-bottom: 0; }
.iw-main-tabs { background: #0e1112; border-bottom-color: #393c3d; margin: 0 -20px 22px; padding: 0 20px; }
.iw-main-tabs button { position: relative; padding: 21px 8px; border: 0 !important; color: #c5c6c6; font-weight: 700; }
.iw-main-tabs button[aria-pressed='true'] { color: var(--accent); }
.iw-main-tabs button[aria-pressed='true']::after { content: ''; position: absolute; height: 4px; width: 98px; max-width: 65%; background: var(--accent); border-radius: 4px 4px 0 0; bottom: 0; left: 50%; transform: translateX(-50%); }
#iw-content { gap: 16px; }
.iw-calendar { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; background: transparent; border: 0; padding: 0; box-shadow: none; }
.iw-calendar > h2 { align-self: center; margin: 0; font-size: 1.3rem; }
.iw-calendar .iw-period-bar { display: contents; }
.iw-calendar .iw-segment { grid-column: 2; grid-row: 1; }
.iw-calendar .iw-date-range { grid-column: 1 / -1; margin: 4px 0 -8px; padding: 12px 12px 8px; border: 1px solid #383b3d; border-bottom: 0; border-radius: 14px 14px 0 0; background: linear-gradient(120deg, #1c1f20, #111415); }
.iw-calendar-grid { grid-column: 1 / -1; margin-top: 0; padding: 0 12px 14px; border: 1px solid #383b3d; border-top: 0; border-radius: 0 0 14px 14px; background: linear-gradient(120deg, #1c1f20, #111415); }
.iw-date-range .club-back { display: grid; place-items: center; min-height: 34px; width: 34px; background: #252829; border: 1px solid #454849; border-radius: 8px; padding: 0; font-size: 1.4rem; }
.iw-date-range strong { font-size: .9rem; }
.iw-weekday { border-bottom: 1px solid #383b3d; padding-bottom: 8px; font-size: .75rem; }
.iw-day { min-height: 51px; border: 0; border-radius: 0; background: transparent; font-size: .9rem; }
.iw-day > span:first-child { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin: auto; }
.iw-day[aria-pressed='true'] { background: transparent; }
.iw-day[aria-pressed='true'] > span:first-child { border: 1px solid var(--accent); color: #fff; }
.iw-day.iw-today { background: transparent; }
.iw-day.iw-today > span:first-child { background: var(--accent); color: #111; font-weight: 800; border: 0; }
.iw-selected-day > h2 { font-size: 1rem; display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid #353839; }
.iw-count { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: #3a3c32; color: var(--accent); font-size: .8rem; }
.iw-selected-day .iw-history-row { min-height: 44px; border: 0; }
.iw-selected-day .iw-history-row small { display: none; }
.iw-section-heading { margin: 4px 0 -4px; }
.iw-catalog { background: linear-gradient(105deg, #27271d88, #171a1be8 65%); border-color: #3b3e3d; }
.iw-catalog summary { padding: 16px; gap: 12px; }
.iw-catalog summary::before { display: none; }
.iw-category-icon { display: grid; place-items: center; color: var(--iw-category); background: color-mix(in srgb, var(--iw-category) 9%, transparent); border: 1px solid color-mix(in srgb, var(--iw-category) 25%, transparent); width: 34px; height: 34px; border-radius: 50%; flex: none; }
.iw-category-icon .club-icon { width: 22px; height: 22px; }
.iw-catalog summary::after { color: var(--accent); font-size: 1.05rem; }
.iw-catalog details[open] summary::after { transform: rotate(180deg); }
.iw-plan-link { position: relative; background: #10131480; padding: 16px 36px 16px 62px; }
.iw-plan-link::after { content: '›'; position: absolute; right: 20px; color: var(--accent); }
.iw-plan-header { background: linear-gradient(110deg, #34311b99, #141718 75%); border-color: #454533; padding: 20px; }
.iw-plan-header > small, .iw-session-heading > small, .iw-completion > small { color: var(--accent); font-weight: 750; letter-spacing: .12em; font-size: .7rem; }
.iw-plan-header h2 { font-size: 1.6rem; }
.iw-exercise-preview { background: linear-gradient(115deg, #1b1e1f, #111415); border-color: #3a3d3e; }
.iw-exercise-preview li { padding: 16px; }
.iw-exercise-number { background: #514b1466; border: 1px solid #73651b55; }
.iw-part { font-family: 'Segoe UI', sans-serif; font-size: .65rem; line-height: 1.25; padding: 3px 5px; background: #25282a; }
.iw-exercise-preview .iw-exercise-name { font-size: .94rem; }
.iw-exercise-preview small { font-size: .84rem; }
.iw-form > .fixture-actions > .league-save:only-child { width: 100%; min-height: 52px; }
.iw-session-heading { border-bottom: 1px solid #383b3c; padding: 8px 0 16px; }
.iw-exercise-card { padding: 20px; }
.iw-exercise-card .iw-exercise-name strong { font-size: 1.15rem; }
.iw-set-form { border-top: 1px solid #383b3c; margin-top: 14px; }
.iw-set-form input { min-height: 46px; }
.iw-set-number { font-weight: 700; }
.iw-set-save, .iw-next { background: #34332270; border-color: #746927; color: var(--accent); }
.iw-saved-set { min-height: 53px; }
.iw-set-menu[open] { background: #222628; border: 1px solid #555847; border-radius: 7px; }
.iw-metrics > div { background: linear-gradient(120deg, #26281f70, #111415); border-color: #373b3d; padding-block: 17px; }
.iw-metrics dt { font-size: .8rem; }
.iw-metrics dd { font-size: 1.4rem; }
.iw-completion { border: 0; background: transparent; box-shadow: none; padding: 28px 8px; }
.iw-success-mark { box-shadow: 0 0 38px #ffe5001b; }
.iw-completion > h2 { font-size: 1.8rem; }
.iw-completion .fixture-actions { margin-top: 10px; }
.iw-completion .league-save { width: 100%; min-height: 52px; }
.iw-overview h2 { margin-bottom: 18px; }
.iw-overview { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.iw-overview > h2 { align-self: center; margin: 0; font-size: 1.05rem; }
.iw-overview > .iw-period-bar { display: contents; }
.iw-overview .iw-segment { grid-row: 1; grid-column: 2; }
.iw-overview .iw-date-range { grid-column: 1 / -1; padding-bottom: 10px; border-bottom: 1px solid #35393a; }
.iw-overview .iw-chart-row { grid-column: 1 / -1; }
.iw-overview .iw-segment button { min-height: 34px; padding: 8px 12px; font-size: .8rem; }
.iw-donut > div { background: #171a1b; }
.iw-chart-legend li { padding-block: 9px; font-size: .85rem; }
.iw-history-filter { gap: 10px; }
.iw-history-row strong { font-size: 1rem; }
.iw-person-row .iw-person-avatar { background: #61550b80; }
.iw-results-tabs { margin-bottom: 0; }
.iw-segment { background: #101314; border-color: #3a3e3f; }
.iw-segment button { font-weight: 650; }
.iw-history-list > h2 { font-size: 1.1rem; }
@media (min-width: 820px) {
  .club-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .club-nav { padding: 24px 0; gap: 4px; background: linear-gradient(#080b0af2 35%, #080b0a90), url('stadion-oprawa.webp') 10% bottom / auto 65% no-repeat, #080b0b; border-right: 1px solid #323637; box-shadow: none; }
  .club-nav-brand { display: grid; justify-items: center; gap: 8px; margin-bottom: 26px; padding: 0 12px 25px; border-bottom: 1px solid #303435; flex: none; min-height: 0; }
  .club-nav-brand img { width: 136px; height: 136px; object-fit: contain; filter: drop-shadow(0 4px 16px #0008); }
  .club-nav-brand strong { color: #fff; font-size: 1.03rem; }
  .club-nav-brand small { text-transform: uppercase; color: #b8baba; font-size: .7rem; letter-spacing: .06em; }
  .club-nav > button { flex-direction: row; justify-content: flex-start; gap: 18px; width: 100%; min-height: 64px; padding: 14px 24px; font-size: .95rem; border-radius: 0; text-align: left; }
  .club-nav > button[aria-current] { background: linear-gradient(90deg, #ffe50018, #ffe50003); border-left: 5px solid var(--accent); padding-left: 19px; }
  .club-content { padding-bottom: 40px; }
  .start-events { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .start-events .match-line img { width: clamp(48px, 5.5vw, 86px); height: clamp(48px, 5.5vw, 86px); }
  .club-layout .panel-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #individual-view .club-header::after { content: ''; position: absolute; inset: 24px 40px 24px auto; width: 145px; background: url('herby/01_ks-trzciana-2000.webp') center / contain no-repeat; filter: drop-shadow(0 4px 20px #0008); }
}
@media (max-width: 819px) {
  .club-content { padding-inline: 16px; }
  .club-header { margin-inline: -16px; min-height: 184px; padding: 140px 20px 16px; align-items: flex-end; justify-content: center; background: linear-gradient(0deg, #080a0b, #080a0b10 65%), url('stadion-oprawa.webp') center 48% / cover; }
  .club-header::before { content: ''; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 126px; height: 126px; background: url('herby/01_ks-trzciana-2000.webp') center / contain no-repeat; filter: drop-shadow(0 4px 16px #0008); }
  .club-header h1 { font-size: 1.15rem; text-align: center; letter-spacing: 0; }
  #start-view .club-header p, #start-view .club-header small { display: none; }
  #individual-view .club-header { min-height: 174px; padding: 0; }
  #individual-view .club-header h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .iw-main-tabs { margin-inline: -16px; padding-inline: 16px; }
  .iw-main-tabs button { padding-block: 18px; }
  .iw-selected-day { padding: 14px; }
  .iw-calendar .iw-segment button { padding: 8px 12px; min-height: 34px; }
  .iw-chart-row { grid-template-columns: minmax(100px, .9fr) minmax(0, 1.4fr); gap: 16px; }
  .iw-donut { width: min(100%, 144px); height: auto; aspect-ratio: 1; padding: 12px; }
  .iw-chart-legend li { font-size: .75rem; padding-block: 8px; }
  .iw-exercise-card { padding: 16px; }
  .iw-exercise-preview li { padding: 14px 12px; gap: 10px; }
  .iw-exercise-preview .iw-exercise-name { font-size: .9rem; gap: 4px 7px; }
  .iw-exercise-preview small { font-size: .8rem; }
  .iw-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .iw-completion .iw-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iw-metrics dt { font-size: .7rem; }
  .iw-metrics dd { font-size: 1.2rem; }
  #iw-content > .fixture-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #iw-content > .fixture-actions button { padding-inline: 8px; font-size: .85rem; }
  .start-events .start-match-link > div { padding-block: 14px; }
  .start-events h2 { font-size: 1.15rem; }
  .start-events #next-training { min-height: 80px; }
  .start-balance { gap: 0; }
  .start-balance dt { font-size: .75rem; }
  .start-balance dd { font-size: 1.45rem; }
}
@media (max-width: 420px) {
  .club-nav > button { font-size: .68rem; }
  .club-nav > button .club-icon { width: 24px; height: 24px; }
  .iw-calendar .iw-segment button { padding-inline: 9px; font-size: .75rem; }
  .iw-catalog summary { padding: 14px; }
  .iw-date-range strong { font-size: .78rem; }
  .iw-calendar-grid { gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { .club-layout button { transition: none; } }

/* Identical series columns in entry, editing, saved sets and history. */
#individual-view .iw-form input, #individual-view .iw-form select { font-size: 1.125rem; }
.iw-exercise-card[data-entry-kind] { --series-columns: 36px minmax(0, 1fr) minmax(0, 1fr) 90px; }
.iw-exercise-card[data-entry-kind]:not([data-entry-kind='weighted']) { --series-columns: 36px minmax(0, 1fr) 90px; }
.iw-exercise-card[data-entry-kind] .iw-set-form,
.iw-exercise-card[data-entry-kind] .iw-saved-set { display: grid; grid-template-columns: var(--series-columns); gap: 12px; width: 100%; max-width: 640px; margin-inline: auto; align-items: center; }
.iw-exercise-card[data-entry-kind] .iw-set-form { align-items: end; padding-block: 16px; }
.iw-set-form .iw-series-slot { display: grid; gap: 12px; text-align: center; }
.iw-series-slot small, .iw-set-form label { font-size: .8rem; color: var(--muted); font-weight: 400; }
.iw-series-slot .iw-set-number { display: grid; place-items: center; width: 100%; height: 46px; padding: 0; }
#individual-view .iw-set-form input { font-size: 1.25rem; font-weight: 500; color: #c5c9ca; height: 46px; min-height: 46px; margin-top: 6px; padding: 8px; }
.iw-set-form label { min-width: 0; text-align: center; }
.iw-set-form .iw-set-save { height: 46px; min-height: 46px; font-size: .85rem; padding-inline: 8px; }
.iw-exercise-card[data-entry-kind] .iw-saved-set { min-height: 50px; padding-block: 8px; font-size: 1rem; font-weight: 400; color: #bfc4c5; }
.iw-exercise-card[data-entry-kind] .iw-saved-set > span { min-width: 0; font-weight: 400; }
.iw-exercise-card[data-entry-kind] .iw-saved-set > span:first-child,
.iw-series-slot .iw-set-number { color: #eef0f0; font-size: 1rem; font-weight: 600; }
.iw-exercise-card[data-entry-kind] .iw-set-menu { width: 100%; min-width: 0; justify-self: stretch; }
.iw-exercise-card[data-entry-kind] .iw-set-menu summary { width: 100%; }
.iw-exercise-card[data-entry-kind] .iw-set-menu[open] { display: grid; grid-template-columns: 1fr; position: relative; }
.iw-exercise-card[data-entry-kind] .iw-set-menu[open] .club-back { min-height: 36px; padding: 6px 4px; font-size: .8rem; }
.iw-history-exercise[data-entry-kind] { --series-columns: 36px minmax(0, 1fr) minmax(0, 1fr); }
.iw-history-exercise[data-entry-kind]:not([data-entry-kind='weighted']) { --series-columns: 36px minmax(0, 1fr); }
@media (max-width: 480px) {
  .iw-exercise-card[data-entry-kind] { --series-columns: 24px minmax(0, 1fr) minmax(0, 1fr) 64px; }
  .iw-exercise-card[data-entry-kind]:not([data-entry-kind='weighted']) { --series-columns: 24px minmax(0, 1fr) 64px; }
  .iw-exercise-card[data-entry-kind] .iw-set-form, .iw-exercise-card[data-entry-kind] .iw-saved-set { gap: 7px; }
  .iw-set-form label { min-width: 0; font-size: .72rem; }
  .iw-series-slot small { font-size: .72rem; }
  .iw-set-form .iw-set-save { font-size: .75rem; padding-inline: 3px; }
  .iw-exercise-card[data-entry-kind] .iw-saved-set { font-size: .9rem; }
  .iw-history-exercise[data-entry-kind] { --series-columns: 24px minmax(0, 1fr) minmax(0, 1fr); }
  .iw-history-exercise[data-entry-kind]:not([data-entry-kind='weighted']) { --series-columns: 24px minmax(0, 1fr); }
}

/* Start refinements: event information comes before decorative imagery. */
.club-nav-brand img { width: 158px; height: 158px; }
#start-view .club-header::after { content: ''; position: absolute; z-index: -1; right: 12px; bottom: 8px; width: clamp(200px, 32vw, 430px); height: 135px; background: url('flaga-trzciana-bez-sylwetki.webp') right bottom / 100% auto no-repeat; mask-image: linear-gradient(90deg, transparent, #000 24%), linear-gradient(0deg, #000 65%, transparent); mask-composite: intersect; }
#start-view .start-events .start-card { position: relative; isolation: isolate; background: #111516; }
#start-view .start-events .start-card::before { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, #080b0b35, #080b0b10), var(--start-art) center bottom / cover no-repeat; filter: brightness(.8) saturate(.65); pointer-events: none; }
#start-view .start-events .start-card:nth-child(1) { --start-art: url('kafel-mecz.webp'); }
#start-view .start-events .start-card:nth-child(2) { --start-art: url('kafel-trening.webp'); }
#start-view .start-events .start-card:nth-child(3) { --start-art: url('kafel-wynik.webp'); }
.start-event-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; background: #171b1de8; border-bottom: 1px solid #353a3b; }
.start-events .start-match-link > .start-event-heading, .start-events .start-card > .start-event-heading { padding: 14px 16px; }
#start-view .start-events .start-event-heading h2 { padding: 0; margin: 0; background: transparent; border: 0; text-align: left; font-size: 1.1rem; color: var(--muted); }
.start-event-when { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: #f3f4f4; font-size: .83rem; font-weight: 500; }
.start-event-when > span { display: inline-flex; align-items: center; gap: 7px; }
.start-event-when > span + span { border-left: 1px solid #626665; padding-left: 9px; }
.start-event-when .club-icon { width: 17px; height: 17px; color: #dadcdb; }
.start-events .start-match-link > div:not(.start-event-heading) { padding: 24px 16px 16px; }
.start-match-note { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 0; margin-top: 14px; color: #bdc2c2; font-size: .88rem; font-weight: 400; }
.start-match-note > span { padding: 0 10px; }
.start-match-note > span + span { border-left: 1px solid #656a68; }
#last-match .start-match-score { display: inline-flex; align-items: center; justify-content: center; gap: clamp(8px, 1.2vw, 18px); font-size: clamp(2.5rem, 4.2vw, 4.5rem); font-weight: 750; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
#last-match .start-match-score > span:nth-child(2) { font-size: .75em; font-weight: 500; padding-bottom: .1em; }
.start-events .match-line { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; }
.start-events .start-match-vs { position: relative; isolation: isolate; font-family: 'Bahnschrift', 'Arial Narrow', sans-serif; font-size: 2.3rem; line-height: 1.4; font-weight: 750; font-style: italic; color: #fff; text-shadow: 2px 2px 2px #101413, -2px -2px 2px #101413; }
.start-match-vs::before { content: ''; position: absolute; z-index: -1; height: 58px; width: 2px; top: 50%; left: 50%; background: linear-gradient(to bottom, #ddca35 0 27%, transparent 27% 72%, #ddca35 72% 100%); clip-path: polygon(30% 0, 100% 2%, 70% 26%, 100% 75%, 55% 100%, 0 98%, 25% 73%, 0 28%); transform: translate(-50%, -50%) rotate(22deg); }
#start-view .start-form { gap: clamp(16px, 3vw, 30px); padding-block: 5px; }
#start-view .start-form span { width: 40px; height: 40px; flex: 0 0 40px; font-size: 1.2rem; border-radius: 6px; font-weight: 650; color: #f4f6f5; }
#start-view .start-form .win { background: #2c684c; box-shadow: inset 0 1px #ffffff12; }
#start-view .start-form .loss { background: #873d49; box-shadow: inset 0 1px #ffffff12; }
#start-view .start-form .draw { background: #856c39; }
#start-view .start-balance dt { font-size: clamp(.83rem, 1.25vw, 1.15rem); font-weight: 500; }
#start-view .start-balance dd { font-size: clamp(1.65rem, 2.5vw, 2.2rem); margin-top: 9px; }
.start-events #next-training { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; align-items: center; justify-items: stretch; gap: 18px 0; min-height: 144px; padding: 22px 16px; }
.start-training-detail { display: flex; align-items: center; justify-content: center; min-width: 0; gap: 9px; padding: 0 14px; font-weight: 500; font-size: 1rem; line-height: 1.5; }
.start-training-detail + .start-training-detail { border-left: 0; }
.start-training-detail:nth-child(even) { border-left: 1px solid #656a68; }
.start-training-detail .club-icon { width: 22px; height: 22px; color: #e5e8e6; }
#start-view .start-events #next-training { padding-inline: max(16px, calc((100% - 380px) / 2)); }
@media (min-width: 820px) {
  #start-view .club-header { min-height: 170px; padding-block: 28px; background-position: center, center, center 20%; }
  #start-view .club-header h1 { font-size: clamp(2rem, 3vw, 3.25rem); }
  .start-events #next-training { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: center; align-items: center; justify-items: stretch; gap: 20px 0; min-height: 164px; padding: 26px 16px; }
  .start-training-detail { justify-content: center; padding-inline: 14px; min-width: 0; overflow-wrap: anywhere; }
  .start-training-detail + .start-training-detail { border-left: 0; }
  .start-training-detail:nth-child(even) { border-left: 1px solid #656a68; }
}
@media (min-width: 820px) and (max-width: 1149px) {
  .start-events { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 819px) {
  #start-view .club-header { min-height: 194px; padding: 0; }
  #start-view .club-header::before { width: 156px; height: 156px; top: 14px; z-index: 1; }
  #start-view .club-header h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  #start-view .club-header::after { width: clamp(155px, 42vw, 340px); height: 112px; right: 4px; bottom: 4px; background-size: 100% auto; }
  #start-view .start-events .start-event-heading h2 { font-size: 1.1rem; }
  .start-event-when { font-size: .75rem; }
  .start-event-heading { gap: 10px; }
  .start-events .start-match-link > .start-event-heading, .start-events .start-card > .start-event-heading { padding: 12px 14px; }
  #last-match .start-match-score { font-size: 2.7rem; gap: 10px; }
  .start-events .start-match-vs { font-size: 2.2rem; }
  #start-view .start-form { gap: clamp(13px, 4vw, 24px); }
  #start-view .start-form span { width: 36px; height: 36px; flex-basis: 36px; }
  #start-view .start-balance dt { font-size: clamp(.72rem, 3.45vw, 1rem); }
  .start-training-detail { font-size: .9rem; padding-inline: 10px; }
  .start-training-detail .club-icon { width: 19px; height: 19px; }
}

/* Shared masthead; navigation identifies each section. Keep headings available for assistive technology and focus. */
#club-layout { --club-gutter: 20px; }
#club-layout .club-content { max-width: 1640px; }
#club-layout .club-header { display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; justify-content: stretch; gap: 0; min-height: 0; padding: 0; margin: 0 calc(-1 * var(--club-gutter)) 22px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
#club-layout .club-header::before, #club-layout .club-header::after { content: none; }
#club-layout .club-header h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; padding: 0; white-space: nowrap; }
.club-masthead { position: relative; isolation: isolate; width: 100%; height: 158px; overflow: hidden; background: linear-gradient(0deg, #080a0b, #080a0b15 60%), url('stadion-oprawa.webp') center 20% / cover; }
.club-masthead::after { content: ''; position: absolute; right: 12px; bottom: 4px; width: clamp(200px, 32vw, 430px); height: 126px; background: url('flaga-trzciana-bez-sylwetki.webp') right bottom / 100% auto no-repeat; clip-path: inset(0 0 0 45%); mask-image: linear-gradient(90deg, transparent 45%, #000 53%), linear-gradient(0deg, #000 65%, transparent); mask-composite: intersect; }
#club-layout #iw-content { width: min(100%, 1000px); margin-inline: auto; }
#club-layout .iw-main-tabs { margin-top: 0; }
#club-layout #individual-view .club-header { margin-bottom: 0; }
@media (max-width: 819px) {
  #club-layout { --club-gutter: 16px; }
  #club-layout .club-header { margin-bottom: 18px; }
  #club-layout #individual-view .club-header { margin-bottom: 0; }
  .club-masthead { height: 184px; background-position: center, center 48%; }
  .club-masthead::before { content: ''; position: absolute; z-index: 1; width: 148px; height: 148px; top: 14px; left: 50%; transform: translateX(-50%); background: url('herby/01_ks-trzciana-2000.webp') center / contain no-repeat; filter: drop-shadow(0 4px 16px #0008); }
  .club-masthead::after { width: clamp(155px, 42vw, 340px); height: 108px; right: 4px; }
}
.iw-metrics:has(> div:only-child) { grid-template-columns: minmax(0, 300px); justify-content: center; }
.iw-completion .iw-metrics:has(> div:only-child) { grid-template-columns: minmax(0, 360px); justify-content: center; width: 100%; }
.iw-plan-header { padding: 20px 24px; }
.iw-plan-header h2 { margin: 8px 0; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.iw-plan-header p { margin: 0; }
.fixture-actions > .club-back, .iw-cancel, .season-roster-card > .club-back { border: 1px solid #555945; border-radius: 10px; padding: 12px 20px; background: #191c18; min-height: 44px; }
.fixture-actions > .club-back:hover, .iw-cancel:hover { border-color: var(--accent); background: #24261a; }
/* Compact seasonal roster: number, player, position, joined date and remove. */
.season-roster-card { grid-template-columns: 20px minmax(100px, 1fr) 80px 175px 82px; align-items: center; gap: 10px; padding: 7px 12px; }
.season-roster-card::before { position: static; text-align: left; }
.season-roster-card strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.season-roster-card .season-roster-joined { display: flex; align-items: center; gap: 8px; font-size: .78rem; }
.season-roster-card input, .season-roster-card select { min-height: 40px; height: 40px; padding: 6px 8px; font-size: .85rem; }
.season-roster-card .club-back { min-height: 40px; padding: 6px 10px; font-size: .85rem; }
#training-filters { margin: 18px 0; width: fit-content; max-width: 100%; grid-template-columns: minmax(160px, 280px) minmax(200px, 320px); align-items: start; }
#training-filters select { height: 44px; padding: 8px 12px; }
#training-filters .training-history-title { grid-column: 1 / -1; margin: 0 0 2px; font-size: 1.05rem; }
@media (max-width: 600px) { #training-filters { width: 100%; grid-template-columns: minmax(0, 1fr); } }
#more-training-list { margin: 16px auto; display: block; }
#more-training-list[hidden] { display: none; }
.app-dialog { max-width: min(520px, calc(100vw - 32px)); }
.app-notice { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: #21241c; color: #fff; border: 1px solid #8b813b; border-radius: 12px; padding: 16px; z-index: 100; width: min(90vw, 620px); }
@media (max-width: 700px) {
  .season-roster-card { grid-template-columns: 18px minmax(0, 1fr) 64px 62px; gap: 5px 8px; padding: 7px 8px; }
  .season-roster-card .season-roster-joined { grid-column: 2 / -1; grid-row: 2; justify-self: start; width: 175px; }
  .season-roster-card > .club-back { grid-column: 4; grid-row: 1; }
}
.start-events #next-training { min-height: 112px; padding-block: 16px; }
#start-view .start-events .start-card:nth-child(2)::before { background: none; }
#start-view .start-events #next-training { background: linear-gradient(90deg, #080b0b75, #080b0b25), url('kafel-trening.webp') right bottom / auto 220% no-repeat, #090d0d; }
#start-view .start-events #next-training:not(:has(.start-training-detail)) { display: flex; justify-content: center; align-items: center; text-align: center; }
@media (min-width: 820px) { .start-events #next-training { min-height: 130px; padding-block: 20px; } }
@media (min-width: 1150px) {
  #start-view .start-events .start-card:has(#next-training) { display: flex; flex-direction: column; }
  #start-view .start-events .start-card:has(#next-training) > .start-event-heading { flex-shrink: 0; }
  #start-view .start-events #next-training { flex: 1; background-size: auto, auto 230%; }
}



/* A generated stadium continuation fills the sides; the original portrait stays at its original proportions. */
@media (min-width: 820px) {
  body:has(#auth-layout:not([hidden])) { background: #07111b url('stadion-logowanie-panorama.webp') center bottom / max(100vw, 202svh) auto no-repeat fixed; }
  #auth-layout { position: relative; isolation: isolate; background: transparent; }
  #auth-layout::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: #142008 url('stadion-tlo.webp') center top / 100% auto no-repeat; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
}
.personal-logout-actions { margin-top: 24px; margin-bottom: 16px; }
#personal-home #club-logout { min-width: 200px; min-height: 48px; }

#training-filters.attendance-filters { grid-template-columns: minmax(0, 280px); }

/* Constrain the intrinsic width of native date/time fields, including WebKit. */
fieldset { min-inline-size: 0; min-width: 0; max-inline-size: 100%; }
.club-layout fieldset { margin-inline: 0; }
input[type="date"], input[type="time"], input[type="datetime-local"] {
  display: block; box-sizing: border-box; inline-size: 100%; min-inline-size: 0;
  max-inline-size: 100%; -webkit-appearance: none; appearance: none;
}
input::-webkit-date-and-time-value { min-width: 0; text-align: left; }
input::-webkit-datetime-edit { min-width: 0; padding: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fitness-comparison-title { color: var(--muted); margin: 18px 0 12px; }
.fitness-comparison-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 18px 0 12px; }
.fitness-comparison-toolbar .fitness-comparison-title { margin: 0; }
.fitness-comparison-table .fitness-sorted-score { background: #ffe5000b; }
.fitness-date-sort { display: grid; align-content: center; gap: 4px; width: 100%; min-height: 44px; padding: 2px 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; cursor: pointer; }
.fitness-date-label { display: flex; align-items: center; justify-content: center; gap: 3px; white-space: nowrap; }
.fitness-sort-arrow { flex: none; color: var(--muted); }
.fitness-date-sort small { margin: 0; }
.fitness-comparison-table th[aria-sort="ascending"] .fitness-sort-arrow, .fitness-comparison-table th[aria-sort="descending"] .fitness-sort-arrow { color: var(--accent); }
.fitness-comparison-table th[aria-sort="ascending"], .fitness-comparison-table th[aria-sort="descending"] { background: #ffe5000b; }
.fitness-comparison-table { --fitness-position-width: 2.5rem; --fitness-name-width: 14rem; --fitness-result-width: 9.5rem; }
.fitness-comparison-table tr > :first-child { min-width: 0; }
.fitness-comparison-table tr > :nth-child(2) { left: var(--fitness-position-width); }
.fitness-comparison-table tbody th:nth-child(2) { white-space: normal; overflow-wrap: anywhere; }
/* Wrapping with fixed tile widths centers incomplete final rows. */
.iw-metrics { display: flex; flex-wrap: wrap; justify-content: center; width: 100%; }
.iw-metrics > div { flex: 0 1 calc((100% - 32px) / 5); min-width: min(110px, 100%); }
.iw-metrics > div:only-child { flex-basis: 300px; max-width: 100%; }
.iw-completion .iw-metrics > div:only-child { flex-basis: 360px; }
.club-layout .panel-tiles { display: flex; flex-wrap: wrap; justify-content: center; }
.club-layout .panel-tiles > button { flex: 0 1 calc((100% - 32px) / 3); min-width: 0; }
@media (max-width: 819px) {
  body:has(#auth-layout:not([hidden])) { display: block; }
  #auth-layout { width: 100%; min-height: 100svh; aspect-ratio: auto; background-size: cover; }
  #auth-layout:has(#login:not([hidden])) .stadium { height: min(99.15cqw, 48svh); }
  #auth-layout .panel { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .club-layout { --mobile-nav-space: calc(110px + env(safe-area-inset-bottom)); }
  .club-content { padding-bottom: var(--mobile-nav-space); }
  html { scroll-padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .club-layout :where(input:not([type=checkbox]):not([type=radio]), select, textarea) { font-size: 16px; }
  .iw-metrics > div { flex-basis: calc((100% - 8px) / 2); min-width: 0; }
  .club-layout .panel-tiles > button { flex-basis: 100%; }
  .start-event-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; }
  #start-view .start-events .start-event-heading h2 { font-size: clamp(.73rem, 3.45vw, 1.1rem); gap: 5px; white-space: nowrap; }
  .start-event-heading h2 .club-icon { width: 21px; height: 21px; }
  .start-event-when { flex-wrap: nowrap; white-space: nowrap; gap: 5px; font-size: clamp(.62rem, 2.55vw, .8rem); }
  .start-event-when > span { gap: 4px; }
  .start-event-when > span + span { padding-left: 5px; }
  .start-event-when .club-icon { width: 13px; height: 13px; }
  .start-events .start-match-link > .start-event-heading, .start-events .start-card > .start-event-heading { padding: 12px 10px; }
}
@media (max-width: 600px) {
  .fitness-comparison-table { --fitness-position-width: 22px; --fitness-name-width: 102px; --fitness-result-width: 76px; }
  .team-data-table.fitness-comparison-table th, .team-data-table.fitness-comparison-table td { padding: 10px 4px; font-size: .78rem; overflow-wrap: normal; }
  .fitness-comparison-table thead th:not(:nth-child(2)), .fitness-comparison-table th small { font-size: .65rem; }
  .fitness-comparison-table thead th > span { white-space: nowrap; }
  #training-editor .league-editor-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px; }
  #training-editor .league-editor-fields > label:first-of-type, #training-editor .league-editor-fields > label:last-of-type { grid-column: 1 / -1; }
  #training-editor input, #training-editor select { height: 44px; padding: 8px; }
  #training-section { padding: 12px; }
  .training-list { overflow: visible; }
  .training-table, .training-table tbody { display: block; width: 100%; }
  .training-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .training-table tbody { display: grid; gap: 10px; }
  .training-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 10px 8px; border: 1px solid #34383a; border-radius: 9px; }
  .training-table tbody th, .training-table tbody td { border: 0; padding: 0; white-space: normal; font-size: .8rem; text-align: left; overflow-wrap: anywhere; }
  .training-table tbody th { grid-area: 1 / 1; }
  .training-table tbody td:nth-child(2) { grid-area: 1 / 2; }
  .training-table tbody td:nth-child(3) { grid-area: 2 / 2; }
  .training-table tbody td:nth-child(4) { grid-area: 2 / 1; color: var(--muted); }
  .training-table tbody td:last-child { grid-area: 1 / 3 / 3 / 4; }
  .training-list .club-back { padding: 8px; border: 1px solid #555945; border-radius: 8px; font-size: .75rem; }
  .training-weekday { font-size: .7rem; }
  .round-result { gap: 4px 6px; }
  .round-result > span { font-size: .78rem; line-height: 1.3; overflow-wrap: normal; }
  .round-score { grid-template-columns: 2.25rem auto 2.25rem; gap: 2px; }
  .club-layout .round-score input { font-size: 1rem; padding: 4px 2px; }
  #season-lineup-list li, #saved-round-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; font-size: .8rem; gap: 8px; line-height: 1.4; }
}
@media (max-width: 360px) {
  .fitness-comparison-table { --fitness-position-width: 18px; --fitness-name-width: 88px; --fitness-result-width: 68px; }
  .fitness-comparison-table thead th:not(:nth-child(2)), .fitness-comparison-table th small { font-size: .59rem; }
}

@media (max-width: 600px) {
  .team-fixture .match-line .team-badge { font-size: .85rem; line-height: 1.3; overflow-wrap: normal; }
  .team-fixture > small { font-size: .73rem; }
}

/* Compact Start standings: give names the space previously reserved for padding. */
#start-view .league-scroll { padding-right: 0; scrollbar-gutter: auto; }
#start-view .league-table { font-size: 1.06rem; line-height: 1.3; }
#start-view .league-table th, #start-view .league-table td { padding: 11px 4px; }
#start-view .start-league-position { width: 26px; }
#start-view .start-league-number { width: 62px; }
#start-view .league-table .team-badge { display: flex; width: 100%; min-width: 0; gap: 5px; }
#start-view .league-table .team-badge img { width: 26px; height: 26px; }
#start-view .league-table .team-badge > span { flex: 1; min-width: 0; white-space: nowrap; overflow-wrap: normal; }
@media (max-width: 819px) {
  #start-view .league-table { font-size: 1rem; }
  #start-view .start-league-position { width: 23px; }
  #start-view .start-league-number { width: 54px; }
  #start-view .start-league-number:last-child { width: 46px; }
  #start-view .league-table .team-badge img { width: 24px; height: 24px; }
}
