/* Coach Stats — app styles (moved out of app.html; loaded by a <link> in its <head>). */
:root {
  --red: #16a34a;
  --btn-green: #15803d; /* fills behind white text: 5:1 contrast */
  --red-dark: #14532d;
  --red-light: #4ade80;
  --gold: #f5a623;
  --cream: #f0fdf4;
  --dark: #050d08;
  --bg: #080f0b;
  --panel: #0a1a0f;
  --panel2: #0d2015;
  --border: rgba(22,163,74,0.22);
  --muted: rgba(240,253,244,0.7);
  --green: #4ade80;
  --blue: #3b82f6;
  --amber: #f59e0b;
  --purple: #a855f7;
  --home-col: #16a34a;
  --away-col: #e2e8f0;
  --nav-h: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { height:100%; overflow:hidden; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  display: flex;
  flex-direction: column;
}

/* ── TOP BAR ── */
.topbar {
  background: #0a0a0a;
  border-bottom: 2px solid var(--red);
  padding: 12px 16px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding-top: max(12px, env(safe-area-inset-top));
}
.topbar-score {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tb-team {
  text-align: center;
}
.tb-name {
  font-family: 'Oswald', sans-serif;
  font-size:12px;
  letter-spacing: 1px;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 1px;
}
.tb-score {
  font-family: 'Oswald', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}
.tb-score span { color: var(--gold); }
.tb-vs { font-family:'Oswald',sans-serif; font-size:12px; color:var(--muted); }
.topbar-clock {
  text-align: right;
}
.tb-clock-time {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--cream);
  line-height: 1;
}
.tb-clock-time.running { color: var(--green); }
.tb-clock-time.overtime { color: var(--red-light); }
.tb-clock-status {
  font-size:12px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-top: 2px;
}
.tb-match-label { font-family:'Inter',sans-serif; font-size:12px; color:rgba(240,253,244,0.62); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:120px; text-align:center; margin-top:1px; }
.tb-clock-status.live { color: var(--green); }
.tb-clock-time.running { animation: clockPulse 2s ease-in-out infinite; }
@keyframes clockPulse { 0%,100% { opacity:1; } 50% { opacity:0.7; } }
/* ── TABLET / iPAD (Phase 3) ─────────────────────────────────────────
   Use the width: match setup beside the live clock and scoreboard, and the
   Record tab's event boxes in two columns, instead of a stretched phone. */
@media (min-width: 820px) {
  .page.active { max-width: 1180px; margin: 0 auto; padding: 18px 20px; }
  #page-match.active { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); column-gap: 22px; align-items: start; }
  #page-record .rec-event-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; }
  #page-players .squad-grid { grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); }
  #page-history .hist-actions { grid-template-columns: repeat(3, minmax(0,1fr)); }
  #page-history .hist-action:last-child:nth-child(odd) { grid-column: auto; }
}
@media (min-width: 1100px) {
  #page-record .rec-event-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
/* History actions: one calm style, line icons (Phase 3) */
.hist-actions { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:16px; }
.hist-action { display:flex; align-items:center; gap:10px; text-align:left; padding:12px; min-height:64px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:12px; color:var(--cream); cursor:pointer; }
.hist-action:hover, .hist-action:focus-visible { border-color:rgba(74,222,128,0.5); background:rgba(74,222,128,0.06); outline:none; }
.hist-action:last-child:nth-child(odd) { grid-column:1 / -1; }
.ha-icon { color:#4ade80; flex-shrink:0; display:flex; }
.ha-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ha-title { font-family:'Oswald',sans-serif; font-size:15px; font-weight:600; letter-spacing:0.3px; }
.ha-sub { font-family:'Inter',sans-serif; font-size:12px; color:rgba(240,253,244,0.65); line-height:1.3; }
#user-badge { align-items:center; margin-left:12px; flex-shrink:0; }
.topbar-clock { margin-left:auto; }
.user-menu-btn { display:flex; align-items:center; gap:6px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.14); border-radius:22px; padding:4px 10px 4px 4px; min-height:40px; color:var(--cream); cursor:pointer; }
.user-menu-avatar { width:30px; height:30px; border-radius:50%; background:#15803d; display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:14px; font-weight:700; color:#fff; }
.user-menu-bars { font-size:16px; line-height:1; color:rgba(240,253,244,0.8); }
.user-menu { position:fixed; top:calc(max(12px, env(safe-area-inset-top)) + 52px); right:10px; z-index:9500; min-width:220px; background:#101a14; border:1px solid rgba(74,222,128,0.25); border-radius:12px; padding:6px; box-shadow:0 12px 32px rgba(0,0,0,0.5); }
.user-menu-who { font-family:'Inter',sans-serif; font-size:12px; color:rgba(240,253,244,0.7); padding:8px 12px 10px; border-bottom:1px solid rgba(255,255,255,0.08); margin-bottom:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:260px; }
.user-menu button { display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:none; border:none; border-radius:8px; padding:11px 12px; font-family:'Inter',sans-serif; font-size:14px; color:var(--cream); cursor:pointer; }
.user-menu button:hover, .user-menu button:focus-visible { background:rgba(74,222,128,0.1); outline:none; }
.user-menu-ver { font-family:'Inter',sans-serif; font-size:12px; color:rgba(240,253,244,0.62); padding:6px 12px 4px; }
.user-menu-sep { height:1px; background:rgba(255,255,255,0.08); margin:4px 0; }

/* ── SCROLL AREA ── */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
}
.scroll-area::-webkit-scrollbar { display: none; }


/* ── BOTTOM NAV ── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  background: #0a0a0a;
  border-top: 1px solid var(--border);
  display: flex;
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  z-index: 100;
}
.nav-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 2px 6px;
  transition: all 0.2s;
  position: relative;
}
.nav-btn .nav-icon { font-size: 20px; line-height: 1; }
.nav-btn .nav-label {
  font-family: 'Inter', sans-serif;
  font-size:12px;
  font-weight:500;
  letter-spacing:0;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.nav-btn.active .nav-label { color: var(--red-light); }
.nav-btn.active::after { content:none; }
/* Active tab: a pill behind the icon, so it reads without relying on colour alone */
.nav-btn .nav-icon { display:flex; align-items:center; justify-content:center; width:52px; height:30px; border-radius:15px; transition:background 0.2s; }
.nav-btn.active .nav-icon { background:rgba(74,222,128,0.16); }
.nav-btn.active .nav-label { font-weight:600; }

/* ── PAGE VIEWS ── */
.page { display: none; padding: 14px 12px; opacity: 0; transition: opacity 0.12s ease; }
.page.active { opacity: 1; }
.page.active { display: block; }

/* ── SECTION LABEL ── */
.sec-label {
  font-family: 'Oswald', sans-serif;
  font-size:12px;
  letter-spacing:1px;
  color: var(--red);
  text-transform: uppercase;
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sec-label::after { content:''; flex:1; height:1px; background: var(--border); }
.sec-label:first-child { margin-top: 4px; }

/* ── CARD ── */
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
}
.card-inner { padding: 14px; }

/* ── MATCH SETUP ── */
.team-row { display: grid; grid-template-columns: 1fr 32px 1fr; gap: 8px; align-items: end; margin-bottom: 12px; }
.team-col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--red); }
input, select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  width: 100%;
  transition: border-color 0.2s;
}
input:focus, select:focus { outline:none; border-color:var(--red); }
select option { background:#0d2015; }
/* iOS zooms the page in whenever a focused field is under 16px. That's
   disruptive mid-match, so text-entry fields are held at 16px regardless of
   whatever smaller size their own rule sets. Non-input text is unaffected. */
input[type="text"], input[type="url"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], input[type="tel"], input[type="date"],
input:not([type]), textarea, select {
  font-size: 16px !important;
}
/* Fields deliberately larger than 16px keep their size — the rule above is a
   floor to stop iOS zooming, not a fixed size. */
.ee-input-sm { font-size: 22px !important; }
.team-name-input { font-family:'Oswald',sans-serif; font-size:16px; font-weight:600; text-align:center; border-color:rgba(22,163,74,0.3); }
.vs-mid { font-family:'Oswald',sans-serif; font-size:12px; color:var(--muted); text-align:center; padding-bottom:11px; }
.meta-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
/* Pickers take the full row, so labels like "Select Competition" aren't squeezed */
.meta-row > .comp-picker-btn { grid-column: 1 / -1; min-height: 44px; }
.meta-row select, .meta-row input { min-width: 0; text-overflow: ellipsis; }
/* Date played / throw-in: a visible label so the empty picker isn't a blank box */
.meta-dt { display:flex; flex-direction:column; gap:3px; min-width:0; }
.meta-dt > span { font-size:11px; letter-spacing:0.04em; text-transform:uppercase; color:var(--muted); }
.meta-dt > input { width:100%; }
@media (max-width: 440px) {
  .team-picker-input { font-size: 14px; padding: 11px 26px 11px 10px; }
  .team-row { grid-template-columns: 1fr 22px 1fr; gap: 6px; }
  .meta-row select, .meta-row input { font-size: 14px; }
}

/* ── CLOCK ── */
.clock-card { background: var(--panel); border: 1px solid var(--border); border-radius:14px; margin-bottom:14px; }
.clock-main {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.clock-big {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(48px, 13vw, 72px);
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--cream);
  line-height: 1;
  transition: color 0.3s;
}
.clock-big.running { color: var(--green); }
.clock-big.overtime { color: var(--red-light); }
.clock-right { display:flex; flex-direction:column; gap:8px; align-items:flex-end; }
.clock-status-badge {
  font-family:'Oswald',sans-serif;
  font-size:12px;
  letter-spacing:1px;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:20px;
  background:rgba(255,255,255,0.07);
  color:var(--muted);
}
.clock-status-badge.live { background:rgba(34,197,94,0.15); color:var(--green); }
.clock-status-badge.paused { background:rgba(245,166,35,0.15); color:var(--amber); }
.clock-status-badge.overtime { background:rgba(22,163,74,0.15); color:var(--red-light); }
.clock-btns { display:flex; gap:8px; }
.clock-action-btn {
  border:none; border-radius:10px; cursor:pointer;
  font-family:'Oswald',sans-serif; font-weight:600;
  font-size:13px; letter-spacing:0.2px;
  padding: 12px 20px;
  transition: all 0.15s;
  display:flex; align-items:center; gap:6px;
}
.btn-start { background:linear-gradient(135deg,#166534,#22c55e); color:#fff; }
.btn-pause { background:linear-gradient(135deg,#92400e,#f59e0b); color:#1a0a00; }
.btn-clock-reset { background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.12); color:var(--muted); font-size:12px; padding:10px 14px; }
.clock-meta {
  padding: 10px 20px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.clock-meta label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); }
.clock-meta input { width:60px; text-align:center; font-family:'Oswald',sans-serif; font-size:15px; padding:7px 8px; border-radius:7px; }
.clock-meta .min-note { font-size:12px; color:rgba(245,232,232,0.22); font-style:italic; }
.half-row { display:flex; gap:8px; margin-left:auto; }
.half-btn {
  background:rgba(22,163,74,0.1); border:1px solid rgba(22,163,74,0.3);
  border-radius:6px; color:var(--red); font-family:'Oswald',sans-serif;
  font-size:12px; letter-spacing:1px; padding:6px 14px; cursor:pointer; transition:all 0.2s;
}
.half-btn.active, .half-btn:hover { background:var(--btn-green); color:#fff; }
.btn-end-game { background:rgba(220,38,38,0.15); border:1px solid rgba(220,38,38,0.4); border-radius:8px; padding:8px 10px; color:#fca5a5; font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; white-space:nowrap; }
.btn-end-game:hover { background:rgba(220,38,38,0.3); color:#fff; }
.btn-halftime { background:rgba(251,191,36,0.12); border:1px solid rgba(251,191,36,0.35); border-radius:8px; padding:8px 10px; color:#fde68a; font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; white-space:nowrap; }
.btn-halftime:hover { background:rgba(251,191,36,0.22); }

/* ── SCOREBOARD ── */
.scoreboard-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 14px;
  overflow: hidden;
}
.sb-header {
  background: rgba(0,0,0,0.3);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sb-comp { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; }
.sb-body {
  display: grid;
  grid-template-columns: 1fr 16px 1fr;
  padding: 20px 16px;
  align-items: center;
  gap: 8px;
}
.sb-team { text-align:center; }
.sb-team-name {
  font-family:'Oswald',sans-serif;
  font-size: clamp(13px,3.5vw,18px);
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:1px;
  margin-bottom:8px;
}
.sb-score-row { display:flex; align-items:baseline; justify-content:center; gap:3px; }
.sb-goals { font-family:'Oswald',sans-serif; font-size:clamp(40px,11vw,64px); font-weight:700; color:var(--gold); line-height:1; }
.sb-sep { font-family:'Oswald',sans-serif; font-size:clamp(40px,11vw,64px); font-weight:700; color:rgba(240,253,244,0.62); line-height:1; }
.sb-pts { font-family:'Oswald',sans-serif; font-size:clamp(40px,11vw,64px); font-weight:700; color:var(--cream); line-height:1; }
.sb-total { font-size:12px; color:var(--red); font-style:italic; margin-top:4px; }
.sb-divider { font-family:'Oswald',sans-serif; font-size:20px; color:rgba(245,232,232,0.12); text-align:center; }
.sb-undo-row { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:0 16px 16px; }
.undo-btn {
  background:rgba(255,60,60,0.08);
  border:1px solid rgba(255,60,60,0.25);
  border-radius:8px;
  padding:11px;
  color:rgba(255,160,160,0.85);
  font-family:'Oswald',sans-serif;
  font-size:13px;
  letter-spacing:0.2px;
  cursor:pointer;
  transition:all 0.15s;
  text-align:center;
}
.undo-btn:hover { background:rgba(255,255,255,0.1); color:var(--cream); border-color:rgba(255,255,255,0.3); }

/* ── ACTION TRIGGER BUTTONS ── */
/* ── RECORD TAB HOME/AWAY HEADERS ────────────────── */
.record-team-headers { display:flex; align-items:stretch; margin-bottom:12px; border-radius:12px; overflow:hidden; border:1px solid var(--border); }
.record-team-col { flex:1; padding:10px 14px; text-align:center; }
.record-team-col.home-col { background:linear-gradient(135deg,rgba(22,163,74,0.2),rgba(22,163,74,0.08)); border-right:1px solid var(--border); }
.record-team-col.away-col { background:linear-gradient(135deg,rgba(148,163,184,0.12),rgba(148,163,184,0.04)); }
.record-team-label { font-family:'Oswald',sans-serif; font-size:13px; font-weight:700; letter-spacing:1px; text-transform:uppercase; }
.record-team-col.home-col .record-team-label { color:#4ade80; }
.record-team-col.away-col .record-team-label { color:#e2e8f0; }
.record-team-divider { width:1px; background:var(--border); flex-shrink:0; }

.trigger-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:10px; }
.record-group { background:rgba(255,255,255,0.02); border:1px solid var(--border); border-radius:12px; padding:12px 12px 2px; margin-bottom:14px; }
.record-group .trigger-grid:last-child { margin-bottom:10px; }
.trigger-btn {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 12px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  min-height: 100px;
  position: relative;
  overflow: hidden;
}
.trigger-btn::before {
  content:'';
  position:absolute;
  top:0; right:0; bottom:0; left:0;
  background:rgba(22,163,74,0.08);
  opacity:0;
  transition:opacity 0.18s;
}
.trigger-btn:active::before, .trigger-btn:hover::before { opacity:1; }
.trigger-btn:active { transform:scale(0.97); }

/* Home buttons — green left border */
.home-btn {
  border-left: 3px solid var(--home-col);
  background: linear-gradient(135deg, rgba(22,163,74,0.08) 0%, var(--panel) 60%);
}
.home-btn .trig-team { color: #4ade80; }
.home-btn .trig-count { color: #4ade80; }

/* Away buttons — white/silver left border */
.away-btn {
  border-left: 3px solid #94a3b8;
  background: linear-gradient(135deg, rgba(148,163,184,0.08) 0%, var(--panel) 60%);
}
.away-btn .trig-team { color: #cbd5e1; }
.away-btn .trig-count { color: #e2e8f0; }

.trig-icon { font-size:26px; line-height:1; }
.trig-type { font-family:'Oswald',sans-serif; font-size:12px; font-weight:600; letter-spacing:0.2px; color:var(--cream); }
.trig-team { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; color:var(--muted); }
.trig-count {
  font-family:'Oswald',sans-serif;
  font-size:18px;
  font-weight:700;
  color:var(--gold);
  line-height:1;
}

/* ── MODAL BOTTOM SHEET ── */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.75);
  z-index: 5000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-sheet {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(20px + var(--safe-bottom));
  width: 100%;
  max-width: 640px;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1);
  -webkit-transform: translateY(100%);
  -webkit-transition: -webkit-transform 0.28s cubic-bezier(0.22,1,0.36,1);
}
.modal-overlay.open .modal-sheet {
  transform: translateY(0);
  -webkit-transform: translateY(0);
}
@keyframes sheetUp { from{transform:translateY(100%);opacity:0} to{transform:translateY(0);opacity:1} }
.sheet-handle { width:36px; height:4px; background:rgba(255,255,255,0.15); border-radius:2px; margin:0 auto 16px; }
.sheet-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:16px; }
.sheet-title { font-family:'Oswald',sans-serif; font-size:18px; font-weight:600; color:var(--cream); text-transform:uppercase; letter-spacing:1px; }
.sheet-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.sheet-close { background:rgba(255,255,255,0.08); border:none; border-radius:50%; width:32px; height:32px; color:var(--muted); font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.sheet-close:hover { background:rgba(255,255,255,0.12); color:var(--cream); }
.sheet-header-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.sheet-save { background:linear-gradient(135deg,var(--red-dark),var(--red)); border:none; border-radius:16px; height:32px; padding:0 16px; color:#fff; font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.5px; cursor:pointer; }
.outcome-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.outcome-btn {
  padding: 16px 8px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: 'Oswald', sans-serif;
  font-weight: 600;
  font-size:13px;
  letter-spacing:0.2px;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 76px;
  justify-content: center;
}
.outcome-btn:active { transform:scale(0.95); }
.o-icon { font-size:22px; }
.o-label { font-size:12px; letter-spacing:1px; opacity:0.85; text-align:center; line-height:1.3; }
.ob-point   { background:rgba(22,163,74,0.18);   border-color:rgba(22,163,74,0.45);   color:var(--red-light); }
.ob-goal    { background:rgba(255,107,107,0.18); border-color:rgba(255,107,107,0.45); color:#ffaaaa; }
.ob-twoptr  { background:rgba(255,180,0,0.18);   border-color:rgba(255,180,0,0.45);   color:#ffd060; }
.ob-blocked { background:rgba(180,100,20,0.18);  border-color:rgba(220,150,50,0.4);   color:#e8b86b; }
.ob-wide    { background:rgba(100,100,140,0.18); border-color:rgba(140,140,200,0.35); color:#aaaaee; }
.ob-saved   { background:rgba(30,100,160,0.18);  border-color:rgba(60,140,220,0.35);  color:#7ab8ee; }
.ob-short   { background:rgba(80,80,80,0.22);    border-color:rgba(160,160,160,0.3);  color:#aaaaaa; }
.ob-gen     { background:rgba(160,50,50,0.15);   border-color:rgba(200,80,80,0.3);    color:#ffcccc; }

/* ── PLAYERS ── */
.add-player-row { display:grid; grid-template-columns:1fr 52px 1fr auto; gap:8px; margin-bottom:12px; align-items:center; }
.btn-add-player {
  background:var(--btn-green); border:none; border-radius:8px; padding:11px 14px;
  color:#fff; font-family:'Oswald',sans-serif; font-weight:600; font-size:12px;
  letter-spacing:1px; cursor:pointer; white-space:nowrap; transition:filter 0.15s;
}
.btn-add-player:hover { filter:brightness(1.1); }
.player-list { display:flex; flex-direction:column; gap:6px; }
.player-row {
  display:grid; grid-template-columns:26px 1fr auto auto auto auto;
  gap:8px; align-items:center;
  background:rgba(255,255,255,0.03); border-radius:10px; padding:10px 12px;
}
.player-row:hover { background:rgba(255,255,255,0.055); }
.player-num { font-family:'Oswald',sans-serif; font-size:12px; color:rgba(240,253,244,0.62); text-align:center; }
.player-name { font-size:14px; color:var(--cream); font-weight:500; }
.player-team-tag { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--red); opacity:0.7; }
.psb {
  background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.12);
  border-radius:6px; padding:5px 9px; color:var(--cream);
  font-family:'Oswald',sans-serif; font-size:12px; cursor:pointer;
  transition:all 0.15s; min-width:34px; text-align:center;
}
.psb:hover { background:rgba(22,163,74,0.15); border-color:var(--red); color:var(--red); }
.psb-g:hover { background:rgba(245,166,35,0.15); border-color:var(--gold); color:var(--gold); }
/* Delete controls are destructive, so they get the full 44px touch target.
   The visible glyph stays small; the hit area around it does the work. */
.del-btn { background:none; border:none; color:rgba(255,80,80,0.35); cursor:pointer; font-size:15px; min-width:44px; min-height:44px; display:inline-flex; align-items:center; justify-content:center; padding:0; border-radius:6px; transition:all 0.15s; flex-shrink:0; }
.del-btn:hover { color:#ff6060; background:rgba(255,0,0,0.1); }

/* ── TIMELINE ── */
.event-item {
  display:flex; align-items:center; gap:10px;
  padding:10px 12px;
  background:rgba(255,255,255,0.03);
  border-radius:10px;
  border-left:3px solid rgba(255,255,255,0.08);
  margin-bottom:6px;
  animation:slideIn 0.25s ease;
}
@keyframes slideIn { from{opacity:0;transform:translateX(-8px)} to{opacity:1;transform:translateX(0)} }
.event-item.goal-home,.event-item.goal-away { border-left-color:var(--gold); }
.event-item.point-home,.event-item.point-away { border-left-color:var(--red); }
.event-min { font-family:'Oswald',sans-serif; font-size:12px; color:var(--muted); min-width:28px; text-align:right; }
.event-icon { font-size:15px; }
.event-text { font-size:13px; color:rgba(245,232,232,0.85); flex:1; font-weight:500; }
.event-team-tag { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; color:var(--muted); }
.empty-note { text-align:center; padding:28px; color:rgba(240,253,244,0.55); font-style:italic; font-size:14px; }

/* ── STATS TABLE ── */
.stats-table { width:100%; border-collapse:collapse; }
.stats-table thead tr { background:rgba(0,0,0,0.4); }
.stats-table thead th { padding:10px 14px; font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--red); font-weight:500; text-align:center; }
.stats-table thead th:first-child { text-align:left; }
.stats-table tbody tr { border-bottom:1px solid rgba(255,255,255,0.04); transition:background 0.12s; }
.stats-table tbody tr:hover { background:rgba(22,163,74,0.05); }
.stats-table tbody td { padding:10px 14px; font-size:13px; text-align:center; color:var(--cream); }
.stats-table tbody td:first-child { text-align:left; font-size:13px; letter-spacing:0.2px; color:var(--muted); font-family:'Oswald',sans-serif; }
.stat-val { font-family:'Oswald',sans-serif; font-size:18px; font-weight:700; }
.stat-leader { color:var(--gold); }
.stats-section-row td { background:rgba(22,163,74,0.1); border-top:1px solid rgba(22,163,74,0.2); padding:8px 14px; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--red); text-transform:uppercase; font-weight:600; }

/* ── TRENDS PAGE ── */
.trend-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px; }
.trend-card {
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  position:relative;
  overflow:hidden;
}
.trend-card.full-width { grid-column:1/-1; }
.trend-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; margin-bottom:8px; }
.trend-values { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:10px; gap:8px; }
.trend-team-val { text-align:center; flex:1; }
.trend-team-name { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); margin-bottom:3px; }
.trend-big { font-family:'Oswald',sans-serif; font-size:clamp(22px,6vw,32px); font-weight:700; line-height:1; }
.trend-big.home-color { color:var(--red-light); }
.trend-big.away-color { color:var(--blue); }
.trend-spark { height:40px; width:100%; }
.trend-bar-wrap { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.trend-bar-label { font-size:12px; color:var(--muted); min-width:80px; font-weight:500; }
.trend-bar-track { flex:1; height:8px; background:rgba(255,255,255,0.07); border-radius:4px; overflow:hidden; display:flex; }
.trend-bar-home { height:100%; background:var(--btn-green); border-radius:4px 0 0 4px; transition:width 0.5s ease; }
.trend-bar-away { height:100%; background:var(--blue); border-radius:0 4px 4px 0; transition:width 0.5s ease; }
.trend-bar-nums { display:flex; justify-content:space-between; font-family:'Oswald',sans-serif; font-size:12px; min-width:44px; }
.trend-bar-nums .h { color:var(--red-light); }
.trend-bar-nums .a { color:#7ab8ee; }
.momentum-row { display:flex; align-items:center; gap:6px; margin-bottom:8px; }
.momentum-label { font-size:12px; color:var(--muted); font-weight:500; }
.momentum-bar-outer { flex:1; height:12px; background:rgba(255,255,255,0.07); border-radius:6px; overflow:hidden; position:relative; }
.momentum-bar-center { position:absolute; top:0; bottom:0; left:50%; width:1px; background:rgba(255,255,255,0.2); }
.momentum-fill { height:100%; border-radius:6px; transition:all 0.5s ease; }
.momentum-lead { font-family:'Oswald',sans-serif; font-size:12px; font-weight:600; }
.lead-home { color:var(--red-light); }
.lead-away { color:#7ab8ee; }
.lead-draw { color:var(--muted); }

/* ── EXPORT ── */
.export-row { display:flex; gap:10px; margin-top:4px; }
.btn-export {
  flex:1; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.12);
  border-radius:10px; padding:14px; color:var(--cream); font-family:'Oswald',sans-serif;
  font-size:13px; letter-spacing:0.2px; cursor:pointer; transition:all 0.2s;
}
.btn-export:hover { background:rgba(22,163,74,0.1); border-color:var(--red); color:var(--red-light); }
.btn-reset { background:rgba(255,60,60,0.06); border-color:rgba(255,60,60,0.2); color:rgba(255,120,120,0.6); }
.btn-reset:hover { background:rgba(255,60,60,0.14); border-color:rgba(255,60,60,0.4); color:#ff8080; }

/* POSSESSION SPLIT BAR */
.poss-header { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:12px; }
.poss-team-label { display:flex; flex-direction:column; gap:3px; }
.poss-pct { font-family:'Oswald',sans-serif; font-size:clamp(28px,8vw,40px); font-weight:700; line-height:1; }
.poss-name { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); }
.poss-center-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); text-align:center; padding-bottom:4px; }
.poss-center-label.home-lead { color:var(--red-light); }
.poss-center-label.away-lead { color:#7ab8ee; }
.poss-center-label.level { color:var(--muted); }
.poss-bar-outer { display:flex; height:20px; border-radius:10px; overflow:hidden; margin-bottom:10px; background:rgba(255,255,255,0.05); }
.poss-bar-home { background:linear-gradient(90deg,var(--red-dark),var(--red)); height:100%; transition:width 0.6s cubic-bezier(0.4,0,0.2,1); border-radius:10px 0 0 10px; }
.poss-bar-away { background:linear-gradient(90deg,#1d4ed8,var(--blue)); height:100%; transition:width 0.6s cubic-bezier(0.4,0,0.2,1); border-radius:0 10px 10px 0; }
.poss-legend { font-size:12px; color:var(--muted); margin-bottom:14px; text-align:center; }
.poss-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; vertical-align:middle; }
.poss-dot.home { background:var(--btn-green); }
.poss-timeline-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; margin-bottom:8px; }
.poss-timeline-canvas { width:100%; height:60px; display:block; }
.poss-timeline-legend { display:flex; justify-content:center; gap:16px; margin-top:8px; font-size:12px; color:var(--muted); }

/* SHOT SUMMARY TABLE */
.shot-summary-table { width:100%; border-collapse:collapse; }
.shot-summary-table th { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); padding:7px 10px; text-align:center; background:rgba(0,0,0,0.3); border-bottom:1px solid rgba(255,255,255,0.06); }
.shot-summary-table th:first-child { text-align:left; }
.shot-summary-table td { padding:8px 10px; text-align:center; color:var(--cream); font-family:'Oswald',sans-serif; font-size:14px; border-bottom:1px solid rgba(255,255,255,0.04); }
.shot-summary-table td:first-child { text-align:left; font-size:13px; letter-spacing:0.2px; color:var(--muted); }
.shot-summary-table tr:last-child td { border-bottom:none; }
/* ── TRIAL BANNER ── */
#trial-banner {
  display: none;
  background: linear-gradient(90deg, rgba(245,166,35,0.12), rgba(245,166,35,0.06));
  border-bottom: 1px solid rgba(245,166,35,0.25);
  padding: 6px 16px;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  z-index: 50;
}
#trial-banner .tb-icon { font-size: 13px; flex-shrink: 0; }
#trial-banner .tb-text { font-family: 'Oswald', sans-serif; font-size:12px; letter-spacing: 1px; color: #fde68a; flex: 1; }
#trial-banner .tb-text span { color: #fff; font-weight: 700; }
#trial-banner .tb-upgrade {
  background: #f5a623; border: none; border-radius: 5px;
  padding: 4px 10px; color: #1a0a00;
  font-family: 'Oswald', sans-serif; font-size:12px; font-weight: 700;
  letter-spacing: 1px; cursor: pointer; white-space: nowrap; flex-shrink: 0;
}

/* ── PAYWALL MODAL ── */
#paywall-screen .pw-close {
  position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 14px;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06); color: #f0fdf4; font-size: 18px; line-height: 1; cursor: pointer; z-index: 2;
}
#paywall-screen .pw-close:hover { background: rgba(255,255,255,0.12); }
#paywall-screen {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background:#080f0b;
  z-index: 99998;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Oswald', sans-serif;
  overflow-y: auto;
}
.pw-logo { font-size: 52px; margin-bottom: 12px; }
.pw-title { font-size: 28px; font-weight: 700; color: var(--cream); letter-spacing: 1px; text-transform: uppercase; text-align: center; margin-bottom: 8px; }
.pw-sub { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 32px; font-family: 'Inter', sans-serif; line-height: 1.5; max-width: 320px; }
.pw-plans { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 400px; margin-bottom: 20px; }
.pw-tier-tabs { display: flex; flex-shrink: 0; gap: 0; width: 100%; max-width: 400px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pw-tier-tab { flex: 1; padding: 10px 8px; background: transparent; border: none; color: var(--muted); font-family: 'Oswald', sans-serif; font-size:13px; letter-spacing:0.2px; cursor: pointer; transition: all 0.15s; }
.pw-tier-tab.active { background: rgba(22,163,74,0.12); color: var(--cream); border-bottom: 2px solid var(--red); }
.pw-currency-toggle { display: flex; gap: 8px; margin-bottom: 16px; }
.pw-currency-btn { padding: 7px 16px; background: transparent; border: 1px solid var(--border); border-radius: 20px; color: var(--muted); font-family: 'Oswald', sans-serif; font-size:12px; letter-spacing: 1px; cursor: pointer; transition: all 0.15s; }
.pw-currency-btn.active { background: var(--gold); border-color: var(--gold); color: #0d2015; font-weight: 600; }
.pw-tier-panel { display: none; width: 100%; max-width: 400px; }
.pw-tier-panel.active { display: block; }
.pw-tier-label { font-family: 'Oswald', sans-serif; font-size:13px; letter-spacing:0.2px; color: var(--muted); text-align: center; margin-bottom: 12px; }
.pw-plan {
  background: var(--panel);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.pw-plan:hover, .pw-plan.selected { border-color: var(--red); background: rgba(22,163,74,0.08); }
.pw-plan-badge {
  position: absolute; top: 0; right: 0;
  background: var(--gold); color: #1a0a00;
  font-size:12px; font-weight: 700; letter-spacing: 1px;
  padding: 4px 10px; border-radius: 0 14px 0 8px;
}
.pw-plan-period { font-size:12px; letter-spacing:1px; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.pw-plan-price { font-size: 36px; font-weight: 700; color: var(--cream); line-height: 1; margin-bottom: 4px; }
.pw-plan-price sup { font-size: 18px; vertical-align: top; margin-top: 6px; color: var(--red-light); }
.pw-plan-unit { font-size:12px; color: var(--muted); letter-spacing: 1px; margin-bottom: 12px; }
.pw-plan-saving { font-size:12px; color: var(--green); letter-spacing: 0.5px; font-family: 'Inter', sans-serif; }
.pw-features { width: 100%; max-width: 400px; margin-bottom: 28px; }
.pw-feature { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-family: 'Inter', sans-serif; font-size: 13px; color: rgba(245,232,232,0.75); }
.pw-feature-icon { font-size: 16px; flex-shrink: 0; }
.pw-cta {
  width: 100%; max-width: 400px;
  background: linear-gradient(135deg, #14532d, #16a34a);
  border: none; border-radius: 12px;
  padding: 16px; color: #fff;
  font-family: 'Oswald', sans-serif; font-size: 14px; font-weight: 700;
  letter-spacing:0.2px;
  cursor: pointer; transition: all 0.2s; margin-bottom: 14px;
}
.pw-cta:hover { filter: brightness(1.1); }
.pw-cta:disabled { opacity: 0.5; cursor: not-allowed; }
.pw-note { font-size:12px; color: rgba(240,253,244,0.62); text-align: center; font-family: 'Inter', sans-serif; max-width: 340px; }
.pw-signout { background: none; border: none; color: rgba(240,253,244,0.6); font-size:12px; cursor: pointer; margin-top: 20px; font-family: 'Inter', sans-serif; }
.pw-signout:hover { color: rgba(240,253,244,0.5); }
.pw-expired-msg { background: rgba(220,38,38,0.12); border: 1px solid rgba(220,38,38,0.3); border-radius: 10px; padding: 12px 16px; text-align: center; margin-bottom: 24px; max-width: 400px; width: 100%; }
.pw-expired-msg p { font-family: 'Inter', sans-serif; font-size: 12px; color: #fca5a5; line-height: 1.5; }

/* ── HISTORY PAGE ── */
.history-empty { text-align:center; padding:48px 20px; color:var(--muted); }
.history-empty-icon { font-size:48px; display:block; margin-bottom:12px; opacity:0.4; }
.history-empty-text { font-family:'Oswald',sans-serif; font-size:14px; letter-spacing:1px; text-transform:uppercase; }

.match-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  cursor: pointer;
  transition: all 0.18s;
}
.match-card:hover { border-color: rgba(22,163,74,0.45); }
.match-card:active { transform: scale(0.99); }

.match-card-header {
  background: rgba(0,0,0,0.3);
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.match-card-comp { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); }
.match-card-date { font-family:'Oswald',sans-serif; font-size:12px; color:var(--muted); }

.match-card-score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  padding: 14px;
  align-items: center;
  gap: 8px;
}
.mcs-team { text-align:center; }
.mcs-name { font-family:'Oswald',sans-serif; font-size:clamp(11px,3vw,14px); font-weight:600; text-transform:uppercase; letter-spacing:1px; color:var(--muted); margin-bottom:4px; }
.mcs-score { font-family:'Oswald',sans-serif; font-size:clamp(24px,6vw,36px); font-weight:700; line-height:1; }
.mcs-score span { color:var(--gold); }
.mcs-total { font-size:12px; color:var(--red); margin-top:3px; font-style:italic; }
.mcs-video-stub { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; color:var(--red-light); margin-top:4px; }

/* Fix 3: topbar match label */
.tb-match-label { font-family:'Inter',sans-serif; font-size:12px; color:rgba(240,253,244,0.62); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:120px; text-align:center; margin-top:1px; }

/* Fix 4: history search */
.history-search-wrap { margin-bottom:12px; }
.history-search-input { width:100%; padding:10px 14px; background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:10px; color:var(--cream); font-size:14px; font-family:'Inter',sans-serif; outline:none; box-sizing:border-box; }
.history-search-input::placeholder { color:var(--muted); }

/* Fix 5: video collapse */
.va-collapse-btn { width:100%; padding:6px; background:rgba(0,0,0,0.4); border:none; border-top:1px solid rgba(255,255,255,0.06); color:rgba(240,253,244,0.62); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; text-align:center; }
.va-video-collapsed .va-youtube-player, .va-video-collapsed video { display:none !important; }
.va-video-collapsed .va-collapse-btn { display:block; }

/* Fix 7: annual plan featured */
.pw-plan-featured { border-color: rgba(245,166,35,0.5) !important; background: rgba(245,166,35,0.06) !important; transform: scale(1.02); }
.pw-plan-featured.selected { border-color: var(--red) !important; background: rgba(22,163,74,0.1) !important; }

/* Fix 9: trends empty state */
.trends-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:48px 20px; text-align:center; }
.trends-empty-icon { font-size:40px; opacity:0.3; margin-bottom:12px; }
.trends-empty-title { font-family:'Oswald',sans-serif; font-size:14px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; margin-bottom:8px; }
.trends-empty-sub { font-size:12px; color:rgba(240,253,244,0.55); line-height:1.6; max-width:280px; }
.mcs-divider { font-family:'Oswald',sans-serif; font-size:16px; color:rgba(245,232,232,0.15); text-align:center; }

.match-card-stats {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 0;
}
.mcs-stat {
  padding: 10px 8px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.mcs-stat:last-child { border-right: none; }
.mcs-stat-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; color:var(--muted); margin-bottom:4px; }
.mcs-stat-val { font-family:'Oswald',sans-serif; font-size:14px; font-weight:600; }
.mcs-stat-val .h { color:var(--red-light); }
.mcs-stat-val .sep { color:var(--muted); font-size:12px; padding:0 2px; }
.mcs-stat-val .a { color:#7ab8ee; }

.match-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 14px;
}
.mca-btn {
  flex: 1 1 calc(33% - 6px); min-width: 0; padding:9px 6px; border-radius:8px; border:1px solid var(--border);
  background:rgba(255,255,255,0.04); color:var(--muted);
  font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; transition:all 0.15s; text-align:center;
}
.mca-btn:hover { background:rgba(22,163,74,0.1); color:var(--red-light); border-color:var(--red); }
.mca-btn.danger:hover { background:rgba(255,60,60,0.12); color:#ff8080; border-color:rgba(255,60,60,0.35); }

/* detail modal */
.detail-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.8);
  z-index: 5000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.detail-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.detail-sheet {
  background: var(--panel);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 640px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1);
  -webkit-transform: translateY(100%);
  -webkit-transition: -webkit-transform 0.28s cubic-bezier(0.22,1,0.36,1);
}
.detail-modal-overlay.open .detail-sheet {
  transform: translateY(0);
  -webkit-transform: translateY(0);
}
.detail-sheet-header {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.detail-handle { width:36px; height:4px; background:rgba(255,255,255,0.15); border-radius:2px; margin:0 auto 12px; }
.detail-title { font-family:'Oswald',sans-serif; font-size:16px; font-weight:600; color:var(--cream); text-transform:uppercase; letter-spacing:1px; }
.detail-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.detail-close { position:absolute; top:16px; right:16px; background:rgba(255,255,255,0.08); border:none; border-radius:50%; width:32px; height:32px; color:var(--muted); font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.detail-close:hover { background:rgba(255,255,255,0.12); color:var(--cream); }
.detail-body { flex:1; overflow-y:auto; padding:14px; }
.detail-body::-webkit-scrollbar { display:none; }

/* save banner on stats page */
.save-match-banner {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.3);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.smb-icon { font-size:22px; }
.smb-text { flex:1; }
.smb-title { font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; color:var(--cream); letter-spacing:1px; }
.smb-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.btn-save-match {
  background: linear-gradient(135deg,#166534,#22c55e);
  border:none; border-radius:8px; padding:10px 16px;
  color:#fff; font-family:'Oswald',sans-serif; font-weight:600;
  font-size:12px; letter-spacing:1px; cursor:pointer; white-space:nowrap;
  transition:filter 0.15s;
}
.btn-save-match:hover { filter:brightness(1.1); }
/* ── TEAM PICKER ── */
.team-picker-wrap { position: relative; }
.team-picker-input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(22,163,74,0.3);
  border-radius: 8px;
  padding: 11px 36px 11px 12px;
  color: var(--cream);
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.15s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  -webkit-appearance: none;
}
.team-picker-input:active, .team-picker-input:focus { outline: none; border-color: var(--red); background: rgba(22,163,74,0.1); }
.team-picker-chevron {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  font-size:12px;
  color: var(--muted);
  pointer-events: none;
}

/* picker modal - Safari compatible */
.picker-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.78);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.picker-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.picker-sheet {
  background: var(--panel);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 640px;
  height: 80vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.22,1,0.36,1);
  -webkit-transform: translateY(100%);
  -webkit-transition: -webkit-transform 0.28s cubic-bezier(0.22,1,0.36,1);
}
.picker-overlay.open .picker-sheet {
  transform: translateY(0);
  -webkit-transform: translateY(0);
}
.picker-header {
  padding: 14px 14px 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}
.picker-handle { width:36px; height:4px; background:rgba(255,255,255,0.15); border-radius:2px; margin:0 auto 12px; }
.picker-title { font-family:'Oswald',sans-serif; font-size:14px; font-weight:600; color:var(--cream); text-transform:uppercase; letter-spacing:1px; margin-bottom:10px; text-align:center; }
.picker-search {
  width: 100%;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  transition: border-color 0.2s;
}
.picker-search:focus { outline: none; border-color: var(--red); }
.picker-search::placeholder { color: var(--muted); }
.picker-list {
  flex: 1;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  min-height: 0;
}
.picker-list::-webkit-scrollbar { display: none; }
.picker-group-label {
  font-family: 'Oswald', sans-serif;
  font-size:12px;
  letter-spacing:1px;
  color: var(--red);
  text-transform: uppercase;
  padding: 10px 14px 4px;
  background: rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 1;
}
.picker-item {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 15px;
  color: var(--cream);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.12s;
}
.picker-item:hover, .picker-item:active { background: rgba(22,163,74,0.1); }
.picker-item-badge {
  font-family: 'Oswald', sans-serif;
  font-size:12px;
  letter-spacing:0.2px;
  color: var(--muted);
}
.picker-empty { text-align:center; padding:32px; color:var(--muted); font-style:italic; font-size:14px; }
.picker-close-btn {
  margin: 10px 14px 14px;
  width: calc(100% - 28px);
  padding: 13px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: var(--muted);
  font-family: 'Oswald', sans-serif;
  font-size:13px;
  letter-spacing:0.2px;
  cursor: pointer;
  flex-shrink: 0;
}
/* ── SQUAD ── */
.squad-sub-tabs { display:flex; gap:0; margin-bottom:16px; border-radius:8px; overflow:hidden; border:1px solid var(--border); }
.squad-sub-btn { flex:1; padding:10px 6px; background:rgba(255,255,255,0.04); border:none; color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; transition:all 0.2s; border-right:1px solid var(--border); }
.squad-sub-btn:last-child { border-right:none; }
.squad-sub-btn.active { background:var(--btn-green); color:#fff; font-weight:600; }

.squad-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px,1fr)); gap:8px; margin-bottom:14px; }
.squad-slot {
  background:var(--panel); border:1px solid var(--border); border-radius:10px;
  padding:12px 10px; display:flex; flex-direction:column; gap:4px;
  cursor:pointer; transition:all 0.18s; position:relative;
}
.squad-slot:hover, .squad-slot:active { border-color:var(--red); background:rgba(22,163,74,0.08); }
.squad-slot.filled { border-color:rgba(22,163,74,0.4); }
.squad-slot.filled:hover { border-color:var(--red); }
.squad-num { font-family:'Oswald',sans-serif; font-size:22px; font-weight:700; color:var(--gold); line-height:1; }
.squad-name { font-size:13px; font-weight:500; color:var(--cream); }
.squad-pos { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; color:var(--muted); }
.squad-empty-name { font-size:12px; color:rgba(240,253,244,0.62); font-style:italic; }
.squad-slot-actions { display:flex; gap:4px; position:absolute; top:6px; right:6px; }
/* 36px rather than the usual 44px: this sits in the corner of a ~150x84 squad
   card, and a full 44px target would cover half the card and steal taps meant
   for editing the player. Still more than double the old 17px. */
.squad-slot-del { background:none; border:none; color:rgba(255,80,80,0.3); font-size:13px; cursor:pointer; min-width:36px; min-height:36px; display:inline-flex; align-items:center; justify-content:center; padding:0; border-radius:6px; flex-shrink:0; }
.squad-slot-del:hover { color:#ff6060; }

/* Player edit modal */
.player-edit-sheet { background:var(--panel2); border:1px solid var(--border); border-bottom:none; border-radius:20px 20px 0 0; padding:16px 16px calc(24px + var(--safe-bottom)); width:100%; max-width:640px; transform:translateY(100%); transition:transform 0.28s cubic-bezier(0.22,1,0.36,1); max-height:88vh; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.player-edit-scroll { }
.player-edit-footer { }
.modal-overlay.open .player-edit-sheet { transform:translateY(0); }

.edit-field { display:flex; flex-direction:column; gap:6px; margin-bottom:14px; }
.edit-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--red); }
.pos-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:6px; }
.pos-btn { padding:9px 6px; border-radius:6px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; cursor:pointer; transition:all 0.15s; text-align:center; line-height:1.3; }
.pos-btn.selected, .pos-btn:hover { background:var(--btn-green); border-color:var(--red); color:#fff; }
.btn-save-player { width:100%; padding:14px; background:linear-gradient(135deg,var(--red-dark),var(--red)); border:none; border-radius:10px; color:#fff; font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; margin-top:12px; }
.btn-save-player:hover { filter:brightness(1.1); }
.btn-clear-player { display:block; width:100%; margin-top:22px; padding:14px 11px 4px; background:none; border:none; border-top:1px solid rgba(255,255,255,0.08); border-radius:0; color:#f87171; font-family:'Inter',sans-serif; font-size:14px; font-weight:500; cursor:pointer; }

/* ── HELP SHEET ─────────────────────────────────── */
.help-sheet { background:var(--panel2); border:1px solid var(--border); border-bottom:none; border-radius:20px 20px 0 0; padding:16px 16px calc(24px + var(--safe-bottom)); width:100%; max-width:640px; transform:translateY(100%); transition:transform 0.28s cubic-bezier(0.22,1,0.36,1); max-height:92vh; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.modal-overlay.open .help-sheet { transform:translateY(0); }
.help-download-card { display:flex; align-items:center; gap:12px; background:linear-gradient(135deg,rgba(20,83,45,0.25),rgba(22,163,74,0.1)); border:1px solid rgba(22,163,74,0.3); border-radius:14px; padding:14px; margin-bottom:16px; }
.help-download-icon { font-size:28px; flex-shrink:0; }
.help-download-text { flex:1; min-width:0; }
.help-download-title { font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; color:var(--cream); letter-spacing:1px; text-transform:uppercase; }
.help-download-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.help-download-btn { background:var(--btn-green); border:none; border-radius:8px; padding:9px 14px; color:#fff; font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; text-decoration:none; white-space:nowrap; flex-shrink:0; display:inline-block; }
.help-section { margin-bottom:16px; border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.help-section-title { font-family:'Oswald',sans-serif; font-size:12px; font-weight:600; letter-spacing:1px; color:var(--red-light); text-transform:uppercase; padding:10px 14px; background:rgba(22,163,74,0.06); border-bottom:1px solid var(--border); }
.help-row { display:flex; gap:10px; padding:9px 14px; border-bottom:1px solid rgba(255,255,255,0.03); align-items:flex-start; }
.help-row:last-child { border-bottom:none; }
.help-key { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.5px; color:var(--cream); white-space:nowrap; flex-shrink:0; width:110px; padding-top:1px; }
.help-val { font-size:12px; color:var(--muted); line-height:1.5; }

/* Player stats view */
.player-stat-card { background:var(--panel); border:1px solid var(--border); border-radius:14px; margin-bottom:12px; overflow:hidden; }
.psc-header { background:rgba(0,0,0,0.3); padding:12px 14px; display:flex; align-items:center; gap:12px; }
.psc-num { font-family:'Oswald',sans-serif; font-size:28px; font-weight:700; color:var(--gold); min-width:36px; }
.psc-info { flex:1; }
.psc-name { font-family:'Oswald',sans-serif; font-size:16px; font-weight:600; color:var(--cream); text-transform:uppercase; letter-spacing:1px; }
.psc-pos { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; color:var(--muted); }
.psc-body { padding:12px 14px; }
.psc-stat-row { display:grid; grid-template-columns:1fr 1fr 1fr; gap:8px; margin-bottom:8px; }
.psc-stat { text-align:center; background:rgba(255,255,255,0.03); border-radius:8px; padding:8px 6px; }
.psc-stat-val { font-family:'Oswald',sans-serif; font-size:22px; font-weight:700; color:var(--cream); line-height:1; }
.psc-stat-val.goals { color:var(--gold); }
.psc-stat-val.points { color:var(--red-light); }
.psc-stat-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); margin-top:3px; }
.psc-matches { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); text-align:right; padding-top:6px; border-top:1px solid rgba(255,255,255,0.05); }
.psc-season { margin-top:8px; padding-top:8px; border-top:1px solid rgba(255,255,255,0.07); }
.psc-season-title { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; margin-bottom:5px; }
.psc-season-row { display:flex; flex-wrap:wrap; gap:12px; font-family:'Inter',sans-serif; font-size:12px; color:var(--muted); }
.psc-season-row b { color:var(--cream); font-family:'Oswald',sans-serif; font-size:13px; }
.psc-cons { float:right; font-family:'Inter',sans-serif; font-size:12px; font-weight:600; padding:2px 7px; border-radius:8px; letter-spacing:0; text-transform:none; }
.psc-cons.good { background:rgba(22,163,74,0.2); color:#86efac; }
.psc-cons.mid { background:rgba(234,179,8,0.18); color:#fde68a; }
.psc-cons.bad { background:rgba(220,38,38,0.18); color:#fca5a5; }
.psc-spread { font-size:12px; color:var(--muted); margin-top:5px; font-family:'Inter',sans-serif; }

/* Squad player attribution in outcome modal */
.player-attr-section { margin-top:14px; padding-top:14px; border-top:1px solid var(--border); }
.tag-confirm-label { text-align:center; padding:8px 12px; background:rgba(220,38,38,0.15); border:1px solid var(--red); border-radius:8px; color:#fff; font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; }
/* ── RECORD TAB: PITCH-FIRST FLOW ── */
.record-side-tabs { display:flex; gap:8px; margin-bottom:14px; }
.record-side-tab { flex:1; padding:11px; border-radius:10px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; }
.record-side-tab.active { background:linear-gradient(135deg,var(--red-dark),var(--red)); color:#fff; border-color:var(--red); }
.record-pitch-wrap { background:repeating-linear-gradient(180deg,#123a23 0 34px,#0f331e 34px 68px); border:1.5px solid rgba(255,255,255,0.16); border-radius:14px; padding:20px 8px 16px; position:relative; margin-bottom:16px; }
.record-pitch-wrap::before { content:''; position:absolute; top:50%; left:6%; right:6%; height:1px; background:rgba(255,255,255,0.15); }
.record-pitch-row { display:flex; justify-content:center; gap:10px; margin-bottom:18px; flex-wrap:wrap; position:relative; z-index:1; }
.record-pitch-row:last-child { margin-bottom:0; }
.record-pitch-player { display:flex; flex-direction:column; align-items:center; gap:4px; background:none; border:none; padding:3px; cursor:pointer; min-width:66px; }
.rpp-circle { width:56px; height:56px; border-radius:50%; background:rgba(255,255,255,0.18); border:3px solid rgba(255,255,255,0.55); display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:20px; font-weight:700; color:#fff; transition:all 0.15s; }
.record-pitch-player:active .rpp-circle { transform:scale(0.9); background:var(--btn-green); border-color:#fff; }
.rpp-name { font-size:12px; color:rgba(255,255,255,0.9); letter-spacing:0.2px; max-width:66px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.record-pitch-empty { text-align:center; color:rgba(255,255,255,0.55); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.5px; padding:16px 10px; }
.et-picker-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.et-picker-btn { display:flex; flex-direction:column; align-items:center; gap:6px; padding:14px 6px; border-radius:10px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; transition:all 0.15s; }
.et-picker-btn:active { background:var(--btn-green); border-color:var(--red); color:#fff; }
.et-icon { font-size:20px; }
.stats-half-filter { display:flex; gap:6px; margin-bottom:10px; }
/* ── RECORD TAB: SPLIT EVENT BOXES ── */
.rec-legend { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:10px; }
.rec-legend-item { display:flex; align-items:center; gap:5px; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); }
.rl-swatch { width:12px; height:12px; border-radius:3px; }
.rl-swatch.home { background:rgba(22,163,74,0.55); border:1px solid rgba(22,163,74,0.8); }
.rl-swatch.away { background:rgba(226,232,240,0.35); border:1px solid rgba(226,232,240,0.6); }
/* One row per event, full width: the two halves are the only two record
   buttons for that event — one per team. */
.rec-event-grid { display:flex; flex-direction:column; gap:9px; margin-bottom:12px; }
.rec-ev-box { border:1px solid var(--border); border-radius:11px; overflow:hidden; background:rgba(255,255,255,0.03); }
.rev-label { padding:7px 8px 5px; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; color:var(--cream); text-align:center; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rev-icon { margin-right:4px; }
.rev-halves { display:flex; border-top:1px solid rgba(255,255,255,0.07); }
.rev-half { flex:1; border:none; padding:17px 4px; cursor:pointer; font-family:'Oswald',sans-serif; font-size:19px; font-weight:700; transition:filter 0.1s; }
.rev-half.home { background:rgba(22,163,74,0.16); color:#86efac; border-right:1px solid rgba(255,255,255,0.09); }
.rev-half.away { background:rgba(226,232,240,0.09); color:#e2e8f0; }
.rev-half:active { filter:brightness(1.9); }
.rev-tally { pointer-events:none; }
.rec-grid-empty { grid-column:1/-1; text-align:center; padding:22px; color:var(--muted); font-size:12px; font-style:italic; }
/* ── PLAYER PICKER ── */
.pp-pitch { background:repeating-linear-gradient(180deg,#123a23 0 34px,#0f331e 34px 68px); border:1.5px solid rgba(255,255,255,0.16); border-radius:12px; padding:14px 6px; position:relative; }
.pp-pitch::before { content:''; position:absolute; top:50%; left:6%; right:6%; height:1px; background:rgba(255,255,255,0.13); }
.pp-row { display:flex; justify-content:center; gap:7px; margin-bottom:11px; position:relative; z-index:1; }
.pp-row:last-child { margin-bottom:0; }
.pp-player { display:flex; flex-direction:column; align-items:center; gap:3px; background:none; border:none; padding:2px; cursor:pointer; min-width:60px; }
.pp-circle { width:48px; height:48px; border-radius:50%; background:rgba(255,255,255,0.18); border:2px solid rgba(255,255,255,0.55); display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:18px; font-weight:700; color:#fff; }
.pp-player:active .pp-circle { transform:scale(0.9); background:var(--btn-green); border-color:#fff; }
.pp-player.on-yellow .pp-circle { box-shadow:0 0 0 3px rgba(250,204,21,0.9); }
.pp-player.on-black .pp-circle { box-shadow:0 0 0 3px rgba(20,20,20,0.95); }
.pp-player.on-red .pp-circle { box-shadow:0 0 0 3px rgba(220,38,38,0.95); }
.pp-name { font-size:12px; color:rgba(255,255,255,0.9); max-width:60px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.pp-player.empty { opacity:0.35; }
.pp-player.small .pp-circle { width:38px; height:38px; font-size:14px; }
.pp-bench-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; text-align:center; margin:12px 0 6px; }
.pp-bench { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; }
.pp-opp-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:7px; }
.pp-opp { padding:13px 3px; border-radius:9px; border:1px solid var(--border); background:rgba(226,232,240,0.08); color:#e2e8f0; font-family:'Oswald',sans-serif; font-size:17px; font-weight:700; cursor:pointer; }
.pp-opp:active { background:var(--btn-green); border-color:var(--red); color:#fff; }
.pp-opp.on-yellow { box-shadow:inset 0 0 0 2px rgba(250,204,21,0.9); }
.pp-opp.on-red { box-shadow:inset 0 0 0 2px rgba(220,38,38,0.95); }
.kw-skip { width:100%; margin-top:12px; padding:12px; border-radius:8px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; cursor:pointer; }
.pp-opp-name { display:block; font-family:'Inter',sans-serif; font-size:12px; font-weight:400; color:var(--muted); margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
/* ── CLUB REPORT: TOP PLAYERS ── */
.ctp-squad { background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:12px; padding:14px; margin-bottom:14px; }
.ctp-squad-head { font-family:'Oswald',sans-serif; font-size:14px; font-weight:600; color:var(--cream); letter-spacing:0.5px; margin-bottom:10px; display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.crsf-row { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:16px; }
.crsf-pill { padding:7px 14px; background:rgba(255,255,255,0.04); border:1px solid var(--border); border-radius:20px; color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; text-transform:uppercase; cursor:pointer; }
.crsf-pill.active { background:var(--gold); border-color:var(--gold); color:#0d2015; font-weight:600; }
.ctp-squad-sub { font-size:13px; color:var(--muted); letter-spacing:0.2px; white-space:nowrap; }
.ctp-cat { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; color:#86efac; margin:12px 0 5px; }
.ctp-row { display:flex; align-items:center; gap:9px; padding:6px 0; border-bottom:1px solid rgba(255,255,255,0.04); }
.ctp-row:last-child { border-bottom:none; }
.ctp-rank { width:18px; height:18px; border-radius:50%; background:rgba(255,255,255,0.08); display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:12px; color:var(--muted); flex-shrink:0; }
.ctp-name { flex:1; font-size:13px; color:var(--cream); min-width:0; }
.ctp-sub { display:block; font-size:12px; color:var(--muted); margin-top:1px; }
.ctp-val { font-family:'Oswald',sans-serif; font-size:15px; font-weight:700; color:#86efac; flex-shrink:0; }
.ctp-empty { text-align:center; padding:22px 12px; color:var(--muted); font-size:12px; font-style:italic; line-height:1.5; }
.ctp-note { font-size:12px; color:var(--muted); font-style:italic; margin-top:9px; line-height:1.4; }
.opp-tier { display:inline-block; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; text-transform:uppercase; padding:4px 10px; border-radius:10px; }
.opp-tier.strong { background:rgba(220,38,38,0.18); color:#fca5a5; }
.opp-tier.mid { background:rgba(234,179,8,0.16); color:#fde68a; }
.opp-tier.weaker { background:rgba(22,163,74,0.18); color:#86efac; }
.opp-tier-sub { font-size:12px; color:var(--muted); margin-top:5px; }
/* ── LIVE SHARE ── */
.live-start-btn { width:100%; padding:13px; border-radius:10px; border:1px solid rgba(22,163,74,0.45); background:rgba(22,163,74,0.14); color:#86efac; font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; }
.live-start-btn:active { background:rgba(22,163,74,0.3); }
.live-hint { font-size:12px; color:var(--muted); text-align:center; margin-top:6px; line-height:1.4; }
.live-active { border:1px solid rgba(22,163,74,0.45); border-radius:12px; padding:14px; text-align:center; background:rgba(22,163,74,0.08); }
.live-on-row { display:flex; align-items:center; justify-content:center; gap:6px; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:#86efac; }
.live-dot { width:8px; height:8px; border-radius:50%; background:#22c55e; animation:livePulse 1.6s infinite; }
@keyframes livePulse { 0%,100% { opacity:1; } 50% { opacity:0.25; } }
.live-code { font-family:'Oswald',sans-serif; font-size:34px; font-weight:700; letter-spacing:6px; color:var(--cream); margin:6px 0 2px; }
.live-btn-row { display:flex; gap:8px; margin-top:10px; }
.live-copy-btn, .live-stop-btn { flex:1; padding:10px; border-radius:8px; font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; }
.live-copy-btn { border:1px solid rgba(22,163,74,0.5); background:rgba(22,163,74,0.16); color:#86efac; }
.live-stop-btn { border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--muted); }
/* ── LIVE VIEWER ── */
#live-view-screen { padding:16px 14px calc(24px + var(--safe-bottom)); max-width:520px; margin:0 auto; }
.lv-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.lv-brand { font-family:'Oswald',sans-serif; font-size:14px; font-weight:700; letter-spacing:1.5px; color:#22c55e; }
.lv-live { display:flex; align-items:center; gap:6px; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:#86efac; }
.lv-score { display:flex; align-items:center; justify-content:space-between; gap:8px; background:var(--panel); border:1px solid var(--border); border-radius:14px; padding:18px 12px; }
.lv-team { flex:1; text-align:center; min-width:0; }
.lv-name { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lv-val { font-family:'Oswald',sans-serif; font-size:30px; font-weight:700; color:var(--cream); margin-top:4px; }
.lv-mid { text-align:center; flex-shrink:0; padding:0 6px; }
.lv-min { font-family:'Oswald',sans-serif; font-size:19px; font-weight:700; color:#86efac; }
.lv-phase { font-size:13px; color:var(--muted); letter-spacing:0.2px; margin-top:2px; }
.lv-margin { text-align:center; font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); margin:10px 0 14px; }
.lv-stats { background:var(--panel); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.lv-stat { display:flex; align-items:center; padding:11px 12px; border-bottom:1px solid rgba(255,255,255,0.05); }
.lv-stat:last-child { border-bottom:none; }
.lv-h, .lv-a { font-family:'Oswald',sans-serif; font-size:15px; font-weight:700; color:var(--cream); width:70px; }
.lv-a { text-align:right; }
.lv-label { flex:1; text-align:center; font-size:12px; color:var(--muted); letter-spacing:0.2px; }
.lv-sec { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; margin:18px 0 8px; }
.lv-scorers, .lv-events { background:var(--panel); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.lv-scorer { display:flex; justify-content:space-between; padding:10px 12px; border-bottom:1px solid rgba(255,255,255,0.05); font-size:13px; color:var(--cream); }
.lv-scorer:last-child { border-bottom:none; }
.lv-scorer b { font-family:'Oswald',sans-serif; color:#86efac; }
.lv-ev { display:flex; align-items:center; gap:10px; padding:9px 12px; border-bottom:1px solid rgba(255,255,255,0.05); font-size:12px; color:var(--cream); }
.lv-ev:last-child { border-bottom:none; }
.lv-ev-min { font-family:'Oswald',sans-serif; color:var(--muted); width:32px; flex-shrink:0; }
.lv-ev-tm { margin-left:auto; font-size:12px; color:var(--muted); }
.lv-freshness { text-align:center; font-size:12px; color:var(--muted); margin-top:14px; }
.lv-freshness.stale { color:#fca5a5; }
.lv-foot { text-align:center; font-size:12px; color:var(--muted); margin-top:6px; font-style:italic; }
.lv-empty { text-align:center; padding:40px 16px; color:var(--muted); font-size:13px; line-height:1.6; }
.et-manage-btn { width:100%; margin-top:10px; padding:10px; border-radius:8px; border:1px solid var(--border); background:rgba(255,255,255,0.03); color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; }
.rec-squad-chip { display:inline-block; margin-left:8px; padding:3px 9px; border-radius:10px; background:rgba(22,163,74,0.18); border:1px solid rgba(22,163,74,0.4); color:#86efac; font-family:'Inter',sans-serif; font-size:12px; font-weight:600; letter-spacing:0.3px; text-transform:none; vertical-align:middle; }
.poss-method-note { font-family:'Inter',sans-serif; font-size:12px; color:var(--muted); margin:-6px 0 8px; line-height:1.4; }
/* ── STARTING TEAM SELECTOR ── */
.ts-actions { display:flex; gap:8px; margin-bottom:12px; }
.ts-action-btn { flex:1; padding:9px; border-radius:8px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; }
.ts-action-btn:active { background:rgba(255,255,255,0.1); color:var(--cream); }
.ts-pitch { background:repeating-linear-gradient(180deg,#123a23 0 34px,#0f331e 34px 68px); border:1.5px solid rgba(255,255,255,0.16); border-radius:12px; padding:14px 6px; position:relative; }
.ts-pitch::before { content:''; position:absolute; top:50%; left:6%; right:6%; height:1px; background:rgba(255,255,255,0.13); }
.ts-row { display:flex; justify-content:center; gap:6px; margin-bottom:10px; position:relative; z-index:1; }
.ts-row:last-child { margin-bottom:0; }
.ts-slot { display:flex; flex-direction:column; align-items:center; gap:1px; min-width:62px; padding:6px 3px; border-radius:8px; border:1px dashed rgba(255,255,255,0.35); background:rgba(255,255,255,0.06); cursor:pointer; }
.ts-slot.filled { border-style:solid; border-color:rgba(255,255,255,0.5); background:rgba(255,255,255,0.14); }
.ts-slot-pos { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; color:rgba(255,255,255,0.65); }
.ts-slot-num { font-family:'Oswald',sans-serif; font-size:16px; font-weight:700; color:#fff; line-height:1.1; }
.ts-slot-squadno { font-size:12px; color:rgba(255,255,255,0.5); letter-spacing:0.3px; }
.ts-slot-name { font-size:12px; color:rgba(255,255,255,0.85); max-width:60px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ts-slot:not(.filled) .ts-slot-name { color:rgba(255,255,255,0.4); font-style:italic; }
.ts-confirm-btn { width:100%; margin-top:14px; padding:13px; border-radius:10px; border:none; background:linear-gradient(135deg,var(--red-dark),var(--red)); color:#fff; font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; }
.ts-player-list { max-height:60vh; overflow-y:auto; }
.ts-player-row { display:flex; align-items:center; gap:10px; width:100%; padding:11px 8px; border:none; border-bottom:1px solid rgba(255,255,255,0.06); background:none; cursor:pointer; text-align:left; }
.ts-player-row.selected { background:rgba(22,163,74,0.12); }
.ts-player-row.clear { color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; justify-content:center; }
.ts-pr-num { width:26px; height:26px; border-radius:50%; background:rgba(255,255,255,0.08); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:12px; font-weight:700; color:var(--cream); flex-shrink:0; }
.ts-bench-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; margin:14px 0 6px; }
.ts-bench-row { display:flex; align-items:center; gap:10px; width:100%; padding:11px 8px; border:1px solid var(--border); border-radius:8px; background:rgba(255,255,255,0.03); margin-bottom:6px; }
.ts-bench-num { width:28px; height:28px; border-radius:6px; background:var(--gold); color:#0d2015; display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:12px; font-weight:700; flex-shrink:0; }
.ts-bench-name { flex:1; font-family:'Inter',sans-serif; font-size:13px; color:var(--cream); }
.ts-bench-remove { background:none; border:none; color:var(--muted); font-size:16px; cursor:pointer; padding:4px 8px; }
.ts-pr-name { flex:1; font-family:'Inter',sans-serif; font-size:14px; color:var(--cream); }
.ts-pr-pos { display:block; font-size:12px; color:var(--muted); margin-top:1px; }
.ts-pr-tag { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; padding:3px 7px; border-radius:6px; flex-shrink:0; }
.ts-pr-tag.here { background:var(--btn-green); color:#fff; }
.ts-pr-tag.used { background:rgba(255,255,255,0.08); color:var(--muted); }
.rpp-circle.empty { background:rgba(255,255,255,0.06); border-style:dashed; font-size:12px; color:rgba(255,255,255,0.5); }
/* Discipline warnings on the pitch — a player already on a card is the one you
   most need to see before recording whatever he just did. */
.rpp-circle { position:relative; }
.rpp-circle.on-yellow { box-shadow:0 0 0 3px rgba(250,204,21,0.9); }
.rpp-circle.on-black  { box-shadow:0 0 0 3px rgba(20,20,20,0.95); }
.rpp-circle.on-red    { box-shadow:0 0 0 3px rgba(220,38,38,0.95); }
.rpp-card-flag { position:absolute; bottom:-3px; right:-5px; font-size:12px; line-height:1; }
.record-pitch-player.sent-off { opacity:0.45; }
.et-card-warning { margin-top:8px; padding:9px 12px; border-radius:8px; background:rgba(250,204,21,0.14); border:1px solid rgba(250,204,21,0.5); color:#fde68a; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.5px; }
.et-card-warning.red { background:rgba(220,38,38,0.16); border-color:rgba(220,38,38,0.6); color:#fca5a5; }
/* Substitution prompts — deliberately worded as a suggestion, not a verdict. */
#sub-signal:not(:empty) { margin-bottom:12px; padding:10px 12px; border-radius:10px; background:rgba(234,179,8,0.08); border:1px solid rgba(234,179,8,0.28); }
.sub-signal-title { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; text-transform:uppercase; color:#fde68a; margin-bottom:8px; }
.sub-signal-row { display:flex; align-items:flex-start; gap:9px; padding:5px 0; }
.ssr-num { width:22px; height:22px; border-radius:50%; background:rgba(255,255,255,0.1); display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:12px; font-weight:700; color:var(--cream); flex-shrink:0; }
.ssr-body { font-family:'Inter',sans-serif; font-size:12px; color:var(--cream); line-height:1.35; }
.ssr-why { display:block; font-size:12px; color:var(--muted); margin-top:1px; }
.sub-signal-note { font-size:12px; color:var(--muted); font-style:italic; margin-top:7px; }
.record-pitch-player.empty .rpp-name { color:rgba(255,255,255,0.45); font-style:italic; }
.opp-player-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.05); }
.opp-player-num { width:30px; height:30px; border-radius:50%; background:rgba(255,255,255,0.08); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:13px; font-weight:700; color:var(--cream); flex-shrink:0; }
.opp-player-num.danger { background:rgba(220,38,38,0.22); border-color:var(--red); color:#ff9d9d; }
.opp-player-main { flex:1; min-width:0; }
.opp-player-name-input { width:100%; padding:4px 6px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); border-radius:6px; color:var(--cream); font-family:'Inter',sans-serif; font-size:13px; outline:none; box-sizing:border-box; }
.opp-player-name-input:focus { border-color:var(--red); }
.opp-player-meta { font-size:12px; color:var(--muted); margin-top:3px; font-family:'Inter',sans-serif; }
.opp-player-flag { font-size:14px; flex-shrink:0; }
.et-mgr-row { display:flex; align-items:center; gap:12px; padding:12px 10px; border-bottom:1px solid rgba(255,255,255,0.06); cursor:pointer; }
.et-mgr-icon { font-size:18px; width:24px; text-align:center; }
.et-mgr-label { flex:1; font-family:'Oswald',sans-serif; font-size:13px; color:var(--cream); letter-spacing:0.5px; }
.et-mgr-count { display:block; font-size:12px; color:var(--muted); font-family:'Inter',sans-serif; letter-spacing:0; margin-top:2px; }
.et-mgr-check { width:24px; height:24px; border-radius:6px; border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-size:13px; color:#fff; flex-shrink:0; }
.et-mgr-check.on { background:var(--btn-green); border-color:var(--red); }
.sh-filter-btn { flex:1; padding:8px; border-radius:8px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; }
.sh-filter-btn.active { background:linear-gradient(135deg,var(--red-dark),var(--red)); color:#fff; border-color:var(--red); }
/* Positioned just BELOW the topbar, not at the bottom of the screen.
   Anchored to the bottom it covered the event boxes and the nav bar \u2014 exactly
   the controls being tapped repeatedly during a match. Padding the scroll area
   did not help, because the toast is fixed to the viewport rather than to the
   end of the content.
   It also must not sit at the very top: the topbar carries the live score, and
   the user badge is pinned top-right above it. 56px clears both. */
#undo-toast { position:fixed; left:50%; transform:translateX(-50%) translateY(-220%); top:calc(env(safe-area-inset-top, 0px) + 56px); z-index:6000; display:flex; align-items:center; gap:12px; padding:9px 12px 9px 16px; background:rgba(20,22,20,0.97); border:1px solid var(--border); border-radius:12px; box-shadow:0 6px 20px rgba(0,0,0,0.5); transition:transform 0.25s cubic-bezier(0.22,1,0.36,1); max-width:94vw; }
#undo-toast.show { transform:translateX(-50%) translateY(0); }
#undo-toast span { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.2px; color:var(--cream); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:60vw; }
#undo-toast button { padding:6px 14px; border-radius:8px; border:1px solid var(--red); background:rgba(22,163,74,0.15); color:var(--red-light); font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; flex-shrink:0; }
#undo-toast button:active { background:var(--btn-green); color:#fff; }
.record-stats-btn { display:block; width:100%; padding:12px; margin-bottom:16px; border-radius:10px; border:1px solid var(--border); background:rgba(255,255,255,0.06); color:var(--cream); font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; }
.record-stats-btn:active { background:var(--btn-green); border-color:var(--red); color:#fff; }
.rec-min-display { font-family:'Oswald',sans-serif; font-size:12px; color:var(--muted); letter-spacing:0.5px; }
.rec-min-display b { color:var(--cream); font-size:14px; }
/* Distinguish the two sides the same way the rest of the app does:
   green for My Team, silver for the Opposition. */
.loc-pitch-wrap { border-radius:10px; overflow:hidden; }
#location-pitch-svg { width:100%; height:auto; display:block; cursor:crosshair; touch-action:manipulation; }

.team-select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(22,163,74,0.35);
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--cream);
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.team-select:focus { outline: none; border-color: var(--red); }
.team-select option { background: #0d2015; color: var(--cream); font-weight: normal; }
.team-select optgroup { background:#080f0b; color:#16a34a; }

/* ── TEAM SHEET ── */
.teamsheet-actions { display:flex; gap:10px; margin-bottom:14px; }
.btn-print-sheet, .btn-share-sheet { flex:1; padding:12px; border-radius:10px; border:none; cursor:pointer; font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; }
.btn-print-sheet { background:linear-gradient(135deg,var(--red-dark),var(--red)); color:#fff; }
.btn-share-sheet { background:rgba(255,255,255,0.06); border:1px solid var(--border); color:var(--cream); }
.teamsheet-wrap { background:#0f2a1a; border:1.5px solid rgba(255,255,255,0.12); border-radius:14px; overflow:hidden; padding:12px; position:relative; }
.ts-header { text-align:center; margin-bottom:10px; padding-bottom:10px; border-bottom:1px solid rgba(255,255,255,0.15); }
.ts-team-name { font-family:'Oswald',sans-serif; font-size:clamp(16px,5vw,24px); font-weight:700; color:#fff; text-transform:uppercase; letter-spacing:1px; }
.ts-match-info { font-size:12px; color:rgba(255,255,255,0.6); margin-top:3px; font-style:italic; }
.ts-pitch { background:repeating-linear-gradient(180deg,#123a23 0 34px,#0f331e 34px 68px); border:1.5px solid rgba(255,255,255,0.16); border-radius:8px; position:relative; padding:8px 4px; margin-bottom:10px; }
.ts-pitch::before { content:''; position:absolute; top:50%; left:10%; right:10%; height:1px; background:rgba(255,255,255,0.2); }
.ts-pitch::after { content:''; position:absolute; top:50%; left:50%; width:60px; height:60px; border:1px solid rgba(255,255,255,0.2); border-radius:50%; transform:translate(-50%,-50%); }
.ts-row { display:flex; justify-content:center; gap:6px; margin-bottom:8px; position:relative; z-index:1; }
.ts-player { display:flex; flex-direction:column; align-items:center; min-width:52px; max-width:70px; }
.ts-player-circle { width:40px; height:40px; border-radius:50%; background:rgba(255,255,255,0.15); border:2px solid rgba(255,255,255,0.5); display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:14px; font-weight:700; color:#fff; margin-bottom:3px; flex-shrink:0; }
.ts-player-circle.filled { background:rgba(255,255,255,0.25); border-color:#fff; }
.ts-player-name { font-family:'Oswald',sans-serif; font-size:12px; color:rgba(255,255,255,0.9); text-align:center; letter-spacing:0.2px; line-height:1.2; max-width:60px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ts-player-pos { font-size:12px; color:rgba(255,255,255,0.5); text-align:center; }
.ts-subs-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:rgba(255,255,255,0.5); text-transform:uppercase; text-align:center; margin:6px 0 8px; padding-top:8px; border-top:1px solid rgba(255,255,255,0.15); }
.ts-subs-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; padding:0 4px; }
.ts-sub-item { display:flex; flex-direction:column; align-items:center; gap:3px; }
.ts-sub-circle { width:32px; height:32px; border-radius:50%; background:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.3); display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:12px; font-weight:700; color:rgba(255,255,255,0.8); }
.ts-sub-circle.filled { background:rgba(255,255,255,0.2); border-color:rgba(255,255,255,0.6); color:#fff; }
.ts-sub-name { font-family:'Oswald',sans-serif; font-size:12px; color:rgba(255,255,255,0.7); text-align:center; max-width:48px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:1.2; }
@media print { body > *:not(#print-frame) { display:none !important; } #print-frame { display:block !important; position:fixed; inset:0; z-index:99999; } @page { margin:10mm; size:A4 portrait; } }

/* ── VIDEO ANALYSIS ──────────────────────────────── */
#video-analysis-overlay {
  position: fixed; inset: 0; z-index: 8000;
  background: #0a0505;
  display: none; flex-direction: column;
  font-family: 'Inter', sans-serif;
}
#video-analysis-overlay.open { display: flex; }

/* Top bar */
.va-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: rgba(0,0,0,0.6);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.va-topbar-title { font-family: 'Oswald',sans-serif; font-size: 13px; letter-spacing: 1px; color: var(--cream); text-transform: uppercase; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.va-topbar-time { font-family: 'Oswald',sans-serif; font-size: 18px; font-weight: 700; color: var(--red-light); letter-spacing: 1px; flex-shrink: 0; min-width: 52px; text-align: right; }
.va-close-btn { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); color: rgba(245,232,232,0.7); font-size: 13px; cursor: pointer; padding: 6px 12px; border-radius: 6px; font-family: 'Oswald',sans-serif; letter-spacing: 1px; flex-shrink: 0; }
.va-back-btn { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12); color: rgba(245,232,232,0.8); font-size: 13px; cursor: pointer; padding: 6px 14px; border-radius: 6px; font-family: 'Oswald',sans-serif; letter-spacing: 1px; flex-shrink: 0; }

/* Timeline */
.va-timeline-bar { position: relative; height: 28px; cursor: pointer; padding: 0 4px; display: flex; align-items: center; }
.va-timeline-track { position: absolute; left: 4px; right: 4px; height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; }
.va-timeline-progress { position: absolute; left: 4px; height: 3px; background: var(--btn-green); border-radius: 2px; width: 0%; transition: width 0.5s linear; }
.va-timeline-dots { position: absolute; left: 4px; right: 4px; top: 0; bottom: 0; pointer-events: none; }
.va-timeline-dot { position: absolute; width: 8px; height: 8px; border-radius: 50%; transform: translate(-50%, -50%); top: 50%; cursor: pointer; pointer-events: all; transition: transform 0.1s; }
.va-timeline-dot:active { transform: translate(-50%,-50%) scale(1.4); }
.va-timeline-cursor { position: absolute; width: 12px; height: 12px; background: #fff; border-radius: 50%; transform: translate(-50%,-50%); top: 50%; left: 0%; pointer-events: none; box-shadow: 0 0 4px rgba(0,0,0,0.5); transition: left 0.5s linear; }

/* Stats summary */
.va-stats-summary { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0; }
.va-stat-chip { background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 20px; padding: 4px 10px; font-family: 'Oswald',sans-serif; font-size:12px; letter-spacing: 1px; color: var(--muted); white-space: nowrap; }
.va-stat-chip span { color: var(--cream); font-weight: 700; margin-right: 4px; }

/* Filter bar */
.va-tag-list-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.va-filter-row { display: flex; gap: 4px; }
.va-filter-btn { padding: 4px 10px; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-family: 'Oswald',sans-serif; font-size:12px; letter-spacing: 1px; cursor: pointer; }
.va-filter-btn.active { background: rgba(22,163,74,0.15); border-color: var(--red); color: var(--cream); }
.mc-video-badge { font-size:12px; margin-left: 4px; }

/* Competition picker */
.comp-picker-btn { display:flex; align-items:center; gap:8px; width:100%; padding:10px 14px; background:rgba(255,255,255,0.04); border:1px solid var(--border); border-radius:10px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; text-align:left; }
.comp-picker-sheet { background:var(--panel2); border:1px solid var(--border); border-bottom:none; border-radius:20px 20px 0 0; padding:16px 16px 0; width:100%; max-width:640px; transform:translateY(100%); transition:transform 0.28s cubic-bezier(0.22,1,0.36,1); max-height:88vh; display:flex; flex-direction:column; }
.modal-overlay.open .comp-picker-sheet { transform:translateY(0); }
.comp-search-input { width:100%; padding:11px 14px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.12); border-radius:10px; color:var(--cream); font-size:15px; font-family:'Inter',sans-serif; outline:none; box-sizing:border-box; margin:12px 0 8px; flex-shrink:0; }
.comp-list { flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; padding-bottom:24px; }
.comp-group-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--red-light); text-transform:uppercase; padding:10px 4px 4px; }
.comp-item { padding:11px 8px; border-radius:8px; cursor:pointer; font-size:13px; color:var(--cream); border-bottom:1px solid rgba(255,255,255,0.03); }
/* Your own competitions get a delete control, so the row becomes a flex pair */
.comp-item.custom { display:flex; align-items:center; gap:8px; padding-right:4px; }
.comp-item-name { flex:1; min-width:0; }
.comp-del { background:none; border:none; color:rgba(255,80,80,0.5); font-size:13px; cursor:pointer; min-width:36px; min-height:36px; display:inline-flex; align-items:center; justify-content:center; border-radius:6px; flex-shrink:0; }
.comp-del:hover { color:#ff6060; background:rgba(255,0,0,0.1); }
.comp-add { display:flex; align-items:center; gap:10px; padding:13px 8px; margin-top:6px; border-radius:8px; cursor:pointer; font-size:13px; color:#86efac; background:rgba(22,163,74,0.1); border:1px dashed rgba(22,163,74,0.45); }
.comp-add:active { background:rgba(22,163,74,0.2); }
.comp-add-plus { font-family:'Oswald',sans-serif; font-size:17px; line-height:1; }
.comp-item:active, .comp-item.selected { background:rgba(22,163,74,0.12); color:var(--cream); }

/* Nav SVG icons */
.nav-btn .nav-icon svg { width:22px; height:22px; display:block; }
.nav-btn.active .nav-icon svg { stroke: var(--red-light); }

/* Trigger button tap flash */
.trig-count { transition: transform 0.15s, color 0.15s; }
.trig-count.pulse { transform: scale(1.4); color: var(--red-light); }

/* Stats context label */
#stats-context-label { font-size:12px; color:var(--muted); font-weight:400; letter-spacing:1px; font-family:'Inter',sans-serif; text-transform:none; }
.va-export-btn { width: 100%; padding: 11px; background: rgba(255,255,255,0.05); border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font-family: 'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor: pointer; text-align: center; margin-top: 4px; }
.va-export-btn:active { background: rgba(255,255,255,0.1); color: var(--cream); }
.new-video-btn { width:100%; padding:13px; background:linear-gradient(135deg,rgba(20,83,45,0.2),rgba(22,163,74,0.1)); border:1px solid rgba(22,163,74,0.3); border-radius:12px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; margin-bottom:16px; }
.new-video-btn:active { background:rgba(22,163,74,0.2); }
.new-video-sheet { background:var(--panel2); border:1px solid var(--border); border-bottom:none; border-radius:20px 20px 0 0; padding:16px 16px calc(24px + var(--safe-bottom)); width:100%; max-width:640px; transform:translateY(100%); transition:transform 0.28s cubic-bezier(0.22,1,0.36,1); max-height:88vh; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.modal-overlay.open .new-video-sheet { transform:translateY(0); }
.nva-field { margin-bottom:12px; }
.nva-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); margin-bottom:6px; }
.nva-input { width:100%; padding:11px 14px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.12); border-radius:10px; color:var(--cream); font-size:15px; font-family:'Inter',sans-serif; outline:none; box-sizing:border-box; }
.nva-video-tabs { display:flex; gap:6px; margin-bottom:8px; }
.nva-video-tab { flex:1; padding:9px; border-radius:8px; border:1px solid rgba(255,255,255,0.12); background:rgba(255,255,255,0.04); color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; }
.nva-video-tab.active { background:linear-gradient(135deg,var(--red-dark),var(--red)); color:#fff; border-color:var(--red); }
.nva-note { font-size:12px; color:var(--muted); text-align:center; margin-top:12px; font-style:italic; }

/* ── SEASON SUMMARY ──────────────────────────────── */
.ss-stat-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:14px; }
.ss-stat-card { background:rgba(255,255,255,0.04); border:1px solid var(--border); border-radius:10px; padding:10px 8px; text-align:center; }
.ss-stat-val { font-family:'Oswald',sans-serif; font-size:20px; font-weight:700; color:var(--cream); }
.ss-stat-label { font-size:13px; color:var(--muted); letter-spacing:0.2px; font-family:'Oswald',sans-serif; margin-top:2px; }
.ss-results-table { width:100%; border-collapse:collapse; margin-bottom:14px; font-size:12px; }
.ss-results-table th { background:rgba(22,163,74,0.15); color:var(--red-light); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1.5px; padding:6px 8px; text-align:left; }
.ss-results-table td { padding:6px 8px; border-bottom:1px solid rgba(255,255,255,0.03); color:var(--cream); }
.ss-results-table tr:nth-child(even) td { background:rgba(255,255,255,0.02); }
.ss-result-w { color:var(--green); font-weight:700; }
.ss-result-l { color:var(--red-light); font-weight:700; }
.ss-result-d { color:#f5a623; font-weight:700; }
.ss-section-title { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--red-light); text-transform:uppercase; margin:14px 0 8px; }
.ss-top-performer { display:flex; align-items:center; gap:10px; padding:8px 10px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:8px; margin-bottom:6px; }
.ss-tp-rank { font-family:'Oswald',sans-serif; font-size:14px; color:var(--muted); width:20px; flex-shrink:0; }
.ss-tp-name { font-family:'Oswald',sans-serif; font-size:12px; color:var(--cream); flex:1; }
.ss-tp-val { font-family:'Oswald',sans-serif; font-size:14px; font-weight:700; color:var(--red-light); }
.ss-empty { text-align:center; padding:24px; color:var(--muted); font-size:13px; font-style:italic; }

/* ── SCOUT REPORT ────────────────────────────────── */
.scout-textarea { width:100%; padding:10px 12px; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.1); border-radius:8px; color:var(--cream); font-size:13px; font-family:'Inter',sans-serif; outline:none; resize:none; min-height:80px; box-sizing:border-box; line-height:1.5; }
.scout-player-row { display:flex; align-items:center; gap:8px; padding:6px 0; border-bottom:1px solid rgba(255,255,255,0.03); }
.scout-player-name { flex:1; padding:7px 10px; background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:7px; color:var(--cream); font-size:13px; font-family:'Inter',sans-serif; outline:none; }
.scout-player-pos { width:70px; padding:7px 8px; background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:7px; color:var(--cream); font-size:12px; font-family:'Inter',sans-serif; outline:none; }
.scout-player-notes { flex:2; padding:7px 10px; background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:7px; color:var(--muted); font-size:12px; font-family:'Inter',sans-serif; outline:none; }
.scout-player-del { background:none; border:none; color:rgba(255,80,80,0.4); font-size:15px; cursor:pointer; flex-shrink:0; }
.scout-badge { font-size:12px; padding:2px 7px; border-radius:10px; background:rgba(68,136,255,0.12); color:#6699ff; font-family:'Oswald',sans-serif; letter-spacing:1px; margin-left:6px; }

.tsc-share-btn { background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1); border-radius:6px; padding:4px 8px; color:var(--muted); font-size:13px; cursor:pointer; flex-shrink:0; }
.tsc-share-btn:active { background:rgba(22,163,74,0.1); color:var(--red-light); }
.trial-sync-btn { width:100%; padding:10px; background:rgba(68,136,255,0.08); border:1px solid rgba(68,136,255,0.2); border-radius:8px; color:#6699ff; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1.5px; cursor:pointer; margin-bottom:12px; }
.trial-sync-btn:active { background:rgba(68,136,255,0.15); }

/* ── SHARED-LINK SCREEN (trial grading uses the .pws styles) ──────────────────────── */
.pw-screen-inner { max-width:480px; margin:0 auto; padding:24px 20px 48px; }
.pws-header { text-align:center; padding:32px 0 24px; }
.pws-title { font-family:'Oswald',sans-serif; font-size:22px; font-weight:700; color:var(--cream); letter-spacing:1px; }
.pws-date { font-size:13px; color:var(--muted); margin-top:6px; }
.pws-section { margin-bottom:20px; }
.pws-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); margin-bottom:8px; }
.pws-select { width:100%; padding:14px 16px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.15); border-radius:12px; color:var(--cream); font-size:16px; font-family:'Inter',sans-serif; outline:none; -webkit-appearance:none; }
.pws-metric-section { background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:14px; padding:16px; margin-bottom:12px; }
.pws-metric-header { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.pws-metric-icon { font-size:22px; }
.pws-metric-name { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--cream); }
.pws-metric-score { margin-left:auto; font-family:'Oswald',sans-serif; font-size:18px; font-weight:700; color:var(--muted); min-width:24px; text-align:right; }
.pws-score-row { display:flex; gap:6px; }
.pws-score-btn { flex:1; height:44px; border-radius:10px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); color:var(--muted); font-family:'Oswald',sans-serif; font-size:14px; cursor:pointer; transition:all 0.12s; display:flex; align-items:center; justify-content:center; -webkit-tap-highlight-color:transparent; }
.pws-score-btn.sel-1, .pws-score-btn.sel-2 { background:#ef4444; border-color:#ef4444; color:#fff; transform:scale(1.05); }
.pws-score-btn.sel-3 { background:#f59e0b; border-color:#f59e0b; color:#fff; transform:scale(1.05); }
.pws-score-btn.sel-4, .pws-score-btn.sel-5 { background:#22c55e; border-color:#22c55e; color:#fff; transform:scale(1.05); }
.pws-score-labels { display:flex; justify-content:space-between; margin-top:4px; padding:0 2px; }
.pws-score-label { font-size:12px; color:rgba(240,253,244,0.62); font-family:'Inter',sans-serif; }
.pws-note-input { width:100%; padding:14px 16px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.12); border-radius:12px; color:var(--cream); font-size:16px; font-family:'Inter',sans-serif; outline:none; box-sizing:border-box; }
.pws-submit-btn { width:100%; padding:16px; background:linear-gradient(135deg,var(--red-dark),var(--red)); border:none; border-radius:14px; color:#fff; font-family:'Oswald',sans-serif; font-size:14px; font-weight:700; letter-spacing:0.2px; cursor:pointer; margin-top:8px; -webkit-tap-highlight-color:transparent; }
.pws-submit-btn:active { filter:brightness(1.1); }
.pws-submit-btn:disabled { opacity:0.5; cursor:not-allowed; }
.pws-scores-summary { display:flex; justify-content:center; gap:10px; flex-wrap:wrap; margin-top:24px; }
.pws-score-chip { padding:6px 14px; border-radius:20px; background:rgba(255,255,255,0.06); color:var(--cream); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; }

/* ── SUBSTITUTIONS ───────────────────────────────── */
.sub-event-row { display:flex; align-items:center; gap:8px; padding:8px 10px; background:rgba(255,255,255,0.03); border-radius:8px; margin-top:6px; }
.sub-minute { font-family:'Oswald',sans-serif; font-size:13px; font-weight:700; color:var(--red-light); width:32px; flex-shrink:0; }
.sub-detail { flex:1; font-size:12px; color:var(--cream); line-height:1.5; }
.sub-team-badge { font-size:12px; padding:2px 6px; border-radius:6px; font-family:'Oswald',sans-serif; letter-spacing:1px; flex-shrink:0; }
.sub-team-badge.home { background:rgba(22,163,74,0.12); color:#4ade80; }
.sub-team-badge.away { background:rgba(148,163,184,0.1); color:#cbd5e1; }
.sub-del-btn { background:none; border:none; color:rgba(255,80,80,0.35); font-size:14px; cursor:pointer; flex-shrink:0; }

/* ── MATCH NOTES ─────────────────────────────────── */
.match-notes-wrap { margin-bottom:14px; }
.match-notes-textarea { width:100%; min-height:120px; padding:12px 14px; background:rgba(255,255,255,0.04); border:1px solid var(--border); border-radius:10px; color:var(--cream); font-size:14px; font-family:'Inter',sans-serif; outline:none; resize:none; box-sizing:border-box; line-height:1.6; }
.match-notes-textarea::placeholder { color:var(--muted); }
.match-notes-saved { font-size:12px; color:var(--green); margin-top:4px; height:16px; transition:opacity 0.3s; }
.match-notes-badge { font-size:12px; padding:2px 7px; border-radius:8px; background:rgba(74,222,128,0.1); color:#4ade80; font-family:'Oswald',sans-serif; letter-spacing:1px; margin-left:6px; }

/* ── HIGHLIGHT CLIPS ─────────────────────────────── */
.va-section-tabs { display:flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; margin:10px 0 8px; }
.va-section-tab { flex:1; padding:8px 6px; background:transparent; border:none; color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; }
.va-section-tab.active { background:rgba(22,163,74,0.15); color:var(--cream); }
.va-clip-recorder { background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; padding:10px; margin-bottom:10px; }
.va-clip-recorder-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.va-clip-mark-btn { padding:8px 12px; background:rgba(22,163,74,0.1); border:1px solid rgba(22,163,74,0.25); border-radius:8px; color:#4ade80; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; flex-shrink:0; }
.va-clip-mark-btn:active { background:rgba(22,163,74,0.25); }
.va-clip-times { flex:1; display:flex; align-items:center; justify-content:center; gap:6px; }
.va-clip-time-display { font-family:'Oswald',sans-serif; font-size:14px; font-weight:700; color:var(--cream); background:rgba(255,255,255,0.05); padding:4px 8px; border-radius:6px; min-width:44px; text-align:center; }
.va-clip-save-btn { width:100%; padding:9px; background:linear-gradient(135deg,rgba(20,83,45,0.4),rgba(22,163,74,0.2)); border:1px solid rgba(22,163,74,0.3); border-radius:8px; color:#4ade80; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1.5px; cursor:pointer; }
.va-clip-item { display:flex; align-items:center; gap:8px; padding:8px 10px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:8px; cursor:pointer; }
.va-clip-item:active { background:rgba(22,163,74,0.08); }
.va-clip-times-small { font-family:'Oswald',sans-serif; font-size:12px; color:var(--red-light); flex-shrink:0; width:80px; }
.va-clip-label { flex:1; font-size:12px; color:var(--cream); }
.va-clip-cat { font-size:12px; padding:2px 6px; border-radius:6px; font-family:'Oswald',sans-serif; letter-spacing:1px; flex-shrink:0; }
.va-clip-cat.attack { background:rgba(22,163,74,0.12); color:#4ade80; }
.va-clip-cat.defence { background:rgba(59,130,246,0.12); color:#60a5fa; }
.va-clip-cat.individual { background:rgba(168,85,247,0.12); color:#c084fc; }
.va-clip-cat.setpiece { background:rgba(245,158,11,0.12); color:#fbbf24; }
.va-clip-del { background:none; border:none; color:rgba(255,80,80,0.35); font-size:13px; cursor:pointer; flex-shrink:0; }
.va-tag-item-create-clip { display:block; width:100%; text-align:right; font-size:12px; color:rgba(74,222,128,0.5); font-family:'Oswald',sans-serif; letter-spacing:1px; background:none; border:none; cursor:pointer; padding:2px 0 0; }
.va-tag-item-create-clip:active { color:#4ade80; }

/* ── INJURY LOG ──────────────────────────────────── */
.injury-row { padding:10px 12px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; margin-bottom:6px; }
.injury-type { font-family:'Oswald',sans-serif; font-size:12px; color:var(--cream); display:flex; align-items:center; justify-content:space-between; }
.injury-dates { font-size:12px; color:var(--muted); margin-top:3px; }
.injury-status { font-size:12px; padding:2px 7px; border-radius:8px; font-family:'Oswald',sans-serif; letter-spacing:1px; }
.injury-status.active { background:rgba(239,68,68,0.12); color:#f87171; }
.injury-status.recovered { background:rgba(34,197,94,0.12); color:var(--green); }
.injury-del { background:none; border:none; color:rgba(255,80,80,0.35); font-size:13px; cursor:pointer; }
.squad-injury-badge { position:absolute; top:-2px; left:-2px; width:10px; height:10px; border-radius:50%; background:#ef4444; border:1px solid var(--panel); }

/* ── FIXTURES ────────────────────────────────────── */
.fixture-card { padding:12px 14px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:12px; margin-bottom:8px; cursor:pointer; }
.fixture-card:active { background:rgba(22,163,74,0.06); }
.fixture-card.past { opacity:0.6; }
.fixture-date-row { display:flex; align-items:center; justify-content:space-between; margin-bottom:4px; }
.fixture-date { font-family:'Oswald',sans-serif; font-size:12px; color:var(--red-light); }
.fixture-time { font-size:12px; color:var(--muted); }
.fixture-opponent { font-family:'Oswald',sans-serif; font-size:14px; font-weight:700; color:var(--cream); }
.fixture-comp { font-size:12px; color:var(--muted); margin-top:2px; }
.fixture-meta-row { display:flex; align-items:center; gap:8px; margin-top:6px; }
.fixture-ha-badge { font-size:12px; padding:2px 7px; border-radius:8px; font-family:'Oswald',sans-serif; letter-spacing:1px; }
.fixture-ha-badge.home { background:rgba(22,163,74,0.12); color:#4ade80; }
.fixture-ha-badge.away { background:rgba(148,163,184,0.1); color:#cbd5e1; }
.fixture-ha-badge.neutral { background:rgba(245,158,11,0.1); color:#f59e0b; }
.fixture-linked { font-size:12px; color:var(--green); }
.fixture-section-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; margin:12px 0 6px 2px; }
.fixture-empty { text-align:center; padding:24px; color:var(--muted); font-size:13px; font-style:italic; }

/* ── OPPOSITION DATABASE ─────────────────────────── */
.opp-club-row { display:flex; align-items:center; gap:10px; padding:10px 12px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; margin-bottom:8px; cursor:pointer; }
.opp-club-row:active { background:rgba(22,163,74,0.06); }
.opp-club-name { font-family:'Oswald',sans-serif; font-size:13px; color:var(--cream); flex:1; }
.opp-record-badge { font-size:12px; color:var(--muted); font-family:'Oswald',sans-serif; }
.opp-record-w { color:var(--green); }
.opp-record-l { color:var(--red-light); }
.opp-match-row { padding:8px 10px; border-bottom:1px solid rgba(255,255,255,0.03); display:flex; align-items:center; gap:10px; cursor:pointer; }
.opp-match-row:last-child { border-bottom:none; }
.opp-match-date { font-size:12px; color:var(--muted); width:80px; flex-shrink:0; }
.opp-match-score { font-family:'Oswald',sans-serif; font-size:13px; color:var(--cream); flex:1; }
.opp-match-result { font-family:'Oswald',sans-serif; font-size:12px; font-weight:700; }
.opp-match-result.w { color:var(--green); }
.opp-match-result.l { color:var(--red-light); }
.opp-match-result.d { color:#f59e0b; }

/* ── SHOT MAP ─────────────────────────────────────── */
.shot-map-controls { display:flex; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.shot-map-toggle-group { display:flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.sm-toggle { padding:7px 14px; background:transparent; border:none; color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; }
.sm-toggle.active { background:rgba(22,163,74,0.15); color:var(--cream); }
.shot-map-wrap { background:rgba(255,255,255,0.02); border:1px solid var(--border); border-radius:12px; overflow:hidden; margin-bottom:10px; }
.shot-map-wrap svg { width:100%; height:auto; display:block; }
.shot-map-legend { display:flex; gap:12px; flex-wrap:wrap; padding:4px 0 8px; }
.sm-legend-item { display:flex; align-items:center; gap:5px; font-size:12px; color:var(--muted); font-family:'Inter',sans-serif; }
.sm-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.shot-map-tooltip { position:fixed; background:#0d2015; border:1px solid var(--border); border-radius:8px; padding:8px 12px; font-size:12px; color:var(--cream); font-family:'Inter',sans-serif; z-index:9000; pointer-events:none; max-width:200px; line-height:1.5; }

/* ── TRIAL SYSTEM ─────────────────────────────────── */
.trial-card { background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:12px; margin-bottom:10px; padding:14px; cursor:pointer; }
.trial-card:active { background:rgba(22,163,74,0.06); }
.trial-card-name { font-family:'Oswald',sans-serif; font-size:14px; font-weight:600; color:var(--cream); }
.trial-card-meta { font-size:12px; color:var(--muted); margin-top:4px; }
.trial-card-status { display:inline-block; font-size:12px; letter-spacing:1px; text-transform:uppercase; font-family:'Oswald',sans-serif; padding:2px 8px; border-radius:10px; margin-top:6px; }
.trial-card-status.active { background:rgba(34,197,94,0.12); color:var(--green); }
.trial-card-status.complete { background:rgba(255,255,255,0.06); color:var(--muted); }
.trial-empty { text-align:center; padding:32px 16px; color:var(--muted); font-size:13px; font-style:italic; }
.trial-detail-header { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.trial-back-btn { background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.12); color:rgba(245,232,232,0.7); font-size:12px; cursor:pointer; padding:6px 12px; border-radius:6px; font-family:'Oswald',sans-serif; letter-spacing:1px; flex-shrink:0; }
.trial-detail-title-wrap { flex:1; min-width:0; }
.trial-detail-name { font-family:'Oswald',sans-serif; font-size:14px; font-weight:600; color:var(--cream); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.trial-detail-meta { font-size:12px; color:var(--muted); margin-top:2px; }
.trial-menu-btn { background:rgba(255,255,255,0.07); border:1px solid rgba(255,255,255,0.12); color:var(--cream); font-size:18px; cursor:pointer; padding:4px 10px; border-radius:6px; flex-shrink:0; }
.trial-detail-tabs { display:flex; gap:0; border:1px solid var(--border); border-radius:8px; overflow:hidden; margin-bottom:12px; }
.trial-dtab { flex:1; padding:9px 6px; background:transparent; border:none; color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; }
.trial-dtab.active { background:rgba(22,163,74,0.15); color:var(--cream); }
.trial-session-card { background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; margin-bottom:8px; padding:12px 14px; cursor:pointer; display:flex; align-items:center; gap:10px; }
.trial-session-card:active { background:rgba(22,163,74,0.06); }
.tsc-date { font-family:'Oswald',sans-serif; font-size:13px; color:var(--cream); flex:1; }
.tsc-label { font-size:12px; color:var(--muted); }
.tsc-graded { font-size:12px; padding:2px 8px; border-radius:10px; background:rgba(34,197,94,0.1); color:var(--green); }
.trial-trialist-row { display:flex; align-items:center; gap:10px; padding:10px 12px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; margin-bottom:8px; cursor:pointer; }
.trial-trialist-row:active { background:rgba(22,163,74,0.06); }
.ttr-name { flex:1; }
.ttr-name-main { font-family:'Oswald',sans-serif; font-size:13px; color:var(--cream); }
.ttr-pos { font-size:12px; color:var(--muted); }
.ttr-grade { font-family:'Oswald',sans-serif; font-size:16px; font-weight:700; color:var(--red-light); flex-shrink:0; min-width:36px; text-align:right; }
.ttr-invited { font-size:16px; flex-shrink:0; }
.ttr-decision { font-size:12px; padding:2px 8px; border-radius:10px; flex-shrink:0; font-family:'Oswald',sans-serif; letter-spacing:1px; }
.ttr-decision.promote { background:rgba(34,197,94,0.12); color:var(--green); }
.ttr-decision.holdover { background:rgba(245,166,35,0.12); color:#f5a623; }
.ttr-decision.release { background:rgba(255,80,80,0.1); color:var(--red-light); }
.grading-row { padding:12px 0; border-bottom:1px solid rgba(255,255,255,0.04); }
.grading-row:last-child { border-bottom:none; }
.grading-name-row { font-family:'Oswald',sans-serif; font-size:13px; color:var(--cream); margin-bottom:8px; display:flex; align-items:center; justify-content:space-between; }
.grading-att-toggle { display:flex; gap:6px; margin-bottom:8px; }
.grading-att-btn { padding:5px 12px; border-radius:6px; border:1px solid var(--border); background:transparent; color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; }
.grading-att-btn.active { background:rgba(34,197,94,0.15); border-color:var(--green); color:var(--green); }
.grading-att-btn.absent-active { background:rgba(255,80,80,0.1); border-color:var(--red-light); color:var(--red-light); }
.grading-score-row { display:flex; gap:3px; margin-bottom:8px; flex-wrap:wrap; }
.grading-score-dot { width:28px; height:28px; border-radius:6px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); cursor:pointer; font-family:'Oswald',sans-serif; font-size:12px; color:var(--muted); display:flex; align-items:center; justify-content:center; transition:all 0.1s; flex-shrink:0; }
.grading-score-dot.f1,.grading-score-dot.f2,.grading-score-dot.f3 { background:#ef4444; border-color:#ef4444; color:#fff; }
.grading-score-dot.f4,.grading-score-dot.f5,.grading-score-dot.f6 { background:#f59e0b; border-color:#f59e0b; color:#fff; }
.grading-score-dot.f7,.grading-score-dot.f8 { background:#22c55e; border-color:#22c55e; color:#fff; }
.grading-score-dot.f9,.grading-score-dot.f10 { background:#10b981; border-color:#10b981; color:#fff; }
.grading-invited-row { display:flex; gap:6px; margin-bottom:8px; }
.grading-invited-btn { padding:5px 10px; border-radius:6px; border:1px solid var(--border); background:transparent; color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; flex:1; text-align:center; }
.grading-invited-btn.yes-active { background:rgba(34,197,94,0.15); border-color:var(--green); color:var(--green); }
.grading-invited-btn.no-active { background:rgba(255,80,80,0.1); border-color:var(--red-light); color:var(--red-light); }
.grading-invited-btn.maybe-active { background:rgba(245,166,35,0.1); border-color:#f5a623; color:#f5a623; }
.grading-note-input { width:100%; padding:7px 10px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); border-radius:7px; color:var(--cream); font-size:12px; font-family:'Inter',sans-serif; outline:none; box-sizing:border-box; }
.grading-detail-toggle { display:flex; gap:6px; margin:8px 0; }
.grading-detail-btn { flex:1; padding:6px 8px; border-radius:6px; border:1px solid var(--border); background:rgba(255,255,255,0.02); color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; text-align:center; }
.grading-detail-btn.open { background:rgba(74,222,128,0.1); border-color:var(--green); color:var(--green); }
.grading-detail-panel { display:none; padding:10px; margin-bottom:8px; background:rgba(255,255,255,0.02); border:1px solid rgba(255,255,255,0.06); border-radius:8px; }
.grading-detail-panel.open { display:block; }
.grading-detail-section-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; margin:10px 0 6px; }
.grading-detail-section-label:first-child { margin-top:0; }
.grading-test-row { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:5px 0; }
.grading-test-label { font-size:12px; color:var(--cream); font-family:'Inter',sans-serif; flex:1; }
.grading-test-input { width:70px; padding:5px 8px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.08); border-radius:6px; color:var(--cream); font-size:12px; font-family:'Inter',sans-serif; outline:none; text-align:center; flex-shrink:0; }
.grading-test-unit { font-size:12px; color:var(--muted); width:22px; flex-shrink:0; }
.grading-skill-row { display:flex; align-items:center; justify-content:space-between; gap:6px; padding:4px 0; }
.grading-skill-label { font-size:12px; color:var(--cream); font-family:'Inter',sans-serif; flex:1; }
.grading-skill-dots { display:flex; gap:2px; flex-shrink:0; }
.grading-skill-dot { width:19px; height:19px; border-radius:4px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); cursor:pointer; transition:all 0.1s; flex-shrink:0; }
.grading-skill-dot.on { background:var(--green); border-color:var(--green); }
.trial-lb-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:12px; }
.trial-lb-note { font-size:12px; color:var(--muted); font-style:italic; }
.trial-report-btn { padding:7px 12px; background:rgba(22,163,74,0.12); border:1px solid rgba(22,163,74,0.25); border-radius:7px; color:var(--red-light); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; }
.trial-lb-row { display:flex; align-items:center; gap:10px; padding:10px 12px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; margin-bottom:8px; cursor:pointer; }
.trial-lb-row:active { background:rgba(22,163,74,0.06); }
.trial-lb-rank { font-family:'Oswald',sans-serif; font-size:16px; font-weight:700; color:var(--muted); width:28px; flex-shrink:0; text-align:center; }
.tby-match-pills { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.tby-match-pill { padding:6px 12px; border-radius:16px; border:1px solid var(--border); background:rgba(255,255,255,0.02); color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.5px; cursor:pointer; }
.tby-match-pill.on { background:rgba(74,222,128,0.12); border-color:var(--green); color:var(--green); }
.tby-team-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.tby-team-card { background:rgba(255,255,255,0.02); border:1px solid var(--border); border-radius:10px; padding:10px; min-width:0; }
.tby-team-name { font-family:'Oswald',sans-serif; font-size:12px; font-weight:600; letter-spacing:0.5px; margin-bottom:4px; }
.tby-player-row { display:flex; align-items:center; gap:6px; padding:5px 0; border-top:1px solid rgba(255,255,255,0.05); }
.tby-player-row:first-child { border-top:none; }
.tby-jersey { width:20px; height:20px; border-radius:50%; background:rgba(255,255,255,0.08); color:var(--cream); font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; font-family:'Oswald',sans-serif; }
.tby-player-name { flex:1; font-size:12px; color:var(--cream); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tby-score-pill { flex-shrink:0; min-width:26px; padding:3px 7px; border-radius:6px; border:1px solid var(--border); background:rgba(255,255,255,0.03); color:var(--muted); font-size:12px; font-family:'Oswald',sans-serif; cursor:pointer; text-align:center; }
.tby-score-pill.has-score { color:var(--cream); border-color:rgba(255,255,255,0.15); }
.tby-unassigned { font-size:12px; color:var(--muted); padding:10px 4px; text-align:center; }

/* ── TACTICS BOARD ── */
.tb-cat-tabs { display:flex; gap:6px; overflow-x:auto; margin-bottom:14px; padding-bottom:2px; -webkit-overflow-scrolling:touch; }
.tb-cat-tab { flex-shrink:0; padding:8px 14px; border-radius:16px; border:1px solid var(--border); background:rgba(255,255,255,0.03); color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:0.5px; cursor:pointer; white-space:nowrap; }
.tb-cat-tab.active { background:rgba(74,222,128,0.14); border-color:var(--green); color:var(--green); }
.tb-lib-card { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 14px; background:rgba(255,255,255,0.02); border:1px solid var(--border); border-radius:10px; margin-bottom:8px; cursor:pointer; }
.tb-lib-card:active { background:rgba(255,255,255,0.05); }
.tb-lib-name { font-family:'Inter',sans-serif; font-size:14px; color:var(--cream); font-weight:600; }
.tb-lib-sub { font-size:12px; color:var(--muted); margin-top:2px; }
.tb-lib-chevron { color:var(--muted); font-size:16px; flex-shrink:0; }
.tb-toolbar { display:flex; gap:6px; overflow-x:auto; margin-bottom:6px; -webkit-overflow-scrolling:touch; }
.tb-tool-btn { flex-shrink:0; padding:8px 12px; border-radius:8px; border:1px solid var(--border); background:rgba(255,255,255,0.03); color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; cursor:pointer; white-space:nowrap; }
.tb-tool-btn.active { background:rgba(74,222,128,0.14); border-color:var(--green); color:var(--green); }
.tb-tool-btn:disabled { opacity:0.35; cursor:default; }
.tb-sub { font-size:12px; color:var(--muted); margin-bottom:10px; font-family:'Inter',sans-serif; }
.tb-pitch-wrap { position:relative; width:100%; aspect-ratio:320/480; background:#0d2015; border:1px solid var(--border); border-radius:10px; overflow:hidden; touch-action:none; user-select:none; }
.tb-pitch-wrap svg#tb-arrow-layer { position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; }
#tb-pitch-bg { position:absolute; top:0; left:0; width:100%; height:100%; }
#tb-pitch-bg svg { width:100%; height:100%; display:block; }
#tb-players-layer, #tb-notes-layer { position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; }
.tb-player, .tb-note { pointer-events:auto; }
.tb-player { position:absolute; width:32px; height:32px; margin-left:-16px; margin-top:-16px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-family:'Oswald',sans-serif; font-size:14px; font-weight:700; color:#fff; cursor:grab; box-shadow:0 2px 5px rgba(0,0,0,0.5); touch-action:none; transition:transform 0.12s, box-shadow 0.12s; }
.tb-player::after { content:''; position:absolute; inset:-6px; border-radius:50%; }
.tb-player.home { background:linear-gradient(180deg,#22c55e,#15803d); border:2px solid rgba(255,255,255,0.9); }
.tb-player.away { background:linear-gradient(180deg,#e2e8f0,#94a3b8); border:2px solid #ffffff; color:#0f172a; }
.tb-player.dragging { cursor:grabbing; z-index:5; transform:scale(1.22); box-shadow:0 10px 18px rgba(0,0,0,0.55); border-color:#fff; border-width:3px; }
.tb-note { position:absolute; transform:translate(-50%,-50%); background:rgba(8,15,11,0.92); border:1px solid var(--gold); border-radius:8px; padding:5px 9px; font-size:12px; line-height:1.3; color:var(--cream); font-family:'Inter',sans-serif; width:max-content; max-width:40%; overflow-wrap:break-word; text-align:center; cursor:pointer; box-shadow:0 2px 6px rgba(0,0,0,0.4); }
.tb-note.selected { outline:2px solid #fff; outline-offset:2px; }
.tb-legend { display:flex; gap:14px; justify-content:center; margin:10px 0; font-size:12px; color:var(--muted); font-family:'Inter',sans-serif; }
.tb-legend span { display:inline-flex; align-items:center; gap:6px; }
.tb-legend svg { width:28px; height:6px; }
.tb-lib-present-btn { flex-shrink:0; width:30px; height:30px; border-radius:50%; border:1px solid var(--green); background:rgba(74,222,128,0.1); color:var(--green); font-size:12px; cursor:pointer; display:flex; align-items:center; justify-content:center; }
/* Presentation mode: every arrow gets a travelling dash so it reads as
   motion, not just a static line — this is the one place in the app
   where an arrow animates, deliberately kept out of the editor itself
   so dragging/drawing there isn't fighting a moving target. */
#tactics-present-mode .present-arrow.dashed { animation: tb-arrow-flow 0.9s linear infinite; }
@keyframes tb-arrow-flow { to { stroke-dashoffset: -16; } }
.trial-lb-rank.top3 { color:var(--gold); }
.trial-lb-info { flex:1; }
.trial-lb-name { font-family:'Oswald',sans-serif; font-size:13px; color:var(--cream); }
.trial-lb-detail { font-size:12px; color:var(--muted); margin-top:2px; }
.trial-lb-score { font-family:'Oswald',sans-serif; font-size:22px; font-weight:700; flex-shrink:0; }
.trial-lb-score.high { color:var(--green); }
.trial-lb-score.mid { color:#f5a623; }
.trial-lb-score.low { color:var(--red-light); }
.trial-build-squad-btn { width:100%; padding:13px; background:linear-gradient(135deg,rgba(20,83,45,0.2),rgba(22,163,74,0.1)); border:1px solid rgba(22,163,74,0.3); border-radius:12px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; margin-top:12px; }
.trial-menu-action { width:100%; padding:14px 16px; background:transparent; border:none; border-bottom:1px solid var(--border); color:var(--cream); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; text-align:left; }
.trial-menu-action:last-child { border-bottom:none; }
.trial-menu-action.danger { color:var(--red-light); }
.build-squad-row { display:flex; align-items:center; gap:10px; padding:10px 12px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; margin-bottom:8px; }
.bsr-check { width:22px; height:22px; border-radius:4px; border:1px solid var(--border); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:12px; flex-shrink:0; }
.bsr-check.checked { background:var(--btn-green); border-color:var(--red); color:#fff; }
.bsr-info { flex:1; }
.bsr-name { font-family:'Oswald',sans-serif; font-size:13px; color:var(--cream); }
.bsr-grade { font-size:12px; color:var(--muted); }
.bsr-slot-select { padding:6px 8px; background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:6px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:12px; outline:none; }

/* ── TRAINING ─────────────────────────────────────── */
.training-header { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.training-season-sel { background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:8px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; padding:7px 10px; outline:none; }
.training-view-toggle { display:flex; border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.tr-toggle-btn { padding:7px 14px; background:transparent; border:none; color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; }
.tr-toggle-btn.active { background:rgba(22,163,74,0.15); color:var(--cream); }
.training-new-btn { width:100%; padding:13px; background:linear-gradient(135deg,rgba(20,83,45,0.2),rgba(22,163,74,0.1)); border:1px solid rgba(22,163,74,0.3); border-radius:12px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; margin-bottom:14px; }
.training-new-btn:active { background:rgba(22,163,74,0.2); }

/* Session list */
.session-card { background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:12px; margin-bottom:10px; overflow:hidden; cursor:pointer; }
.session-card:active { background:rgba(22,163,74,0.06); }
.session-card-header { display:flex; align-items:center; gap:10px; padding:12px 14px; }
.sc-date { font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; color:var(--cream); flex:1; }
.sc-label { font-size:12px; color:var(--muted); }
.sc-att-summary { display:flex; gap:6px; align-items:center; }
.sc-att-pill { font-size:12px; padding:2px 7px; border-radius:10px; }
.sc-att-pill.present { background:rgba(34,197,94,0.1); color:var(--green); }
.sc-att-pill.absent { background:rgba(255,80,80,0.1); color:var(--red-light); }
.sc-att-pill.injured { background:rgba(245,166,35,0.1); color:#f5a623; }
.session-empty { text-align:center; padding:32px 16px; color:var(--muted); font-size:13px; font-style:italic; }

/* Training sheet */
.training-sheet { background:var(--panel2); border:1px solid var(--border); border-bottom:none; border-radius:20px 20px 0 0; padding:16px 16px 0; width:100%; max-width:640px; transform:translateY(100%); transition:transform 0.28s cubic-bezier(0.22,1,0.36,1); max-height:92vh; display:flex; flex-direction:column; }
.modal-overlay.open .training-sheet { transform:translateY(0); }
/* Long squads: the player list scrolls inside the sheet so Save stays on screen */
.training-sheet { overflow-y:auto; padding-bottom:calc(12px + env(safe-area-inset-bottom, 0px)); }
.training-sheet > * { flex-shrink:0; }
#session-attendance-list { flex:1 1 auto; flex-shrink:1; min-height:120px; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }

/* Session meta */
.tr-session-meta { display:flex; gap:10px; margin-bottom:14px; flex-shrink:0; }
.tr-meta-field { flex:1; }
.tr-meta-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); margin-bottom:4px; }
.tr-meta-input { width:100%; padding:9px 12px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.12); border-radius:8px; color:var(--cream); font-size:14px; font-family:'Inter',sans-serif; outline:none; box-sizing:border-box; }

/* Attendance grid in session */
.tr-att-header { display:flex; align-items:center; gap:6px; padding:0 4px 6px; border-bottom:1px solid var(--border); flex-shrink:0; }
.tr-att-label-col { flex:1; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; }
.tr-att-status-cols { display:flex; gap:0; width:160px; justify-content:space-around; font-size:14px; flex-shrink:0; }
.tr-att-note-col { width:80px; font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--muted); text-transform:uppercase; flex-shrink:0; }
.tr-att-row { display:flex; align-items:center; gap:6px; padding:8px 4px; border-bottom:1px solid rgba(255,255,255,0.03); }
.tr-att-name { flex:1; font-size:13px; color:var(--cream); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tr-att-name .tr-att-num { font-size:12px; color:var(--muted); margin-right:4px; }
.tr-att-btns { display:flex; gap:0; width:160px; justify-content:space-around; flex-shrink:0; }
.tr-att-btn { width:28px; height:28px; border-radius:6px; border:1px solid transparent; background:transparent; cursor:pointer; font-size:14px; display:flex; align-items:center; justify-content:center; transition:all 0.12s; }
.tr-att-btn.selected { background:rgba(255,255,255,0.1); border-color:rgba(255,255,255,0.2); transform:scale(1.15); }
.tr-att-note-input { width:80px; padding:5px 6px; background:rgba(255,255,255,0.04); border:1px solid transparent; border-radius:6px; color:var(--muted); font-size:12px; font-family:'Inter',sans-serif; outline:none; flex-shrink:0; }
.tr-att-note-input:focus { border-color:var(--border); color:var(--cream); background:rgba(255,255,255,0.06); }
.tr-att-scroll { flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; }

/* Players view */
.training-player-row { display:flex; align-items:center; gap:10px; padding:10px 12px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; margin-bottom:8px; cursor:pointer; }
.training-player-row:active { background:rgba(22,163,74,0.06); }
.tpr-num { font-family:'Oswald',sans-serif; font-size:12px; color:var(--muted); width:24px; flex-shrink:0; }
.tpr-info { flex:1; }
.tpr-name { font-family:'Oswald',sans-serif; font-size:13px; color:var(--cream); }
.tpr-pos { font-size:12px; color:var(--muted); }
.tpr-att-badge { font-size:12px; padding:3px 8px; border-radius:10px; font-family:'Oswald',sans-serif; letter-spacing:1px; flex-shrink:0; }
.tpr-att-badge.green { background:rgba(34,197,94,0.12); color:var(--green); }
.tpr-att-badge.yellow { background:rgba(245,166,35,0.12); color:#f5a623; }
.tpr-att-badge.red { background:rgba(255,80,80,0.12); color:var(--red-light); }
.tpr-avail { font-size:16px; flex-shrink:0; }
.squad-att-badge { position:absolute; top:-2px; right:-2px; width:10px; height:10px; border-radius:50%; border:1px solid var(--panel); }
.squad-att-badge.green { background:var(--green); }
.squad-att-badge.yellow { background:#f5a623; }
.squad-att-badge.red { background:var(--red-light); }

/* Player training profile */
.ptr-section { margin-bottom:16px; padding-bottom:16px; border-bottom:1px solid var(--border); flex-shrink:0; }
.ptr-section:last-child { border-bottom:none; }
.ptr-section-title { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--red-light); text-transform:uppercase; margin-bottom:10px; }
.ptr-att-summary { display:flex; gap:10px; margin-bottom:10px; }
.ptr-att-stat { flex:1; background:rgba(255,255,255,0.04); border:1px solid var(--border); border-radius:10px; padding:10px; text-align:center; }
.ptr-att-stat-val { font-family:'Oswald',sans-serif; font-size:22px; font-weight:700; }
.ptr-att-stat-val.green { color:var(--green); }
.ptr-att-stat-val.yellow { color:#f5a623; }
.ptr-att-stat-val.red { color:var(--red-light); }
.ptr-att-stat-label { font-size:13px; color:var(--muted); letter-spacing:0.2px; font-family:'Oswald',sans-serif; margin-top:2px; }
.ptr-att-history { display:flex; gap:4px; flex-wrap:wrap; }
.ptr-att-dot { width:20px; height:20px; border-radius:4px; font-size:12px; display:flex; align-items:center; justify-content:center; cursor:default; }
.ptr-att-dot.present { background:rgba(34,197,94,0.2); }
.ptr-att-dot.absent { background:rgba(255,80,80,0.15); }
.ptr-att-dot.injured { background:rgba(245,166,35,0.2); }
.ptr-att-dot.sick { background:rgba(148,163,184,0.2); }
.ptr-att-dot.county { background:rgba(99,102,241,0.2); }
.ptr-att-dot.none { background:rgba(255,255,255,0.04); }
.ptr-avail-row { display:flex; gap:8px; margin-bottom:8px; }
.ptr-avail-btn { flex:1; padding:9px 6px; border-radius:8px; border:1px solid var(--border); background:transparent; color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; text-align:center; }
.ptr-avail-btn.available.active { background:rgba(34,197,94,0.15); border-color:var(--green); color:var(--green); }
.ptr-avail-btn.maybe.active { background:rgba(245,166,35,0.12); border-color:#f5a623; color:#f5a623; }
.ptr-avail-btn.unavailable.active { background:rgba(255,80,80,0.1); border-color:var(--red-light); color:var(--red-light); }
.ptr-note-input { width:100%; padding:9px 12px; background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:8px; color:var(--cream); font-size:13px; font-family:'Inter',sans-serif; outline:none; box-sizing:border-box; margin-top:4px; }
.ptr-skills-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:10px; }
.ptr-skill-item { background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; padding:10px 12px; }
.ptr-skill-name { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); margin-bottom:6px; }
.ptr-skill-score-row { display:flex; gap:3px; }
.ptr-skill-dot { width:22px; height:22px; border-radius:4px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.04); cursor:pointer; transition:all 0.1s; font-family:'Oswald',sans-serif; font-size:12px; color:transparent; display:flex; align-items:center; justify-content:center; }
.ptr-skill-dot.filled { background:var(--btn-green); border-color:var(--red); color:#fff; }
.ptr-save-ratings-btn { width:100%; padding:10px; background:rgba(255,255,255,0.06); border:1px solid var(--border); border-radius:8px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1.5px; cursor:pointer; }
.ptr-note-add { display:flex; gap:8px; margin-bottom:10px; }
.ptr-add-note-btn { padding:9px 14px; background:rgba(22,163,74,0.15); border:1px solid rgba(22,163,74,0.3); border-radius:8px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; flex-shrink:0; }
.ptr-note-item { padding:8px 10px; background:rgba(255,255,255,0.03); border-radius:8px; margin-bottom:6px; }
.ptr-note-date { font-size:12px; color:var(--muted); margin-bottom:3px; }
.ptr-note-text { font-size:12px; color:var(--cream); line-height:1.5; }
.ptr-no-notes { font-size:12px; color:var(--muted); font-style:italic; }
.settings-sheet { background:var(--panel2); border:1px solid var(--border); border-bottom:none; border-radius:20px 20px 0 0; padding:16px 16px 0; width:100%; max-width:640px; transform:translateY(100%); transition:transform 0.28s cubic-bezier(0.22,1,0.36,1); max-height:92vh; display:flex; flex-direction:column; }
.modal-overlay.open .settings-sheet { transform:translateY(0); }
.settings-tabs { display:flex; gap:0; border:1px solid var(--border); border-radius:10px; overflow:hidden; margin:12px 0 4px; flex-shrink:0; }
.settings-tab { flex:1; padding:9px 8px; background:transparent; border:none; color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor:pointer; }
.settings-tab.active { background:rgba(22,163,74,0.12); color:var(--cream); }
.settings-panel { flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; padding-bottom:24px; }
.settings-panel-note { background:rgba(245,166,35,0.08); border:1px solid rgba(245,166,35,0.2); border-radius:8px; padding:10px 12px; font-size:12px; color:#fde68a; margin-bottom:12px; line-height:1.5; }
.event-config-item { display:flex; align-items:center; gap:10px; padding:11px 12px; background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; margin-bottom:8px; cursor:pointer; }
.event-config-item:active { background:rgba(22,163,74,0.08); }
.eci-icon { font-size:20px; flex-shrink:0; width:28px; text-align:center; }
.eci-info { flex:1; min-width:0; }
.eci-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--cream); }
.eci-meta { font-size:12px; color:var(--muted); margin-top:2px; }
.eci-ctx { font-size:12px; letter-spacing:0.2px; padding:2px 6px; border-radius:4px; }
.eci-ctx.both { background:rgba(68,187,255,0.1); color:#44bbff; }
.eci-ctx.live { background:rgba(34,197,94,0.1); color:var(--green); }
.eci-ctx.video { background:rgba(20,83,45,0.15); color:var(--red-light); }
.eci-arrow { color:var(--muted); font-size:12px; flex-shrink:0; }
.settings-cat-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--red-light); text-transform:uppercase; margin:14px 0 6px 2px; }
.settings-add-btn { width:100%; padding:12px; background:rgba(255,255,255,0.04); border:1px dashed rgba(255,255,255,0.15); border-radius:10px; color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1.5px; cursor:pointer; margin-top:4px; }
.settings-add-btn:active { background:rgba(22,163,74,0.08); color:var(--cream); }

/* Performance tab */
.perf-explainer { font-size:12px; color:var(--muted); line-height:1.6; margin-bottom:14px; padding:12px; background:rgba(255,255,255,0.03); border-radius:8px; border:1px solid var(--border); }
.perf-event-section { margin-bottom:16px; }
.perf-event-label { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; color:var(--cream); margin-bottom:6px; display:flex; align-items:center; gap:6px; }
.perf-outcome-row { display:flex; align-items:center; gap:10px; padding:7px 10px; border-bottom:1px solid rgba(255,255,255,0.03); }
.perf-outcome-row:last-child { border-bottom:none; }
.perf-outcome-label { flex:1; font-size:12px; color:var(--muted); }
.perf-score-input { width:56px; padding:5px 8px; background:rgba(255,255,255,0.06); border:1px solid var(--border); border-radius:6px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:13px; text-align:center; outline:none; }
.perf-score-pos { color:var(--green); }
.perf-score-neg { color:var(--red-light); }
.perf-save-btn { width:100%; padding:12px; background:linear-gradient(135deg,var(--red-dark),var(--red)); border:none; border-radius:10px; color:#fff; font-family:'Oswald',sans-serif; font-size:12px; font-weight:600; letter-spacing:1px; cursor:pointer; margin-top:12px; }

/* Event editor sheet */
.event-editor-sheet { background:var(--panel2); border:1px solid var(--border); border-bottom:none; border-radius:20px 20px 0 0; padding:16px 16px calc(24px + var(--safe-bottom)); width:100%; max-width:640px; transform:translateY(100%); transition:transform 0.28s cubic-bezier(0.22,1,0.36,1); max-height:92vh; overflow-y:auto; -webkit-overflow-scrolling:touch; }
.modal-overlay.open .event-editor-sheet { transform:translateY(0); }
.ee-field { margin-bottom:12px; }
.ee-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); margin-bottom:6px; }
.ee-hint { font-size:12px; color:rgba(240,253,244,0.62); letter-spacing:0; text-transform:none; font-family:'Inter',sans-serif; }
.ee-input { width:100%; padding:11px 14px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.12); border-radius:10px; color:var(--cream); font-size:15px; font-family:'Inter',sans-serif; outline:none; box-sizing:border-box; }
.ee-input-sm { width:80px; text-align:center; font-size:22px; }
.ee-select-row { display:flex; gap:6px; flex-wrap:wrap; }
.ee-cat-btn, .ee-ctx-btn { padding:7px 12px; border-radius:8px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; }
.ee-cat-btn.active, .ee-ctx-btn.active { background:rgba(22,163,74,0.15); border-color:var(--red); color:var(--cream); }
.ee-outcome-row { display:flex; align-items:center; gap:8px; padding:8px 0; border-bottom:1px solid rgba(255,255,255,0.04); }
.ee-outcome-row:last-child { border-bottom:none; }
.ee-outcome-label-input { flex:1; padding:7px 10px; background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:7px; color:var(--cream); font-size:13px; font-family:'Inter',sans-serif; outline:none; }
.ee-perf-input { width:52px; padding:7px 6px; background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:7px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:13px; text-align:center; outline:none; }
.ee-outcome-del { background:none; border:none; color:rgba(255,80,80,0.4); font-size:16px; cursor:pointer; padding:0 4px; flex-shrink:0; }
.ee-add-outcome-btn { width:100%; margin-top:8px; padding:9px; background:rgba(255,255,255,0.03); border:1px dashed rgba(255,255,255,0.1); border-radius:8px; color:var(--muted); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1.5px; cursor:pointer; }
.ee-actions { display:flex; gap:10px; margin-top:16px; }
.ee-save-btn { flex:2; padding:13px; background:linear-gradient(135deg,var(--red-dark),var(--red)); border:none; border-radius:10px; color:#fff; font-family:'Oswald',sans-serif; font-size:12px; font-weight:600; letter-spacing:1px; cursor:pointer; }
.ee-delete-btn { flex:1; padding:13px; background:rgba(255,60,60,0.07); border:1px solid rgba(255,60,60,0.2); border-radius:10px; color:rgba(255,120,120,0.7); font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; cursor:pointer; }

/* Performance score in player stats */
.psc-perf { display:flex; align-items:center; gap:6px; padding:6px 12px; background:rgba(255,255,255,0.03); border-top:1px solid var(--border); border-radius:0 0 10px 10px; margin-top:4px; }
.psc-perf-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; color:var(--muted); flex:1; }
.psc-perf-score { font-family:'Oswald',sans-serif; font-size:18px; font-weight:700; }
.psc-perf-score.positive { color:var(--green); }
.psc-perf-score.negative { color:var(--red-light); }
.psc-perf-score.neutral { color:var(--muted); }

/* Video area */
.va-video-wrap {
  flex-shrink: 0;
  width: 100%;
  background: #000;
  position: relative;
}
.va-video-wrap iframe,
.va-video-wrap video {
  width: 100%; display: block;
}

/* URL input screen */
.va-url-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px; flex: 1;
}
.va-url-title { font-family: 'Oswald',sans-serif; font-size: 16px; letter-spacing: 1px; color: var(--cream); text-transform: uppercase; text-align: center; }
.va-url-sub { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.6; max-width: 300px; }
.va-url-input { width: 100%; max-width: 400px; padding: 12px 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 10px; color: var(--cream); font-size: 14px; font-family: 'Inter',sans-serif; outline: none; box-sizing: border-box; }
.va-url-btn { width: 100%; max-width: 400px; padding: 13px; background: linear-gradient(135deg,var(--red-dark),var(--red)); border: none; border-radius: 10px; color: #fff; font-family: 'Oswald',sans-serif; font-size: 13px; font-weight: 600; letter-spacing:0.2px; cursor: pointer; }
.va-url-or { font-family:'Oswald',sans-serif; font-size:13px; color:var(--muted); letter-spacing:0.2px; }
.va-url-upload-btn { display:block; width:100%; max-width:400px; padding:13px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.15); border-radius:10px; color:var(--cream); font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:0.2px; cursor:pointer; text-align:center; box-sizing:border-box; }
.va-url-upload-btn:active { background:rgba(255,255,255,0.12); }

/* Controls panel */
.va-controls {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 10px 12px 24px; display: none; flex-direction: column; gap: 10px;
}
.va-controls.active { display: flex; }
.va-team-tabs { display: flex; gap: 8px; }
.va-team-tab { flex: 1; padding: 9px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--muted); font-family: 'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor: pointer; transition: all 0.15s; text-align: center; }
.va-team-tab.active-home { background: rgba(22,163,74,0.15); border-color: var(--red); color: var(--cream); }
.va-team-tab.active-away { background: rgba(48,100,224,0.15); border-color: #4466ff; color: #aabbff; }
.va-event-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.va-event-btn { padding: 11px 6px; border-radius: 9px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--muted); font-family: 'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor: pointer; transition: all 0.15s; text-align: center; line-height: 1.3; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.va-event-btn:active { background: rgba(22,163,74,0.2); border-color: var(--red); color: var(--cream); transform: scale(0.96); }
.va-event-icon { font-size: 16px; }
.va-tag-flash { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(22,163,74,0.9); color: #fff; font-family: 'Oswald',sans-serif; font-size: 13px; letter-spacing: 1px; padding: 10px 20px; border-radius: 10px; pointer-events: none; opacity: 0; transition: opacity 0.15s; z-index: 9999; }
.va-tag-flash.show { opacity: 1; }

/* Tag list */
.va-tag-list-wrap { border-top: 1px solid var(--border); padding-top: 10px; }
.va-tag-list-title { font-family: 'Oswald',sans-serif; font-size:12px; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; margin-bottom: 8px; }
.va-tag-list { display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.va-tag-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.va-tag-item:active { background: rgba(22,163,74,0.1); }
.va-tag-ts { font-family: 'Oswald',sans-serif; font-size: 13px; font-weight: 600; color: var(--red-light); min-width: 44px; flex-shrink: 0; }
.va-tag-label { font-size: 12px; color: var(--cream); flex: 1; }
.va-tag-team { font-size:12px; color: var(--muted); flex-shrink: 0; }
.va-tag-del { background: none; border: none; color: rgba(255,80,80,0.4); font-size: 14px; cursor: pointer; padding: 0 4px; flex-shrink: 0; }
.va-empty-tags { font-size: 12px; color: var(--muted); text-align: center; padding: 12px 0; font-style: italic; }

/* Outcome picker overlay */
.va-outcome-overlay {
  position: fixed; inset: 0; z-index: 9000; background: rgba(0,0,0,0.7);
  display: none; align-items: flex-end; justify-content: center;
}
.va-outcome-overlay.open { display: flex; }
.va-outcome-sheet { background: var(--panel2); border: 1px solid var(--border); border-bottom: none; border-radius: 20px 20px 0 0; padding: 16px 16px calc(24px + var(--safe-bottom)); width: 100%; max-width: 500px; }
.va-outcome-title { font-family: 'Oswald',sans-serif; font-size: 14px; letter-spacing: 1px; color: var(--cream); text-transform: uppercase; margin-bottom: 12px; text-align: center; }
.va-outcome-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.va-outcome-btn { padding: 12px 8px; border-radius: 8px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--muted); font-family: 'Oswald',sans-serif; font-size:13px; letter-spacing:0.2px; cursor: pointer; text-align: center; }
.va-outcome-btn:active { background: var(--btn-green); border-color: var(--red); color: #fff; }
.va-outcome-cancel { width: 100%; margin-top: 10px; padding: 11px; background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); font-family: 'Oswald',sans-serif; font-size:12px; letter-spacing: 1px; cursor: pointer; }

/* Event settings: a coach's own events on the Record grid */
.rec-ev-box.home-only .rev-half.home { border-right:none; }

/* ── Event settings: live events list, presets, editor ── */
.evs-group { display:flex; align-items:baseline; justify-content:space-between; margin:16px 2px 7px; }
.evs-group span { font-family:'Oswald',sans-serif; font-size:12px; letter-spacing:1px; text-transform:uppercase; color:#4ade80; }
.evs-group small { font-size:12px; color:var(--muted); }
.evs-card { background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:14px; overflow:hidden; }
.evs-row { display:flex; align-items:center; gap:6px; padding:4px 10px 4px 4px; background:var(--panel2); position:relative; touch-action:pan-y; }
.evs-row + .evs-row { border-top:1px solid rgba(240,253,244,0.07); }
.evs-row.dragging { z-index:5; box-shadow:0 8px 24px rgba(0,0,0,0.45); border-radius:10px; opacity:0.96; }
.evs-handle { flex:none; width:32px; min-height:44px; border:0; background:none; color:var(--muted); font-size:15px; letter-spacing:-2px; cursor:grab; touch-action:none; }
.evs-main { flex:1; min-width:0; display:flex; align-items:center; gap:10px; padding:9px 4px; border:0; background:none; color:var(--cream); text-align:left; cursor:pointer; font:inherit; }
.evs-main:disabled { cursor:default; }
.evs-icon { flex:none; width:26px; font-size:19px; text-align:center; }
.evs-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.evs-info b { font-family:'Inter',sans-serif; font-weight:600; font-size:14px; color:var(--cream); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.evs-info small { font-size:12px; color:var(--muted); }
.evs-row.off .evs-info b, .evs-row.off .evs-icon { opacity:0.5; }
.evs-tag { display:inline-block; margin-left:4px; padding:0 6px; border-radius:5px; font-size:12px; font-weight:600; background:rgba(148,163,184,0.16); color:#cbd5e1; }
.evs-tag.own { background:rgba(22,163,74,0.18); color:#4ade80; }
.evs-chev { flex:none; color:var(--muted); font-size:18px; }
.evs-switch { flex:none; width:46px; height:28px; border-radius:14px; border:0; background:#334155; position:relative; cursor:pointer; transition:background 0.15s; }
.evs-switch i { position:absolute; top:4px; left:4px; width:20px; height:20px; border-radius:50%; background:#fff; transition:left 0.15s; }
.evs-switch.on { background:#15803d; }
.evs-switch.on i { left:22px; }
.evs-switch:disabled { opacity:0.5; cursor:default; }
.evs-chips { display:flex; flex-wrap:wrap; gap:8px; }
.evs-chip { display:inline-flex; align-items:center; padding:8px 13px; border-radius:18px; border:1px solid rgba(240,253,244,0.15); background:rgba(255,255,255,0.05); color:var(--cream); font:600 12.5px 'Inter',sans-serif; cursor:pointer; }
.evs-chip.on { background:#15803d; border-color:#15803d; color:#fff; }
.evs-chip.own { padding:0; }
.evs-chip.own button { border:0; background:none; color:inherit; font:inherit; padding:8px 4px 8px 13px; cursor:pointer; }
.evs-chip.own .evs-chip-x { padding:8px 11px 8px 6px; opacity:0.7; }
.evs-link { border:0; background:none; color:#4ade80; font:600 12.5px 'Inter',sans-serif; padding:10px 2px 0; cursor:pointer; }
.evs-empty { font-size:12px; color:var(--muted); line-height:1.5; padding:4px 2px 8px; }
.evs-note { margin:14px 0 8px; padding:10px 12px; border-radius:10px; background:rgba(245,166,35,0.1); border:1px solid rgba(245,166,35,0.35); color:#fcd9a0; font-size:12px; line-height:1.45; }
.evs-hint { font-size:12px; color:var(--muted); margin-bottom:18px; }
.ee-name-row { display:flex; gap:10px; }
.ee-opt { padding:8px 10px 8px 12px; }
.ee-opt .evs-info b { white-space:normal; }
.ee-outcome-row.fixed { justify-content:space-between; padding:9px 2px; }
.ee-outcome-fixed { font-size:14px; color:var(--cream); }
.ee-name-row .ee-label { display:block; }
.ee-name-row .ee-input-sm { width:72px; }

/* Tactics board: tools that fit on a phone, selection bar, drawing cursor */
.tb-toolbar.tb-tools, .tb-toolbar.tb-actions { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; overflow:visible; }
.tb-tools .tb-tool-btn { display:flex; flex-direction:column; align-items:center; gap:3px; padding:7px 2px 6px; font-family:'Inter',sans-serif; font-weight:600; font-size:12px; color:var(--cream); }
.tb-tools .tb-tool-btn span:not(.tb-ic) { opacity:0.85; }
.tb-tools .tb-tool-btn.active { background:rgba(22,163,74,0.18); border-color:#4ade80; color:#4ade80; }
.tb-ic { width:30px; height:16px; display:block; }
.tb-ic-text { font-family:'Oswald',sans-serif; font-weight:600; font-size:14px; line-height:16px; text-align:center; color:var(--cream); }
.tb-actions .tb-tool-btn { padding:8px 2px; text-align:center; font-family:'Inter',sans-serif; font-weight:600; font-size:12px; color:var(--cream); }
.tb-actions .tb-tool-btn.go { color:#4ade80; border-color:#4ade80; }
.tb-pitch-wrap.drawing { cursor:crosshair; }
.tb-pitch-wrap.drawing .tb-player { cursor:crosshair; }
.tb-select-bar { position:absolute; z-index:6; transform:translate(-50%,-100%); display:flex; gap:2px; padding:4px; border-radius:11px; background:#111827; border:1px solid rgba(255,255,255,0.15); box-shadow:0 6px 16px rgba(0,0,0,0.55); pointer-events:auto; }
.tb-select-bar button { border:0; background:none; color:var(--cream); font:600 12.5px 'Inter',sans-serif; padding:9px 10px; border-radius:8px; cursor:pointer; }
.tb-select-bar button.on { background:rgba(125,211,252,0.18); color:#7dd3fc; }
.tb-select-bar button.del { color:#f87171; }
#tb-arrow-layer .tb-hit { pointer-events:stroke; cursor:pointer; }
/* Present mode uses the same stacked layers as the editor */
#present-pitch-bg, #present-arrow-layer, #present-players-layer, #present-notes-layer { position:absolute; top:0; left:0; width:100%; height:100%; }
#present-pitch-bg svg { width:100%; height:100%; display:block; }
#present-arrow-layer, #present-players-layer, #present-notes-layer { pointer-events:none; }
#tactics-present-mode .tb-player { cursor:default; }
.tb-select-bar.below { transform:translate(-50%, 0); }

/* ── Tactics board, phases 2 and 3 ── */
.tb-shell { padding:16px; max-width:900px; margin:0 auto; }
#tactics-board.editing .tb-board-head, #tactics-board.editing #tactics-cat-tabs { display:none !important; }
#tactics-board.editing .tb-shell { max-width:560px; padding-top:calc(10px + env(safe-area-inset-top,0px)); }
.tb-topbar { position:relative; display:flex; align-items:center; gap:6px; margin-bottom:10px; }
.tb-icon-btn { flex:none; min-width:40px; height:40px; border-radius:10px; border:1px solid rgba(255,255,255,0.1); background:rgba(255,255,255,0.06); color:var(--cream); font-size:18px; cursor:pointer; }
.tb-icon-btn:disabled { opacity:0.35; cursor:default; }
.tb-name-input { flex:1; min-width:0; height:40px; box-sizing:border-box; background:rgba(255,255,255,0.04); border:1px solid var(--border); border-radius:10px; padding:0 12px; color:#f0fdf4; font:600 15px 'Inter',sans-serif; }
.tb-menu { position:absolute; right:0; top:46px; z-index:20; flex-direction:column; min-width:240px; padding:6px; border-radius:12px; background:#111827; border:1px solid rgba(255,255,255,0.14); box-shadow:0 10px 24px rgba(0,0,0,0.6); }
.tb-menu button { text-align:left; border:0; background:none; color:var(--cream); font:500 14px 'Inter',sans-serif; padding:11px 12px; border-radius:8px; cursor:pointer; }
.tb-menu button:active { background:rgba(255,255,255,0.06); }
.tb-menu button.del { color:#f87171; }
.tb-steps { display:flex; gap:6px; overflow-x:auto; margin-bottom:10px; padding-bottom:2px; -webkit-overflow-scrolling:touch; }
.tb-step { flex:none; display:inline-flex; align-items:center; gap:7px; padding:7px 12px 7px 8px; border-radius:10px; border:1px solid rgba(240,253,244,0.14); background:rgba(255,255,255,0.05); color:var(--cream); font:600 12.5px 'Inter',sans-serif; cursor:pointer; }
.tb-step b { font-family:'Oswald',sans-serif; font-size:12px; background:rgba(0,0,0,0.3); border-radius:6px; padding:1px 6px; }
.tb-step.on { background:#15803d; border-color:#15803d; color:#fff; }
.tb-step.add { padding:7px 13px; color:#4ade80; border:1px dashed rgba(74,222,128,0.6); background:none; font-size:15px; }
.tb-toolbar.tb-tools { grid-template-columns:repeat(6,1fr); margin-top:10px; padding:4px; border-radius:14px; background:var(--panel2); border:1px solid var(--border); }
.tb-tools .tb-tool-btn { border-color:transparent; background:none; }
.tb-chips { display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 6px; }
.tb-chip { padding:8px 13px; border-radius:16px; border:1px solid rgba(240,253,244,0.15); background:rgba(255,255,255,0.05); color:var(--cream); font:600 12.5px 'Inter',sans-serif; cursor:pointer; }
.tb-chip.on { background:#15803d; border-color:#15803d; color:#fff; }
.tb-chip.away.on { background:#334155; border-color:#334155; }
.tb-chip.go { margin-left:auto; color:#4ade80; border-color:#4ade80; background:none; }
#tb-pitch-bg svg { width:100%; height:100%; display:block; }
.tb-player .tb-name { position:absolute; top:100%; left:50%; transform:translateX(-50%); margin-top:2px; font:700 9.5px 'Inter',sans-serif; color:#fff; white-space:nowrap; text-shadow:0 1px 2px #000, 0 0 3px #000; pointer-events:none; letter-spacing:0; }
.tb-player.selected { outline:3px solid #fff; outline-offset:2px; }
.tb-ball { position:absolute; width:14px; height:14px; margin:-7px 0 0 -7px; border-radius:50%; background:#fff; border:1.5px solid #0f172a; box-shadow:0 2px 4px rgba(0,0,0,0.55); pointer-events:auto; cursor:grab; touch-action:none; z-index:3; transition:transform 0.12s; }
.tb-ball::after { content:''; position:absolute; inset:-14px; border-radius:50%; }
.tb-ball.dragging { transform:scale(1.35); }
.tb-ball.selected { outline:3px solid #7dd3fc; outline-offset:2px; }
#tb-handle-layer { position:absolute; top:0; left:0; width:100%; height:100%; pointer-events:none; z-index:4; }
#tb-handle-layer .tb-handle { pointer-events:none; }
#tb-handle-layer .tb-handle-hit { pointer-events:all; cursor:grab; }
/* Present mode */
.present-head { position:absolute; top:calc(12px + env(safe-area-inset-top,0px)); left:16px; right:60px; z-index:2; }
#present-tactic-name { font-family:'Oswald',sans-serif; font-size:19px; font-weight:700; color:#f0fdf4; letter-spacing:0.5px; }
#present-step-name { font:600 12.5px 'Inter',sans-serif; color:#4ade80; margin-top:2px; }
.present-foot { position:absolute; left:0; right:0; bottom:calc(10px + env(safe-area-inset-bottom,0px)); z-index:2; padding:0 12px; max-width:560px; margin:0 auto; }
.present-controls { align-items:center; gap:10px; }
.present-controls button { flex:1; padding:13px 10px; border-radius:12px; border:0; background:#1e293b; color:#fff; font:600 14px 'Oswald',sans-serif; letter-spacing:0.2px; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.present-controls button.go { background:#15803d; }
.present-controls button:disabled { opacity:0.35; cursor:default; }
.present-dots { display:flex; gap:6px; }
.present-dots i { width:8px; height:8px; border-radius:50%; background:rgba(255,255,255,0.3); }
.present-dots i.on { background:#4ade80; }
.present-note { margin-top:8px; font:13px/1.4 'Inter',sans-serif; color:rgba(240,253,244,0.85); text-align:center; max-height:3.9em; overflow:hidden; }
#tactics-present-mode .tb-player, #tactics-present-mode .tb-ball { transition:left 0.7s ease, top 0.7s ease; }
#tactics-present-mode .tb-arrow { animation:tb-fade-in 0.5s ease 0.35s both; }
@keyframes tb-fade-in { from { opacity:0; } to { opacity:1; } }
@media (prefers-reduced-motion: reduce) {
  #tactics-present-mode .tb-player, #tactics-present-mode .tb-ball { transition:none; }
  #tactics-present-mode .tb-arrow, #tactics-present-mode .present-arrow.dashed { animation:none; }
}
/* The whole board fits on screen while editing (laptops, iPad landscape):
   the pitch is sized to the window height, leaving room for the top bar,
   steps and tools. Never smaller than 300px wide. */
#tactics-board.editing .tb-pitch-wrap { width:min(100%, max(300px, calc((100vh - 236px) * 2 / 3))); margin:0 auto; }
@supports (height: 100dvh) {
  #tactics-board.editing .tb-pitch-wrap { width:min(100%, max(300px, calc((100dvh - 236px) * 2 / 3))); }
}

/* Toast: moves to the top while a sheet or overlay is open, so it never covers the sheet's buttons */
#sync-banner.sync-top { top: calc(env(safe-area-inset-top, 0px) + 10px) !important; bottom: auto !important; max-width: 520px; margin: 0 auto; }
@media (min-width: 700px) { #sync-banner { max-width: 520px; margin: 0 auto; } }
/* Hide the scoreboard competition line until a competition is chosen */
.sb-header:has(.sb-comp:empty) { display:none; }

/* ── ICONS ── one stroke set, sized to the text around it */
.ic { width:1.15em; height:1.15em; flex:none; display:inline-block; vertical-align:-0.2em; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
.ic-green  { color:#4ade80; }
.ic-red    { color:#f87171; }
.ic-amber  { color:#f59e0b; }
.ic-yellow { color:#facc15; }
.ic-blue   { color:#60a5fa; }
.ic-gold   { color:#f5a623; }
.ic-silver { color:#cbd5e1; }
.ic-bronze { color:#d08b4f; }
.ic-card.ic-red { color:#ef4444; }
.ic-card.ic-black { color:#0b0b0b; }
.ic-card.ic-black rect { stroke:rgba(255,255,255,0.55); stroke-width:1.2; }

/* Action sheet (match card ⋯ menu) */
.action-sheet { background:var(--panel2); border:1px solid var(--border); border-bottom:none; border-radius:20px 20px 0 0; padding:12px 12px calc(16px + var(--safe-bottom)); width:100%; max-width:480px; transform:translateY(100%); transition:transform 0.28s cubic-bezier(0.22,1,0.36,1); }
.modal-overlay.open .action-sheet { transform:translateY(0); }
.as-title { font-family:'Oswald',sans-serif; font-size:16px; font-weight:600; color:var(--cream); padding:0 8px 10px; }
.as-item { display:flex; align-items:center; gap:14px; width:100%; min-height:50px; padding:0 12px; background:none; border:none; border-radius:10px; color:var(--cream); font-family:'Inter',sans-serif; font-size:16px; text-align:left; cursor:pointer; }
.as-item .ic { width:22px; height:22px; color:var(--red-light); }
.as-item:active, .as-item:hover { background:rgba(255,255,255,0.05); }
.as-item.danger, .as-item.danger .ic { color:#f87171; }
.as-sep { height:1px; background:rgba(255,255,255,0.08); margin:6px 8px; }
.as-cancel { width:100%; margin-top:8px; min-height:48px; border-radius:12px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font-family:'Inter',sans-serif; font-size:15px; font-weight:600; cursor:pointer; }

/* Match card: two actions and a ⋯ menu */
.mca-btn { flex:1 1 0; display:inline-flex; align-items:center; justify-content:center; gap:6px; min-height:40px; }
.mca-btn.primary { background:rgba(22,163,74,0.16); border-color:rgba(74,222,128,0.4); color:var(--cream); }
.mca-btn.more { flex:0 0 48px; }
.mca-btn.more .ic { width:20px; height:20px; }
.user-menu .user-menu-trial { background:rgba(245,166,35,0.08); margin-bottom:4px; }
.user-menu .umt-cta { margin-left:auto; background:var(--gold); color:#1a1200; font-weight:700; font-size:12px; padding:4px 9px; border-radius:6px; }

/* ══ RECORD REDESIGN (review phase 3, mock-ups P1–P5) ══════════════════ */
/* P1 · compact clock strip: time, half and minute, then the one button that matters */
#page-record .rec-clock { margin-bottom:12px; background:linear-gradient(180deg,rgba(22,163,74,0.10),rgba(22,163,74,0.03)); }
.rec-clock-row { display:flex; align-items:center; gap:12px; padding:10px 12px; }
#page-record .rec-clock .clock-big { font-size:clamp(34px, 10vw, 44px); letter-spacing:0; }
.rec-clock-info { display:flex; flex-direction:column; gap:3px; min-width:0; }
.rec-clock-info .clock-status-badge { align-self:flex-start; padding:2px 8px; font-size:12px; }
.rec-clock-min { font-size:13px; color:var(--muted); white-space:nowrap; }
.rec-clock-min b { color:var(--cream); font-weight:600; }
#page-record .rec-clock .clock-btns { margin-left:auto; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
#page-record .rec-clock .clock-action-btn, #page-record .rec-clock .btn-end-game, #page-record .rec-clock .btn-halftime { padding:10px 12px; min-height:44px; font-size:14px; }
.rec-half-row { padding:8px 12px 10px; }
.rec-half-hint { font-size:12px; color:var(--muted); }
/* Once the clock is in use the half is set by it, so the manual row steps aside */
#page-record .rec-clock.clock-live .rec-half-row { display:none; }

/* P1 · event tiles: two columns on a phone, label on top, Us | Them with big counts */
#page-record .rec-event-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; }
#page-record .rec-ev-box { border-radius:12px; background:rgba(255,255,255,0.025); }
#page-record .rev-label { display:flex; align-items:center; gap:7px; padding:9px 10px 8px; text-align:left; font-family:'Inter',sans-serif; font-size:14px; font-weight:600; letter-spacing:0; }
#page-record .rev-icon { margin:0; display:flex; color:var(--red-light); }
#page-record .rev-icon .ic { width:18px; height:18px; }
.rev-name { min-width:0; overflow:hidden; text-overflow:ellipsis; }
#page-record .rev-half { display:flex; align-items:center; justify-content:space-between; gap:4px; padding:12px 10px; min-height:58px; font-size:26px; }
.rev-side { font-family:'Inter',sans-serif; font-size:13px; font-weight:500; opacity:0.85; pointer-events:none; }
#page-record .rev-half.away .rev-side { color:#cbd5e1; }
#page-record .rev-half.home .rev-tally { color:#86efac; }
#page-record .rec-ev-box.home-only .rev-half.home { justify-content:space-between; }

/* P1 · the last event, in reach at the bottom of the screen, with Undo */
.rec-last { position:fixed; left:12px; right:12px; bottom:calc(var(--nav-h) + var(--safe-bottom) + 8px); z-index:90; max-width:1140px; margin:0 auto; display:flex; align-items:center; gap:10px; padding:10px 10px 10px 14px; background:rgba(14,22,34,0.97); border:1px solid rgba(96,165,250,0.35); border-radius:14px; box-shadow:0 8px 24px rgba(0,0,0,0.45); }
.rec-last[hidden] { display:none; }
.rec-last-dot { width:10px; height:10px; border-radius:50%; flex:none; background:#94a3b8; }
.rec-last-dot.home { background:#4ade80; }
.rec-last-dot.away { background:#cbd5e1; }
.rec-last-dot.score { background:var(--gold); }
.rec-last-text { flex:1; min-width:0; font-size:14px; font-weight:600; color:var(--cream); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rec-last-undo { flex:none; min-height:40px; padding:0 16px; border-radius:10px; border:1px solid rgba(248,113,113,0.35); background:rgba(248,113,113,0.14); color:#fca5a5; font-family:'Inter',sans-serif; font-size:15px; font-weight:600; cursor:pointer; }
.rec-last-undo:active { background:rgba(248,113,113,0.3); }

/* P2–P5 · every sheet in the recording shows its step and names the team */
.rec-steps { display:flex; align-items:center; flex-wrap:wrap; gap:6px; margin:-4px 0 12px; }
.rec-steps[hidden] { display:none; }
.rec-step { display:inline-flex; align-items:center; gap:5px; padding:5px 11px; border-radius:999px; background:rgba(255,255,255,0.06); color:var(--muted); font-size:13px; font-weight:500; }
.rec-step b { font-weight:700; }
.rec-step.now { background:#15803d; color:#fff; }
.rec-step.done { color:var(--cream); }
.rec-step-sep { color:var(--muted); font-size:14px; }
.rec-sheet .sheet-title { display:flex; align-items:center; flex-wrap:wrap; gap:10px; text-transform:none; letter-spacing:0; font-size:22px; }
.rec-team-chip { display:inline-flex; align-items:center; padding:3px 9px; border-radius:6px; font-family:'Oswald',sans-serif; font-size:13px; font-weight:600; letter-spacing:1px; text-transform:uppercase; max-width:60vw; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.rec-team-chip.home { background:#15803d; color:#fff; }
.rec-team-chip.away { background:#475569; color:#fff; }
.rec-sheet-title { min-width:0; }
.rec-sheet .sheet-sub { font-size:14px; }

/* P2 · shot outcomes grouped: scores in gold, misses in grey (as in the reports) */
.oc-group-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); margin:4px 0 8px; }
.oc-group-label.scored { color:var(--gold); }
.outcome-grid.oc-missed { grid-template-columns:repeat(4, minmax(0,1fr)); margin-bottom:6px; }
.outcome-grid.oc-scored { margin-bottom:14px; }
.oc-scored .outcome-btn { background:rgba(245,166,35,0.12); border-color:rgba(245,166,35,0.55); color:#fcd34d; }
.oc-missed .outcome-btn { background:rgba(255,255,255,0.05); border-color:rgba(255,255,255,0.14); color:var(--cream); }
.rec-sheet .outcome-btn { min-height:84px; }
.rec-sheet .o-icon .ic { width:26px; height:26px; }
.rec-sheet .o-label { font-size:14px; letter-spacing:0.3px; opacity:1; }

/* P3 · kickouts in two columns named for the teams */
.outcome-grid.ko-cols { grid-template-columns:1fr 1fr; gap:10px; }
.ko-head { font-family:'Oswald',sans-serif; font-size:15px; letter-spacing:1px; text-transform:uppercase; text-align:center; padding:2px 0; }
.ko-head.home { color:#4ade80; }
.ko-head.away { color:#cbd5e1; }
.ko-btn { min-height:66px !important; gap:2px !important; }
.ko-btn .o-label { font-family:'Oswald',sans-serif; font-size:16px !important; letter-spacing:1px !important; text-transform:uppercase; }
.ko-sub { font-family:'Inter',sans-serif; font-size:13px; font-weight:400; opacity:0.85; }
.ko-btn.home { background:rgba(22,163,74,0.14); border-color:rgba(74,222,128,0.45); color:#86efac; }
.ko-btn.away { background:rgba(255,255,255,0.05); border-color:rgba(255,255,255,0.16); color:var(--cream); }

/* P4 · the last three players for this team, one tap away */
.pp-recent-label { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); margin:0 0 8px; }
.pp-recent { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:12px; }
.pp-recent-btn { display:inline-flex; align-items:center; gap:8px; min-height:48px; padding:5px 14px 5px 5px; border-radius:999px; border:1px solid rgba(74,222,128,0.45); background:rgba(22,163,74,0.12); color:var(--cream); font-family:'Inter',sans-serif; font-size:15px; font-weight:600; cursor:pointer; }
.pp-recent-btn.away { border-color:rgba(203,213,225,0.35); background:rgba(255,255,255,0.05); }
.pp-recent-num { width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:#15803d; color:#fff; font-family:'Oswald',sans-serif; font-size:16px; font-weight:700; }
.pp-recent-btn.away .pp-recent-num { background:#475569; }
.pp-recent-btn:active { transform:scale(0.97); }

/* P5 · where: zoomed on the scoring half, with Skip and a whole-pitch toggle */
.loc-actions { display:flex; gap:10px; margin-top:12px; }
.loc-btn { flex:1; min-height:48px; border-radius:12px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font-family:'Inter',sans-serif; font-size:15px; font-weight:600; cursor:pointer; }
.loc-btn[hidden] { display:none; }

/* Record sheets get taller on phones so the pitch and grids fit */
.rec-sheet { max-height:92vh; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
@media (min-width: 820px) {
  #page-record .rec-event-grid { grid-template-columns:repeat(3, minmax(0,1fr)); }
}
@media (min-width: 1100px) {
  #page-record .rec-event-grid { grid-template-columns:repeat(4, minmax(0,1fr)); }
}
.rec-clock-info .clock-status-badge { white-space:nowrap; }
#page-record .rec-clock .clock-btns { flex-wrap:nowrap; }
#page-record .rec-clock .btn-pause, #page-record .rec-clock .clock-btns .btn-start:not(:first-child) { padding:10px 12px; }
@media (max-width: 380px) { #page-record .rec-clock .clock-big { font-size:30px; } }

/* The last-event bar is pinned above the nav only while Record is showing; leave room for it */
#page-record:not(.active) .rec-last { display:none; }
#page-record.active:has(.rec-last:not([hidden])) { padding-bottom:78px; }

/* ── SQUAD STATS TABLE (review phase 3) ── */
.pst-hint { font-size:13px; color:var(--muted); margin:0 0 10px; line-height:1.45; }
.pst-hint b { color:var(--cream); font-weight:600; }
.pst-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; border:1px solid var(--border); border-radius:12px; background:rgba(255,255,255,0.02); }
.pst { width:100%; border-collapse:separate; border-spacing:0; font-variant-numeric:tabular-nums; }
.pst th, .pst td { padding:0; text-align:right; white-space:nowrap; border-bottom:1px solid rgba(255,255,255,0.06); }
.pst td { padding:12px 10px; font-size:15px; color:var(--cream); }
.pst thead th { position:sticky; top:0; background:#0d1a12; z-index:2; }
.pst thead th button { width:100%; padding:10px; background:none; border:none; color:var(--muted); font-family:'Inter',sans-serif; font-size:13px; font-weight:600; text-align:right; cursor:pointer; white-space:nowrap; }
.pst thead th[aria-sort="ascending"] button, .pst thead th[aria-sort="descending"] button { color:var(--red-light); }
.pst .pst-name { position:sticky; left:0; z-index:1; text-align:left; background:#0b160f; box-shadow:1px 0 0 rgba(255,255,255,0.08); }
.pst thead .pst-name { z-index:3; background:#0d1a12; }
.pst thead .pst-name button { text-align:left; }
.pst tbody .pst-name button { display:flex; align-items:center; gap:8px; width:100%; min-height:48px; padding:6px 12px 6px 10px; background:none; border:none; color:var(--cream); font-family:'Inter',sans-serif; font-size:15px; font-weight:600; text-align:left; cursor:pointer; max-width:46vw; overflow:hidden; text-overflow:ellipsis; }
.pst-num { flex:none; width:28px; height:28px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:rgba(22,163,74,0.2); color:#86efac; font-family:'Oswald',sans-serif; font-size:14px; }
.pst-sub { color:var(--muted); font-size:13px; }
.pst-impact { font-weight:700; color:var(--muted); }
.pst-impact.pos { color:#4ade80; }
.pst-impact.neg { color:#f87171; }
.pst-row { cursor:pointer; }
.pst-row:hover td, .pst-row:hover .pst-name { background:rgba(74,222,128,0.05); }
.pst-row.open td, .pst-row.open .pst-name { background:rgba(74,222,128,0.09); }
.pst-card-row td { padding:10px; text-align:left; white-space:normal; }
.pst-card-row .player-stat-card { position:sticky; left:10px; max-width:calc(100vw - 54px); margin:0; }
@media (min-width: 820px) { .pst-card-row .player-stat-card { max-width:640px; } }

/* ══ iPAD LAYOUTS (review phase 4) ═════════════════════════════════════ */
/* Record rail: invisible on phones — its parts sit in the page as before */
.rec-rail { display:contents; }
.rec-feed { display:none; }

/* Panels on a tablet open as centred cards rather than phone-width strips */
@media (min-width: 820px) {
  .modal-overlay, .detail-modal-overlay, .picker-overlay { align-items:center; padding:24px; }
  .modal-overlay > *, .detail-modal-overlay > *, .picker-overlay > * {
    width:min(680px, 92vw) !important; max-width:680px !important;
    border-radius:20px !important; border-bottom:1px solid var(--border) !important;
    max-height:88vh; overflow-y:auto; -webkit-overflow-scrolling:touch;
    padding-bottom:20px !important;
    box-shadow:0 24px 60px rgba(0,0,0,0.55);
  }
  .modal-overlay > .action-sheet { width:min(460px, 92vw) !important; }
  .sheet-title { font-size:20px; }
  .sheet-sub { font-size:14px; }
  /* Pages: a readable measure, not the full width of the screen */
  #page-stats.active, #page-trends.active { max-width:880px; }
  #history-list { display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:14px; align-items:start; }
  #history-list > .match-card { margin-bottom:0; }
  #history-list > :not(.match-card) { grid-column:1 / -1; }
  /* Sign-in: a proper card, not a stretched phone form */
  #login-screen > div { max-width:440px !important; }
  #login-screen input { font-size:17px !important; min-height:52px; }
}

/* iPad landscape: Record as two panels (mock-up T2) */
@media (min-width: 1024px) and (orientation: landscape) {
  #page-record.active { display:grid; grid-template-columns:320px minmax(0,1fr); column-gap:20px; align-items:start; max-width:none; padding:14px 20px; }
  #page-record > * { grid-column:2; }
  #page-record > .rec-rail { grid-column:1; grid-row:1 / span 40; display:flex; flex-direction:column; gap:12px; position:sticky; top:0; height:calc(100dvh - var(--nav-h) - var(--safe-bottom) - 104px); padding-bottom:78px; box-sizing:border-box; }
  #page-record .rec-rail .rec-clock { margin-bottom:0; }
  #page-record .rec-rail .rec-clock-row { flex-wrap:wrap; }
  #page-record .rec-rail .rec-clock .clock-btns { width:100%; margin-left:0; justify-content:stretch; }
  #page-record .rec-rail .rec-clock .clock-btns > * { flex:1; justify-content:center; }
  .rec-feed { display:flex; flex-direction:column; min-height:0; flex:1; }
  .rec-feed-title { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:1px; text-transform:uppercase; color:var(--red-light); margin:4px 2px 8px; }
  .rec-feed-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; overflow-y:auto; min-height:0; }
  .rec-feed-list li { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; background:rgba(255,255,255,0.04); font-size:14px; color:var(--cream); }
  .rec-feed-list .rf-min { width:30px; flex:none; color:var(--muted); font-variant-numeric:tabular-nums; }
  .rec-feed-list .rf-text { flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-weight:500; }
  .rec-feed-list .rf-team { flex:none; font-size:12px; color:var(--muted); }
  .rec-feed-list .rf-empty { color:var(--muted); font-style:italic; background:none; }
  /* The last event and Undo sit at the foot of the rail */
  .rec-last { left:20px; right:auto; width:320px; max-width:none; margin:0; }
  /* Bigger targets: the grid has the whole right side */
  #page-record .rec-event-grid { grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px; }
  #page-record .rev-half { min-height:84px; font-size:32px; }
  #page-record .rev-label { font-size:15px; }
  /* Recording panels slide in over the rail, so the grid and score stay in view (T3) */
  .modal-overlay:has(> .rec-sheet) { align-items:stretch; justify-content:flex-start; padding:0; background:rgba(0,0,0,0.35); }
  .modal-overlay > .rec-sheet {
    width:380px !important; max-width:380px !important; max-height:none; height:100%;
    border-radius:0 18px 18px 0 !important; border:1px solid var(--border) !important; border-left:none !important;
    padding:calc(14px + env(safe-area-inset-top, 0px)) 16px 20px !important;
    transform:translateX(-100%); -webkit-transform:translateX(-100%);
  }
  .modal-overlay.open > .rec-sheet { transform:translateX(0); -webkit-transform:translateX(0); }
  .rec-sheet .outcome-grid.oc-missed { grid-template-columns:1fr 1fr; }
  .rec-sheet .sheet-handle { display:none; }
}

/* Sign-in comes first; the install tip follows it (review: it competed with the form) */
#login-screen > div { display:flex; flex-direction:column; }
#login-screen #install-prompt { order:10; margin:20px 0 0 !important; }

/* Tactics editor, iPad landscape: tools | pitch | steps, options and notes */
@media (min-width: 1024px) and (orientation: landscape) {
  #tactics-board.editing .tb-shell { max-width:1180px; padding:calc(12px + env(safe-area-inset-top,0px)) 20px 16px; }
  #tactics-board.editing #tactics-editor-view {
    display:grid; grid-template-columns:92px auto minmax(260px, 1fr); column-gap:18px;
    grid-template-rows:auto auto auto auto auto auto 1fr; align-items:start;
  }
  #tactics-board.editing #tactics-editor-view > * { grid-column:3; }
  #tactics-board.editing #tactics-editor-view > .tb-topbar { grid-column:1 / -1; grid-row:1; }
  #tactics-board.editing #tactics-editor-view > .tb-tools { grid-column:1; grid-row:2 / -1; display:flex !important; flex-direction:column; gap:6px; margin-top:0; }
  #tactics-board.editing #tactics-editor-view > .tb-tools .tb-tool-btn { min-height:64px; }
  #tactics-board.editing #tactics-editor-view > .tb-pitch-wrap { grid-column:2; grid-row:2 / -1; width:auto; height:calc(100dvh - 96px - env(safe-area-inset-top,0px)); aspect-ratio:320/480; margin:0; }
  #tactics-board.editing #tactics-editor-view > .tb-steps { grid-row:2; flex-wrap:wrap; }
  #tactics-board.editing #tactics-editor-view > .tb-chips { grid-row:3; margin-top:0; }
  #tactics-board.editing #tactics-editor-view > .tb-sub { grid-row:4; }
  #tactics-board.editing #tactics-editor-view > #tactic-notes-input { grid-row:5; min-height:120px; }
  #tactics-board.editing #tactics-editor-view > .btn-save-player { grid-row:6; }
}

/* Settings on/off: switches, matching Event settings (review) */
.switch-input { -webkit-appearance:none; appearance:none; flex:none; width:50px; height:30px; margin:0; border-radius:15px; background:#334155; position:relative; cursor:pointer; transition:background 0.15s; }
.switch-input::after { content:''; position:absolute; top:3px; left:3px; width:24px; height:24px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,0.4); transition:left 0.15s; }
.switch-input:checked { background:#15803d; }
.switch-input:checked::after { left:23px; }
.switch-input:focus-visible { outline:2px solid #4ade80; outline-offset:2px; }

/* Help as searchable topics (review) */
.help-search { margin:0 0 10px; }
.help-search input { width:100%; box-sizing:border-box; min-height:48px; padding:0 14px; border-radius:12px; border:1px solid var(--border); background:rgba(255,255,255,0.05); color:var(--cream); font-family:'Inter',sans-serif; font-size:16px; }
.help-topics { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
.help-topics[hidden], .help-noresults[hidden], .help-row[hidden], .help-section[hidden] { display:none !important; }
.help-topic { display:inline-flex; align-items:center; gap:6px; min-height:38px; padding:0 12px; border-radius:999px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font-family:'Inter',sans-serif; font-size:14px; cursor:pointer; }
.help-topic .ic { color:var(--red-light); }
.help-noresults { padding:18px 6px; color:var(--muted); font-size:14px; text-align:center; }
.help-section { margin-bottom:10px; }
.help-section-title { display:flex; align-items:center; gap:8px; min-height:48px; box-sizing:border-box; padding:12px 14px !important; font-size:14px !important; cursor:pointer; border-bottom:none !important; }
.help-section-title::after { content:''; margin-left:auto; width:8px; height:8px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg); transition:transform 0.15s; opacity:0.8; }
.help-section.open .help-section-title::after { transform:rotate(-135deg); }
.help-section:not(.open) .help-row { display:none; }
.help-section.open .help-section-title { border-bottom:1px solid rgba(255,255,255,0.06) !important; }
/* Question above answer, not a cramped two-column table */
.help-row { display:block; padding:11px 14px; }
.help-key { display:block; width:auto; white-space:normal; font-family:'Inter',sans-serif; font-size:15px; font-weight:600; letter-spacing:0; margin-bottom:3px; }
.help-val { display:block; font-size:14px; line-height:1.55; }
.squad-more-btn { grid-column:1 / -1; min-height:46px; border-radius:12px; border:1px dashed var(--border); background:none; color:var(--muted); font-family:'Inter',sans-serif; font-size:14px; cursor:pointer; }
.squad-more-btn:hover { color:var(--cream); border-color:rgba(74,222,128,0.5); }

/* Full-screen panels: keep headers and Close/Back buttons below the iPhone
   status bar and Dynamic Island (iOS app and home-screen web app). */
#club-dashboard, #trial-grading-screen { padding-top: env(safe-area-inset-top, 0px); }
#club-screen { padding-top: calc(24px + env(safe-area-inset-top, 0px)) !important; }
#tactics-board:not(.editing) .tb-shell { padding-top: calc(16px + env(safe-area-inset-top, 0px)); }
#video-analysis-overlay { padding-top: env(safe-area-inset-top, 0px); }
#video-analysis-overlay .va-back-btn { min-height: 40px; padding-left: 12px; padding-right: 12px; }
/* Close buttons easier to see and tap */
.panel-close-btn { background: rgba(255,255,255,0.1) !important; border: 1px solid rgba(255,255,255,0.22) !important; color: #f0fdf4 !important; min-height: 40px; padding: 8px 14px !important; font-size: 13px !important; }

/* The club screen and tactics board are full-screen panels (z-index 9998).
   While one is open, pop-up sheets and messages must sit above it, or they
   open out of sight (e.g. the trial ⋯ menu with Delete Trial). */
body.panel-open .modal-overlay, body.panel-open .detail-modal-overlay { z-index: 9999; }
body.panel-open .picker-overlay { z-index: 10000; }
body.panel-open #sync-banner, body.panel-open #undo-toast { z-index: 10001 !important; }

/* Automatic attack tag on a timeline event */
.att-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px; font-size: 11px; letter-spacing: 0.2px; background: rgba(74,222,128,0.12); color: #86efac; border: 1px solid rgba(74,222,128,0.25); white-space: nowrap; }

/* ── Possession bar (Record screen) ───────────────────────────── */
.poss-bar { padding:0 12px 10px; }
.pb-track { display:flex; height:30px; border-radius:15px; overflow:hidden; border:1px solid var(--border); background:rgba(255,255,255,0.04); }
.pb-side { flex:1 1 50%; min-width:64px; display:flex; align-items:center; gap:6px; padding:0 12px; border:0; font:inherit; font-size:13px; font-weight:700; cursor:pointer; transition:flex-basis .4s ease, background .2s; position:relative; -webkit-tap-highlight-color:transparent; }
.pb-side.home { justify-content:flex-start; background:rgba(22,163,74,0.55); color:#fff; }
.pb-side.away { justify-content:flex-end; background:rgba(226,232,240,0.16); color:var(--cream); }
.pb-side:active { filter:brightness(1.25); }
.pb-name { font-weight:600; opacity:.85; }
.pb-pct { font-variant-numeric:tabular-nums; }
/* the team on the ball now */
.pb-side.has-ball::after { content:''; width:9px; height:9px; border-radius:50%; background:#facc15; box-shadow:0 0 0 3px rgba(250,204,21,0.25); flex:none; }
.pb-side.home.has-ball::after { order:-1; }
.pb-side.away.has-ball::after { order:3; }
.poss-bar[data-state="empty"] .pb-side { flex-basis:50%; }
.poss-bar[data-state="empty"] .pb-pct { display:none; }
.pb-note { margin-top:5px; font-size:11.5px; color:var(--muted); text-align:center; }

/* Trends: possession detail rows (count, scored from, average length) */
.poss-detail { margin:10px 0 14px; border-top:1px solid var(--border); padding-top:8px; display:grid; gap:4px; }
.poss-detail > div { display:grid; grid-template-columns:1fr auto 1fr; align-items:baseline; gap:8px; font-size:13px; }
.poss-detail b { font-variant-numeric:tabular-nums; font-size:15px; }
.poss-detail b:first-child { color:var(--green-light, #4ade80); }
.poss-detail b:last-child { text-align:right; }
.poss-detail span { color:var(--muted); font-size:12px; text-align:center; }
#stats-body td.stats-note { font-size:12px; color:var(--muted); text-align:center; font-style:italic; padding:6px 8px; white-space:normal; }

/* ── Player touches strip (Record screen) ─────────────────────── */
.touch-strip { margin:0 0 12px; padding:8px 8px 10px; border:1px solid var(--border); border-radius:14px; background:rgba(22,163,74,0.06); }
.ts-head { display:flex; align-items:baseline; justify-content:space-between; gap:8px; padding:0 4px 6px; }
.ts-head span { font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--green-light, #4ade80); }
.ts-head small { font-size:11.5px; color:var(--muted); text-align:right; }
.ts-grid { display:grid; grid-template-columns:repeat(8, minmax(0,1fr)); gap:5px; }
.ts-chip { position:relative; min-height:50px; padding:5px 2px 4px; border-radius:10px; border:1px solid rgba(22,163,74,0.35);
  background:rgba(22,163,74,0.16); color:var(--cream); font:inherit; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:1px; cursor:pointer; -webkit-tap-highlight-color:transparent; touch-action:manipulation; transition:transform .08s, background .2s; }
.ts-chip:active { transform:scale(.94); background:rgba(22,163,74,0.4); }
.ts-chip b { font-size:17px; line-height:1; font-variant-numeric:tabular-nums; }
.ts-chip span { font-size:10px; line-height:1.15; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; opacity:.85; }
.ts-chip i { position:absolute; top:-5px; right:-3px; min-width:16px; height:16px; padding:0 4px; border-radius:8px; background:#facc15; color:#111;
  font-style:normal; font-size:10px; font-weight:800; line-height:16px; text-align:center; }
.ts-chip em { position:absolute; top:2px; left:4px; font-style:normal; font-size:10px; color:#4ade80; font-weight:800; }
.ts-chip.on-yellow { box-shadow:inset 0 0 0 2px #facc15; }
.ts-chip.on-black { box-shadow:inset 0 0 0 2px #e5e7eb; }
.ts-chip.off, .ts-chip:disabled { opacity:.35; cursor:default; transform:none; }
.ts-chip.them { background:rgba(226,232,240,0.12); border-color:rgba(226,232,240,0.3); }
.ts-chip.them b { font-size:13px; }
.ts-chip.hit { animation:tsHit .35s ease; }
.ts-chip.fresh { animation:tsFresh 1.2s ease 3; }
@keyframes tsHit { 0% { background:#15803d; } 100% { background:rgba(22,163,74,0.16); } }
@keyframes tsFresh { 0%,100% { box-shadow:0 0 0 0 rgba(74,222,128,0); } 50% { box-shadow:0 0 0 3px rgba(74,222,128,0.7); } }
@media (min-width: 900px) { .ts-grid { grid-template-columns:repeat(16, minmax(0,1fr)); } }
.evs-touch { margin-top:8px; }
.evs-touch .evs-info small { white-space:normal; line-height:1.35; }

/* The downloadable guide describes web prices and card payment, which the
   App Store and Google Play don't allow inside their apps. In-app Help covers
   everything else. */
.native-app .help-download-card { display: none; }
.native-app .web-only-inline { display: none; }

/* Quick tag (Record screen): saves events on the outcome tap */
.quick-tag-btn { margin-left:auto; min-height:44px; padding:0 14px; border-radius:22px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.5px; cursor:pointer; }
.quick-tag-btn.on { background:rgba(250,204,21,0.16); border-color:rgba(250,204,21,0.6); color:#fde68a; }
.pp-unknown { min-height:44px; }

/* ── Sprint 2: contrast and touch targets on the match screens ── */
.btn-start { background:linear-gradient(135deg,#14532d,#15803d); }
.clock-action-btn, .half-btn, .kw-skip, .pp-opp, .et-picker-btn, .record-stats-btn, #undo-toast button { min-height:44px; }
.half-btn { min-width:48px; border-color:rgba(74,222,128,0.45); color:var(--green); }
.kw-skip { color:var(--cream); border-color:rgba(240,253,244,0.25); }
.meta-row select, .meta-row input { border-color:rgba(240,253,244,0.22); }
/* Time-up prompt (half length reached) */
.half-up { position:fixed; left:12px; right:12px; top:calc(env(safe-area-inset-top, 0px) + 10px); z-index:10002; max-width:520px; margin:0 auto; display:flex; align-items:center; gap:8px; padding:10px 12px; border-radius:12px; background:#1c1407; border:1px solid rgba(250,204,21,0.6); color:#fde68a; font-family:'Oswald',sans-serif; font-size:15px; letter-spacing:0.3px; box-shadow:0 6px 24px rgba(0,0,0,0.5); }
.half-up span { flex:1; }
.half-up button { min-height:44px; padding:0 14px; border-radius:10px; font-family:'Oswald',sans-serif; font-size:14px; font-weight:600; cursor:pointer; }
.half-up-go { background:var(--btn-green); color:#fff; border:none; }
.half-up-x { background:transparent; color:#fde68a; border:1px solid rgba(250,204,21,0.5); }
/* Login: scroll instead of clipping on short phones / with the keyboard up */
#login-screen { overflow-y:auto; -webkit-overflow-scrolling:touch; justify-content:flex-start !important; padding-top:calc(env(safe-area-inset-top, 0px) + 24px) !important; padding-bottom:calc(env(safe-area-inset-bottom, 0px) + 24px) !important; }
#login-screen > div:first-child { margin-top:auto; margin-bottom:auto; flex-shrink:0; }

/* ── Sprint 3: edit events, tag later, More, two-tap subs ── */
.rec-last-text { flex:1; min-width:0; background:none; border:0; padding:6px 0; text-align:left; color:var(--cream); font-family:inherit; font-size:14px; font-weight:600; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-height:44px; }
.rec-last-text::after { content:' ✎'; color:#93c5fd; }
.event-edit-btn { background:none; border:0; padding:8px 0; text-align:left; cursor:pointer; min-height:44px; font-family:inherit; }
.event-edit-btn:hover, .event-edit-btn:focus-visible { color:#fff; text-decoration:underline; text-underline-offset:3px; }
.rf-row { display:flex; align-items:center; gap:8px; width:100%; background:none; border:0; padding:0; color:inherit; font:inherit; text-align:left; cursor:pointer; }
.tag-queue-btn { min-height:44px; padding:0 14px; border-radius:22px; border:1px solid rgba(96,165,250,0.55); background:rgba(59,130,246,0.14); color:#bfdbfe; font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.5px; cursor:pointer; }
.tag-queue-btn[hidden] { display:none; }
.ee-row { display:flex; align-items:center; gap:10px; width:100%; min-height:52px; padding:10px 12px; margin-bottom:8px; border-radius:10px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font:inherit; text-align:left; cursor:pointer; }
.ee-row[disabled] { cursor:default; opacity:0.7; }
.ee-row.open { border-color:rgba(74,222,128,0.6); background:rgba(22,163,74,0.10); }
.ee-k { width:96px; flex:none; font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.4px; color:var(--muted); text-transform:uppercase; }
.ee-v { flex:1; min-width:0; font-size:15px; font-weight:600; }
.ee-go { color:var(--muted); font-size:20px; }
.ee-panel { margin:-2px 0 12px; padding:10px; border-radius:10px; background:rgba(0,0,0,0.25); }
.ee-outcomes { display:flex; flex-wrap:wrap; gap:8px; }
.ee-chip { min-height:44px; padding:0 14px; border-radius:22px; border:1px solid var(--border); background:rgba(255,255,255,0.05); color:var(--cream); font-family:'Oswald',sans-serif; font-size:14px; cursor:pointer; }
.ee-chip.on { background:var(--btn-green); border-color:var(--btn-green); color:#fff; }
.ee-time { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.ee-step { width:48px; height:48px; border-radius:24px; border:1px solid var(--border); background:rgba(255,255,255,0.06); color:var(--cream); font-size:24px; cursor:pointer; }
.ee-min { min-width:56px; text-align:center; font-family:'Oswald',sans-serif; font-size:24px; font-weight:700; }
.ee-delete { width:100%; min-height:48px; margin-top:6px; border-radius:10px; border:1px solid rgba(248,113,113,0.5); background:rgba(220,38,38,0.10); color:#fca5a5; font-family:'Oswald',sans-serif; font-size:14px; letter-spacing:0.4px; cursor:pointer; }
.tq-tabs { display:flex; gap:8px; margin-bottom:12px; }
.tq-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.tq-list li { display:flex; gap:8px; }
.tq-item { flex:1; min-width:0; display:flex; align-items:center; gap:10px; min-height:52px; padding:8px 12px; border-radius:10px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font:inherit; text-align:left; cursor:pointer; }
.tq-min { font-family:'Oswald',sans-serif; font-weight:700; color:var(--muted); width:34px; flex:none; }
.tq-text { flex:1; min-width:0; font-size:14px; }
.tq-go { color:#93c5fd; font-family:'Oswald',sans-serif; font-size:13px; white-space:nowrap; }
.tq-skip { flex:none; min-width:64px; min-height:52px; border-radius:10px; border:1px solid var(--border); background:transparent; color:var(--muted); font-family:'Oswald',sans-serif; font-size:13px; cursor:pointer; }
.rec-more-tile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-height:100%; padding:10px; color:var(--cream); font:inherit; cursor:pointer; border-style:dashed !important; }
.rmt-plus { font-size:22px; line-height:1; color:var(--green); }
.rmt-label { font-family:'Oswald',sans-serif; font-size:16px; font-weight:600; }
.rmt-names { font-size:11px; color:var(--muted); text-align:center; line-height:1.3; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.more-grid { display:grid !important; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:10px; }
.more-grid .rev-label { display:flex; align-items:center; gap:7px; padding:9px 10px 8px; font-size:14px; font-weight:600; }
.more-grid .rev-half { display:flex; align-items:center; justify-content:space-between; min-height:56px; padding:10px; font-size:24px; }
.more-grid .rev-side { font-size:13px; font-weight:500; }
.btn-sub { background:rgba(59,130,246,0.18); border:1px solid rgba(96,165,250,0.6) !important; color:#dbeafe; }
.qs-bench { display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:8px; margin-bottom:10px; }
/* Once the clock runs the "set the half" row isn't needed on Record */
#page-record .rec-clock.clock-live .rec-half-row { display:none; }
/* Phone: tighter tiles so the whole grid fits one screen */
@media (max-width: 699px) {
  #page-record .rec-event-grid { gap:8px; }
  #page-record .rev-label { padding:6px 10px 5px; font-size:13px; }
  #page-record .rev-half { min-height:48px; padding:6px 10px; font-size:23px; }
  #page-record .rec-legend { margin-bottom:8px; }
  #page-record .rec-clock { margin-bottom:8px; }
}
/* Phone, match on: clock and minute on one line, the three match buttons
   (whistle, pause, Sub) as an even row underneath */
@media (max-width: 699px) {
  #page-record .rec-clock.clock-live .rec-clock-row { flex-wrap:wrap; row-gap:8px; }
  #page-record .rec-clock.clock-live .clock-status-badge { display:none; }
  #page-record .rec-clock.clock-live .clock-btns { flex:1 1 100%; margin-left:0; display:grid; grid-template-columns:2fr 1fr 1fr; gap:8px; }
  #page-record .rec-clock.clock-live .clock-btns > button { width:100%; justify-content:center; }
  #page-record .rec-clock.clock-live .clock-btns > button:only-child { grid-column:1 / -1; }
}
/* Phone: three tiles across, Us/Them stacked over the count, so a full
   default set (12 events) fits one screen during a match */
@media (min-width: 340px) and (max-width: 699px) {
  #page-record .rec-event-grid:not(.more-grid) { grid-template-columns:repeat(3, minmax(0,1fr)); gap:7px; }
  #page-record .rec-event-grid:not(.more-grid) .rev-label { padding:6px 6px 4px; font-size:12px; gap:4px; }
  #page-record .rec-event-grid:not(.more-grid) .rev-icon { flex:none; }
  #page-record .rec-event-grid:not(.more-grid) .rev-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
  #page-record .rec-event-grid:not(.more-grid) .rev-half { flex-direction:column; justify-content:center; align-items:center; gap:0; min-height:52px; padding:4px 2px; font-size:22px; line-height:1.05; }
  #page-record .rec-event-grid:not(.more-grid) .rev-side { font-size:11px; font-weight:600; letter-spacing:0.3px; }
  #page-record .rec-event-grid:not(.more-grid) .rec-ev-box.home-only .rev-half.home { justify-content:center; }
  #page-record .rec-more-tile .rmt-names { -webkit-line-clamp:3; font-size:10.5px; }
}
@media (min-width: 340px) and (max-width: 699px) {
  #page-record .rec-event-grid:not(.more-grid) .rev-icon { display:none; }
  #page-record .rec-event-grid:not(.more-grid) .rev-label { justify-content:center; text-align:center; font-size:12px; letter-spacing:-0.1px; padding:6px 4px 4px; }
}
.ee-static { cursor:default; }
.ee-static .ee-outcomes { display:flex; gap:8px; flex-wrap:wrap; }
/* Sin bin: players on the pitch and countdowns, on the Record clock card */
.sinbin-strip { display:flex; flex-wrap:wrap; align-items:center; gap:6px; padding:0 12px 10px; }
.sinbin-strip[hidden] { display:none; }
.sb-count { font-family:'Oswald',sans-serif; font-size:14px; color:var(--cream); margin-right:4px; }
.sb-chip { display:inline-flex; align-items:center; gap:4px; min-height:30px; padding:0 10px; border-radius:15px; background:rgba(15,23,42,0.85); border:1px solid rgba(203,213,225,0.45); color:#e2e8f0; font-family:'Oswald',sans-serif; font-size:13px; font-variant-numeric:tabular-nums; }
.sb-chip.off { border-color:rgba(248,113,113,0.6); color:#fecaca; }
/* Free scorer tier */
.pw-free { display:block; width:100%; max-width:420px; margin:10px auto 0; min-height:48px; border-radius:12px; border:1px solid rgba(240,253,244,0.35); background:transparent; color:var(--cream); font-family:'Oswald',sans-serif; font-size:15px; letter-spacing:0.4px; cursor:pointer; }
body.free-tier .paid-lock::after { content:' 🔒'; font-size:0.85em; }
/* Analysis: Stats | Trends switch at the top of both views */
.analysis-switch { display:flex; gap:6px; padding:4px; margin:0 0 12px; border-radius:12px; background:rgba(255,255,255,0.04); border:1px solid var(--border); }
.as-btn { flex:1; min-height:44px; border-radius:9px; border:0; background:transparent; color:var(--muted); font-family:'Oswald',sans-serif; font-size:15px; letter-spacing:0.4px; cursor:pointer; }
.as-btn.on { background:var(--btn-green); color:#fff; }
/* Coaching hub */
.coach-grid { display:flex; flex-direction:column; gap:10px; padding-bottom:8px; }
.coach-tile { display:flex; align-items:center; gap:14px; width:100%; min-height:64px; padding:12px 14px; border-radius:12px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); text-align:left; cursor:pointer; font:inherit; }
.ct-icon { font-size:26px; flex:none; }
.ct-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ct-title { font-family:'Oswald',sans-serif; font-size:16px; letter-spacing:0.3px; }
.ct-sub { font-size:13px; color:var(--muted); }
body.free-tier .coach-tile .ct-title::after { content:' 🔒'; font-size:0.8em; }
.brand-swatch { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); }
.brand-swatch input[type=color] { width:48px; height:44px; border:1px solid var(--border); border-radius:10px; background:transparent; padding:2px; cursor:pointer; }
.score-graphic-btn { display:block; width:100%; min-height:48px; margin:10px 0 4px; border-radius:12px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font-family:'Oswald',sans-serif; font-size:15px; letter-spacing:0.3px; cursor:pointer; }

/* Staging site: a strip across the top so nobody mistakes it for the live app */
html.cs-staging body::before { content: 'STAGING — test data'; position: fixed; top: 0; left: 0; right: 0; z-index: 99999; background: #b45309; color: #fff; font: 600 11px/18px 'Oswald', sans-serif; letter-spacing: 1px; text-align: center; pointer-events: none; }

/* Field captions are real <label>s now (screen readers read them with the field) */
label.tr-meta-label, label.edit-label, label.nva-label, label.pws-label { display:block; }

/* ── DESKTOP: navigation as a rail down the left (plan item 41) ──
   On a laptop or desktop the five tabs sit in a column on the left instead of
   a bar stretched across the bottom of a wide screen. */
@media (min-width: 1100px) and (hover: hover) and (pointer: fine) {
  :root { --nav-h: 0px; --rail-w: 96px; }
  .bottom-nav { top: 0; bottom: 0; right: auto; width: var(--rail-w); height: auto; padding: 96px 0 0; flex-direction: column; justify-content: flex-start; gap: 6px; border-top: none; border-right: 1px solid var(--border); }
  .bottom-nav .nav-btn { flex: 0 0 auto; height: 72px; }
  .topbar { padding-left: calc(var(--rail-w) + 16px); }
  .scroll-area { margin-left: var(--rail-w); padding-bottom: 24px; }
}

/* Keyboard focus is always visible (mouse and touch taps don't show it) */
:focus-visible { outline: 2px solid #4ade80; outline-offset: 2px; }

/* Video: recorded match events lined up with the video (plan item 46) */
.va-sync { background:rgba(255,255,255,0.03); border:1px solid var(--border); border-radius:10px; padding:10px; margin:8px 0; }
.va-sync-row { display:flex; align-items:center; gap:6px; margin-bottom:6px; flex-wrap:wrap; }
.va-sync-name { flex:1; min-width:120px; font-size:13px; color:var(--cream); }
.va-sync-time { font-family:'Oswald',sans-serif; font-size:15px; color:var(--red-light); min-width:52px; text-align:right; }
.va-sync-hint { font-size:12px; color:var(--muted); line-height:1.5; }
.va-mini { min-height:36px; padding:4px 10px; border-radius:8px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font-size:12px; cursor:pointer; }
.va-mini-strong { background:var(--btn-green); border-color:var(--btn-green); color:#fff; }
.va-ev-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:6px 0; }
.va-ev-actions .va-export-btn { margin:0; }
.va-ev-actions .va-export-btn[disabled] { opacity:0.45; cursor:default; }
.va-ev-unplaced { opacity:0.6; }

/* Hurling and camogie: no 2-point arc */
html.code-no-2pt .ob-twoptr { display:none !important; }

.ss-bench-note { font-size:12px; color:var(--muted); line-height:1.6; margin:6px 0 14px; }

/* Second recorder (plan item 42): the helper's phone follows the coach's clock */
.helper-banner { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 14px; background:#1e3a8a; color:#fff; font-size:13px; line-height:1.4; }
.helper-banner button { min-height:36px; padding:4px 14px; border-radius:8px; border:1px solid rgba(255,255,255,0.6); background:transparent; color:#fff; font-weight:600; cursor:pointer; }
html.helper-mode .clock-action-btn, html.helper-mode .half-btn, html.helper-mode #rec-clock-btns-area { display:none !important; }

/* >>> high contrast (generated by scripts/hc-css.py) */
html.cs-hc { --bg:#000; --dark:#000; --panel:#000; --panel2:#0b0b0b; --cream:#fff; --muted:#fff;
  --border:rgba(255,255,255,0.6); --green:#7dffa8; --red-light:#7dffa8; --away-col:#fff; }
html.cs-hc body { background:#000; color:#fff; }
html.cs-hc :focus-visible { outline:3px solid #ffd60a !important; outline-offset:2px; }
/* inline styles in app.html and the screens drawn by the scripts */
html.cs-hc [style*="color:rgba(240,253,244"], html.cs-hc [style*="color: rgba(240,253,244"],
html.cs-hc [style*="color:rgba(245,232,232"], html.cs-hc [style*="color:rgba(255,255,255,0."],
html.cs-hc [style*="color:var(--muted)"] { color:#fff !important; }
html.cs-hc [style*="border:1px solid rgba(255,255,255,0.0"], html.cs-hc [style*="border:1px solid rgba(255,255,255,0.1"],
html.cs-hc [style*="border:1px solid rgba(22,163,74,0.2"], html.cs-hc [style*="border:1px solid rgba(22,163,74,0.3"] { border-color:rgba(255,255,255,0.6) !important; }
html.cs-hc button, html.cs-hc select, html.cs-hc input, html.cs-hc textarea { border-color:rgba(255,255,255,0.6); }
html.cs-hc .tb-match-label,
html.cs-hc .ha-sub,
html.cs-hc .user-menu-bars,
html.cs-hc .user-menu-who,
html.cs-hc .user-menu-ver,
html.cs-hc .clock-meta .min-note,
html.cs-hc .sb-sep,
html.cs-hc .sb-divider,
html.cs-hc .player-num,
html.cs-hc .event-text,
html.cs-hc .empty-note,
html.cs-hc .pw-feature,
html.cs-hc .pw-note,
html.cs-hc .pw-signout,
html.cs-hc .pw-signout:hover,
html.cs-hc .tb-match-label,
html.cs-hc .va-collapse-btn,
html.cs-hc .trends-empty-sub,
html.cs-hc .mcs-divider,
html.cs-hc .squad-empty-name,
html.cs-hc .record-pitch-empty,
html.cs-hc .ts-slot-pos,
html.cs-hc .ts-slot-squadno,
html.cs-hc .ts-slot-name,
html.cs-hc .ts-slot:not(.filled) .ts-slot-name,
html.cs-hc .rpp-circle.empty,
html.cs-hc .record-pitch-player.empty .rpp-name,
html.cs-hc .ts-match-info,
html.cs-hc .ts-player-pos,
html.cs-hc .ts-subs-label,
html.cs-hc .ts-sub-circle,
html.cs-hc .ts-sub-name,
html.cs-hc .va-close-btn,
html.cs-hc .va-back-btn,
html.cs-hc .pws-score-label,
html.cs-hc .trial-back-btn,
html.cs-hc .ee-hint,
html.cs-hc .present-note { color:#fff !important; }
html.cs-hc .user-menu-btn,
html.cs-hc .user-menu,
html.cs-hc .user-menu-who,
html.cs-hc input, html.cs-hc select,
html.cs-hc .team-name-input,
html.cs-hc .btn-clock-reset,
html.cs-hc .clock-meta,
html.cs-hc .half-btn,
html.cs-hc .btn-halftime,
html.cs-hc .undo-btn,
html.cs-hc .undo-btn:hover,
html.cs-hc .ob-wide,
html.cs-hc .ob-saved,
html.cs-hc .ob-short,
html.cs-hc .ob-gen,
html.cs-hc .psb,
html.cs-hc .event-item,
html.cs-hc .stats-table tbody tr,
html.cs-hc .stats-section-row td,
html.cs-hc .btn-export,
html.cs-hc .btn-reset,
html.cs-hc .shot-summary-table th,
html.cs-hc .shot-summary-table td,
html.cs-hc #trial-banner,
html.cs-hc #paywall-screen .pw-close,
html.cs-hc .pw-expired-msg,
html.cs-hc .va-collapse-btn,
html.cs-hc .match-card-stats,
html.cs-hc .mcs-stat,
html.cs-hc .mca-btn.danger:hover,
html.cs-hc .save-match-banner,
html.cs-hc .team-picker-input,
html.cs-hc .picker-search,
html.cs-hc .picker-item,
html.cs-hc .picker-close-btn,
html.cs-hc .btn-clear-player,
html.cs-hc .help-download-card,
html.cs-hc .help-row,
html.cs-hc .psc-matches,
html.cs-hc .psc-season,
html.cs-hc .record-pitch-wrap,
html.cs-hc .rev-halves,
html.cs-hc .rev-half.home,
html.cs-hc .pp-pitch,
html.cs-hc .ctp-row,
html.cs-hc .lv-stat,
html.cs-hc .lv-scorer,
html.cs-hc .lv-ev,
html.cs-hc .ts-pitch,
html.cs-hc .ts-slot,
html.cs-hc .ts-player-row,
html.cs-hc #sub-signal:not(:empty),
html.cs-hc .opp-player-row,
html.cs-hc .opp-player-name-input,
html.cs-hc .et-mgr-row,
html.cs-hc .team-select,
html.cs-hc .teamsheet-wrap,
html.cs-hc .ts-header,
html.cs-hc .ts-pitch,
html.cs-hc .ts-pitch::after,
html.cs-hc .ts-subs-label,
html.cs-hc .ts-sub-circle,
html.cs-hc .va-topbar,
html.cs-hc .va-close-btn,
html.cs-hc .va-back-btn,
html.cs-hc .comp-search-input,
html.cs-hc .comp-item,
html.cs-hc .new-video-btn,
html.cs-hc .nva-input,
html.cs-hc .nva-video-tab,
html.cs-hc .ss-results-table td,
html.cs-hc .scout-textarea,
html.cs-hc .scout-player-row,
html.cs-hc .tsc-share-btn,
html.cs-hc .trial-sync-btn,
html.cs-hc .pws-select,
html.cs-hc .pws-score-btn,
html.cs-hc .pws-note-input,
html.cs-hc .va-clip-mark-btn,
html.cs-hc .va-clip-save-btn,
html.cs-hc .opp-match-row,
html.cs-hc .trial-back-btn,
html.cs-hc .trial-menu-btn,
html.cs-hc .grading-row,
html.cs-hc .grading-score-dot,
html.cs-hc .grading-note-input,
html.cs-hc .grading-detail-panel,
html.cs-hc .grading-test-input,
html.cs-hc .grading-skill-dot,
html.cs-hc .trial-report-btn,
html.cs-hc .tby-player-row,
html.cs-hc .tby-score-pill.has-score,
html.cs-hc .trial-build-squad-btn,
html.cs-hc .training-new-btn,
html.cs-hc .tr-meta-input,
html.cs-hc .tr-att-row,
html.cs-hc .tr-att-btn.selected,
html.cs-hc .ptr-skill-dot,
html.cs-hc .ptr-add-note-btn,
html.cs-hc .settings-panel-note,
html.cs-hc .settings-add-btn,
html.cs-hc .perf-outcome-row,
html.cs-hc .ee-input,
html.cs-hc .ee-outcome-row,
html.cs-hc .ee-add-outcome-btn,
html.cs-hc .ee-delete-btn,
html.cs-hc .va-url-input,
html.cs-hc .va-url-upload-btn,
html.cs-hc .evs-row + .evs-row,
html.cs-hc .evs-chip,
html.cs-hc .evs-note,
html.cs-hc .tb-select-bar,
html.cs-hc .tb-icon-btn,
html.cs-hc .tb-menu,
html.cs-hc .tb-step,
html.cs-hc .tb-chip,
html.cs-hc .rec-last,
html.cs-hc .rec-last-undo,
html.cs-hc .oc-missed .outcome-btn,
html.cs-hc .ko-btn.away,
html.cs-hc .pp-recent-btn.away,
html.cs-hc .pst th, html.cs-hc .pst td,
html.cs-hc .help-section.open .help-section-title,
html.cs-hc .panel-close-btn,
html.cs-hc .att-tag,
html.cs-hc .ts-chip,
html.cs-hc .ts-chip.them,
html.cs-hc .kw-skip,
html.cs-hc .meta-row select, html.cs-hc .meta-row input,
html.cs-hc .pw-free { border-color:rgba(255,255,255,0.6) !important; }
/* <<< high contrast */

/* Linked turnovers: one "how" list for Ball won and Ball lost, split into
   forced (three across) and unforced (four across), so it fits a phone */
.outcome-grid.to-how { grid-template-columns:repeat(12, minmax(0,1fr)); gap:8px; }
.outcome-grid.to-how .outcome-btn.ob-forced { grid-column:span 4; }
.outcome-grid.to-how .outcome-btn.ob-unforced { grid-column:span 3; padding-left:2px; padding-right:2px; }
.rec-sheet .outcome-grid.to-how .outcome-btn { min-height:70px; }
.rec-sheet .outcome-grid.to-how .ob-unforced .o-label { font-size:13px; }
.to-how-head { grid-column:1 / -1; font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); margin:4px 0 -2px; }
.to-how-head:first-child { margin-top:0; }
.outcome-btn.ob-forced { background:rgba(22,163,74,0.14); border-color:rgba(74,222,128,0.4); color:#bbf7d0; }
.outcome-btn.ob-unforced { background:rgba(255,255,255,0.05); border-color:rgba(255,255,255,0.16); color:var(--cream); }

/* Import from a spreadsheet */
.imp-open-btn { background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:6px; padding:5px 10px; color:#86efac; font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:0.5px; cursor:pointer; text-transform:none; min-height:32px; }
.imp-wide-btn { width:100%; margin:8px 0 12px; padding:11px; background:rgba(255,255,255,0.04); border:1px dashed rgba(74,222,128,0.45); border-radius:10px; color:#86efac; font-family:'Oswald',sans-serif; font-size:14px; letter-spacing:0.5px; cursor:pointer; }
.imp-sheet { max-height:92vh; overflow-y:auto; }
.imp-label { display:block; font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); margin:4px 0 8px; }
.imp-paste { width:100%; box-sizing:border-box; min-height:130px; background:rgba(255,255,255,0.04); border:1px solid var(--border); border-radius:10px; color:var(--cream); padding:10px 12px; font:14px/1.4 'Inter',sans-serif; resize:vertical; }
.imp-primary { width:100%; margin-top:10px; min-height:48px; border:none; border-radius:10px; background:var(--btn-green); color:#fff; font-family:'Oswald',sans-serif; font-size:16px; letter-spacing:1px; cursor:pointer; }
.imp-primary:disabled { opacity:0.45; cursor:default; }
.imp-or { display:flex; align-items:center; gap:10px; margin:14px 0; color:var(--muted); font-size:13px; }
.imp-or::before, .imp-or::after { content:''; flex:1; height:1px; background:var(--border); }
.imp-file-btn { width:100%; min-height:48px; border-radius:10px; border:1px solid rgba(74,222,128,0.45); background:rgba(22,163,74,0.12); color:#bbf7d0; font-family:'Oswald',sans-serif; font-size:15px; letter-spacing:0.5px; cursor:pointer; }
.imp-link { display:block; margin:14px auto 4px; background:none; border:none; color:#86efac; text-decoration:underline; font-family:'Inter',sans-serif; font-size:14px; cursor:pointer; min-height:36px; }
.imp-err { margin-top:10px; padding:10px 12px; border-radius:8px; background:rgba(220,38,38,0.12); border:1px solid rgba(248,113,113,0.4); color:#fecaca; font-size:14px; }
.imp-cols-hint { font-family:'Oswald',sans-serif; font-size:13px; letter-spacing:1px; text-transform:uppercase; color:var(--muted); margin-bottom:8px; }
.imp-cols { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; }
.imp-col { flex:0 0 auto; min-width:118px; display:flex; flex-direction:column; gap:4px; background:rgba(255,255,255,0.04); border:1px solid var(--border); border-radius:8px; padding:8px; }
.imp-col-sample { font-size:13px; color:var(--cream); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px; }
.imp-col-sel { min-height:36px; background:#0f1a14; color:var(--cream); border:1px solid var(--border); border-radius:6px; font-size:14px; }
.imp-check { display:flex; align-items:center; gap:8px; margin:10px 0 4px; font-size:14px; color:var(--cream); min-height:36px; }
.imp-check input { width:20px; height:20px; }
.imp-mode { display:flex; gap:8px; margin:8px 0 2px; }
.imp-mode-btn { flex:1; min-height:42px; border-radius:8px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font-family:'Oswald',sans-serif; font-size:14px; cursor:pointer; }
.imp-mode-btn.on { background:rgba(22,163,74,0.18); border-color:rgba(74,222,128,0.55); color:#bbf7d0; }
.imp-summary { margin:12px 0 8px; font-family:'Oswald',sans-serif; font-size:15px; letter-spacing:0.5px; color:#86efac; }
.imp-table { border:1px solid var(--border); border-radius:10px; max-height:38vh; overflow-y:auto; }
.imp-row { display:flex; align-items:center; gap:10px; padding:8px 10px; border-bottom:1px solid rgba(255,255,255,0.06); font-size:14px; }
.imp-row:last-child { border-bottom:none; }
.imp-row.skip { opacity:0.5; }
.imp-num { flex:0 0 28px; text-align:center; font-family:'Oswald',sans-serif; color:#86efac; }
.imp-name { flex:1; min-width:0; color:var(--cream); }
.imp-name small { display:block; color:var(--muted); font-size:12px; }
.imp-status { flex:0 0 auto; max-width:45%; text-align:right; font-size:12px; color:var(--muted); }
.imp-row.skip .imp-status { color:#fca5a5; }
.imp-more { padding:8px 10px; color:var(--muted); font-size:13px; }
.imp-actions { display:flex; gap:10px; margin-top:12px; }
.imp-actions .imp-primary { margin-top:0; flex:2; }
.imp-back { flex:1; min-height:48px; border-radius:10px; border:1px solid var(--border); background:rgba(255,255,255,0.04); color:var(--cream); font-family:'Oswald',sans-serif; font-size:15px; cursor:pointer; }

/* ── My clubs and the Club plan (v165) ─────────────────── */
#my-clubs-modal { z-index: 99999; }
.myc-switch { margin-top: 8px; background: rgba(22,163,74,0.12); border: 1px solid rgba(22,163,74,0.35); border-radius: 999px;
  color: #86efac; font-family: 'Oswald', sans-serif; font-size: 12px; letter-spacing: 1px; padding: 5px 12px; cursor: pointer; }
.myc-list { display: flex; flex-direction: column; gap: 8px; padding: 4px 16px 0; }
.myc-row { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "name badge open" "meta badge open"; align-items: center; column-gap: 8px;
  text-align: left; width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
  padding: 12px 14px; color: var(--cream); cursor: pointer; font-family: 'Oswald', sans-serif; }
.myc-row.open { border-color: rgba(22,163,74,0.6); background: rgba(22,163,74,0.1); }
.myc-name { grid-area: name; font-size: 16px; letter-spacing: .5px; }
.myc-meta { grid-area: meta; font-size: 12px; color: var(--muted); font-family: 'Inter', sans-serif; }
.myc-badge { grid-area: badge; font-size: 11px; letter-spacing: .5px; color: #86efac; border: 1px solid rgba(134,239,172,0.4); border-radius: 999px; padding: 2px 8px; }
.myc-open { grid-area: open; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: #16a34a; }
.myc-empty { color: var(--muted); font-family: 'Inter', sans-serif; font-size: 14px; padding: 8px 0; }
.myc-add { display: block; margin: 14px 16px calc(16px + var(--safe-bottom, 0px)); width: calc(100% - 32px); padding: 13px; border-radius: 10px;
  background: transparent; border: 1px dashed rgba(22,163,74,0.5); color: #86efac; font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 1px; cursor: pointer; }
.club-plan-card:empty { display: none; }
.club-plan-card { background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.3); border-radius: 12px; padding: 14px; margin-bottom: 16px; }
.cp-title { font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: #86efac; margin-bottom: 4px; }
.cp-sub { font-family: 'Inter', sans-serif; font-size: 13px; color: rgba(240,253,244,0.8); line-height: 1.45; }
.cp-note { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.4; }
.cp-btn { display: block; width: 100%; margin-top: 10px; padding: 11px; border-radius: 8px; border: none; background: #16a34a; color: #fff;
  font-family: 'Oswald', sans-serif; font-size: 13px; letter-spacing: 1px; cursor: pointer; }
.cp-btn.ghost { background: transparent; border: 1px solid rgba(22,163,74,0.5); color: #86efac; }
.pw-club-for { text-align: center; font-family: 'Inter', sans-serif; font-size: 13px; color: #86efac; margin: -4px 0 12px; }

.tpro-edit-btn { display: block; margin: 0 16px 12px auto; background: transparent; border: 1px solid rgba(134,239,172,0.4); border-radius: 999px;
  color: #86efac; font-family: 'Oswald', sans-serif; font-size: 12px; letter-spacing: 1px; padding: 6px 14px; cursor: pointer; }

/* ── Members: which squads each coach sees (v170) ───────── */
#member-squads-modal { z-index: 99999; }
.mem-squads { font-family: 'Inter', sans-serif; font-size: 12px; color: #86efac; margin-top: 3px; overflow-wrap: anywhere; }
.mem-squads-btn { background: rgba(22,163,74,0.12); border: 1px solid rgba(22,163,74,0.4); border-radius: 999px; color: #86efac;
  font-family: 'Oswald', sans-serif; font-size: 12px; letter-spacing: 1px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.mem-sq-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; color: var(--cream); font-family: 'Oswald', sans-serif; font-size: 15px; cursor: pointer; }
.mem-sq-row input { width: 20px; height: 20px; accent-color: #16a34a; }
.mem-sq-row small { color: var(--muted); font-family: 'Inter', sans-serif; font-size: 12px; margin-left: 6px; }
.mem-sq-quick { display: flex; gap: 8px; padding: 0 16px 8px; }
.mem-sq-quick button { background: transparent; border: 1px solid rgba(255,255,255,0.15); border-radius: 999px; color: var(--cream);
  font-family: 'Oswald', sans-serif; font-size: 12px; padding: 5px 12px; cursor: pointer; }
.mem-sq-save { margin: 14px 16px calc(16px + var(--safe-bottom, 0px)); width: calc(100% - 32px); }

.rpt-club-note { font-family: 'Inter', sans-serif; font-size: 12px; color: #86efac; margin: -6px 0 12px; line-height: 1.5; }

/* ── Club trials: admins give coaches access (v172) ─────── */
.mem-trials { font-family: 'Inter', sans-serif; font-size: 12px; color: var(--muted); margin-top: 3px; }
.mem-trials.on { color: #86efac; }
.mem-trials-btn { margin-top: 8px; background: rgba(22,163,74,0.12); border: 1px solid rgba(22,163,74,0.4); border-radius: 999px;
  color: #86efac; font-family: 'Oswald', sans-serif; font-size: 12px; letter-spacing: 1px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.mem-trials-btn.on { background: transparent; border-color: rgba(255,255,255,0.18); color: var(--cream); }
.trial-card-shared { font-family: 'Inter', sans-serif; font-size: 11px; color: #86efac; margin-top: 3px; }
.trial-access-note { font-family: 'Inter', sans-serif; font-size: 12px; line-height: 1.5; color: #86efac;
  background: rgba(22,163,74,0.08); border: 1px solid rgba(22,163,74,0.25); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
/* A trial shared by the club admin is view only: hide everything that changes it. */
body.trial-ro #trial-detail-screen .training-new-btn,
body.trial-ro #trial-detail-screen .imp-wide-btn,
body.trial-ro #trial-detail-screen .trial-menu-btn,
body.trial-ro #trial-detail-screen .tsc-share-btn,
body.trial-ro #trial-detail-screen .trial-sync-btn,
body.trial-ro #trial-build-squad-btn,
body.trial-ro #tpro-edit-btn,
body.trial-ro #tpro-promote-squad-wrap,
body.trial-ro #new-trial-session-modal .btn-save-player { display: none !important; }
body.trial-ro #trialist-profile-modal .ptr-avail-btn { pointer-events: none; }
body.trial-ro #new-trial-session-modal input { pointer-events: none; }

/* ── Clear the match on screen without saving (v173) ───── */
.clear-match-btn { display: block; width: 100%; margin-top: 12px; padding: 12px; min-height: 44px; background: transparent;
  border: 1px solid rgba(248,113,113,0.45); border-radius: 10px; color: #fca5a5; font-family: 'Oswald', sans-serif;
  font-size: 13px; letter-spacing: 1px; cursor: pointer; }
.clear-match-btn:active { background: rgba(248,113,113,0.1); }
