/* styles.css — Light sport-utility UI with yellow + blue accents */

* { box-sizing: border-box; }
html, body, #root { height: 100%; }
body {
  margin: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.005em;
}

:root {
  /* Light, warm-paper surfaces */
  --bg-0: #f5f2eb;
  --bg-1: #ffffff;
  --bg-2: #f0ece2;
  --bg-3: #e6e1d3;

  --line: #d8d3c4;
  --line-strong: #b8b1a0;

  --text: #1a1c1f;
  --text-dim: #5a6371;
  --text-faint: #8b95a4;

  /* Primary accent: warm yellow */
  --accent: #ffcc00;
  --accent-ink: #1a1c1f;
  --accent-dim: #e6b800;
  --accent-soft: #fff4c2;

  /* Secondary accent: deep blue */
  --blue: #1e6fea;
  --blue-ink: #ffffff;
  --blue-dim: #1857c2;
  --blue-soft: #dbeafe;

  /* Status */
  --green: #1f9d55;
  --red:   #d4322b;
  --amber: #c47900;

  --radius: 6px;
  --radius-lg: 10px;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--text-dim); }

/* ===================== App shell ===================== */
.app { min-height: 100%; display: grid; grid-template-rows: auto 1fr; }

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 12px 20px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius);
  position: relative;
  display: grid; place-items: center;
}
.brand-mark .bm-1 {
  position: absolute; inset: 6px; border: 1.5px solid var(--text); border-radius: 50%;
}
.brand-mark .bm-2 {
  position: absolute; left: 50%; top: 6px; bottom: 6px; width: 1.5px; background: var(--text);
  transform: translateX(-50%);
}
.brand-title { font-weight: 800; font-size: 14px; letter-spacing: 0.04em; }
.brand-dim { color: var(--text-dim); font-weight: 500; margin-left: 3px; }
.brand-sub {
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.05em; text-transform: uppercase;
}

.tabs {
  display: flex; gap: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 3px;
  justify-self: center;
}
.tab {
  background: transparent;
  border: 0; color: var(--text-dim);
  padding: 8px 16px;
  cursor: pointer;
  font: inherit; font-weight: 600;
  border-radius: 4px;
  display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: 0.02em;
}
.tab:hover:not(.disabled) { color: var(--text); }
.tab.on {
  background: var(--bg-1);
  color: var(--text);
  box-shadow: 0 1px 0 var(--line), inset 0 -2px 0 var(--blue);
}
.tab.disabled { opacity: 0.4; cursor: not-allowed; }
.tab-num { font-family: var(--mono); font-size: 10px; color: var(--text-faint); }
.tab.on .tab-num { color: var(--blue); }

.top-actions { display: flex; align-items: center; gap: 8px; }

.app-main { min-height: 0; display: flex; flex-direction: column; }

/* ===================== Buttons / Inputs ===================== */
.btn {
  appearance: none;
  background: var(--bg-1);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 14px;
  font: inherit; font-weight: 600;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  letter-spacing: 0.01em;
  transition: background 0.12s, border-color 0.12s, transform 0.05s;
}
.btn:hover:not(:disabled) { background: var(--bg-2); border-color: var(--text-dim); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn.primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent-dim);
}
.btn.primary:hover:not(:disabled) { background: var(--accent-dim); border-color: var(--accent-dim); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { background: var(--bg-2); border-color: var(--line-strong); }
.btn.danger { color: var(--red); }
.btn.lg { padding: 12px 22px; font-size: 14px; }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.btn-ic { font-family: var(--mono); }

.icon-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 18px; line-height: 1;
}
.icon-btn:hover { background: var(--bg-2); color: var(--text); }
.icon-btn.danger:hover { color: var(--red); }
.icon-btn.ghost { font-size: 22px; }

.input {
  appearance: none;
  background: var(--bg-1);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  font: inherit;
  outline: none;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
  width: 100%;
}
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.input.num { text-align: center; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.input.bare {
  background: transparent;
  border-color: transparent;
  padding: 6px 8px;
}
.input.bare:focus { background: var(--bg-1); border-color: var(--line); box-shadow: none; }

.num-row { display: grid; grid-template-columns: 32px 1fr 32px; gap: 4px; }
.num-btn {
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: var(--radius);
  cursor: pointer;
  font: inherit; font-size: 16px;
}
.num-btn:hover { background: var(--bg-2); }

/* ===================== Setup ===================== */
.setup-view {
  flex: 1;
  display: flex; flex-direction: column;
  padding: 24px 20px 0;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.setup-grid .card-wide { grid-column: 1 / -1; }

.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px 20px 20px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.card-h {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.card-h h2 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
.card-tag {
  font-family: var(--mono); font-size: 10px; color: var(--blue);
  background: var(--blue-soft);
  padding: 2px 6px; border-radius: 3px;
  font-weight: 700;
}
.card-meta {
  margin-left: auto;
  font-family: var(--mono); font-size: 11px; color: var(--text-dim);
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-family: var(--mono); font-size: 10px;
  color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.field-grid { display: grid; gap: 12px; }
.field-grid.two { grid-template-columns: 1fr 1fr; }

.hint { margin: 4px 0 12px; color: var(--text-dim); font-size: 12px; }

.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 3px; border-radius: var(--radius);
}
.seg-btn {
  background: transparent; color: var(--text-dim);
  border: 0; padding: 9px 12px; border-radius: 4px;
  cursor: pointer; font: inherit; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--bg-1); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.seg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.seg-btn.on .seg-dot { background: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

.match-summary {
  margin-top: 14px;
  font-family: var(--mono); font-size: 11px; color: var(--text-dim);
  display: flex; gap: 10px;
}
.match-summary .dot { color: var(--text-faint); }

/* Formation presets */
.preset-row {
  display: flex; gap: 6px;
  margin-bottom: 10px;
}
.preset-btn {
  appearance: none;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font: inherit; font-weight: 700;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.12s;
}
.preset-btn:hover { background: var(--bg-1); color: var(--text); border-color: var(--line-strong); }
.preset-btn.on {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--blue-ink);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

/* Formation chips */
.pos-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.pos-chip {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: all 0.12s;
}
.pos-chip:hover { border-color: var(--line-strong); }
.pos-chip.on {
  background: var(--accent);
  border-color: var(--accent-dim);
  box-shadow: 0 2px 0 var(--accent-dim);
}
.pos-chip-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 10px 6px 4px;
  cursor: pointer;
  color: var(--text-dim);
  display: flex; justify-content: center;
}
.pos-chip.on .pos-chip-toggle { color: var(--accent-ink); }
.pos-num { font-family: var(--mono); font-size: 18px; font-weight: 700; }
.pos-label-input {
  appearance: none;
  background: transparent;
  border: 0;
  border-top: 1px dashed var(--line);
  padding: 3px 4px 5px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
  outline: none;
  width: 100%;
  min-width: 0;
}
.pos-chip.on .pos-label-input {
  border-top-color: rgba(26, 28, 31, 0.2);
  color: var(--text);
  opacity: 0.85;
}
.pos-label-input:focus {
  background: var(--bg-1);
  color: var(--text);
  opacity: 1;
}

/* Squad list */
.add-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 14px; }
.player-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 16px;
}
.player-row {
  display: grid; grid-template-columns: 28px 1fr 30px; align-items: center; gap: 6px;
  padding: 4px 4px 4px 0;
  border-bottom: 1px dashed var(--line);
  position: relative;
}
.player-idx { font-family: var(--mono); font-size: 11px; color: var(--text-faint); }
.trash-btn {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text-faint);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.12s, color 0.12s, background 0.12s, border-color 0.12s;
}
.player-row:hover .trash-btn,
.trash-btn:focus-visible { opacity: 1; }
.trash-btn:hover {
  color: var(--bg-1);
  background: var(--red);
  border-color: var(--red);
}
@media (hover: none) {
  .trash-btn { opacity: 1; color: var(--text-dim); }
}

.empty-state {
  text-align: center;
  padding: 30px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--text-dim);
  background: var(--bg-2);
}
.empty-state .empty-mark { font-family: var(--mono); font-size: 24px; color: var(--text-faint); margin-bottom: 8px; }
.empty-state p { margin: 0 0 14px; }

.setup-footer {
  margin-top: 24px;
  padding: 16px 0 24px;
  border-top: 1px solid var(--line);
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  position: sticky; bottom: 0;
  background: linear-gradient(to top, var(--bg-0) 70%, transparent);
}
.footer-left, .footer-right { display: flex; gap: 8px; align-items: center; }
.footer-warn { font-family: var(--mono); font-size: 11px; color: var(--amber); margin-right: 8px; }

/* ===================== Planner ===================== */
.planner-view {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  min-height: 0;
  background: var(--bg-0);
}
.planner-main {
  padding: 20px 24px 32px;
  display: flex; flex-direction: column; gap: 20px;
  min-width: 0;
  border-right: 1px solid var(--line);
}
.planner-empty { flex: 1; display: grid; place-items: center; }
.planner-empty-inner { text-align: center; color: var(--text-dim); }
.planner-empty-inner h2 { color: var(--text); margin: 0 0 8px; }

/* Planner header */
.planner-header {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 24px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--accent);
}
.ph-tag { font-family: var(--mono); font-size: 10px; color: var(--blue); letter-spacing: 0.12em; font-weight: 700; }
.ph-left { min-width: 0; flex: 1; }
.ph-left h1 {
  margin: 0; font-size: 28px; font-weight: 800;
  letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.ph-us { color: var(--text); }
.ph-them { color: var(--text-dim); }
.ph-vs {
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 400;
}
.ph-loc {
  font-size: 15px; font-weight: 500; color: var(--text-dim);
  letter-spacing: -0.01em;
}
.ph-loc-input {
  display: block;
  margin-top: 4px;
  appearance: none;
  background: transparent;
  border: 0;
  padding: 2px 0;
  font: inherit;
  font-size: 12px;
  color: var(--text-dim);
  outline: none;
  width: 100%;
  max-width: 500px;
  border-bottom: 1px dashed transparent;
}
.ph-loc-input::placeholder { color: var(--text-faint); }
.ph-loc-input:hover { border-bottom-color: var(--line); }
.ph-loc-input:focus { border-bottom-color: var(--blue); color: var(--text); }
.ph-right {
  display: flex; gap: 12px; align-items: center;
}
.ph-meta {
  font-family: var(--mono); font-size: 12px; color: var(--text-dim);
  letter-spacing: 0.04em;
}
.mini-stat {
  text-align: right;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}
.mini-stat-v { font-family: var(--mono); font-size: 20px; font-weight: 700; color: var(--text); }
.mini-stat-l { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }

/* Grid */
.grid-wrap {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.grid-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.grid-header h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.grid-legend {
  display: flex; gap: 14px;
  font-family: var(--mono); font-size: 10px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.grid-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dotled { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.dotled.empty { background: var(--bg-2); border: 1px solid var(--line-strong); }
.dotled.filled { background: var(--accent); border: 1px solid var(--accent-dim); }
.dotled.bench { background: transparent; border: 1px dashed var(--text-faint); }

.grid-scroll { overflow-x: auto; }
.plan-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.plan-grid th, .plan-grid td { padding: 0; }
.plan-grid thead th {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line-strong);
  font-weight: 600;
}
.pg-corner {
  width: 70px;
  text-align: left;
  padding: 10px 14px !important;
  font-family: var(--mono); font-size: 10px;
  color: var(--text-faint); letter-spacing: 0.1em;
}
.pg-col-h {
  padding: 8px 6px !important;
  text-align: center;
  font-family: var(--mono);
  border-left: 1px solid var(--line);
  min-width: 110px;
  position: relative;
}
.pg-col-h.first-half { border-left: 2px solid var(--line-strong); }
.pg-col-period { display: block; font-size: 10px; color: var(--text-faint); letter-spacing: 0.1em; }
.pg-col-half { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-top: 2px; }
.pg-col-time { display: block; font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.pg-row-h {
  width: 70px;
  background: var(--bg-2);
  text-align: left;
  padding: 10px 14px !important;
  border-bottom: 1px solid var(--line);
  border-right: 2px solid var(--line-strong);
}
.pg-pos-num { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--blue); display: block; }
.pg-pos-role { font-size: 9px; color: var(--text-faint); letter-spacing: 0.1em; display: block; margin-top: 1px; }

.pg-cell {
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: var(--bg-1);
  position: relative;
  transition: background 0.12s;
}
.pg-cell.first-half { border-left: 2px solid var(--line-strong); }
.pg-cell.filled { background: var(--bg-1); }
.pg-cell.cell-in    { background: #c8f0d4; }   /* groen: ingewisseld */
.pg-cell.cell-out   { background: #f7c8c5; }   /* rood:  wisselt eruit */
.pg-cell.cell-cameo {                          /* zeldzaam: in én uit \u2014 verticale split */
  background: linear-gradient(to right, #c8f0d4 0%, #c8f0d4 50%, #f7c8c5 50%, #f7c8c5 100%);
}
.cell-btn {
  width: 100%; height: 100%;
  min-height: 46px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  padding: 6px 8px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font: inherit;
  transition: background 0.12s;
}
.cell-btn:hover { background: rgba(30, 111, 234, 0.08); }
.pg-cell.filled .cell-btn { background: transparent; }
.pg-cell.filled .cell-btn:hover { background: rgba(0, 0, 0, 0.05); }
.pg-cell.cell-in .cell-btn:hover,
.pg-cell.cell-out .cell-btn:hover,
.pg-cell.cell-cameo .cell-btn:hover { background: rgba(0, 0, 0, 0.06); }
.cell-name { font-size: 12px; font-weight: 600; color: var(--text); }
.cell-empty { color: var(--text-faint); font-size: 16px; font-family: var(--mono); }

/* ===================== Bottom sheet / Popover ===================== */
.sheet-backdrop {
  position: fixed; inset: 0;
  background: rgba(26, 28, 31, 0.35);
  backdrop-filter: blur(2px);
  z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.15s ease;
}
.sheet-backdrop.popover-mode {
  background: rgba(26, 28, 31, 0.08);
  backdrop-filter: none;
  padding: 0;
  align-items: flex-start;
  justify-content: flex-start;
  animation: fadeIn 0.1s ease;
}
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: min(80vh, 640px);
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  display: flex; flex-direction: column;
  animation: popIn 0.18s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(26, 28, 31, 0.18), 0 0 0 1px rgba(26, 28, 31, 0.04);
}
.sheet-popover {
  width: 380px;
  max-width: 380px;
  max-height: min(60vh, 480px);
  animation: popInTight 0.14s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  box-shadow: 0 12px 36px rgba(26, 28, 31, 0.2), 0 0 0 1px var(--line-strong);
}
.sheet-grip { display: none; }

@media (max-width: 720px) {
  .sheet-backdrop { align-items: flex-end; padding: 0; }
  .sheet {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 14px 14px 0 0;
    border-bottom: 0;
    animation: slideUp 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .sheet-grip {
    display: block;
    width: 40px; height: 4px; background: var(--line-strong);
    border-radius: 2px; margin: 8px auto 0;
  }
}

.sheet-h {
  padding: 14px 20px 12px;
  display: flex; justify-content: space-between; align-items: flex-start;
  border-bottom: 1px solid var(--line);
}
.sheet-eyebrow {
  font-family: var(--mono); font-size: 10px;
  color: var(--text-faint); letter-spacing: 0.08em; text-transform: uppercase;
}
.sheet-title {
  margin: 4px 0 0; font-size: 18px; font-weight: 700;
  display: flex; align-items: baseline; gap: 8px;
}
.pos-pill {
  display: inline-block;
  background: var(--blue); color: var(--blue-ink);
  font-family: var(--mono); font-weight: 700;
  padding: 1px 8px; border-radius: 3px;
  font-size: 14px;
}
.pos-pill.sm { font-size: 11px; padding: 1px 6px; }
.pos-role-lg {
  font-family: var(--mono); font-size: 12px; color: var(--text-dim); letter-spacing: 0.08em;
}

.sheet-search {
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr auto; gap: 10px;
}

.sheet-list { overflow-y: auto; flex: 1; padding: 6px 8px; }
.sheet-legend {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px 8px;
  font-family: var(--mono); font-size: 10px; color: var(--text-dim);
  letter-spacing: 0.04em;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 4px;
}
.sheet-legend-dot { width: 10px; height: 10px; border-radius: 2px; }
.sheet-legend-dot.fresh { background: var(--accent); border: 1px solid var(--accent-dim); }

.sheet-row {
  width: 100%;
  background: transparent; border: 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font: inherit;
  border-radius: var(--radius);
  transition: background 0.12s, border-color 0.12s;
  border-left: 3px solid transparent;
}
.sheet-row:hover:not(:disabled) { background: var(--bg-2); }
.sheet-row:disabled { cursor: not-allowed; opacity: 0.55; }
.sheet-row.current { background: var(--blue-soft); border-left-color: var(--blue); }
.sheet-row.current .sheet-row-name { color: var(--blue); font-weight: 700; }
.sheet-row.fresh {
  background: var(--accent-soft);
  border-left-color: var(--accent-dim);
}
.sheet-row.fresh:hover { background: var(--accent); }
.sheet-row-name {
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}
.fresh-mark {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-soft);
  flex: 0 0 7px;
}
.sheet-row-stats { display: flex; gap: 4px; }
.chip {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 1px 6px; font-size: 10px;
  border-radius: 3px; color: var(--text-dim);
}
.tag {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-faint);
}
.tag-now { color: var(--blue); font-weight: 700; }
.tag-conflict { color: var(--amber); }
.tag-fresh { color: var(--accent-dim); font-weight: 700; }
.sheet-empty { padding: 30px; text-align: center; color: var(--text-faint); }

/* ===================== Stats sidebar ===================== */
.stats-sidebar {
  background: var(--bg-1);
  padding: 20px 18px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.ss-h {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.ss-h h2 { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; }
.ss-meta { font-family: var(--mono); font-size: 10px; color: var(--text-faint); }

.ss-fair {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: var(--radius);
  display: flex; justify-content: space-between; align-items: center;
}
.ss-fair-l { font-size: 11px; color: var(--text-dim); }
.ss-fair-v { font-size: 11px; color: var(--text); }

.ss-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.ss-row {
  padding: 10px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 6px;
}
.ss-row.below { border-color: var(--amber); background: #fffaeb; }
.ss-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ss-name { font-weight: 600; font-size: 13px; }
.ss-mins { font-size: 14px; font-weight: 700; }
.ss-mins .dim { font-weight: 500; margin-left: 1px; }
.ss-halves { display: flex; gap: 6px; }
.ss-half-group {
  display: flex; gap: 2px;
  padding: 2px 4px;
  background: var(--bg-2);
  border-radius: 3px;
}
.ss-half-dot {
  width: 8px; height: 8px; border-radius: 1px;
  background: var(--bg-1);
  border: 1px solid var(--line);
}
.ss-half-dot.on { background: var(--blue); border-color: var(--blue); }
.ss-half-dot.gk { background: var(--accent); border-color: var(--accent-dim); }
.ss-row-meta { display: flex; gap: 4px; flex-wrap: wrap; }
.ss-meta-chip {
  font-family: var(--mono); font-size: 9px;
  padding: 2px 6px;
  background: var(--bg-2);
  border-radius: 3px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ss-meta-chip.warn { color: var(--amber); background: #fdf3d8; }
.ss-meta-chip.alert { color: var(--red); background: #fde7e6; }
.ss-meta-chip.dim { color: var(--text-faint); }

/* ===================== Sub instructions ===================== */
.subs-wrap {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.subs-h {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.subs-h h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.subs-meta { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }

.subs-empty-state { padding: 36px 20px; text-align: center; color: var(--text-dim); }
.subs-empty-state .mono { display: block; font-size: 28px; color: var(--text-faint); margin-bottom: 6px; }
.subs-empty-state p { margin: 0; font-size: 12px; }

.subs-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(200px, 1fr);
  gap: 0;
  overflow-x: auto;
}
.sub-col {
  padding: 12px 14px 14px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
}
.sub-col:last-child { border-right: 0; }
.sub-col-h {
  display: flex; flex-direction: column; gap: 2px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.sub-col-tag { font-size: 12px; color: var(--blue); font-weight: 700; }
.sub-col-title {
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.sub-events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sub-pending {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 8px;
  color: var(--text-faint);
  text-align: center;
}
.sub-pending .mono { font-size: 16px; }
.sub-pending-l {
  font-family: var(--mono); font-size: 9px;
  letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.4;
}
.sub-nochange {
  text-align: center;
  padding: 18px 8px;
  font-family: var(--mono); font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.sub-card {
  padding: 8px 10px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--text-faint);
  border-radius: 4px;
  display: flex; flex-direction: column; gap: 3px;
}
.sub-card-tag { font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em; font-weight: 700; }
.sub-card-name { font-weight: 700; font-size: 13px; }
.sub-card-detail {
  font-size: 11px; color: var(--text-dim);
  display: flex; align-items: center; gap: 6px;
}
.sub-card-detail .arrow { color: var(--text-faint); }
.sub-out { border-left-color: var(--red); background: #fdf2f1; }
.sub-out .sub-card-tag { color: var(--red); }
.sub-in { border-left-color: var(--green); background: #f0fbf4; }
.sub-in .sub-card-tag { color: var(--green); }
.sub-switch { border-left-color: var(--blue); background: var(--blue-soft); }
.sub-switch .sub-card-tag { color: var(--blue); }

/* ===================== Team Focus (B+ / B-) ===================== */
.focus-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.focus-col {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  border-left-width: 4px;
}
.focus-col.plus { border-left-color: var(--green); }
.focus-col.minus { border-left-color: var(--red); }
.focus-col-h {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 8px;
}
.focus-tag {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  padding: 2px 7px; border-radius: 3px;
  letter-spacing: 0.04em;
}
.focus-tag.plus { background: #d6f5e0; color: var(--green); }
.focus-tag.minus { background: #fbdcd9; color: var(--red); }
.focus-title {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text);
}
.focus-fields { display: flex; flex-direction: column; gap: 6px; }
.focus-input {
  appearance: none;
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 7px 10px;
  font: inherit; font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.12s, background 0.12s;
}
.focus-input::placeholder { color: var(--text-faint); }
.focus-input:focus { background: var(--bg-1); border-color: var(--blue); }

/* ===================== Werkpunten per speler ===================== */
.werk-wrap {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.werk-h {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.werk-h h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.werk-meta { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.werk-list {
  list-style: none; margin: 0; padding: 8px 14px 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 18px;
}
.werk-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
  min-width: 0;
}
.werk-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.werk-row.filled .werk-name { color: var(--text); }
.werk-input {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed transparent;
  padding: 4px 0;
  font: inherit; font-size: 13px;
  color: var(--text);
  outline: none;
  width: 100%;
  min-width: 0;
}
.werk-input::placeholder { color: var(--text-faint); font-style: italic; font-size: 12px; }
.werk-input:hover { border-bottom-color: var(--line); }
.werk-input:focus { border-bottom-color: var(--blue); }

@media (max-width: 900px) {
  .focus-wrap { grid-template-columns: 1fr; }
  .werk-list { grid-template-columns: 1fr; }
}

/* ===================== Bottom row: subs + bench (deprecated) ===================== */
.bottom-row {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

/* Bench panel */
.bench-wrap {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.bench-h {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
}
.bench-h h2 { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: 0.02em; }
.bench-meta { font-family: var(--mono); font-size: 11px; color: var(--text-dim); }
.bench-grid {
  display: grid; grid-template-columns: 1fr 1fr;
}
.bench-col {
  padding: 10px 12px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.bench-col:nth-child(2n) { border-right: 0; }
.bench-col-h {
  display: flex; align-items: baseline; justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 6px;
}
.bench-col-title {
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700;
}
.bench-col-count {
  font-size: 11px; color: var(--blue); font-weight: 700;
}
.bench-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.bench-pl {
  font-size: 11px;
  color: var(--text);
  padding: 2px 0;
}
.bench-empty {
  font-family: var(--mono); font-size: 11px; color: var(--text-faint);
  text-align: center; padding: 8px 0;
}

@media (max-width: 1100px) {
  .bottom-row { grid-template-columns: 1fr; }
}

/* Paired IN/OUT swap row */
.swap-row {
  display: grid;
  grid-template-columns: 1fr 22px 1fr;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.swap-side {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 8px;
  border-radius: 3px;
  min-width: 0;
}
.swap-side.in { background: #f0fbf4; border-left: 3px solid var(--green); }
.swap-side.out { background: #fdf2f1; border-left: 3px solid var(--red); }
.swap-tag {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  letter-spacing: 0.1em;
}
.swap-side.in .swap-tag { color: var(--green); }
.swap-side.out .swap-tag { color: var(--red); }
.swap-name {
  font-weight: 700; font-size: 12px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.swap-pos { font-size: 10px; }
.swap-arrow {
  text-align: center;
  color: var(--text-faint);
  font-size: 16px;
}
.pos-pill.ghost {
  background: transparent;
  color: var(--text-dim);
  border: 1px dashed var(--line-strong);
}

/* ===================== Share image modal ===================== */
.share-backdrop {
  position: fixed; inset: 0;
  background: rgba(26, 28, 31, 0.5);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: grid; place-items: center;
  padding: 24px;
  animation: fadeIn 0.15s;
}
.share-modal {
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 1100px;
  max-height: 90vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.25);
}
.share-h {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.share-h h3 { margin: 4px 0 0; font-size: 18px; font-weight: 700; }
.share-eyebrow {
  font-family: var(--mono); font-size: 10px; color: var(--blue); letter-spacing: 0.12em; font-weight: 700;
}
.share-preview {
  flex: 1;
  overflow: auto;
  padding: 20px;
  background: var(--bg-2);
  display: flex; justify-content: center;
}
.share-stage-frame { position: absolute; left: -10000px; top: 0; width: 1200px; }
.share-render { width: 100%; display: flex; justify-content: center; }
.share-img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.share-busy {
  color: var(--text-dim);
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.1em; padding: 60px;
}
.share-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; align-items: center;
}

/* Share image — paired swap row */
.ss-swap {
  display: grid;
  grid-template-columns: 1fr 22px 1fr;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  background: var(--bg-2);
  border-radius: 3px;
  border-left: 3px solid var(--blue);
  font-size: 11px;
}
.ss-swap-in {
  padding: 3px 6px; background: #f0fbf4;
  border-left: 2px solid var(--green);
  border-radius: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ss-swap-in b { color: var(--green); margin-right: 4px; font-size: 9px; }
.ss-swap-out {
  padding: 3px 6px; background: #fdf2f1;
  border-left: 2px solid var(--red);
  border-radius: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ss-swap-out b { color: var(--red); margin-right: 4px; font-size: 9px; }
.ss-swap-arr { text-align: center; color: var(--text-faint); }
.ss-no-subs {
  padding: 14px; text-align: center; color: var(--text-faint);
  font-family: var(--mono); font-size: 11px;
}
.ss-load-row.below .ss-load-mins { color: var(--amber); }

/* Share image — bench card */
.ss-bench-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
}
.ss-bench-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.ss-bench-col {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 11px;
}
.ss-bench-col-h {
  font-family: var(--mono); font-size: 10px; color: var(--blue);
  font-weight: 700; letter-spacing: 0.06em;
  padding-bottom: 4px; margin-bottom: 4px;
  border-bottom: 1px dashed var(--line);
}
.ss-bench-list { list-style: none; margin: 0; padding: 0; }
.ss-bench-list li { font-size: 11px; padding: 1px 0; }
.ss-bench-list li.dim { color: var(--text-faint); }

/* ===================== Share stage (what gets captured) ===================== */
.share-stage {
  width: 1200px;
  background: var(--bg-1);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.ss-banner {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--accent);
}
.ss-eyebrow {
  font-family: var(--mono); font-size: 11px; color: var(--blue); letter-spacing: 0.12em; font-weight: 700;
}
.ss-headline {
  margin-top: 8px;
  font-size: 36px; font-weight: 800; letter-spacing: -0.02em;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}
.ss-us { color: var(--text); }
.ss-them { color: var(--text-dim); }
.ss-vs {
  font-family: var(--mono); font-size: 13px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 400;
}
.ss-loc {
  font-size: 18px; font-weight: 500; color: var(--text-dim);
  letter-spacing: -0.01em;
}
.ss-banner-r { display: flex; gap: 20px; }
.ss-fact {
  text-align: right;
  border-left: 1px solid var(--line);
  padding-left: 16px;
}
.ss-fact > .mono { display: block; font-family: var(--mono); font-weight: 700; font-size: 22px; }
.ss-fact-l { font-size: 10px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }

.ss-grid-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
}
.ss-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  background: var(--bg-1);
  border-radius: 6px;
  overflow: hidden;
}
.ss-table th, .ss-table td { padding: 8px 6px; text-align: center; }
.ss-th-pos {
  text-align: left;
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.1em;
  padding-left: 14px !important;
  width: 70px;
  background: var(--bg-2);
}
.ss-th {
  font-family: var(--mono);
  border-left: 1px solid var(--line);
  background: var(--bg-2);
}
.ss-th.first { border-left-color: var(--line-strong); border-left-width: 2px; }
.ss-th-period { font-size: 9px; color: var(--text-faint); letter-spacing: 0.1em; }
.ss-th-half { font-size: 13px; color: var(--text); font-weight: 700; margin-top: 2px; }
.ss-row-h {
  text-align: left;
  padding-left: 14px !important;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.ss-pos-num { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--blue); display: block; }
.ss-pos-role { font-size: 8px; color: var(--text-faint); letter-spacing: 0.1em; }
.ss-cell {
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  color: var(--text-faint);
  font-family: var(--mono); font-size: 11px;
}
.ss-cell.first { border-left-color: var(--line-strong); border-left-width: 2px; }
.ss-cell.filled {
  background: var(--accent-soft);
  color: var(--text);
  font-family: "Helvetica Neue", Helvetica, sans-serif;
  font-weight: 600; font-size: 11px;
}

.ss-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ss-section-h {
  font-family: var(--mono); font-size: 10px; color: var(--blue);
  letter-spacing: 0.12em; margin-bottom: 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.ss-load-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.ss-load-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-size: 11px;
}
.ss-initials {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent);
  color: var(--text);
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: 0;
}
.ss-load-name { font-size: 11px; }
.ss-load-mins { font-size: 11px; font-weight: 700; color: var(--text); }
.ss-load-bar {
  grid-column: 1 / -1;
  height: 3px; background: var(--bg-2); border-radius: 1px; overflow: hidden;
}
.ss-load-fill { display: block; height: 100%; background: var(--blue); }
.ss-subs { display: flex; flex-direction: column; gap: 10px; font-size: 11px; }
.ss-sub-col-h {
  display: flex; gap: 8px; align-items: baseline;
  margin-bottom: 4px;
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  letter-spacing: 0.08em;
}
.ss-sub-col-h .mono { color: var(--blue); font-weight: 700; }
.ss-sub-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.ss-sub {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 3px;
  background: var(--bg-2);
  border-left: 3px solid var(--text-faint);
}
.ss-sub-out { border-left-color: var(--red); background: #fdf2f1; }
.ss-sub-in { border-left-color: var(--green); background: #f0fbf4; }
.ss-sub-switch { border-left-color: var(--blue); background: var(--blue-soft); }
.ss-sub-tag { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.08em; }
.ss-sub-out .ss-sub-tag { color: var(--red); }
.ss-sub-in .ss-sub-tag { color: var(--green); }
.ss-sub-switch .ss-sub-tag { color: var(--blue); }
.ss-sub-name { font-size: 11px; font-weight: 600; }
.ss-sub-pos { font-size: 11px; color: var(--text-dim); }

.ss-footer {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 10px; color: var(--text-faint);
  padding-top: 12px; border-top: 1px solid var(--line);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* ===================== Tweaks hint ===================== */
.tweak-hint { font-size: 11px; color: var(--text-dim); margin-top: 6px; line-height: 1.4; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes popIn {
  from { transform: scale(0.96) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes popInTight {
  from { transform: scale(0.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Tighten popover internals */
.sheet-popover .sheet-h { padding: 12px 16px 10px; }
.sheet-popover .sheet-title { font-size: 15px; }
.sheet-popover .sheet-search { padding: 10px 16px; }
.sheet-popover .sheet-row { padding: 9px 12px; }
.sheet-popover .sheet-row-name { font-size: 12px; }

/* ===================== Scrollbars ===================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 5px; border: 2px solid var(--bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

/* Responsive */
@media (max-width: 980px) {
  .planner-view { grid-template-columns: 1fr; }
  .stats-sidebar { border-top: 1px solid var(--line); border-right: 0; }
  .setup-grid { grid-template-columns: 1fr; }
  .player-list { grid-template-columns: 1fr; }
  .planner-header { flex-direction: column; align-items: flex-start; }
  .ph-right { width: 100%; justify-content: space-between; }
  .topbar { grid-template-columns: 1fr auto; }
  .tabs { grid-column: 1 / -1; justify-self: stretch; }
  .top-actions { grid-column: 2; }
}
