:root {
  --bg: #0a0a0a;
  --bg-secondary: #121212;
  --card: #161616;
  --card-edge: #2a2a2a;
  --text: #f8f8f8;
  --muted: #b0b0b0;
  --accent: #ff6b7a;
  --accent-2: #ff8a94;
  --good: #4CAF50;
  --needs: #FFC107;
  --poor: #F44336;
  --make: #4CAF50;
  --miss: #F44336;
  --ring-bg: #2a2a2a;
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  position: relative;
}

/* Noise/Grain texture overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

/* ─── Navbar ─── */
.navbar {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 107, 122, 0.2);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  overflow: hidden;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 100%;
  overflow: hidden;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  height: 50px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 40px;
  padding: 0;
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-tabs {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 240px;
  justify-content: flex-end;
}

.nav-tab {
  background: none;
  border: none;
  padding: 10px 20px;
  font-family: "Work Sans", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

.nav-tab:hover {
  color: var(--accent);
}

.nav-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-sign-in-btn {
  background: none;
  border: 1px solid rgba(255, 107, 122, 0.4);
  padding: 8px 18px;
  border-radius: 50px;
  font-family: "Work Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.3s;
}

.nav-sign-in-btn:hover {
  background: rgba(255, 107, 122, 0.1);
  border-color: var(--accent);
}

.nav-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Work Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  cursor: pointer;
}

.nav-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.nav-user-profile {
  position: relative;
}

.nav-profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 12px;
  min-width: 280px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 1001;
  max-height: min(76vh, 760px);
  overflow-x: hidden;
  overflow-y: auto;
}

.nav-profile-dropdown.open {
  display: block;
}

.nav-profile-info {
  padding: 16px;
  border-bottom: 1px solid var(--card-edge);
}

.nav-profile-name {
  font-weight: 600;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 2px;
}

.nav-profile-email {
  font-size: 12px;
  color: var(--muted);
}

.nav-profile-dropdown .nav-profile-action-btn {
  width: 100%;
  padding: 12px 16px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-family: "Work Sans", sans-serif;
  font-size: 14px;
  transition: background 0.2s;
}

.nav-profile-dropdown .nav-profile-action-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.nav-profile-signout-btn {
  border-top: 1px solid var(--card-edge);
}

/* ─── Player Details in Dropdown ─── */
.pd-section {
  padding: 12px 16px 0;
}

.pd-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
  font-weight: 600;
}

.pd-row {
  display: flex;
  gap: 8px;
}

.pd-select,
.pd-input {
  flex: 1;
  padding: 8px 10px;
  background: #1e1e1e;
  border: 1px solid var(--card-edge);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  font-family: "Work Sans", sans-serif;
  outline: none;
  appearance: auto;
  transition: border-color 0.2s;
}

.pd-select:focus,
.pd-input:focus {
  border-color: var(--accent);
}

.pd-input {
  width: 100%;
}

/* Sliding pill toggle */
.pd-toggle-row {
  display: flex;
  position: relative;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #1e1e1e;
  border: 1px solid var(--card-edge);
  padding: 3px;
}

.pd-toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: var(--accent);
  border-radius: 6px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  box-shadow: 0 2px 8px rgba(255, 107, 122, 0.3);
}

.pd-toggle-row.photo-active .pd-toggle-slider {
  transform: translateX(100%);
}

.pd-toggle-btn {
  flex: 1;
  padding: 7px 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.25s;
  position: relative;
  z-index: 1;
}

.pd-toggle-btn.active {
  color: #fff;
}

/* Content wrap transition */
.ws-content-wrap {
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
  max-height: 120px;
  opacity: 1;
}

.ws-content-wrap[style*="display: none"],
.ws-content-wrap[style*="display:none"] {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

/* Camera iris upload button */
.pd-iris-btn {
  width: 100%;
  padding: 14px 8px;
  background: #1e1e1e;
  border: 1px solid var(--card-edge);
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.3s, background 0.3s;
}

.pd-iris-btn:hover {
  border-color: var(--accent);
  background: #222;
}

.iris-ring {
  width: 48px;
  height: 48px;
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  background: #2a2a2a;
}

.iris-blade {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  clip-path: polygon(50% 50%, 35% 0%, 65% 0%);
  background: var(--accent);
  opacity: 0.7;
  transform: rotate(calc(var(--i) * 60deg));
  transform-origin: center center;
  transition: clip-path 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.pd-iris-btn:hover .iris-blade {
  clip-path: polygon(50% 50%, 20% -10%, 80% -10%);
  opacity: 0.9;
}

/* Iris open animation on photo mode entry */
.iris-ring.iris-opening .iris-blade {
  animation: irisOpen 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: calc(var(--i) * 0.04s);
}

@keyframes irisOpen {
  0% {
    clip-path: polygon(50% 50%, 45% 30%, 55% 30%);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    clip-path: polygon(50% 50%, 35% 0%, 65% 0%);
    opacity: 0.7;
  }
}

.iris-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #fff;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
}

.pd-iris-btn:hover .iris-center {
  opacity: 1;
  transform: scale(1.1);
}

.iris-label {
  font-size: 11px;
  color: var(--muted);
  font-family: "Work Sans", sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s;
}

.pd-iris-btn:hover .iris-label {
  color: var(--text);
}

.pd-save-btn {
  width: calc(100% - 32px);
  margin: 12px 16px 0;
  padding: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  font-family: "Work Sans", sans-serif;
  cursor: pointer;
  transition: opacity 0.2s;
}

.pd-save-btn:hover {
  opacity: 0.9;
}

.pd-history-section {
  padding-top: 8px;
}

.pd-history-toggle {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--card-edge);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-dark);
  text-align: left;
  font-size: 13px;
  font-family: "Work Sans", sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.pd-history-toggle:hover {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
}

.pd-history-toggle.open {
  border-color: var(--accent);
}

.pd-history-panel {
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--card-edge);
  background: rgba(0, 0, 0, 0.18);
  display: none;
}

.pd-history-panel.open {
  display: block;
}

.pd-history-status {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.pd-history-list {
  display: grid;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.pd-history-item {
  width: 100%;
  border: 1px solid #303030;
  border-radius: 8px;
  background: #171717;
  color: var(--text-dark);
  text-align: left;
  padding: 8px 9px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.pd-history-item:hover {
  border-color: rgba(255, 107, 122, 0.65);
  background: rgba(255, 107, 122, 0.09);
}

.pd-history-item:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.pd-history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pd-history-item-date {
  font-size: 11px;
  color: var(--text);
  font-weight: 600;
}

.pd-history-item-session {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.pd-history-item-stats {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

/* Auto-save toggle in profile dropdown */
.pd-autosave-section {
  padding-top: 4px;
  padding-bottom: 0;
}
.pd-autosave-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dark);
  font-family: 'Work Sans', sans-serif;
}
.pd-autosave-label input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.pd-saved-msg {
  color: #3DD68C;
  font-size: 12px;
  text-align: center;
  margin: 6px 0 0;
  padding: 0 16px;
}

/* ─── Profile Picker ─── */
.pd-profile-selector { display: flex; gap: 6px; align-items: center; }
.pd-profile-chip {
  flex: 1; padding: 8px 12px; background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color); border-radius: 8px;
  color: var(--text-dark); font-size: 13px; font-weight: 600;
  cursor: pointer; text-align: left; font-family: 'Work Sans', sans-serif;
}
.pd-profile-add {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,107,122,0.15); border: none;
  color: var(--primary-color); font-size: 18px; cursor: pointer; line-height: 1;
}
.pd-profile-list {
  margin-top: 6px; display: flex; flex-direction: column; gap: 4px;
  max-height: 160px; overflow-y: auto;
}
.pd-profile-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 6px; cursor: pointer;
  background: rgba(255,255,255,0.03); font-size: 12px;
  color: var(--text-dark); border: 1px solid transparent;
  font-family: 'Work Sans', sans-serif;
}
.pd-profile-item.active { background: rgba(255,107,122,0.1); border: 1px solid var(--primary-color); }
.pd-profile-item .pd-profile-merge {
  font-size: 10px; color: var(--text-gray); cursor: pointer;
  padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border-color);
  background: none; font-family: 'Work Sans', sans-serif;
}
.pd-profile-item .pd-profile-delete {
  font-size: 10px; color: #ff4d4d; cursor: pointer;
  padding: 2px 6px; border-radius: 4px; border: 1px solid rgba(255,77,77,0.3);
  background: none; margin-left: 4px; font-family: 'Work Sans', sans-serif;
}
.pd-stat-value {
  font-size: 22px; font-weight: 700; font-family: 'Bebas Neue', sans-serif;
  color: var(--text-dark); letter-spacing: 0.5px;
}
.pd-profile-name-input {
  width: 100%; padding: 8px 10px; background: var(--bg-elevated);
  border: 1px solid var(--primary-color); border-radius: 8px;
  color: var(--text-dark); font-size: 13px; font-family: 'Work Sans', sans-serif;
  outline: none; margin-top: 6px;
}
#pdHandednessRow.hand-left .pd-toggle-slider { transform: translateX(100%); }

/* ─── Wingspan Photo Modal ─── */
.wingspan-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wingspan-modal-content {
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 16px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.wingspan-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--card-edge);
}

.wingspan-modal-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.wingspan-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.wingspan-modal-body {
  padding: 20px;
}

.wingspan-modal-hint {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 16px;
}

.wingspan-modal-status {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 8px 0;
}

.wingspan-modal-result {
  text-align: center;
  color: var(--text);
  font-size: 15px;
  padding: 12px 0 0;
}

.wingspan-modal-result .pd-save-btn {
  width: auto;
  margin: 12px auto 0;
  padding: 10px 24px;
  display: inline-block;
}

/* ─── Footer ─── */
.site-footer {
  border-top: 1px solid rgba(255, 107, 122, 0.15);
  padding: 40px 24px;
  margin-top: 60px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-inner img {
  height: 32px;
  width: auto;
  filter: brightness(1.1);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: white;
}

h1,
h2,
h3,
h4 {
  font-family: "Bebas Neue", "Work Sans", sans-serif;
  margin: 0;
  letter-spacing: 0.04em;
}

p {
  margin: 0;
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* File input overlays drop zone - user clicks it directly to open picker */
.file-input-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.app-shell {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 20px 14px 28px;
  overflow-x: hidden;
  max-width: 100vw;
}

.app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.03em;
  box-shadow: var(--shadow);
}

.app-header h1 {
  font-size: 1.4rem;
}

.app-header p {
  font-size: 0.9rem;
}

.content {
  display: grid;
  gap: 14px;
}

.screen {
  display: grid;
  gap: 14px;
}

.card {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow);
}

.intro-card,
.upload-card {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.intro-card h2 {
  margin-bottom: 8px;
}

.drop-zone {
  position: relative;
  display: block;
  width: 100%;
  border: 2px dashed #4a4a4a;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  padding: 22px 12px;
  text-align: center;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.drop-zone:hover,
.drop-zone.dragging {
  border-color: var(--accent);
  transform: translateY(-1px);
  background: rgba(255, 107, 122, 0.09);
}

.drop-title {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
}

.drop-subtitle {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.file-name {
  margin: 12px 0;
  padding: 10px 12px;
  background: #141414;
  border-radius: var(--radius-sm);
  border: 1px solid #333333;
  font-size: 0.95rem;
  color: #e0e0e0;
}

.camera-angle-group {
  margin: 14px 0 12px;
  padding: 0;
  border: 0;
}

.camera-angle-label {
  margin-bottom: 10px;
  color: #f5f9fd;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.camera-angle-options {
  display: grid;
  gap: 10px;
}

.camera-angle-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #333333;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.camera-angle-option:hover {
  border-color: rgba(255, 107, 122, 0.45);
  background: rgba(255, 107, 122, 0.08);
}

.camera-angle-option input[type="radio"] {
  margin: 3px 0 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.camera-angle-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.camera-angle-title {
  color: #f5f9fd;
  font-size: 1rem;
  font-weight: 700;
}

.camera-angle-helper {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.camera-angle-option:has(input:checked) {
  border-color: rgba(255, 107, 122, 0.9);
  background: rgba(255, 107, 122, 0.12);
  box-shadow: 0 0 0 1px rgba(255, 107, 122, 0.2);
}

.camera-angle-option:has(input:focus-visible) {
  outline: 2px solid rgba(255, 156, 166, 0.85);
  outline-offset: 2px;
}

.error-box {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #7f2f33;
  color: #ffdce0;
  background: rgba(127, 47, 51, 0.28);
  font-size: 0.92rem;
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.06em;
  font-size: 1.02rem;
}

.primary-btn {
  width: 100%;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.primary-btn:disabled {
  cursor: default;
  opacity: 0.6;
}

.secondary-btn {
  color: var(--text);
  background: #1d1d1d;
  border: 1px solid #3a3a3a;
}

@media (min-width: 640px) {
  .camera-angle-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.loading-screen {
  min-height: 300px;
  place-items: center;
}

.loading-card {
  max-width: 560px;
  text-align: center;
  display: grid;
  gap: 10px;
}

.loading-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffb3ba;
  font-weight: 700;
}

.progress-percent {
  font-size: 1.25rem;
  color: #ffffff;
  font-weight: 700;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.05em;
  margin: 0 auto;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #1d1d1d;
  border: 1px solid #353535;
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff9ca6);
  transition: width 0.35s ease;
}

.progress-text {
  color: #c8d9ea;
  font-size: 0.95rem;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.results-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Auto-save status indicator */
.auto-save-status {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.auto-save-status.saving {
  color: #c8d9ea;
  background: rgba(255,255,255,0.06);
}
.auto-save-status.ok {
  color: #3DD68C;
  background: rgba(61,214,140,0.1);
}
.auto-save-status.error {
  color: var(--accent);
  background: rgba(255,107,122,0.1);
}

.history-session-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: #c8d9ea;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 4px 10px;
  white-space: nowrap;
}

.session-header {
  display: grid;
  gap: 12px;
}

.gauge-wrap {
  display: grid;
  place-items: center;
  gap: 10px;
  padding-bottom: 8px;
  overflow: visible;
}

.gauge {
  --value: 0;
  --gauge-color: var(--poor);
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: conic-gradient(var(--gauge-color) calc(var(--value) * 1%), var(--ring-bg) 0);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  overflow: visible;
}

.gauge-inner {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: #101010;
  border: 1px solid #343434;
  display: grid;
  place-items: center;
  align-content: center;
  grid-auto-rows: min-content;
  text-align: center;
  padding: 8px 8px 12px;
  overflow: visible;
}

.gauge-value {
  font-size: 2.7rem;
  line-height: 1;
  font-family: "Bebas Neue", sans-serif;
  color: #f5f9fd;
}

.gauge-score {
  font-size: 0.88rem;
  color: #d8e4ef;
  margin-top: -6px;
}

.gauge-caption {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 0;
  line-height: 1.2;
}

.gauge-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: #d8e3ef;
  min-width: 130px;
  text-align: center;
}

/* ─── Change 2: Shot Strip ─── */

.quick-stats {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid #333333;
  background: #121212;
  text-align: center;
  color: #ececec;
  font-size: 1rem;
}

.shot-strip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 4px 0;
}

.strip-dot-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.strip-dot-btn:hover {
  transform: scale(1.25);
}

.strip-dot-btn.make {
  background: var(--make);
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
}

.strip-dot-btn.miss {
  background: var(--miss);
  box-shadow: 0 0 6px rgba(244, 67, 54, 0.5);
}

.strip-dot-btn.unknown {
  background: #666;
  box-shadow: 0 0 4px rgba(102, 102, 102, 0.4);
}

.shot-strip-label {
  margin-top: 8px;
  font-size: 0.88rem;
  color: var(--muted);
}

/* ─── Insights ─── */

.results-screen section.card > h3,
.results-screen .table-header h3 {
  margin: 0 0 10px;
  color: #9ca3af;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.insight-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.insight-card {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid #313131;
  background: #131313;
  display: grid;
  gap: 8px;
}

.insight-label {
  font-size: 0.68rem;
  color: #9ca3af;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
}

.focus-session-card {
  border-left: 3px solid #f5c518;
  background: #151515;
}

.insight-title {
  color: #f4f9ff;
  font-size: 1.24rem;
  font-weight: 800;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  margin: 0;
}

.insight-text {
  color: var(--muted);
  font-size: 0.95rem;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  margin: 0;
}

.insight-tip {
  color: #d6d7db;
  font-size: 0.88rem;
  margin: 0;
}

/* ─── Drill Recommendations ─── */

.drill-section h3 {
  margin-bottom: 10px;
}

.drill-list {
  display: grid;
  gap: 10px;
}

.drill-card {
  border: 1px solid #303030;
  border-radius: 10px;
  background: #141414;
  padding: 12px;
  display: grid;
  gap: 6px;
}

.drill-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.drill-card-check {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.drill-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 3px 8px;
}

.drill-badge-priority {
  background: #991b1b;
  color: #fecaca;
}

.drill-badge-suggested {
  background: #854d0e;
  color: #fef3c7;
}

.drill-card-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e5e7eb;
  line-height: 1.3;
}

.drill-card-tip {
  font-size: 0.82rem;
  color: #9ca3af;
  line-height: 1.35;
}

.drill-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  color: #6b7280;
}

.drill-card-duration::before {
  content: "Duration: ";
}

.drill-card-channel::before {
  content: "Source: ";
}

.drill-card-why {
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.35;
  border-top: 1px solid #252525;
  padding-top: 6px;
  margin-top: 2px;
}

.drill-card-why strong {
  color: #9ca3af;
}

.drill-card-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #3d5f8b;
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(33, 150, 243, 0.12);
  color: #b8d8ff;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.drill-card-video-btn:hover {
  background: rgba(33, 150, 243, 0.22);
  border-color: #5a8ec4;
}

.drill-card-video-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Makes Vs. Misses Trends ─── */

.trends-rows {
  display: grid;
  gap: 10px;
}

.trend-row {
  border: 1px solid #303030;
  border-radius: 10px;
  background: #141414;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.trend-row.muted {
  opacity: 0.5;
}

.trend-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.trend-name {
  font-size: 0.82rem;
  color: #e5e7eb;
}

.trend-key-diff {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #111827;
  background: #f5c518;
  border-radius: 999px;
  padding: 3px 7px;
}

.trend-row-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
}

.trend-grade {
  min-width: 28px;
  min-height: 22px;
  border-radius: 999px;
  font-size: 0.76rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #f9fafb;
}

.trend-grade.make {
  background: #166534;
}

.trend-grade.miss {
  background: #991b1b;
}

.trend-delta-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.trend-half {
  height: 8px;
  border-radius: 999px;
  background: #1f2937;
  overflow: hidden;
}

.trend-half-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.trend-half.make .trend-half-fill {
  background: #22c55e;
}

.trend-half.miss .trend-half-fill {
  background: #ef4444;
  margin-left: auto;
}

.trend-delta-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #a1a1aa;
  font-size: 0.9rem;
  line-height: 8px;
}

.trends-insight {
  margin-top: 12px;
  color: #c8d1db;
  font-size: 0.88rem;
  line-height: 1.4;
}

/* ─── Radar Chart ─── */

.check-list {
  display: grid;
  gap: 10px;
}

.radar-block {
  display: grid;
  gap: 12px;
}

.radar-title {
  text-align: center;
  font-family: "Bebas Neue", "Work Sans", sans-serif;
  letter-spacing: 0.07em;
  color: #ececec;
  font-size: 1.05rem;
}

.radar-canvas-wrap {
  position: relative;
  width: min(320px, 100%);
  margin: 0 auto;
  display: grid;
  place-items: center;
  overflow: visible;
}

.form-radar-canvas {
  width: min(320px, 100%);
  aspect-ratio: 1 / 1;
  display: block;
}

.radar-label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}

.radar-axis-label {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 1px solid #3a3a3a;
  background: rgba(18, 18, 18, 0.9);
  color: #dcdcdc;
  border-radius: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  line-height: 1.15;
  max-width: 100px;
  white-space: normal;
  text-wrap: balance;
  text-align: center;
  padding: 5px 7px;
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.radar-axis-label:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: #6a6a6a;
}

.radar-axis-grade {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(0, 0, 0, 0.6);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  color: #101010;
  display: grid;
  place-items: center;
  cursor: pointer;
  pointer-events: auto;
}

.radar-legend {
  display: grid;
  gap: 4px;
  justify-content: center;
}

.radar-legend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.radar-legend-item {
  color: #d5d5d5;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.radar-legend-item.muted {
  color: #999;
}

.legend-line {
  width: 24px;
  height: 0;
  border-top: 2px solid;
  display: inline-block;
}

.legend-line.session {
  border-color: #ff9800;
}

.legend-line.makes {
  border-color: #4CAF50;
}

.legend-line.misses {
  border-color: #F44336;
}

.legend-line.dashed {
  border-top-style: dashed;
}

.legend-line.solid {
  border-top-style: solid;
}

.radar-footer {
  display: grid;
  gap: 4px;
  text-align: center;
}

.radar-score-line {
  color: #eeeeee;
  font-size: 0.95rem;
}

.radar-summary-line {
  color: #c8c8c8;
  font-size: 0.9rem;
}

.form-profile-callout {
  margin-top: 8px;
  background: #222222;
  border: 1px solid #323232;
  border-radius: 10px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}

.form-profile-label {
  color: #9ca3af;
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.form-profile-value {
  margin-top: 4px;
  color: #f3f4f6;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.form-profile-grade {
  font-weight: 700;
}

.form-profile-grade.strong {
  color: #22c55e;
}

.tl-expanded {
  margin-top: 10px;
  animation: tlSlideDown 0.2s ease;
}

@keyframes tlSlideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tl-detail-card {
  border: 1px solid #3a3a3a;
  border-radius: var(--radius-md);
  background: #1a1a1a;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.tl-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tl-detail-name {
  color: #f0f0f0;
  font-weight: 700;
  font-size: 1rem;
}

.tl-detail-score {
  color: #d8d8d8;
  font-weight: 700;
  font-size: 0.95rem;
}

.tl-detail-compare {
  color: #9cb2c8;
  font-size: 0.86rem;
}

.tl-detail-feedback {
  color: #d4d4d4;
  font-size: 0.9rem;
  margin: 4px 0 0;
  line-height: 1.4;
}

/* ─── Legacy badge (still used in details) ─── */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 98px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge.good {
  background: rgba(76, 175, 80, 0.2);
  color: #9af2cb;
  border: 1px solid #2e7d32;
}

.badge.needs_work {
  background: rgba(255, 193, 7, 0.2);
  color: #ffd78f;
  border: 1px solid #8a6a2f;
}

.badge.poor {
  background: rgba(244, 67, 54, 0.18);
  color: #ffc1c4;
  border: 1px solid #8d3a3f;
}

.badge.unavailable {
  background: rgba(124, 145, 166, 0.2);
  color: #c3d2e1;
  border: 1px solid #526275;
}

.check-sub {
  font-size: 0.86rem;
  color: #9cb2c8;
}

/* ─── Court ─── */

.court-wrap {
  border: 1px solid #313131;
  background: radial-gradient(circle at 50% 0%, rgba(255, 107, 122, 0.14), rgba(16, 16, 16, 0.95));
  border-radius: var(--radius-md);
  padding: 10px;
  position: relative;
}

#shotChartSvg {
  width: 100%;
  height: auto;
  display: block;
}

.court-line {
  fill: none;
  stroke: #b8b8b8;
  stroke-width: 1.2;
}

.court-line.faint {
  opacity: 0.45;
}

.court-arc-label {
  fill: #9ca3af;
  font-size: 3px;
  letter-spacing: 0.03em;
}

.zone-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 6px;
  color: #d3d3d3;
  font-size: 0.85rem;
  text-align: center;
}

.shot-chart-legend {
  margin-top: 8px;
  display: flex;
  justify-content: center;
  gap: 16px;
  color: #d0d4da;
  font-size: 0.8rem;
}

.shot-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.make {
  background: #22c55e;
}

.legend-dot.miss {
  background: #ef4444;
}

.shot-dot-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: #111111;
  border: 1px solid #3a3a3a;
  border-radius: 8px;
  padding: 6px 9px;
  font-size: 0.76rem;
  color: #f0f4f8;
  white-space: nowrap;
  pointer-events: none;
  z-index: 4;
}

.zone-stats,
.zone-tips {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.zone-stat-chip,
.zone-tip-chip {
  border-radius: 12px;
  border: 1px solid #333333;
  background: #161616;
  padding: 8px 12px;
  color: #e2e2e2;
  font-size: 0.88rem;
  line-height: 1.3;
}

.zone-stat-chip strong,
.zone-tip-chip strong {
  display: inline-block;
  min-width: 58px;
  letter-spacing: 0.04em;
}

.zone-tip-chip.empty {
  color: #a7a7a7;
}

.zone-stat-chip.zone-extra,
.zone-tip-chip.zone-extra {
  grid-column: 1 / -1;
  border-style: dashed;
  background: #141414;
}

/* ─── Shot Table ─── */

.table-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
}

.sort-label {
  color: #d2d2d2;
  font-size: 0.86rem;
}

#shotSort {
  background: #171717;
  color: #ececec;
  border: 1px solid #3b3b3b;
  border-radius: 8px;
  padding: 8px 10px;
}

.shot-list {
  margin-top: 10px;
}

.shot-list-shell {
  border: 1px solid #313131;
  border-radius: var(--radius-md);
  background: #141414;
  overflow: hidden;
}

.shot-card {
  border-bottom: 1px solid #2a2a2a;
  position: relative;
  background: #141414;
}

.shot-card:last-child {
  border-bottom: 0;
}

.shot-card summary {
  list-style: none;
  cursor: pointer;
  padding: 12px;
  display: grid;
  grid-template-columns: auto auto auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
}

.shot-card summary::-webkit-details-marker {
  display: none;
}

.shot-num {
  color: #f6f6f6;
  font-weight: 700;
}

.outcome-pill {
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 999px;
  padding: 7px 11px;
  min-height: 30px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
}

.outcome-toggle {
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.16s ease, filter 0.16s ease;
}

.outcome-toggle:hover {
  filter: brightness(1.05);
}

.outcome-toggle:active {
  transform: scale(0.99);
}

.outcome-toggle.flash {
  animation: outcome-flash 0.42s ease;
}

@keyframes outcome-flash {
  0% { transform: scale(1); }
  35% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.outcome-pill.make {
  color: #d5ffe5;
  background: #166534;
}

.outcome-pill.miss {
  color: #ffe0e0;
  background: #991b1b;
}

.outcome-pill.unknown {
  color: #d2e0ef;
  background: #334155;
}

/* ─── Correction tooltip ─── */

.correction-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  animation: tooltipFade 0.3s ease;
  pointer-events: none;
}

.correction-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #333;
}

@keyframes tooltipFade {
  from { opacity: 0; transform: translateX(-50%) translateY(4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.shot-zone {
  color: #d2d2d2;
  font-size: 0.86rem;
  text-transform: capitalize;
}

.shot-score {
  justify-self: end;
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.84rem;
  white-space: nowrap;
  border: 1px solid #374151;
  border-radius: 999px;
  padding: 4px 10px;
  line-height: 1;
  min-width: 34px;
  text-align: center;
}

.form-grade-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.form-grade-letter {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}

.form-grade-score {
  color: #d9d9d9;
  font-size: 0.76rem;
}

.expand-caret {
  color: #b7b7b7;
  transition: transform 0.2s ease;
  font-size: 1.1rem;
  justify-self: end;
}

.shot-card[open] .expand-caret {
  transform: rotate(90deg);
}

/* ─── Shot detail expanded: video overlay + coaching layout ─── */

.shot-detail {
  border-top: 1px solid #303030;
  padding: 10px 12px 12px;
  display: grid;
  gap: 10px;
}

.shot-detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
}

/* -- Annotated stills -- */

.annotated-stills-mount {
  min-height: 60px;
}

.shot-detail-compact {
  display: grid;
  gap: 10px;
}

.shot-detail-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.shot-mini-radar-wrap {
  width: 150px;
  min-width: 150px;
  height: 150px;
  border: 1px solid #313131;
  border-radius: 12px;
  background: radial-gradient(circle at 45% 35%, rgba(255, 255, 255, 0.05), rgba(10, 10, 10, 0.96));
  display: grid;
  place-items: center;
}

.shot-mini-radar-canvas {
  width: 150px;
  height: 150px;
  display: block;
}

.shot-detail-top-actions {
  display: grid;
  gap: 8px;
  align-content: center;
}

.shot-form-score {
  font-size: 0.8rem;
  color: #94a3b8;
}

.watch-shot-btn {
  width: fit-content;
  border: 1px solid #3f6e44;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(76, 175, 80, 0.16);
  color: #d9f5df;
  cursor: pointer;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.05em;
}

.watch-shot-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.shot-inline-video-wrap {
  border: 1px solid #353535;
  border-radius: var(--radius-sm);
  background: #000;
  overflow: hidden;
}

.shot-inline-video {
  width: 100%;
  display: block;
  max-height: 320px;
  background: #000;
}

.remove-shot-btn {
  color: #fca5a5;
  font-size: 0.86rem;
  text-decoration: underline;
  width: fit-content;
}

.remove-shot-btn:hover {
  color: #fecaca;
}

.shot-feedback-lines {
  display: grid;
  gap: 6px;
}

.shot-feedback-item {
  border-radius: 8px;
  border: 1px solid #2e2e2e;
  background: #171717;
  display: grid;
  grid-template-rows: auto 0fr;
  transition: border-color 0.2s ease, background-color 0.2s ease, grid-template-rows 0.24s ease;
}

.shot-feedback-item[open] {
  grid-template-rows: auto 1fr;
}

.shot-feedback-item.good {
  border-color: rgba(76, 175, 80, 0.35);
}

.shot-feedback-item.needs_work {
  border-color: rgba(255, 193, 7, 0.35);
}

.shot-feedback-item.poor {
  border-color: rgba(244, 67, 54, 0.35);
}

.shot-feedback-line {
  list-style: none;
  padding: 10px;
  display: grid;
  gap: 4px;
  font-size: 0.88rem;
  line-height: 1.3;
  color: #dadada;
  cursor: pointer;
}

.shot-feedback-line::-webkit-details-marker {
  display: none;
}

.shot-feedback-line:focus-visible {
  outline: 2px solid rgba(33, 150, 243, 0.6);
  outline-offset: -1px;
  border-radius: 8px;
}

.shot-feedback-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: center;
}

.shot-feedback-chevron {
  color: #a8a8a8;
  font-size: 0.78rem;
  transform-origin: center;
  transition: transform 0.2s ease, color 0.2s ease;
}

.shot-feedback-item[open] .shot-feedback-chevron {
  transform: rotate(90deg);
  color: #e2e2e2;
}

.shot-feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shot-feedback-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e5e7eb;
}

.shot-feedback-tip {
  font-size: 0.8rem;
  color: #9ca3af;
  line-height: 1.35;
}

.shot-feedback-expand-wrap {
  overflow: hidden;
}

.shot-feedback-expand {
  margin: 0 10px 10px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #343434;
  background: rgba(0, 0, 0, 0.22);
  display: grid;
  gap: 6px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.shot-feedback-item[open] .shot-feedback-expand {
  opacity: 1;
  transform: translateY(0);
}

.shot-feedback-expand-title {
  font-family: "Bebas Neue", "Work Sans", sans-serif;
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  color: #efefef;
}

.shot-feedback-expand-text {
  color: #cfcfcf;
  font-size: 0.82rem;
  line-height: 1.35;
}

.shot-feedback-grade {
  min-width: 28px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  background: #4a4a4a;
  color: #f9fafb;
}

.shot-feedback-grade.good {
  background: #166534;
}

.shot-feedback-grade.needs_work {
  background: #854d0e;
}

.shot-feedback-grade.poor {
  background: #991b1b;
}

.shot-drills {
  border: 1px solid #2c2c2c;
  border-radius: 10px;
  background: #111111;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.shot-drills-title {
  font-size: 0.68rem;
  color: #9ca3af;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.shot-drills-grid {
  display: grid;
  gap: 8px;
}

.shot-drill-card {
  border: 1px solid #343434;
  border-radius: 10px;
  background: #171717;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.shot-drill-label {
  font-size: 0.66rem;
  color: #a8b0ba;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.shot-drill-title {
  color: #f4f7fb;
  font-size: 0.92rem;
  font-weight: 700;
}

.shot-drill-tip {
  color: #d2d4d8;
  font-size: 0.84rem;
  line-height: 1.35;
}

.shot-drill-channel {
  color: #9ca3af;
  font-size: 0.78rem;
}

.watch-drill-btn {
  border: none;
  background: none;
  color: #93c5fd;
  text-align: left;
  padding: 0;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.watch-drill-btn:hover {
  color: #bfdbfe;
}

.drill-card-video-wrap {
  border-radius: var(--radius-sm);
  background: #000;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin-top: 8px;
}

.drill-card-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.drill-video-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.84);
  display: grid;
  place-items: center;
  padding: 12px;
}

.drill-video-frame-wrap {
  width: min(90vw, 480px);
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
}

.drill-video-iframe,
.drill-video-placeholder {
  width: 100%;
  height: 100%;
  border: 0;
}

.drill-video-placeholder {
  display: grid;
  place-items: center;
  color: #f3f4f6;
  font-size: 1rem;
  text-align: center;
  padding: 12px;
}

.drill-video-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 1px solid #4b5563;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.9);
  color: #f9fafb;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.phase-viewer {
  display: grid;
  gap: 8px;
}

.phase-video-shell {
  position: relative;
  border: 4px solid var(--phase-color, var(--needs));
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.phase-video {
  width: 100%;
  max-height: 420px;
  display: block;
  background: #000;
}

.phase-overlay {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: #fff;
  cursor: pointer;
  display: grid;
  grid-template-rows: 1fr auto 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  z-index: 4;
}

.phase-overlay[hidden] {
  display: none;
}

.phase-overlay-label {
  grid-row: 2;
  font-family: "Bebas Neue", "Work Sans", sans-serif;
  font-size: 2rem;
  letter-spacing: 0.06em;
  color: #f4f4f4;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.phase-overlay-grade {
  grid-row: 4;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}

.phase-overlay-grade.good {
  background: var(--good);
}

.phase-overlay-grade.needs_work {
  background: var(--needs);
  color: #221a00;
}

.phase-overlay-grade.poor {
  background: var(--poor);
}

.phase-progress-track {
  width: 100%;
  height: 4px;
  background: #242424;
  border-radius: 999px;
  overflow: hidden;
}

.phase-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--phase-color, var(--needs));
  transition: background-color 0.25s ease, width 0.08s linear;
}

.phase-summary-bar {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #2f2f2f;
}

.phase-summary-segment {
  flex: 1 1 0;
  min-height: 36px;
  border: none;
  cursor: pointer;
  color: #f7f7f7;
  font-family: "Work Sans", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: grid;
  place-items: center;
  padding: 8px 6px;
  transition: filter 0.16s ease, box-shadow 0.16s ease;
}

.phase-summary-segment.good {
  background: rgba(76, 175, 80, 0.35);
}

.phase-summary-segment.needs_work {
  background: rgba(255, 193, 7, 0.35);
  color: #1e1700;
}

.phase-summary-segment.poor {
  background: rgba(244, 67, 54, 0.35);
}

.phase-summary-segment + .phase-summary-segment {
  border-left: 1px solid rgba(0, 0, 0, 0.35);
}

.phase-summary-segment:hover {
  filter: brightness(1.1);
}

.phase-summary-segment.active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.phase-summary-label {
  line-height: 1.1;
}

.phase-detail-card {
  border-radius: var(--radius-sm);
  border: 1px solid #343434;
  background: #171717;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.phase-detail-title {
  font-family: "Bebas Neue", "Work Sans", sans-serif;
  letter-spacing: 0.06em;
  font-size: 1rem;
  color: #f0f0f0;
}

.phase-detail-lines {
  display: grid;
  gap: 7px;
}

.phase-detail-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: start;
  font-size: 0.85rem;
  color: #dbdbdb;
}

.phase-check-icon {
  grid-row: 1 / span 2;
  width: 18px;
}

.phase-check-main {
  line-height: 1.28;
}

.phase-check-metric {
  color: #9f9f9f;
  font-size: 0.75rem;
  margin-top: -2px;
}

.stills-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.stills-empty {
  color: var(--muted);
  font-size: 0.88rem;
  padding: 12px;
}

.still-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #111;
  border: 1px solid #2a2a2a;
  flex-shrink: 0;
  width: 240px;
}

.still-img-wrap {
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}

.still-img-wrap:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.still-img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  display: block;
}

.still-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.still-label {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #f0f0f0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 999px;
  z-index: 2;
  pointer-events: none;
}

.still-good-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(76, 175, 80, 0.85);
  color: #fff;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  z-index: 2;
  pointer-events: none;
}

/* -- Metric bars (per-still angle gauges) -- */

.metric-wrap {
  padding: 6px 8px 8px;
}

.metric-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  width: 90px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-bar {
  position: relative;
  flex: 1;
  height: 8px;
  background: #2a2a2a;
  border-radius: 4px;
  overflow: hidden;
}

.metric-ideal {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(76, 175, 80, 0.3);
  border-radius: 4px;
}

.metric-marker {
  position: absolute;
  top: -2px;
  width: 4px;
  height: 12px;
  border-radius: 2px;
  transform: translateX(-50%);
}

.metric-val {
  font-size: 0.62rem;
  font-weight: 600;
  color: #ccc;
  width: 30px;
  text-align: right;
  flex-shrink: 0;
}

/* -- Lightbox overlay -- */

.still-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.still-lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  cursor: default;
}

.still-lightbox-inner img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.still-lightbox-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: var(--radius-sm);
}

.still-lightbox-close {
  position: absolute;
  top: -12px;
  right: -12px;
  background: rgba(40, 40, 40, 0.9);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 1001;
  transition: background 0.15s;
}

.still-lightbox-close:hover {
  background: rgba(255, 70, 70, 0.9);
}

.still-lightbox-label {
  text-align: center;
  color: #f0f0f0;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.still-lightbox-inner .metric-wrap {
  margin-top: 10px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.still-lightbox-inner .metric-label {
  color: #ccc;
  width: 120px;
  font-size: 0.78rem;
}

.still-lightbox-inner .metric-val {
  font-size: 0.78rem;
}

.still-lightbox-inner .metric-bar {
  height: 10px;
}

/* -- Inline clip viewer -- */

.clip-inline {
  padding: 0 12px 8px;
}

.clip-inline video {
  width: 100%;
  border-radius: var(--radius-sm);
  max-height: 360px;
  background: #000;
}

/* -- Watch clip button -- */

.watch-btn {
  width: fit-content;
  border: 1px solid #545454;
  border-radius: 999px;
  padding: 8px 12px;
  background: #1d1d1d;
  color: #f0f0f0;
  cursor: pointer;
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.05em;
}

.watch-btn:hover {
  background: #2a2a3e;
}

/* -- Coaching panel (right side) -- */

.shot-coaching-panel {
  display: grid;
  gap: 10px;
  align-content: start;
}

.coaching-highlights {
  display: grid;
  gap: 8px;
}

.coaching-highlight {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-left: 4px solid #666;
  display: grid;
  gap: 2px;
}

.coaching-highlight.poor {
  background: rgba(244, 67, 54, 0.10);
  border-left-color: var(--poor);
}

.coaching-highlight.needs_work {
  background: rgba(255, 193, 7, 0.10);
  border-left-color: var(--needs);
}

.coaching-highlight.good {
  background: rgba(76, 175, 80, 0.10);
  border-left-color: var(--good);
}

.coaching-highlight.muted {
  background: rgba(255, 255, 255, 0.03);
  border-left-color: #555;
  color: var(--muted);
  font-size: 0.88rem;
}

.ch-name {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #e8e8e8;
}

.ch-feedback {
  font-size: 0.88rem;
  color: #d4d4d4;
  line-height: 1.4;
}

.coaching-detail-toggle {
  margin-top: 4px;
}

.coaching-detail-toggle > summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--muted);
  padding: 6px 0;
  list-style: none;
}

.coaching-detail-toggle > summary::-webkit-details-marker {
  display: none;
}

.coaching-detail-toggle > summary::before {
  content: "\25B6  ";
  font-size: 0.7rem;
}

.coaching-detail-toggle[open] > summary::before {
  content: "\25BC  ";
}

.shot-mini-checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.shot-check-mini {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
}

.mini-tl {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.06);
}

.shot-check-mini-label {
  font-size: 0.78rem;
  color: #ccc;
  line-height: 1.2;
}

.corrections-controls {
  margin-top: 10px;
}

.corrections-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.corrections-count {
  color: #cde0f2;
  font-size: 0.9rem;
}

.save-status {
  margin-top: 8px;
  min-height: 1.2em;
  color: #b9cbde;
  font-size: 0.88rem;
}

.save-status.ok {
  color: #95edc6;
}

.save-status.error {
  color: #ffb0b5;
}

.session-summary p {
  margin-top: 8px;
}

.empty-state {
  border: 1px dashed #444444;
  border-radius: 12px;
  padding: 12px;
  color: #cccccc;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
}

.dot-make {
  fill: var(--make);
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 0.3;
}

.dot-miss {
  fill: var(--miss);
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 0.3;
}

.dot-unknown {
  fill: #8ba0b5;
  stroke: rgba(255, 255, 255, 0.25);
  stroke-width: 0.3;
}

/* ─── Desktop ─── */

@media (min-width: 840px) {
  .app-shell {
    padding: 26px 22px 32px;
  }

  .session-header {
    grid-template-columns: 220px 1fr;
    align-items: center;
    gap: 20px;
  }

  .insight-grid {
    grid-template-columns: 1fr 1fr;
  }

  .zone-stats,
  .zone-tips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

}

/* ─── Mobile ─── */

@media (max-width: 767px) {
  #resultsScreen {
    padding-bottom: 92px;
  }

  #newSessionBtn {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    border-radius: 0;
    z-index: 100;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
  }

  #playBothBtn {
    display: none !important;
  }

  .drill-video-modal {
    padding: 12px;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
  }

  .logo img {
    height: 32px !important;
  }

  .nav-tabs {
    gap: 8px;
    flex: unset;
  }

  .nav-tab {
    font-size: 10px;
    padding: 6px 8px;
    letter-spacing: 1px;
  }

  .nav-actions {
    min-width: unset;
    gap: 8px;
  }

  #playerDetailsNavBtn {
    display: none;
  }

  .nav-sign-in-btn {
    font-size: 10px;
    padding: 6px 12px;
  }

  .nav-profile-dropdown {
    right: -4px;
    min-width: min(92vw, 360px);
    max-width: min(92vw, 360px);
    max-height: 72vh;
  }

  .shot-detail-layout {
    grid-template-columns: 1fr;
  }

  .shot-detail-top {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 10px;
  }

  .shot-mini-radar-wrap {
    width: 138px;
    min-width: 138px;
    height: 138px;
  }

  .shot-mini-radar-canvas {
    width: 138px;
    height: 138px;
  }

  .shot-detail-top-actions {
    justify-items: center;
    text-align: center;
  }

  .shot-feedback-line {
    gap: 4px;
  }

  .shot-feedback-expand {
    margin: 0 8px 8px 10px;
  }

  .phase-overlay-label {
    font-size: 1.5rem;
  }

  .phase-summary-segment {
    min-height: 42px;
    font-size: 0.66rem;
    padding: 7px 4px;
  }

  .phase-summary-label {
    display: block;
    text-align: center;
    white-space: normal;
  }

  .stills-row {
    flex-direction: column;
    align-items: center;
  }

  .still-card {
    width: 100%;
    max-width: 320px;
  }

  .shot-mini-checks {
    grid-template-columns: 1fr;
  }

  .radar-axis-label {
    font-size: 0.62rem;
    max-width: 92px;
    padding: 3px 6px;
  }
}

@media (max-width: 520px) {
  .shot-card summary {
    grid-template-columns: auto auto auto 1fr auto;
  }

  .outcome-pill {
    justify-self: start;
  }

  .results-toolbar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .secondary-btn {
    justify-self: start;
  }

  #newSessionBtn {
    justify-self: stretch;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 12px;
  }

  .logo img {
    height: 28px !important;
  }

  .sign-in-card {
    padding: 40px 24px;
    max-width: calc(100vw - 32px);
  }

  .sign-in-title {
    font-size: 2em;
    letter-spacing: 2px;
  }

  .sign-in-screen {
    padding: 20px 16px;
  }

  .app-shell {
    padding: 12px 10px 28px;
  }
}

/* ─── Sign-In Screen ─── */
.sign-in-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 40px 20px;
}

.sign-in-card {
  text-align: center;
  max-width: 440px;
  width: 100%;
  padding: 56px 40px;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.sign-in-logo {
  height: 56px;
  width: auto;
  margin-bottom: 36px;
}

.sign-in-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 2.6em;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 12px;
}

.sign-in-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sign-in-subtitle {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

.sign-in-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.google-sign-in-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  background: #fff;
  color: #333;
  border: none;
  border-radius: 50px;
  font-family: "Work Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}

.google-sign-in-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.sign-in-hint {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────
   Record Mode
   ───────────────────────────────────────────────────────────── */

.mode-toggle-card {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.mode-toggle {
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--card-edge);
}

.mode-btn {
  flex: 1;
  padding: 12px 18px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: "Bebas Neue", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.mode-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
}

.record-card {
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

/* Camera preview */
.camera-preview {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.camera-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Countdown overlay */
.countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2;
}

/* Ensure hidden attribute works on flex elements */
.countdown-overlay[hidden],
.recording-indicator[hidden] {
  display: none;
}

.countdown-number {
  font-family: "Bebas Neue", sans-serif;
  font-size: 120px;
  color: white;
  /* animation applied via JS to re-trigger on each tick */
}

@keyframes countdown-pulse {
  0% { transform: scale(1.5); opacity: 0; }
  50% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.8); opacity: 0; }
}

/* Recording indicator */
.recording-indicator {
  position: absolute;
  top: 16px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 999px;
  z-index: 2;
}

.rec-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #F44336;
  animation: rec-pulse 1.2s ease-in-out infinite;
}

@keyframes rec-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.rec-timer {
  font-family: "Work Sans", monospace;
  font-size: 14px;
  color: white;
  font-weight: 600;
}

/* Record controls */
.record-controls {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.zoom-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}

.zoom-controls[hidden] {
  display: none;
}

.zoom-support-note {
  margin-top: 8px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.zoom-support-note[hidden] {
  display: none;
}

.zoom-btn {
  min-width: 108px;
}

.zoom-level {
  min-width: 64px;
  text-align: center;
  font-family: "Work Sans", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.flip-btn {
  flex: 0 0 auto;
}

.record-btn,
.stop-btn {
  flex: 1;
}

.stop-btn {
  background: linear-gradient(135deg, #F44336, #E57373) !important;
}

.chunk-status {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-edge);
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

/* ─── Shot Timeline ─── */
.shot-timeline-strip {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 100px;
  padding: 8px 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--card-edge) transparent;
}

.shot-timeline-bar {
  flex: 1 1 0;
  min-width: 10px;
  max-width: 36px;
  border-radius: 4px 4px 0 0;
  cursor: pointer;
  position: relative;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.shot-timeline-bar:hover {
  opacity: 0.85;
  filter: brightness(1.2);
}

.shot-timeline-bar.bar-make {
  background: var(--make);
}

.shot-timeline-bar.bar-miss {
  background: var(--miss);
}

.shot-timeline-bar.bar-unknown {
  background: #666;
}

.shot-timeline-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 0.78rem;
  color: var(--text);
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  box-shadow: var(--shadow);
}

/* ─── Court Zone Chart ─── */
.court-zone-wrap {
  max-width: 500px;
  margin: 0 auto;
}

.court-zone-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.court-zone-indicator {
  cursor: default;
  transition: opacity 0.2s ease;
}

.court-zone-indicator:hover {
  opacity: 0.85;
}

.court-zone-label {
  font-size: 11px;
  fill: var(--text);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
  font-weight: 600;
  font-family: "Work Sans", sans-serif;
}

.court-zone-name {
  font-size: 9px;
  fill: var(--muted);
  text-anchor: middle;
  font-family: "Work Sans", sans-serif;
  pointer-events: none;
}

/* ─── Shot Table Tabs ─── */
#shotTableSection > .table-header {
  grid-template-columns: auto 1fr auto auto;
}

.shot-table-tabs {
  display: flex;
  gap: 4px;
  margin-left: 12px;
  margin-right: auto;
}

.shot-tab {
  background: transparent;
  border: 1px solid var(--card-edge);
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Work Sans", sans-serif;
}

.shot-tab:hover {
  color: var(--text);
  border-color: var(--accent);
}

.shot-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.shot-card[data-tab-hidden="true"] {
  display: none !important;
}
