:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-2: #f8fbff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #dbe2ea;
  --blue: #1f78d1;
  --orange: #f58a00;
  --green: #15b95e;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  --danger: #ef4444;
  --team-one: #1f78d1;
  --team-one-soft: #e8f3ff;
  --team-two: #15B95E;
  --team-two-soft: #e7f8ef;
}

body.dark-theme {
  --bg: #0b1325;
  --panel: #081224;
  --panel-2: #0d1a31;
  --text: #e5edf8;
  --muted: #94a3b8;
  --line: #22304a;
  --shadow: 0 10px 25px rgba(0,0,0,0.35);
  --team-one-soft: #133457;
  --team-two-soft: #4a2b05;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: calc(16px * var(--font-scale, 1));
}
button, input, select, textarea { font: inherit; }
button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
}
.container {
  width: min(1600px, 96vw);
  margin: 18px auto 36px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.brand h1 { margin: 0; font-size: 1.6rem; }
.brand p { margin: 4px 0 0; color: var(--muted); }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.grid-main {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 16px;
}
.sidebar { padding: 16px; display: grid; gap: 14px; align-content: start; }
.main { display: grid; gap: 16px; }
.card { padding: 16px; }
.card h2, .card h3 { margin: 0 0 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-grid .full { grid-column: 1 / -1; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 12px;
}
.small { font-size: 0.9rem; color: var(--muted); }
.primary { background: var(--green); color: white; }
.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.blue-btn { background: var(--blue); color: white; }
.orange-btn { background: var(--orange); color: white; }
.danger { background: var(--danger); color: white; }
.ghost { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.player-list, .queue-list { display: grid; gap: 8px; max-height: 400px; overflow: auto; }
.player-row, .queue-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.player-actions, .queue-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: end; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.15);
  color: #7c3aed;
  font-size: 0.78rem;
  font-weight: 700;
}
.skill-stars { display: inline-flex; gap: 2px; cursor: pointer; }
.star { font-size: 1rem; opacity: 0.35; color: #b8b8b8; }
.star.active { opacity: 1; color: #d4a017; }
.court-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.court-card { overflow: hidden; }
.court-head {
  padding: 14px 16px;
  background: linear-gradient(90deg, #081224, #0d1a31);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.court-body { padding: 16px; }
.live-badge {
  display: inline-block;
  background: #ef1111;
  color: white;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-weight: 700;
}
.match-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; }
.team-card {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.team-header { color: white; font-weight: 700; padding: 10px 14px; }
.team-header.team-one { background: var(--team-one); }
.team-header.team-two { background: var(--team-two); }
.team-players { padding: 14px; background: color-mix(in srgb, var(--panel-2) 90%, white); min-height: 146px; display: grid; gap: 8px; }
body.dark-theme .team-players { background: #13243d; }
.team-players.team-one-bg { background: var(--team-one-soft); }
.team-players.team-two-bg { background: var(--team-two-soft); }
.vs { font-size: 1.4rem; font-weight: 800; color: var(--muted); }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.queue-board { border: 2px solid color-mix(in srgb, var(--team-one) 35%, white); background: color-mix(in srgb, var(--team-one-soft) 55%, white); }
body.dark-theme .queue-board { background: #0d1f19; }
.queue-board .head { display:flex; justify-content: space-between; align-items:center; padding: 12px 16px; border-bottom: 1px solid #9de0b2; }
.queue-board .content { padding: 0; }
.upnext-stacked { display: grid; grid-template-columns: 1fr 1fr; }
.upnext-team-title { font-weight: 800; padding: 10px 14px; color: white; }
.upnext-team-title.blue { background: var(--team-one); }
.upnext-team-title.orange { background: var(--team-two); }
.upnext-col { min-height: 120px; padding: 14px; border-right: 1px solid #b8e8c5; }
.upnext-col:last-child { border-right: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat-box { padding: 14px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); }
.table-wrap { overflow: auto; }
.standings-table { width: 100%; border-collapse: collapse; }
.standings-table th, .standings-table td { padding: 10px; border-bottom: 1px solid var(--line); text-align: left; }
.display-body { padding: 22px; }
.display-wrap { max-width: 1800px; margin: 0 auto; display: grid; gap: 18px; }
.display-header { text-align: center; }
.display-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(520px, 1fr)); gap: 16px; }
.display-card { background: var(--panel); border: 1px solid rgba(255,255,255,.14); border-radius: 26px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 0 0 1px rgba(15,23,42,.35), var(--shadow); }
.display-card-header { display:flex; justify-content:space-between; align-items:center; padding: 14px 18px; background:#081224; color:#fff; border-bottom:1px solid rgba(255,255,255,.08); }
.display-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; padding: 18px; }
.team-block { border-radius: 18px; overflow: hidden; padding: 16px; min-height: 180px; }
.team-block.blue { background: var(--team-one-soft); color: #3a2c00; }
.team-block.orange { background: var(--team-two-soft); color: #0f172a; }
.queue-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px; }
.queue-item { display:flex; gap:12px; align-items:center; padding:12px; border-radius:14px; background: var(--panel-2); }
.queue-num { font-size: 1.8rem; color: #00f59a; font-weight: 800; }
.green-card .display-card-header { background: #0f5030; }
.notice { padding: 10px 12px; border-radius: 12px; background: rgba(37,99,235,.12); color: var(--text); border: 1px solid rgba(37,99,235,.22); }
.muted { color: var(--muted); }
.two-col { display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pill { display:inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(34,197,94,.15); color: #15803d; font-size: .8rem; font-weight: 700; }
.hidden { display:none; }
@media (max-width: 1100px) { .grid-main { grid-template-columns: 1fr; } .stat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 768px) { .court-grid, .display-grid, .two-col, .form-grid, .stat-grid, .upnext-stacked { grid-template-columns: 1fr; } .match-grid { grid-template-columns: 1fr; } }


.player-section-head { display:flex; justify-content:space-between; align-items:end; gap:8px; margin-bottom:10px; }
.player-toolbar { display:grid; gap:10px; margin-bottom:12px; }
.player-summary { display:flex; flex-wrap:wrap; gap:8px; }
.player-row.compact { padding: 8px 10px; }
.player-main { display:grid; gap:8px; min-width:0; }
.player-topline { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.player-meta { display:flex; flex-wrap:wrap; gap:8px; align-items:center; color:var(--muted); font-size:.88rem; }
.status-badge { display:inline-flex; align-items:center; border-radius:999px; padding:4px 10px; font-size:.76rem; font-weight:800; }
.status-available { background: rgba(21,185,94,.14); color:#15803d; }
.status-queued { background: rgba(37,99,235,.14); color:#1d4ed8; }
.status-upnext { background: rgba(245,138,0,.16); color:#c26b00; }
.status-playing { background: rgba(239,68,68,.14); color:#dc2626; }
.status-offline { background: rgba(100,116,139,.14); color:var(--muted); }
.empty-state { padding: 16px; border:1px dashed var(--line); border-radius:14px; background:var(--panel-2); color:var(--muted); text-align:center; }
.player-hidden-group { margin-top:12px; border-top:1px solid var(--line); padding-top:12px; }
.player-hidden-group summary { cursor:pointer; color:var(--muted); font-weight:700; margin-bottom:10px; }
.compact-list .player-actions button.blue-btn, .compact-list .player-actions button.orange-btn { display:none; }
@media (min-width: 769px) { .player-toolbar { grid-template-columns: 1fr auto; align-items:center; } }


.player-row {
  grid-template-columns: 1fr;
  gap: 12px;
}
.player-name {
  min-width: 0;
  overflow-wrap: anywhere;
}
.player-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}
.player-actions button {
  width: 100%;
  min-width: 0;
  padding: 10px 8px;
}
.player-actions.compact-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.player-meta span {
  white-space: normal;
}
@media (min-width: 1300px) {
  .player-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .player-topline {
    align-items: flex-start;
    flex-direction: column;
  }
  .player-actions,
  .player-actions.compact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.player-name-wrap { min-width: 0; }
.player-name { font-size: 1rem; line-height: 1.2; }
.player-inline-actions { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:8px; margin-top:8px; }
.player-inline-actions button { width:100%; }
.player-row.is-compact .player-inline-actions { display:none; }
.player-row.is-compact .player-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
.player-row button[disabled] { opacity:.5; cursor:not-allowed; }


.player-headline { display:flex; align-items:flex-start; gap:10px; min-width:0; }
.player-skill { flex-shrink:0; text-align:right; }
.pair-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
}
.pair-btn.active,
.pair-btn.selecting { border-color: var(--danger); color: var(--danger); }
.player-row.pair-source { border-color: var(--blue); box-shadow: 0 0 0 1px rgba(37,99,235,.18); }
.player-name {
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  padding: 0;
  text-align: left;
  min-width: 0;
  overflow-wrap: anywhere;
}
.player-name strong { font-weight: 800; }
.player-name.pair-target { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.player-name.pair-target:hover { color: var(--blue); }
.compact-meta { margin-top: 4px; }
.compact-meta span { display:inline-flex; align-items:center; }


.reports-layout { display:grid; }
.reports-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.reports-actions-top { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.reports-actions-top input, .reports-actions-top button { min-height:38px; padding:8px 10px; }
.reports-shell { display:grid; grid-template-columns: 240px 1fr; gap:12px; }
.reports-sidebar { border-right:1px solid var(--line); padding-right:10px; }
.report-list { display:grid; gap:6px; max-height:640px; overflow:auto; }
.report-list-item { text-align:left; background:var(--panel-2); border:1px solid var(--line); width:100%; border-radius:14px; box-sizing:border-box; }
.report-list-item.active { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); outline: none; }
.reports-main { display:grid; gap:10px; }
.report-status-bar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.report-table { font-size: .92rem; }
.report-table th, .report-table td { padding: 7px 8px; }
.report-table input, .report-table select { min-width:96px; min-height:34px; padding:7px 8px; border-radius:10px; }
.report-totals { padding:12px; }
.totals-grid { display:grid; grid-template-columns: repeat(5, 1fr); gap:8px; }
.reports-footer-actions { display:flex; gap:8px; flex-wrap:wrap; }
.reports-footer-actions button { min-height:36px; padding:8px 10px; }
@media (max-width: 1100px) {
  .reports-shell { grid-template-columns: 1fr; }
  .reports-sidebar { border-right:0; border-bottom:1px solid var(--line); padding-right:0; padding-bottom:12px; }
  .totals-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .player-inline-actions, .player-actions { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .totals-grid { grid-template-columns: 1fr; }
}


.settings-grid { display:grid; grid-template-columns: 1.2fr .8fr; gap:16px; }
.settings-card { border:1px solid var(--line); background:var(--panel-2); border-radius:18px; }
.toggle-field { display:grid; gap:8px; align-items:start; }
.toggle-field span { font-weight:600; }
.danger-zone { align-content:start; }
.report-line-no { color:var(--muted); font-weight:700; width:56px; }
.report-table button.danger { padding:8px 10px; }
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; } }


.topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:16px; }
.toolbar { margin-left:auto; }
.gear-btn { min-width:48px; font-size:1.2rem; padding:10px 12px; }
.modal-backdrop { position:fixed; inset:0; background:rgba(15,23,42,.45); display:grid; place-items:center; padding:24px; z-index:1000; }
.modal-card { width:min(760px, 100%); padding:18px; }
.modal-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:12px; }
.modal-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.icon-btn { min-width:44px; padding:10px 12px; }
.player-section-head > div { display:grid; gap:4px; }
.reports-footer-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
@media (max-width: 768px) { .topbar { flex-direction:column; align-items:stretch; } .toolbar { margin-left:0; } }


.report-list-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:10px;width:100%}
.report-list-row .report-list-item{flex:1;margin:0;min-width:0;padding:10px 12px;border-radius:14px;min-height:64px;display:flex;flex-direction:column;justify-content:center}
.report-list-row .report-list-item strong{display:block;font-size:.95rem;line-height:1.15;margin-bottom:2px}
.report-list-status{margin-top:2px}
.report-cancel-inline{width:34px;min-width:34px;height:34px;padding:0;display:grid;place-items:center;border-radius:12px;font-size:1rem;line-height:1;align-self:center}



@media (max-width: 640px) {
  .report-list-row{grid-template-columns:minmax(0,1fr) 42px}
}
.live-match-card { overflow: hidden; }
.display-card { background: var(--panel); border: 1px solid rgba(255,255,255,.14); border-radius: 26px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 0 0 1px rgba(15,23,42,.35), var(--shadow); }
.display-card-header { display:flex; justify-content:space-between; align-items:center; padding: 14px 18px; background:#081224; color:#fff; border-bottom:1px solid rgba(255,255,255,.08); }
.display-match-layout { display:grid; grid-template-columns: 1fr auto 1fr; gap:20px; align-items:stretch; padding:20px; }
.display-team-panel { border-radius: 22px; padding: 18px; border:1px solid rgba(8,18,36,.10); display:grid; gap:14px; min-height: 210px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.display-team-panel.theme-blue { background: linear-gradient(180deg, #60a5fa 0%, #2563eb 100%); color:#ffffff; }
.display-team-panel.theme-green { background: linear-gradient(135deg, #ffffff 0%, #d1fae5 28%, #86efac 62%, #16a34a 100%); color:#062b16; }
.display-team-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.display-team-label { font-size: 1.15rem; font-weight: 800; letter-spacing: .06em; }
.display-team-sub { font-size: .92rem; opacity: .75; margin-top: 4px; }
.display-player-list { display:grid; gap:12px; align-content:start; }
.display-player-list.single-player { align-content:center; }
.display-player-chip { display:grid; grid-template-columns: 38px 1fr; gap:12px; align-items:center; background: rgba(255,255,255,.55); border:1px solid rgba(8,18,36,.08); border-radius: 18px; padding: 12px 14px; min-height: 64px; }
.display-player-number { width: 38px; height: 38px; border-radius: 999px; display:grid; place-items:center; font-weight: 800; background: rgba(8,18,36,.1); }
.display-player-name { font-size: 1.3rem; font-weight: 800; line-height: 1.15; word-break: break-word; }
.display-player-empty { min-height: 120px; border: 2px dashed rgba(8,18,36,.18); border-radius: 18px; display:grid; place-items:center; font-weight:700; opacity:.7; }
.display-team-panel.theme-blue .display-team-label,
.display-team-panel.theme-blue .display-team-sub,
.display-team-panel.theme-blue .display-player-name,
.display-team-panel.theme-green .display-team-label,
.display-team-panel.theme-green .display-team-sub,
.display-team-panel.theme-green .display-player-name { color:#062b16; }
.display-team-panel.theme-blue .display-team-sub,
.display-team-panel.theme-green .display-team-sub { opacity:.9; }
.display-team-panel.theme-blue .display-player-chip,
.display-team-panel.theme-green .display-player-chip { background: rgba(255,255,255,.72); border-color: rgba(6,43,22,.10); }
.display-team-panel.theme-blue .display-player-number,
.display-team-panel.theme-green .display-player-number { background: rgba(6,43,22,.10); color:#062b16; }
.display-team-panel.theme-blue .display-player-empty,
.display-team-panel.theme-green .display-player-empty { border-color: rgba(6,43,22,.18); color: #14532d; opacity:1; background: rgba(255,255,255,.54); }
.display-vs-wrap { display:grid; place-items:center; }
.display-vs-badge { width: 90px; height: 90px; border-radius: 999px; display:grid; place-items:center; font-size: 1.5rem; font-weight: 900; letter-spacing: .08em; background: #081224; color:#fff; box-shadow: 0 14px 28px rgba(8,18,36,.22); }
@media (max-width: 1024px) {
  .display-match-layout { grid-template-columns: 1fr; }
  .display-vs-wrap { order: 2; }
  .display-vs-badge { width: 72px; height: 72px; font-size: 1.2rem; }
}

.live-badge.ready { background: #16a34a; }
.forecast-stack { display:grid; gap:14px; padding:16px; }
.forecast-card { border:1px solid color-mix(in srgb, var(--team-one) 25%, white); border-radius:18px; background: rgba(255,255,255,.75); overflow:hidden; }
body.dark-theme .forecast-card { background: rgba(8,18,36,.78); border-color:#1f5f46; }
.forecast-card.is-ready { box-shadow: inset 0 0 0 1px rgba(21,185,94,.15); }
.forecast-head { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:12px 14px; border-bottom:1px solid var(--line); }
.forecast-body { display:grid; grid-template-columns: 1fr auto 1fr; gap:12px; align-items:stretch; padding:14px; }
.forecast-vs { display:grid; place-items:center; font-weight:900; color:var(--muted); min-width:56px; }
.forecast-team { display:grid; gap:10px; min-height:84px; padding:12px; background: var(--panel-2); border:1px solid var(--line); border-top:0; border-radius:0 0 16px 16px; }
.queue-player-pill { display:grid; gap:3px; padding:10px 12px; border-radius:14px; background: rgba(255,255,255,.72); border:1px solid rgba(15,23,42,.08); }
body.dark-theme .queue-player-pill { background: rgba(19,36,61,.9); border-color:#24344f; }
.queue-player-pill strong { font-size:1rem; }
.queue-player-pill span, .queue-player-pill em { font-size:.82rem; color:var(--muted); font-style:normal; }

.status-ready-card { border-color: rgba(34,197,94,.45); box-shadow: inset 0 0 0 1px rgba(34,197,94,.14), 0 0 0 1px rgba(15,23,42,.35), var(--shadow); }
.status-ready-card .display-card-header { background: linear-gradient(90deg, #146c43, #15803d); }
.display-vs-badge.ready { background: #166534; }
.queue-grid.enhanced { grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; padding:16px; }
.queue-item { display:flex; align-items:center; gap:14px; padding:16px 18px; border-radius:18px; background: linear-gradient(180deg, rgba(9,27,59,.96), rgba(5,20,44,.96)); border:1px solid rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.03); min-height:86px; }
.queue-copy { display:grid; gap:4px; min-width:0; }
.queue-copy strong { font-size:1.3rem; line-height:1.05; color:#fff; word-break:break-word; }
.queue-copy small { font-size:.95rem; color:#b7c6dd; }
.queue-num { width:46px; height:46px; display:grid; place-items:center; border-radius:999px; flex:0 0 auto; font-size:1.35rem; color:#00f59a; background: rgba(0,245,154,.08); border:1px solid rgba(0,245,154,.16); }

@media (max-width: 768px) {
  .forecast-body { grid-template-columns: 1fr; }
  .forecast-vs { min-height:40px; }
  .queue-grid.enhanced { grid-template-columns: 1fr; }
}


.play-order-embedded {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}
.player-section-head.embedded h3 {
  margin: 0;
  font-size: 1rem;
}
.queue-list.embedded {
  margin-top: 10px;
  display: grid;
  gap: 10px;
}
.player-toolbar input {
  min-height: 42px;
}
.player-row.compact {
  border-radius: 14px;
}
.player-inline-actions button, .player-actions button, .player-section-head .secondary {
  min-height: 40px;
}
.empty-state {
  border-radius: 14px;
}


:root {
  --surface-soft: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,250,253,0.96));
  --surface-accent: linear-gradient(135deg, rgba(31,120,209,0.08), rgba(21,185,94,0.08));
}
body {
  background:
    radial-gradient(circle at top left, rgba(31,120,209,0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(21,185,94,0.08), transparent 24%),
    var(--bg);
}
body.dark-theme {
  background:
    radial-gradient(circle at top left, rgba(31,120,209,0.15), transparent 28%),
    radial-gradient(circle at top right, rgba(21,185,94,0.12), transparent 22%),
    var(--bg);
}
.container { margin-top: 24px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: color-mix(in srgb, var(--panel) 88%, white);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
  backdrop-filter: blur(16px);
}
body.dark-theme .topbar { background: color-mix(in srgb, var(--panel) 92%, black); }
.brand h1 { font-size: 1.75rem; letter-spacing: -0.03em; }
.brand p { max-width: 700px; }
.toolbar {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 6px;
}
button {
  font-weight: 700;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.primary, .blue-btn, .orange-btn, .danger {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}
.secondary, .ghost {
  background: color-mix(in srgb, var(--panel) 55%, var(--panel-2));
}
.panel, .card, .stat-box, .queue-player-pill, .report-list-item {
  backdrop-filter: blur(6px);
}
.panel {
  background: var(--surface-soft);
}
body.dark-theme .panel { background: linear-gradient(180deg, rgba(8,18,36,0.98), rgba(11,19,37,0.98)); }
.sidebar {
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 88%, white), color-mix(in srgb, var(--panel-2) 92%, white));
}
body.dark-theme .sidebar {
  background: linear-gradient(180deg, rgba(8,18,36,0.98), rgba(13,26,49,0.98));
}
.card {
  border-radius: 20px;
}
.card h2, .card h3 { letter-spacing: -0.02em; }
.form-grid input, .form-grid select, .form-grid textarea,
.report-table input, .report-table select {
  min-height: 34px;
}
input, select, textarea {
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--blue) 65%, white);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 15%, transparent);
  background: var(--panel);
}
.player-toolbar input {
  min-height: 48px;
}
.player-list, .queue-list, .report-list {
  padding-right: 4px;
}
.player-row, .queue-row {
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 45%, var(--panel-2)), var(--panel-2));
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}
.player-row.compact { padding: 12px; }
.player-row:hover, .queue-row:hover, .report-list-item:hover {
  border-color: color-mix(in srgb, var(--blue) 25%, var(--line));
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
}
.player-headline {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.player-name {
  background: transparent;
  padding: 0;
  border: 0;
  text-align: left;
  font-weight: 800;
  color: var(--text);
  font-size: 1rem;
}
.player-name-wrap { min-width: 0; }
.player-inline-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.player-inline-actions button { min-width: 120px; }
.pair-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.pair-btn.active { background: rgba(239,68,68,.12); color: #dc2626; border-color: rgba(239,68,68,.25); }
.pair-btn.selecting { background: rgba(31,120,209,.12); color: var(--blue); border-color: rgba(31,120,209,.25); }
.pair-target { color: var(--blue); }
.play-order-embedded {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: var(--surface-accent);
}
body.dark-theme .play-order-embedded {
  background: linear-gradient(180deg, rgba(31,120,209,0.12), rgba(21,185,94,0.08));
}
.queue-row {
  grid-template-columns: 1fr auto;
  align-items: center;
}
.queue-row strong { font-size: .98rem; }
.stat-grid { gap: 12px; }
.stat-box {
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 40%, var(--panel-2)), var(--panel-2));
}
.stat-box strong { font-size: 1.25rem; letter-spacing: -0.03em; }
.court-card {
  border-radius: 24px;
  box-shadow: 0 16px 30px rgba(15,23,42,.08);
}
.court-head {
  padding: 16px 18px;
  background: linear-gradient(135deg, #0e2038, #102747);
}
.live-badge.ready { background: #16a34a; }
.team-card {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.team-players > div {
  padding: 12px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 40%, white);
  border: 1px solid rgba(148,163,184,.15);
}
body.dark-theme .team-players > div { background: rgba(255,255,255,.04); }
.forecast-stack {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.forecast-card {
  border: 1px solid #b6e2c2;
  border-radius: 20px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(233,255,240,.85));
}
body.dark-theme .forecast-card { background: linear-gradient(180deg, rgba(12,31,25,.96), rgba(12,31,25,.78)); border-color: rgba(34,197,94,.25); }
.forecast-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.forecast-body {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}
.forecast-team {
  display: grid;
  gap: 8px;
  min-height: 98px;
  padding: 10px;
  border: 1px dashed rgba(148,163,184,.35);
  border-radius: 16px;
  background: rgba(255,255,255,.42);
}
body.dark-theme .forecast-team { background: rgba(255,255,255,.03); }
.forecast-vs {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--muted);
}
.queue-player-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 14px;
  background: rgba(255,255,255,.7);
}
body.dark-theme .queue-player-pill { background: rgba(255,255,255,.03); }
.queue-player-pill span, .queue-player-pill em { font-size: .84rem; color: var(--muted); }
.forecast-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.reports-layout .panel, .settings-grid .settings-card {
  border-radius: 24px;
}
.reports-head, .reports-actions-top, .report-status-bar, .reports-footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.reports-shell {
  display: grid;
  grid-template-columns: 300px minmax(0,1fr);
  gap: 16px;
  margin-top: 16px;
}
.reports-sidebar {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 50%, var(--panel-2)), var(--panel-2));
}
.report-list { display: grid; gap: 10px; }
.report-list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.report-list-item {
  width: 100%;
  text-align: left;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 55%, var(--panel-2)), var(--panel-2));
}
.report-list-item.active {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34,197,94,.18), 0 10px 18px rgba(15,23,42,.08);
}
.report-list-status { margin-top: 4px; }
.report-cancel-inline {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 14px;
}
.report-table th {
  background: color-mix(in srgb, var(--panel-2) 85%, white);
  position: sticky;
  top: 0;
}
.report-table td, .report-table th { vertical-align: middle; }
.report-line-no { font-weight: 800; color: var(--muted); }
.report-totals { margin-top: 16px; }
.totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.settings-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-top: 14px;
}
.settings-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 40%, white), var(--panel-2));
}
.toggle-field {
  display: grid;
  gap: 8px;
}
.danger-zone {
  border-color: rgba(239,68,68,.18);
  background: linear-gradient(180deg, rgba(254,242,242,.9), rgba(255,255,255,.96));
}
body.dark-theme .danger-zone { background: linear-gradient(180deg, rgba(69,10,10,.65), rgba(8,18,36,.98)); }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.38);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 30;
}
.modal-card {
  width: min(760px, 100%);
  padding: 18px;
  border-radius: 24px;
}
.modal-head, .modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal-actions { margin-top: 14px; }
.icon-btn { width: 42px; height: 42px; min-width: 42px; padding: 0; }
.gear-btn { min-width: 48px; }
@media (max-width: 1100px) {
  .reports-shell, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .topbar { position: static; }
  .toolbar { width: 100%; justify-content: flex-start; }
  .forecast-body, .reports-head, .reports-actions-top, .report-status-bar, .reports-footer-actions { grid-template-columns: 1fr; }
  .forecast-body { grid-template-columns: 1fr; }
  .queue-player-pill { flex-direction: column; align-items: flex-start; }
}


/* v15 simplified player UI */
.stacked-toolbar { grid-template-columns: 1fr; }
.simplified-list { gap: 10px; }
.player-row.simplified {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
}
.simplified-main { min-width: 0; }
.simplified-headline { align-items: flex-start; }
.player-stars-below { margin-top: 4px; line-height: 1; }
.player-stars-below .skill-stars { display: inline-flex; }
.player-stars-below .star { font-size: 0.82rem; }
.player-row.simplified .player-meta { margin-top: 6px; font-size: .88rem; gap: 6px; }
.icon-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  flex-wrap: nowrap;
}
.icon-action,
.icon-actions .pair-btn {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: .95rem;
  cursor: pointer;
}
.icon-action.active { background: rgba(34,197,94,.12); color: #15803d; }
.icon-actions .pair-btn.selecting { background: rgba(37,99,235,.14); color: #1d4ed8; }
.icon-actions .pair-btn.active { background: rgba(124,58,237,.15); color: #7c3aed; }
.player-row.simplified .player-name {
  background: transparent;
  border: 0;
  color: var(--text);
  text-align: left;
  padding: 0;
  font-size: .96rem;
  line-height: 1.1;
  font-weight: 800;
}
.player-row.simplified .player-name.pair-target { color: #1d4ed8; text-decoration: underline; }
@media (max-width: 980px) {
  .forecast-stack {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .player-row.simplified {
    grid-template-columns: 1fr;
  }
  .icon-actions {
    justify-content: flex-end;
  }
}

.player-row.simplified .status-badge { padding: 4px 8px; font-size: .74rem; }
.player-row.simplified .compact-meta span:not(.status-badge):not(.tag) { font-size: .82rem; }
.player-row.simplified .tag { padding: 3px 7px; font-size: .72rem; }


/* v17 compact queue cards */
.player-row.simplified {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
}
.player-row.simplified .player-main {
  gap: 4px;
}
.player-row.simplified .player-name {
  font-size: 0.98rem;
  font-weight: 800;
}
.player-row.simplified .player-stars-below {
  margin-top: 2px;
  font-size: 0.82rem;
  line-height: 1;
}
.player-row.simplified .player-meta.compact-meta {
  gap: 6px;
  font-size: 0.8rem;
}
.player-row.simplified .status-badge {
  padding: 3px 8px;
  font-size: 0.68rem;
}
.player-row.simplified .tag {
  padding: 2px 6px;
  font-size: 0.68rem;
}
.player-row.simplified .player-actions.icon-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: auto;
}
.player-row.simplified .player-actions button,
.player-row.simplified .pair-btn,
.player-row.simplified .icon-action {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.player-row.simplified .icon-action.active {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}
.player-row.simplified.queue-status-playing {
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.9), rgba(255, 255, 255, 0.98));
  border-color: rgba(239, 68, 68, 0.35);
}
.player-row.simplified.queue-status-upnext {
  background: linear-gradient(180deg, rgba(255, 237, 213, 0.95), rgba(255, 255, 255, 0.98));
  border-color: rgba(245, 158, 11, 0.35);
}
.player-row.simplified.queue-status-queued,
.player-row.simplified.queue-status-available {
  background: linear-gradient(180deg, rgba(219, 234, 254, 0.9), rgba(255, 255, 255, 0.98));
  border-color: rgba(96, 165, 250, 0.32);
}
.player-row.simplified.queue-status-offline {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.95), rgba(255, 255, 255, 0.98));
  border-color: rgba(148, 163, 184, 0.28);
}
@media (max-width: 680px) {
  .player-row.simplified {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px 10px;
  }
  .player-row.simplified .player-actions.icon-actions {
    gap: 5px;
  }
  .player-row.simplified .player-actions button,
  .player-row.simplified .pair-btn,
  .player-row.simplified .icon-action {
    width: 30px;
    min-width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 0.84rem;
  }
}


/* v19 drag and drop */
.queue-player-pill, .court-player-pill { cursor: grab; user-select: none; }
.queue-player-pill:active, .court-player-pill:active { cursor: grabbing; }
.queue-player-pill:hover, .court-player-pill:hover { border-color: rgba(37,99,235,.35); box-shadow: 0 0 0 1px rgba(37,99,235,.08); }
.court-player-pill {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(15,23,42,.08);
}
body.dark-theme .court-player-pill { background: rgba(19,36,61,.9); border-color:#24344f; }
.player-row.simplified.queue-status-playing,
.player-row.simplified.queue-status-upnext,
.player-row.simplified.queue-status-queued,
.player-row.simplified.queue-status-available,
.player-row.simplified.queue-status-offline {
  background: var(--panel);
  border-color: rgba(148, 163, 184, 0.28);
}


/* v20 player picker + tap slots */
.player-picker-card { max-width: 780px; }
.player-picker-list { display: grid; gap: 10px; max-height: 65vh; overflow: auto; margin-top: 12px; }
.player-picker-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; padding: 14px 16px; border-radius: 16px;
  border: 1px solid var(--line); background: var(--panel);
}
.player-picker-row:hover { border-color: rgba(37,99,235,.35); box-shadow: 0 0 0 1px rgba(37,99,235,.08); }
.tap-add-slot {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 72px; padding: 12px 14px; border-radius: 16px;
  border: 2px dashed rgba(96,165,250,.55); background: rgba(239,246,255,.65);
  color: #4f7ae8; font-weight: 800; font-size: 1.02rem;
}
.tap-add-slot.filled {
  justify-content: space-between; border-style: solid; border-color: rgba(148,163,184,.24);
  background: rgba(255,255,255,.78); color: var(--text);
}
body.dark-theme .tap-add-slot { background: rgba(30,41,59,.45); }
.tap-add-copy { display: grid; gap: 4px; text-align: left; }
.tap-add-copy span { font-size: .84rem; color: var(--muted); }
.slot-clear {
  width: 28px; min-width: 28px; height: 28px; border-radius: 999px; padding: 0;
  border: 1px solid rgba(148,163,184,.3); background: transparent; color: var(--muted);
}

.slot-main {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
}
.slot-main .tap-add-copy { width: 100%; }
.queue-player-copy { display: grid; gap: 3px; }
.queue-player-pill { align-items: flex-start; }
.queue-player-pill strong { display: block; }
.forecast-team, .team-players { align-content: start; }
.team-players { display: grid; gap: 10px; }


.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.left-player-pane {
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: auto;
}
.dashboard-mainwrap {
  min-width: 0;
  display: grid;
  gap: 12px;
}


.icon-nav-btn { min-width: 48px; padding: 10px 12px; font-size: 1.05rem; }
.icon-text-btn { display:inline-flex; align-items:center; gap:8px; }
.btn-icon { display:inline-flex; align-items:center; justify-content:center; }
.add-player-launcher { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.add-player-launch-btn { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-width: 180px; }
.modal-card.add-player-modal-card { width:min(680px, 92vw); }
.add-player-modal-form .modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top: 4px; }
.standings-page { display:grid; gap:16px; }
.standings-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.eyebrow { text-transform:uppercase; letter-spacing:.08em; font-size:.78rem; font-weight:800; color:var(--blue); margin-bottom:8px; }
.standings-hero h2 { margin:0 0 8px; }
.standings-hero-stats { display:grid; grid-template-columns: repeat(3, minmax(120px, 1fr)); gap:10px; min-width:min(520px, 100%); }
.stat-box.emphasis { background:linear-gradient(180deg, var(--panel-2), var(--panel)); }
.standings-podium-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap:16px; }
.podium-card { position:relative; overflow:hidden; }
.podium-card::after { content:''; position:absolute; inset:auto -20px -20px auto; width:110px; height:110px; border-radius:50%; background:rgba(255,255,255,.08); }
.podium-1 { border-color: rgba(245,138,0,.45); background: linear-gradient(180deg, rgba(245,138,0,.12), var(--panel)); }
.podium-2 { border-color: rgba(31,120,209,.35); background: linear-gradient(180deg, rgba(31,120,209,.1), var(--panel)); }
.podium-3 { border-color: rgba(21,185,94,.35); background: linear-gradient(180deg, rgba(21,185,94,.1), var(--panel)); }
.podium-rank { display:inline-flex; padding:6px 10px; border-radius:999px; font-weight:800; background:var(--panel-2); border:1px solid var(--line); margin-bottom:10px; }
.podium-metrics { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; margin-top:14px; }
.podium-metrics div { padding:12px; border-radius:14px; background:var(--panel-2); border:1px solid var(--line); }
.podium-metrics span { display:block; font-size:.78rem; color:var(--muted); margin-bottom:4px; }
.standings-table-card { padding-top: 18px; }
.standings-headline { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:12px; }
.leaderboard-table tbody tr:hover { background: rgba(31,120,209,.06); }
.rank-chip { display:inline-flex; align-items:center; justify-content:center; min-width:54px; padding:6px 10px; border-radius:999px; background:var(--panel-2); border:1px solid var(--line); font-weight:800; }
.winrate-cell { display:flex; align-items:center; gap:10px; min-width: 150px; }
.winrate-bar { flex:1; height:10px; background:var(--panel-2); border-radius:999px; overflow:hidden; border:1px solid var(--line); }
.winrate-bar span { display:block; height:100%; background:linear-gradient(90deg, var(--blue), var(--green)); border-radius:999px; }
@media (max-width: 980px) { .standings-hero, .add-player-launcher { flex-direction:column; align-items:stretch; } .standings-hero-stats, .standings-podium-grid { grid-template-columns: 1fr; min-width: 0; } }


/* v21 compact dashboard layout */
.dashboard-shell {
  display: grid;
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.left-player-pane {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.dashboard-mainwrap {
  min-width: 0;
  display: grid;
  gap: 10px;
}
.compact-player-card,
.compact-court-card,
.compact-queue-board,
.session-overview-inline,
.compact-add-court-card {
  border-radius: 18px;
}
.compact-player-card.card,
.compact-add-court-card.card,
.session-overview-inline.card {
  padding: 12px;
}
.compact-dashboard-main,
.main {
  gap: 12px;
}
.compact-head,
.player-section-head {
  margin-bottom: 8px;
}
.compact-head h2,
.player-section-head h2 {
  margin-bottom: 2px;
  font-size: 1.08rem;
}
.compact-toolbar,
.player-toolbar {
  gap: 8px;
  margin-bottom: 10px;
}
.player-list-actions {
  margin-bottom: 10px;
}
.simple-add-player-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.player-list.simplified-list {
  max-height: calc(100vh - 240px);
  gap: 6px;
}
.session-overview-inline {
  overflow: hidden;
}
.session-overview-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.session-overview-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 2px;
}
.session-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  line-height: 1;
}
.session-chip strong {
  font-size: 0.96rem;
}
.session-chip em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
}
.compact-court-grid,
.court-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.compact-court-card .court-head {
  padding: 12px 14px;
}
.compact-court-card .court-body {
  padding: 12px;
}
.compact-court-card .team-header {
  padding: 8px 12px;
  font-size: 0.86rem;
}
.compact-court-card .team-players {
  padding: 10px;
  min-height: 118px;
  gap: 8px;
}
.compact-court-card .cta-grid {
  gap: 8px;
  margin-top: 10px;
}
.compact-court-card .cta-grid button,
.compact-add-court-card button,
.compact-queue-board .head button {
  padding: 9px 12px;
}
.court-footnote {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
}
.compact-add-court-card {
  min-height: 170px !important;
  display: grid !important;
  place-items: center;
}
.compact-queue-board .head {
  padding: 10px 12px;
}
.compact-queue-board .head .small {
  margin-top: 2px;
}
.tap-add-slot {
  min-height: 60px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.94rem;
}
.tap-add-slot.filled {
  padding: 8px 10px;
}
.court-player-pill {
  padding: 8px 10px;
  border-radius: 12px;
}
.player-row.simplified {
  gap: 8px;
  padding: 8px 10px;
  border-radius: 14px;
}
.player-row.simplified .player-name {
  font-size: 0.92rem;
}
.player-row.simplified .player-stars-below {
  font-size: 0.76rem;
}
.player-row.simplified .player-meta.compact-meta {
  gap: 5px;
  font-size: 0.76rem;
}
.player-row.simplified .player-actions button,
.player-row.simplified .pair-btn,
.player-row.simplified .icon-action {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 0.8rem;
}
@media (max-width: 1200px) {
  .container {
    width: min(1600px, 97.5vw);
    margin: 12px auto 24px;
  }
  .dashboard-shell {
    grid-template-columns: minmax(250px, 300px) minmax(0, 1fr);
    gap: 10px;
  }
  .compact-court-grid,
  .court-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 920px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
  }
  .left-player-pane {
    position: static;
    max-height: none;
  }
  .session-overview-line {
    gap: 6px;
  }
}
@media (max-width: 680px) {
  .topbar {
    margin-bottom: 10px;
  }
  .brand h1 {
    font-size: 1.3rem;
  }
  .toolbar {
    gap: 6px;
  }
  .card,
  .sidebar,
  .court-body,
  .compact-player-card.card,
  .compact-add-court-card.card,
  .session-overview-inline.card {
    padding: 10px;
  }
  .session-overview-line {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  .session-overview-label {
    grid-column: 1 / -1;
  }
  .session-chip {
    width: 100%;
    justify-content: space-between;
  }
  .compact-court-card .match-grid,
  .compact-court-card .cta-grid,
  .compact-queue-board .head {
    grid-template-columns: 1fr;
  }
  .compact-court-card .court-head,
  .compact-queue-board .head,
  .court-footnote {
    flex-direction: column;
    align-items: flex-start;
  }
  .player-list.simplified-list {
    max-height: none;
  }
}


/* v22 next match + forecast two-column layout */
.forecast-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

@media (max-width: 900px) {
  .forecast-stack {
    grid-template-columns: 1fr;
  }
}
.team-one-btn { background: var(--team-one); color: white; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12); }
.team-two-btn { background: var(--team-two); color: white; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12); }
.forecast-grid-two { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:14px; padding:16px; }
@media (max-width: 768px) { .forecast-grid-two { grid-template-columns: 1fr; } }

.leaderboard-player-details summary { cursor:pointer; list-style:none; }
.leaderboard-player-details summary::-webkit-details-marker { display:none; }
.leaderboard-player-details summary strong { text-decoration: underline; text-underline-offset: 3px; }
.leaderboard-history-list { display:grid; gap:8px; margin-top:10px; min-width:260px; }
.leaderboard-history-item { border:1px solid var(--line); border-radius:14px; padding:10px 12px; background: var(--panel-2); display:grid; gap:4px; }
.leaderboard-history-top { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.leaderboard-history-empty { margin-top:10px; color:var(--muted); }



/* v23 compact leaderboard history */
.compact-history-list { gap: 6px; }
.compact-history-item {
  display: grid;
  grid-template-columns: auto auto 1fr 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
}
.compact-history-item .status-badge { white-space: nowrap; }
.history-court, .history-team, .history-opp, .history-score { white-space: nowrap; }
.history-team, .history-opp { overflow: hidden; text-overflow: ellipsis; }
.history-score { font-size: 1rem; }
@media (max-width: 900px) {
  .compact-history-item {
    grid-template-columns: auto auto 1fr auto;
  }
  .history-opp { grid-column: 1 / -2; }
}
@media (max-width: 640px) {
  .compact-history-item {
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }
  .history-team, .history-opp { grid-column: 1 / -1; }
}


/* v5 custom forecast and compact player panel */
.forecast-card .status-badge.status-upnext { background: rgba(37, 99, 235, 0.12); color: #1d4ed8; }
.player-row.simplified {
  border-radius: 12px;
  padding: 7px 9px;
  gap: 8px;
}
.player-row.simplified .player-name {
  font-size: 0.9rem;
  font-weight: 800;
}
.player-row.simplified .player-stars-below {
  margin-top: 2px;
}
.player-row.simplified .player-stars-below .star {
  font-size: 0.74rem;
}
.player-row.simplified .player-meta.compact-meta {
  margin-top: 4px;
  gap: 4px;
  font-size: 0.74rem;
  flex-wrap: wrap;
}
.player-row.simplified .status-badge {
  padding: 3px 7px;
  font-size: 0.66rem;
}
.player-row.simplified .player-actions button,
.player-row.simplified .pair-btn,
.player-row.simplified .icon-action {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.78rem;
}
.player-row.simplified.queue-status-available,
.player-row.simplified.queue-status-queued {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.95), rgba(255,255,255,0.98));
  border-color: rgba(148, 163, 184, 0.35);
}
.player-row.simplified.queue-status-upnext {
  background: linear-gradient(180deg, rgba(254, 249, 195, 0.72), rgba(255,255,255,0.98));
  border-color: rgba(234, 179, 8, 0.4);
}
.player-row.simplified.queue-status-playing {
  background: linear-gradient(180deg, rgba(220, 252, 231, 0.9), rgba(255,255,255,0.98));
  border-color: rgba(34, 197, 94, 0.35);
}
.player-row.simplified.queue-status-offline {
  background: linear-gradient(180deg, rgba(243, 244, 246, 0.92), rgba(255,255,255,0.98));
  border-color: rgba(209, 213, 219, 0.65);
}


/* v23 queue board shell cleanup */
.panel.queue-board,
.queue-board.compact-queue-board {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none;
}
.panel.queue-board .head,
.queue-board.compact-queue-board .head {
  border-bottom: 0;
}


/* Match forecast team headers */
.upnext-team-title {
  border-radius: 16px 16px 0 0;
}
.forecast-team {
  border-radius: 0 0 16px 16px;
}

/* Skill star hover cues */
.skill-stars .star {
  position: relative;
}
.skill-stars .star:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

/* Higher-contrast live external display */
.status-live-card {
  border-color: rgba(34, 197, 94, 0.42);
  box-shadow: 0 0 0 1px rgba(21, 185, 94, 0.18), 0 18px 36px rgba(0, 0, 0, 0.32);
}
.status-live-card .display-card-header {
  background: linear-gradient(90deg, #0f7a42, #17a34a);
  color: #ffffff !important;
}
.status-live-card .live-badge {
  background: #052e16;
  color: #dcfce7;
  border: 1px solid rgba(220, 252, 231, 0.28);
}
.status-live-card .display-vs-badge {
  background: #ffffff;
  color: #081224;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
}
.status-live-card .display-team-panel {
  border-color: rgba(255,255,255,.10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 14px 28px rgba(0,0,0,.24);
}
.status-live-card .display-team-panel.theme-blue {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  color: #ffffff !important;
}
.status-live-card .display-team-panel.theme-green {
  background: linear-gradient(145deg, #ffffff 0%, #ecfdf5 24%, #bbf7d0 58%, #22c55e 100%);
  color: #052e16;
}
.status-live-card .display-team-panel.theme-blue .display-team-label,
.status-live-card .display-team-panel.theme-blue .display-team-sub,
.status-live-card .display-team-panel.theme-blue .display-player-name {
  color: #ffffff !important;
}
.status-live-card .display-team-panel.theme-green .display-team-label,
.status-live-card .display-team-panel.theme-green .display-team-sub,
.status-live-card .display-team-panel.theme-green .display-player-name {
  color: #052e16;
}
.status-live-card .display-team-panel.theme-blue .display-team-sub,
.status-live-card .display-team-panel.theme-green .display-team-sub {
  opacity: .9;
}
.status-live-card .display-team-panel.theme-blue .display-player-chip {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.16);
}
.status-live-card .display-team-panel.theme-green .display-player-chip {
  background: rgba(255,255,255,.76);
  border-color: rgba(6,43,22,.10);
}
.status-live-card .display-team-panel.theme-blue .display-player-number {
  background: rgba(255,255,255,.18);
  color: #ffffff !important;
}
.status-live-card .display-team-panel.theme-green .display-player-number {
  background: rgba(6,43,22,.10);
  color: #052e16;
}
.status-live-card .display-team-panel.theme-blue .display-player-empty {
  border-color: rgba(255,255,255,.22);
  color: rgba(255,255,255,.9);
  opacity: 1;
}
.status-live-card .display-team-panel.theme-green .display-player-empty {
  border-color: rgba(6,43,22,.18);
  color: #14532d;
  opacity: 1;
}


/* Score dialog refresh-safe UI */
.score-dialog-card { max-width: 720px; width: min(92vw, 720px); }
.score-dialog-winner { margin: 6px 0 18px; padding: 12px 14px; border-radius: 14px; background: rgba(59,130,246,.08); color: #0f172a; font-weight: 600; }
.score-dialog-grid { display:grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: stretch; }
.score-input-card { display:grid; gap: 10px; padding: 18px; border-radius: 20px; border: 1px solid rgba(15,23,42,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.score-input-card input { width: 100%; font-size: 2.4rem; font-weight: 800; text-align: center; border-radius: 16px; border: 1px solid rgba(15,23,42,.12); padding: 16px 12px; background: rgba(255,255,255,.9); }
.score-team-label { font-size: .95rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.score-team-one { background: linear-gradient(180deg, rgba(96,165,250,.16), rgba(37,99,235,.08)); }
.score-team-two { background: linear-gradient(180deg, rgba(251,191,36,.2), rgba(245,158,11,.10)); }
.score-dialog-vs { display:grid; place-items:center; font-size: 1.3rem; font-weight: 900; color: #334155; letter-spacing: .08em; }

/* Interactive external display */
.display-match-meta { display:flex; gap:10px; align-items:center; justify-content:center; padding: 12px 18px 0; color: rgba(255,255,255,.76); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .78rem; }
.interactive-versus { align-items: center; }
.display-team-mark { width: 48px; height: 48px; border-radius: 999px; display:grid; place-items:center; font-weight: 900; font-size: 1.2rem; background: rgba(255,255,255,.22); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.25); }
.display-score-strip { margin-top: 18px; display:flex; align-items:center; gap: 10px; background: rgba(8,18,36,.9); color: #fff; border-radius: 18px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 12px 28px rgba(8,18,36,.28); }
.display-score-box { min-width: 92px; display:grid; gap: 4px; text-align:center; }
.display-score-box span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; opacity: .72; font-weight: 700; }
.display-score-box strong { font-size: 1.9rem; line-height: 1; }
.display-score-divider { font-size: 1.6rem; font-weight: 900; opacity: .8; }
.display-vs-badge.pulse { animation: displayPulse 1.8s ease-in-out infinite; }
@keyframes displayPulse { 0%,100% { transform: scale(1); box-shadow: 0 16px 34px rgba(0,0,0,.28); } 50% { transform: scale(1.06); box-shadow: 0 18px 40px rgba(34,197,94,.28); } }
.status-live-card .display-team-panel.theme-blue { background: linear-gradient(160deg, #7dd3fc 0%, #3b82f6 52%, #1d4ed8 100%); }
.status-live-card .display-team-panel.theme-green { background: linear-gradient(145deg, #ffffff 0%, #ecfdf5 24%, #bbf7d0 58%, #22c55e 100%); }
.status-live-card .display-score-strip { background: linear-gradient(180deg, rgba(8,18,36,.98), rgba(15,23,42,.94)); }
.status-ready-card .display-score-strip { background: rgba(15,23,42,.82); }
@media (max-width: 900px) {
  .score-dialog-grid { grid-template-columns: 1fr; }
  .score-dialog-vs { min-height: 20px; }
  .display-score-strip { margin-top: 12px; }
}


/* Score dialog winner validation and emphasis */
.score-dialog-rule {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.05);
  color: #475569;
  font-size: 0.92rem;
  font-weight: 600;
}
.score-input-card.score-winner-highlight {
  border-color: rgba(34, 197, 94, 0.55);
  background: linear-gradient(180deg, rgba(187,247,208,.82), rgba(34,197,94,.14));
  box-shadow: 0 0 0 1px rgba(34,197,94,.22), 0 18px 34px rgba(34,197,94,.12);
}
.score-input-card.score-winner-highlight .score-team-label {
  color: #166534;
}
.score-input-card.score-winner-highlight input {
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 0 0 4px rgba(34,197,94,.10);
}
.score-input-card.score-loser-muted {
  opacity: 0.96;
}
body.dark-theme .score-dialog-winner {
  background: rgba(59,130,246,.18);
  color: #dbeafe;
}
body.dark-theme .score-dialog-rule {
  background: rgba(255,255,255,.06);
  color: #cbd5e1;
}
body.dark-theme .score-input-card.score-winner-highlight {
  background: linear-gradient(180deg, rgba(20,83,45,.96), rgba(34,197,94,.22));
}
body.dark-theme .score-input-card.score-winner-highlight .score-team-label {
  color: #dcfce7;
}


.display-vs-subcopy { margin-top: 12px; font-size: .9rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.82); }
.standings-display-card .display-card-header { align-items: center; }
.standings-badge { padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); color: #dcfce7; border: 1px solid rgba(220,252,231,.18); font-size: .8rem; font-weight: 800; letter-spacing: .06em; }
.podium-grid { display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 18px; }
.podium-card { position: relative; overflow: hidden; border-radius: 22px; padding: 18px; min-height: 140px; display:grid; grid-template-columns: 62px 1fr; gap: 14px; align-items: center; border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.podium-card.gold { background: linear-gradient(135deg, #fef3c7, #f59e0b); color: #3b2200; }
.podium-card.silver { background: linear-gradient(135deg, #f8fafc, #cbd5e1); color: #0f172a; }
.podium-card.bronze { background: linear-gradient(135deg, #fed7aa, #c2410c); color: #3b1205; }
.podium-place { width: 62px; height: 62px; border-radius: 999px; display:grid; place-items:center; font-size: 1.65rem; font-weight: 900; background: rgba(255,255,255,.5); box-shadow: inset 0 1px 0 rgba(255,255,255,.45); }
.podium-copy { display:grid; gap: 6px; min-width: 0; }
.podium-copy strong { font-size: 1.3rem; line-height: 1.05; word-break: break-word; }
.podium-copy span { font-size: .86rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .88; }
.podium-copy small { font-size: .95rem; font-weight: 700; opacity: .86; }
.standings-table-wrap { padding: 0 18px 18px; }
.standings-table.enhanced-display { width: 100%; overflow: hidden; border-collapse: separate; border-spacing: 0 10px; }
.standings-table.enhanced-display thead th { color: #cbd5e1; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; border: 0; padding: 0 14px 4px; }
.standings-table.enhanced-display tbody tr { background: linear-gradient(180deg, rgba(9,27,59,.96), rgba(5,20,44,.96)); }
.standings-table.enhanced-display tbody td { padding: 14px; border: 0; color: #fff; font-weight: 700; }
.standings-table.enhanced-display tbody tr td:first-child { border-radius: 16px 0 0 16px; color: #86efac; width: 68px; }
.standings-table.enhanced-display tbody tr td:last-child { border-radius: 0 16px 16px 0; color: #bfdbfe; }
@media (max-width: 1100px) {
  .podium-grid { grid-template-columns: 1fr; }
}

.display-score-strip { display: none !important; }

/* Compact rebuild tweaks */
body {
  font-family: "Inter", "Roboto Condensed", "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  letter-spacing: -0.015em;
}
strong, h1, h2, h3, .brand h1, .team-header, .upnext-team-title { font-weight: 600; }
.left-player-pane { padding: 10px; }
.compact-player-card { padding: 10px; }
.player-list.simplified-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 7px;
  max-height: 74vh;
}
.player-row.simplified {
  padding: 8px;
  border-radius: 12px;
  gap: 6px;
}
.simplified-headline, .player-name-wrap { min-width: 0; }
.player-name {
  width: 100%;
  text-align: left;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-size: .98rem;
  font-weight: 600;
  border-radius: 0;
}
.player-stars-below .star { font-size: .84rem; }
.compact-meta {
  gap: 4px;
  font-size: .72rem;
  line-height: 1.2;
}
.games-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgba(15,23,42,.08);
  color: var(--text);
  font-size: .72rem;
  font-weight: 600;
}
.icon-actions {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}
.icon-action, .pair-btn {
  min-width: 30px;
  min-height: 30px;
  padding: 4px 7px;
  border-radius: 9px;
}
.danger-mini { color: #fff; background: var(--danger); }
.player-summary button.status-badge { border: 0; cursor: pointer; }
.add-skill-picker {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
}
.add-stars .star { font-size: 1.35rem; padding: 2px; cursor: pointer; }
.match-balanced { --balance-line: #16a34a; }
.match-slight-mismatch { --balance-line: #f59e0b; }
.match-heavy-mismatch { --balance-line: #ef4444; }
.forecast-card.match-balanced, .court-card.match-balanced { border: 2px solid #16a34a; }
.forecast-card.match-slight-mismatch, .court-card.match-slight-mismatch { border: 2px solid #f59e0b; }
.forecast-card.match-heavy-mismatch, .court-card.match-heavy-mismatch { border: 2px solid #ef4444; }
.balance-badge { background: var(--balance-line); color: #fff; }
.court-balance-label { color: rgba(255,255,255,.8); margin-top: 3px; }
.team-balance-card { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--balance-line) 35%, transparent); }
.team-one-btn { background: var(--team-one); color: #fff; }
.team-two-btn { background: var(--team-two); color: #fff; }
@media (max-width: 1200px) {
  .player-list.simplified-list { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); max-height: none; }
}

/* v24 leaderboard tabs and match history */
.leaderboard-tabs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.leaderboard-tabs button { white-space: nowrap; }
.match-history-table td, .match-history-table th { vertical-align: top; }
.match-history-table .winner-cell { font-weight: 800; background: rgba(34,197,94,.10); border-radius: 10px; }
.standings-table td strong { font-weight: 800; }
@media (max-width: 780px) {
  .leaderboard-tabs { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
  .leaderboard-tabs button:last-child { grid-column: 1 / -1; }
}

/* v24 left player pane layout - simple list like requested reference */
.left-player-pane {
  padding: 10px;
}
.compact-player-card.card {
  padding: 12px;
  border-radius: 16px;
}
.compact-head h2,
.player-section-head h2 {
  font-size: 1rem;
  letter-spacing: .01em;
  font-weight: 600;
}
.player-list.simplified-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  max-height: 74vh;
  overflow-y: auto;
  padding-right: 2px;
}
.player-row.simplified.gdp-player-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, .32);
  box-shadow: 0 1px 4px rgba(15, 23, 42, .06);
}
body.dark-theme .player-row.simplified.gdp-player-row {
  background: var(--panel-2);
}
.gdp-player-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.player-name-line {
  display: grid;
  grid-template-columns: minmax(70px, .9fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.player-row.simplified.gdp-player-row .player-name {
  width: auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .92rem;
  line-height: 1.1;
  font-weight: 600;
}
.player-stars-inline {
  line-height: 1;
  justify-self: start;
  white-space: nowrap;
}
.player-stars-inline .skill-stars {
  gap: 1px;
}
.player-stars-inline .star {
  font-size: .76rem;
}
.gdp-player-meta {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  overflow: hidden;
  white-space: nowrap;
  font-size: .68rem;
  line-height: 1.1;
  color: var(--muted);
}
.gdp-player-meta span {
  min-width: 0;
}
.gdp-player-meta .meta-sep {
  color: rgba(100, 116, 139, .65);
}
.gdp-player-meta .pair-note {
  overflow: hidden;
  text-overflow: ellipsis;
}
.gdp-player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 6px;
}
.player-row.simplified.gdp-player-row .icon-action,
.player-row.simplified.gdp-player-row .pair-btn,
.gdp-pair-btn {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, .13);
}
.checkout-action,
.player-row.simplified.gdp-player-row .checkout-action.active {
  background: #16a34a;
  color: #fff;
}
.gdp-pair-btn,
.player-row.simplified.gdp-player-row .pair-btn,
.icon-actions .pair-btn.gdp-pair-btn.active,
.icon-actions .pair-btn.gdp-pair-btn.selecting {
  background: #1d6eea;
  color: #fff;
}
.remove-action,
.player-row.simplified.gdp-player-row .remove-action.danger-mini {
  background: #ef3b2d;
  color: #fff;
}
.action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  line-height: 1;
  filter: grayscale(1) brightness(0) invert(1);
}
@media (max-width: 980px) {
  .player-list.simplified-list { max-height: none; }
}

/* v25 requested layout/settings updates */
.dashboard-shell {
  grid-template-columns: minmax(400px, 470px) minmax(0, 1fr) !important;
  gap: 18px;
}
.left-player-pane {
  min-width: 400px;
}
.player-name-line {
  grid-template-columns: minmax(120px, 1fr) auto;
}
.player-row.simplified.gdp-player-row {
  gap: 12px;
  padding: 9px 10px 9px 12px;
}
.gdp-player-actions { gap: 8px; }
.player-row.simplified.gdp-player-row .icon-action,
.player-row.simplified.gdp-player-row .pair-btn,
.gdp-pair-btn {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255,255,255,.7);
}
.logo-setting-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}
.logo-setting-preview img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  border-radius: 12px;
  background: #fff;
}
input[type="color"] {
  width: 100%;
  min-height: 42px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.match-balanced,
.match-slight-mismatch,
.match-heavy-mismatch {
  --team-one-soft: color-mix(in srgb, var(--team-one) 12%, white);
  --team-two-soft: color-mix(in srgb, var(--team-two) 14%, white);
}
@media (max-width: 1180px) {
  .dashboard-shell {
    grid-template-columns: minmax(360px, 420px) minmax(0, 1fr) !important;
  }
  .left-player-pane { min-width: 360px; }
}
@media (max-width: 980px) {
  .dashboard-shell {
    grid-template-columns: 1fr !important;
  }
  .left-player-pane {
    min-width: 0;
    position: relative;
    top: 0;
    max-height: none;
  }
}

/* v26 pair selection and queue status text updates */
.player-status-text {
  font-weight: 900;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.player-status-text.status-playing { color: #16a34a !important; }
.player-status-text.status-upnext { color: #d97706 !important; }
.player-status-text.status-queued { color: #2563eb !important; }
.player-status-text.status-available { color: #64748b !important; }
.player-status-text.status-offline { color: #94a3b8 !important; }
.player-wait-text { font-weight: 800; color: var(--muted); }
.player-wait-text.wait-warning { color: #f59e0b !important; }
.player-wait-text.wait-danger { color: #dc2626 !important; }
.gdp-player-meta .pair-note {
  color: #c026d3 !important;
  font-weight: 950;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
.gdp-player-meta .pair-note-icon {
  color: #d946ef !important;
  filter: none !important;
  font-size: .9rem;
  line-height: 1;
}
.player-row.simplified.gdp-player-row .player-name.pair-target {
  color: #c026d3 !important;
  font-weight: 950;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
}
.player-row.simplified.gdp-player-row.pair-source {
  border-color: rgba(192, 38, 211, .55) !important;
  box-shadow: 0 0 0 2px rgba(217, 70, 239, .18) !important;
}
.icon-actions .pair-btn.gdp-pair-btn.selecting,
.player-row.simplified.gdp-player-row .pair-btn.gdp-pair-btn.selecting {
  background: #c026d3 !important;
  color: #fff !important;
}
.icon-actions .pair-btn.gdp-pair-btn.active,
.player-row.simplified.gdp-player-row .pair-btn.gdp-pair-btn.active {
  background: #a21caf !important;
  color: #fff !important;
}

/* v27 paired color setting + cleaner court/matching view */
:root { --paired-color: #5E3C99; }
.gdp-player-meta .pair-note,
.gdp-player-meta .pair-note-icon,
.player-row.simplified.gdp-player-row .player-name.pair-target {
  color: var(--paired-color) !important;
}
.gdp-pair-btn,
.player-row.simplified.gdp-player-row .pair-btn,
.icon-actions .pair-btn.gdp-pair-btn.active,
.icon-actions .pair-btn.gdp-pair-btn.selecting {
  background: var(--paired-color) !important;
  color: #fff !important;
}

.clean-court-card {
  overflow: hidden;
  border-radius: 20px !important;
  background: var(--panel) !important;
  box-shadow: 0 10px 24px rgba(15,23,42,.07) !important;
}
.clean-court-head {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px !important;
}
.clean-court-head strong { font-size: 1.05rem; }
.clean-court-head .court-balance-label { color: var(--muted) !important; }
.clean-court-body { padding: 14px !important; }
.clean-match-grid {
  grid-template-columns: minmax(0,1fr) 48px minmax(0,1fr) !important;
  gap: 10px !important;
}
.clean-team-card {
  border-radius: 16px !important;
  border: 1px solid var(--line) !important;
  background: var(--panel) !important;
  box-shadow: none !important;
}
.clean-team-card .team-header {
  color: var(--text) !important;
  background: var(--panel-2) !important;
  border-bottom: 1px solid var(--line);
  font-size: .78rem !important;
  letter-spacing: .08em;
}
.clean-team-card .team-header.team-one { border-left: 5px solid var(--team-one); }
.clean-team-card .team-header.team-two { border-left: 5px solid var(--team-two); }
.clean-team-card .team-players,
.clean-team-card .team-players.team-one-bg,
.clean-team-card .team-players.team-two-bg {
  background: var(--panel) !important;
  min-height: 116px !important;
}
.clean-vs {
  width: 42px;
  height: 42px;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted) !important;
  font-size: .82rem !important;
  letter-spacing: .08em;
}
.court-actions-clean {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}
.court-actions-clean button { padding: 9px 10px; border-radius: 12px; }
.live-badge {
  border-radius: 999px !important;
  padding: 5px 10px !important;
  font-size: .72rem !important;
  letter-spacing: .06em;
}
.clean-match-preview {
  border-radius: 20px !important;
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
}
.clean-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px 16px 0;
}
.clean-section-head h3 { margin: 0 0 2px; }
.clean-section-head p { margin: 0; }
.clean-forecast-grid { padding: 14px 16px 16px !important; gap: 12px !important; }
.clean-match-preview .forecast-card {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 18px !important;
}
.clean-match-preview .forecast-head {
  margin: 0 !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--line);
}
.clean-match-preview .forecast-body {
  padding: 12px !important;
  gap: 10px !important;
}
.clean-match-preview .forecast-team {
  background: var(--panel-2) !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  min-height: 86px !important;
}
.clean-match-preview .forecast-vs {
  min-width: 38px;
  color: var(--muted) !important;
  font-size: .82rem !important;
}
.clean-match-preview .forecast-actions {
  padding: 0 12px 12px;
  margin-top: 0 !important;
}
.clean-match-preview .forecast-actions button { flex: 1; min-width: 130px; }
@media (max-width: 760px) {
  .clean-match-grid,
  .clean-match-preview .forecast-body { grid-template-columns: 1fr !important; }
  .court-actions-clean { grid-template-columns: 1fr; }
  .clean-vs { width: 100%; height: 34px; border-radius: 12px; }
}

/* v28 sleek court/matching typography */
.brand p { display: none !important; }
.clean-court-card,
.clean-match-preview,
.clean-preview-card {
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}
.clean-court-head strong,
.clean-match-preview .forecast-head strong {
  font-size: .95rem !important;
  font-weight: 650 !important;
  letter-spacing: .01em !important;
}
.clean-court-head .small,
.clean-match-preview .forecast-head .small,
.court-balance-label {
  font-size: .72rem !important;
  font-weight: 400 !important;
}
.clean-team-card .team-header,
.upnext-team-title {
  font-size: .68rem !important;
  font-weight: 650 !important;
  letter-spacing: .10em !important;
  text-transform: uppercase;
}
.clean-team-card .team-players,
.clean-match-preview .forecast-team {
  font-size: .82rem !important;
  font-weight: 400 !important;
}
.court-player-pill,
.tap-add-slot,
.forecast-slot-btn,
.clean-match-preview .tap-add-slot,
.clean-match-preview .forecast-slot-btn {
  font-size: .82rem !important;
  font-weight: 400 !important;
}
.court-player-pill strong,
.tap-add-copy strong,
.clean-match-preview .tap-add-copy strong {
  font-size: .86rem !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
}
.court-player-pill .small,
.tap-add-copy span,
.clean-match-preview .tap-add-copy span {
  font-size: .68rem !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
}
.court-player-pill em,
.tap-add-copy em,
.clean-match-preview .tap-add-copy em,
.clean-match-preview .pair-note,
.clean-court-card .pair-note {
  color: var(--paired-color) !important;
  font-size: .64rem !important;
  font-weight: 500 !important;
  line-height: 1.1 !important;
  font-style: normal !important;
}
.clean-vs,
.clean-match-preview .forecast-vs {
  font-size: .70rem !important;
  font-weight: 650 !important;
  letter-spacing: .12em !important;
}
.clean-match-preview .forecast-body.clean-match-grid {
  grid-template-columns: minmax(0,1fr) 48px minmax(0,1fr) !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding: 14px !important;
}
.clean-match-preview .forecast-card.clean-preview-card {
  overflow: hidden !important;
  border-radius: 20px !important;
  background: var(--panel) !important;
  box-shadow: 0 10px 24px rgba(15,23,42,.06) !important;
}
.clean-match-preview .forecast-card.clean-preview-card .forecast-team.team-players {
  background: var(--panel) !important;
  border: 0 !important;
  border-radius: 0 !important;
  min-height: 116px !important;
  padding: 12px !important;
}
.clean-match-preview .forecast-card.clean-preview-card .team-card.clean-team-card {
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
}
.clean-match-preview .forecast-actions {
  padding: 0 14px 14px !important;
}
.clean-match-preview .forecast-actions button,
.court-actions-clean button {
  font-size: .78rem !important;
  font-weight: 600 !important;
  padding: 8px 10px !important;
}
@media (max-width: 760px) {
  .clean-match-preview .forecast-body.clean-match-grid { grid-template-columns: 1fr !important; }
}

/* v29 compact players pane controls + playing wait cleanup */
.sleek-player-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 8px !important;
}
.sleek-player-head h2 { margin: 0 !important; }
.sleek-player-head .small {
  display: block !important;
  max-width: 230px !important;
  font-size: .68rem !important;
  line-height: 1.15 !important;
}
.sleek-player-actions {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 0 0 auto !important;
}
.mini-player-btn {
  min-height: 30px !important;
  padding: 6px 9px !important;
  border-radius: 999px !important;
  font-size: .72rem !important;
  line-height: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-weight: 750 !important;
  box-shadow: none !important;
}
.mini-player-btn span { font-size: .85rem !important; line-height: 1 !important; }
.sleek-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 8px !important;
  align-items: center !important;
  margin-bottom: 8px !important;
}
.sleek-search-wrap {
  min-width: 0 !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 0 10px !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: var(--panel-2) !important;
}
.sleek-search-wrap span { color: var(--muted) !important; font-size: .82rem !important; }
.sleek-search-wrap input {
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: .82rem !important;
  outline: none !important;
}
.sleek-summary {
  display: flex !important;
  gap: 5px !important;
  white-space: nowrap !important;
}
.sleek-summary .status-badge {
  padding: 6px 8px !important;
  font-size: .68rem !important;
  border-radius: 999px !important;
}
.player-list.simplified-list { max-height: calc(100vh - 198px) !important; }
@media (max-width: 560px) {
  .sleek-toolbar { grid-template-columns: 1fr !important; }
  .sleek-player-head { align-items: stretch !important; flex-direction: column !important; }
  .sleek-player-actions { width: 100% !important; }
  .mini-player-btn { flex: 1 !important; justify-content: center !important; }
}

/* Match balance rating text colors */
.balance-rating-text { font-weight: 800; }
.balance-rating-text.match-balanced { color: #16a34a; }
.balance-rating-text.match-slight-mismatch { color: #f59e0b; }
.balance-rating-text.match-heavy-mismatch { color: #ef4444; }
body.dark-theme .balance-rating-text.match-balanced { color: #4ade80; }
body.dark-theme .balance-rating-text.match-slight-mismatch { color: #fbbf24; }
body.dark-theme .balance-rating-text.match-heavy-mismatch { color: #f87171; }

/* Login and grouped settings refinements */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(420px, 100%);
  padding: 24px;
  border-radius: 24px;
}
.login-brand h1 {
  margin: 0 0 6px;
}
.login-form {
  margin-top: 16px;
}
.settings-group-form {
  display: grid;
  gap: 16px;
}
.settings-save-btn {
  width: 100%;
  min-height: 44px;
}

.self-checkin-body {
  min-height: 100vh;
  background: radial-gradient(circle at top, color-mix(in srgb, var(--green) 16%, var(--bg)), var(--bg));
}
.self-checkin-wrap {
  width: min(560px, 94vw);
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 24px 0;
}
.self-checkin-card { padding: 24px; width: 100%; }
.self-checkin-brand { text-align: center; display: grid; gap: 6px; justify-items: center; margin-bottom: 18px; }
.self-checkin-brand h1 { margin: 0; font-size: 1.65rem; }
.self-checkin-logo { max-width: 120px; max-height: 120px; object-fit: contain; }
.self-checkin-form { margin-top: 14px; }
.self-checkin-footnote { margin: 14px 0 0; text-align: center; }
.self-checkin-success { background: rgba(21,185,94,.14); border-color: rgba(21,185,94,.35); }
.self-checkin-error { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.32); }
.external-checkin-settings { display: grid; gap: 12px; }
.toggle-line { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.toggle-line input { width: auto; }
.external-checkin-box { display: grid; grid-template-columns: 160px 1fr; gap: 14px; align-items: center; }
.external-checkin-qr { width: 160px; height: 160px; background: white; border: 1px solid var(--line); border-radius: 16px; padding: 10px; }
.external-checkin-info { display: grid; gap: 10px; }
.settings-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .external-checkin-box { grid-template-columns: 1fr; } .external-checkin-qr { margin: 0 auto; } }

/* External mobile public view */
.mobile-view-body {
  margin: 0;
  min-height: 100vh;
  background: #080808;
  color: #f8f8f8;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.mobile-public-wrap {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 14px 12px 28px;
  box-sizing: border-box;
}
.mobile-public-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, rgba(8,8,8,.98), rgba(8,8,8,.92));
  padding: 8px 0 10px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}
.mobile-brand-row { display: flex; gap: 10px; align-items: center; }
.mobile-brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: contain;
  background: #fff;
}
.mobile-pickleball-logo {
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--mobile-accent, #15B95E);
  overflow: hidden;
}
.mobile-pickleball-logo svg { width: 44px; height: 44px; filter: drop-shadow(0 6px 16px rgba(0,0,0,.25)); }
.mobile-public-header h1 { margin: 0; font-size: 18px; line-height: 1.1; }
.mobile-public-header p, .mobile-refresh-note { margin: 2px 0 0; color: #bdbdbd; font-size: 12px; }
.mobile-refresh-note { margin-top: 8px; }
.mobile-tabs {
  position: sticky;
  top: 76px;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 0;
  background: rgba(8,8,8,.96);
}
.mobile-tab {
  border: 1px solid rgba(255,255,255,.12);
  background: #171717;
  color: #f2f2f2;
  border-radius: 999px;
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 800;
}
.mobile-tab.active {
  background: var(--mobile-accent, #15B95E);
  color: #111;
  border-color: var(--mobile-accent, #15B95E);
}
.mobile-public-content { padding-top: 4px; }
.mobile-card-stack { display: grid; gap: 12px; }
.mobile-game-card, .mobile-queue-card, .mobile-history-card, .mobile-empty-card, .mobile-standing-row {
  background: #151515;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}
.mobile-game-card, .mobile-queue-card, .mobile-history-card, .mobile-empty-card { padding: 14px; }
.mobile-empty-card { color: #cfcfcf; text-align: center; }
.mobile-empty-card.error { color: #ff8a8a; }
.mobile-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mobile-card-top strong { font-size: 16px; }
.mobile-live-pill, .mobile-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 900;
  background: rgba(255, 85, 85, .18);
  color: #ff8a8a;
  border: 1px solid rgba(255, 85, 85, .35);
}
.mobile-status-pill { background: color-mix(in srgb, var(--mobile-accent, #15B95E) 12%, transparent); color: var(--mobile-accent, #15B95E); border-color: color-mix(in srgb, var(--mobile-accent, #15B95E) 32%, transparent); }
.mobile-status-pill.ready { background: rgba(57,217,138,.14); color: #74f0ae; border-color: rgba(57,217,138,.32); }
.mobile-match-type { color: #bdbdbd; font-size: 12px; margin-bottom: 10px; }
.mobile-versus-card { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
.mobile-team-block {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.05);
}
.mobile-team-block span { font-size: 11px; text-transform: uppercase; color: #bdbdbd; font-weight: 900; }
.mobile-team-block strong { font-size: 14px; overflow-wrap: anywhere; }
.mobile-team-block em { color: #aaa; font-size: 13px; }
.mobile-vs-mini { display: grid; place-items: center; color: var(--mobile-accent, #15B95E); font-size: 11px; font-weight: 900; }
.mobile-queue-card.up-next { border-color: color-mix(in srgb, var(--mobile-accent, #15B95E) 36%, transparent); }
.mobile-queue-list { display: grid; gap: 8px; }
.mobile-queue-player { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.05); }
.mobile-queue-player > span, .mobile-rank {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--mobile-accent, #15B95E);
  color: #111;
  font-weight: 900;
  font-size: 12px;
}
.mobile-queue-player strong { display: block; font-size: 14px; }
.mobile-queue-player small { display: block; color: #bdbdbd; font-size: 12px; }
.mobile-standings-list { display: grid; gap: 8px; }
.mobile-standing-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: center; padding: 11px; }
.mobile-standing-name { min-width: 0; }
.mobile-standing-name strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mobile-standing-name small { color: #bdbdbd; font-size: 11px; }
.mobile-standing-stat { min-width: 48px; text-align: center; border-left: 1px solid rgba(255,255,255,.08); }
.mobile-standing-stat span { display: block; color: #aaa; font-size: 10px; text-transform: uppercase; }
.mobile-standing-stat strong { font-size: 16px; }
.mobile-history-score { font-size: 30px; font-weight: 950; color: var(--mobile-accent, #15B95E); line-height: 1; margin: 6px 0 12px; }
.mobile-history-teams { display: grid; gap: 8px; }
.mobile-history-teams p { margin: 0; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.05); color: #e5e5e5; overflow-wrap: anywhere; }
.mobile-history-teams p.winner { outline: 1px solid color-mix(in srgb, var(--mobile-accent, #15B95E) 48%, transparent); background: color-mix(in srgb, var(--mobile-accent, #15B95E) 10%, transparent); }
.mobile-history-teams span { display: block; color: #aaa; font-size: 11px; font-weight: 900; text-transform: uppercase; margin-bottom: 4px; }
@media (max-width: 420px) {
  .mobile-public-wrap { padding-left: 10px; padding-right: 10px; }
  .mobile-public-header h1 { font-size: 16px; }
  .mobile-tab { font-size: 11px; padding: 9px 4px; }
  .mobile-versus-card { grid-template-columns: 1fr; }
  .mobile-vs-mini { padding: 0; }
  .mobile-standing-row { grid-template-columns: auto 1fr auto auto; gap: 7px; }
  .mobile-standing-stat { min-width: 40px; }
}

/* v40: repeated match validation and public preview refinements */
.forecast-status-stack { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.repeat-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
  color: #7c2d12;
  background: #ffedd5;
  border: 1px solid #fed7aa;
}
.repeat-confirm-card {
  width: min(430px, 92vw);
  text-align: center;
  padding: 26px;
  border-radius: 28px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, white), var(--panel-2));
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.repeat-confirm-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-size: 2rem;
  font-weight: 900;
  color: #92400e;
  background: linear-gradient(135deg, #fde68a, #fb923c);
}
.repeat-confirm-card h3 { margin: 6px 0 8px; }
.repeat-confirm-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.repeat-confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.settings-group-form > .settings-card { width: 100%; box-sizing: border-box; }
.settings-group-form .external-checkin-box, .settings-group-form .external-checkin-info { min-width: 0; width: 100%; }
.settings-group-form .external-checkin-info input { width: 100%; box-sizing: border-box; }
.display-preview-match { display: grid; gap: 14px; width: 100%; }
.queue-grid.enhanced:has(.display-preview-match) { grid-template-columns: 1fr; }

/* v41 cPanel/mobile fixes */
.settings-group-form > .external-mobile-settings-card,
.settings-grid > .external-mobile-settings-card,
.external-mobile-settings-card {
  grid-column: 1 / -1;
  width: 100%;
  box-sizing: border-box;
}
.external-mobile-settings-card .external-checkin-settings,
.external-mobile-settings-card .external-checkin-box,
.external-mobile-settings-card .external-checkin-info {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.external-mobile-settings-card .form-grid {
  grid-template-columns: minmax(240px, 420px) 1fr;
  align-items: end;
}
.external-mobile-settings-card .external-checkin-info input {
  width: 100%;
  max-width: 760px;
}
@media (max-width: 800px) {
  .external-mobile-settings-card .form-grid { grid-template-columns: 1fr; }
}

/* v42: External Mobile View settings redesign + preview send fix support */
.settings-grid {
  grid-template-columns: 1fr;
}
.settings-group-form {
  width: 100%;
  max-width: none;
}
.external-mobile-settings-card {
  overflow: hidden;
}
.external-mobile-settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.external-mobile-settings-head h3 { margin-bottom: 4px; }
.external-mobile-settings-head p { margin: 0; }
.external-mobile-settings-layout {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  width: 100%;
}
.mobile-accent-card,
.mobile-share-card {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 16px;
  min-width: 0;
}
.mobile-color-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
}
.mobile-color-row input[type="color"] {
  width: 100%;
  min-height: 58px;
  padding: 6px;
}
.mobile-color-row strong {
  font-size: .95rem;
  color: var(--text);
  white-space: nowrap;
}
.mobile-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
}
.mobile-link-row input {
  width: 100%;
  min-width: 0;
}
@media (max-width: 820px) {
  .external-mobile-settings-head,
  .external-mobile-settings-layout,
  .mobile-link-row {
    grid-template-columns: 1fr;
    display: grid;
  }
  .external-mobile-settings-head a,
  .mobile-link-row button { width: 100%; }
}


/* v44: External display dashboard-aligned refresh */
.display-body.dark-theme {
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(250, 204, 21, .16), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #0b1220 42%, #111827 100%);
  color: #f8fafc;
}
.display-wrap {
  max-width: 1840px;
  gap: 20px;
}
.display-header {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 30px;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(15,23,42,.92), rgba(8,18,36,.82));
  box-shadow: 0 22px 60px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.08);
  text-align: left;
}
.display-header h1 { margin: 0; font-size: clamp(2rem, 4vw, 4.4rem); line-height: .95; letter-spacing: -.06em; }
.display-header p { margin: 8px 0 0; color: #facc15; font-weight: 900; text-transform: uppercase; letter-spacing: .16em; }
.display-grid { grid-template-columns: repeat(auto-fit, minmax(540px, 1fr)); gap: 18px; }
.display-card {
  border-radius: 30px;
  border-color: rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(15,23,42,.96), rgba(8,18,36,.94));
  box-shadow: 0 22px 55px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.06);
}
.display-card-header {
  padding: 16px 20px;
  background: linear-gradient(90deg, #111827, #081224);
}
.display-card-header h2,
.display-card-header h3 { margin: 0; letter-spacing: -.03em; }
.live-badge, .standings-badge {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .08em;
}
.display-match-meta { display: none; }
.display-match-layout { padding: 18px; gap: 16px; }
.display-team-panel {
  border-radius: 24px;
  padding: 18px;
}
.display-player-chip {
  border-radius: 18px;
  padding: 12px 14px;
}
.display-player-name { font-size: clamp(1.1rem, 1.7vw, 1.65rem); font-weight: 950; letter-spacing: -.04em; }
.display-vs-badge {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  font-size: 1.45rem;
}
.display-vs-subcopy { color: #facc15; }
.green-card .display-card-header,
.standings-display-card .display-card-header { background: linear-gradient(90deg, #14532d, #166534); }
.queue-grid.enhanced { padding: 18px; gap: 12px; }
.queue-item {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.display-preview-match {
  border: 1px solid rgba(250,204,21,.22);
  border-radius: 24px;
  background: rgba(250,204,21,.05);
  padding: 12px;
}

/* v44: compressed sleek mobile history and external status cleanup */
.mobile-view-body { background: radial-gradient(circle at top, rgba(250,204,21,.10), transparent 32%), #080808; }
.mobile-history-card {
  padding: 10px 11px !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #171717, #101010) !important;
}
.mobile-history-card .mobile-card-top { margin-bottom: 5px; }
.mobile-history-card .mobile-card-top strong { font-size: 13px; color: #f8fafc; }
.mobile-history-card .mobile-status-pill { padding: 3px 7px; font-size: 9px; }
.mobile-history-score {
  font-size: 22px !important;
  margin: 3px 0 8px !important;
  letter-spacing: -.04em;
}
.mobile-history-teams {
  grid-template-columns: 1fr 1fr;
  gap: 6px !important;
}
.mobile-history-teams p {
  padding: 7px 8px !important;
  border-radius: 12px !important;
  font-size: 11px;
  line-height: 1.25;
}
.mobile-history-teams span {
  font-size: 9px !important;
  margin-bottom: 2px !important;
}
@media (max-width: 420px) {
  .mobile-history-teams { grid-template-columns: 1fr; }
  .display-body.dark-theme { padding: 12px; }
  .display-grid { grid-template-columns: 1fr; }
  .display-match-layout { grid-template-columns: 1fr; }
}

/* v46 live court lineup editing */
.live-edit-pill {
  width: 100%;
  text-align: left;
  appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.live-edit-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 58, 237, .45);
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08), 0 0 0 2px rgba(124, 58, 237, .10);
}
.live-edit-slot {
  min-height: 52px;
}

.player-picker-search { display: block; margin: 12px 0; }
.player-picker-search input { width: 100%; }
.small-action { padding: 6px 10px; font-size: 0.82rem; white-space: nowrap; }

/* v49 player grouping and picker standings */
.grouped-player-list {
  display: block !important;
  overflow: auto;
}
.player-status-group {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}
.player-status-group-head {
  width: 100%;
  cursor: pointer;
  color: inherit;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 6px 16px rgba(15,23,42,.05);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.player-status-count {
  margin-left: auto;
  color: var(--muted);
  font-weight: 800;
}
.collapse-indicator {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 900;
}
.player-status-group-body { display: grid; gap: 8px; }
.player-status-group.collapsed { margin-bottom: 8px; }
.player-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: currentColor;
}
.player-status-dot.status-playing { color: #16a34a; }
.player-status-dot.status-upnext { color: #f59e0b; }
.player-status-dot.status-queued { color: #2563eb; }
.player-status-dot.status-available { color: #64748b; }
.player-status-dot.status-offline { color: #94a3b8; }
.player-picker-row .small { line-height: 1.35; }
body.dark-theme .player-status-group-head {
  background: rgba(19,36,61,.98);
  border-color: #24344f;
}

/* v51 floating players pane + bottom session overview + half-width court buttons */
.dashboard-shell.floating-players-layout {
  display: block !important;
  position: relative;
  padding-left: 0 !important;
  padding-bottom: 88px;
}
.dashboard-shell.floating-players-layout .dashboard-mainwrap {
  width: 100%;
  min-width: 0;
}
.left-player-pane {
  z-index: 80;
}
.dashboard-shell.floating-players-layout .left-player-pane {
  position: fixed !important;
  left: 14px;
  top: 82px;
  width: min(380px, calc(100vw - 28px));
  max-height: calc(100vh - 112px) !important;
  overflow: auto;
  transition: transform .24s ease, opacity .2s ease, box-shadow .2s ease;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .22);
}
.dashboard-shell.floating-players-layout .left-player-pane.is-hidden {
  transform: translateX(calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
}
.dashboard-shell.floating-players-layout .left-player-pane.is-visible {
  transform: translateX(0);
  opacity: 1;
}
.floating-players-toggle {
  position: fixed;
  left: 14px;
  top: 24px;
  z-index: 95;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 900;
  box-shadow: 0 14px 35px rgba(15, 23, 42, .18);
}
.players-pane-hidden .floating-players-toggle {
  background: var(--blue);
  color: white;
  border-color: transparent;
}
.floating-session-overview.session-overview-inline {
  position: fixed !important;
  left: 50%;
  right: auto;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 90;
  width: min(980px, calc(100vw - 28px));
  box-shadow: 0 18px 46px rgba(15, 23, 42, .24);
  border: 1px solid rgba(148, 163, 184, .35);
  backdrop-filter: blur(12px);
}
.floating-session-overview .session-overview-line {
  justify-content: center;
}
.court-actions-clean {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}
.court-actions-clean button {
  width: 100%;
}
@media (max-width: 760px) {
  .dashboard-shell.floating-players-layout {
    padding-bottom: 126px;
  }
  .floating-session-overview.session-overview-inline {
    bottom: 10px;
  }
  .floating-session-overview .session-overview-line {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }
  .floating-session-overview .session-chip {
    flex: 0 0 auto;
  }
  .court-actions-clean {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* v52 responsive push players pane + configurable dashboard grid + grouped main menu */
.compact-court-grid,
.court-grid,
.forecast-grid-two,
.clean-forecast-grid {
  grid-template-columns: repeat(var(--dashboard-grid-columns, 2), minmax(0, 1fr)) !important;
}
.grouped-main-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.menu-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(148, 163, 184, .08);
}
.menu-group-label {
  padding: 0 5px;
  font-size: .68rem;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.dashboard-shell.floating-players-layout .dashboard-mainwrap {
  transition: margin-left .24s ease, width .24s ease;
}
@media (min-width: 901px) {
  .dashboard-shell.floating-players-layout.players-pane-visible .dashboard-mainwrap {
    margin-left: min(408px, calc(100vw - 28px));
    width: calc(100% - min(408px, calc(100vw - 28px)));
  }
  .dashboard-shell.floating-players-layout.players-pane-hidden .dashboard-mainwrap {
    margin-left: 0;
    width: 100%;
  }
  .dashboard-shell.floating-players-layout.players-pane-visible .floating-players-toggle {
    left: min(408px, calc(100vw - 28px));
  }
}
@media (max-width: 900px) {
  .dashboard-shell.floating-players-layout.players-pane-visible .dashboard-mainwrap,
  .dashboard-shell.floating-players-layout.players-pane-hidden .dashboard-mainwrap {
    margin-left: 0;
    width: 100%;
  }
  .dashboard-shell.floating-players-layout .left-player-pane {
    left: 10px;
    width: min(390px, calc(100vw - 20px));
  }
  .compact-court-grid,
  .court-grid,
  .forecast-grid-two,
  .clean-forecast-grid {
    grid-template-columns: 1fr !important;
  }
  .menu-group-label { display: none; }
  .grouped-main-menu { gap: 6px; }
}


/* v53 reverted/fixed players pane UX */
.dashboard-shell.fixed-players-layout {
  display: grid !important;
  grid-template-columns: minmax(330px, 380px) minmax(0, 1fr) !important;
  gap: 14px !important;
  align-items: start !important;
  padding-bottom: 88px;
}
.dashboard-shell.fixed-players-layout .dashboard-mainwrap {
  width: auto !important;
  margin-left: 0 !important;
  min-width: 0;
  transition: none !important;
}
.dashboard-shell.fixed-players-layout .left-player-pane {
  position: sticky !important;
  top: 14px !important;
  left: auto !important;
  width: auto !important;
  max-height: calc(100vh - 28px) !important;
  overflow: hidden !important;
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  box-shadow: 0 14px 35px rgba(15, 23, 42, .10) !important;
  border-radius: 22px !important;
  padding: 10px !important;
}
.dashboard-shell.fixed-players-layout .floating-players-toggle { display: none !important; }
.dashboard-shell.fixed-players-layout .compact-player-card.card {
  height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
}
.dashboard-shell.fixed-players-layout .sleek-player-head {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}
.dashboard-shell.fixed-players-layout .sleek-player-head h2 {
  font-size: .95rem;
  font-weight: 900;
  letter-spacing: .04em;
}
.dashboard-shell.fixed-players-layout .sleek-player-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}
.dashboard-shell.fixed-players-layout .mini-player-btn {
  justify-content: center;
  min-height: 38px;
  border-radius: 12px;
}
.dashboard-shell.fixed-players-layout .sleek-toolbar {
  position: sticky;
  top: 62px;
  z-index: 3;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(15,23,42,.04);
}
.dashboard-shell.fixed-players-layout .sleek-search-wrap {
  border-radius: 14px;
  min-height: 40px;
}
.dashboard-shell.fixed-players-layout .player-list.simplified-list {
  flex: 1 1 auto;
  max-height: none !important;
  overflow-y: auto !important;
  padding: 2px 4px 10px 0;
  gap: 8px;
}
.dashboard-shell.fixed-players-layout .player-status-group {
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 16px;
  padding: 6px;
  background: rgba(148,163,184,.05);
}
.dashboard-shell.fixed-players-layout .player-status-group-head {
  top: 0;
  border-radius: 12px;
  padding: 9px 10px;
}
.dashboard-shell.fixed-players-layout .player-status-group-body {
  padding-top: 6px;
}
.dashboard-shell.fixed-players-layout .player-row.simplified.gdp-player-row {
  border-radius: 13px;
  padding: 9px 9px 9px 10px;
}
.dashboard-shell.fixed-players-layout .player-name-line {
  grid-template-columns: minmax(0, 1fr) auto;
}
.dashboard-shell.fixed-players-layout .player-actions-row {
  gap: 4px;
}
.dashboard-shell.fixed-players-layout .icon-action {
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 10px;
}
@media (max-width: 980px) {
  .dashboard-shell.fixed-players-layout {
    grid-template-columns: 1fr !important;
    padding-bottom: 126px;
  }
  .dashboard-shell.fixed-players-layout .left-player-pane {
    position: relative !important;
    top: auto !important;
    max-height: none !important;
  }
  .dashboard-shell.fixed-players-layout .compact-player-card.card {
    height: auto;
    max-height: 58vh;
  }
}


/* v54 fixes: fixed players pane must stay in normal grid flow and never overlap dashboard */
.dashboard-shell.fixed-players-layout {
  display: grid !important;
  grid-template-columns: clamp(320px, 28vw, 390px) minmax(0, 1fr) !important;
  column-gap: 16px !important;
  row-gap: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
}
.dashboard-shell.fixed-players-layout > .left-player-pane {
  grid-column: 1 !important;
  grid-row: 1 !important;
  position: sticky !important;
  top: 14px !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  translate: none !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  z-index: 5 !important;
}
.dashboard-shell.fixed-players-layout > .dashboard-mainwrap {
  grid-column: 2 !important;
  grid-row: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}
.dashboard-shell.fixed-players-layout .compact-dashboard-main {
  min-width: 0 !important;
}
@media (max-width: 980px) {
  .dashboard-shell.fixed-players-layout {
    display: flex !important;
    flex-direction: column !important;
  }
  .dashboard-shell.fixed-players-layout > .left-player-pane,
  .dashboard-shell.fixed-players-layout > .dashboard-mainwrap {
    width: 100% !important;
    max-width: 100% !important;
    grid-column: auto !important;
    position: relative !important;
    top: auto !important;
  }
}

/* v55 players pane header/session layout + centered top branding */
.topbar {
  align-items: center !important;
}
.brand {
  align-items: center !important;
  min-height: 58px;
}
.brand > div {
  display: flex;
  align-items: center;
}
.brand h1 {
  line-height: 1.05;
}
.dashboard-shell.fixed-players-layout .left-player-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dashboard-shell.fixed-players-layout .player-session-overview {
  padding: 12px;
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}
.player-session-title {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  color: var(--muted);
  margin-bottom: 8px;
}
.player-session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.dashboard-shell.fixed-players-layout .player-session-grid .session-chip {
  display: grid;
  justify-items: start;
  align-content: center;
  min-height: 54px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.dashboard-shell.fixed-players-layout .player-session-grid .session-chip strong {
  font-size: 1.05rem;
}
.dashboard-shell.fixed-players-layout .player-session-grid .session-chip em {
  font-style: normal;
  font-size: .72rem;
  color: var(--muted);
}
.dashboard-shell.fixed-players-layout .compact-player-card.card {
  min-height: 0;
}
.dashboard-shell.fixed-players-layout .players-pane-control-card {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  gap: 9px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(15,23,42,.05);
}
.dashboard-shell.fixed-players-layout .players-pane-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.dashboard-shell.fixed-players-layout .players-pane-title-row h2 {
  margin: 0;
  font-size: .98rem;
  font-weight: 900;
  letter-spacing: .04em;
}
.players-pane-counts {
  display: flex;
  gap: 5px;
  flex-wrap: nowrap;
}
.players-pane-search-row .sleek-search-wrap {
  width: 100%;
}
.players-pane-action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.dashboard-shell.fixed-players-layout .players-pane-action-row .mini-player-btn {
  width: 100%;
}
.dashboard-shell.fixed-players-layout .sleek-player-head,
.dashboard-shell.fixed-players-layout .sleek-toolbar {
  position: static;
  box-shadow: none;
}
@media (max-width: 768px) {
  .topbar { align-items: stretch !important; }
  .brand { justify-content: center; text-align: center; }
}

/* v56 left pane tabs: Players + Games history */
.dashboard-shell.fixed-players-layout .left-pane-card {
  min-height: 0;
}
.left-pane-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--panel);
  padding-bottom: 2px;
}
.left-pane-tabs button {
  width: 100%;
  min-height: 38px;
  border-radius: 13px;
  justify-content: center;
}
.dashboard-shell.fixed-players-layout .players-tab-card .players-pane-control-card {
  top: 48px;
}
.games-tab-card {
  height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
}
.left-games-title {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: var(--panel-2);
}
.left-games-title h2 {
  margin: 0;
  font-size: .98rem;
  font-weight: 900;
  letter-spacing: .04em;
}
.left-games-title span {
  color: var(--muted);
  font-size: .78rem;
}
.left-games-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 9px;
  padding-right: 4px;
}
.left-game-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  padding: 10px;
  display: grid;
  gap: 9px;
  box-shadow: 0 8px 18px rgba(15,23,42,.04);
}
.left-game-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}
.left-game-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.left-game-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 12px;
  background: var(--panel-2);
  padding: 8px 10px;
}
.left-game-score span,
.left-game-teams span {
  color: var(--muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 800;
}
.left-game-score strong {
  font-size: 1rem;
}
.left-game-teams {
  display: grid;
  gap: 7px;
}
.left-game-teams > div {
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 12px;
  padding: 8px 10px;
  display: grid;
  gap: 2px;
}
.left-game-teams > div.winner-side {
  border-color: rgba(34,197,94,.45);
  background: rgba(34,197,94,.08);
}
.left-game-teams strong {
  font-size: .86rem;
  line-height: 1.25;
}
.left-game-edit {
  width: 100%;
  justify-content: center;
  min-height: 36px;
  border-radius: 12px;
}
.left-games-empty {
  margin-top: 8px;
}
@media (max-width: 980px) {
  .games-tab-card {
    height: auto;
    max-height: 65vh;
  }
}

/* v57: compact Games tab with team scores aligned to the right */
.compact-games-list {
  gap: 6px;
}
.compact-left-game {
  padding: 7px;
  gap: 6px;
  border-radius: 12px;
  box-shadow: none;
}
.compact-game-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
}
.compact-game-head .rank-chip {
  padding: 3px 6px;
  font-size: .68rem;
}
.compact-game-edit {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 9px;
  font-size: .72rem;
}
.compact-game-teams {
  gap: 5px;
}
.left-game-team-row {
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 10px;
  padding: 6px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  background: var(--panel-2);
}
.left-game-team-row > div {
  min-width: 0;
}
.left-game-team-row.winner-side {
  border-color: rgba(34,197,94,.45);
  background: rgba(34,197,94,.08);
}
.left-game-team-row span {
  display: block;
  color: var(--muted);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .045em;
  font-weight: 900;
  line-height: 1.1;
}
.left-game-team-row strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .78rem;
  line-height: 1.2;
}
.left-game-team-row em {
  min-width: 34px;
  min-height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  font-style: normal;
  font-weight: 950;
  font-size: .95rem;
}

/* v58: games export/delete controls, cozy compact game list, settings tabs, dark settings cleanup */
.left-games-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.export-games-mini {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 10px;
  font-size: .74rem;
}
.compact-game-head {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.compact-game-actions,
.match-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.compact-game-delete,
.icon-delete-match {
  width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-radius: 999px;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.compact-games-list {
  align-content: start;
  grid-auto-rows: max-content;
}
.compact-left-game {
  min-height: 0;
  align-self: start;
}
.left-game-team-row {
  min-height: 44px;
}
.match-history-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}
.settings-shell {
  background: var(--panel) !important;
}
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 16px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-2);
}
.settings-tab-form {
  max-width: 980px;
}
.court-settings-card .notice {
  margin-top: 2px;
}
body.dark-theme .settings-page,
body.dark-theme .settings-shell,
body.dark-theme .settings-card,
body.dark-theme .settings-tabs,
body.dark-theme .reports-layout .panel,
body.dark-theme .settings-grid .settings-card {
  background: #081224 !important;
  background-image: none !important;
}
body.dark-theme .settings-card,
body.dark-theme .settings-tabs {
  border-color: rgba(148,163,184,.24);
}
body.dark-theme .danger-zone {
  background: #160f12 !important;
  background-image: none !important;
}
.delete-confirm-card {
  width: min(430px, 92vw);
  text-align: center;
  position: relative;
  padding: 24px;
  border-radius: 24px;
}
.delete-confirm-x {
  position: absolute;
  right: 14px;
  top: 14px;
}
.delete-confirm-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(239,68,68,.12);
  color: #dc2626;
  font-size: 1.6rem;
  font-weight: 950;
}
.delete-confirm-card h3 {
  margin: 0 0 8px;
}
.delete-confirm-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.delete-confirm-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 720px) {
  .compact-game-actions { gap: 4px; }
  .compact-game-edit { padding: 4px 7px; }
  .settings-tabs button { flex: 1 1 140px; }
}

/* v58.1 fluid seamless scrollbar */
:root {
  --scrollbar-size: 10px;
  --scrollbar-track: transparent;
  --scrollbar-thumb: rgba(100, 116, 139, 0.26);
  --scrollbar-thumb-hover: rgba(31, 120, 209, 0.42);
}
body.dark-theme {
  --scrollbar-thumb: rgba(148, 163, 184, 0.24);
  --scrollbar-thumb-hover: rgba(250, 204, 21, 0.42);
}
html {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scroll-behavior: auto;
}
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}
*::-webkit-scrollbar {
  width: var(--scrollbar-size);
  height: var(--scrollbar-size);
}
*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  min-height: 46px;
  border: 3px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--scrollbar-thumb), color-mix(in srgb, var(--scrollbar-thumb) 72%, transparent)) border-box;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  transition: background .18s ease, box-shadow .18s ease;
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--scrollbar-thumb-hover), color-mix(in srgb, var(--scrollbar-thumb-hover) 72%, transparent)) border-box;
  background-clip: padding-box;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16), 0 0 10px color-mix(in srgb, var(--scrollbar-thumb-hover) 36%, transparent);
}
*::-webkit-scrollbar-corner {
  background: transparent;
}
.player-list,
.queue-list,
.report-list,
.player-picker-list,
.table-wrap,
.left-player-pane,
.modal-card,
.mobile-public-wrap,
.display-wrap {
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}
.player-list,
.queue-list,
.report-list,
.player-picker-list {
  padding-right: 6px !important;
}

/* v58.2: dark mode score modal contrast and automatic winner polish */
.score-input-card input,
.score-input-card input:focus {
  color: #0f172a;
  caret-color: #0f172a;
}
body.dark-theme .score-input-card {
  border-color: rgba(148, 163, 184, 0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 14px 28px rgba(0,0,0,.18);
}
body.dark-theme .score-team-one {
  background: rgba(30, 64, 175, 0.28);
}
body.dark-theme .score-team-two {
  background: rgba(146, 64, 14, 0.28);
}
body.dark-theme .score-input-card input,
body.dark-theme .score-input-card input:focus {
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  caret-color: #facc15;
  border-color: rgba(148, 163, 184, 0.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 0 4px rgba(250,204,21,.08);
}
body.dark-theme .score-input-card input::placeholder {
  color: rgba(226,232,240,.62);
}
body.dark-theme .score-input-card.score-winner-highlight input {
  background: rgba(6, 78, 59, 0.98);
  color: #ecfdf5;
  border-color: rgba(74, 222, 128, 0.68);
}
body.dark-theme .score-input-card.score-loser-muted input {
  background: rgba(15, 23, 42, 0.92);
  color: #e2e8f0;
}
.record-score-btn {
  min-width: 180px;
}

/* v59 requested fixes: score defaults, compact player actions, mobile player pane toggle */
.score-team-one {
  background: var(--team-one-soft) !important;
}
.score-team-two {
  background: var(--team-two-soft) !important;
}
body.dark-theme .score-team-one {
  background: color-mix(in srgb, var(--team-one) 28%, #0f172a) !important;
}
body.dark-theme .score-team-two {
  background: color-mix(in srgb, var(--team-two) 28%, #0f172a) !important;
}

.player-row.simplified.gdp-player-row .icon-action,
.player-row.simplified.gdp-player-row .pair-btn,
.dashboard-shell.fixed-players-layout .icon-action {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  border-radius: 8px !important;
  padding: 0 !important;
  font-size: .72rem !important;
}
.player-row.simplified.gdp-player-row .action-icon {
  font-size: .78rem !important;
  line-height: 1 !important;
}
.player-row.simplified.gdp-player-row .player-actions.icon-actions {
  gap: 3px !important;
}

.dashboard-mobile-toggle-row {
  display: none;
}
.mobile-players-toggle {
  width: 100%;
  min-height: 42px;
  border-radius: 14px;
  font-weight: 900;
}

@media (max-width: 768px) {
  .dashboard-mobile-toggle-row {
    display: block;
    margin: 0 0 12px;
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .dashboard-shell.fixed-players-layout {
    display: flex !important;
    flex-direction: column !important;
  }
  .dashboard-shell.fixed-players-layout .player-session-overview {
    display: none !important;
  }
  .dashboard-shell.fixed-players-layout > .left-player-pane.is-hidden-mobile {
    display: none !important;
  }
  .dashboard-shell.fixed-players-layout > .left-player-pane {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    max-height: none !important;
    z-index: 1 !important;
  }
  .dashboard-shell.fixed-players-layout .compact-player-card.card {
    max-height: 70vh !important;
    overflow: auto !important;
  }
}

@media (min-width: 769px) {
  .dashboard-shell.fixed-players-layout > .left-player-pane.is-hidden-mobile {
    display: flex !important;
  }
}

/* v60 requested UI polish: Excel export buttons, tighter sidebar, cozy title, compact player actions */
:root { --team-two: #15B95E; --team-two-soft: #e7f8ef; }
body.dark-theme { --team-two-soft: #0c3a23; }
.sidebar,
.left-player-pane,
.dashboard-shell.fixed-players-layout .left-player-pane,
.dashboard-shell.floating-players-layout .left-player-pane {
  padding-left: 10px !important;
  padding-right: 10px !important;
}
.cozy-app-brand {
  display: inline-flex !important;
  gap: 10px;
  align-items: center !important;
  padding: 8px 12px;
  border: 0 !important;
  border-radius: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--panel) 94%, white), color-mix(in srgb, var(--team-one-soft) 22%, var(--panel)));
  box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}
body.dark-theme .cozy-app-brand {
  background: linear-gradient(135deg, rgba(8,18,36,.72), rgba(13,26,49,.62));
}
.brand-title-block { display: grid !important; gap: 1px; min-width: 0; }
.brand-kicker {
  font-size: .64rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
}
.cozy-app-brand h1 {
  margin: 0;
  font-size: clamp(1rem, 1.5vw, 1.35rem) !important;
  letter-spacing: -.035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 440px);
}
.excel-export-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 800;
  color: #ffffff !important;
  background: #107C41;
  box-shadow: 0 8px 18px rgba(16,124,65,.18);
}
.excel-export-btn span { color: #ffffff !important; }
.excel-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: rgba(255,255,255,.92);
  color: #107C41;
  font-size: .68rem;
  font-weight: 950;
  line-height: 1;
}
.excel-export-btn .excel-icon { color: #107C41 !important; }
.player-actions.icon-actions.gdp-player-actions { gap: 3px !important; }
.player-actions.icon-actions.gdp-player-actions .icon-action,
.gdp-pair-btn,
.icon-action {
  min-width: 26px !important;
  width: 26px !important;
  height: 26px !important;
  padding: 3px !important;
  border-radius: 8px !important;
  font-size: .72rem !important;
}
.player-actions .action-icon { font-size: .78rem !important; }
@media (max-width: 700px) {
  .cozy-app-brand { width: 100%; justify-content: center; }
  .cozy-app-brand h1 { max-width: 78vw; }
}


/* v62 requested player/menu refinements */
.player-picker-row,
.player-picker-row strong,
.player-picker-row .small {
  color: var(--text) !important;
}
body.dark-theme .player-picker-row,
body.dark-theme .player-picker-row strong,
body.dark-theme .player-picker-row .small {
  color: var(--text) !important;
}
.cozy-app-brand,
body.dark-theme .cozy-app-brand {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
.cozy-app-brand .brand-logo {
  max-height: 42px;
}
.dashboard-shell.fixed-players-layout .player-row.simplified.gdp-player-row .player-name,
.left-player-pane .player-row.simplified.gdp-player-row .player-name {
  font-size: calc(.98rem - 1.5px) !important;
  line-height: 1.05 !important;
}
.dashboard-shell.fixed-players-layout .player-row.simplified.gdp-player-row .player-meta,
.left-player-pane .player-row.simplified.gdp-player-row .player-meta,
.dashboard-shell.fixed-players-layout .player-row.simplified.gdp-player-row .player-meta span,
.left-player-pane .player-row.simplified.gdp-player-row .player-meta span {
  font-size: calc(.80rem - 1.5px) !important;
}
.player-status-text,
.player-wait-text,
.player-wait-text.wait-warning,
.player-wait-text.wait-danger {
  font-weight: 500 !important;
}
.player-actions.icon-actions.gdp-player-actions { gap: 2px !important; }
.player-actions.icon-actions.gdp-player-actions .icon-action,
.player-actions.icon-actions.gdp-player-actions .gdp-pair-btn,
.dashboard-shell.fixed-players-layout .player-row.simplified.gdp-player-row .icon-action,
.dashboard-shell.fixed-players-layout .player-row.simplified.gdp-player-row .gdp-pair-btn {
  min-width: 23px !important;
  width: 23px !important;
  height: 23px !important;
  padding: 2px !important;
  border-radius: 7px !important;
  font-size: .68rem !important;
}
.player-actions .action-icon { font-size: .72rem !important; }
.swap-winner-icon-btn {
  min-width: 34px !important;
  width: 34px !important;
  height: 30px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1rem !important;
  line-height: 1 !important;
}


/* v64: no automatic viewport movement, seamless topbar brand, full title, theme shortcut */
html, body { scroll-behavior: auto !important; }
.cozy-app-brand, body.dark-theme .cozy-app-brand {
  background: transparent !important;
  box-shadow: none !important;
  padding: 4px 2px !important;
  border-radius: 0 !important;
  min-height: 44px;
}
.brand-title-block { min-width: 0; align-items: center; }
.cozy-app-brand h1 {
  display: block;
  line-height: 1.22 !important;
  padding-bottom: 3px;
  max-width: min(52vw, 560px) !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
.topbar { align-items: center !important; overflow: visible !important; }
.theme-toggle-btn { min-width: 34px; padding-left: 8px !important; padding-right: 8px !important; }
@media (max-width: 760px) {
  .cozy-app-brand h1 { max-width: 88vw !important; white-space: normal !important; text-align: center; }
}
