:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  --bg: #f6f8f4;
  --surface: #ffffff;
  --surface-soft: #eef4ec;
  --ink: #14231b;
  --ink-soft: #627366;
  --accent: #158f55;
  --accent-2: #b67a08;
  --danger: #ef5b5b;
  --warning: #b77905;
  --line: rgba(20, 35, 27, 0.12);
  --line-mid: rgba(20, 35, 27, 0.06);
  --shadow: 0 8px 28px rgba(36, 67, 48, 0.12);
  --radius-xl: 14px;
  --radius-lg: 10px;
  --radius-md: 7px;
  --radius-sm: 5px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100%;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(246,248,244,0.92)),
    radial-gradient(circle at 12% 0%, rgba(21,143,85,0.08), transparent 28%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

/* --- Form elements --- */
input, select, textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #ffffff;
  padding: 7px 10px;
  outline: none;
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(18, 183, 106, 0.55);
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.08);
}

/* --- Shell wrapper --- */
.shell { max-width: 1440px; margin: 0 auto; padding: 0 14px 18px; }

/* --- Topbar --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0 10px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.brand { display: flex; gap: 8px; align-items: center; min-width: 0; }
.brand img { width: 26px; height: 26px; flex-shrink: 0; }
.brand-name { font-size: 0.88rem; font-weight: 750; line-height: 1; }
.brand-sub {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.search-box { position: relative; }
.search-box input { padding-left: 30px; min-height: 32px; font-size: 0.85rem; }
.search-icon {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-soft);
  pointer-events: none;
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  z-index: 40;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 5px;
  display: none;
}
.search-results.open { display: block; }
.search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 7px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-align: left;
  background: transparent;
}
.search-item:hover { background: var(--surface-soft); }
.top-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  flex-shrink: 0;
}

/* --- App layout --- */
.layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

/* --- Sidebar --- */
.sidebar {
  position: sticky;
  top: 62px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 12px;
  background: var(--surface);
  overflow: hidden;
}
.side-card {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.side-card h2 { font-size: 0.88rem; font-weight: 700; margin: 3px 0 2px; }
.side-card p { font-size: 0.76rem; }
.nav { display: grid; gap: 1px; }
.nav button {
  border: none;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: transparent;
  min-height: 33px;
  padding: 0 9px;
  text-align: left;
  font-weight: 600;
  font-size: 0.845rem;
}
.nav button:hover { color: var(--ink); background: var(--line-mid); }
.nav button.active { color: var(--accent); background: rgba(21, 143, 85, 0.1); }
.main { display: grid; gap: 10px; min-width: 0; }
.screen { display: grid; gap: 10px; }

/* --- Mobile tabs --- */
.mobile-tabs {
  display: none;
  gap: 4px;
  overflow-x: auto;
  padding: 0 0 6px;
  scrollbar-width: none;
}
.mobile-tabs::-webkit-scrollbar { display: none; }
.mobile-tabs button {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  background: transparent;
  min-height: 30px;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 600;
}
.mobile-tabs button.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(21, 143, 85, 0.09);
}

/* --- Cards --- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 13px 15px;
}

/* --- Page header (compact, outside cards) --- */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 2px 1px;
}
.page-header h2 { font-size: 1.05rem; font-weight: 700; }

/* --- Typography --- */
.eyebrow {
  display: block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.muted { color: var(--ink-soft); line-height: 1.45; }
small { font-size: 0.82em; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: 0.92rem; font-weight: 650; }

/* --- Section head (inside cards) --- */
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 9px;
}
.section-head h3, .card h3 { margin: 0; }
.section-head h2, .card h2 { margin: 0; }

/* --- Hero (compact panel) --- */
.hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}
.hero h2 { font-size: 1.1rem; margin: 3px 0 5px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

/* --- Grid system --- */
.grid { display: grid; gap: 10px; }
.grid.two   { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four  { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* --- Stat blocks --- */
.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 10px 12px;
}
.stat span {
  display: block;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.stat b {
  display: block;
  font-size: 1.5rem;
  font-weight: 750;
  line-height: 1.15;
  margin-top: 3px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #ffffff;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
}
.btn:hover { border-color: rgba(21, 143, 85, 0.24); background: var(--surface-soft); }
.btn.primary { border-color: transparent; color: #ffffff; background: linear-gradient(135deg, var(--accent), #2dbd74); }
.btn.primary:hover { opacity: 0.9; }
.btn.warning { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.09); color: var(--warning); }
.btn.danger  { border-color: rgba(239, 91, 91, 0.4);  background: rgba(239, 91, 91, 0.09);  color: var(--danger); }
.btn.ghost   { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn.ghost:hover { background: var(--line-mid); color: var(--ink); }
.icon-btn { width: 31px; min-width: 31px; padding: 0; border-radius: var(--radius-md); }

/* --- Pills / badges --- */
.pill, .status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 1px 7px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.status-pill.live    { color: #0b6b3d; background: rgba(21, 143, 85, 0.12); }
.status-pill.offline { color: #8a5a00; background: rgba(183, 122, 8, 0.12); }

/* --- Action rows --- */
.hero-actions, .actions, .quick-actions, .pill-row, .row {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

/* --- Lists --- */
.list { display: grid; gap: 4px; }
.list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 6px 10px;
  background: #fbfdf9;
}
.list-row button { justify-self: end; }
label.list-row { cursor: pointer; }

/* --- Match scoreboard --- */
.scoreboard {
  padding: 16px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(21, 143, 85, 0.22);
  background:
    linear-gradient(135deg, rgba(21, 143, 85, 0.1), rgba(255, 255, 255, 0.94)),
    #ffffff;
  box-shadow: var(--shadow);
}
.team-vs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 12px;
}
.team-vs > div:first-child,
.team-vs > div:last-child {
  min-height: 72px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  padding: 12px;
  font-size: 1rem;
}
.team-score { text-align: center; }
.team-score b {
  display: block;
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 900;
  line-height: 0.95;
  color: var(--ink);
}
.team-score .pill {
  margin-top: 8px;
  background: #ffffff;
  border: 1px solid var(--line);
}
.match-minute {
  display: block;
  margin: 8px auto 0;
  color: var(--accent);
  font-size: clamp(1.45rem, 4vw, 2.35rem);
  font-weight: 900;
  line-height: 1;
}
.match-start-card {
  border-color: rgba(21, 143, 85, 0.26);
  background: linear-gradient(135deg, rgba(21, 143, 85, 0.08), #ffffff);
}
.scoreboard-actions {
  justify-content: flex-end;
}

/* --- Lineup cards --- */
.lineup-card {
  padding: 14px;
}
.compact-lineups {
  align-items: start;
}
.compact-lineup-card {
  padding: 12px;
}
.lineup-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.lineup-summary span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fbfdf9;
  padding: 8px;
}
.lineup-summary strong,
.lineup-summary small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lineup-summary strong { font-size: 0.9rem; }
.lineup-summary small {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
}
.lineup-card .list {
  gap: 7px;
}
.lineup-player {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 8px 10px;
  background: #fbfdf9;
}
.lineup-shirt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(21, 143, 85, 0.12);
  color: #0b6b3d;
  font-size: 0.72rem;
  font-weight: 900;
}
.lineup-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.lineup-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lineup-info small {
  color: var(--ink-soft);
  font-weight: 750;
  letter-spacing: 0.04em;
}
.lineup-badges {
  display: flex;
  gap: 4px;
  align-items: center;
  min-width: 0;
}

/* --- Event dock (sticky) --- */
.event-dock {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fbfdf9;
}
.event-dock .btn {
  min-height: 48px;
  padding: 0 10px;
  text-transform: capitalize;
  font-size: 0.86rem;
  border-radius: var(--radius-lg);
}
#event-form {
  gap: 12px;
}
#event-form .field.full {
  margin-top: 2px;
}
#event-form select,
#event-form input {
  min-height: 42px;
}
#event-form + .actions,
.score-tools {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.event-card {
  border-color: rgba(21, 143, 85, 0.24);
}
.event-controls {
  gap: 7px;
}

/* --- Timeline --- */
.timeline { display: grid; gap: 4px; }
.event {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 7px 10px;
  border-radius: var(--radius-lg);
  background: #fbfdf9;
  border: 1px solid var(--line);
}
.minute { color: var(--accent-2); font-weight: 800; font-size: 0.8rem; padding-top: 2px; }
.event-highlight {
  border-color: rgba(21, 143, 85, 0.35);
  background: #f0fbf4;
}
.mini-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.86rem;
}
.mini-list p { margin: 0; }
.compact-stats .stat small {
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 750;
}
.share-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.qr-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
.qr-box img {
  width: 96px;
  height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}
.possession-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #e9edf0;
  border: 1px solid var(--line);
}
.possession-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}
.bench-list { margin: 9px 2px 0; font-size: 0.78rem; }
.lineup-picks {
  display: flex;
  align-items: center;
  gap: 10px;
}
.captain-pick {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

/* --- Table --- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: 0.84rem; }
th { color: var(--ink-soft); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; }

/* --- Knockout bracket --- */
.bracket { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.round { min-width: 150px; display: grid; gap: 5px; align-content: start; }
.match-box { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 7px 9px; background: #fbfdf9; font-size: 0.82rem; }

/* --- Forms --- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { display: grid; gap: 4px; }
.field span { font-size: 0.76rem; font-weight: 600; color: var(--ink-soft); }
.field.full { grid-column: 1 / -1; }

/* --- Login hero --- */
.login-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 60%, rgba(21, 143, 85, 0.12) 0%, transparent 65%),
    linear-gradient(170deg, #ffffff 0%, #f5f8f2 52%, #eaf2e8 100%);
}

/* Pitch line decoration */
.login-pitch {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
}
.pitch-lines {
  position: absolute;
  inset: 0;
  border: 2px solid #158f55;
  margin: 8vh 6vw;
  border-radius: 4px;
}
.pitch-circle {
  position: absolute;
  top: 50%; left: 50%;
  width: min(22vw, 180px); height: min(22vw, 180px);
  transform: translate(-50%, -50%);
  border: 2px solid #158f55;
  border-radius: 50%;
}
.pitch-halfway {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: #158f55;
}
.pitch-penalty {
  position: absolute;
  top: 50%;
  width: min(10vw, 80px); height: min(16vw, 130px);
  transform: translateY(-50%);
  border: 2px solid #158f55;
}
.pitch-penalty.left  { left: 0; border-left: none; }
.pitch-penalty.right { right: 0; border-right: none; }

/* Center content */
.login-center {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 40px 20px;
  max-width: 560px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 7px 16px 7px 10px;
}
.login-logo { width: 26px; height: 26px; }
.login-title { font-size: 0.88rem; font-weight: 700; letter-spacing: 0.01em; }

.login-headline {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.07;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.login-sub {
  font-size: 0.88rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
}

.login-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  font-size: 0.96rem;
  font-weight: 700;
  background: var(--accent);
  color: #ffffff;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: 0 8px 28px rgba(21, 143, 85, 0.22);
}
.login-cta:hover { opacity: 0.88; transform: translateY(-1px); }
.login-cta:active { transform: translateY(0); }

.login-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
.login-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.login-feature-icon { font-size: 0.82rem; }

/* --- Drawer backdrop --- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(20, 35, 27, 0.28); display: none; }
.drawer-backdrop.open { display: block; }

/* --- Modal --- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: end center;
  padding: 12px;
  background: rgba(20, 35, 27, 0.32);
}
.modal {
  width: min(580px, 100%);
  max-height: min(90vh, 800px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  padding: 15px;
  box-shadow: 0 18px 50px rgba(36, 67, 48, 0.18);
}

/* --- Toast --- */
#toast-root {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 80;
  display: grid;
  gap: 6px;
  width: min(380px, calc(100% - 24px));
  transform: translateX(-50%);
}
.toast {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.875rem;
}
.toast.error { border-color: rgba(239, 91, 91, 0.5); }

/* --- Empty state --- */
.empty {
  padding: 14px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
  font-size: 0.84rem;
}
.hide { display: none !important; }

/* --- Result pills (W/D/L) --- */
.pill-win  { color: #0b6b3d; background: rgba(21, 143, 85, 0.14); }
.pill-loss { color: #a83232; background: rgba(239, 91, 91, 0.13); }
.pill-draw { color: #8a5a00; background: rgba(183, 122, 8, 0.13); }

/* --- Player match history row --- */
.pmh-row { grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; }
.pmh-result { min-width: 32px; font-size: 0.72rem; font-weight: 800; justify-content: center; }
.pmh-info { display: grid; gap: 1px; min-width: 0; overflow: hidden; }
.pmh-contrib { font-size: 0.7rem; font-weight: 700; white-space: nowrap; }

/* --- Roster search (team editor) --- */
.roster-search { margin-bottom: 6px; }
.roster-row { cursor: pointer; transition: background 0.1s, border-color 0.1s; }
.roster-row:hover { background: rgba(18, 183, 106, 0.06); border-color: rgba(18, 183, 106, 0.22); }
.roster-row.is-checked { background: rgba(18, 183, 106, 0.1); border-color: rgba(18, 183, 106, 0.38); }
.roster-row input[type="checkbox"] { width: 16px; min-height: 16px; accent-color: var(--accent); cursor: pointer; }
.player-result-main {
  display: grid;
  grid-template-columns: minmax(0, auto) auto minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-width: 0;
}
.player-result-name {
  font-size: 0.95rem;
  color: var(--ink);
}
.player-position-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(21, 143, 85, 0.14);
  color: #0b6b3d;
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.04em;
}
.player-result-phone {
  color: var(--ink-soft);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Responsive: tablet --- */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(270px, 86vw);
    border-radius: 0 var(--radius-xl) var(--radius-xl) 0;
    transform: translateX(-110%);
    transition: transform 0.2s ease;
    overflow-y: auto;
  }
  .sidebar.open { transform: translateX(0); }
  .mobile-tabs { display: flex; }
  .hero { grid-template-columns: 1fr; }
  .login-headline { font-size: 2.2rem; }
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* --- Responsive: mobile --- */
@media (max-width: 640px) {
  .shell { padding: 0 10px 12px; }
  .topbar { gap: 8px; }
  .brand-name, .brand-sub { display: none; }
  .top-actions .optional { display: none; }
  .grid.two, .grid.three, .grid.four, .form-grid { grid-template-columns: 1fr; }
  .event-dock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-score b { font-size: 1.7rem; }
  .team-vs {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .team-vs > div:first-child,
  .team-vs > div:last-child {
    min-height: 52px;
    text-align: center !important;
  }
  .team-score {
    order: -1;
  }
  .list-row { grid-template-columns: 1fr; }
  .lineup-player {
    grid-template-columns: 38px minmax(0, 1fr);
  }
  .lineup-badges {
    grid-column: 2;
  }
  .roster-row { grid-template-columns: minmax(0, 1fr) auto; }
  .player-result-main { grid-template-columns: minmax(0, 1fr) auto; }
  .player-result-phone { grid-column: 1 / -1; }
  .login-headline { font-size: 1.9rem; }
  .login-cta { width: 100%; justify-content: center; }
}
