:root {
  --bg: #f3f5f2;
  --surface: #ffffff;
  --ink: #1b2520;
  --muted: #66716b;
  --line: #dce2de;
  --accent: #166b43;
  --accent-soft: #e5f3eb;
  --danger: #a83232;
  --danger-soft: #faeaea;
  --warning: #8a5a00;
  --warning-soft: #fff3d8;
  --shadow: 0 12px 30px rgba(22, 49, 35, .08);
  --royal-blue: #4169e1;
  --topbar-height: 68px;
  --sticky-content-top: 86px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: var(--sticky-content-top); }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  position:sticky;
  top:0;
  z-index:1000;
  min-height:var(--topbar-height);
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px 4vw;
  background:var(--royal-blue);
  color:white;
  gap:20px;
  flex-wrap:wrap;
  box-shadow:0 8px 24px rgba(20,44,120,.24);
}
.topbar a { color:white; }
.brand { font-weight:800; font-size:1.25rem; letter-spacing:.2px; }
.version { font-size:.75rem; opacity:.82; margin-left:8px; }
.topbar nav { display:flex; gap:18px; flex-wrap:wrap; font-size:.93rem; }
.topbar nav a { padding:6px 0; font-weight:650; text-underline-offset:4px; }
.topbar nav a:hover, .topbar nav a:focus-visible { text-decoration:underline; }
.container { width:min(1180px, 92vw); margin: 28px auto 60px; }
.footer { text-align:center; color:var(--muted); font-size:.8rem; padding:24px; }
.prototype-banner { background:var(--warning-soft); color:#5e4100; border:1px solid #ecd08f; border-radius:12px; padding:12px 16px; margin-bottom:18px; }
.page-head { margin-bottom:22px; }
.page-head h1 { margin:0 0 6px; font-size:2rem; }
.page-head p { margin:0; color:var(--muted); }
.split { display:flex; align-items:end; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.card { background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:20px; box-shadow:var(--shadow); margin-bottom:18px; }
.narrow { width:min(460px, 100%); margin:60px auto; }
.card h2 { margin-top:0; }
.card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.grid-2 { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.stat { background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:18px; }
.stat span { display:block; font-size:1.8rem; font-weight:800; }
.stat small { color:var(--muted); }
.muted { color:var(--muted); }
.badge { display:inline-block; border-radius:999px; background:#edf0ee; padding:5px 9px; font-size:.78rem; white-space:nowrap; }
.badge.ok { background:var(--accent-soft); color:var(--accent); }
.badge.danger { background:var(--danger-soft); color:var(--danger); }
.btn { appearance:none; border:1px solid #bbc7c0; border-radius:10px; background:white; color:var(--ink); padding:10px 14px; font-weight:700; cursor:pointer; display:inline-block; }
.btn:hover { text-decoration:none; border-color:var(--accent); }
.btn.primary { background:var(--accent); color:white; border-color:var(--accent); }
.btn.danger-outline { border-color:#d7aaaa; color:var(--danger); }
.btn.wide { width:100%; }
.btn:disabled { opacity:.6; cursor:wait; }
.form-stack { display:grid; gap:14px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.form-grid .span-2 { grid-column:1/-1; }
label { display:grid; gap:6px; font-weight:700; }
label small { font-weight:400; color:var(--muted); }
input, select { width:100%; padding:10px 11px; border:1px solid #bdc8c1; border-radius:9px; background:white; font:inherit; color:var(--ink); }
input:focus, select:focus { outline:2px solid rgba(22,107,67,.18); border-color:var(--accent); }
.checkbox-label { display:flex; flex-direction:row; align-items:center; gap:8px; }
.checkbox-label input { width:auto; }
.actions { display:flex; justify-content:flex-end; }
.inline-form select { min-width:220px; }
.flash-stack { display:grid; gap:8px; margin-bottom:16px; }
.flash { padding:12px 14px; border-radius:10px; border:1px solid var(--line); background:white; }
.flash.success { background:var(--accent-soft); color:#105132; border-color:#b9dfca; }
.flash.danger { background:var(--danger-soft); color:#7d2525; border-color:#edbcbc; }
.flash.warning { background:var(--warning-soft); color:#654600; border-color:#ead092; }
.details { display:grid; gap:10px; }
.details div { display:grid; grid-template-columns:110px 1fr; gap:8px; border-bottom:1px solid #edf0ee; padding-bottom:8px; }
.details dt { color:var(--muted); }
.details dd { margin:0; }
.details.compact { font-size:.88rem; }
.fixture-list { display:grid; gap:8px; }
.fixture-row { display:grid; grid-template-columns:150px 1fr 70px 1fr 90px; gap:12px; align-items:center; border-bottom:1px solid #edf0ee; padding:10px 0; }
.fixture-row time, .status { color:var(--muted); font-size:.85rem; }
.score { font-weight:800; text-align:center; font-size:1.1rem; }
.event-list { display:grid; gap:9px; }
.minute { display:inline-block; width:42px; font-variant-numeric:tabular-nums; color:var(--muted); }
.action-list { display:grid; gap:10px; }
.action-list form { display:grid; grid-template-columns:minmax(220px,1fr) 1fr; align-items:center; gap:12px; }
.action-list small { color:var(--muted); }
.button-row { display:flex; gap:10px; flex-wrap:wrap; }
.table-wrap { overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:.9rem; }
th, td { text-align:left; border-bottom:1px solid #e5e9e6; padding:9px 8px; vertical-align:top; }
th { color:#4f5b54; font-size:.8rem; text-transform:uppercase; letter-spacing:.03em; }
.rule-strip { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.rule-strip span { background:#e9eeeb; border-radius:999px; padding:7px 10px; font-size:.8rem; }
.lineup-form { display:grid; grid-template-columns:minmax(0,1fr) 300px; gap:20px; align-items:start; }
.pitch { background:linear-gradient(90deg, rgba(255,255,255,.06) 50%, rgba(255,255,255,.12) 50%), #2e774e; background-size:120px 100%; border-radius:18px; padding:34px 22px; min-height:650px; border:4px solid rgba(255,255,255,.55); box-shadow:var(--shadow); position:relative; }
.pitch:before { content:""; position:absolute; inset:5% 4%; border:2px solid rgba(255,255,255,.45); pointer-events:none; border-radius:3px; }
.pitch-row { position:relative; z-index:1; display:flex; justify-content:center; gap:12px; margin-bottom:42px; }
.pitch-row.attack { margin-bottom:0; }
.slot { width:min(205px,23%); background:rgba(255,255,255,.96); border-radius:12px; padding:10px; border:2px solid transparent; }
.slot.mismatch { border-color:#ffcf67; background:#fff8e8; }
.slot.duplicate { border-color:#d45a5a; background:#fff0f0; box-shadow:0 0 0 2px rgba(180,45,45,.12); }
.slot-label { font-size:.72rem; font-weight:800; text-transform:uppercase; color:var(--muted); margin-bottom:5px; }
.slot select { font-size:.8rem; padding:8px 6px; }
.slot-feedback { min-height:26px; font-size:.68rem; color:var(--muted); margin-top:5px; }
.slot.mismatch .slot-feedback { color:#8a5a00; font-weight:700; }
.slot.duplicate .slot-feedback { color:#8d2424; font-weight:800; }
.lineup-side { position:sticky; top:var(--sticky-content-top); }
.validation-box { border-radius:10px; padding:11px; margin-bottom:12px; background:#eef1ef; }
.validation-box.valid { background:var(--accent-soft); color:var(--accent); }
.validation-box.draft { background:#eef5ff; color:#254f7a; }
.validation-box.invalid { background:var(--danger-soft); color:#7d2525; border:1px solid #edbcbc; }
.count-chip { display:inline-block; background:#edf0ee; padding:4px 7px; border-radius:999px; font-size:.72rem; margin:2px; }
.mismatch-row { background:#fff8e8; }
.community-card { margin-bottom:14px; }
.community-lineup { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
.mini-player { border:1px solid var(--line); border-radius:10px; padding:10px; display:grid; gap:3px; }
.mini-player small, .mini-player span { color:var(--muted); }
.mini-player.mismatch { background:#fff8e8; border-color:#e8c16a; }
.mini-player em { color:#8a5a00; font-size:.72rem; }
.empty-state { text-align:center; padding:42px 20px; }
code { background:#eef1ef; padding:2px 5px; border-radius:5px; }
@media (max-width: 900px) {
  .grid-2, .lineup-form { grid-template-columns:1fr; }
  .stat-grid { grid-template-columns:repeat(2,1fr); }
  .lineup-side { position:static; }
  .pitch { min-height:auto; padding:24px 12px; }
  .pitch-row { flex-wrap:wrap; margin-bottom:25px; }
  .slot { width:min(210px,45%); }
  .fixture-row { grid-template-columns:1fr 60px 1fr; }
  .fixture-row time, .fixture-row .status { grid-column:1/-1; }
  .community-lineup { grid-template-columns:repeat(2,1fr); }
}
@media (max-width: 580px) {
  .form-grid { grid-template-columns:1fr; }
  .form-grid .span-2 { grid-column:auto; }
  .stat-grid { grid-template-columns:1fr 1fr; }
  .slot { width:100%; }
  .pitch-row { display:grid; grid-template-columns:1fr 1fr; }
  .pitch-row.keeper { grid-template-columns:1fr; }
  .community-lineup { grid-template-columns:1fr; }
  .action-list form { grid-template-columns:1fr; }
}

.count-chip.rule-error { background:var(--danger-soft); color:#7d2525; border-color:#edbcbc; font-weight:800; }
.inline-note { padding:12px 14px; border-radius:10px; margin-bottom:16px; border:1px solid var(--line); }
.warning-note { background:#fff7df; color:#654600; border-color:#ead092; }
.browser-draft-note { background:#eef5ff; color:#254f7a; border-color:#c8dcf1; font-size:.85rem; }
.browser-draft-clear { margin-top:8px; font-size:.8rem; font-weight:600; }

/* v0.1.4: searchable player picker */
.player-search-wrap { position:relative; margin-bottom:6px; }
.player-search { font-size:.78rem; padding:8px 8px; }
.slot-list-label { font-size:.62rem; color:var(--muted); margin:2px 0 4px; }
.player-search-results { position:absolute; left:0; right:0; top:calc(100% + 3px); z-index:20; max-height:280px; overflow:auto; background:white; border:1px solid #bfc9c3; border-radius:9px; box-shadow:0 12px 28px rgba(16,39,27,.22); }
.player-search-result { width:100%; display:grid; gap:2px; text-align:left; border:0; border-bottom:1px solid #edf0ee; background:white; padding:8px 9px; cursor:pointer; color:var(--ink); }
.player-search-result:last-child { border-bottom:0; }
.player-search-result:hover, .player-search-result:focus { background:var(--accent-soft); outline:none; }
.player-search-result strong { font-size:.77rem; font-weight:800; }
.player-search-result small { font-size:.65rem; color:var(--muted); }
.player-search-empty { padding:9px; font-size:.72rem; color:var(--muted); }

/* v0.1.8: formations, separated player/club display and tactical list */
.lineup-form { grid-template-columns:minmax(0,1fr) 340px; }
.tactic-toolbar { grid-column:1/-1; display:flex; justify-content:space-between; align-items:center; gap:18px; margin-bottom:0; padding:14px 16px; }
.tactic-toolbar > div { display:grid; gap:3px; }
.tactic-toolbar small { color:var(--muted); max-width:760px; }
.tactic-toolbar select { width:150px; flex:0 0 auto; }
.compact-card { padding:14px 16px; }
.pitch { min-height:760px; }
.mini-field-label { display:block; font-size:.62rem; color:var(--muted); font-weight:800; margin:5px 0 3px; }
.player-club-display { min-height:34px; display:flex; align-items:center; width:100%; padding:8px; border:1px solid #d3dbd6; border-radius:8px; background:#f6f8f6; color:#334139; font-size:.75rem; font-weight:700; line-height:1.2; }
.lineup-side-stack { position:sticky; top:var(--sticky-content-top); display:grid; gap:16px; }
.lineup-side-stack .card { margin-bottom:0; }
.lineup-side { position:static; }
.lineup-list-card h2 { margin-bottom:3px; }
.lineup-list { display:grid; gap:12px; }
.lineup-list-group { border-top:1px solid #edf0ee; padding-top:9px; }
.lineup-list-group:first-child { border-top:0; padding-top:0; }
.lineup-list-group h3 { margin:0 0 6px; font-size:.78rem; text-transform:uppercase; letter-spacing:.04em; color:#4f5b54; }
.lineup-list-group ol { list-style:none; padding:0; margin:0; display:grid; gap:5px; }
.lineup-list-group li { display:grid; grid-template-columns:minmax(0,1fr); gap:1px; padding:6px 8px; border-radius:8px; background:#f5f7f5; font-size:.76rem; }
.lineup-list-group li strong { font-size:.78rem; }
.lineup-list-group li span { color:var(--muted); font-size:.68rem; }
.lineup-list-group li.empty-list-item { color:#8a948e; font-style:italic; background:#fafbfa; }
.lineup-list-group li.mismatch-list-item { background:#fff8e8; border:1px solid #edd18c; }

@media (max-width: 900px) {
  .lineup-side-stack { position:static; }
  .tactic-toolbar { align-items:flex-start; flex-direction:column; }
  .tactic-toolbar select { width:100%; }
}

/* v0.1.9: club-rule warnings are scoreable, not save blockers */
.validation-box.warning { background:#fff7df; color:#654600; border:1px solid #ead092; }
.count-chip.rule-warning { background:#fff7df; color:#654600; border:1px solid #ead092; font-weight:800; }

/* v0.1.9: the right tactical list is a second, synchronized picker */
.lineup-list-group li.lineup-list-edit-item { gap:4px; padding:8px; }
.lineup-list-slot-label { color:#4f5b54; font-size:.67rem; font-weight:800; text-transform:uppercase; letter-spacing:.03em; }
.lineup-list-select { width:100%; min-width:0; padding:7px 8px; font-size:.73rem; }
.lineup-list-club { color:var(--muted); font-size:.68rem; font-weight:700; min-height:1em; }
.lineup-list-search-wrap { display:none; position:relative; }
.lineup-list-group li.mismatch-list-item .lineup-list-slot-label { color:#8a5a00; }

/* v0.1.11: clickable fixtures, match details and scoring catalogue */
.compact-hint { margin-top:-4px; margin-bottom:10px; font-size:.84rem; }
.fixture-row-link { color:var(--ink); border-radius:10px; padding-left:8px; padding-right:8px; transition:background .15s ease, transform .15s ease; }
.fixture-row-link:hover { background:#f4f8f5; text-decoration:none; transform:translateY(-1px); }
.fixture-row-link:focus { outline:2px solid rgba(22,107,67,.18); }
.back-link { display:inline-block; margin-bottom:14px; font-weight:700; }
.match-title-grid { display:grid; grid-template-columns:minmax(0,1fr) 220px minmax(0,1fr); gap:22px; align-items:center; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:22px; box-shadow:var(--shadow); }
.match-team { font-size:1.25rem; }
.home-team { text-align:right; }
.away-team { text-align:left; }
.match-score-box { display:grid; justify-items:center; gap:5px; }
.match-round { color:var(--muted); font-size:.78rem; }
.match-score-large { font-size:2rem; font-weight:900; letter-spacing:.03em; }
.match-kickoff { color:var(--muted); font-size:.76rem; text-align:center; }
.coverage-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; margin-bottom:14px; }
.coverage-item { border:1px solid var(--line); border-radius:10px; padding:10px; display:grid; gap:4px; }
.coverage-item strong { font-size:.78rem; }
.coverage-item span { font-size:.7rem; color:var(--muted); }
.coverage-item.available { background:var(--accent-soft); border-color:#b9dfca; }
.coverage-item.missing { background:#f5f6f5; }
.match-team-columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.match-team-card { min-width:0; }
.lineup-section { border-top:1px solid #edf0ee; padding-top:12px; margin-top:12px; }
.lineup-section h3 { margin:0 0 9px; font-size:.86rem; text-transform:uppercase; letter-spacing:.035em; color:#4f5b54; }
.player-detail-list { display:grid; gap:6px; }
.player-detail-row { display:grid; grid-template-columns:30px minmax(0,1fr) 80px; gap:8px; align-items:center; border-radius:8px; background:#f5f7f5; padding:7px 9px; font-size:.78rem; }
.player-detail-row > span:last-child { color:var(--muted); text-align:right; font-size:.7rem; }
.shirt-number { display:inline-grid; place-items:center; width:26px; height:26px; border-radius:7px; background:#e4e9e5; font-weight:800; }
.compact-table { font-size:.78rem; }
.compact-table th, .compact-table td { padding:7px 6px; }
.sub-note { display:block; color:var(--muted); font-weight:400; margin-top:2px; }
.match-event-timeline { display:grid; gap:8px; }
.match-event-row { display:grid; grid-template-columns:56px 110px minmax(0,1fr); gap:10px; align-items:start; border-bottom:1px solid #edf0ee; padding:8px 0; font-size:.82rem; }
.event-minute { font-variant-numeric:tabular-nums; color:var(--muted); font-weight:700; }
.event-type-pill { display:inline-block; background:#edf0ee; border-radius:999px; padding:3px 7px; font-size:.68rem; font-weight:800; text-align:center; }
.scoring-table-wrap { max-width:850px; }
.scoring-table th:first-child { min-width:255px; text-transform:none; font-size:.86rem; color:var(--ink); letter-spacing:0; }
.scoring-table .score-cell { text-align:center; font-weight:800; font-variant-numeric:tabular-nums; }
.open-question-list { display:grid; gap:8px; }

@media (max-width: 900px) {
  .match-title-grid { grid-template-columns:1fr; }
  .home-team, .away-team { text-align:center; }
  .match-team-columns { grid-template-columns:1fr; }
  .coverage-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 580px) {
  .coverage-grid { grid-template-columns:1fr; }
  .match-event-row { grid-template-columns:50px minmax(0,1fr); }
  .match-event-row > div { grid-column:1/-1; padding-left:60px; }
}

/* v0.1.12+: API-Football-only controls and quality details */
.inline-action-form { margin-top:10px; }
.match-refresh-form { display:flex; justify-content:center; margin-top:14px; }
.quality-details { margin-top:12px; }

/* v0.1.15: historical test rounds, manual hold and German matchday labels */
.personal-score-box { display:flex; align-items:center; gap:14px; padding:14px; margin:12px 0 16px; border-radius:12px; background:var(--accent-soft); border:1px solid #b9dfca; }
.score-big { font-size:2rem; line-height:1; font-weight:900; font-variant-numeric:tabular-nums; }
.round-close-card .tiny-note, .tiny-note { font-size:.72rem; line-height:1.45; }
.close-progress { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:12px 0; }
.close-progress > div { display:grid; gap:2px; padding:12px; border-radius:10px; background:#f5f7f5; }
.close-progress strong { font-size:1.4rem; }
.close-progress span { color:var(--muted); font-size:.72rem; }
.success-note { background:var(--accent-soft); color:#185b3b; border-color:#b9dfca; }
.result-table { width:100%; border-collapse:collapse; }
.result-table th, .result-table td { padding:11px 10px; border-bottom:1px solid var(--line); text-align:left; }
.result-table th { color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; }
.result-table .points-cell { font-size:1rem; font-weight:900; text-align:right; font-variant-numeric:tabular-nums; }
.result-table .rank-cell { width:65px; font-size:1.1rem; font-weight:900; }
.winner-row { background:#eef8f1; }
.small-btn { padding:6px 10px; font-size:.72rem; }
.result-hero { display:flex; align-items:center; justify-content:space-between; gap:24px; }
.eyebrow { color:var(--muted); font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.08em; }
.winner-callout { display:grid; justify-items:end; gap:3px; min-width:250px; padding:14px 16px; border-radius:12px; background:#eef8f1; border:1px solid #b9dfca; }
.winner-callout span { color:var(--muted); font-size:.7rem; text-transform:uppercase; font-weight:800; }
.winner-callout strong { font-size:1.05rem; }
.winner-callout em { color:#176a43; font-style:normal; font-weight:900; }
.detail-total { display:grid; justify-items:end; padding:12px 18px; border-radius:12px; background:#f2f4f2; }
.detail-total span { font-size:2rem; line-height:1; font-weight:900; font-variant-numeric:tabular-nums; }
.detail-total small { color:var(--muted); }
.detail-total.positive-total { background:#eef8f1; color:#176a43; }
.score-breakdown-list { display:grid; gap:14px; }
.score-player-card { border:1px solid var(--line); border-radius:13px; padding:15px; background:#fff; }
.score-player-card.positive-card { border-left:5px solid #4d9e70; }
.score-player-card.negative-card { border-left:5px solid #c65d5d; }
.score-player-head { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.score-player-head h3 { margin:2px 0 3px; }
.score-player-head p { margin:0; color:var(--muted); font-size:.75rem; }
.score-player-head small { color:var(--muted); font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.player-total { font-size:1.35rem; font-variant-numeric:tabular-nums; white-space:nowrap; }
.breakdown-rows { margin-top:10px; border-top:1px solid var(--line); }
.breakdown-rows > div { display:flex; justify-content:space-between; gap:20px; padding:7px 0; border-bottom:1px solid #edf0ee; font-size:.78rem; }
.breakdown-rows > div > span:last-child { font-weight:900; font-variant-numeric:tabular-nums; }
.breakdown-rows small { display:block; color:var(--muted); margin-top:2px; }
.highlight-card { background:linear-gradient(135deg,#f8fcf9,#eef8f1); border-color:#b9dfca; }
.compact-list { margin:10px 0 16px; padding-left:20px; display:grid; gap:5px; }
.compact-form { gap:10px; }
.admin-action-row { display:flex; flex-wrap:wrap; gap:8px; }
.participant-table td { vertical-align:middle; }
.rank-bubble { display:inline-grid; place-items:center; min-width:28px; height:28px; padding:0 7px; border-radius:999px; background:#e7ece8; font-size:.75rem; }
.winner-community-card { border-color:#8bc4a4; box-shadow:0 10px 30px rgba(22,107,67,.12); }
button:disabled { opacity:.48; cursor:not-allowed; }

@media (max-width: 760px) {
  .result-hero { align-items:stretch; flex-direction:column; }
  .winner-callout { justify-items:start; min-width:0; }
  .score-player-head { flex-direction:column; }
  .detail-total { justify-items:start; }
}
.badge.warning { background:var(--warning-soft); color:var(--warning); }

/* v0.1.16: club-aware picker, coach lineups and virtual comparison teams */
.player-search-group {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 9px;
  background: #e9efeb;
  color: var(--muted);
  font-size: .65rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  border-bottom: 1px solid #d7dfda;
}
.coach-lineup-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: -2px 0 14px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f5f7f5;
  color: var(--muted);
  font-size: .75rem;
}
.player-detail-row.player-pick-row {
  grid-template-columns: 30px minmax(0,1fr) 80px auto;
}
.player-detail-row.player-pick-row > span:last-child {
  text-align: initial;
}
.pick-from-match { white-space: nowrap; }
.virtual-divider td {
  padding-top: 20px !important;
  background: #f3f0fa;
  color: #5b467b;
  border-top: 2px solid #cfc4e2;
}
.virtual-result-row { background: #faf8fd; }
.virtual-result-row .rank-cell { color: #6f55a0; }
.virtual-badge { background: #ece5f7; color: #5b467b; }

@media (max-width: 700px) {
  .player-detail-row.player-pick-row { grid-template-columns: 30px minmax(0,1fr) 70px; }
  .player-detail-row.player-pick-row .pick-from-match,
  .player-detail-row.player-pick-row .badge { grid-column: 2 / -1; justify-self: start; }
}

/* v0.1.17: separated round contexts, cumulative table and finance ledger */
.grid-3 { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.context-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-bottom:18px; }
.context-card { display:grid; gap:4px; padding:15px 17px; border-radius:14px; border:1px solid var(--line); background:var(--surface); }
.context-card span { color:var(--muted); font-size:.72rem; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.context-card strong { font-size:1.15rem; }
.context-card small { color:var(--muted); }
.lineup-context { border-left:5px solid #4d8fca; }
.analysis-context { border-left:5px solid var(--accent); }
.context-select label { font-size:.76rem; color:var(--muted); }
.dashboard-main-grid .card { min-width:0; }
.overall-mini-box { display:grid; gap:4px; margin:15px 0 12px; padding:12px; border-radius:10px; background:#f4f7f5; }
.overall-mini-box span, .overall-mini-box small { color:var(--muted); font-size:.73rem; }
.mini-player-top { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.player-point-badge { display:inline-block; border-radius:999px; padding:3px 7px; font-size:.7rem; font-weight:900; font-variant-numeric:tabular-nums; }
.player-point-badge.positive { background:var(--accent-soft); color:var(--accent); }
.player-point-badge.negative { background:var(--danger-soft); color:var(--danger); }
.player-point-badge.neutral { background:#edf0ee; color:var(--muted); }
.overall-table td, .finance-table td { vertical-align:middle; }
.finance-table th { white-space:nowrap; }
.money-total { font-weight:900; text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap; }
.credit-cell, .credit-total { color:var(--accent); font-weight:800; }
.settings-section { border-top:1px solid var(--line); padding-top:12px; margin-top:4px; }
.settings-section:first-child { border-top:0; }

@media (max-width: 1050px) {
  .grid-3 { grid-template-columns:1fr 1fr; }
  .dashboard-main-grid .round-close-card { grid-column:1/-1; }
}
@media (max-width: 760px) {
  .grid-3, .context-grid { grid-template-columns:1fr; }
  .dashboard-main-grid .round-close-card { grid-column:auto; }
}


/* v0.1.18: classic dashboard shortcuts and reversed finance signs */
.dashboard-shortcuts-section { margin: 2px 0 20px; }
.dashboard-section-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin-bottom:12px; }
.dashboard-section-head h2 { margin:2px 0 4px; font-size:1.35rem; }
.dashboard-section-head p { margin:0; color:var(--muted); }
.dashboard-kicker { color:var(--accent); font-size:.7rem; font-weight:900; letter-spacing:.09em; text-transform:uppercase; }
.dashboard-shortcut-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:13px; }
.dashboard-shortcut {
  --tile-accent: var(--accent);
  position:relative;
  display:flex;
  flex-direction:column;
  min-height:186px;
  gap:7px;
  padding:17px;
  overflow:hidden;
  color:var(--ink);
  background:linear-gradient(145deg, var(--surface) 0%, #f8faf8 100%);
  border:1px solid var(--line);
  border-top:5px solid var(--tile-accent);
  border-radius:16px;
  box-shadow:var(--shadow);
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-shortcut:hover { text-decoration:none; transform:translateY(-3px); box-shadow:0 16px 34px rgba(22,49,35,.13); border-color:color-mix(in srgb, var(--tile-accent) 48%, var(--line)); }
.dashboard-shortcut-icon {
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  border-radius:13px;
  color:var(--tile-accent);
  background:color-mix(in srgb, var(--tile-accent) 12%, white);
  font-weight:950;
  font-size:1.05rem;
}
.dashboard-shortcut-kicker { color:var(--muted); font-size:.68rem; font-weight:850; letter-spacing:.045em; text-transform:uppercase; }
.dashboard-shortcut > strong { font-size:1.03rem; line-height:1.2; }
.dashboard-shortcut > small { color:var(--muted); line-height:1.35; }
.dashboard-shortcut-action { margin-top:auto; color:var(--tile-accent); font-size:.78rem; font-weight:850; }
.dashboard-shortcut-action b { display:inline-block; transition:transform .16s ease; }
.dashboard-shortcut:hover .dashboard-shortcut-action b { transform:translateX(3px); }
.tile-lineup { --tile-accent:#3e7bb6; }
.tile-community { --tile-accent:#6b62a8; }
.tile-day { --tile-accent:#b17219; }
.tile-overall { --tile-accent:#166b43; }
.tile-finance { --tile-accent:#287b72; }
.dashboard-system-stats { margin-top:0; }
.debit-cell, .debit-total { color:var(--danger); font-weight:800; }
.detail-total.negative-total { background:var(--danger-soft); color:var(--danger); }

@media (max-width: 1180px) {
  .dashboard-shortcut-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .dashboard-shortcut-grid { grid-template-columns:1fr; }
  .dashboard-shortcut { min-height:156px; }
}

/* v0.1.19: current-matchday hub and lineup availability guidance */
.dashboard-shortcut-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.tile-current { --tile-accent:#b4442f; }
.info-note { background:#eef5ff; color:#254f7a; border-color:#c8dcf1; }
.current-matchday-intro { border-left:5px solid #b4442f; }
.current-matchday-stats { margin:16px 0; }
.current-matchday-control {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:22px;
}
.current-matchday-control h2 { margin-bottom:4px; }
.current-matchday-control p { margin:0; max-width:820px; }
.current-matchday-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:18px; }
.current-fixture-card { margin:0; padding:0; overflow:hidden; border-top:5px solid #aab4ae; }
.current-fixture-card.state-ok { border-top-color:var(--accent); }
.current-fixture-card.state-warning { border-top-color:#b17219; }
.current-fixture-card.state-danger { border-top-color:var(--danger); }
.current-fixture-main { display:grid; gap:9px; padding:18px 18px 12px; color:var(--ink); }
.current-fixture-main:hover { text-decoration:none; background:#fafcfb; }
.current-fixture-main time { color:var(--muted); font-size:.74rem; font-weight:800; }
.current-fixture-main p { margin:0; color:var(--muted); font-size:.82rem; line-height:1.45; }
.current-fixture-teams { display:grid; grid-template-columns:minmax(0,1fr) 58px minmax(0,1fr); align-items:center; gap:8px; }
.current-fixture-teams strong:first-child { text-align:right; }
.current-fixture-teams strong:last-child { text-align:left; }
.current-fixture-teams span { text-align:center; font-size:1.15rem; font-weight:900; }
.current-fixture-meta { display:flex; flex-wrap:wrap; gap:6px 14px; padding:10px 18px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:#f6f8f6; color:var(--muted); font-size:.7rem; }
.current-fixture-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:9px; padding:12px 18px 16px; }
.current-fixture-actions .muted { font-size:.7rem; }
.lineup-availability-card { border-left:5px solid #aab4ae; }
.lineup-availability-card.state-ok { border-left-color:var(--accent); }
.lineup-availability-card.state-warning { border-left-color:#b17219; }
.lineup-availability-card.state-danger { border-left-color:var(--danger); }
.squad-fallback { margin-top:16px; border-top:1px solid var(--line); padding-top:13px; }
.squad-fallback > summary { cursor:pointer; font-weight:850; color:var(--accent); }
.squad-fallback[open] > summary { margin-bottom:8px; }
.squad-position-group { margin-top:13px; }
.squad-position-group > h3 { margin:0 0 7px; font-size:.75rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); }
.squad-player-row { background:#fafbfa; }

@media (max-width: 900px) {
  .current-matchday-grid { grid-template-columns:1fr; }
  .current-matchday-control { align-items:stretch; flex-direction:column; }
  .current-matchday-control form, .current-matchday-control button { width:100%; }
}
@media (max-width: 620px) {
  .dashboard-shortcut-grid { grid-template-columns:1fr; }
  .current-fixture-teams { grid-template-columns:1fr; }
  .current-fixture-teams strong:first-child,
  .current-fixture-teams strong:last-child { text-align:center; }
}

/* v0.1.20: assemble a tip directly from a match without leaving the page. */
.match-detail-workspace {
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:20px;
  align-items:start;
}
.match-detail-main { min-width:0; }
.match-tip-sidebar {
  position:sticky;
  top:var(--sticky-content-top);
  margin-bottom:0;
  max-height:calc(100vh - var(--sticky-content-top) - 18px);
  overflow:auto;
}
.match-tip-sidebar[aria-busy="true"] { opacity:.78; }
.match-tip-sidebar-head { align-items:flex-start; }
.match-tip-sidebar-head h2 { margin-bottom:2px; }
.match-tip-sidebar-head p { margin:0; color:var(--muted); font-size:.75rem; }
.match-tip-feedback { margin:0 0 12px; font-size:.78rem; }
.danger-note { background:var(--danger-soft); color:#7d2525; border-color:#edbcbc; }
.match-tip-list { display:grid; gap:12px; margin:14px 0; }
.match-tip-group { border-top:1px solid #edf0ee; padding-top:9px; }
.match-tip-group:first-child { border-top:0; padding-top:0; }
.match-tip-group h3 {
  margin:0 0 6px;
  color:#4f5b54;
  font-size:.73rem;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.match-tip-group ol { list-style:none; margin:0; padding:0; display:grid; gap:5px; }
.match-tip-group li {
  display:grid;
  grid-template-columns:76px minmax(0,1fr);
  gap:2px 8px;
  padding:7px 9px;
  border:1px solid #dbe6df;
  border-radius:9px;
  background:#f2f7f4;
}
.match-tip-slot-label {
  grid-row:1 / span 2;
  align-self:center;
  color:var(--muted);
  font-size:.64rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.match-tip-group li strong { font-size:.78rem; line-height:1.2; }
.match-tip-group li small { color:var(--muted); font-size:.68rem; }
.match-tip-group li.match-tip-empty { background:#fafbfa; border-color:#edf0ee; }
.match-tip-group li.match-tip-empty strong { color:#8a948e; font-weight:700; }
.match-tip-group li.match-tip-mismatch { background:#fff8e8; border-color:#edd18c; }
.match-tip-rule-note { margin:0 0 12px; font-size:.75rem; }
.match-tip-edit-link { width:100%; text-align:center; }
.match-tip-pick-form { margin:0; justify-self:end; }
.pick-from-match.selected-pick { background:var(--accent-soft); color:var(--accent); border-color:#b9dfca; }

@media (max-width:1080px) {
  .match-detail-workspace { grid-template-columns:minmax(0,1fr) 290px; }
  .match-team-columns { grid-template-columns:1fr; }
  .match-title-grid { grid-template-columns:1fr; }
  .home-team, .away-team { text-align:center; }
}
@media (max-width:820px) {
  .match-detail-workspace { grid-template-columns:1fr; }
  .match-tip-sidebar { position:static; max-height:none; grid-row:1; }
}

/* v0.1.21: royal-blue sticky navigation and the current lineup on a tactical pitch. */
.dashboard-lineup-card { margin-top:2px; overflow:hidden; }
.dashboard-pitch-card { padding-bottom:18px; }
.dashboard-lineup-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}
.dashboard-lineup-head h2 { margin:2px 0 4px; }
.dashboard-lineup-head p { margin:0; color:var(--muted); }
.dashboard-lineup-meta { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.formation-badge {
  display:inline-grid;
  place-items:center;
  min-width:70px;
  min-height:36px;
  padding:7px 12px;
  border-radius:11px;
  color:#fff;
  background:var(--accent);
  font-size:1rem;
  font-weight:950;
  letter-spacing:.04em;
}
.dashboard-lineup-pitch {
  position:relative;
  display:grid;
  grid-template-rows:repeat(4,minmax(105px,1fr));
  align-items:center;
  gap:18px;
  min-height:660px;
  padding:48px 46px;
  overflow:hidden;
  border:4px solid rgba(255,255,255,.72);
  border-radius:20px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.055) 50%, rgba(255,255,255,.12) 50%),
    #2e774e;
  background-size:132px 100%;
  box-shadow:inset 0 0 0 1px rgba(13,58,34,.18), var(--shadow);
}
.dashboard-lineup-pitch::before {
  content:"";
  position:absolute;
  inset:4.5% 3.5%;
  border:2px solid rgba(255,255,255,.55);
  border-radius:3px;
  pointer-events:none;
}
.dashboard-field-center-line {
  position:absolute;
  z-index:0;
  left:3.5%;
  right:3.5%;
  top:50%;
  height:2px;
  background:rgba(255,255,255,.5);
  transform:translateY(-1px);
  pointer-events:none;
}
.dashboard-field-center-circle {
  position:absolute;
  z-index:0;
  left:50%;
  top:50%;
  width:112px;
  height:112px;
  border:2px solid rgba(255,255,255,.5);
  border-radius:50%;
  transform:translate(-50%,-50%);
  pointer-events:none;
}
.dashboard-field-center-circle::after {
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:7px;
  height:7px;
  border-radius:50%;
  background:rgba(255,255,255,.62);
  transform:translate(-50%,-50%);
}
.dashboard-field-penalty {
  position:absolute;
  z-index:0;
  left:50%;
  width:38%;
  height:13%;
  border:2px solid rgba(255,255,255,.46);
  transform:translateX(-50%);
  pointer-events:none;
}
.dashboard-field-penalty-top { top:4.5%; border-top:0; }
.dashboard-field-penalty-bottom { bottom:4.5%; border-bottom:0; }
.dashboard-pitch-row {
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:14px;
  min-width:0;
}
.dashboard-pitch-player {
  position:relative;
  display:grid;
  justify-items:center;
  align-content:center;
  gap:3px;
  width:min(190px,22%);
  min-height:82px;
  padding:10px 12px;
  color:var(--ink);
  text-align:center;
  border:2px solid rgba(255,255,255,.7);
  border-radius:13px;
  background:rgba(255,255,255,.96);
  box-shadow:0 8px 20px rgba(11,44,26,.18);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dashboard-pitch-row.keeper .dashboard-pitch-player { width:min(220px,34%); }
.dashboard-pitch-row.attack .dashboard-pitch-player { width:min(220px,30%); }
.dashboard-pitch-player:hover, .dashboard-pitch-player:focus-visible {
  z-index:3;
  text-decoration:none;
  transform:translateY(-3px);
  border-color:#fff;
  box-shadow:0 13px 26px rgba(11,44,26,.25);
}
.dashboard-pitch-player.empty {
  color:#627069;
  border-style:dashed;
  background:rgba(248,251,249,.82);
  box-shadow:none;
}
.dashboard-pitch-player.mismatch { background:#fff8e8; border-color:#ffd26f; }
.dashboard-pitch-slot-label {
  color:var(--muted);
  font-size:.62rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.dashboard-pitch-player strong {
  width:100%;
  overflow:hidden;
  color:var(--ink);
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.84rem;
}
.dashboard-pitch-player small {
  width:100%;
  overflow:hidden;
  color:var(--muted);
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:.7rem;
}
.dashboard-pitch-player.empty strong { color:#748179; }
.dashboard-pitch-warning {
  position:absolute;
  top:7px;
  right:7px;
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  border-radius:999px;
  background:#ffe3a3;
  color:#765100;
  font-weight:950;
}
.dashboard-lineup-footer {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--line);
}
.dashboard-lineup-notes { flex:1; min-width:0; }
.dashboard-lineup-notes p { margin:0; }
.dashboard-lineup-notes p + p { margin-top:8px; }
.dashboard-lineup-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:9px; }
.dashboard-lineup-empty { margin:0; box-shadow:none; border:1px dashed var(--line); }

@media (max-width:1080px) {
  .dashboard-lineup-pitch { min-height:610px; padding:42px 24px; }
  .dashboard-pitch-player { width:min(175px,23%); }
}
@media (max-width:820px) {
  :root { --sticky-content-top: 82px; }
  .dashboard-lineup-head, .dashboard-lineup-footer { align-items:stretch; flex-direction:column; }
  .dashboard-lineup-meta, .dashboard-lineup-actions { justify-content:flex-start; }
  .dashboard-lineup-pitch {
    grid-template-rows:auto;
    min-height:0;
    padding:36px 18px;
    gap:26px;
    background-size:96px 100%;
  }
  .dashboard-pitch-row { flex-wrap:wrap; }
  .dashboard-pitch-player,
  .dashboard-pitch-row.keeper .dashboard-pitch-player,
  .dashboard-pitch-row.attack .dashboard-pitch-player { width:min(210px,46%); }
}
@media (max-width:580px) {
  .topbar { padding-left:4vw; padding-right:4vw; }
  .topbar nav { gap:12px; font-size:.83rem; }
  .dashboard-lineup-pitch { padding:30px 12px; }
  .dashboard-pitch-player,
  .dashboard-pitch-row.keeper .dashboard-pitch-player,
  .dashboard-pitch-row.attack .dashboard-pitch-player { width:100%; max-width:280px; }
  .dashboard-field-center-circle { width:82px; height:82px; }
}

/* v0.1.22: configurable half-season ranking settlement */
.half-series-settings-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.rank-money-block {
  border:1px solid var(--line);
  border-radius:14px;
  padding:16px;
  background:#f8faf8;
}
.rank-money-block h3 { margin:0 0 5px; font-size:1rem; }
.rank-money-block p { margin:0 0 12px; font-size:.8rem; }
.reward-block { border-top:4px solid var(--accent); }
.fee-block { border-top:4px solid var(--danger); }
.rank-money-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:9px; }
.rank-money-grid label { font-size:.74rem; }
.rank-money-grid input { padding:9px 8px; font-variant-numeric:tabular-nums; }
.settlement-tie-note { padding:10px 12px; border-radius:9px; background:#f4f6f4; font-size:.8rem; }
.overall-context-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.half-context { border-left:5px solid #b97800; }
.half-rank-cell { min-width:150px; }
.half-rank-cell strong { display:block; font-size:1rem; }
.half-rank-cell small, .half-settlement-cell small { display:block; color:var(--muted); margin-top:2px; white-space:nowrap; }
.half-settlement-cell { min-width:190px; }
.half-settlement-cell > strong { font-size:.96rem; font-variant-numeric:tabular-nums; }
.settlement-status { display:inline-block; margin-top:5px; border-radius:999px; padding:3px 7px; font-size:.65rem; font-weight:850; text-transform:uppercase; letter-spacing:.04em; }
.settlement-status.provisional { background:var(--warning-soft); color:var(--warning); }
.settlement-status.final { background:var(--accent-soft); color:var(--accent); }
.projected-total { background:#f5f8f6; }
.half-series-rule-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin:14px 0; }
.half-series-rule-summary > div { border:1px solid var(--line); border-radius:12px; padding:13px 15px; background:#f8faf8; }
.half-series-rule-summary h3 { margin:0 0 8px; font-size:.9rem; }
.half-series-rule-summary ol { margin:0; padding-left:22px; display:grid; gap:4px; font-size:.82rem; }

@media (max-width: 980px) {
  .rank-money-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .overall-context-grid { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  .half-series-settings-grid, .half-series-rule-summary { grid-template-columns:1fr; }
  .rank-money-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 480px) {
  .rank-money-grid { grid-template-columns:1fr; }
}

/* v0.1.23: user-provided club crests as a restrained watermark in the fixed header. */
.topbar {
  isolation:isolate;
  overflow:hidden;
  background:
    linear-gradient(100deg, rgba(31,61,157,.34), rgba(65,105,225,.08) 42%, rgba(36,66,166,.28)),
    var(--royal-blue);
}
.topbar::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background-image:url("club-crests-watermark.png");
  background-repeat:no-repeat;
  background-position:center;
  background-size:100% auto;
  opacity:.14;
  pointer-events:none;
}
.topbar::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:linear-gradient(90deg, rgba(29,54,143,.42), rgba(65,105,225,.06) 27%, rgba(65,105,225,.06) 73%, rgba(29,54,143,.42));
  pointer-events:none;
}
.topbar > * {
  position:relative;
  z-index:1;
}
.topbar .brand,
.topbar nav a {
  text-shadow:0 1px 2px rgba(12,29,83,.32);
}

@media (max-width:820px) {
  .topbar::before {
    background-size:1180px auto;
    background-repeat:repeat-x;
    opacity:.11;
  }
}

/* v0.1.24: visible active community and separated community settings. */
.brand-wrap { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.community-brand {
  display:inline-flex;
  align-items:center;
  max-width:260px;
  padding:4px 9px;
  border:1px solid rgba(255,255,255,.34);
  border-radius:999px;
  background:rgba(12,31,91,.24);
  color:#fff;
  font-size:.72rem;
  font-weight:800;
  line-height:1.2;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  text-shadow:0 1px 2px rgba(12,29,83,.32);
}
.community-isolation-note {
  display:grid;
  align-content:center;
  gap:3px;
  padding:12px 14px;
  border:1px solid #c8dcf1;
  border-radius:10px;
  background:#eef5ff;
  color:#254f7a;
}
.community-isolation-note span { font-size:.78rem; font-weight:500; }
@media (max-width:820px) {
  .community-brand { max-width:190px; }
}

/* v0.1.25: password controls, community approval and system overview */
.password-field {
  position:relative;
  display:flex;
  align-items:stretch;
  gap:8px;
}
.password-field input { min-width:0; flex:1; }
.password-toggle {
  flex:0 0 auto;
  min-width:88px;
  padding:8px 10px;
  border:1px solid #bdc8c1;
  border-radius:9px;
  background:#f7f9f7;
  color:var(--ink);
  font:inherit;
  font-size:.76rem;
  font-weight:800;
  cursor:pointer;
}
.password-toggle:hover,
.password-toggle:focus-visible { border-color:var(--accent); background:#eef6f1; }
.auth-note { margin-top:16px; }
.account-card { margin-top:0; }
.nav-count {
  display:inline-grid;
  place-items:center;
  min-width:19px;
  height:19px;
  margin-left:5px;
  padding:0 5px;
  border-radius:999px;
  background:#fff3d8;
  color:#744c00;
  font-size:.65rem;
  font-weight:900;
  text-shadow:none;
}
.system-requests-card { border-top:5px solid #c98a16; }
.system-request-grid { display:grid; gap:14px; }
.system-request-item {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(280px,420px);
  gap:20px;
  padding:16px;
  border:1px solid #ead39e;
  border-radius:14px;
  background:#fffaf0;
}
.system-request-item h3 { margin:3px 0 12px; }
.metadata-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin:0; }
.metadata-list div { padding:9px 10px; border-radius:9px; background:rgba(255,255,255,.72); }
.metadata-list dt { color:var(--muted); font-size:.68rem; font-weight:800; text-transform:uppercase; }
.metadata-list dd { margin:3px 0 0; font-weight:800; }
.system-request-actions { display:grid; align-content:center; gap:12px; }
.system-request-actions .btn.primary { width:100%; }
.reject-form { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:end; }
.reject-form label { font-size:.75rem; }
.reject-form input { padding:9px; }
.system-community-table td { vertical-align:middle; }
.table-subline { display:block; max-width:420px; margin-top:4px; color:var(--muted); }
.warning-card { border-color:#ead092; background:#fffaf0; }

@media (max-width:880px) {
  .system-request-item { grid-template-columns:1fr; }
  .metadata-list { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .password-field { align-items:stretch; }
  .password-toggle { min-width:76px; padding-inline:7px; }
  .reject-form { grid-template-columns:1fr; }
}

/* v0.1.25: central system overview for community approvals. */
.system-summary-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(170px,1fr));
  gap:14px;
  margin-bottom:18px;
}
.system-summary-card {
  display:grid;
  gap:4px;
  margin:0;
  padding:17px 18px;
  border-top:4px solid var(--royal-blue);
}
.system-summary-card span {
  color:var(--muted);
  font-size:.7rem;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.system-summary-card strong {
  color:var(--ink);
  font-size:1.75rem;
  font-variant-numeric:tabular-nums;
  line-height:1;
}
.system-summary-card small { color:var(--muted); }
.danger-outline {
  border-color:#e2a2a2;
  background:#fff;
  color:var(--danger);
}
.danger-outline:hover,
.danger-outline:focus-visible { border-color:var(--danger); background:#fff0f0; }
@media (max-width:920px) {
  .system-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:520px) {
  .system-summary-grid { grid-template-columns:1fr; }
}

/* v0.1.29: visual formation selector with configurable base formation. */
.formation-choice-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(340px,1fr));
  gap:14px;
}
.formation-choice-card { position:relative; min-width:0; }
.formation-choice-input {
  position:absolute;
  width:1px !important;
  height:1px;
  margin:0;
  padding:0;
  opacity:0;
  pointer-events:none;
}
.formation-choice-shell {
  display:flex;
  flex-direction:column;
  gap:14px;
  min-height:272px;
  padding:16px;
  border:1px solid #cdd7d1;
  border-radius:16px;
  background:#fff;
  box-shadow:0 8px 22px rgba(33,57,44,.06);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease;
}
.formation-choice-card:hover .formation-choice-shell {
  transform:translateY(-2px);
  border-color:#8eaaa0;
  box-shadow:0 12px 28px rgba(33,57,44,.11);
}
.formation-choice-input:focus-visible + .formation-choice-shell {
  outline:3px solid rgba(65,105,225,.28);
  outline-offset:3px;
}
.formation-choice-input:checked + .formation-choice-shell {
  border-color:#7898ec;
  background:linear-gradient(145deg,#f5f8ff 0%,#f0f8f4 100%);
  box-shadow:inset 0 0 0 2px rgba(35,88,212,.58),0 10px 25px rgba(33,57,44,.08);
}
.formation-choice-base .formation-choice-shell {
  border-color:#5f82dc;
  background:linear-gradient(145deg,#edf3ff 0%,#f5f8ff 100%);
  box-shadow:inset 0 0 0 2px rgba(35,88,212,.72),0 10px 25px rgba(33,57,44,.09);
}
.formation-choice-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.formation-choice-title { display:flex; flex-direction:column; gap:4px; min-width:0; }
.formation-choice-title strong { color:var(--ink); font-size:1.4rem; line-height:1; }
.formation-choice-title small { color:var(--muted); font-size:.77rem; font-weight:500; line-height:1.35; }
.formation-choice-status { display:flex; flex:0 0 auto; align-items:center; }
.formation-status-base,
.formation-status-on,
.formation-status-off {
  min-height:27px;
  padding:5px 9px;
  border-radius:999px;
  font-size:.66rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.035em;
  white-space:nowrap;
}
.formation-status-base { display:none; background:#dfe8ff; color:#244cae; }
.formation-status-on { display:none; background:#dff3e7; color:#0d6b3b; }
.formation-status-off { display:inline-flex; background:#fff0ce; color:#7b5200; }
.formation-choice-input:checked + .formation-choice-shell .formation-status-on { display:inline-flex; }
.formation-choice-input:checked + .formation-choice-shell .formation-status-off { display:none; }
.formation-choice-base .formation-status-base { display:inline-flex; }
.formation-choice-base .formation-status-on,
.formation-choice-base .formation-status-off { display:none !important; }
.formation-choice-main {
  display:grid;
  grid-template-columns:minmax(150px,.8fr) minmax(0,1.2fr);
  gap:15px;
  align-items:stretch;
  flex:1 1 auto;
}
.formation-mini-pitch {
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:space-around;
  gap:5px;
  min-height:190px;
  padding:12px 10px;
  border:2px solid rgba(255,255,255,.86);
  border-radius:12px;
  background:linear-gradient(90deg,rgba(255,255,255,.08) 50%,rgba(255,255,255,.02) 50%),#2f875d;
  background-size:50% 100%,auto;
  box-shadow:inset 0 0 0 1px rgba(16,78,49,.35);
  overflow:hidden;
}
.formation-mini-pitch:before,
.formation-mini-pitch:after {
  content:"";
  position:absolute;
  left:50%;
  width:44%;
  height:18px;
  transform:translateX(-50%);
  border:1px solid rgba(255,255,255,.66);
}
.formation-mini-pitch:before { top:-1px; border-top:0; }
.formation-mini-pitch:after { bottom:-1px; border-bottom:0; }
.formation-mini-pitch > .formation-mini-row:nth-child(2):after {
  content:"";
  position:absolute;
  left:-12px;
  right:-12px;
  top:50%;
  border-top:1px solid rgba(255,255,255,.48);
  z-index:-1;
}
.formation-mini-row {
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-evenly;
  min-height:22px;
}
.formation-mini-row i {
  display:block;
  width:13px;
  height:13px;
  border:2px solid #fff;
  border-radius:50%;
  background:var(--royal-blue);
  box-shadow:0 2px 5px rgba(0,0,0,.24);
}
.formation-mini-gk i { background:#f0b429; }
.formation-choice-copy { display:flex; flex-direction:column; justify-content:space-between; gap:14px; min-width:0; }
.formation-role-line { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.formation-role-line span {
  display:flex;
  align-items:baseline;
  gap:5px;
  min-width:0;
  padding:8px 9px;
  border:1px solid #e0e6e2;
  border-radius:9px;
  background:rgba(255,255,255,.72);
  color:#53605a;
  font-size:.72rem;
  line-height:1.2;
}
.formation-role-line b { color:var(--ink); font-size:.96rem; }
.formation-control-stack { display:grid; gap:10px; }
.formation-toggle-control,
.formation-base-control {
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  padding:9px 10px;
  border:1px solid #d9e1dc;
  border-radius:11px;
  background:rgba(255,255,255,.78);
  cursor:pointer;
}
.formation-toggle-control:hover,
.formation-base-control:hover { border-color:#93aeea; background:#f7f9ff; }
.formation-choice-base .formation-toggle-control { cursor:default; opacity:.88; }
.formation-switch {
  position:relative;
  display:block;
  flex:0 0 48px;
  width:48px;
  height:27px;
  border-radius:999px;
  background:#cfd7d2;
  box-shadow:inset 0 0 0 1px rgba(56,73,63,.16);
  transition:background .16s ease;
}
.formation-switch span {
  position:absolute;
  top:3px;
  left:3px;
  width:21px;
  height:21px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 2px 5px rgba(0,0,0,.22);
  transition:transform .16s ease;
}
.formation-choice-input:checked + .formation-choice-shell .formation-switch,
.formation-choice-base .formation-switch { background:var(--royal-blue); }
.formation-choice-input:checked + .formation-choice-shell .formation-switch span,
.formation-choice-base .formation-switch span { transform:translateX(21px); }
.formation-toggle-copy { color:#48564f; font-size:.74rem; font-weight:800; line-height:1.3; }
.formation-base-radio {
  position:absolute;
  width:1px !important;
  height:1px;
  margin:0;
  padding:0;
  opacity:0;
}
.formation-base-dot {
  position:relative;
  flex:0 0 21px;
  width:21px;
  height:21px;
  border:2px solid #9faeaa;
  border-radius:50%;
  background:#fff;
}
.formation-base-radio:checked + .formation-base-dot { border-color:var(--royal-blue); }
.formation-base-radio:checked + .formation-base-dot:after {
  content:"";
  position:absolute;
  inset:4px;
  border-radius:50%;
  background:var(--royal-blue);
}
.formation-base-radio:focus-visible + .formation-base-dot {
  outline:3px solid rgba(65,105,225,.28);
  outline-offset:3px;
}
.formation-base-copy { display:grid; gap:2px; min-width:0; }
.formation-base-copy strong { color:var(--ink); font-size:.76rem; }
.formation-base-copy small { color:var(--muted); font-size:.68rem; font-weight:500; line-height:1.3; }
.formation-choice-base .formation-base-control { border-color:#90a9e8; background:#edf2ff; }
@media (max-width:760px) {
  .formation-choice-grid { grid-template-columns:1fr; }
  .formation-choice-main { grid-template-columns:1fr; }
  .formation-mini-pitch { min-height:175px; }
}

/* v0.1.28: system-community lifecycle controls. */
.system-community-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:7px;
  min-width:210px;
}
.system-community-actions form { margin:0; }
.system-community-actions .btn { padding:7px 10px; font-size:.72rem; }
.btn.warning-action {
  border-color:#d7aa54;
  background:#fff8e8;
  color:#795000;
}
.btn.warning-action:hover,
.btn.warning-action:focus-visible { border-color:#b87b08; background:#fff1cc; }
.btn.success-outline {
  border-color:#8bc7a7;
  background:#f3fbf6;
  color:#106b3d;
}
.btn.success-outline:hover,
.btn.success-outline:focus-visible { border-color:#26945b; background:#e7f7ed; }
.community-protected-note {
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 9px;
  border-radius:999px;
  background:#eef4ff;
  color:#2b4f9e;
  font-size:.69rem;
  font-weight:850;
}
.community-delete-details { width:100%; }
.community-delete-details summary {
  color:var(--danger);
  font-size:.72rem;
  font-weight:850;
  cursor:pointer;
}
.community-delete-form {
  display:grid;
  gap:7px;
  margin-top:8px !important;
  padding:10px;
  border:1px solid #efc1c1;
  border-radius:10px;
  background:#fff5f5;
}
.community-delete-form label {
  display:grid;
  gap:5px;
  font-size:.7rem;
}
.community-delete-form input { padding:8px 9px; font-size:.75rem; }
.community-delete-form .btn { width:100%; }
.community-lifecycle-note {
  margin-top:12px;
  padding:11px 13px;
  border-radius:11px;
  background:#f4f7fb;
  color:#53605a;
  font-size:.76rem;
  line-height:1.45;
}
.pitch-row[data-count="5"] { gap:8px; }
.pitch-row[data-count="5"] .slot {
  width:min(170px,18.5%);
  padding:8px;
}
.pitch-row[data-count="5"] .player-search,
.pitch-row[data-count="5"] .slot select,
.pitch-row[data-count="5"] .player-club-display { font-size:.7rem; }
.dashboard-pitch-row[data-count="5"] { gap:8px; }
.dashboard-pitch-row[data-count="5"] .dashboard-pitch-player {
  width:min(160px,18.5%);
  padding:8px 7px;
}
.dashboard-pitch-row[data-count="5"] .dashboard-pitch-player strong { font-size:.76rem; }
.dashboard-pitch-row[data-count="5"] .dashboard-pitch-player small { font-size:.64rem; }

@media (max-width:900px) {
  .formation-choice-grid { grid-template-columns:1fr; }
  .pitch-row[data-count="5"] .slot { width:min(210px,45%); }
  .dashboard-pitch-row[data-count="5"] .dashboard-pitch-player { width:min(210px,45%); }
}
@media (max-width:580px) {
  .formation-choice-main { grid-template-columns:1fr; }
  .formation-mini-pitch { min-height:145px; }
  .pitch-row[data-count="5"] .slot { width:100%; }
  .dashboard-pitch-row[data-count="5"] .dashboard-pitch-player { width:100%; max-width:280px; }
}

/* v0.1.28: expanded, confirmation-protected community administration. */
.system-summary-grid-five { grid-template-columns:repeat(5,minmax(0,1fr)); }
.system-summary-card.inactive-summary { border-top-color:#7b8790; }
.badge.inactive { background:#e8ecef; color:#4d5961; }
.badge.protected { background:#e7edff; color:#244fb8; }
.system-management-intro { max-width:980px; margin:0 0 16px; }
.system-community-table { min-width:1160px; }
.system-community-table .community-row-inactive { background:#fafbfb; color:#59635e; }
.system-community-actions-cell { min-width:230px; }
.system-community-actions {
  display:grid;
  align-items:stretch;
  gap:9px;
  min-width:210px;
}
.system-community-actions form { margin:0; }
.protected-note { color:#3158c7; font-weight:750; }
.community-action-details {
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  overflow:hidden;
}
.community-action-details summary {
  padding:9px 11px;
  cursor:pointer;
  font-size:.78rem;
  font-weight:850;
  list-style:none;
}
.community-action-details summary::-webkit-details-marker { display:none; }
.community-action-details summary:after { content:"▾"; float:right; }
.community-action-details[open] summary:after { content:"▴"; }
.community-action-details form {
  display:grid;
  gap:10px;
  padding:11px;
  border-top:1px solid var(--line);
}
.community-action-details p { margin:0; color:var(--muted); font-size:.76rem; line-height:1.4; }
.deactivate-details summary { color:#725000; background:#fff9e9; }
.delete-details { border-color:#e7b5b5; }
.delete-details summary { color:var(--danger); background:#fff4f4; }
.delete-details form { background:#fffafa; }
.community-action-details label { font-size:.75rem; }
.danger-confirm-check {
  display:flex;
  flex-direction:row;
  align-items:flex-start;
  gap:8px;
  font-size:.72rem !important;
  font-weight:700;
}
.danger-confirm-check input[type="checkbox"] {
  width:17px;
  height:17px;
  min-width:17px;
  padding:0;
  margin:1px 0 0;
  accent-color:var(--danger);
}
.btn.warning-outline { border-color:#d7b565; color:#725000; background:#fffdf7; }
.btn.warning-outline:hover { border-color:#a97710; background:#fff7df; }
.btn.danger { background:var(--danger); color:#fff; border-color:var(--danger); }
.btn.danger:hover { background:#8e2626; border-color:#8e2626; }

@media (max-width:1100px) {
  .system-summary-grid-five { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width:720px) {
  .system-summary-grid-five { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:480px) {
  .system-summary-grid-five { grid-template-columns:1fr; }
}

/* v0.1.30: participant master-data and account lifecycle administration. */
.participant-card-head { align-items:flex-start; }
.participant-card-head h2 { margin-bottom:4px; }
.participant-card-head p { margin:0; }
.participant-count-badges { display:flex; gap:7px; flex-wrap:wrap; justify-content:flex-end; }
.participant-management-table { min-width:1040px; }
.participant-management-table .participant-row-inactive { background:#f6f6f6; color:#66716b; }
.participant-management-table .participant-row-inactive strong { color:#53605a; }
.participant-table-actions { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.participant-table-actions form { margin:0; }
.btn.small { padding:7px 10px; font-size:.75rem; border-radius:8px; }
.badge.inactive { background:#eceeed; color:#59635e; }
.badge.protected { background:#e9efff; color:#244caa; }
.table-subline { display:block; margin-top:4px; color:var(--muted); font-size:.72rem; font-weight:400; }
.participant-edit-layout { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr); gap:18px; align-items:start; }
.participant-master-form { margin-top:16px; }
.participant-role-card {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px 20px;
  align-items:center;
  padding:15px 16px;
  border:1px solid var(--line);
  border-radius:13px;
  background:#f7faf8;
}
.participant-role-card > div:first-child { display:grid; gap:4px; }
.participant-role-card small { color:var(--muted); font-weight:400; line-height:1.4; }
.role-switch { display:flex; align-items:center; gap:9px; font-size:.82rem; }
.role-switch input { width:19px; height:19px; min-width:19px; padding:0; accent-color:#2358d4; }
.participant-account-summary { position:sticky; top:var(--sticky-content-top); }
.participant-account-summary .metadata-list { margin-top:8px; }
.participant-lifecycle-card > p { max-width:900px; }
.participant-lifecycle-actions { display:flex; gap:12px; align-items:flex-start; flex-wrap:wrap; }
.participant-action-details {
  border:1px solid var(--line);
  border-radius:12px;
  background:#fafbfa;
  width:min(620px,100%);
}
.participant-action-details summary { cursor:pointer; font-weight:800; padding:12px 14px; }
.participant-action-details form { display:grid; gap:12px; padding:0 14px 14px; }
.participant-action-details.delete-details { border-color:#e5bcbc; background:#fff8f8; }
.participant-action-details.deactivate-details { border-color:#e5d19d; background:#fffaf0; }

@media (max-width:900px) {
  .participant-edit-layout { grid-template-columns:1fr; }
  .participant-account-summary { position:static; }
}
@media (max-width:620px) {
  .participant-card-head { align-items:flex-start; flex-direction:column; }
  .participant-count-badges { justify-content:flex-start; }
  .participant-role-card { grid-template-columns:1fr; }
}

/* V1.0.0 production controls. */
.nav-logout-form {
  display:inline-flex;
  margin:0;
}
.nav-logout-form button {
  appearance:none;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  font-weight:700;
  padding:6px 0;
  cursor:pointer;
}
.nav-logout-form button:hover,
.nav-logout-form button:focus-visible { text-decoration:underline; }
.production-config-note {
  display:grid;
  gap:4px;
}
.production-config-summary {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px;
}
.production-config-summary > div {
  display:grid;
  gap:3px;
  padding:12px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#f7f9fb;
}
.production-config-summary small { color:var(--muted); }
.admin-production-grid,
.single-card-grid { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
.error-card { max-width:720px; margin:32px auto; }
@media (max-width:720px) {
  .production-config-summary { grid-template-columns:1fr; }
}

/* V1.0.2: fixed Bundesliga API, season and scheduler settings */
.settings-fieldset {
  border: 1px solid var(--line, #dce3ea);
  border-radius: 14px;
  padding: 14px;
  min-width: 0;
}
.settings-fieldset legend { font-weight: 800; padding: 0 6px; }
.settings-radio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.radio-card { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line, #dce3ea); border-radius: 12px; padding: 12px; cursor: pointer; }
.radio-card span { display: grid; gap: 2px; }
.radio-card small { color: var(--muted, #64748b); }
.settings-split-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.compact-settings-heading { margin-top: 4px; }
.automation-status-card .production-config-summary { margin-top: 12px; }
@media (max-width: 760px) {
  .settings-radio-grid { grid-template-columns: 1fr; }
}

/* v1.0.3: transparent sporting score for forgotten or invalid tips. */
.forgotten-tip-explanation {
  margin-bottom:16px;
  line-height:1.55;
}
.forgotten-tip-breakdown {
  display:grid;
  gap:0;
  margin-bottom:16px;
  border:1px solid #edbcbc;
  border-left:5px solid var(--danger);
  border-radius:13px;
  background:#fff8f8;
  overflow:hidden;
}
.forgotten-tip-breakdown > div {
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:11px 14px;
  border-bottom:1px solid #f2dada;
  font-size:.82rem;
}
.forgotten-tip-breakdown > div:last-child { border-bottom:0; }
.forgotten-tip-breakdown strong {
  color:var(--danger);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.forgotten-tip-breakdown .forgotten-tip-total {
  background:var(--danger-soft);
  font-weight:900;
}

/* V1.0.5: system-wide user activity / audit dashboard. */
.page-head-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:10px;
}
.audit-privacy-note { margin-bottom:18px; }
.audit-summary-grid {
  grid-template-columns:repeat(4,minmax(0,1fr));
  margin-bottom:18px;
}
.audit-summary-grid .danger-summary {
  border-color:#f1c7c7;
  background:#fff8f8;
}
.audit-filter-card { margin-bottom:18px; }
.audit-filter-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
  align-items:end;
}
.audit-filter-grid label {
  min-width:0;
  font-size:.82rem;
}
.audit-filter-grid .audit-search-field { grid-column:span 2; }
.audit-filter-actions {
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.audit-log-card { overflow:hidden; }
.audit-table { min-width:1120px; }
.audit-table th:nth-child(1) { width:145px; }
.audit-table th:nth-child(2) { width:105px; }
.audit-table th:nth-child(3) { width:170px; }
.audit-table th:nth-child(4) { width:180px; }
.audit-table th:nth-child(6) { width:175px; }
.audit-table td { vertical-align:top; }
.audit-time-cell strong { display:block; white-space:nowrap; }
.audit-time-cell small { color:var(--muted); }
.audit-outcome {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:88px;
  padding:5px 8px;
  border-radius:999px;
  font-size:.72rem;
  font-weight:800;
  line-height:1;
}
.audit-outcome-success { color:#12623b; background:#e4f5eb; }
.audit-outcome-failure { color:#9a2929; background:#fde7e7; }
.audit-outcome-blocked { color:#8a5700; background:#fff1cf; }
.audit-outcome-info { color:#29558a; background:#e7f0fb; }
.audit-description-cell > strong { display:block; margin:4px 0 2px; line-height:1.35; }
.audit-category {
  display:inline-block;
  color:#315c48;
  font-size:.68rem;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}
.audit-details { margin-top:7px; }
.audit-details summary,
.audit-origin-cell summary {
  cursor:pointer;
  color:var(--accent);
  font-size:.72rem;
  font-weight:700;
}
.audit-details dl {
  display:grid;
  gap:4px;
  margin:7px 0 0;
  padding:8px;
  border-radius:8px;
  background:#f6f8f6;
}
.audit-details dl div {
  display:grid;
  grid-template-columns:minmax(120px,.7fr) minmax(0,1.3fr);
  gap:8px;
}
.audit-details dt { color:var(--muted); font-size:.68rem; overflow-wrap:anywhere; }
.audit-details dd { margin:0; font-size:.72rem; overflow-wrap:anywhere; }
.audit-origin-cell { font-size:.75rem; overflow-wrap:anywhere; }
.audit-origin-cell details small { display:block; max-width:260px; margin-top:5px; color:var(--muted); }
.audit-pagination {
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:12px;
  padding-top:16px;
}
.audit-pagination > :last-child { justify-self:end; }
.audit-pagination > span { color:var(--muted); font-size:.8rem; }
.empty-state {
  padding:36px 20px;
  text-align:center;
  color:var(--muted);
}
.empty-state h3 { color:var(--ink); margin-bottom:6px; }
@media (max-width:1100px) {
  .audit-summary-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .audit-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .audit-filter-grid .audit-search-field { grid-column:span 2; }
}
@media (max-width:620px) {
  .page-head-actions { justify-content:flex-start; }
  .audit-summary-grid,
  .audit-filter-grid { grid-template-columns:1fr; }
  .audit-filter-grid .audit-search-field { grid-column:auto; }
  .audit-pagination { grid-template-columns:1fr; text-align:center; }
  .audit-pagination > * { justify-self:center !important; }
}

/* V1.1.0: community ticker, member chat and optional AI comments. */
.tile-ticker { --tile-accent:#8b4fb3; }
.ticker-page-head { align-items:flex-start; }
.ticker-head-badges { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.badge.warning { background:var(--warning-soft); color:var(--warning); }
.ticker-disabled-note a { font-weight:800; }
.ticker-layout {
  display:grid;
  grid-template-columns:minmax(0,1.55fr) minmax(290px,.65fr);
  gap:20px;
  align-items:start;
}
.ticker-main-column { min-width:0; }
.ticker-side-column {
  position:sticky;
  top:var(--sticky-content-top);
  display:grid;
  gap:16px;
}
.ticker-side-column .card { margin-bottom:0; }
.ticker-composer { border-top:5px solid #8b4fb3; }
.ticker-composer textarea {
  width:100%;
  min-height:92px;
  resize:vertical;
  padding:12px 13px;
  border:1px solid #bdc8c1;
  border-radius:11px;
  background:white;
  color:var(--ink);
  font:inherit;
  line-height:1.45;
}
.ticker-composer textarea:focus { outline:2px solid rgba(139,79,179,.18); border-color:#8b4fb3; }
.ticker-composer-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  margin-top:10px;
}
.ticker-composer-footer small { color:var(--muted); }
.community-feed { display:grid; gap:12px; }
.ticker-post {
  --ticker-color:#5d6971;
  position:relative;
  display:grid;
  grid-template-columns:44px minmax(0,1fr);
  gap:12px;
  padding:16px 17px;
  border:1px solid var(--line);
  border-left:5px solid var(--ticker-color);
  border-radius:15px;
  background:var(--surface);
  box-shadow:0 8px 22px rgba(22,49,35,.06);
  scroll-margin-top:var(--sticky-content-top);
}
.ticker-post-user { --ticker-color:#6b62a8; }
.ticker-post-ai { --ticker-color:#8b4fb3; background:linear-gradient(145deg,#fff 0%,#fbf7ff 100%); }
.ticker-post-summary { --ticker-color:#b17219; background:linear-gradient(145deg,#fff 0%,#fffaf0 100%); }
.ticker-post-deleted { opacity:.68; }
.ticker-post-marker {
  display:grid;
  place-items:center;
  width:40px;
  height:40px;
  border-radius:13px;
  color:var(--ticker-color);
  background:color-mix(in srgb,var(--ticker-color) 12%,white);
  font-weight:900;
}
.ticker-post-body { min-width:0; }
.ticker-post-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.ticker-post-head > div { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.ticker-post-head time { color:var(--muted); font-size:.72rem; white-space:nowrap; }
.ticker-post p { margin:8px 0 0; line-height:1.5; overflow-wrap:anywhere; }
.ticker-category-badge,
.ticker-ai-badge {
  display:inline-flex;
  align-items:center;
  padding:4px 7px;
  border-radius:999px;
  font-size:.64rem;
  font-weight:850;
  line-height:1;
}
.ticker-category-badge { color:#4d5a53; background:#edf0ee; }
.ticker-ai-badge { color:#66358a; background:#f0e4f8; }
.ticker-post-actions {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:10px;
  font-size:.74rem;
  font-weight:750;
}
.ticker-post-actions form { margin:0; }
.ticker-delete-button {
  appearance:none;
  border:0;
  padding:0;
  background:transparent;
  color:var(--danger);
  font:inherit;
  font-weight:750;
  cursor:pointer;
}
.ticker-delete-button:hover { text-decoration:underline; }
.ticker-info-card { border-top:5px solid #8b4fb3; }
.ticker-info-card > .ticker-settings-icon { margin-bottom:10px; }
.ticker-info-card ul { padding-left:20px; color:var(--muted); line-height:1.5; }
.ticker-status-list { display:grid; gap:7px; margin:15px 0; }
.ticker-status-list div { display:flex; justify-content:space-between; gap:12px; padding-top:7px; border-top:1px solid #edf0ee; }
.ticker-status-list dt { color:var(--muted); }
.ticker-status-list dd { margin:0; font-weight:750; text-align:right; }
.ticker-test-card form + form { margin-top:9px; }
.ticker-empty-state { box-shadow:none; border-style:dashed; }

.ticker-settings-hero {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  padding:15px 16px;
  border:1px solid #d8c4e6;
  border-radius:14px;
  background:linear-gradient(135deg,#fbf7ff,#f5f0fa);
}
.ticker-settings-hero > div { display:flex; align-items:center; gap:12px; }
.ticker-settings-hero strong,
.ticker-settings-hero small { display:block; }
.ticker-settings-hero small { margin-top:3px; color:var(--muted); }
.ticker-settings-icon {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border-radius:14px;
  background:#eee0f7;
  color:#733e98;
  font-size:1.25rem;
}
.ticker-master-toggle { padding:12px 14px; border:1px solid #d8c4e6; border-radius:12px; background:#fcf9ff; }
.ticker-settings-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.ticker-setting-card { display:grid; align-content:start; gap:10px; padding:16px; border:1px solid var(--line); border-radius:14px; background:#f8faf8; }
.ticker-setting-card h3 { margin:0; }
.ticker-setting-card > p { margin:0 0 4px; }
.ticker-setting-card .checkbox-label { font-size:.84rem; }
.ticker-ai-card { border-top:4px solid #8b4fb3; background:#fcf9ff; }
.ticker-ai-heading { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.ticker-ai-heading h3 { margin:0 0 4px; }
.ticker-ai-heading p { margin:0; }
.ticker-privacy-note { margin:2px 0 0; font-size:.78rem; }
.ticker-env-hint { margin:0; font-size:.78rem; line-height:1.45; }

@media (max-width:960px) {
  .ticker-layout { grid-template-columns:1fr; }
  .ticker-side-column { position:static; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .ticker-settings-grid { grid-template-columns:1fr; }
}
@media (max-width:650px) {
  .ticker-head-badges { justify-content:flex-start; }
  .ticker-composer-footer,
  .ticker-post-head,
  .ticker-settings-hero,
  .ticker-ai-heading { align-items:flex-start; flex-direction:column; }
  .ticker-side-column { grid-template-columns:1fr; }
  .ticker-post { grid-template-columns:36px minmax(0,1fr); padding:13px; }
  .ticker-post-marker { width:34px; height:34px; }
}


/* V1.1.2: mobile-focused interface. Desktop remains unchanged. */
.mobile-only,
.mobile-bottom-nav,
.mobile-more-menu { display:none; }

@media (max-width: 760px) {
  :root {
    --topbar-height: 58px;
    --sticky-content-top: 70px;
    --mobile-nav-height: 66px;
  }
  html { scroll-padding-top:var(--sticky-content-top); }
  body {
    padding-bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    background:#f4f6f4;
    -webkit-text-size-adjust:100%;
  }
  .desktop-only,
  .desktop-nav,
  .dashboard-shortcuts-section,
  .context-grid,
  .rule-strip,
  .desktop-lineup-pitch,
  .saved-lineup-stats,
  .mobile-secondary-content { display:none !important; }
  .mobile-only { display:block; }

  .topbar {
    min-height:var(--topbar-height);
    height:var(--topbar-height);
    padding:8px max(14px, env(safe-area-inset-left)) 8px max(14px, env(safe-area-inset-right));
    flex-wrap:nowrap;
    gap:10px;
  }
  .brand-wrap {
    display:flex;
    min-width:0;
    align-items:center;
    gap:7px;
    flex:1;
  }
  .brand { font-size:1.03rem; white-space:nowrap; }
  .version { display:none; }
  .community-brand {
    min-width:0;
    max-width:46vw;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    margin-left:0;
    font-size:.68rem;
  }
  .mobile-more-menu { display:block; position:relative; flex:0 0 auto; }
  .mobile-more-menu > summary {
    display:grid;
    place-items:center;
    width:42px;
    height:42px;
    border:1px solid rgba(255,255,255,.35);
    border-radius:12px;
    color:#fff;
    background:rgba(255,255,255,.12);
    font-size:1.18rem;
    cursor:pointer;
    list-style:none;
  }
  .mobile-more-menu > summary::-webkit-details-marker { display:none; }
  .mobile-more-panel {
    position:fixed;
    z-index:1200;
    top:calc(var(--topbar-height) + 8px);
    right:12px;
    left:12px;
    display:grid;
    max-height:calc(100vh - var(--topbar-height) - var(--mobile-nav-height) - 30px);
    overflow:auto;
    padding:12px;
    border:1px solid var(--line);
    border-radius:16px;
    background:#fff;
    box-shadow:0 18px 50px rgba(17,35,28,.26);
  }
  .mobile-more-panel > strong {
    padding:7px 10px 11px;
    color:var(--muted);
    font-size:.75rem;
  }
  .mobile-more-panel a,
  .mobile-more-panel button {
    display:block;
    width:100%;
    padding:12px 10px;
    border:0;
    border-bottom:1px solid #edf0ee;
    background:transparent;
    color:var(--ink);
    text-align:left;
    font:inherit;
    font-weight:750;
  }
  .mobile-more-panel form { margin:0; }
  .mobile-more-panel button { color:var(--danger); cursor:pointer; }

  .container {
    width:auto;
    margin:14px 12px 24px;
  }
  .footer { display:none; }
  .prototype-banner { padding:10px 12px; margin-bottom:12px; font-size:.78rem; }
  .flash-stack { margin-bottom:12px; }
  .flash { padding:10px 12px; font-size:.82rem; }
  .page-head { margin-bottom:14px; }
  .page-head h1 { font-size:1.45rem; margin-bottom:3px; }
  .page-head p { font-size:.78rem; line-height:1.35; }
  .split { align-items:stretch; gap:10px; }
  .inline-form,
  .inline-form select { width:100%; min-width:0; }
  .card {
    margin-bottom:12px;
    padding:14px;
    border-radius:13px;
    box-shadow:0 7px 18px rgba(22,49,35,.06);
  }
  .card h2 { font-size:1.08rem; }
  .btn {
    min-height:44px;
    padding:10px 12px;
    border-radius:10px;
  }
  input, select, textarea { font-size:16px !important; }

  .mobile-bottom-nav {
    position:fixed;
    z-index:1100;
    right:0;
    bottom:0;
    left:0;
    display:grid;
    grid-template-columns:repeat(4,1fr);
    height:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    padding:5px max(6px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-left));
    border-top:1px solid #d9dfdb;
    background:rgba(255,255,255,.97);
    box-shadow:0 -8px 24px rgba(20,40,30,.12);
    backdrop-filter:blur(12px);
  }
  .mobile-bottom-nav a {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:2px;
    min-width:0;
    border-radius:10px;
    color:#5c6861;
    font-size:.68rem;
    font-weight:800;
    text-decoration:none;
  }
  .mobile-bottom-nav a.active {
    color:var(--royal-blue);
    background:#eef3ff;
  }
  .mobile-nav-icon {
    display:grid;
    place-items:center;
    width:26px;
    height:24px;
    font-size:.78rem;
    font-weight:950;
  }

  /* Mobile dashboard: only the compact lineup is primary. */
  .page-dashboard .page-head { margin-bottom:10px; }
  .page-dashboard .dashboard-lineup-card { margin-top:0; }
  .dashboard-lineup-head {
    align-items:flex-start;
    gap:10px;
    margin-bottom:12px;
  }
  .dashboard-lineup-head h2 { font-size:1.18rem; }
  .dashboard-lineup-meta { justify-content:flex-start; gap:6px; }
  .formation-badge { min-width:62px; min-height:32px; font-size:.88rem; }
  .mobile-lineup-list { display:grid; gap:12px; }
  .mobile-lineup-group {
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
  }
  .mobile-lineup-group > header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:8px 11px;
    background:#edf3ef;
    color:#435049;
    font-size:.72rem;
    text-transform:uppercase;
    letter-spacing:.045em;
  }
  .mobile-lineup-group > header span {
    display:grid;
    place-items:center;
    min-width:24px;
    height:24px;
    border-radius:999px;
    background:#fff;
    color:var(--accent);
    font-weight:900;
  }
  .mobile-lineup-row {
    display:grid;
    grid-template-columns:64px minmax(0,1fr) 24px;
    align-items:center;
    gap:9px;
    min-height:54px;
    padding:8px 10px;
    border-top:1px solid #edf0ee;
    color:var(--ink);
  }
  .mobile-lineup-row:hover { text-decoration:none; background:#f7faf8; }
  .mobile-lineup-row.empty { color:#718078; background:#fafbfa; }
  .mobile-lineup-row.mismatch { background:#fff8e8; }
  .mobile-lineup-slot { color:var(--muted); font-size:.64rem; font-weight:850; text-transform:uppercase; }
  .mobile-lineup-player { display:grid; gap:2px; min-width:0; }
  .mobile-lineup-player strong,
  .mobile-lineup-player small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-lineup-player strong { font-size:.84rem; }
  .mobile-lineup-player small { color:var(--muted); font-size:.7rem; }
  .mobile-lineup-chevron { color:#94a099; font-size:1.35rem; text-align:right; }
  .mobile-lineup-alert { display:grid; place-items:center; width:22px; height:22px; border-radius:50%; background:#ffe1a0; color:#755000; font-weight:950; }
  .dashboard-lineup-footer { margin-top:12px; padding-top:12px; }
  .dashboard-lineup-notes { font-size:.78rem; }
  .dashboard-lineup-actions { display:grid; grid-template-columns:1fr; width:100%; }
  .dashboard-lineup-actions .btn { width:100%; text-align:center; }

  /* Mobile lineup editor: tabular list only. */
  .page-lineup .page-head p { margin-top:2px; }
  .lineup-form { display:block; }
  .tactic-toolbar {
    display:grid;
    grid-template-columns:minmax(0,1fr) 118px;
    align-items:center;
    gap:10px;
    padding:12px;
  }
  .tactic-toolbar small { display:none; }
  .tactic-toolbar select { width:100%; }
  .lineup-side-stack { display:grid; gap:12px; }
  .lineup-list-card { order:1; padding:12px; }
  .lineup-list-card > p { display:none; }
  .lineup-side { order:2; padding:12px; }
  .lineup-side > p.muted { display:none; }
  .lineup-list { gap:10px; }
  .lineup-list-group { padding-top:7px; }
  .lineup-list-group h3 { font-size:.72rem; }
  .lineup-list-group li.lineup-list-edit-item { padding:9px; gap:7px; overflow:visible; }
  .lineup-list-search-wrap { display:block; position:relative; }
  .lineup-list-search {
    width:100%;
    min-height:44px;
    padding:9px 11px;
    border:1px solid #aebbb3;
    border-radius:10px;
    background:#fff;
  }
  .lineup-list-search:focus { border-color:var(--royal-blue); outline:3px solid rgba(65,105,225,.14); }
  .lineup-list-search-results {
    z-index:85;
    max-height:min(320px,46vh);
    border-radius:11px;
    box-shadow:0 16px 34px rgba(16,39,27,.24);
  }
  .lineup-list-search-results .player-search-result { min-height:48px; padding:9px 11px; }
  .lineup-list-search-results .player-search-result strong { font-size:.84rem; }
  .lineup-list-search-results .player-search-result small { font-size:.7rem; }
  .lineup-list-select { min-height:44px; padding:9px 8px; }
  .validation-box { font-size:.78rem; }
  #club-summary { margin-bottom:9px; }
  #save-lineup-button { position:sticky; bottom:calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 8px); z-index:25; box-shadow:0 8px 22px rgba(22,49,35,.2); }
  .browser-draft-clear { font-size:.72rem; }
  .details.compact { font-size:.75rem; }

  /* Mobile Community-Ticker: composer + feed, no configuration sidebar. */
  .ticker-page-head { gap:8px; }
  .ticker-page-head p { display:none; }
  .ticker-head-badges { justify-content:flex-start; }
  .ticker-layout { display:block; }
  .ticker-composer { padding:12px; }
  .ticker-composer textarea { min-height:72px; }
  .ticker-composer-footer { align-items:stretch; flex-direction:column; gap:8px; }
  .ticker-composer-footer .btn { width:100%; }
  .ticker-composer-footer small { font-size:.68rem; }
  .community-feed { gap:9px; }
  .ticker-post { grid-template-columns:34px minmax(0,1fr); gap:9px; padding:11px; border-radius:12px; }
  .ticker-post-marker { width:32px; height:32px; border-radius:10px; }
  .ticker-post-head { gap:5px; }
  .ticker-post-head time { font-size:.62rem; }
  .ticker-post p { margin-top:6px; font-size:.84rem; line-height:1.42; }
  .ticker-category-badge, .ticker-ai-badge { font-size:.58rem; }

  /* Mobile evaluation cards instead of wide tables. */
  .result-hero { padding:14px; }
  .result-hero p { font-size:.72rem; }
  .winner-callout { min-width:0; width:100%; }
  .mobile-ranking-list,
  .mobile-overall-list,
  .mobile-finance-list { display:grid; gap:9px; }
  .mobile-ranking-card {
    display:grid;
    grid-template-columns:38px minmax(0,1fr) 70px;
    align-items:center;
    gap:9px;
    padding:10px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
  }
  .mobile-ranking-card.winner { border-color:#8bc7a7; background:#f2fbf6; }
  .mobile-ranking-card.virtual { background:#fbf8fd; }
  .mobile-ranking-rank { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#edf0ee; font-weight:950; }
  .mobile-ranking-main { display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0; }
  .mobile-ranking-main strong { width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-ranking-main small { color:var(--muted); font-size:.68rem; }
  .mobile-ranking-points { text-align:right; font-size:1.02rem; font-weight:950; font-variant-numeric:tabular-nums; }
  .mobile-ranking-points small { display:block; color:var(--muted); font-size:.58rem; font-weight:700; }
  .mobile-ranking-details { grid-column:2/-1; justify-self:end; font-size:.72rem; font-weight:800; }
  .mobile-ranking-subhead { margin:12px 0 0; font-size:.85rem; }

  .overall-context-grid { display:none !important; }
  .mobile-overall-card {
    display:grid;
    grid-template-columns:38px minmax(0,1fr) 76px;
    gap:9px;
    align-items:center;
    padding:10px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
  }
  .mobile-overall-card.leader { border-color:#8bc7a7; background:#f2fbf6; }
  .mobile-overall-rank { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#edf0ee; font-weight:950; }
  .mobile-overall-main { display:flex; align-items:center; gap:6px; flex-wrap:wrap; min-width:0; }
  .mobile-overall-main strong { width:100%; }
  .mobile-overall-main small { color:var(--muted); font-size:.66rem; line-height:1.35; }
  .mobile-overall-points { text-align:right; font-weight:950; font-variant-numeric:tabular-nums; }
  .mobile-overall-points small { display:block; color:var(--muted); font-size:.58rem; }
  .mobile-overall-half { grid-column:2/-1; color:var(--muted); font-size:.68rem; }
  .mobile-finance-card {
    display:grid;
    grid-template-columns:minmax(0,1fr) 90px;
    gap:8px;
    align-items:center;
    padding:10px;
    border:1px solid var(--line);
    border-radius:12px;
    background:#fff;
  }
  .mobile-finance-card > div:first-child { display:grid; gap:2px; }
  .mobile-finance-card small { color:var(--muted); font-size:.66rem; }
  .mobile-finance-total { text-align:right; font-weight:900; }
  .mobile-finance-total small { display:block; }
  .mobile-finance-card > a { grid-column:1/-1; justify-self:end; font-size:.72rem; font-weight:800; }
}

@media (max-width: 390px) {
  .brand { font-size:.95rem; }
  .community-brand { max-width:40vw; }
  .container { margin-left:9px; margin-right:9px; }
  .mobile-lineup-row { grid-template-columns:58px minmax(0,1fr) 21px; }
  .mobile-bottom-nav a { font-size:.63rem; }
}

/* V1.1.5: PWA and Web-Push account controls. */
.push-account-card { display:grid; gap:18px; }
.push-account-head { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.push-account-head h2 { margin:.2rem 0 .35rem; }
.push-account-head p { margin:0; color:var(--muted); }
.push-device-actions { display:flex; flex-wrap:wrap; gap:10px; }
.push-live-status { margin:0; }
.push-preferences-form,
.push-device-list-section { display:grid; gap:14px; border-top:1px solid var(--line); padding-top:16px; }
.push-preferences-form .settings-section,
.push-device-list-section .settings-section { border-top:0; margin:0; padding:0; }
.push-preference-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px 18px; }
.push-preference-grid > label { min-width:0; }
.push-device-list { display:grid; gap:10px; }
.push-device-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:12px 14px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#f8fafc;
}
.push-device-row > div { display:grid; gap:3px; min-width:0; }
.push-device-row small { color:var(--muted); line-height:1.35; }
.push-device-row.inactive { opacity:.68; background:#f3f3f3; }
.push-test-form { margin-top:2px; }
.password-account-card { margin-top:18px; }
.ticker-post-digest .ticker-post-marker { background:#e9efff; color:#234fa8; }

@media (max-width:760px) {
  .push-account-head { display:grid; gap:10px; }
  .push-account-head .badge { justify-self:start; }
  .push-device-actions { display:grid; grid-template-columns:1fr; }
  .push-device-actions .btn { width:100%; }
  .push-preference-grid { grid-template-columns:1fr; }
  .push-device-row { align-items:flex-start; }
  .push-device-row form { flex:0 0 auto; }
}

/* V1.1.5: independent and verifiable central settings form. */
.system-settings-heading {
  border-top:0;
  margin-top:0;
  padding-top:0;
}
.system-settings-saved-state {
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:12px 14px;
  border:1px solid #bed9c9;
  border-radius:10px;
  background:#eef8f2;
  color:#214d34;
}
.system-settings-saved-state strong { font-size:.9rem; }
.system-settings-saved-state span { font-size:.82rem; line-height:1.45; }
.system-settings-saved-state small { color:#587164; }
@media (max-width:760px) {
  .settings-split-actions { flex-direction:column; align-items:stretch; }
  .settings-split-actions .btn { width:100%; }
}

/* V1.1.7: compact all-participant matchday matrix and admin tip completion. */
.page-round_results .container { width:min(1540px,96vw); }
.matchday-status-hero h2 { margin:.25rem 0 .35rem; }
.matchday-status-hero p { margin:0; color:var(--muted); max-width:780px; }
.interim-status-hero { border-color:#c9d9f8; background:linear-gradient(135deg,#fff,#f2f6ff); }
.interim-leader-callout { background:#eef4ff; border-color:#c9d9f8; }
.live-eyebrow { color:#2856b7; }
.live-eyebrow i {
  display:inline-block;
  width:8px;
  height:8px;
  margin-right:5px;
  border-radius:50%;
  background:#2d64d6;
  box-shadow:0 0 0 4px rgba(45,100,214,.13);
}
.waiting-status-hero { background:#fafbfa; }
.matchday-progress-strip {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:-4px 0 14px;
}
.matchday-progress-strip > span {
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:#fff;
  color:var(--muted);
  font-size:.74rem;
}
.matchday-progress-strip strong { color:var(--ink); }
.matchday-matrix-card { padding:16px; }
.matrix-card-head { align-items:flex-start; margin-bottom:13px; }
.matrix-card-head h2 { margin:0 0 3px; }
.matrix-card-head p { margin:0; font-size:.8rem; }
.matchday-matrix-scroll { overflow:auto; padding:2px 2px 8px; scrollbar-gutter:stable; }
.matchday-matrix {
  display:grid;
  grid-template-columns:repeat(5,minmax(210px,1fr));
  gap:10px;
  min-width:1090px;
}
.matrix-participant {
  min-width:0;
  overflow:hidden;
  border:1px solid #d5ddd8;
  border-radius:11px;
  background:#fff;
  box-shadow:0 5px 14px rgba(27,55,39,.06);
}
.matrix-participant.matrix-leader,
.matrix-participant.matrix-winner { border-color:#75b891; box-shadow:0 6px 18px rgba(22,107,67,.15); }
.matrix-participant-head {
  display:grid;
  grid-template-columns:28px minmax(0,1fr) auto;
  align-items:center;
  gap:6px;
  min-height:50px;
  padding:7px;
  color:#fff;
  background:#59645e;
}
.matrix-leader .matrix-participant-head { background:#2856b7; }
.matrix-winner .matrix-participant-head { background:#187047; }
.matrix-status-no_lineup .matrix-participant-head,
.matrix-status-incomplete .matrix-participant-head,
.matrix-status-invalid_formation .matrix-participant-head { background:#8a5a00; }
.matrix-rank {
  display:grid;
  place-items:center;
  width:27px;
  height:27px;
  border-radius:50%;
  background:rgba(255,255,255,.18);
  font-size:.78rem;
  font-weight:950;
}
.matrix-participant-name { display:grid; gap:1px; min-width:0; }
.matrix-participant-name strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.82rem; }
.matrix-participant-name small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#fff; opacity:.8; font-size:.57rem; }
.matrix-total { display:grid; justify-items:end; font-weight:950; font-size:.9rem; font-variant-numeric:tabular-nums; }
.matrix-total small { font-size:.5rem; font-weight:700; opacity:.8; }
.matrix-player-list { list-style:none; padding:0; margin:0; }
.matrix-player-row {
  display:grid;
  grid-template-columns:31px minmax(0,1fr) 31px;
  align-items:center;
  gap:5px;
  min-height:28px;
  padding:4px 6px;
  border-bottom:1px solid #e7ebe8;
  font-size:.66rem;
}
.matrix-player-row:last-child { border-bottom:0; }
.matrix-player-row.score-pending { background:#fafbfa; color:#8a948e; }
.matrix-player-row.score-empty { background:#f5f6f5; color:#9aa29d; }
.matrix-player-row.score-error { background:var(--danger-soft); }
.matrix-player-row.position-mismatch { background:#fff6dc; }
.matrix-position { color:var(--muted); font-size:.56rem; font-weight:900; letter-spacing:.025em; }
.matrix-player-copy { display:grid; min-width:0; line-height:1.08; }
.matrix-player-copy strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.69rem; }
.matrix-player-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#8a5a00; font-size:.52rem; font-weight:800; }
.matrix-player-points { text-align:right; font-weight:950; font-variant-numeric:tabular-nums; }
.matrix-player-points.positive { color:#176a43; }
.matrix-player-points.negative { color:#a83232; }
.matrix-participant-foot {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
  min-height:43px;
  padding:6px 7px;
  border-top:1px solid #dfe5e1;
  background:#f7f9f7;
}
.matrix-participant-foot > span { display:flex; flex-wrap:wrap; gap:4px; }
.matrix-participant-foot .badge { padding:3px 6px; font-size:.54rem; }
.matrix-actions { justify-content:flex-end; text-align:right; }
.matrix-actions a { font-size:.6rem; font-weight:850; white-space:nowrap; }
.admin-complete-link { color:#2856b7; }
.virtual-results-card { margin-top:16px; }
.admin-lineup-note { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.admin-lineup-note span { flex:1 1 520px; }
.admin-lineup-note a { font-weight:800; white-space:nowrap; }
.position-rule-options { display:grid; gap:9px; }
.position-rule-options > .muted { margin:0 4px; }
.position-rule-toggle { padding:13px 14px; border:1px solid #ccd8d1; border-radius:11px; background:#f8faf8; }
.position-rule-toggle input { width:20px; height:20px; accent-color:var(--royal-blue); }

@media (max-width:760px) {
  .page-round_results .container { width:auto; }
  .matchday-progress-strip { gap:5px; }
  .matchday-progress-strip > span { border-radius:9px; font-size:.66rem; }
  .matchday-matrix-card { padding:11px; }
  .matrix-card-head { display:grid; }
  .matchday-matrix-scroll { overflow:visible; }
  .matchday-matrix { grid-template-columns:1fr; min-width:0; gap:10px; }
  .matrix-participant-head { min-height:52px; }
  .matrix-player-row { min-height:31px; font-size:.7rem; }
  .matrix-player-copy strong { font-size:.73rem; }
  .matrix-player-copy small { font-size:.56rem; }
  .admin-lineup-note { align-items:flex-start; flex-direction:column; }
}

/* V1.1.8: auditable per-player scoring dialog and live community totals. */
.matrix-player-row { display:block; padding:0; }
.matrix-player-trigger {
  display:grid;
  grid-template-columns:31px minmax(0,1fr) 31px;
  align-items:center;
  gap:5px;
  width:100%;
  min-height:28px;
  padding:4px 6px;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  text-align:left;
}
button.matrix-player-trigger { cursor:pointer; }
button.matrix-player-trigger:hover { background:rgba(45,100,214,.07); }
button.matrix-player-trigger:focus-visible,
.mini-player-score-trigger:focus-visible {
  position:relative;
  z-index:1;
  outline:3px solid rgba(45,100,214,.35);
  outline-offset:-3px;
}
.score-detail-hint { color:#3159ad !important; font-style:normal; }
.mini-player-score-trigger {
  width:100%;
  appearance:none;
  background:#fff;
  color:var(--ink);
  font:inherit;
  text-align:left;
  cursor:pointer;
}
.mini-player-score-trigger:hover { border-color:#8ca9e5; box-shadow:0 4px 12px rgba(45,100,214,.09); }
.mini-player-score-trigger > strong,
.mini-player-score-trigger > span,
.mini-player-score-trigger > em { text-align:left; }
.leader-community-card { border-color:#93b0ea; }
.community-interim-note { margin-bottom:12px; }
.community-progress-strip { margin:0 0 14px; }

.player-score-dialog {
  width:min(680px,calc(100vw - 28px));
  max-width:none;
  max-height:calc(100dvh - 28px);
  padding:0;
  border:0;
  border-radius:17px;
  background:transparent;
  box-shadow:0 24px 80px rgba(16,35,25,.35);
}
.player-score-dialog::backdrop { background:rgba(17,29,23,.58); backdrop-filter:blur(2px); }
.player-score-dialog-shell {
  max-height:calc(100dvh - 28px);
  overflow:auto;
  border:1px solid #d6dfd9;
  border-radius:17px;
  background:#fff;
}
.player-score-dialog-head {
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px 14px;
  border-bottom:1px solid var(--line);
  background:rgba(255,255,255,.97);
}
.player-score-dialog-head h2 { margin:6px 0 2px; font-size:1.35rem; }
.player-score-dialog-head p { margin:0; color:var(--muted); font-size:.82rem; }
.player-score-dialog-head form { margin:0; }
.score-dialog-close {
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  padding:0;
  border:1px solid var(--line);
  border-radius:50%;
  background:#f5f7f5;
  color:var(--ink);
  font-size:1.45rem;
  line-height:1;
  cursor:pointer;
}
.score-dialog-total-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 20px;
  background:linear-gradient(135deg,#f5f8ff,#f7fbf8);
}
.score-dialog-total-row > div:first-child { display:grid; gap:3px; }
.score-dialog-total-row small { color:var(--muted); font-size:.72rem; font-weight:750; }
.score-dialog-total-row strong { font-size:1.65rem; font-variant-numeric:tabular-nums; }
.score-dialog-total-row strong.positive { color:#176a43; }
.score-dialog-total-row strong.negative { color:#a83232; }
.score-dialog-deployment { padding:6px 10px; border-radius:999px; background:#edf0ee; color:var(--muted); font-size:.72rem; font-weight:850; }
.score-dialog-deployment.played { background:var(--accent-soft); color:var(--accent); }
.score-dialog-deployment.not-played { background:var(--danger-soft); color:var(--danger); }
.score-dialog-facts {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin:0;
  padding:14px 20px 0;
}
.score-dialog-facts div { padding:9px 10px; border:1px solid var(--line); border-radius:9px; background:#fafbfa; }
.score-dialog-facts dt { color:var(--muted); font-size:.65rem; }
.score-dialog-facts dd { margin:2px 0 0; font-size:.8rem; font-weight:850; }
.score-dialog-rule,
.score-dialog-fixture { margin:10px 20px 0; padding:10px 12px; border-radius:9px; font-size:.78rem; }
.score-dialog-rule { border:1px solid #e6d6a7; background:#fff9e8; color:#765000; }
.score-dialog-fixture { border:1px solid #cbd9f4; background:#f4f7ff; color:#294e99; font-weight:850; text-align:center; }
.score-dialog-breakdown { padding:18px 20px 0; }
.score-dialog-section-head { display:flex; align-items:end; justify-content:space-between; gap:12px; margin-bottom:8px; }
.score-dialog-section-head h3 { margin:0; font-size:1rem; }
.score-dialog-section-head small { color:var(--muted); font-size:.68rem; }
.score-dialog-breakdown-rows { border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.score-dialog-breakdown-rows > div {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:12px;
  padding:9px 11px;
  border-bottom:1px solid var(--line);
  font-size:.78rem;
}
.score-dialog-breakdown-rows > div:last-child { border-bottom:0; }
.score-dialog-breakdown-rows > div > span:first-child { display:grid; gap:2px; }
.score-dialog-breakdown-rows strong { font-size:.76rem; }
.score-dialog-breakdown-rows small { color:var(--muted); font-size:.64rem; }
.score-dialog-breakdown-rows > div > span:last-child { font-weight:900; font-variant-numeric:tabular-nums; white-space:nowrap; }
.score-dialog-empty { margin:0; padding:14px; color:var(--muted); font-size:.78rem; line-height:1.45; }
.score-dialog-checksum { display:flex; justify-content:space-between; gap:12px; margin:10px 20px 0; padding:11px 12px; border-radius:9px; background:#edf4ff; color:#244a93; font-size:.8rem; font-weight:900; }
.score-dialog-checksum strong { font-variant-numeric:tabular-nums; }
.score-dialog-note { margin:10px 20px 20px; color:var(--muted); font-size:.75rem; line-height:1.45; }

@media (max-width:600px) {
  .player-score-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); }
  .player-score-dialog-shell { max-height:calc(100dvh - 16px); }
  .player-score-dialog-head { padding:14px; }
  .score-dialog-total-row { padding:14px; }
  .score-dialog-total-row strong { font-size:1.35rem; }
  .score-dialog-facts { grid-template-columns:1fr; padding:12px 14px 0; }
  .score-dialog-rule,
  .score-dialog-fixture { margin:8px 14px 0; }
  .score-dialog-breakdown { padding:15px 14px 0; }
  .score-dialog-section-head { align-items:flex-start; flex-direction:column; gap:2px; }
  .score-dialog-breakdown-rows > div { gap:8px; padding:9px; }
  .score-dialog-checksum { margin:9px 14px 0; }
  .score-dialog-note { margin:9px 14px 16px; }
}

/* V1.1.9+: community scoring editor and auditable legacy -5 override. */
.scoring-editor-card { overflow:visible; }
.editable-scoring-table .score-cell { padding:6px; }
.editable-scoring-table input[type="number"] {
  width:78px;
  min-height:38px;
  padding:7px 8px;
  border:1px solid #bdc9c2;
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  font:inherit;
  font-weight:900;
  text-align:center;
  font-variant-numeric:tabular-nums;
}
.editable-scoring-table input[type="number"]:focus {
  outline:3px solid rgba(45,100,214,.2);
  border-color:var(--royal-blue);
}
.score-not-applicable { color:var(--muted); }
.scoring-editor-actions,
.scoring-reset-form {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  margin-top:14px;
}
.scoring-editor-actions span,
.scoring-reset-form small { color:var(--muted); font-size:.76rem; }
.btn.secondary { background:#f5f7f5; border-color:#cbd4cf; }
.legacy-rule-note {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
}
.legacy-rule-note h2 { margin-bottom:6px; }
.legacy-rule-note p { margin:0; max-width:900px; color:var(--muted); }
.score-dialog-legacy-summary {
  display:grid;
  gap:4px;
  margin:12px 20px 0;
  padding:11px 12px;
  border:1px solid #e0b2b2;
  border-radius:9px;
  background:#fff1f1;
  color:#7f2525;
  font-size:.76rem;
}
.score-dialog-legacy-summary[hidden] { display:none; }
.score-dialog-manual-summary {
  display:grid;
  gap:4px;
  margin:12px 20px 0;
  padding:11px 12px;
  border:1px solid #9cb8e8;
  border-radius:9px;
  background:#f0f5ff;
  color:#244a93;
  font-size:.76rem;
}
.score-dialog-manual-summary[hidden] { display:none; }
.score-dialog-admin {
  margin:0 20px 20px;
  padding:14px;
  border:1px solid #d7c08b;
  border-radius:11px;
  background:#fffaf0;
}
.score-dialog-admin[hidden],
.score-dialog-admin form[hidden] { display:none; }
.score-dialog-admin form { display:grid; gap:10px; margin:0; }
.score-dialog-admin label { display:grid; gap:6px; font-size:.76rem; font-weight:850; }
.score-dialog-admin textarea,
.score-dialog-admin input[type="number"] {
  width:100%;
  resize:vertical;
  padding:9px 10px;
  border:1px solid #c8cfc9;
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  font:inherit;
  font-weight:500;
}
.score-dialog-admin p { margin:0; color:#704d00; font-size:.76rem; line-height:1.45; }
.score-dialog-admin .btn { justify-self:start; }
.score-dialog-manual-admin { border-color:#9cb8e8; background:#f5f8ff; }
.score-dialog-manual-admin p { color:#294e99; }
.matrix-player-row.manual-legacy-override { background:#fff0f0; box-shadow:inset 3px 0 #b53b3b; }
.matrix-player-row.manual-player-score { background:#f2f6ff; box-shadow:inset 3px 0 #527ccc; }
.mini-player-score-trigger.manual-legacy-override { border-color:#d99191; background:#fff3f3; }
.mini-player-score-trigger.manual-player-score { border-color:#9cb8e8; background:#f3f7ff; }
.manual-player-create-card { display:grid; gap:14px; margin-bottom:18px; }
.manual-player-create-card h2 { margin:6px 0 4px; }
.manual-player-create-card p { margin:0; max-width:980px; }
.manual-player-create-form {
  display:grid;
  grid-template-columns:minmax(190px,1.4fr) minmax(170px,1fr) minmax(150px,.8fr) auto;
  align-items:end;
  gap:10px;
}
.manual-player-create-form label { display:grid; gap:5px; font-size:.76rem; font-weight:850; }
.manual-player-create-form input,
.manual-player-create-form select { min-height:42px; }

@media (max-width:600px) {
  .legacy-rule-note { display:grid; }
  .editable-scoring-table input[type="number"] { width:70px; min-height:42px; }
  .scoring-editor-actions,
  .scoring-reset-form { align-items:stretch; flex-direction:column; }
  .scoring-editor-actions .btn,
  .scoring-reset-form .btn { width:100%; text-align:center; }
  .score-dialog-legacy-summary,
  .score-dialog-manual-summary { margin:8px 14px 0; }
  .score-dialog-admin { margin:0 14px 16px; }
  .score-dialog-admin .btn { width:100%; }
  .manual-player-create-form { grid-template-columns:1fr; }
  .manual-player-create-form .btn { width:100%; }
}

@media (min-width:601px) and (max-width:1050px) {
  .manual-player-create-form { grid-template-columns:1fr 1fr; }
}
