:root {
  --bg: #0e0e0e;
  --surface: #1a1a1a;
  --surface2: #242424;
  --border: #333;
  --text: #eee;
  --text2: #999;
  --accent: #2a6bfd;
  --accent-hover: #3a7bff;
  --green: #1a8;
  --red: #c44;
  --yellow: #fc6;
  font-family: system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Nav ─────────────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.nav-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}
.nav-link {
  font-size: 0.85rem;
  color: var(--text2);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--surface2); color: var(--text); }
.nav-brand:hover { color: var(--accent); }
.nav-sep { color: var(--border); }
.nav-title { color: var(--text2); font-size: 0.9rem; }
.nav a { color: var(--text2); text-decoration: none; font-size: 0.85rem; }
.nav a:hover { color: var(--text); }

/* ── Layout ──────────────────────────────────────────────────── */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.page-header h1 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
}

/* ── Cards / Panels ──────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}

/* ── Buttons ─────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: filter 0.15s;
  text-decoration: none;
  color: #fff;
}
.btn:hover { filter: brightness(1.12); }
.btn:disabled { opacity: 0.5; cursor: default; filter: none; }
.btn-primary { background: var(--accent); }
.btn-secondary { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: var(--red); }
.btn-green { background: var(--green); }
.btn-sm { padding: 5px 10px; font-size: 0.8rem; }

/* ── Project list ────────────────────────────────────────────── */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.project-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.project-card h3 { margin: 0 0 8px; font-size: 1rem; }
.project-card .meta { color: var(--text2); font-size: 0.8rem; }
.project-card .actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ── Clip strip ──────────────────────────────────────────────── */

.clip-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 12px 0;
  min-height: 140px;
  align-items: stretch;
}
.clip-thumb {
  flex: 0 0 180px;
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: grab;
  transition: border-color 0.15s;
}
.clip-thumb:hover { border-color: var(--accent); }
.clip-thumb.dragging { opacity: 0.4; }
.clip-thumb.drag-over { border-color: var(--yellow); border-style: dashed; }
.clip-thumb video {
  width: 100%;
  height: 90px;
  object-fit: cover;
  background: #000;
  pointer-events: none;
}
.clip-thumb .info {
  padding: 6px 8px;
  font-size: 0.75rem;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clip-thumb .clip-actions {
  display: flex;
  gap: 4px;
  padding: 0 6px 6px;
  flex-wrap: wrap;
}

/* ── Transition pill between clips ────────────────────────── */

.transition-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 6px;
  cursor: pointer;
  min-width: 56px;
}
.transition-pill .t-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text2);
  transition: border-color 0.15s, background 0.15s;
}
.transition-pill:hover .t-icon { border-color: var(--accent); background: rgba(42,107,253,0.15); }
.transition-pill .t-label { font-size: 0.6rem; color: var(--text2); text-align: center; max-width: 56px; }

/* ── Tag badge on clip ───────────────────────────────────── */

.clip-tag-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  padding: 1px 5px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Tag overlay on clip hover ─────────────────────────── */

.clip-tag-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: linear-gradient(rgba(0,0,0,0.85), transparent);
  color: #fff;
  font-size: 0.68rem;
  padding: 6px 6px 16px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  line-height: 1.4;
}
.clip-thumb:hover .clip-tag-overlay { opacity: 1; }

/* ── Tag modal ───────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 400px;
  max-width: 90vw;
}
.modal-box h3 { margin: 0 0 16px; font-size: 1rem; }
.modal-box label { display: block; font-size: 0.85rem; color: var(--text2); margin-bottom: 4px; }
.modal-box input, .modal-box select, .modal-box textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface2);
  color: var(--text);
  font-size: 0.85rem;
  margin-bottom: 12px;
}
.modal-box textarea { resize: vertical; min-height: 50px; }
.modal-box .modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

/* ── Transition picker popover ───────────────────────────── */

.t-popover {
  position: fixed;
  z-index: 90;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  width: 220px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.t-popover h4 { margin: 0 0 8px; font-size: 0.85rem; }
.t-popover .t-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--text2);
  transition: background 0.1s;
}
.t-popover .t-option:hover { background: rgba(42,107,253,0.15); color: var(--text); }
.t-popover .t-option.active { background: rgba(42,107,253,0.25); color: var(--text); }
.t-popover label { font-size: 0.8rem; color: var(--text2); display: block; margin-top: 8px; }
.t-popover input[type="range"] { width: 100%; }

.clip-add {
  flex: 0 0 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 2px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text2);
  font-size: 2rem;
  transition: border-color 0.15s, color 0.15s;
}
.clip-add:hover { border-color: var(--accent); color: var(--accent); }

/* ── Render bar ──────────────────────────────────────────────── */

.render-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface2);
  overflow: hidden;
  margin: 8px 0;
}
.render-bar .fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s;
  width: 0;
}
.render-bar.done .fill { background: var(--green); }

/* ── Video editor ────────────────────────────────────────────── */

.video-shell { position: relative; border-radius: 8px; overflow: hidden; background: #000; }
.video-stack { position: relative; z-index: 1; isolation: isolate; width: 100%; line-height: 0; }
.video-stack video {
  width: 100%;
  max-height: 65vh;
  display: block;
  cursor: crosshair;
  position: relative;
  z-index: 0;
  background: #000;
}
.crop-mask { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; border-radius: 4px; transform: translateZ(0); }
.crop-shade { position: absolute; }
.crop-frame { position: absolute; box-sizing: border-box; pointer-events: none; border: 2px solid rgba(255, 214, 80, 0.95); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.45); border-radius: 2px; z-index: 5; }

.controls-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0;
}
.controls-row label { font-size: 0.85rem; color: var(--text2); }
.controls-row input[type="range"] { flex: 1; min-width: 140px; }

.timeline {
  height: 56px;
  background: var(--surface2);
  border-radius: 6px;
  position: relative;
  margin-top: 8px;
  cursor: pointer;
}
.timeline .bar { position: absolute; left: 12px; right: 12px; top: 50%; height: 2px; background: #444; transform: translateY(-50%); }
.timeline .play { position: absolute; top: 8px; width: 0; height: 0; border-left: 10px solid #6cf; border-top: 8px solid transparent; border-bottom: 8px solid transparent; transform: translateX(-5px); }
.timeline .wp { position: absolute; top: 50%; width: 6px; height: 18px; background: var(--yellow); transform: translate(-3px, -50%); border-radius: 1px; }

.wp-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  max-height: 160px;
  overflow: auto;
  background: var(--surface2);
  border-radius: 6px;
}
.wp-list li {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.1s;
}
.wp-list li:last-child { border-bottom: 0; }
.wp-list li:hover { background: rgba(42, 107, 253, 0.15); }
.wp-list li.active { background: rgba(42, 107, 253, 0.25); }

#status { color: #9cf; min-height: 1.2em; font-size: 0.85rem; margin: 6px 0; }

/* ── Empty states ────────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text2);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { margin: 8px 0; font-size: 0.95rem; }

/* ── Misc ────────────────────────────────────────────────────── */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.inline-edit { background: transparent; border: none; color: var(--text); font-size: inherit; font-weight: inherit; padding: 2px 4px; border-bottom: 1px dashed var(--border); outline: none; }
.inline-edit:focus { border-bottom-color: var(--accent); }

/* ── Manage Tags ───────────────────────────────────────────── */

.mtag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.mtag-input {
  flex: 1;
  padding: 5px 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
}
.mtag-input:focus {
  border-color: var(--accent);
  outline: none;
}
.mtag-count {
  font-size: 0.72rem;
  color: var(--text2);
  white-space: nowrap;
  min-width: 55px;
  text-align: right;
  transition: color 0.3s;
}
.mtag-save {
  white-space: nowrap;
}

/* ── Player Reel filters ───────────────────────────────────── */

.filter-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 4px;
}
.filter-select {
  width: 100%;
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px;
  font-size: 0.82rem;
}
.filter-select option { padding: 3px 6px; }
.filter-select option:checked { background: var(--accent); color: #fff; }
.filter-input {
  padding: 6px 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.85rem;
  width: 100%;
}
.filter-input:focus { border-color: var(--accent); outline: none; }

/* ── Search results ────────────────────────────────────────── */

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 55vh;
  overflow-y: auto;
}
.result-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface2);
  cursor: pointer;
  transition: background 0.15s;
}
.result-item:hover { background: rgba(42, 107, 253, 0.12); }
.result-item.selected { background: rgba(42, 107, 253, 0.18); }
.result-item input[type="checkbox"] { margin-top: 3px; accent-color: var(--accent); }
.result-body { flex: 1; min-width: 0; }
.result-title { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-meta { font-size: 0.75rem; color: var(--text2); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.result-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  background: var(--border);
  color: var(--text);
}
.result-tag.type { background: rgba(26, 170, 136, 0.25); color: var(--green); }
.result-tag.player { background: rgba(42, 107, 253, 0.2); color: var(--accent); }
.result-tag.assist { background: rgba(252, 198, 102, 0.15); color: var(--yellow); }
.result-tag.opponent { background: rgba(196, 68, 68, 0.2); color: var(--red); }

/* ── Browse / Reel View ─────────────────────────────────────── */

.search-hero {
  padding: 16px 0 12px;
}
.search-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--accent); outline: none; }
.search-input::placeholder { color: var(--text2); }

.stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.stat-chip {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  background: var(--surface2);
  color: var(--text2);
}
.stat-chip.clickable { cursor: pointer; transition: background 0.15s; }
.stat-chip.clickable:hover { background: rgba(42, 107, 253, 0.18); color: var(--text); }
.stat-count { opacity: 0.6; margin-left: 2px; }

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.active-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  background: rgba(42, 107, 253, 0.2);
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s;
}
.active-pill:hover { background: rgba(42, 107, 253, 0.35); }
.active-pill.clear-all { background: rgba(196, 68, 68, 0.15); color: var(--red); }
.active-pill.clear-all:hover { background: rgba(196, 68, 68, 0.3); }
.pill-x { font-weight: 700; font-size: 0.85rem; }

.browse-layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.browse-sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}
.browse-main { flex: 1; min-width: 0; }

.sidebar-section { margin-bottom: 16px; }
.sidebar-section h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text2);
  margin: 0 0 6px;
}

.chip-list { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-chip {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  background: var(--surface2);
  color: var(--text2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.filter-chip:hover { background: rgba(42, 107, 253, 0.15); color: var(--text); }
.filter-chip.active { background: var(--accent); color: #fff; }
.chip-count { opacity: 0.6; font-size: 0.68rem; margin-left: 2px; }

.result-group { margin-bottom: 18px; }
.group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.group-label { font-weight: 600; font-size: 0.9rem; }
.group-count { font-size: 0.75rem; color: var(--text2); }

.create-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.3);
}

@media (max-width: 700px) {
  .browse-layout { flex-direction: column; }
  .browse-sidebar { width: 100%; position: static; max-height: none; }
}

/* ── Import Game drop zone ─────────────────────────────────── */

.import-drop {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 32px 24px;
  text-align: center;
  color: var(--text2);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.import-drop:hover, .import-drop.drag-over {
  border-color: var(--accent);
  background: rgba(42, 107, 253, 0.06);
}

/* ── Team / Dashboard ──────────────────────────────────────── */

.team-header { padding: 16px 0 8px; }
.team-name-edit { font-size: 1.4rem; font-weight: 700; }

.tab-bar {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.tab {
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text2);
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.roster-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.roster-table th {
  text-align: left; padding: 6px 8px; font-size: 0.75rem;
  text-transform: uppercase; color: var(--text2); border-bottom: 1px solid var(--border);
}
.roster-table td { padding: 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.roster-table tr:hover td { background: rgba(42, 107, 253, 0.05); }

.season-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; background: var(--surface2); border-radius: 6px; margin-bottom: 6px;
}
.season-title { font-weight: 500; color: var(--text); text-decoration: none; }
.season-title:hover { color: var(--accent); }
.season-meta { font-size: 0.78rem; color: var(--text2); margin-left: 10px; }
.season-actions { display: flex; gap: 6px; }

.share-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}

/* ── Match view ───────────────────────────────────────────── */

.match-score-row { display: flex; align-items: center; justify-content: center; gap: 20px; }
.match-team { font-size: 1rem; }
.match-score { display: flex; align-items: center; gap: 8px; }
.score-input {
  width: 48px; padding: 6px; text-align: center; font-size: 1.5rem; font-weight: 700;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; color: var(--text);
}
.score-input:focus { border-color: var(--accent); outline: none; }

.event-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.85rem;
}
.event-minute { width: 32px; text-align: right; font-weight: 600; font-size: 0.8rem; color: var(--accent); }
.event-icon { font-size: 1rem; }
.event-detail { flex: 1; }

.coach-notes {
  width: 100%; min-height: 120px; padding: 10px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-size: 0.85rem; resize: vertical;
}
.coach-notes:focus { border-color: var(--accent); outline: none; }

/* ── Stingers ─────────────────────────────────────────────── */
.stinger-card {
  display: flex; align-items: center; gap: 12px; padding: 10px;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px;
}
.stinger-preview {
  width: 80px; height: 142px; border-radius: 6px; overflow: hidden;
  background: #000; flex-shrink: 0;
}
.stinger-preview video { width: 100%; height: 100%; object-fit: cover; }
.stinger-info { flex: 1; min-width: 0; }
.stinger-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.stinger-thumb video { border-radius: 4px; }

/* ── Plan & Usage ─────────────────────────────────────────── */
.plan-badge {
  display: inline-block; padding: 3px 10px; border-radius: 12px;
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  background: var(--surface2); color: var(--text2);
}
.plan-free { background: rgba(255,255,255,0.08); color: var(--text2); }
.plan-pro { background: rgba(59,130,246,0.15); color: #60a5fa; }
.plan-club { background: rgba(234,179,8,0.15); color: #facc15; }

.usage-bar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.usage-item {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  font-size: 0.78rem; color: var(--text2); gap: 4px;
}
.usage-track {
  width: 100%; height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden;
}
.usage-fill {
  height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s;
}

.team-card-link { text-decoration: none; color: inherit; display: block; }
.team-card {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; margin-bottom: 8px; transition: border-color 0.15s;
}
.team-card:hover { border-color: var(--accent); }
.team-card-name { font-weight: 600; font-size: 0.95rem; }
.team-card-meta { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.team-card-stats { font-size: 0.78rem; color: var(--text2); margin-top: 2px; }
.team-card-actions { flex-shrink: 0; }

.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.plan-card {
  padding: 16px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 10px; text-align: center;
}
.plan-card.current { border-color: var(--accent); }
.plan-card-name { font-weight: 600; font-size: 1rem; margin-bottom: 10px; }
.plan-features { list-style: none; padding: 0; margin: 0 0 12px; font-size: 0.82rem; color: var(--text2); text-align: left; }
.plan-features li { padding: 3px 0; }
.plan-features li::before { content: '\2713 '; color: var(--green); }

/* ── Timeline Tags ────────────────────────────────────────── */
.tag-marker {
  position: absolute; top: -2px; width: 6px; height: calc(100% + 4px);
  border-radius: 3px; transform: translateX(-3px); opacity: 0.85;
}
.tag-row {
  display: flex; align-items: center; gap: 6px; padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04); font-size: 0.8rem;
}
.tag-time {
  width: 44px; text-align: right; color: var(--accent); cursor: pointer;
  font-variant-numeric: tabular-nums; font-weight: 500;
}
.tag-time:hover { text-decoration: underline; }
.tag-icon { font-size: 0.9rem; width: 20px; text-align: center; }
.tag-player { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-type-sel {
  font-size: 0.72rem; background: var(--surface2); color: var(--text2);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 4px;
}
.tag-label { flex: 1; color: var(--text2); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Reel Player ──────────────────────────────────────────── */
/* ── Orientation toggle ───────────────────────────────── */
.orientation-toggle {
  display: inline-flex; gap: 2px; background: var(--surface2); border-radius: 6px; padding: 2px;
}
.orient-btn {
  border: none; background: transparent; color: var(--text2); cursor: pointer;
  padding: 4px 8px; border-radius: 5px; display: flex; align-items: center;
  transition: background .15s, color .15s;
}
.orient-btn:hover { background: var(--surface3); }
.orient-btn.active { background: var(--accent); color: #fff; }

/* ── Speed toggle ────────────────────────────────────── */
.speed-toggle {
  display: inline-flex; gap: 2px; background: var(--surface2); border-radius: 6px; padding: 2px;
}
.speed-btn {
  border: none; background: transparent; color: var(--text2); cursor: pointer;
  padding: 3px 8px; border-radius: 5px; font-size: 0.78rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.speed-btn:hover { background: var(--surface3); }
.speed-btn.active { background: var(--accent); color: #fff; }

.reel-player {
  margin-top: 12px; border-radius: 10px; overflow: hidden;
  background: #000; max-width: 400px; margin-left: auto; margin-right: auto;
}
.reel-player video {
  width: 100%; display: block; max-height: 70vh; object-fit: contain;
}
.reel-player-actions {
  display: flex; justify-content: center; gap: 8px; padding: 8px;
  background: var(--surface2);
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
