/* ─────────────────────────────────────────────
   VBTrain - Professional film-room UI
   Restrained palette · Plus Jakarta Sans · 8px grid
   ───────────────────────────────────────────── */

:root {
  --bg:            #090a0d;
  --bg-shell:      #0c0e13;
  --bg-card:       #111318;
  --bg-elevated:   #171a22;
  --bg-input:      #0f1116;
  --border:        #252932;
  --border-subtle: #1c1f27;
  --border-hover:  #343a48;

  --accent:        #4da3e0;
  --accent-dim:    rgba(77, 163, 224, 0.12);
  --accent-glow:   rgba(77, 163, 224, 0.22);
  --accent-warm:   #d4a04a;
  --accent-warm-dim: rgba(212, 160, 74, 0.12);

  --text:          #eef0f4;
  --text-muted:    #9399a8;
  --text-dim:      #5c6270;

  --success:       #3ecf8e;
  --success-dim:   rgba(62, 207, 142, 0.12);
  --warning:       #e5a84b;
  --warning-dim:   rgba(229, 168, 75, 0.12);
  --danger:        #e05c5c;
  --danger-dim:    rgba(224, 92, 92, 0.12);

  --radius:        8px;
  --radius-sm:     5px;
  --radius-lg:     12px;

  --shadow-sm:     0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg:     0 12px 40px rgba(0, 0, 0, 0.5);

  --font:          'Plus Jakarta Sans', system-ui, sans-serif;
  --mono:          'IBM Plex Mono', ui-monospace, monospace;

  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.55;
  min-height: 100vh;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(77, 163, 224, 0.07), transparent),
    var(--bg);
}

a { color: var(--accent); text-decoration: none; transition: color 0.15s var(--ease); }
a:hover { color: #7bbef0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Nav ──────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  height: 56px;
  background: rgba(9, 10, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--text);
}
.nav-brand:hover { text-decoration: none; color: var(--text); }

.nav-logo {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  object-fit: contain;
}

.nav-brand-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.nav-brand-ver {
  color: var(--text-dim);
  font-weight: 500;
  margin-left: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  margin: 0 var(--space-2);
}
.nav-form { display: inline; margin: 0; }

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}
.nav-link.active {
  color: var(--text);
  background: var(--bg-elevated);
}
/* Core destinations (Film Room, Progress) read brighter than supporting links. */
.nav-link-primary {
  color: var(--text);
  font-weight: 600;
}
.nav-link-primary.active {
  color: var(--accent);
  background: var(--bg-elevated);
}
/* Pushes the account zone (welcome, pricing, sign out) to the right. */
.nav-account { margin-left: auto; }
.nav-link-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}
.nav-cta {
  background: var(--accent);
  color: #fff !important;
  margin-left: var(--space-1);
}
.nav-cta:hover {
  background: #3d8fc9;
  color: #fff !important;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

.nav-dropdown-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.55;
  transition: transform 0.15s var(--ease);
}

.nav-dropdown.is-open .nav-dropdown-chevron {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 10rem;
  padding: var(--space-1);
  background: var(--bg-shell);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  z-index: 110;
}

.nav-dropdown.is-open .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-dropdown-item {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.nav-dropdown-item:hover {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}

.nav-dropdown-item.active {
  color: var(--accent);
  background: var(--bg-elevated);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.nav-toggle:hover {
  background: var(--bg-card);
  border-color: var(--border-hover);
}
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle-bar + .nav-toggle-bar { margin-top: 5px; }
.nav.is-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 56px 0 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 98;
}
.nav.is-open .nav-backdrop { display: block; }

/* ── Main ─────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-5) var(--space-7);
  width: 100%;
}

.footer {
  text-align: center;
  padding: var(--space-4);
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  border-top: 1px solid var(--border-subtle);
}

/* ── Flash ────────────────────────────────────── */
.flash-container { margin-bottom: var(--space-5); }
.flash {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: var(--space-2);
  border: 1px solid var(--border-subtle);
}
.flash-success { background: var(--success-dim); border-color: rgba(62, 207, 142, 0.35); color: #8ee8bc; }
.flash-error   { background: var(--danger-dim);  border-color: rgba(224, 92, 92, 0.35);  color: #f0a0a0; }
.flash-info    { background: var(--accent-dim); border-color: rgba(77, 163, 224, 0.35); color: #9ccbf0; }
.flash-warning { background: var(--warning-dim); border-color: rgba(212, 160, 74, 0.35); color: #f0c878; }

/* ── Email verification banner ────────────────── */
.verify-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-5);
  border-radius: var(--radius-sm);
  background: var(--warning-dim);
  border: 1px solid rgba(212, 160, 74, 0.35);
  color: #f0c878;
  font-size: 0.875rem;
}
.verify-banner strong { color: #f6d79a; }
.verify-banner form { margin: 0; }
.verify-banner-btn {
  background: transparent;
  border: 1px solid rgba(212, 160, 74, 0.5);
  color: #f0c878;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s var(--ease);
}
.verify-banner-btn:hover { background: rgba(212, 160, 74, 0.18); }

.verify-gate {
  max-width: 560px;
  margin: var(--space-6) auto;
  padding: var(--space-6);
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.verify-gate h2 { margin: 0 0 var(--space-3); font-size: 1.25rem; }
.verify-gate p { color: var(--text-muted); margin: 0 0 var(--space-5); line-height: 1.55; }
.verify-gate form { margin: 0; }

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
  font-family: var(--font);
  letter-spacing: -0.01em;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: #3d8fc9;
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-danger {
  background: var(--danger-dim);
  border: 1px solid rgba(224, 92, 92, 0.35);
  color: #f0a0a0;
}
.btn-danger:hover { background: rgba(224, 92, 92, 0.2); }

.btn-full { width: 100%; }
.btn-lg { padding: 11px 22px; font-size: 0.9375rem; }
.btn-loading { font-size: 0.8125rem; opacity: 0.85; }

/* ── Forms ────────────────────────────────────── */
.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.field-label-inline {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field-input, .field-select, .field-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  padding: 9px 12px;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.field-input::placeholder, .field-textarea::placeholder { color: var(--text-dim); }
.field-input:focus, .field-select:focus, .field-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.field-select { cursor: pointer; }
.field-textarea { resize: vertical; min-height: 72px; }
.field-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 6px;
  line-height: 1.45;
}

.field-input-sm, .field-select-sm {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.8125rem;
  padding: 6px 8px;
  font-family: var(--font);
}
.field-input-sm:focus, .field-select-sm:focus {
  outline: none;
  border-color: var(--accent);
}

.req { color: var(--accent-warm); }
.opt { color: var(--text-dim); font-size: 0.85em; text-transform: none; letter-spacing: 0; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.form-group { display: flex; flex-direction: column; }
.form-group-full { grid-column: 1 / -1; }

.submit-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}
.submit-note { font-size: 0.75rem; color: var(--text-dim); }

.section-divider {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-2);
  margin: var(--space-5) 0 var(--space-3);
}

/* ── Page header ──────────────────────────────── */
.page-header { margin-bottom: var(--space-6); }
.page-header h1 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.page-sub {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-top: var(--space-2);
  max-width: 56ch;
  line-height: 1.55;
}
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
}
.header-actions { display: flex; gap: var(--space-2); flex-shrink: 0; flex-wrap: wrap; }

.eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

/* ── Cards ────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
}
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.card-danger { border-color: rgba(224, 92, 92, 0.25); }

/* ── Badges ───────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-poor         { background: rgba(180, 60, 60, 0.25); color: #f0a0a0; }
.badge-elite        { background: var(--success-dim); color: #8ee8bc; }
.badge-strong       { background: rgba(100, 180, 140, 0.2); color: #9fdcc0; }
.badge-solid        { background: var(--accent-dim);   color: #9ccbf0; }
.badge-needs-work   { background: var(--danger-dim);  color: #f0a0a0; }
.badge-na           { background: var(--bg-elevated); color: var(--text-dim); }
.badge-coaching-only {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(160, 120, 220, 0.18);
  color: #c9a8f0;
  border: 1px solid rgba(160, 120, 220, 0.3);
  white-space: nowrap;
}
.badge-sev-high   { background: var(--danger-dim);  color: #f0a0a0; }
.badge-sev-medium { background: var(--warning-dim); color: #f0c878; }
.badge-sev-low    { background: var(--success-dim); color: #8ee8bc; }
.badge-pressure-high_threat     { background: var(--danger-dim);  color: #f0a0a0; }
.badge-pressure-moderate_threat { background: var(--warning-dim); color: #f0c878; }
.badge-pressure-low_threat      { background: var(--success-dim); color: #8ee8bc; }

/* ── Info / empty ─────────────────────────────── */
.info-box {
  background: var(--accent-dim);
  border: 1px solid rgba(77, 163, 224, 0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}
.info-box strong { color: var(--text); }

.error-card {
  background: var(--danger-dim);
  border: 1px solid rgba(224, 92, 92, 0.25);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  color: #f0a0a0;
  margin-bottom: var(--space-4);
}

.empty-state {
  text-align: center;
  padding: var(--space-7) var(--space-4);
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text);
  letter-spacing: -0.02em;
}
.empty-state p { margin-bottom: var(--space-4); max-width: 40ch; margin-left: auto; margin-right: auto; }
.empty-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.empty-note { color: var(--text-dim); font-size: 0.8125rem; margin-top: var(--space-2); }

.cta-banner {
  margin-top: var(--space-5);
  background: var(--accent-dim);
  border: 1px solid rgba(77, 163, 224, 0.18);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Home ─────────────────────────────────────── */
.hero {
  padding: var(--space-2) 0 var(--space-6);
  max-width: 100%;
}
.hero-title {
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin-bottom: var(--space-4);
  white-space: nowrap;
}
@media (max-width: 800px) {
  .hero-title {
    white-space: normal;
    font-size: clamp(1.75rem, 4vw, 2.375rem);
  }
}
.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-5);
}
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; }

.home-primary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
}
@media (max-width: 720px) {
  .home-primary { grid-template-columns: 1fr; }
}
.home-primary-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.home-primary-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 24px var(--accent-glow);
  text-decoration: none;
  color: var(--text);
}
.home-primary-label {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.home-primary-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.home-secondary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border-subtle);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-5);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
}
.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
}
.feature-card-cta {
  border-color: rgba(77, 163, 224, 0.25);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(77, 163, 224, 0.04) 100%);
}

.feature-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.feature-card p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex: 1;
  line-height: 1.55;
}
.feature-tag {
  font-size: 0.6875rem;
  font-family: var(--mono);
  color: var(--text-dim);
  margin-top: var(--space-2);
  align-self: flex-start;
}

/* ── Upload ───────────────────────────────────── */
.upload-wrap { max-width: 680px; }
.upload-form { display: flex; flex-direction: column; gap: var(--space-5); }

.upload-drop-zone {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--space-7) var(--space-5);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
  position: relative;
  background: var(--bg-card);
}
.upload-drop-zone:hover, .upload-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.drop-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  position: relative;
}
.drop-icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 12px solid var(--accent);
  opacity: 0.7;
}
.drop-icon::after {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--border-hover);
  border-radius: 1px;
}

.drop-label { font-size: 0.9375rem; color: var(--text); font-weight: 500; }
.drop-browse { color: var(--accent); cursor: pointer; font-weight: 600; }
.drop-browse:hover { text-decoration: underline; }
.drop-meta { font-size: 0.75rem; color: var(--text-dim); margin-top: var(--space-2); font-family: var(--mono); }
.drop-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-chosen {
  font-size: 0.8125rem;
  color: var(--success);
  margin-top: var(--space-3);
  font-family: var(--mono);
}

/* ── Auth ─────────────────────────────────────── */
.auth-wrap { display: flex; justify-content: center; padding-top: var(--space-6); }
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow);
}
.auth-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-5);
}
.auth-form { display: flex; flex-direction: column; gap: var(--space-4); }
.auth-alt { margin-top: var(--space-4); font-size: 0.8125rem; color: var(--text-muted); text-align: center; }
.auth-lead {
  margin: 0 0 var(--space-4);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
}
.auth-forgot {
  margin: calc(-1 * var(--space-2)) 0 0;
  font-size: 0.8125rem;
  text-align: right;
}
.auth-forgot a { color: var(--accent); }
.auth-warn {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #f0c878;
  background: var(--warning-dim);
  border: 1px solid rgba(240, 200, 120, 0.35);
  border-radius: var(--radius-sm);
}
.auth-warn code {
  font-family: var(--mono);
  font-size: 0.75rem;
}

.nav-welcome {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.nav-admin-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(77, 163, 224, 0.15);
  color: #9ccbf0;
  border: 1px solid rgba(77, 163, 224, 0.35);
}
.nav-beta-badge {
  display: inline-block;
  margin-left: 5px;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(232, 165, 71, 0.15);
  color: #e8b25f;
  border: 1px solid rgba(232, 165, 71, 0.35);
  vertical-align: middle;
  line-height: 1.4;
}

/* ── Video ────────────────────────────────────── */
.video-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: var(--space-5);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow);
}
.video-player { width: 100%; max-height: 420px; display: block; }

/* ── Clip results ─────────────────────────────── */
.detected-skill {
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: var(--space-5);
  border: 1px solid var(--border-subtle);
}
.section-title {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-4);
}

.phases-section { margin-bottom: var(--space-6); }
.phases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

.phase-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-4);
  border-top: 3px solid var(--border);
}
.phase-card.phase-elite       { border-top-color: var(--success); background: linear-gradient(180deg, var(--success-dim) 0%, var(--bg-card) 48%); }
.phase-card.phase-strong      { border-top-color: #5cb896; background: linear-gradient(180deg, rgba(100, 180, 140, 0.12) 0%, var(--bg-card) 48%); }
.phase-card.phase-solid       { border-top-color: var(--accent); background: linear-gradient(180deg, var(--accent-dim) 0%, var(--bg-card) 48%); }
.phase-card.phase-needs_work  { border-top-color: var(--danger); background: linear-gradient(180deg, var(--danger-dim) 0%, var(--bg-card) 48%); }
.phase-card.phase-poor        { border-top-color: #b44; background: linear-gradient(180deg, rgba(180, 60, 60, 0.12) 0%, var(--bg-card) 48%); }

.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  gap: var(--space-2);
}
.phase-name { font-weight: 600; font-size: 0.875rem; letter-spacing: -0.01em; }
.phase-observation {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  line-height: 1.55;
}
.phase-cue {
  font-size: 0.8125rem;
  background: var(--bg-elevated);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--text);
  border: 1px solid var(--border-subtle);
}
.cue-label { color: var(--accent-warm); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }

.corrections-section { margin-bottom: var(--space-6); }
.corrections-list { display: flex; flex-direction: column; gap: var(--space-2); }
.correction-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
}
.correction-num {
  font-family: var(--mono);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent-warm);
  min-width: 1.25rem;
  line-height: 1.4;
}
.correction-text { font-size: 0.875rem; line-height: 1.55; }

.ncaa-context-section { margin-bottom: var(--space-6); }
.ncaa-context-card {
  background: var(--bg-card);
  border: 1px solid rgba(212, 160, 74, 0.2);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}
.ncaa-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-warm-dim);
  border: 1px solid rgba(212, 160, 74, 0.25);
}
.ncaa-context-card p { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; }

.tendency-pill {
  display: inline-block;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.8125rem;
  margin: 0 var(--space-2) var(--space-2) 0;
}
.tendency-val { color: var(--accent); font-weight: 600; }

.drills-section { margin-bottom: var(--space-6); }
.drills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-3); }
.drill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.drill-name { font-weight: 600; font-size: 0.875rem; margin-bottom: 6px; color: var(--text); letter-spacing: -0.01em; }
.drill-constraint { font-size: 0.75rem; font-family: var(--mono); color: var(--text-dim); margin-bottom: var(--space-2); }
.drill-why { font-size: 0.8125rem; color: var(--text-muted); }

.drill-video { margin-top: var(--space-3); }
.drill-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
}
.drill-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.drill-video-link {
  display: inline-block;
  margin-top: var(--space-2);
  font-size: 0.75rem;
  color: var(--accent);
}
.drill-video-title {
  display: block;
  margin-top: var(--space-2);
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.drill-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}

/* ── Pricing ──────────────────────────────────── */
.usage-note {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: var(--space-2);
}
.usage-note a { color: var(--accent); }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-5);
}
.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.pricing-card-featured {
  border-color: var(--accent);
  box-shadow: 0 4px 24px var(--accent-glow);
}
.pricing-name {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pricing-blurb {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: 2px;
}
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.pricing-amount {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.pricing-period {
  font-size: 0.8125rem;
  color: var(--text-dim);
}
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}
.pricing-features li {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding-left: var(--space-4);
  position: relative;
  line-height: 1.45;
}
.pricing-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.pricing-note {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-top: var(--space-5);
  text-align: center;
}
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}

.camera-note {
  font-size: 0.8125rem;
  color: var(--text-dim);
  background: var(--bg-elevated);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-5);
  border: 1px solid var(--border-subtle);
}

/* ── AI Feedback Widget ───────────────────────── */
.feedback-card {
  margin-top: var(--space-6);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  text-align: center;
}

.feedback-card-done {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.feedback-prompt {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.feedback-buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
}

.btn-feedback {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  font-family: var(--font);
}

.btn-feedback:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-shell);
}

.btn-feedback-yes:hover {
  border-color: var(--success);
  color: var(--success);
  background: var(--success-dim);
}

.btn-feedback-no:hover {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-dim);
}

.feedback-icon {
  font-size: 1rem;
  line-height: 1;
}

.feedback-reasons {
  display: none;
  margin-top: var(--space-4);
  text-align: left;
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
}

.feedback-reasons.feedback-reasons-open {
  display: block;
}

.feedback-reasons-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.feedback-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.feedback-tag-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  user-select: none;
}

.feedback-tag-label:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.feedback-tag-label input[type="checkbox"] {
  display: none;
}

.feedback-tag-label:has(input:checked) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.feedback-textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  padding: var(--space-3) var(--space-4);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s;
  margin-bottom: var(--space-3);
}

.feedback-textarea:focus {
  border-color: var(--accent);
}

.feedback-textarea::placeholder {
  color: var(--text-dim);
}

.feedback-actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.feedback-thanks {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: 0.875rem;
}

.feedback-thanks.feedback-thanks-visible {
  display: flex;
}

.feedback-done-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--success-dim);
  color: var(--success);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Roster ───────────────────────────────────── */
.roster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
.roster-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-4);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.roster-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
}
.roster-card-top { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.roster-name { font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; }
.roster-detail { font-size: 0.75rem; color: var(--text-dim); }
.roster-stats-row { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.mini-stat {
  font-size: 0.6875rem;
  font-family: var(--mono);
  color: var(--text-dim);
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 3px;
}
.weakness-indicator {
  font-size: 0.75rem;
  color: var(--warning);
  margin-top: var(--space-1);
  padding-left: 10px;
  position: relative;
}
.weakness-indicator::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warning);
}

.roster-role, .lineup-player-role {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.role-oh  { background: var(--accent-dim); color: #9ccbf0; }
.role-mb  { background: var(--success-dim); color: #8ee8bc; }
.role-s   { background: var(--warning-dim); color: #f0c878; }
.role-opp { background: var(--danger-dim); color: #f0a0a0; }
.role-l   { background: rgba(77, 163, 224, 0.08); color: #7bbef0; }
.role-ds  { background: rgba(77, 163, 224, 0.06); color: #9ccbf0; }
.role-other { background: var(--bg-elevated); color: var(--text-dim); }

.jersey-badge {
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 3px;
  font-family: var(--mono);
  border: 1px solid var(--border);
}
.jersey-badge-lg { font-size: 0.8125rem; padding: 4px 9px; margin-right: var(--space-2); }

/* ── Player detail ────────────────────────────── */
.player-detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: var(--space-5); }
.player-detail-main, .player-detail-side { display: flex; flex-direction: column; gap: var(--space-5); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.stat-edit-item { display: flex; flex-direction: column; gap: 6px; }

.weakness-list { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); }
.weakness-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
}
.weakness-item.severity-high   { border-color: rgba(224, 92, 92, 0.35); background: var(--danger-dim); }
.weakness-item.severity-medium { border-color: rgba(212, 160, 74, 0.35); background: var(--warning-dim); }
.weakness-item.severity-low    { border-color: rgba(62, 207, 142, 0.35); background: var(--success-dim); }
.weakness-desc { font-size: 0.8125rem; line-height: 1.45; margin-bottom: 4px; }
.weakness-meta { display: flex; align-items: center; gap: var(--space-2); font-size: 0.6875rem; color: var(--text-dim); font-family: var(--mono); }
.weakness-resolved { opacity: 0.4; }
.resolve-btn {
  background: var(--success-dim);
  border: 1px solid rgba(62, 207, 142, 0.25);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--font);
  transition: background 0.15s var(--ease);
}
.resolve-btn:hover { background: rgba(62, 207, 142, 0.2); }
.weakness-add-row { display: flex; gap: var(--space-2); align-items: center; }
.resolved-section { margin-top: var(--space-3); font-size: 0.8125rem; }
.resolved-section summary { cursor: pointer; color: var(--text-muted); margin-bottom: var(--space-2); }

.analysis-link-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  text-decoration: none;
  color: var(--text);
  font-size: 0.8125rem;
  transition: color 0.15s var(--ease);
}
.analysis-link-item:hover { color: var(--accent); text-decoration: none; }
.analysis-link-item:last-of-type { border-bottom: none; }
.analysis-skill { font-weight: 600; flex: 1; }
.analysis-date { color: var(--text-dim); }
.analysis-frames { font-family: var(--mono); font-size: 0.6875rem; color: var(--text-dim); }

/* ── Game analysis ────────────────────────────── */
.game-layout { display: grid; grid-template-columns: 1fr 380px; gap: var(--space-5); }
.game-video-wrap { position: sticky; top: 72px; height: fit-content; }

.rally-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  max-height: 80vh;
  overflow-y: auto;
  padding-right: var(--space-1);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.rally-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
  position: sticky;
  top: 0;
  background: var(--bg);
  padding-bottom: var(--space-2);
  z-index: 1;
}
.rally-list-header h2 { font-size: 0.9375rem; font-weight: 600; }
.rally-count { font-size: 0.75rem; color: var(--text-dim); font-family: var(--mono); }

.rally-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
}
.rally-confirmed {
  background: linear-gradient(180deg, var(--success-dim) 0%, var(--bg-card) 40%);
  border-color: rgba(62, 207, 142, 0.25);
}
.rally-has-ai:not(.rally-confirmed) {
  border-color: rgba(77, 163, 224, 0.25);
}
.rally-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-2);
}
.rally-seek-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--font);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0;
}
.rally-seek-btn:hover { color: #7bbef0; }
.rally-time { font-family: var(--mono); font-size: 0.6875rem; color: var(--text-dim); font-weight: 400; }
.confirmed-badge { font-size: 0.6875rem; color: var(--success); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.ai-badge { font-size: 0.6875rem; color: var(--accent); font-family: var(--mono); }
.rally-ai-obs {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--accent-dim);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(77, 163, 224, 0.2);
  line-height: 1.45;
}
.rally-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.rally-field { display: flex; flex-direction: column; gap: 4px; }
.rally-field label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}
.btn-confirm {
  background: var(--success-dim);
  border: 1px solid rgba(62, 207, 142, 0.25);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font);
  font-weight: 600;
  width: 100%;
  transition: background 0.15s var(--ease);
}
.btn-confirm:hover { background: rgba(62, 207, 142, 0.2); }

/* ── Player summary ───────────────────────────── */
.player-summary-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  margin-bottom: var(--space-5);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.player-summary-header {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.player-summary-id { display: flex; align-items: center; gap: var(--space-3); }
.player-summary-name { font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; }
.player-summary-role { font-size: 0.8125rem; color: var(--text-muted); }
.player-summary-stats { display: flex; gap: var(--space-2); flex-wrap: wrap; }

.stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-label { color: var(--text-dim); font-size: 0.6875rem; }
.stat-val { font-weight: 600; font-family: var(--mono); }
.stat-good { color: var(--success); }
.stat-mid  { color: var(--warning); }
.stat-low  { color: var(--danger); }
.perf-standout { color: var(--success); }
.perf-solid { color: var(--accent); }
.perf-developing { color: var(--warning); }
.perf-below-standard { color: var(--danger); }

.player-summary-body {
  padding: var(--space-5);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-5);
  align-items: start;
}
.summary-block { margin-bottom: var(--space-4); }
.summary-block h4 {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.summary-block p { font-size: 0.875rem; line-height: 1.6; color: var(--text-muted); }
.predictability-flag {
  margin-top: var(--space-2);
  background: var(--warning-dim);
  border: 1px solid rgba(229, 168, 75, 0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  font-size: 0.8125rem;
  color: #f0c878;
}
.heatmap-wrap { flex-shrink: 0; }
.heatmap-img, .heatmap-img-sm {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.heatmap-img { max-width: 220px; }
.heatmap-img-sm { max-width: 200px; display: block; margin-top: var(--space-2); }

.player-summary-footer {
  padding: var(--space-4) var(--space-5);
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.weakness-flag { font-size: 0.8125rem; }
.weakness-high { color: #f0a0a0; }
.weakness-medium { color: #f0c878; }
.strength-flag { color: #8ee8bc; }
.focus-flag { color: var(--text-muted); }
.player-profile-link { font-size: 0.8125rem; margin-top: var(--space-1); }

/* ── Scout ────────────────────────────────────── */
.report-list { display: flex; flex-direction: column; gap: var(--space-3); }
.report-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  text-decoration: none;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.report-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
}
.report-opponent { font-weight: 700; font-size: 0.9375rem; letter-spacing: -0.02em; }
.report-context { font-size: 0.8125rem; color: var(--text-muted); }
.report-meta { font-size: 0.75rem; color: var(--text-dim); margin-top: 4px; font-family: var(--mono); }
.report-card-status { display: flex; align-items: center; gap: var(--space-3); color: var(--text-dim); font-size: 0.875rem; }

.scout-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-5);
  margin-top: var(--space-5);
}
.opponent-list { display: flex; flex-direction: column; gap: var(--space-3); }
.opponent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.opponent-header { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }
.opponent-header .status-pill { margin-left: auto; }
.opponent-name { font-weight: 600; }
.opponent-pos { font-size: 0.75rem; color: var(--text-muted); }
.tendency-preview { font-size: 0.8125rem; display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--space-3); }
.tendency-row { color: var(--text-muted); line-height: 1.45; }
.tendency-row strong { color: var(--text); font-weight: 600; }
.no-analysis-note { font-size: 0.8125rem; color: var(--text-dim); }
.add-player-form { display: flex; flex-direction: column; gap: var(--space-3); }

.scout-report { max-width: 880px; }
.scout-report-header {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}
.scout-report-header h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.03em; }
.scout-context { color: var(--text-muted); margin-top: var(--space-1); }
.scout-date { font-size: 0.75rem; color: var(--text-dim); margin-top: var(--space-1); font-family: var(--mono); }
.scout-section { margin-bottom: var(--space-6); }
.scout-section-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}

.team-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.overview-item { display: flex; flex-direction: column; gap: 4px; }
.overview-label {
  font-size: 0.6875rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.overview-val { font-size: 0.875rem; font-weight: 600; }

.serve-rec-card {
  background: var(--accent-warm-dim);
  border: 1px solid rgba(212, 160, 74, 0.2);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  font-size: 0.875rem;
  margin-bottom: var(--space-4);
}
.vulnerabilities-list h4, .rotation-grid h4 {
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.vuln-item { font-size: 0.875rem; padding: 4px 0; color: #f0a0a0; }
.rotations { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--space-2); }
.rotation-item {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  border: 1px solid var(--border-subtle);
}
.rotation-label {
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--accent);
  display: block;
  margin-bottom: 4px;
  font-family: var(--mono);
}
.rotation-obs { font-size: 0.8125rem; color: var(--text-muted); }

.player-scout-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
  overflow: hidden;
}
.player-scout-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-subtle);
}
.player-scout-meta { display: flex; align-items: center; gap: var(--space-3); flex: 1; flex-wrap: wrap; }
.player-scout-name { font-weight: 700; font-size: 0.9375rem; }
.player-scout-pos { font-size: 0.8125rem; color: var(--text-muted); }
.player-scout-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-5);
  padding: var(--space-5);
}
.player-scout-text { display: flex; flex-direction: column; gap: var(--space-2); }
.scout-row {
  font-size: 0.875rem;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.5;
}
.scout-row:last-child { border-bottom: none; }
.scout-row strong { color: var(--text); margin-right: 6px; font-weight: 600; }
.scout-row-highlight {
  background: var(--warning-dim);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border-bottom: none;
  color: #f0c878;
}
.scout-row-action {
  background: var(--accent-dim);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  border-bottom: none;
  color: #9ccbf0;
}
.scout-notes {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  line-height: 1.55;
}

/* ── Lineup ───────────────────────────────────── */
.lineup-section { margin-bottom: var(--space-5); }
.lineup-hint { margin-bottom: var(--space-4); }

.lineup-grid {
  display: grid;
  gap: var(--space-3);
  align-items: stretch;
}
.lineup-grid-six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.lineup-oh-pick { margin-top: var(--space-5); }
.lineup-bench-title { margin-top: var(--space-5); }

.lineup-player-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: stretch;
  border-top: 2px solid var(--border);
  min-width: 0;
}
.lineup-player-card.role-oh  { border-top-color: var(--accent); }
.lineup-player-card.role-mb  { border-top-color: var(--success); }
.lineup-player-card.role-s   { border-top-color: var(--warning); }
.lineup-player-card.role-opp { border-top-color: var(--danger); }
.lineup-player-card.role-l   { border-top-color: #7bbef0; }

.lineup-pos-badge {
  align-self: flex-start;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.06em;
  line-height: 1;
}

.lineup-slot {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
  min-width: 0;
}
.lineup-mb-pair-card .lineup-slot + .lineup-slot {
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.lineup-player-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-2);
  min-width: 0;
}
.lineup-player-name {
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lineup-swap-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-2);
  align-items: center;
  width: 100%;
}
.lineup-swap-select { min-width: 0; width: 100%; }
.btn-swap {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font);
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
@media (prefers-reduced-motion: reduce) {
  .btn-swap { transition: none; }
}
.btn-swap:hover {
  background: var(--accent-dim);
  border-color: rgba(77, 163, 224, 0.4);
}

.bench-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.bench-player {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8125rem;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  border-top: 2px solid var(--border);
}
.bench-player.role-mb { border-top-color: var(--success); }
.bench-player.role-oh { border-top-color: var(--accent); }
.bench-player.role-s  { border-top-color: var(--warning); }
.bench-player.role-opp { border-top-color: var(--danger); }
.bench-player.role-l  { border-top-color: #7bbef0; }
.bench-player-name { font-weight: 500; }
.bench-role {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.04em;
}
.lineup-actions { margin: var(--space-5) 0; }
.coach-notes { font-size: 0.875rem; line-height: 1.65; color: var(--text-muted); }
.coach-notes ul { padding-left: var(--space-5); margin: var(--space-2) 0; }
.coach-notes li { margin-bottom: 4px; }
.oh-pick-list { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-bottom: var(--space-2); }
.oh-pick-item { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.875rem; }

/* ── Practice ─────────────────────────────────── */
.practice-layout { display: grid; grid-template-columns: 280px 1fr; gap: var(--space-5); }
.practice-plan-content { font-size: 0.875rem; line-height: 1.65; color: var(--text-muted); }
.practice-plan-content h1, .practice-plan-content h2 {
  color: var(--text);
  margin: var(--space-4) 0 var(--space-2);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.practice-plan-content h3 { color: var(--text); margin: var(--space-3) 0 var(--space-1); font-size: 0.875rem; }
.practice-plan-content ul, .practice-plan-content ol { padding-left: var(--space-5); margin: var(--space-2) 0; }
.practice-plan-content li { margin-bottom: 4px; }
.practice-plan-content strong { color: var(--text); }
.practice-plan-content em { color: var(--text-dim); }
.practice-plan-content p { margin-bottom: var(--space-2); }
.plan-date { font-size: 0.75rem; color: var(--text-dim); font-family: var(--mono); }

.weakness-group { margin-bottom: var(--space-3); }
.weakness-group-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
}
.severity-high.weakness-group-label { color: #f0a0a0; }
.severity-medium.weakness-group-label { color: #f0c878; }
.weakness-preview-item {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 4px 0;
  border-bottom: 1px solid var(--border-subtle);
  line-height: 1.4;
}
.weakness-source-note { font-size: 0.75rem; color: var(--text-dim); margin-top: var(--space-2); }

/* ── Utilities ────────────────────────────────── */
.form-wrap { max-width: 680px; }
.card-form { display: flex; flex-direction: column; gap: var(--space-4); }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    flex-direction: column;
  }
  .nav-links {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: var(--space-3) var(--space-4) var(--space-5);
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
    background: var(--bg-shell);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow);
    z-index: 99;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav-divider { display: none; }
  .nav-link {
    padding: 12px var(--space-3);
    font-size: 0.9375rem;
    white-space: normal;
  }
  .nav-link-primary { font-size: 1rem; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    text-align: left;
  }
  .nav-dropdown-menu {
    position: static;
    min-width: 0;
    margin-top: 2px;
    padding: 0 0 var(--space-1) var(--space-2);
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .nav-dropdown-item {
    padding: 10px var(--space-3);
    font-size: 0.9375rem;
  }
  .nav-account { margin-left: 0; }
  .nav-welcome {
    padding: var(--space-3);
    white-space: normal;
    border-top: 1px solid var(--border-subtle);
    margin-top: var(--space-2);
    color: var(--text-dim);
    font-weight: 500;
  }
  .nav-form { display: block; }
  .nav-link-btn { width: 100%; text-align: left; }
  .nav-cta { margin-left: 0; text-align: center; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 800px) {
  .game-layout { grid-template-columns: 1fr; }
  .game-video-wrap { position: static; }
  .player-detail-layout { grid-template-columns: 1fr; }
  .player-summary-body { grid-template-columns: 1fr; }
  .player-scout-body { grid-template-columns: 1fr; }
  .scout-layout { grid-template-columns: 1fr; }
  .practice-layout { grid-template-columns: 1fr; }
  .nav { padding: 0 var(--space-4); }
}

@media (max-width: 600px) {
  .main-content { padding: var(--space-5) var(--space-4) var(--space-6); }
  .phases-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .home-secondary { grid-template-columns: 1fr; }
  .page-header-row { flex-direction: column; }
  .header-actions { width: 100%; }
  .lineup-grid-six {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    overflow-x: auto;
    padding-bottom: var(--space-2);
  }
}

/* ── Workflow & progress ──────────────────────── */
.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
}
.workflow-step {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-dim);
  flex: 1 1 180px;
}
.workflow-step.is-active {
  border-color: rgba(77, 163, 224, 0.4);
  background: var(--accent-dim);
  color: var(--text);
}
.workflow-step.is-done {
  border-color: rgba(62, 207, 142, 0.3);
  color: var(--text-muted);
}
.workflow-step-num {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-dim);
}
.workflow-step.is-active .workflow-step-num { color: var(--accent); }
.workflow-step.is-done .workflow-step-num { color: var(--success); }
.workflow-warning { margin-bottom: var(--space-4); }

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.filter-chip {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.75rem;
  font-family: var(--font);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.filter-chip:hover { border-color: var(--border-hover); color: var(--text); }
.filter-chip.is-active {
  background: var(--accent-dim);
  border-color: rgba(77, 163, 224, 0.4);
  color: var(--text);
}

.status-pill {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--text-dim);
  border: 1px solid var(--border-subtle);
}
.status-pill-success {
  background: var(--success-dim);
  color: var(--success);
  border-color: rgba(62, 207, 142, 0.3);
}
.status-pill-info {
  background: var(--accent-dim);
  color: #9ccbf0;
  border-color: rgba(77, 163, 224, 0.3);
}

.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(9, 10, 13, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
}
.processing-overlay[hidden] { display: none; }
body.is-processing { overflow: hidden; }

.processing-card {
  max-width: 420px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-6);
  text-align: center;
}
.processing-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto var(--space-4);
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.processing-hint {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: var(--space-4);
  line-height: 1.5;
}
.processing-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
.processing-step {
  font-size: 0.8125rem;
  color: var(--text-dim);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-subtle);
}
.processing-step.is-active { color: var(--accent); font-weight: 600; }
.processing-step.is-done { color: var(--success); }

.scout-guide { margin-top: var(--space-3); }
.header-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }

.clip-login-cta {
  margin-bottom: var(--space-4);
}

/* ── Progress ─────────────────────────────────── */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-4);
}
.progress-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.progress-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.progress-card-title { font-size: 1rem; font-weight: 700; }
.progress-card-count { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; }

.progress-stats {
  display: flex;
  gap: var(--space-5);
  margin-bottom: var(--space-4);
}
.progress-stat { display: flex; flex-direction: column; gap: 2px; }
.progress-stat-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.progress-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.progress-stat-value small { font-size: 0.6875rem; color: var(--text-dim); font-weight: 500; }

.technique-score {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
}
.technique-score-compact { gap: 0.05rem; }
.technique-score-inline {
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
}
.technique-band {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.technique-score-compact .technique-band { font-size: 0.75rem; }
.technique-points {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  line-height: 1;
}
.technique-points small { font-size: 0.6875rem; }
.technique-score-compact .technique-points { font-size: 0.6875rem; }
.clip-technique-summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.clip-technique-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}
.clip-technique-summary .technique-score {
  flex-direction: row;
  align-items: baseline;
  gap: 0.65rem;
}
.clip-technique-summary .technique-band { font-size: 1rem; }
.clip-technique-summary .technique-points { font-size: 0.8125rem; }
.delta-up   { color: var(--success); }
.delta-down { color: #f0a0a0; }
.delta-flat { color: var(--text-dim); }

.spark {
  display: block;
  width: 100%;
  height: 64px;
  margin-bottom: var(--space-4);
}
.spark-grid { stroke: var(--border-subtle); stroke-width: 1; stroke-dasharray: 3 3; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; }
.spark-dot { fill: var(--accent); }

.progress-empty-note { font-size: 0.8125rem; color: var(--text-dim); margin-bottom: var(--space-4); }

.progress-corrections { margin-bottom: var(--space-4); }
.progress-corrections ul { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.progress-corrections li {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 4px 0;
  line-height: 1.45;
}
.corr-count { color: var(--text-dim); font-size: 0.75rem; }

.progress-clips { margin-top: var(--space-3); }
.progress-clip-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; }
.progress-clip-row { border-top: 1px solid var(--border-subtle); }
.progress-clip-link {
  display: grid;
  grid-template-columns: 52px auto 1fr;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 0;
  color: var(--text-muted);
}
.progress-clip-link:hover { color: var(--text); text-decoration: none; }
.progress-clip-date { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; }
.progress-clip-corr {
  font-size: 0.8125rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-card-main {
  display: block;
  color: inherit;
  border-radius: var(--radius-sm);
  margin: calc(var(--space-2) * -1);
  padding: var(--space-2);
  transition: background 0.15s var(--ease);
}
.progress-card-main:hover {
  background: var(--bg-elevated);
  text-decoration: none;
  color: inherit;
}
.progress-card-main:hover .progress-card-chevron { transform: translateX(2px); color: var(--accent); }
.progress-card-chevron {
  display: inline-block;
  margin-left: 4px;
  font-size: 1rem;
  color: var(--text-dim);
  transition: transform 0.15s var(--ease), color 0.15s var(--ease);
}

/* ── Progress: skill detail ───────────────────── */
.back-link {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}
.back-link:hover { color: var(--accent); text-decoration: none; }

.skill-summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  margin-bottom: var(--space-4);
}
.skill-summary-item { display: flex; flex-direction: column; gap: 2px; }
.skill-summary-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.skill-summary-value { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.skill-summary-value small { font-size: 0.75rem; color: var(--text-dim); font-weight: 500; }

.chart-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  color: var(--text-muted);
}
.swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.swatch-poor { background: rgba(180, 60, 60, 0.55); }
.swatch-elite { background: rgba(62, 207, 142, 0.55); }
.swatch-strong { background: rgba(100, 180, 140, 0.55); }
.swatch-solid { background: rgba(77, 163, 224, 0.55); }
.swatch-needs-work { background: rgba(224, 92, 92, 0.5); }

.chart-wrap { position: relative; }
.chart {
  display: block;
  width: 100%;
  height: auto;
  font-family: var(--mono);
}
.chart-band { opacity: 0.5; }
.band-poor { fill: rgba(180, 60, 60, 0.06); }
.band-elite { fill: rgba(62, 207, 142, 0.06); }
.band-strong { fill: rgba(100, 180, 140, 0.06); }
.band-solid { fill: rgba(77, 163, 224, 0.05); }
.band-needs-work { fill: rgba(224, 92, 92, 0.05); }
.chart-grid { stroke: var(--border-subtle); stroke-width: 1; }
.chart-ylabel { fill: var(--text-dim); font-size: 9px; text-anchor: end; }
.chart-xlabel { fill: var(--text-dim); font-size: 9px; text-anchor: middle; }
.chart-area { fill: var(--accent); opacity: 0.1; }
.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.chart-dot {
  fill: var(--bg-card);
  stroke: var(--accent);
  stroke-width: 2;
  transition: r 0.12s var(--ease);
  cursor: pointer;
}
.chart-dot:hover { r: 5.5; fill: var(--accent); }

.chart-tip {
  position: absolute;
  transform: translate(-50%, calc(-100% - 10px));
  pointer-events: none;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1px;
  z-index: 20;
  white-space: nowrap;
}
.tip-score { font-size: 0.8125rem; font-weight: 700; color: var(--text); }
.tip-date { font-size: 0.6875rem; color: var(--text-muted); }

.phase-section { margin-bottom: var(--space-6); }
.phase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}
.phase-row {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
}
.phase-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}
.phase-name { font-size: 0.875rem; font-weight: 600; color: var(--text); }
.phase-bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--bg-elevated);
  margin-bottom: 6px;
}
.phase-seg { display: block; }
.seg-poor { background: rgba(180, 60, 60, 0.65); }
.seg-needs-work { background: rgba(224, 92, 92, 0.6); }
.seg-solid { background: rgba(77, 163, 224, 0.65); }
.seg-strong { background: rgba(100, 180, 140, 0.65); }
.seg-elite { background: rgba(62, 207, 142, 0.65); }
.phase-count { font-size: 0.6875rem; color: var(--text-dim); }

.fix-list { list-style: none; margin: 0; padding: 0; }
.fix-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.fix-item:last-child { border-bottom: none; }
.fix-count { font-size: 0.6875rem; color: var(--text-dim); white-space: nowrap; }

.history-list { list-style: none; margin: 0; padding: 0; }
.history-row { border-top: 1px solid var(--border-subtle); }
.history-row:first-child { border-top: none; }
.history-link {
  display: grid;
  grid-template-columns: 110px auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-2);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  transition: background 0.15s var(--ease);
}
.history-link:hover { background: var(--bg-elevated); color: var(--text); text-decoration: none; }
.history-date { font-size: 0.75rem; color: var(--text-dim); white-space: nowrap; }
.history-score { justify-self: start; min-width: 30px; text-align: center; }
.history-corr { font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-go { color: var(--text-dim); font-size: 1rem; }
.history-link:hover .history-go { color: var(--accent); }

@media (prefers-reduced-motion: reduce) {
  .progress-card-chevron, .chart-dot { transition: none; }
}

@media (max-width: 600px) {
  .progress-grid { grid-template-columns: 1fr; }
  .skill-summary { gap: var(--space-4); }
  .history-link { grid-template-columns: 84px auto 1fr; }
  .history-go { display: none; }
}

/* ── Training Partners / social ───────────────── */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.125rem;
  height: 1.125rem;
  padding: 0 0.3125rem;
  margin-left: 0.375rem;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  color: var(--bg);
  background: var(--accent);
  border-radius: 999px;
  vertical-align: middle;
}

.social-subnav {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--space-2);
}

.social-subnav-link {
  position: relative;
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}

.social-subnav-link:hover { color: var(--text); background: var(--bg-elevated); }
.social-subnav-link.active { color: var(--accent); }

.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feed-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.feed-handle {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: var(--space-1);
}

.feed-handle:hover { text-decoration: underline; }

.feed-primary {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.feed-secondary {
  margin: var(--space-1) 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.feed-time {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: #ffb347;
  background: rgba(255, 140, 0, 0.12);
  border: 1px solid rgba(255, 140, 0, 0.25);
  border-radius: 999px;
}

.streak-badge-lg { font-size: 0.9375rem; padding: 0.5rem 1rem; }

.partner-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.partner-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-subtle);
}

.partner-row:first-child { border-top: none; }

.partner-name {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.partner-name:hover { color: var(--accent); }

.partner-add-form { max-width: 32rem; }

.inline-field-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.field-prefix {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-dim);
}

.inline-field-row .field-input { flex: 1; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-row input { margin-top: 0.125rem; accent-color: var(--accent); }

.field-optional { font-weight: 400; color: var(--text-dim); font-size: 0.8125rem; }

.field-textarea { min-height: 5rem; resize: vertical; }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }

.text-dim { color: var(--text-dim); font-size: 0.875rem; }

.profile-self-note { margin-bottom: var(--space-4); font-size: 0.875rem; }

.profile-progress-grid { margin-top: var(--space-2); }

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.share-preview-card { max-width: 36rem; }

.page-header-row .btn + .btn { margin-left: var(--space-2); }

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.info-box-success {
  border-color: rgba(76, 175, 125, 0.35);
  background: rgba(76, 175, 125, 0.08);
}

@media (max-width: 600px) {
  .feed-card { flex-direction: column; gap: var(--space-2); }
  .inline-field-row { flex-wrap: wrap; }
  .inline-field-row .btn { width: 100%; }
}

/* ─────────────────────────────────────────────
   Volleyball Chatbot Widget
   ───────────────────────────────────────────── */

.vb-chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  height: 44px;
  padding: 0 18px 0 14px;
  border-radius: 22px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(77, 163, 224, 0.45);
  transition: background 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
  white-space: nowrap;
}
.vb-chat-fab:hover {
  background: #3a8fd1;
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(77, 163, 224, 0.6);
}
.vb-chat-fab:active { transform: scale(0.97); }

.vb-chat-fab-inner {
  display: flex;
  align-items: center;
  gap: 7px;
}

.vb-chat-fab-emoji {
  font-size: 18px;
  line-height: 1;
}

.vb-chat-fab-label {
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
}

.vb-chat {
  position: fixed;
  bottom: 88px;
  right: 24px;
  z-index: 999;
  width: 360px;
  max-height: 520px;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: vbChatIn 0.22s var(--ease);
}

@keyframes vbChatIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.vb-chat[hidden] { display: none; }

.vb-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.vb-chat-header-info {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.vb-chat-avatar {
  font-size: 22px;
  line-height: 1;
}

.vb-chat-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.2;
}

.vb-chat-status {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.vb-chat-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: var(--space-1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s, background 0.12s;
}
.vb-chat-close:hover { color: var(--text); background: var(--bg-input); }

.vb-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  scroll-behavior: smooth;
}

.vb-chat-bubble {
  max-width: 86%;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.vb-chat-bubble--user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 3px;
}

.vb-chat-bubble--assistant {
  align-self: flex-start;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-subtle);
  border-bottom-left-radius: 3px;
}
.vb-chat-bubble--assistant ul,
.vb-chat-bubble--assistant ol {
  padding-left: 1.25em;
  margin: 0.25em 0;
}
.vb-chat-bubble--assistant li { margin: 0.15em 0; }
.vb-chat-bubble--assistant p { margin: 0.2em 0; }
.vb-chat-bubble--assistant p:first-child { margin-top: 0; }
.vb-chat-bubble--assistant p:last-child { margin-bottom: 0; }
.vb-chat-bubble--assistant br { display: block; content: ''; margin: 0.2em 0; }
.vb-chat-bubble--assistant h3,
.vb-chat-bubble--assistant h4,
.vb-chat-bubble--assistant h5 {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0.4em 0 0.1em;
}
.vb-chat-bubble--assistant code {
  font-family: var(--mono);
  font-size: 0.8em;
  background: rgba(255,255,255,0.07);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Typing indicator */
.vb-chat-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
}
.vb-chat-typing span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: vbTypingDot 1.2s infinite ease-in-out;
}
.vb-chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.vb-chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes vbTypingDot {
  0%, 60%, 100% { opacity: 0.3; transform: scale(0.9); }
  30% { opacity: 1; transform: scale(1.15); }
}

.vb-chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-3);
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.vb-chat-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 8px 12px;
  resize: none;
  min-height: 38px;
  max-height: 120px;
  transition: border-color 0.15s;
  overflow-y: auto;
}
.vb-chat-input::placeholder { color: var(--text-dim); }
.vb-chat-input:focus {
  outline: none;
  border-color: var(--accent);
}

.vb-chat-send {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.vb-chat-send:hover { background: #3a8fd1; }
.vb-chat-send:active { transform: scale(0.94); }

@media (max-width: 480px) {
  .vb-chat {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 76px;
  }
  .vb-chat-fab {
    right: 16px;
    bottom: 16px;
    padding: 0 14px 0 12px;
    height: 40px;
  }
  .vb-chat-fab-label { font-size: 0.8rem; }
}
