
:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --dark: #0b1220;
  --dark-2: #121b2d;
  --accent: #f5b301;
  --accent-2: #2563eb;
  --ok: #166534;
  --bad: #991b1b;
  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(circle at top left, #fff7d6 0, transparent 32rem), var(--bg); color: var(--text); }
a { color: inherit; }
.header { position: sticky; top: 0; z-index: 10; background: rgba(11,18,32,.96); color: #fff; padding: 12px 22px; display:flex; justify-content:space-between; align-items:center; gap:20px; backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.08); }
.header a { color:#fff; text-decoration:none; }
.brand { display:flex; align-items:center; gap:12px; font-weight: 900; letter-spacing: -.02em; }
.brand img { width:54px; height:42px; object-fit:contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.nav { display:flex; flex-wrap:wrap; gap:7px; font-size:14px; align-items:center; }
.nav a { opacity:.92; padding:8px 10px; border-radius:999px; }
.nav a:hover { background:rgba(255,255,255,.1); }
.container { max-width: 1320px; margin: 28px auto; padding: 0 18px 48px; }
.card { background: rgba(255,255,255,.92); border: 1px solid rgba(229,231,235,.9); border-radius: 24px; padding: 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.card.tight { padding: 16px; }
.hero { display:grid; grid-template-columns: 1.1fr .9fr; gap:20px; align-items:stretch; }
.hero-main { background: linear-gradient(135deg, var(--dark), var(--dark-2)); color:#fff; border: 0; overflow:hidden; position:relative; }
.hero-main:after { content:""; position:absolute; right:-80px; top:-80px; width:240px; height:240px; border-radius:50%; background:rgba(245,179,1,.18); }
.hero-title { display:flex; gap:18px; align-items:center; position:relative; z-index:1; }
.hero-title img { width:128px; height:94px; object-fit:contain; }
h1, h2, h3 { margin-top:0; letter-spacing:-.03em; }
h1 { font-size: clamp(28px, 4vw, 46px); line-height:1.02; margin-bottom:10px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.muted { color: var(--muted); }
.hero-main .muted { color: rgba(255,255,255,.68); }
.grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(270px,1fr)); gap:20px; }
.grid-2 { display:grid; grid-template-columns: repeat(auto-fit, minmax(360px,1fr)); gap:20px; }
.dashboard-layout { display:grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr); gap:20px; align-items:start; }
.dashboard-main { display:grid; grid-template-columns: 1fr; gap:20px; }
.dashboard-side { display:grid; grid-template-columns: 1fr; gap:20px; }
.admin-rounds { display:grid; grid-template-columns: repeat(auto-fit, minmax(320px,1fr)); gap:16px; }
.admin-team-lineup { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px; border:1px solid var(--line); background:var(--surface-2); border-radius:18px; margin-bottom:10px; }
.push-button { border:1px solid rgba(255,255,255,.18); background:rgba(255,255,255,.08); color:#fff; padding:8px 10px; border-radius:999px; font-size:14px; cursor:pointer; }
.push-button:hover, .push-button.push-enabled { background:rgba(245,179,1,.22); border-color:rgba(245,179,1,.55); }
.push-button:disabled { opacity:.6; cursor:wait; }
.push-status { min-height:18px; color:var(--muted); margin:-12px 0 10px; }

@media (max-width: 980px) { .dashboard-layout, .hero, .profile-top { grid-template-columns: 1fr; } .slot { grid-template-columns: 1fr; } }
.widget { min-height: 190px; }
.widget-head { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:14px; }
.widget-title { font-size:14px; color:var(--muted); text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.team-line { display:flex; align-items:center; gap:12px; min-width:0; }
.team-line img, .team-logo-sm { width:42px; height:42px; object-fit:contain; border-radius:12px; background:#fff; padding:3px; border:1px solid var(--line); }
.team-logo-md { width:72px; height:72px; object-fit:contain; border-radius:18px; background:#fff; padding:6px; border:1px solid var(--line); }
.team-logo-lg { width:112px; height:112px; object-fit:contain; border-radius:24px; background:#fff; padding:8px; border:1px solid rgba(255,255,255,.18); }
.team-logo-profile { width:190px; height:190px; object-fit:contain; border-radius:34px; background:#fff; padding:12px; border:1px solid rgba(255,255,255,.22); box-shadow:0 18px 40px rgba(0,0,0,.22); }
.waiting-rider { border-color:#fecaca!important; background:#fff1f2!important; box-shadow:0 0 0 1px rgba(239,68,68,.12) inset; }
.waiting-rider-note { color:#991b1b; font-weight:850; font-size:12px; margin-top:4px; }
.match-incomplete-note { display:inline-flex; align-items:center; gap:6px; margin-top:0; padding:6px 10px; border-radius:999px; background:#fff7d6; border:1px solid #f2d77c; color:#5f4300; font-size:12px; font-weight:850; white-space:nowrap; max-width:100%; overflow:hidden; text-overflow:ellipsis; vertical-align:middle; }
.team-schedule-table td { vertical-align:middle; }
.team-schedule-table td.score-col { text-align:center; width:170px; white-space:nowrap; }
.team-schedule-table td.status-col { width:58px; text-align:right; }
.team-schedule-table .score-link { margin:0 auto; }
.result-pill { width:34px; height:34px; border-radius:14px; display:inline-flex; align-items:center; justify-content:center; color:#fff; font-size:13px; font-weight:950; box-shadow:0 10px 18px rgba(15,23,42,.16); border:1px solid rgba(255,255,255,.6); }
.result-win { background:linear-gradient(135deg,#22c55e,#15803d); }
.result-loss { background:linear-gradient(135deg,#ef4444,#b91c1c); }
.result-draw { background:linear-gradient(135deg,#94a3b8,#475569); }
.match-info-row { display:flex; align-items:center; gap:10px; min-width:0; }
.match-info-with-badge { display:flex; align-items:center; gap:10px; min-width:0; }
.match-info-with-badge .team-line { flex:1; min-width:0; }
.match-card { display:grid; grid-template-columns:minmax(0,1fr) 126px minmax(0,1fr); align-items:center; gap:12px; padding:14px; background:var(--surface-2); border:1px solid var(--line); border-radius:18px; margin-bottom:10px; }
.match-card .team-line { min-width:0; }
.match-card > div:nth-child(3) .team-line { justify-content:flex-end; text-align:right; }
.score { font-weight:900; font-size:22px; white-space:nowrap; padding:0 8px; text-align:center; justify-self:center; min-width:110px; }
.score-link { display:inline-flex; align-items:center; justify-content:center; min-width:96px; padding:8px 12px; border-radius:14px; background:#fff; border:1px solid var(--line); text-decoration:none; box-shadow:0 6px 14px rgba(15,23,42,.06); }
.score-link:hover { border-color:var(--accent); box-shadow:0 8px 20px rgba(245,179,1,.18); }
.aggregate-note { display:block; margin-top:4px; font-size:11px; line-height:1.2; font-weight:800; color:var(--muted); text-align:center; white-space:normal; }
.big-score-wrap { display:flex; flex-direction:column; align-items:center; gap:4px; }
.big-score-wrap .aggregate-note { color:rgba(255,255,255,.78); font-size:13px; font-weight:850; }
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align:left; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); font-weight:800; text-transform:uppercase; letter-spacing:.06em; }
tr:last-child td { border-bottom:0; }
input, select, textarea { width:100%; padding:12px 13px; border:1px solid var(--line); border-radius:14px; background:#fff; font: inherit; }
textarea { min-height: 90px; }
label { display:block; margin: 10px 0 5px; color:#273142; font-weight:700; font-size:14px; }
button, .button { display:inline-block; background:var(--dark); color:#fff; border:0; padding:11px 16px; border-radius:14px; cursor:pointer; text-decoration:none; font-weight:800; box-shadow:0 8px 18px rgba(15,23,42,.12); }
button.secondary, .button.secondary { background:#eef2f7; color:#111827; box-shadow:none; border:1px solid var(--line); }
button.gold, .button.gold { background:var(--accent); color:#111827; }
.lineup-submit { font-size:20px; padding:18px 28px; border-radius:20px; min-width:240px; box-shadow:0 16px 34px rgba(245,179,1,.28); }
.lineup-submit-wrap { margin-top:24px; padding:18px; background:linear-gradient(135deg,#fff7d6,#ffffff); border:1px solid #f2d77c; border-radius:22px; justify-content:center; }
.lineup-submit-wrap .button.secondary { align-self:center; }
.alert { padding: 13px 15px; border-radius: 16px; margin-bottom: 16px; background:#fff7d6; border:1px solid #f2d77c; }
.alert.ok { background:#dcfce7; border-color:#86efac; color:#14532d; font-weight:900; }
.alert.error { background:#fee2e2; border-color:#fecaca; color:#7f1d1d; font-weight:800; }
.error { background:#fee2e2; border-color:#fecaca; color:var(--bad); }
.ok { background:#dcfce7; border-color:#bbf7d0; color:var(--ok); }
.badge { display:inline-flex; align-items:center; gap:4px; padding:4px 9px; border:1px solid var(--line); border-radius:999px; font-size:12px; color:var(--muted); font-weight:800; background:#fff; }
.badge.dark { background:#111827; color:#fff; border-color:#111827; }
.badge.gold-badge { background:var(--accent); color:#111827; border-color:rgba(245,179,1,.72); }
.actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.small { font-size:13px; }

.period-tabs { display:flex; flex-wrap:wrap; gap:10px; margin:12px 0 20px; }
.period-tabs a { text-decoration:none; }
.period-tabs .active { background:var(--dark); color:#fff; border-color:var(--dark); }
.zz-team-card { border:1px solid var(--line); background:var(--surface-2); border-radius:18px; padding:16px; margin-bottom:14px; }
.zz-team-head { display:flex; align-items:center; gap:12px; margin-bottom:12px; font-weight:900; }
.medal-counts { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:12px 0; }
.medal-count { background:var(--surface-2); border:1px solid var(--line); border-radius:18px; padding:14px; text-align:center; }
.medal-count .emoji { font-size:32px; display:block; }
.position-timeline { display:grid; grid-template-columns: repeat(auto-fit, minmax(110px,1fr)); gap:12px; }
.season-place-tile { background:linear-gradient(180deg,#fff,#f8fafc); border:1px solid var(--line); border-radius:20px; padding:14px; text-align:center; position:relative; overflow:hidden; }
.season-place-tile:before { content:""; position:absolute; left:0; top:0; right:0; height:5px; background:var(--accent); }
.season-place-tile .place-no { font-size:30px; font-weight:950; color:var(--dark); line-height:1; }
.season-place-tile .season-year { color:var(--muted); font-weight:800; font-size:12px; margin-top:7px; }
.season-place-tile.gold:before { background:#f5b301; }
.season-place-tile.silver:before { background:#cbd5e1; }
.season-place-tile.bronze:before { background:#d97706; }
.team-corner-badges { position:absolute; right:22px; top:22px; z-index:2; display:flex; flex-direction:column; gap:10px; align-items:flex-end; }
.team-corner-badges .position-pill { background:#fff; color:#111827; box-shadow:0 12px 28px rgba(0,0,0,.18); }
.prev-medal-badge { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:rgba(255,255,255,.95); color:#111827; font-weight:900; box-shadow:0 12px 28px rgba(0,0,0,.16); }
.prev-medal-badge .medal-icon { font-size:22px; }
.archive-season-card { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.archive-buttons { display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; }
.regulation-text { line-height:1.55; color:#1f2937; }

.position-line-chart { position:relative; height:280px; padding:28px 24px 54px; border:1px solid var(--line); border-radius:24px; background:linear-gradient(180deg,#fff,#f8fafc); overflow:hidden; }
.position-line-chart svg { width:100%; height:185px; display:block; overflow:visible; }
.position-line-chart .axis-labels { position:absolute; left:24px; right:24px; bottom:18px; display:flex; justify-content:space-between; gap:8px; color:var(--muted); font-weight:900; font-size:12px; }
.position-line-chart .chart-point { fill:var(--accent); stroke:#111827; stroke-width:2; }
.position-line-chart .chart-line { fill:none; stroke:var(--accent); stroke-width:2.2; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 4px 8px rgba(245,179,1,.16)); }
.position-line-chart .place-tag { position:absolute; transform:translate(-50%,-50%); background:#111827; color:#fff; border-radius:999px; min-width:38px; height:38px; display:flex; align-items:center; justify-content:center; font-weight:950; font-size:14px; border:3px solid #fff; box-shadow:0 10px 22px rgba(15,23,42,.24); z-index:2; }
.position-line-chart .chart-note { position:absolute; left:24px; top:18px; color:var(--muted); font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.06em; }
select optgroup { font-weight:900; color:#111827; }


.login { max-width: 430px; margin:70px auto; }
.password-box { max-width:560px; margin:70px auto; }
.rider-points { min-width:76px; text-align:right; color:var(--gold); }
.rider-points strong { display:block; font-size:1.25rem; line-height:1; }
.rider-points span { display:block; font-size:.72rem; color:var(--muted); margin-top:3px; }
.rider-card { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 14px; background:var(--surface-2); border:1px solid var(--line); border-radius:16px; margin-bottom:10px; }
.rider-main { min-width:0; }
.rider-name { font-weight:850; }
.rider-meta { color:var(--muted); font-size:13px; margin-top:2px; }
.roster-columns { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap:18px; }
.lineup-grid { display:grid; grid-template-columns: 1fr; gap:16px; max-width: 860px; }
.slot { background:var(--surface-2); border:1px solid var(--line); border-radius:22px; padding:18px; display:grid; grid-template-columns: 110px 1fr; gap:18px; align-items:center; }
.slot:hover { border-color:#cbd5e1; box-shadow:0 10px 24px rgba(15,23,42,.06); }
.slot select { min-height:58px; font-size:17px; font-weight:750; border-radius:18px; padding:15px 16px; }
.selected-preview { margin-top:8px; min-height:24px; color:var(--muted); font-size:13px; font-weight:800; display:flex; align-items:center; gap:6px; }
.slot-num { display:flex; flex-direction:column; gap:4px; color:var(--muted); font-size:12px; text-transform:uppercase; font-weight:900; letter-spacing:.08em; margin-bottom:0; }
.slot-num strong { color:var(--text); font-size:30px; letter-spacing:-.04em; line-height:1; }
.lineup-note { max-width:860px; background:#fff7d6; border:1px solid #f2d77c; border-radius:18px; padding:13px 15px; margin:0 0 16px; color:#5f4300; }
.kpi { font-size:32px; font-weight:950; letter-spacing:-.05em; }

.profile-hero { position:relative; overflow:hidden; min-height:280px; background: radial-gradient(circle at 80% 12%, rgba(245,179,1,.28), transparent 24rem), radial-gradient(circle at 8% 90%, rgba(37,99,235,.16), transparent 22rem), linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 58%, #1f2937 100%); color:#fff; border:0; }
.profile-hero:after { content:""; position:absolute; right:-90px; bottom:-110px; width:300px; height:300px; border-radius:50%; background:rgba(245,179,1,.13); }
.profile-hero:before { content:""; position:absolute; inset:0; background:linear-gradient(90deg, rgba(245,179,1,.09), transparent 42%); pointer-events:none; }
.profile-hero .muted { color:rgba(255,255,255,.74); }
.profile-top { display:grid; grid-template-columns: 1fr 260px; gap:20px; align-items:center; position:relative; z-index:1; }
.profile-avatar { width:230px; height:230px; border-radius:40px; background:rgba(255,255,255,.10); border:1px solid rgba(255,255,255,.18); display:flex; align-items:center; justify-content:center; font-size:92px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.profile-name { font-size: clamp(34px, 5vw, 62px); text-transform:uppercase; font-style:italic; font-weight:950; letter-spacing:-.05em; margin:0 0 14px; }
.profile-tags { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
.profile-info-link { display:block; color:inherit; text-decoration:none; padding:4px 0; border:0; border-radius:0; background:transparent; min-height:auto; }
.profile-info-link:hover strong { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.profile-info-link strong { color:#fff; transition:color .12s ease; }
.profile-info-link .small:after { content:''; }
.profile-info-link .profile-inline-link { color:#fff; text-decoration:none; }
.profile-info-link .profile-inline-link:hover { color:var(--accent); text-decoration:underline; text-underline-offset:3px; }
.stat-strip { display:grid; grid-template-columns:repeat(4,1fr); background:#fff; border-radius:24px; overflow:hidden; box-shadow:var(--shadow); margin-top:-8px; position:relative; z-index:2; }
.stat-strip > div { padding:20px; border-right:1px solid var(--line); text-align:center; }
.stat-strip > div:last-child { border-right:0; }
.stat-number { color:var(--dark); font-size:32px; font-weight:950; font-style:italic; letter-spacing:-.05em; }
.stat-label { color:var(--muted); font-size:12px; font-weight:900; text-transform:uppercase; letter-spacing:.07em; }
.profile-layout { display:grid; grid-template-columns:minmax(280px,.9fr) minmax(360px,1.1fr); gap:22px; align-items:start; }
.chart-card { background:linear-gradient(135deg, var(--dark), var(--dark-2)); color:#fff; border:0; position:relative; overflow:hidden; }
.chart-card:after { content:""; position:absolute; right:-50px; top:-60px; width:160px; height:160px; border-radius:50%; background:rgba(245,179,1,.16); }
.chart-card > * { position:relative; z-index:1; }
.chart-card .muted { color:rgba(255,255,255,.72); }
.bar-chart { display:flex; align-items:end; gap:9px; height:180px; padding:16px 6px 0; border-bottom:1px solid rgba(255,255,255,.18); }
.bar { flex:1; min-width:9px; background:linear-gradient(180deg, var(--accent), #d99500); border-radius:8px 8px 0 0; position:relative; box-shadow:0 8px 18px rgba(245,179,1,.18); }
.bar.empty { background:rgba(255,255,255,.14); height:8px!important; }
.bar span { position:absolute; top:-20px; left:50%; transform:translateX(-50%); font-size:11px; font-weight:900; color:#fff; }
.round-labels { display:flex; gap:9px; padding-top:8px; color:rgba(255,255,255,.7); font-size:11px; }
.round-labels span { flex:1; text-align:center; }
.info-table td:first-child { color:var(--muted); font-weight:800; }
.rider-link { text-decoration:none; }
.rider-link:hover .rider-name { color:var(--dark); }
@media (max-width: 900px) { .profile-top, .profile-layout, .stat-strip { grid-template-columns:1fr; } .profile-avatar { width:160px; height:160px; font-size:66px; } .stat-strip > div { border-right:0; border-bottom:1px solid var(--line); } }


.sgp-logo { height:18px; width:auto; vertical-align:-3px; margin-left:6px; display:inline-block; }
.sgp-logo-lg { height:28px; width:auto; vertical-align:-6px; margin-left:8px; display:inline-block; filter: drop-shadow(0 6px 10px rgba(0,0,0,.18)); }
.zz-toggle { display:none; margin-top:10px; color:#5f4300; font-weight:900; }
.zz-toggle input { width:auto; margin-right:8px; }
.zz-inline-panel { grid-column:1 / -1; display:none; border:1px dashed rgba(245,179,1,.9); background:#fffaf0; border-radius:18px; padding:14px; margin-top:10px; }
.zz-inline-panel.active { display:block; }
.zz-inline-panel .grid { gap:12px; }
.zz-chip { display:inline-flex; align-items:center; gap:8px; background:#fff7d6; border:1px solid #f2d77c; color:#5f4300; padding:7px 10px; border-radius:999px; font-weight:850; font-size:13px; }
.slot.is-zz { border-color:rgba(245,179,1,.95); background:linear-gradient(180deg,#fffaf0,#fff); }

.deadline-box { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px; border:1px solid var(--line); background:var(--surface-2); border-radius:18px; margin:12px 0; flex-wrap:wrap; }
.deadline-box.important { border:2px solid #f5b301; background:linear-gradient(135deg,#fff4bf,#ffffff); box-shadow:0 14px 30px rgba(245,179,1,.16); }
.deadline-box .deadline-main { font-size:20px; font-weight:950; color:#111827; }
.schedule-deadline { margin:10px 0 14px; padding:12px 14px; border:1px solid #f2d77c; background:#fff7d6; border-radius:16px; color:#5f4300; font-weight:800; }
.change-list { display:grid; gap:12px; }
.change-card { border:1px solid var(--line); background:var(--surface-2); border-radius:18px; padding:14px; }
.status-pending { background:#fff7d6; color:#6b4e00; }
.status-approved { background:#dcfce7; color:#166534; }
.status-rejected { background:#fee2e2; color:#991b1b; }
.zz-box { border:1px dashed rgba(245,179,1,.8); background:#fffaf0; border-radius:18px; padding:16px; margin-top:16px; }
.zz-mini-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:12px; }
.zz-mini { background:var(--surface-2); border:1px solid var(--line); border-radius:18px; padding:14px; }
.history-list { display:grid; gap:10px; }
.history-item { display:flex; justify-content:space-between; align-items:center; gap:12px; background:var(--surface-2); border:1px solid var(--line); border-radius:16px; padding:12px 14px; }
.inline-form { display:inline-flex; gap:8px; align-items:center; flex-wrap:wrap; }

.score-link { color:var(--text); text-decoration:none; display:inline-flex; align-items:center; justify-content:center; min-width:88px; padding:8px 12px; border-radius:14px; background:#fff; border:1px solid var(--line); box-shadow:0 8px 18px rgba(15,23,42,.05); transition:.15s ease; }
.score-link:hover { border-color:rgba(245,179,1,.85); box-shadow:0 14px 28px rgba(15,23,42,.12); transform:translateY(-1px); }
.position-pill { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:12px; background:var(--accent); color:#111827; font-weight:950; box-shadow:0 8px 18px rgba(245,179,1,.22); }
.form-row { display:flex; gap:7px; align-items:center; flex-wrap:wrap; }
.form-dot { width:28px; height:28px; border-radius:10px; display:inline-flex; align-items:center; justify-content:center; color:#fff; font-size:12px; font-weight:950; box-shadow:0 8px 16px rgba(15,23,42,.12); }
.form-win { background:#16a34a; }
.form-loss { background:#dc2626; }
.big-submit { font-size:18px; padding:16px 28px; border-radius:18px; box-shadow:0 18px 32px rgba(245,179,1,.28); }
.top-rider-stack { display:grid; grid-template-columns:1fr; gap:12px; }
.top-rider-card { border:1px solid var(--line); background:var(--surface-2); border-radius:18px; padding:14px; display:grid; grid-template-columns:46px 1fr auto; align-items:center; gap:12px; min-height:76px; }
.top-rider-card.leader { background:linear-gradient(135deg,#0b1220,#172033); color:#fff; border-color:#0b1220; padding:22px; min-height:136px; box-shadow:0 18px 42px rgba(15,23,42,.18); }
.top-rider-card.leader .rider-link strong { font-size:26px; line-height:1.05; letter-spacing:-.04em; }
.top-rider-card.leader .stat-number { color:#fff7d6; font-size:40px; text-shadow:0 2px 14px rgba(245,179,1,.25); }
.top-rider-card.leader .stat-label { color:#fde68a; }
.top-rider-card.leader .rider-meta, .top-rider-card.leader .muted { color:rgba(255,255,255,.72); }
.top-rider-card .rank { width:42px; height:42px; border-radius:14px; display:flex; align-items:center; justify-content:center; background:var(--accent); color:#111827; font-weight:950; }
.position-pill { display:inline-flex; align-items:center; justify-content:center; min-width:40px; height:32px; padding:0 10px; border-radius:999px; background:var(--accent); color:#111827; font-weight:950; }
.medal-strip { display:flex; gap:8px; flex-wrap:wrap; }
.medal { width:36px; height:36px; border-radius:999px; display:flex; align-items:center; justify-content:center; background:#f8fafc; border:1px solid var(--line); font-weight:950; }
.medal.gold { background:#fef3c7; }
.medal.silver { background:#e5e7eb; }
.medal.bronze { background:#fed7aa; }

.form-draw { background:#64748b; }
.match-hero-grid { display:grid; grid-template-columns:1fr auto 1fr; gap:18px; align-items:center; }
.match-team-panel { display:flex; align-items:center; gap:14px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); border-radius:22px; padding:16px; min-height:128px; }
.match-team-panel.away { justify-content:flex-end; text-align:right; }
.big-score { font-size:clamp(34px,6vw,68px); font-weight:950; letter-spacing:-.06em; white-space:nowrap; text-align:center; }
.match-hero-grid > div:nth-child(2) { text-align:center; }
.lineup-score-card { display:grid; gap:10px; }
.lineup-row { display:grid; grid-template-columns:42px 1fr auto; gap:12px; align-items:center; padding:12px 14px; border:1px solid var(--line); background:var(--surface-2); border-radius:16px; }
.lineup-row .points { font-weight:950; font-size:18px; }
.zz-subline { grid-column:2 / -1; color:var(--muted); font-size:13px; }
.history-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

/* v6.0 visual refinements */
.form-row.form-row-modern { gap:12px; }
.form-row-modern .form-dot { width:42px; height:42px; border-radius:15px; font-size:16px; letter-spacing:.02em; box-shadow:0 14px 26px rgba(15,23,42,.18); }
.result-pill { width:42px !important; height:42px !important; border-radius:16px !important; font-size:16px !important; letter-spacing:.02em; box-shadow:0 14px 26px rgba(15,23,42,.18) !important; }
.status-col { text-align:right; }
.match-incomplete-note { display:flex !important; justify-content:center; width:fit-content; max-width:min(360px,100%); margin:8px auto 0 !important; text-align:center; }
.team-schedule-table td.score-col { text-align:center !important; min-width:210px; }
.team-schedule-table td.status-col { width:64px; text-align:right !important; }
.stats-rank { width:42px; text-align:center; color:var(--muted); font-weight:950; }
.junior-tag { display:inline-flex; align-items:center; justify-content:center; margin-left:8px; padding:3px 8px; border-radius:999px; background:#dcfce7; color:#166534; border:1px solid #bbf7d0; font-size:11px; font-weight:950; text-transform:uppercase; letter-spacing:.04em; }
.rider-link.is-junior strong { color:#15803d; }
.rider-link.is-junior:hover strong { color:#166534; text-decoration:underline; text-underline-offset:3px; }



/* v7.5 production layout fixes */
.lineup-score-card { gap:8px; }
.lineup-row { padding:10px 12px; grid-template-columns:38px minmax(0,1fr) auto; }
.lineup-row.waiting-rider { border-color:#fecaca!important; background:linear-gradient(90deg,#fff1f2,#fff7f7)!important; }
.waiting-rider-note { display:inline-flex; align-items:center; max-width:100%; margin-top:3px; padding:3px 8px; border-radius:999px; background:#fee2e2; border:1px solid #fecaca; color:#991b1b; font-size:11px; font-weight:900; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.match-incomplete-note { max-width:min(560px,100%) !important; white-space:nowrap !important; overflow:hidden !important; text-overflow:ellipsis !important; }
.match-card .match-incomplete-note, .incomplete-note-wrap .match-incomplete-note { justify-self:center; margin-left:auto!important; margin-right:auto!important; }
.match-hero-grid .match-incomplete-note { margin-top:10px!important; }
.team-schedule-table .incomplete-note-wrap { display:flex; justify-content:center; min-width:0; }
/* v6.1 refinements */
.sgp-logo-pill { display:inline-flex; align-items:center; justify-content:center; padding:2px 6px; margin-left:6px; border-radius:999px; background:#111827; border:1px solid rgba(15,23,42,.12); vertical-align:-5px; box-shadow:0 6px 12px rgba(15,23,42,.10); }
.sgp-logo-pill .sgp-logo { margin:0; height:16px; }
.sgp-logo-light { filter:none; margin-left:6px; height:26px; vertical-align:-6px; }
.badge.gold-badge .sgp-logo-light { height:24px; }
.match-card .match-incomplete-note { grid-column:1 / -1; justify-self:center; margin:8px auto 0 !important; }
.schedule-incomplete-centered { display:flex; justify-content:center; grid-column:1 / -1; }
.team-form-hero { margin-top:18px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; position:relative; z-index:1; }
.team-form-hero .widget-title { color:rgba(255,255,255,.70); margin-right:2px; }
.team-form-hero .form-row-modern .form-dot { width:54px; height:54px; border-radius:20px; font-size:20px; border:1px solid rgba(255,255,255,.42); box-shadow:0 18px 34px rgba(0,0,0,.24); }
.form-row-modern .form-dot { width:48px; height:48px; border-radius:18px; font-size:18px; }
.profile-two-widgets { display:grid; grid-template-columns:minmax(320px,.9fr) minmax(380px,1.1fr); gap:22px; align-items:start; margin-top:22px; }
.profile-history-wide { margin-top:22px; }
.profile-two-widgets .chart-card { min-height:100%; }
@media (max-width:900px){ .profile-two-widgets { grid-template-columns:1fr; } }

@media (max-width:900px){ .match-hero-grid { grid-template-columns:1fr; } .match-team-panel.away { justify-content:flex-start; text-align:left; } .big-score { text-align:left; } }

@media (max-width: 820px) { .hero { grid-template-columns:1fr; } .header { align-items:flex-start; flex-direction:column; } .score { font-size:18px; } .slot { grid-template-columns:1fr; gap:10px; } .slot-num { flex-direction:row; align-items:center; justify-content:space-between; } }

/* v9.0 mobile and PWA polish */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-width: 0; overflow-x: hidden; padding-bottom: env(safe-area-inset-bottom); }
img, svg { max-width: 100%; }
button, .button, input, select, textarea { min-height: 44px; }
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 720px) {
  body { background: linear-gradient(180deg,#fff7d6 0,#f3f5f8 260px); }
  .header { padding: calc(10px + env(safe-area-inset-top)) 12px 10px; gap:10px; position: sticky; top:0; align-items:stretch; }
  .brand { width:100%; gap:10px; font-size:15px; line-height:1.1; }
  .brand img { width:44px; height:34px; flex:0 0 auto; }
  .brand span { display:block; max-width: calc(100vw - 90px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .nav { width:100%; display:flex; flex-wrap:nowrap; gap:8px; overflow-x:auto; overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch; padding:4px 2px 2px; scrollbar-width:none; }
  .nav::-webkit-scrollbar { display:none; }
  .nav a { flex:0 0 auto; padding:9px 12px; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.08); font-size:13px; }
  .container { margin:16px auto; padding:0 10px 88px; width:100%; }
  .card { border-radius:18px; padding:15px; margin-bottom:14px; box-shadow:0 10px 28px rgba(15,23,42,.07); }
  .card.tight { padding:12px; }
  h1 { font-size:30px; line-height:1.05; }
  h2 { font-size:20px; }
  h3 { font-size:16px; }
  .hero, .dashboard-layout, .dashboard-main, .dashboard-side, .profile-top, .grid, .grid-2, .admin-rounds, .roster-columns, .lineup-grid, .profile-two-widgets { grid-template-columns:1fr !important; gap:14px; }
  .hero-title { align-items:flex-start; gap:12px; }
  .hero-title img, .team-logo-lg { width:74px; height:74px; border-radius:18px; }
  .widget-head { align-items:flex-start; gap:10px; flex-direction:column; }
  .actions, .inline-form, .period-tabs { gap:8px; }
  .actions .button, .actions button, .period-tabs .button, .inline-form .button, .inline-form button { flex:1 1 auto; text-align:center; }
  .button, button { width:auto; max-width:100%; padding:11px 13px; }
  .lineup-submit { width:100%; min-width:0; font-size:18px; }
  input, select, textarea { font-size:16px; }
  table { font-size:13px; min-width:620px; }
  .card > table, .widget > table, .team-schedule-table, .info-table { display:block; overflow-x:auto; -webkit-overflow-scrolling:touch; white-space:nowrap; }
  .match-card { grid-template-columns:1fr; gap:10px; padding:12px; text-align:left; }
  .match-card > div:nth-child(3) .team-line { justify-content:flex-start; text-align:left; }
  .match-card .score, .score { justify-self:flex-start; text-align:left; min-width:0; padding:0; font-size:20px; }
  .score-link { min-width:86px; padding:8px 10px; }
  .aggregate-note { text-align:left; font-size:11px; }
  .match-hero-grid { grid-template-columns:1fr !important; gap:12px; }
  .match-team-panel, .match-team-panel.away { justify-content:flex-start; text-align:left; min-height:auto; padding:12px; }
  .big-score-wrap { align-items:flex-start; }
  .big-score { text-align:left; font-size:42px; white-space:normal; }
  .lineup-row { grid-template-columns:34px minmax(0,1fr) auto; gap:8px; padding:10px; }
  .lineup-row .points { font-size:16px; }
  .team-line { gap:9px; }
  .team-line img, .team-logo-sm { width:34px; height:34px; border-radius:10px; }
  .team-logo-md { width:54px; height:54px; border-radius:15px; }
  .team-logo-profile { width:130px; height:130px; border-radius:26px; }
  .result-pill { width:34px !important; height:34px !important; border-radius:13px !important; font-size:13px !important; }
  .deadline-box, .deadline-box.important { align-items:flex-start; flex-direction:column; gap:8px; padding:12px; }
  .deadline-box .deadline-main { font-size:18px; }
  .schedule-deadline { font-size:13px; padding:10px 12px; }
  .top-rider-card { grid-template-columns:38px minmax(0,1fr); }
  .top-rider-card .stat-number, .top-rider-card .stat-label { grid-column:2; }
  .top-rider-card.leader .rider-link strong { font-size:21px; }
  .top-rider-card.leader .stat-number { font-size:30px; }
  .medal-counts { grid-template-columns:1fr; }
}

@media (max-width: 430px) {
  .container { padding-left:8px; padding-right:8px; }
  .card { padding:13px; border-radius:16px; }
  .hero-title { flex-direction:column; }
  .hero-title img, .team-logo-lg { width:68px; height:68px; }
  .team-form-hero .form-row-modern .form-dot, .form-row-modern .form-dot { width:40px; height:40px; border-radius:15px; font-size:15px; }
  .small { font-size:12px; }
  .badge { font-size:11px; padding:4px 7px; }
}

/* v9.2 compact smartphone layout */
@media (max-width: 720px) {
  .container { padding-left: 7px; padding-right: 7px; }
  .card { padding: 11px; border-radius: 15px; margin-bottom: 11px; }
  .card.tight { padding: 9px; }
  .widget { min-height: 0; }
  .widget-head { margin-bottom: 9px; }

  /* Compact tables instead of desktop-width columns */
  table { min-width: 0 !important; width: 100% !important; font-size: 11.5px; line-height: 1.2; table-layout: auto; }
  th, td { padding: 6px 4px; }
  th { font-size: 9.5px; letter-spacing: .035em; }
  .card > table, .widget > table, .team-schedule-table, .info-table { white-space: normal !important; }
  .table-scroll { overflow-x: auto; }
  .table-scroll table { min-width: 0 !important; }

  /* Schedule and team tables */
  .team-schedule-table td.score-col { width: 96px !important; min-width: 96px !important; padding-left: 2px; padding-right: 2px; }
  .team-schedule-table td.status-col { width: 36px !important; min-width: 36px !important; padding-left: 2px; padding-right: 2px; }
  .score-link { min-width: 64px; padding: 6px 7px; border-radius: 11px; font-size: 12px; }
  .aggregate-note { margin-top: 2px; font-size: 9.5px; line-height: 1.12; }
  .match-incomplete-note { font-size: 10px; padding: 5px 7px; white-space: normal !important; }

  /* Smaller team/rider identity cells so columns fit on phones */
  .team-line { gap: 6px; }
  .team-line img, .team-logo-sm { width: 26px; height: 26px; border-radius: 8px; padding: 2px; }
  .team-logo-md { width: 44px; height: 44px; border-radius: 12px; padding: 4px; }
  .team-line strong, .rider-link strong { font-size: 12px; line-height: 1.15; }
  .team-line .muted, .rider-link .muted, td .muted { font-size: 10.5px; line-height: 1.15; }
  .badge { font-size: 10px; padding: 3px 6px; }
  .small { font-size: 11px; }

  /* Match cards should feel like mobile cards, not squeezed desktop rows */
  .match-card { padding: 10px; border-radius: 14px; gap: 7px; }
  .match-card .score, .score { font-size: 17px; }
  .result-pill { width: 28px !important; height: 28px !important; border-radius: 10px !important; font-size: 11px !important; }

  /* Forms and lineup lists */
  .lineup-row { grid-template-columns: 30px minmax(0,1fr) auto; padding: 8px; gap: 6px; border-radius: 13px; }
  .lineup-row .points { font-size: 14px; }
  .form-row-modern .form-dot { width: 34px; height: 34px; border-radius: 12px; font-size: 13px; }
  input, select, textarea { padding: 10px 11px; border-radius: 12px; }
  button, .button { padding: 10px 11px; border-radius: 12px; }
}

@media (max-width: 430px) {
  .container { padding-left: 5px; padding-right: 5px; }
  .card { padding: 9px; border-radius: 14px; }
  table { font-size: 10.8px; }
  th, td { padding: 5px 3px; }
  th { font-size: 9px; }
  .team-schedule-table td.score-col { width: 86px !important; min-width: 86px !important; }
  .team-schedule-table td.status-col { width: 30px !important; min-width: 30px !important; }
  .team-line img, .team-logo-sm { width: 24px; height: 24px; }
  .team-line strong, .rider-link strong { font-size: 11.5px; }
  .score-link { min-width: 58px; padding: 5px 6px; font-size: 11px; }
  .aggregate-note { font-size: 9px; }
}


/* v9.2 targeted mobile fix from screenshots */
@media (max-width: 720px) {
  body { font-size: 16px; }
  .container { padding-left: 10px; padding-right: 10px; padding-bottom: 96px; }
  .header { padding: 12px 12px; gap: 12px; }
  .brand { gap: 10px; font-size: 13px; line-height: 1.05; max-width: 58%; }
  .brand img { width: 74px; height: 56px; }
  .nav { display: grid; grid-template-columns: 1fr; width: 100%; gap: 9px; padding-top: 8px; }
  .nav a, .push-button { width: 100%; text-align: center; justify-content: center; padding: 13px 14px; border-radius: 15px; font-size: 16px; font-weight: 850; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); }
  .card { padding: 16px; border-radius: 19px; margin-bottom: 16px; }
  .widget-title { font-size: 15px; letter-spacing: .075em; }
  h1 { font-size: 31px; }
  h2 { font-size: 25px; }
  h3 { font-size: 19px; }
  .button, button { font-size: 16px; padding: 13px 15px; border-radius: 15px; min-height: 48px; }

  /* 1. dashboard team tile */
  .team-summary-card { min-height: 138px; display: flex; align-items: center; }
  .team-summary-card .widget-head { width: 100%; flex-direction: row !important; align-items: center !important; justify-content: space-between; gap: 16px; margin: 0; }
  .team-summary-card h2 { margin: 3px 0 0; font-size: 25px; }
  .team-summary-card .team-logo-lg { width: 92px; height: 92px; border-radius: 22px; flex: 0 0 auto; }

  /* 2 and 4. dashboard tables should fill phone width */
  .dashboard-main .card table { font-size: 15px; line-height: 1.25; }
  .dashboard-main .card th { font-size: 12px; }
  .dashboard-main .card td, .dashboard-main .card th { padding: 10px 6px; }
  .dashboard-main .team-line { gap: 9px; }
  .dashboard-main .team-line img, .dashboard-main .team-logo-sm { width: 36px; height: 36px; border-radius: 10px; }
  .dashboard-main .team-line span { font-size: 15px; font-weight: 850; }

  /* 3. top riders one-line cards */
  .top-rider-card, .top-rider-card.leader { grid-template-columns: 48px minmax(0,1fr) auto !important; gap: 10px; padding: 14px 12px; min-height: 86px; }
  .top-rider-card.leader { min-height: 104px; }
  .top-rider-card .rank { width: 46px; height: 46px; border-radius: 15px; font-size: 18px; }
  .top-rider-card .stat-number, .top-rider-card .stat-label { grid-column: auto !important; text-align: right; }
  .top-rider-card .stat-number { font-size: 31px; line-height: 1; display: block; }
  .top-rider-card.leader .stat-number { font-size: 38px; }
  .top-rider-card .rider-link { display: flex; align-items: center; min-width: 0; gap: 4px; flex-wrap: nowrap; }
  .top-rider-card .rider-link strong { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .top-rider-card.leader .rider-link strong { font-size: 20px; }
  .top-rider-card .rider-meta { font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sgp-logo-pill .sgp-logo { height: 17px; }

  /* 5 and 10. match cards in one line with full names */
  .match-card { grid-template-columns: minmax(0,1fr) 86px minmax(0,1fr) !important; align-items: center; gap: 8px; padding: 13px 10px; text-align: center; }
  .match-card > div:first-child, .match-card > div:nth-child(3) { min-width: 0; }
  .match-card .team-line { flex-direction: column; justify-content: center; gap: 7px; text-align: center; width: 100%; }
  .match-card .team-line img, .match-card .team-logo-sm { width: 48px; height: 48px; border-radius: 13px; }
  .match-card .team-line span { font-size: 15px; font-weight: 850; line-height: 1.12; white-space: normal; overflow-wrap: anywhere; }
  .match-card .score, .score { justify-self: center; text-align: center; font-size: 17px; }
  .match-card .score-link, .score-link { min-width: 72px; padding: 8px 8px; border-radius: 14px; background: #fff !important; color: var(--text) !important; }
  .match-card .widget-title { text-align: left; margin-bottom: 6px; }
  .match-card .match-incomplete-note { grid-column: 1 / -1; width: 100%; max-width: 100% !important; justify-content: center; white-space: normal !important; font-size: 12px; padding: 8px 10px; border-radius: 999px; }

  /* 7, 8, 9. team panel */
  .team-corner-badges { position: static !important; flex-direction: row; justify-content: flex-start; align-items: center; margin-bottom: 12px; }
  .team-form-hero { flex-wrap: nowrap; gap: 8px; align-items: center; margin-top: 12px; }
  .team-form-hero .widget-title { font-size: 13px; white-space: nowrap; margin: 0; }
  .team-form-hero .form-row-modern { flex-wrap: nowrap; gap: 7px; }
  .team-form-hero .form-row-modern .form-dot { width: 34px; height: 34px; min-width: 34px; border-radius: 13px; font-size: 14px; }
  .medal-counts { grid-template-columns: repeat(3, minmax(0,1fr)) !important; gap: 8px; }
  .medal-count { padding: 12px 6px; min-width: 0; }
  .medal-count .emoji { font-size: 25px; }
  .medal-count strong { font-size: 24px; }
  .incomplete-note-wrap { width: 100%; }
  .team-schedule-table .match-incomplete-note { width: 100%; max-width: 100% !important; white-space: normal !important; border-radius: 14px; }

  /* team schedule table on mobile - keep rows compact but readable */
  .team-schedule-table { font-size: 14px; }
  .team-schedule-table td, .team-schedule-table th { padding: 9px 4px; }
  .team-schedule-table td.score-col { width: 104px !important; min-width: 104px !important; }
  .team-schedule-table td.status-col { width: 42px !important; min-width: 42px !important; }
  .team-schedule-table .team-line { gap: 6px; }
  .team-schedule-table .team-line img { width: 30px; height: 30px; }
  .team-schedule-table .team-line span { font-size: 13px; line-height: 1.12; white-space: normal; overflow-wrap: anywhere; }

  /* 11. mobile stats: only #, rider, ZMP club, points */
  .stats-table { font-size: 14px; }
  .stats-table th:nth-child(3), .stats-table td:nth-child(3),
  .stats-table th:nth-child(4), .stats-table td:nth-child(4),
  .stats-table th:nth-child(6), .stats-table td:nth-child(6),
  .stats-table th:nth-child(7), .stats-table td:nth-child(7) { display: none; }
  .stats-table th, .stats-table td { padding: 10px 5px; }
  .stats-table .rider-link strong { font-size: 15px; }
}

@media (max-width: 430px) {
  body { font-size: 16px; }
  .brand img { width: 68px; height: 52px; }
  .brand span { font-size: 12px; }
  .card { padding: 14px; }
  .team-summary-card .team-logo-lg { width: 82px; height: 82px; }
  .dashboard-main .card table { font-size: 14px; }
  .match-card { grid-template-columns: minmax(0,1fr) 78px minmax(0,1fr) !important; gap: 6px; }
  .match-card .team-line img, .match-card .team-logo-sm { width: 42px; height: 42px; }
  .match-card .team-line span { font-size: 14px; }
  .match-card .score-link { min-width: 66px; font-size: 14px; }
  .top-rider-card .rider-meta { font-size: 12px; }
  .top-rider-card .rider-link strong { font-size: 15px; }
  .top-rider-card .stat-number { font-size: 28px; }
}

/* v9.2 mobile fix 2 - compact dropdown menu, full brand title */
.menu-toggle { display: none; }

@media (max-width: 720px) {
  .header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 16px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
  }
  .brand {
    min-width: 0 !important;
    width: 100% !important;
    gap: 12px !important;
    align-items: center !important;
  }
  .brand img {
    width: 82px !important;
    height: 64px !important;
    flex: 0 0 auto !important;
  }
  .brand span {
    display: block !important;
    font-size: 17px !important;
    line-height: 1.08 !important;
    font-weight: 950 !important;
    letter-spacing: -.03em !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
  }
  .menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    min-width: 86px !important;
    padding: 0 18px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(245,179,1,.55) !important;
    background: rgba(245,179,1,.18) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 950 !important;
    cursor: pointer !important;
  }
  .nav {
    display: none !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-height: min(64vh, 560px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    padding: 12px 0 4px !important;
    margin: 0 !important;
    gap: 10px !important;
    background: transparent !important;
  }
  .header.menu-open .nav {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }
  .nav a,
  .nav .push-button {
    width: 100% !important;
    min-height: 54px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 14px 16px !important;
    border-radius: 17px !important;
    background: rgba(255,255,255,.09) !important;
    border: 1px solid rgba(255,255,255,.14) !important;
    color: #fff !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    line-height: 1.1 !important;
    text-align: center !important;
  }
  .header.menu-open .menu-toggle {
    background: var(--accent) !important;
    color: var(--dark) !important;
  }
}

@media (max-width: 430px) {
  .brand img { width: 78px !important; height: 60px !important; }
  .brand span { font-size: 16px !important; }
  .menu-toggle { min-width: 80px !important; min-height: 46px !important; font-size: 14px !important; }
}


/* v9.2 mobile fix 3 - targeted phone fixes from screenshots */
@media (max-width: 720px) {
  /* top riders: do not cut names, keep full card inside viewport */
  .top-rider-stack { gap: 12px !important; width: 100% !important; }
  .top-rider-card,
  .top-rider-card.leader {
    grid-template-columns: 54px minmax(0, 1fr) 82px !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 92px !important;
    padding: 14px 12px !important;
    overflow: visible !important;
  }
  .top-rider-card.leader { min-height: 106px !important; }
  .top-rider-card .rank { width: 50px !important; height: 50px !important; border-radius: 16px !important; font-size: 20px !important; }
  .top-rider-card .rider-link {
    display: flex !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
  }
  .top-rider-card .rider-link strong,
  .top-rider-card.leader .rider-link strong {
    font-size: 18px !important;
    line-height: 1.12 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
  .top-rider-card.leader .rider-link strong { font-size: 20px !important; }
  .top-rider-card .rider-meta {
    font-size: 13.5px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
  }
  .top-rider-card .stat-number { font-size: 34px !important; line-height: .95 !important; }
  .top-rider-card.leader .stat-number { font-size: 42px !important; }
  .top-rider-card .stat-label { font-size: 11px !important; letter-spacing: .04em !important; }
  .sgp-logo-pill { flex: 0 0 auto !important; }
  .top-rider-stack + table { width: 100% !important; font-size: 17px !important; line-height: 1.25 !important; }
  .top-rider-stack + table th,
  .top-rider-stack + table td { padding: 10px 7px !important; }
  .top-rider-stack + table th { font-size: 12px !important; }
  .top-rider-stack + table a { font-size: 17px !important; }

  /* match page: keep teams and score in one row, with score centered */
  .match-hero-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 108px minmax(0, 1fr) !important;
    gap: 8px !important;
    align-items: center !important;
  }
  .match-team-panel,
  .match-team-panel.away {
    min-height: 0 !important;
    padding: 10px 7px !important;
    border-radius: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
  }
  .match-team-panel.away { flex-direction: column-reverse !important; }
  .match-team-panel .team-logo-lg { width: 58px !important; height: 58px !important; border-radius: 16px !important; }
  .match-team-panel h1 { font-size: 21px !important; line-height: 1.05 !important; margin: 2px 0 8px !important; }
  .match-team-panel .widget-title { font-size: 11px !important; letter-spacing: .08em !important; }
  .big-score-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-width: 0 !important;
  }
  .big-score { font-size: 35px !important; line-height: 1 !important; text-align: center !important; white-space: nowrap !important; }
  .match-hero-grid .match-incomplete-note,
  .match-hero-grid .aggregate-note { grid-column: 1 / -1 !important; max-width: 100% !important; white-space: normal !important; }

  /* team panel: button and form must fit screen width */
  .hero-main .actions { width: 100% !important; margin: 10px 0 0 !important; }
  .hero-main .actions .button { width: 100% !important; display: flex !important; justify-content: center !important; align-items: center !important; min-height: 52px !important; font-size: 17px !important; }
  .team-form-hero { width: 100% !important; display: grid !important; grid-template-columns: auto minmax(0, 1fr) !important; gap: 8px !important; align-items: center !important; overflow: hidden !important; }
  .team-form-hero .widget-title { font-size: 12px !important; white-space: nowrap !important; }
  .team-form-hero .form-row-modern { width: 100% !important; display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 6px !important; min-width: 0 !important; }
  .team-form-hero .form-row-modern .form-dot { width: 100% !important; max-width: 42px !important; height: 42px !important; min-width: 0 !important; border-radius: 15px !important; font-size: 16px !important; }

  /* full team schedule: replace broken narrow columns with mobile cards */
  .team-schedule-table { display: block !important; width: 100% !important; overflow: visible !important; border-collapse: separate !important; border-spacing: 0 !important; }
  .team-schedule-table tbody { display: block !important; width: 100% !important; }
  .team-schedule-table tr:first-child { display: none !important; }
  .team-schedule-table tr {
    display: grid !important;
    grid-template-columns: 24px minmax(0, 1fr) 86px minmax(0, 1fr) 36px !important;
    gap: 6px !important;
    align-items: center !important;
    width: 100% !important;
    padding: 12px 6px !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .team-schedule-table td {
    display: flex !important;
    align-items: center !important;
    min-width: 0 !important;
    width: auto !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: normal !important;
  }
  .team-schedule-table td:first-child { justify-content: center !important; font-size: 15px !important; font-weight: 900 !important; color: var(--muted) !important; }
  .team-schedule-table td.score-col { width: auto !important; min-width: 0 !important; justify-content: center !important; flex-direction: column !important; gap: 5px !important; }
  .team-schedule-table td.status-col { width: auto !important; min-width: 0 !important; justify-content: flex-end !important; }
  .team-schedule-table .team-line { width: 100% !important; display: grid !important; grid-template-columns: 34px minmax(0,1fr) !important; gap: 7px !important; align-items: center !important; }
  .team-schedule-table .team-line img { width: 34px !important; height: 34px !important; border-radius: 10px !important; }
  .team-schedule-table .team-line span,
  .team-schedule-table .team-line strong,
  .team-schedule-table a {
    font-size: 13.5px !important;
    line-height: 1.12 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
  }
  .team-schedule-table .score-link { min-width: 76px !important; padding: 8px 7px !important; font-size: 14px !important; border-radius: 14px !important; }
  .team-schedule-table .match-incomplete-note { width: 100% !important; max-width: 86px !important; font-size: 9.5px !important; line-height: 1.1 !important; padding: 5px 4px !important; border-radius: 12px !important; }
  .team-schedule-table .result-pill { width: 32px !important; height: 32px !important; border-radius: 12px !important; font-size: 12px !important; }
}

@media (max-width: 430px) {
  .top-rider-card,
  .top-rider-card.leader { grid-template-columns: 50px minmax(0, 1fr) 76px !important; gap: 8px !important; }
  .top-rider-card .rank { width: 46px !important; height: 46px !important; }
  .top-rider-card .rider-link strong { font-size: 16px !important; }
  .top-rider-card.leader .rider-link strong { font-size: 18px !important; }
  .top-rider-card .stat-number { font-size: 30px !important; }
  .top-rider-card.leader .stat-number { font-size: 38px !important; }
  .match-hero-grid { grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr) !important; gap: 6px !important; }
  .match-team-panel h1 { font-size: 18px !important; }
  .match-team-panel .team-logo-lg { width: 52px !important; height: 52px !important; }
  .big-score { font-size: 31px !important; }
  .team-form-hero { grid-template-columns: 106px minmax(0, 1fr) !important; }
  .team-form-hero .form-row-modern .form-dot { height: 38px !important; max-width: 38px !important; border-radius: 14px !important; }
  .team-schedule-table tr { grid-template-columns: 20px minmax(0, 1fr) 76px minmax(0, 1fr) 32px !important; gap: 5px !important; padding: 11px 3px !important; }
  .team-schedule-table .team-line { grid-template-columns: 30px minmax(0,1fr) !important; gap: 5px !important; }
  .team-schedule-table .team-line img { width: 30px !important; height: 30px !important; }
  .team-schedule-table .team-line span,
  .team-schedule-table .team-line strong,
  .team-schedule-table a { font-size: 12.5px !important; }
  .team-schedule-table .score-link { min-width: 66px !important; font-size: 12.5px !important; padding: 7px 5px !important; }
  .team-schedule-table .match-incomplete-note { max-width: 76px !important; font-size: 8.8px !important; }
}



/* v9.2 mobile fix 4 - targeted refinements */
@media (max-width: 720px) {
  /* 2. Top riders - make 1-5 readable and keep spacing at the bottom */
  .top-rider-stack { width: 100% !important; }
  .top-rider-card,
  .top-rider-card.leader {
    grid-template-columns: 58px minmax(0, 1fr) 88px !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 16px 14px 18px !important;
    min-height: 104px !important;
    border-radius: 22px !important;
  }
  .top-rider-card.leader { min-height: 124px !important; }
  .top-rider-card .rank {
    width: 54px !important;
    height: 54px !important;
    border-radius: 18px !important;
    font-size: 22px !important;
  }
  .top-rider-card .rider-link strong {
    font-size: 18px !important;
    line-height: 1.18 !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .top-rider-card.leader .rider-link strong { font-size: 21px !important; }
  .top-rider-card .rider-meta {
    margin-top: 5px !important;
    padding-bottom: 2px !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    -webkit-line-clamp: 2 !important;
  }
  .top-rider-card .stat-number { font-size: 36px !important; }
  .top-rider-card.leader .stat-number { font-size: 44px !important; }
  .top-rider-card .stat-label { font-size: 12px !important; }
  .top-rider-card .sgp-logo, .top-rider-card .sgp-logo-pill { max-width: 48px !important; flex: 0 0 auto !important; }

  /* 2. Riders 6-10 - full width, bigger, table-like */
  .top-rider-stack + table {
    display: table !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    margin-top: 18px !important;
    font-size: 19px !important;
    line-height: 1.35 !important;
    background: #fff !important;
    border-collapse: collapse !important;
  }
  .top-rider-stack + table th,
  .top-rider-stack + table td {
    display: table-cell !important;
    padding: 13px 9px !important;
    border-bottom: 1px solid var(--line) !important;
    vertical-align: middle !important;
  }
  .top-rider-stack + table th { font-size: 13px !important; }
  .top-rider-stack + table th:first-child,
  .top-rider-stack + table td:first-child { width: 42px !important; }
  .top-rider-stack + table th:last-child,
  .top-rider-stack + table td:last-child { width: 74px !important; text-align: right !important; font-weight: 900 !important; }
  .top-rider-stack + table a { font-size: 19px !important; font-weight: 800 !important; }

  /* 3. Team form - squared badges, no overlap with label */
  .team-form-hero {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    align-items: start !important;
    overflow: visible !important;
    margin-top: 18px !important;
  }
  .team-form-hero .widget-title { white-space: normal !important; font-size: 17px !important; }
  .team-form-hero .form-row-modern {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 10px !important;
    width: 100% !important;
  }
  .team-form-hero .form-row-modern .form-dot {
    width: 100% !important;
    max-width: none !important;
    height: 52px !important;
    border-radius: 14px !important;
    font-size: 19px !important;
  }

  /* 4. Stats page - one line, full width, only relevant columns */
  .stats-table {
    display: table !important;
    min-width: 0 !important;
    width: 100% !important;
    table-layout: fixed !important;
    font-size: 15px !important;
  }
  .stats-table th, .stats-table td {
    display: table-cell !important;
    padding: 12px 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .stats-table th:nth-child(1), .stats-table td:nth-child(1) { width: 36px !important; }
  .stats-table th:nth-child(2), .stats-table td:nth-child(2) { width: 40% !important; }
  .stats-table th:nth-child(5), .stats-table td:nth-child(5) { width: 38% !important; }
  .stats-table th:nth-child(8), .stats-table td:nth-child(8) { width: 52px !important; text-align: right !important; }
  .stats-table .rider-link {
    display: inline-flex !important;
    align-items: center !important;
    max-width: 100% !important;
    min-width: 0 !important;
    gap: 3px !important;
  }
  .stats-table .rider-link strong {
    font-size: 15px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .stats-table .team-line {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 6px !important;
    min-width: 0 !important;
  }
  .stats-table .team-line img { width: 28px !important; height: 28px !important; }
  .stats-table .team-line span,
  .stats-table .team-line strong,
  .stats-table .team-line a { font-size: 14px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }

  /* 5. Rider profile - full width cards */
  .profile-two-widgets,
  .profile-history-wide { width: 100% !important; margin-left: 0 !important; margin-right: 0 !important; }
  .profile-two-widgets .card,
  .profile-history-wide.card { width: 100% !important; }
  .profile-history-wide table,
  .profile-two-widgets table { min-width: 0 !important; width: 100% !important; display: table !important; }

  /* 6. Rider profile hero - more things side-by-side; smaller season select */
  .profile-hero { min-height: 0 !important; padding: 16px !important; }
  .profile-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 118px !important;
    gap: 12px !important;
    align-items: center !important;
  }
  .profile-name { font-size: 32px !important; line-height: 1.06 !important; margin-bottom: 10px !important; }
  .profile-tags { gap: 6px !important; margin: 8px 0 12px !important; }
  .profile-hero form { position: absolute !important; top: 12px !important; right: 12px !important; z-index: 3 !important; }
  .profile-hero form select { width: 72px !important; min-height: 38px !important; padding: 7px 8px !important; border-radius: 12px !important; font-size: 13px !important; }
  .profile-avatar { width: 118px !important; height: 118px !important; border-radius: 24px !important; }
  .team-logo-profile { width: 106px !important; height: 106px !important; border-radius: 22px !important; padding: 8px !important; }
  .profile-info-link { display: inline-block !important; width: 48% !important; padding: 5px 6px 6px 0 !important; vertical-align: top !important; }
  .profile-info-link .small { font-size: 11px !important; }
  .profile-info-link strong { font-size: 13.5px !important; line-height: 1.18 !important; display: block !important; }
  .stat-strip {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }
  .stat-strip > div { padding: 13px 6px !important; border-right: 1px solid var(--line) !important; border-bottom: 0 !important; }
  .stat-number { font-size: 26px !important; }
  .stat-label { font-size: 9.5px !important; }

  /* 7. Match page team panels - equal fixed height, centered score */
  .match-hero-grid {
    grid-template-columns: minmax(0, 1fr) 112px minmax(0, 1fr) !important;
    align-items: stretch !important;
  }
  .match-team-panel,
  .match-team-panel.away {
    min-height: 184px !important;
    height: 184px !important;
    justify-content: space-between !important;
    align-items: center !important;
    text-align: center !important;
  }
  .match-team-panel.away { flex-direction: column !important; }
  .match-team-panel .team-logo-lg { width: 62px !important; height: 62px !important; flex: 0 0 auto !important; }
  .match-team-panel h1 {
    font-size: 20px !important;
    line-height: 1.08 !important;
    margin: 2px 0 6px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .big-score-wrap { align-self: center !important; justify-content: center !important; height: 184px !important; }
  .big-score { font-size: 36px !important; text-align: center !important; }

  /* Team schedule - safer card layout instead of broken columns */
  .team-schedule-table tr {
    grid-template-columns: 26px minmax(0, 1fr) !important;
    grid-template-areas:
      "round home"
      "round score"
      "round away"
      "round status" !important;
    row-gap: 10px !important;
    column-gap: 10px !important;
    padding: 14px 10px !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    margin-bottom: 12px !important;
    background: var(--surface-2) !important;
  }
  .team-schedule-table td:first-child { grid-area: round !important; align-self: center !important; }
  .team-schedule-table td:nth-child(2) { grid-area: home !important; }
  .team-schedule-table td.score-col { grid-area: score !important; align-items: center !important; }
  .team-schedule-table td:nth-child(4) { grid-area: away !important; }
  .team-schedule-table td.status-col { grid-area: status !important; justify-content: stretch !important; }
  .team-schedule-table .team-line { grid-template-columns: 42px minmax(0,1fr) !important; gap: 10px !important; }
  .team-schedule-table .team-line img { width: 42px !important; height: 42px !important; }
  .team-schedule-table .team-line span,
  .team-schedule-table .team-line strong,
  .team-schedule-table a { font-size: 17px !important; line-height: 1.18 !important; white-space: normal !important; }
  .team-schedule-table .score-link { width: 100% !important; min-width: 0 !important; max-width: 180px !important; font-size: 17px !important; padding: 10px 12px !important; }
  .team-schedule-table .match-incomplete-note { width: 100% !important; max-width: 100% !important; font-size: 13px !important; padding: 8px 10px !important; }
  .team-schedule-table .result-pill { width: 100% !important; min-width: 0 !important; height: 40px !important; border-radius: 14px !important; font-size: 15px !important; }
}

@media (max-width: 430px) {
  .top-rider-card,
  .top-rider-card.leader { grid-template-columns: 54px minmax(0, 1fr) 80px !important; }
  .top-rider-card .rider-link strong { font-size: 17px !important; }
  .top-rider-card.leader .rider-link strong { font-size: 19px !important; }
  .top-rider-card .stat-number { font-size: 34px !important; }
  .match-hero-grid { grid-template-columns: minmax(0, 1fr) 102px minmax(0, 1fr) !important; }
  .match-team-panel,
  .match-team-panel.away,
  .big-score-wrap { height: 176px !important; min-height: 176px !important; }
  .match-team-panel h1 { font-size: 18px !important; }
  .profile-top { grid-template-columns: minmax(0, 1fr) 108px !important; }
  .profile-name { font-size: 29px !important; padding-right: 76px !important; }
  .profile-avatar { width: 108px !important; height: 108px !important; }
  .team-logo-profile { width: 96px !important; height: 96px !important; }
}


/* v9.2 mobile fix 5 - compact readable mobile refinements */
@media (max-width: 720px) {
  /* 1. Statistics page: one compact readable row per rider. Only #, rider, ŻMP club and points are visible. */
  .stats-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    table-layout: auto !important;
    font-size: 14px !important;
  }
  .stats-table tbody { display: block !important; width: 100% !important; }
  .stats-table tr {
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1.12fr) minmax(84px, .88fr) 50px !important;
    gap: 6px !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 10px 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .stats-table th,
  .stats-table td {
    display: block !important;
    padding: 0 !important;
    min-width: 0 !important;
    width: auto !important;
    border: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .stats-table th:nth-child(3), .stats-table td:nth-child(3),
  .stats-table th:nth-child(4), .stats-table td:nth-child(4),
  .stats-table th:nth-child(6), .stats-table td:nth-child(6),
  .stats-table th:nth-child(7), .stats-table td:nth-child(7) { display: none !important; }
  .stats-table th:nth-child(1), .stats-table td:nth-child(1),
  .stats-table th:nth-child(2), .stats-table td:nth-child(2),
  .stats-table th:nth-child(5), .stats-table td:nth-child(5),
  .stats-table th:nth-child(8), .stats-table td:nth-child(8) { width: auto !important; }
  .stats-table th:nth-child(8), .stats-table td:nth-child(8) { text-align: right !important; font-weight: 950 !important; }
  .stats-table .rider-link { display: flex !important; align-items: center !important; gap: 4px !important; min-width: 0 !important; max-width: 100% !important; }
  .stats-table .rider-link strong { display: block !important; min-width: 0 !important; font-size: 14px !important; line-height: 1.12 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
  .stats-table .junior-tag, .stats-table .sgp-logo-pill { display: none !important; }
  .stats-table .team-line { display: grid !important; grid-template-columns: 24px minmax(0, 1fr) !important; gap: 5px !important; align-items: center !important; min-width: 0 !important; width: 100% !important; }
  .stats-table .team-line img { width: 24px !important; height: 24px !important; border-radius: 8px !important; padding: 2px !important; }
  .stats-table .team-line span,
  .stats-table .team-line strong,
  .stats-table .team-line a { display: block !important; min-width: 0 !important; font-size: 13px !important; line-height: 1.1 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }

  /* 2. Rider profile: tighter hero and info cards, more content side-by-side without cutting important values. */
  .profile-hero { padding: 14px !important; overflow: hidden !important; }
  .profile-top { grid-template-columns: minmax(0, 1fr) 96px !important; gap: 10px !important; align-items: start !important; }
  .profile-name { font-size: 25px !important; line-height: 1.04 !important; padding-right: 66px !important; margin-bottom: 8px !important; }
  .profile-hero form { top: 10px !important; right: 10px !important; }
  .profile-hero form select { width: 62px !important; min-height: 32px !important; padding: 4px 5px !important; border-radius: 10px !important; font-size: 12px !important; }
  .profile-avatar { width: 96px !important; height: 96px !important; border-radius: 20px !important; align-self: center !important; }
  .team-logo-profile { width: 86px !important; height: 86px !important; border-radius: 18px !important; padding: 7px !important; }
  .profile-tags { gap: 5px !important; margin: 6px 0 8px !important; }
  .profile-tags .badge { font-size: 10px !important; padding: 4px 7px !important; min-height: 0 !important; }
  .profile-top .grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 6px 8px !important; }
  .profile-info-link { width: auto !important; display: block !important; padding: 0 !important; min-width: 0 !important; }
  .profile-info-link .small { font-size: 10px !important; line-height: 1.1 !important; margin-bottom: 1px !important; }
  .profile-info-link strong { font-size: 12px !important; line-height: 1.12 !important; display: -webkit-box !important; -webkit-line-clamp: 2 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; word-break: normal !important; overflow-wrap: anywhere !important; }
  .profile-two-widgets { display: grid !important; grid-template-columns: 1fr !important; width: 100% !important; gap: 12px !important; }
  .profile-two-widgets .card,
  .profile-history-wide.card { width: 100% !important; max-width: 100% !important; }
  .profile-two-widgets .info-table,
  .profile-history-wide table { display: table !important; width: 100% !important; min-width: 0 !important; table-layout: fixed !important; white-space: normal !important; }
  .profile-two-widgets .info-table td,
  .profile-history-wide td,
  .profile-history-wide th { white-space: normal !important; overflow-wrap: anywhere !important; font-size: 13px !important; }

  /* 3. Match panel: same order for home and away; fixed background panel height with everything inside. */
  .match-hero-grid { grid-template-columns: minmax(0, 1fr) 94px minmax(0, 1fr) !important; gap: 7px !important; align-items: stretch !important; }
  .match-team-panel-unified,
  .match-team-panel-unified.away {
    height: 178px !important;
    min-height: 178px !important;
    padding: 9px 6px !important;
    display: grid !important;
    grid-template-rows: auto 52px minmax(0, 1fr) auto !important;
    justify-items: center !important;
    align-items: center !important;
    text-align: center !important;
    gap: 5px !important;
    overflow: hidden !important;
    flex-direction: unset !important;
  }
  .match-team-panel-unified .widget-title { font-size: 10px !important; line-height: 1 !important; letter-spacing: .08em !important; margin: 0 !important; }
  .match-team-panel-unified .team-logo-lg { width: 52px !important; height: 52px !important; border-radius: 14px !important; padding: 5px !important; }
  .match-team-panel-unified h1 { font-size: 15px !important; line-height: 1.06 !important; margin: 0 !important; max-width: 100% !important; display: -webkit-box !important; -webkit-line-clamp: 3 !important; -webkit-box-orient: vertical !important; overflow: hidden !important; }
  .match-team-panel-unified .position-pill { font-size: 12px !important; padding: 5px 8px !important; min-height: 0 !important; }
  .big-score-wrap { height: 178px !important; min-height: 178px !important; display: flex !important; align-items: center !important; justify-content: center !important; text-align: center !important; }
  .big-score { font-size: 30px !important; text-align: center !important; white-space: nowrap !important; }
  .match-hero-grid .match-incomplete-note { font-size: 10px !important; line-height: 1.15 !important; padding: 5px 6px !important; white-space: normal !important; }

  /* 4. Team full schedule: one row whenever possible, no vertical letter stacking. */
  .team-schedule-table { display: block !important; width: 100% !important; overflow: visible !important; }
  .team-schedule-table tbody { display: block !important; width: 100% !important; }
  .team-schedule-table tr:first-child { display: none !important; }
  .team-schedule-table tr {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr) 74px minmax(0, 1fr) 32px !important;
    grid-template-areas: "round home score away status" !important;
    column-gap: 6px !important;
    row-gap: 5px !important;
    align-items: center !important;
    width: 100% !important;
    padding: 10px 0 !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  .team-schedule-table td { display: flex !important; align-items: center !important; min-width: 0 !important; padding: 0 !important; border: 0 !important; white-space: normal !important; overflow: visible !important; }
  .team-schedule-table td:first-child { grid-area: round !important; justify-content: center !important; font-size: 12px !important; font-weight: 900 !important; color: var(--muted) !important; }
  .team-schedule-table td:nth-child(2) { grid-area: home !important; }
  .team-schedule-table td.score-col { grid-area: score !important; justify-content: center !important; flex-direction: column !important; gap: 3px !important; }
  .team-schedule-table td:nth-child(4) { grid-area: away !important; }
  .team-schedule-table td.status-col { grid-area: status !important; justify-content: flex-end !important; }
  .team-schedule-table .team-line { width: 100% !important; display: grid !important; grid-template-columns: 28px minmax(0,1fr) !important; gap: 5px !important; align-items: center !important; min-width: 0 !important; }
  .team-schedule-table .team-line img { width: 28px !important; height: 28px !important; border-radius: 8px !important; padding: 2px !important; }
  .team-schedule-table .team-line span,
  .team-schedule-table .team-line strong,
  .team-schedule-table a { font-size: 12.2px !important; line-height: 1.08 !important; white-space: normal !important; word-break: normal !important; overflow-wrap: normal !important; hyphens: none !important; }
  .team-schedule-table .score-link { min-width: 0 !important; width: 72px !important; max-width: 72px !important; padding: 7px 4px !important; font-size: 12.5px !important; border-radius: 14px !important; white-space: nowrap !important; }
  .team-schedule-table .match-incomplete-note { width: 100% !important; max-width: 72px !important; padding: 4px 3px !important; border-radius: 10px !important; font-size: 8.5px !important; line-height: 1.08 !important; white-space: normal !important; text-overflow: clip !important; }
  .team-schedule-table .result-pill { width: 30px !important; height: 30px !important; min-width: 30px !important; border-radius: 11px !important; font-size: 12px !important; }

  /* 5. Best riders 6-10: same readable size as the main table. */
  .top-rider-stack + table { display: table !important; width: 100% !important; min-width: 0 !important; table-layout: fixed !important; font-size: 15px !important; }
  .top-rider-stack + table th,
  .top-rider-stack + table td { display: table-cell !important; padding: 9px 6px !important; font-size: 15px !important; line-height: 1.2 !important; }
  .top-rider-stack + table th:first-child,
  .top-rider-stack + table td:first-child { width: 34px !important; }
  .top-rider-stack + table th:last-child,
  .top-rider-stack + table td:last-child { width: 54px !important; text-align: right !important; }
  .top-rider-stack + table a { font-size: 15px !important; font-weight: 700 !important; }

  /* 6. Team pages/cards: fixed full-width content, subtler current form icons. */
  .hero-main .hero-title { width: 100% !important; align-items: center !important; }
  .hero-main .hero-title > div { min-width: 0 !important; width: 100% !important; }
  .hero-main h1 { max-width: 100% !important; overflow-wrap: anywhere !important; }
  .team-form-hero { display: grid !important; grid-template-columns: 118px minmax(0, 1fr) !important; width: 100% !important; gap: 8px !important; align-items: center !important; overflow: hidden !important; }
  .team-form-hero .widget-title { font-size: 13px !important; line-height: 1.05 !important; white-space: normal !important; }
  .team-form-hero .form-row-modern { display: grid !important; grid-template-columns: repeat(5, minmax(0,1fr)) !important; gap: 6px !important; width: 100% !important; min-width: 0 !important; }
  .team-form-hero .form-row-modern .form-dot { width: 100% !important; max-width: 34px !important; height: 34px !important; border-radius: 12px !important; font-size: 13px !important; box-shadow: 0 8px 18px rgba(15,23,42,.14) !important; justify-self: center !important; }
}

@media (max-width: 430px) {
  .stats-table tr { grid-template-columns: 28px minmax(0, 1.1fr) minmax(76px, .9fr) 44px !important; gap: 5px !important; }
  .stats-table .rider-link strong { font-size: 13px !important; }
  .stats-table .team-line { grid-template-columns: 22px minmax(0,1fr) !important; gap: 4px !important; }
  .stats-table .team-line img { width: 22px !important; height: 22px !important; }
  .stats-table .team-line span,
  .stats-table .team-line strong,
  .stats-table .team-line a { font-size: 12px !important; }
  .profile-top { grid-template-columns: minmax(0, 1fr) 84px !important; }
  .profile-name { font-size: 23px !important; padding-right: 62px !important; }
  .profile-avatar { width: 84px !important; height: 84px !important; }
  .team-logo-profile { width: 76px !important; height: 76px !important; }
  .profile-top .grid { gap: 5px 6px !important; }
  .profile-info-link strong { font-size: 11px !important; }
  .match-hero-grid { grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr) !important; gap: 5px !important; }
  .match-team-panel-unified,
  .match-team-panel-unified.away,
  .big-score-wrap { height: 166px !important; min-height: 166px !important; }
  .match-team-panel-unified { grid-template-rows: auto 46px minmax(0, 1fr) auto !important; }
  .match-team-panel-unified .team-logo-lg { width: 46px !important; height: 46px !important; }
  .match-team-panel-unified h1 { font-size: 13.5px !important; }
  .big-score { font-size: 27px !important; }
  .team-schedule-table tr { grid-template-columns: 18px minmax(0, 1fr) 64px minmax(0, 1fr) 28px !important; gap: 4px !important; }
  .team-schedule-table .team-line { grid-template-columns: 24px minmax(0,1fr) !important; gap: 4px !important; }
  .team-schedule-table .team-line img { width: 24px !important; height: 24px !important; }
  .team-schedule-table .team-line span,
  .team-schedule-table .team-line strong,
  .team-schedule-table a { font-size: 11px !important; }
  .team-schedule-table .score-link { width: 62px !important; max-width: 62px !important; font-size: 11px !important; padding: 6px 3px !important; }
  .team-schedule-table .match-incomplete-note { max-width: 62px !important; font-size: 7.6px !important; }
  .team-form-hero { grid-template-columns: 96px minmax(0,1fr) !important; gap: 6px !important; }
  .team-form-hero .widget-title { font-size: 11px !important; }
  .team-form-hero .form-row-modern .form-dot { max-width: 30px !important; height: 30px !important; font-size: 12px !important; border-radius: 10px !important; }
}


/* v9.2 mobile fix 6 - small targeted fixes from screenshots */
@media (max-width: 720px) {
  /* Main hero: remove extra ŻMP logo over the title on mobile. */
  .hero-main .dashboard-hero-logo { display: none !important; }
  .hero-main .hero-title { display: block !important; }
  .hero-main h1 { margin-top: 0 !important; }

  /* Schedule cards: keep both teams visually centered in their columns. */
  .match-card { align-items: center !important; }
  .match-card > div:first-child,
  .match-card > div:nth-child(3) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-width: 0 !important;
  }
  .match-card .team-line {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  .match-card .team-line span,
  .match-card .team-line strong,
  .match-card a { text-align: center !important; }

  /* Top riders: keep score visible and put meta in separate readable lines. */
  .top-rider-card,
  .top-rider-card.leader {
    grid-template-columns: 56px minmax(0, 1fr) 84px !important;
    gap: 10px !important;
    align-items: center !important;
    padding-bottom: 18px !important;
  }
  .top-rider-info { min-width: 0 !important; }
  .top-rider-card .rider-link {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
  }
  .top-rider-card .rider-link strong {
    display: block !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.12 !important;
    max-width: 100% !important;
  }
  .top-rider-card .rider-meta {
    display: flex !important;
    flex-direction: column !important;
    gap: 1px !important;
    margin-top: 5px !important;
    font-size: 13px !important;
    line-height: 1.16 !important;
    color: var(--muted) !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    -webkit-line-clamp: initial !important;
  }
  .top-rider-card.leader .rider-meta { color: rgba(255,255,255,.82) !important; }
  .top-rider-card .rider-meta span {
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }
  .top-rider-points { min-width: 78px !important; }
  .top-rider-card .sgp-logo-pill { flex: 0 0 auto !important; }

  /* Team schedule: keep usable one-row layout where possible and prevent vertical word breaks. */
  .team-schedule-table tr {
    grid-template-columns: 22px minmax(0, 1fr) 72px minmax(0, 1fr) 30px !important;
    grid-template-areas: "round home score away status" !important;
    align-items: center !important;
  }
  .team-schedule-table .team-line {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 5px !important;
    min-width: 0 !important;
  }
  .team-schedule-table .team-line span,
  .team-schedule-table .team-line strong,
  .team-schedule-table a {
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    hyphens: none !important;
    line-height: 1.1 !important;
    text-align: left !important;
  }
}

@media (max-width: 430px) {
  .top-rider-card,
  .top-rider-card.leader {
    grid-template-columns: 50px minmax(0, 1fr) 76px !important;
    gap: 8px !important;
  }
  .top-rider-card .rider-meta { font-size: 12.2px !important; }
  .top-rider-card .rider-link strong { font-size: 17px !important; }
  .top-rider-card.leader .rider-link strong { font-size: 19px !important; }
}


/* v9.2-mobile-fix7 - desktop match header repair */
@media (min-width: 901px) {
  .match-hero-grid {
    grid-template-columns: minmax(360px, 1fr) minmax(260px, 340px) minmax(360px, 1fr) !important;
    gap: 18px !important;
    align-items: stretch !important;
  }
  .match-team-panel-unified,
  .match-team-panel-unified.away {
    min-height: 154px !important;
    max-height: 190px !important;
    padding: 18px 20px !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-columns: 92px minmax(0, 1fr) auto !important;
    grid-template-rows: auto 1fr !important;
    align-items: center !important;
    column-gap: 18px !important;
    row-gap: 8px !important;
    text-align: left !important;
    justify-content: initial !important;
  }
  .match-team-panel-unified.away {
    grid-template-columns: auto minmax(0, 1fr) 92px !important;
  }
  .match-team-panel-unified .widget-title,
  .match-team-panel-unified.away .widget-title {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    margin: 0 !important;
  }
  .match-team-panel-unified .team-logo-lg {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 92px !important;
    height: 92px !important;
    border-radius: 22px !important;
    padding: 8px !important;
    flex: 0 0 auto !important;
  }
  .match-team-panel-unified.away .team-logo-lg {
    grid-column: 3 !important;
  }
  .match-team-panel-unified h1,
  .match-team-panel-unified.away h1 {
    grid-column: 2 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    font-size: clamp(30px, 2.9vw, 54px) !important;
    line-height: 1.03 !important;
    overflow-wrap: anywhere !important;
    hyphens: auto !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
  .match-team-panel-unified .position-pill {
    grid-column: 3 !important;
    grid-row: 2 !important;
    align-self: center !important;
    justify-self: end !important;
    white-space: nowrap !important;
  }
  .match-team-panel-unified.away .position-pill {
    grid-column: 1 !important;
    justify-self: start !important;
  }
  .big-score { font-size: clamp(54px, 5.2vw, 82px) !important; line-height: 1 !important; }
  .big-score-wrap .match-incomplete-note { max-width: 340px !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; }
}


/* v9.2-mobile-fix11 - desktop polish and stale-note repair UX */
@media (min-width: 721px) {
  .team-summary-card { min-height: 220px; display:flex; align-items:center; }
  .team-summary-card .widget-head { width:100%; align-items:center; margin-bottom:0; }
  .team-summary-card .team-logo-lg { width:132px; height:132px; }
  .top-rider-card .rider-meta { display:block; line-height:1.55; }
  .top-rider-card .rider-meta .sep, .top-rider-card .rider-meta .dot { margin:0 .45em; color:#9ca3af; }
  .lineup-page-card, section.card:has(.lineup-grid) { max-width:none; width:100%; }
  .lineup-grid { display:grid; grid-template-columns: repeat(2, minmax(420px, 1fr)); gap:16px; width:100%; }
  .lineup-grid .slot { width:100%; }
  .lineup-grid .slot select { width:100%; }
  .match-card { grid-template-columns: minmax(260px,1fr) 150px minmax(260px,1fr) !important; }
  .match-card .team-line span:last-child { white-space:normal; overflow-wrap:break-word; }
}

@media (min-width: 1100px) {
  .match-hero-grid { grid-template-columns:minmax(0,1fr) minmax(250px,330px) minmax(0,1fr) !important; }
  .match-team-panel-unified, .match-team-panel-unified.away { min-width:0 !important; }
  .match-team-panel-unified h1, .match-team-panel-unified.away h1 { font-size:clamp(26px,2.3vw,46px) !important; overflow-wrap:normal !important; word-break:normal !important; }
}

@media (max-width: 720px) {
  .dashboard-hero-logo { display:none !important; }
  .match-card > div:first-child, .match-card > div:nth-child(3) { display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:center !important; text-align:center !important; min-width:0 !important; }
  .match-card .team-line { justify-content:center !important; text-align:center !important; width:100% !important; }
  .match-card .team-line span:last-child { display:block !important; text-align:center !important; white-space:normal !important; word-break:normal !important; overflow-wrap:break-word !important; line-height:1.08 !important; }
  .top-rider-card { grid-template-columns:58px minmax(0,1fr) 82px !important; align-items:center !important; }
  .top-rider-card .rider-meta { display:grid !important; grid-template-columns:1fr !important; gap:2px !important; line-height:1.12 !important; }
  .top-rider-card .rider-meta .sep, .top-rider-card .rider-meta .dot { display:none !important; }
  .top-rider-card .rider-meta span { display:block !important; }
}

/* v9.2-mobile-fix11 - restore desktop widgets and lineup layout */
@media (min-width: 721px) {
  /* Dashboard / team-panel match cards: keep everything inside the card. */
  .match-card {
    grid-template-columns: minmax(0, 1fr) 128px minmax(0, 1fr) !important;
    gap: 14px !important;
    overflow: hidden !important;
    min-width: 0 !important;
  }
  .match-card > div,
  .match-card .team-line {
    min-width: 0 !important;
    max-width: 100% !important;
  }
  .match-card .team-line {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-direction: row !important;
  }
  .match-card > div:nth-child(3) .team-line {
    justify-content: flex-end !important;
    text-align: right !important;
  }
  .match-card .team-line img,
  .match-card .team-logo-sm {
    flex: 0 0 42px !important;
    width: 42px !important;
    height: 42px !important;
  }
  .match-card .team-line span:last-child,
  .match-card .team-line strong,
  .match-card .team-line a {
    min-width: 0 !important;
    max-width: 100% !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    line-height: 1.15 !important;
  }
  .match-card .score-link,
  .match-card .score {
    justify-self: center !important;
    width: auto !important;
    min-width: 92px !important;
    max-width: 128px !important;
    text-align: center !important;
  }
  .dashboard-side .match-card,
  .grid-2 .match-card {
    grid-template-columns: minmax(0,1fr) 118px minmax(0,1fr) !important;
  }
  .dashboard-side .match-card .team-line span:last-child,
  .grid-2 .match-card .team-line span:last-child {
    font-size: 15px !important;
  }

  /* Top riders: readable meta separated by clear spacing. */
  .top-rider-card .rider-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0 !important;
    align-items: center !important;
    line-height: 1.35 !important;
  }
  .top-rider-card .rider-meta span {
    display: inline !important;
    white-space: nowrap !important;
  }
  .top-rider-card .rider-meta span + span::before {
    content: ' · ' !important;
    margin: 0 .42em !important;
    color: #9ca3af !important;
  }
  .top-rider-card.leader .rider-meta span + span::before { color: rgba(255,255,255,.55) !important; }

  /* Lineup editing: full-width card, but players one below another. */
  .lineup-page-card,
  section.card:has(.lineup-grid) {
    width: 100% !important;
    max-width: none !important;
  }
  .lineup-grid {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }
  .lineup-grid .slot {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: 140px minmax(0, 1fr) !important;
  }
  .lineup-grid .slot select { width: 100% !important; }
}

@media (max-width: 720px) {
  .top-rider-card .rider-meta span + span::before { content: none !important; margin: 0 !important; }
}


