:root {
  --bg: #090d16;
  --surface: #111827;
  --surface-2: #172033;
  --surface-3: #1f2b42;
  --border: #27354f;
  --text: #eef2f9;
  --text-muted: #93a3bd;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --emerald: #10b981;
  --emerald-soft: #34d399;
  --rose: #fb7185;
  --amber: #fbbf24;
  --teal: #2dd4bf;
  --violet: #a78bfa;
  --slate: #94a3b8;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

kbd {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-bottom-width: 2px;
  color: #f8fafc;
  padding: 1px 5px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.25;
}

/* Top Navigation */
.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  border-radius: 50%;
  flex-shrink: 0;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f3f5f8;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 10px;
  padding: 4px 12px 4px 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.brand-icon-img {
  display: block;
  width: 30px;
  height: 30px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-wordmark {
  display: block;
  height: 24px;
  width: auto;
  flex-shrink: 0;
}

.brand-title {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 7px;
}

.badge-beta {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(16, 185, 129, 0.16);
  color: var(--emerald-soft);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 1px 7px;
  border-radius: 999px;
}

.badge-beta.warn {
  background: rgba(251, 191, 36, 0.16);
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.45);
}

.badge-beta.expired {
  background: rgba(251, 113, 133, 0.18);
  color: var(--rose);
  border-color: rgba(251, 113, 133, 0.5);
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.control-group label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.hint-key {
  color: var(--accent);
  font-weight: 600;
}

.topbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.center-row {
  justify-content: center;
}

select,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
textarea {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease;
}

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

#match-select {
  min-width: 195px;
  max-width: 260px;
}

#active-player-select {
  min-width: 185px;
  max-width: 250px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text);
  background: var(--surface-2);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-lg {
  padding: 10px 18px;
  font-size: 14px;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 11px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), var(--accent-strong));
  color: #031525;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08);
}

.btn-secondary {
  background: var(--surface-3);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--accent);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--text);
  background: var(--surface-2);
}

.btn-danger {
  background: rgba(251, 113, 133, 0.15);
  border-color: rgba(251, 113, 133, 0.4);
  color: var(--rose);
}

.btn-danger:hover:not(:disabled) {
  background: rgba(251, 113, 133, 0.25);
}

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 0 4px;
}

.view-tabs {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}

.tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 4px;
  cursor: pointer;
}

.tab-btn.active {
  background: var(--surface-3);
  color: var(--text);
}

.user-pill {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}

.health-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber);
}

.health-pill.ok .dot { background: var(--emerald-soft); }
.health-pill.warn .dot { background: var(--rose); }

.beta-expired-banner {
  background: rgba(251, 113, 133, 0.14);
  border-bottom: 1px solid rgba(251, 113, 133, 0.45);
  color: #fecdd3;
  padding: 9px 18px;
  font-size: 13px;
  text-align: center;
}

.update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: rgba(16, 185, 129, 0.12);
  border-bottom: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--text);
  padding: 8px 18px;
  font-size: 13px;
}

.update-banner-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 240px;
}

.update-banner-notes {
  color: var(--muted);
  font-size: 12px;
}

.update-progress-wrap {
  width: 180px;
  height: 7px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.update-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--emerald-soft);
  transition: width 0.2s ease;
}

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

.sport-mode-switcher {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 2px;
  gap: 2px;
}

.sport-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
}

.sport-btn:hover {
  color: var(--text);
}

.sport-btn.active {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

body[data-sport="basketball"] .sport-btn.active {
  background: rgba(249, 115, 22, 0.24);
  color: #fdba74;
}

body[data-sport="basketball"] .badge-beta {
  border-color: rgba(251, 146, 60, 0.45);
  color: #fdba74;
}

.sport-popout-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 6px;
  cursor: pointer;
}

.sport-popout-btn:hover {
  background: rgba(148, 163, 184, 0.14);
  color: var(--text);
}

/* Onboarding */
.onboarding {
  max-width: 660px;
  margin: 56px auto;
  padding: 0 18px;
}

.onboarding-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.onboarding-logo {
  margin-bottom: 10px;
}

.brand-lockup-lg {
  padding: 8px 18px 8px 10px;
  gap: 12px;
  border-radius: 14px;
  margin: 0 auto 14px;
}

.brand-lockup-lg .brand-icon-img {
  width: 46px;
  height: 46px;
}

.brand-lockup-lg .brand-wordmark {
  height: 38px;
}

.onboarding-card h1 {
  margin: 0 0 10px;
  font-size: 24px;
}

.onboarding-card p {
  color: var(--text-muted);
  margin: 0 0 18px;
}

/* Workspace Layout */
.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(360px, 1.02fr);
  gap: 14px;
  padding: 14px 18px;
  max-width: 1780px;
  margin: 0 auto;
  align-items: start;
}

.workspace-stage {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.video-stage {
  position: relative;
  background: #04070d;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

#match-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.video-missing-banner {
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 22, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 20px;
  z-index: 8;
}

.video-missing-banner p {
  margin: 4px 0 0;
  color: var(--text-muted);
  max-width: 520px;
}

/* Timeline Bar */
.timeline-wrap {
  position: relative;
  padding: 4px 0;
}

.timeline-bar {
  position: relative;
  height: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  overflow: hidden;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background: rgba(56, 189, 248, 0.16);
  width: 0%;
  pointer-events: none;
}

.timeline-markers {
  position: absolute;
  inset: 0;
}

.timeline-marker {
  position: absolute;
  top: 3px;
  bottom: 3px;
  width: 5px;
  border-radius: 3px;
  transform: translateX(-50%);
  cursor: pointer;
  opacity: 0.92;
}

.timeline-marker.is-candidate {
  top: 8px;
  bottom: 8px;
  width: 7px;
  border-radius: 50%;
  border: 1px solid #fff;
}

.timeline-marker.selected {
  transform: translateX(-50%) scaleX(1.65);
  z-index: 4;
  box-shadow: 0 0 0 1px #fff;
}

.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #f8fafc;
  left: 0%;
  pointer-events: none;
  z-index: 5;
}

.timeline-tooltip {
  position: absolute;
  bottom: 34px;
  transform: translateX(-50%);
  background: #090d16;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 3px 8px;
  font-size: 11px;
  pointer-events: none;
  z-index: 20;
}

/* Transport Bar */
.transport-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
}

.transport-left, .transport-center, .transport-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.speed-group {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  margin-left: 4px;
}

.speed-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  cursor: pointer;
}

.speed-btn.active {
  background: var(--accent-strong);
  color: #031525;
}

.clock-readout {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 9px;
  font-family: var(--mono);
  font-size: 12px;
}

.clock-label {
  font-family: var(--font);
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.clock-val { font-weight: 700; }
.clock-dur, .clock-sep { color: var(--text-muted); }
.match-clock .clock-val { color: var(--emerald-soft); }

.window-input {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
}

.window-input input {
  width: 50px;
  padding: 3px 5px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
}

.clip-window-badge {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 999px;
  padding: 2px 8px;
}

/* Single Candidate Creation Deck */
.single-candidate-deck {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deck-context-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.target-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
}

.target-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-soft);
}

.candidate-create-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.candidate-create-row input {
  flex: 1;
}

/* Sidebar */
.workspace-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}

.panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.panel-header h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.muted-count {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 12px;
}

.muted-small {
  color: var(--text-muted);
  font-size: 12px;
}

.seg-toggle {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--surface-3);
  color: var(--text);
}

.notice-strip {
  font-size: 12px;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  margin-bottom: 8px;
}

.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
}

.candidate-card {
  background: var(--bg);
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.candidate-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.candidate-player {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.candidate-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Confirmed Touch Editor */
.confirmed-editor {
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(180deg, rgba(16, 26, 44, 0.98), var(--surface));
}

.editor-section {
  margin-bottom: 10px;
}

.editor-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.choice-pill {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.choice-pill:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--accent);
}

.choice-pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent);
  color: #f0f9ff;
}

.choice-pill.tone-amber.active { background: rgba(251, 191, 36, 0.2); border-color: var(--amber); color: #fef3c7; }
.choice-pill.tone-sky.active { background: rgba(56, 189, 248, 0.2); border-color: var(--accent); color: #e0f2fe; }
.choice-pill.tone-teal.active { background: rgba(45, 212, 191, 0.2); border-color: var(--teal); color: #ccfbf1; }
.choice-pill.tone-emerald.active { background: rgba(16, 185, 129, 0.2); border-color: var(--emerald); color: #d1fae5; }
.choice-pill.tone-violet.active { background: rgba(167, 139, 250, 0.2); border-color: var(--violet); color: #ede9fe; }
.choice-pill.subtle { opacity: 0.78; font-weight: 500; }

.cat-detail-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.cat-empty-hint {
  font-size: 12px;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  background: var(--bg);
}

.cat-detail-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.cat-detail-card.tone-border-amber { border-left-color: var(--amber); }
.cat-detail-card.tone-border-sky { border-left-color: var(--accent); }
.cat-detail-card.tone-border-teal { border-left-color: var(--teal); }
.cat-detail-card.tone-border-emerald { border-left-color: var(--emerald-soft); }
.cat-detail-card.tone-border-violet { border-left-color: var(--violet); }
.cat-detail-card.tone-border-rose { border-left-color: var(--rose); }

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

.cat-detail-subblock {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.table-pill-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.tech-moves-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.tech-check-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  cursor: pointer;
}

.tech-check-pill.active {
  border-color: var(--violet);
  background: rgba(167, 139, 250, 0.16);
  color: #ede9fe;
}

.window-adjust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.window-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.window-box input {
  width: 58px;
  padding: 2px 4px;
  text-align: center;
  font-family: var(--mono);
  font-size: 12px;
}

.editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Confirmed List */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 390px;
  overflow-y: auto;
  padding-right: 2px;
}

.event-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
}

.event-card.tone-border-amber { border-left-color: var(--amber); }
.event-card.tone-border-sky { border-left-color: var(--accent); }
.event-card.tone-border-teal { border-left-color: var(--teal); }
.event-card.tone-border-emerald { border-left-color: var(--emerald-soft); }
.event-card.tone-border-violet { border-left-color: var(--violet); }
.event-card.tone-border-rose { border-left-color: var(--rose); }
.event-card.tone-border-slate { border-left-color: var(--slate); }

.event-card.selected {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.08);
}

.event-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}

.event-time {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.event-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.confirmed-subrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.move-pill-row {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.pill-sky { background: rgba(56, 189, 248, 0.15); border-color: rgba(56, 189, 248, 0.35); color: #7dd3fc; }
.pill-emerald { background: rgba(52, 211, 153, 0.15); border-color: rgba(52, 211, 153, 0.35); color: #6ee7b7; }
.pill-rose { background: rgba(251, 113, 133, 0.15); border-color: rgba(251, 113, 133, 0.35); color: #fda4af; }
.pill-amber { background: rgba(251, 191, 36, 0.15); border-color: rgba(251, 191, 36, 0.35); color: #fcd34d; }
.pill-teal { background: rgba(45, 212, 191, 0.15); border-color: rgba(45, 212, 191, 0.35); color: #5eead4; }
.pill-violet { background: rgba(167, 139, 250, 0.15); border-color: rgba(167, 139, 250, 0.35); color: #c4b5fd; }
.pill-slate { background: rgba(148, 163, 184, 0.15); border-color: rgba(148, 163, 184, 0.3); color: #cbd5e1; }

.event-note-preview {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.event-card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
}

.clip-status { font-size: 11px; color: var(--text-muted); }
.clip-status.ready { color: var(--emerald-soft); }
.clip-status.failed { color: var(--rose); }

.empty-state-inline {
  text-align: center;
  color: var(--text-muted);
  padding: 20px 10px;
  font-size: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

/* Report & Stats Views */
.report-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 18px 40px;
}

.report-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.report-player-label,
.stats-select-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.section-heading {
  margin: 4px 0 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.report-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.card-header h2 { margin: 0; font-size: 15px; }
.card-sub { margin: 2px 0 0; font-size: 12px; color: var(--text-muted); }

.report-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.hero-identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-jersey {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(56, 189, 248, 0.22));
  border: 1px solid rgba(56, 189, 248, 0.45);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

.hero-identity h1 { margin: 0; font-size: 22px; }
.hero-meta { color: var(--text-muted); font-size: 13px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; }

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.note-field { display: flex; flex-direction: column; gap: 5px; }
.note-field label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.save-indicator { font-size: 11px; color: var(--emerald-soft); }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-top { display: flex; align-items: baseline; justify-content: space-between; }
.kpi-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.kpi-big { font-size: 28px; font-weight: 800; line-height: 1.1; }
.kpi-sub { font-size: 12px; color: var(--text-muted); }

.report-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.breakdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}

.breakdown-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.breakdown-item strong { font-size: 11px; text-transform: uppercase; color: var(--text-muted); }
.breakdown-item span { font-size: 14px; font-weight: 700; }

.move-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.table-scroll {
  overflow-x: auto;
}

.proof-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.proof-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.proof-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(39, 53, 79, 0.6);
  vertical-align: middle;
}

.empty-td {
  text-align: center;
  color: var(--text-muted);
  padding: 20px !important;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.78);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 80;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
}

.modal-md { max-width: 560px; }
.modal-lg { max-width: 780px; }

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

.modal-header h3 { margin: 0; font-size: 16px; }

.modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.right-footer {
  justify-content: flex-end;
}

.form-section,
.form-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-section label,
.form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.video-source-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.video-source-tools select,
.video-source-tools input { width: 100%; }

.form-hint { font-size: 12px; color: var(--text-muted); min-height: 16px; }
.form-hint.ok { color: var(--emerald-soft); }
.form-hint.err { color: var(--rose); }

.upload-progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--emerald);
  transition: width 0.15s ease;
}

.terms-text-box {
  margin: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  max-height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text);
}

.legal-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terms-agree-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.terms-agree-row.check-all-row {
  background: rgba(16, 185, 129, 0.14);
  border: 1.5px solid rgba(52, 211, 153, 0.65);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #ecfdf5;
}

.terms-agree-row.check-all-row input[type="checkbox"] {
  accent-color: #10b981;
  transform: scale(1.15);
  margin-top: 2px;
}

.terms-agree-row.optional-row {
  color: #a7f3d0;
}

.subtle-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

.test-code-callout {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 13px;
}

.ap-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ap-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}

.ap-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.match-players-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-player-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.match-player-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text) !important;
}

.match-jersey-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.match-jersey-field input {
  width: 82px;
}

.proof-video-wrap {
  position: relative;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

/* Semi-Transparent On-Video Tag Overlay HUD */
.video-tag-hud {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
  z-index: 6;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(9, 13, 22, 0.76);
  backdrop-filter: blur(6px);
  border: 1.5px solid rgba(56, 189, 248, 0.7);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.hud-header {
  border-color: rgba(16, 185, 129, 0.8);
}

.hud-pill-sm {
  font-size: 11px;
  padding: 3px 9px;
}

.hud-moves-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.hud-pill.tone-border-amber { border-color: rgba(251, 191, 36, 0.85); }
.hud-pill.tone-border-sky { border-color: rgba(56, 189, 248, 0.85); }
.hud-pill.tone-border-teal { border-color: rgba(45, 212, 191, 0.85); }
.hud-pill.tone-border-emerald { border-color: rgba(52, 211, 153, 0.85); }
.hud-pill.tone-border-violet { border-color: rgba(167, 139, 250, 0.85); }
.hud-pill.tone-border-rose { border-color: rgba(251, 113, 133, 0.9); }

.hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.hud-dot.tone-amber { background: var(--amber); }
.hud-dot.tone-sky { background: var(--accent); }
.hud-dot.tone-teal { background: var(--teal); }
.hud-dot.tone-emerald { background: var(--emerald-soft); }
.hud-dot.tone-violet { background: var(--violet); }
.hud-dot.tone-rose { background: var(--rose); }
.hud-dot.tone-slate { background: var(--slate); }

/* Export & Share Studio */
.share-clips-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 155px;
  overflow-y: auto;
}

.share-clip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.share-clip-row.active {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
}

.share-ratio-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ratio-pill {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.ratio-pill.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--accent);
  color: var(--text);
}

.share-crop-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 8px;
}

.share-crop-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.share-crop-stage {
  position: relative;
  width: 100%;
  height: 235px;
  background: #04070d;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.share-stage-viewport {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transition: transform 0.16s ease-out;
}

.share-stage-zoom-pill {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 8;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #e0f2fe;
  background: rgba(9, 13, 22, 0.82);
  border: 1px solid rgba(56, 189, 248, 0.55);
  border-radius: 999px;
  padding: 2px 8px;
  pointer-events: none;
}

.share-crop-stage video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.share-crop-overlay {
  position: absolute;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
}

.share-crop-overlay:active {
  cursor: grabbing;
}

.share-crop-overlay.tool-ring {
  cursor: crosshair;
}

.share-crop-pan-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.share-player-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.75px solid rgba(56, 189, 248, 0.92);
  background: transparent;
  box-shadow: 0 0 5px rgba(56, 189, 248, 0.42);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 4;
}

body[data-sport="basketball"] .share-player-ring {
  border-color: rgba(251, 191, 36, 0.92);
  background: transparent;
  box-shadow: 0 0 5px rgba(251, 191, 36, 0.45);
}

.share-crop-box {
  position: absolute;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 0 9999px rgba(4, 7, 13, 0.56);
  pointer-events: none;
}

.share-crop-end-ghost {
  position: absolute;
  border: 2px dashed #10b981;
  background: rgba(16, 185, 129, 0.08);
  pointer-events: none;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 3px 5px;
}

.share-crop-end-ghost span {
  font-size: 9px;
  font-weight: 800;
  color: #10b981;
  background: rgba(9, 13, 22, 0.85);
  padding: 1px 4px;
  border-radius: 3px;
}

.crop-grid-v,
.crop-grid-h {
  position: absolute;
  background: rgba(255, 255, 255, 0.22);
}

.crop-grid-v { top: 0; bottom: 0; width: 1px; }
.cgv-1 { left: 33.33%; }
.cgv-2 { left: 66.66%; }
.crop-grid-h { left: 0; right: 0; height: 1px; }
.cgh-1 { top: 33.33%; }
.cgh-2 { top: 66.66%; }

.crop-handle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #38bdf8;
  border-radius: 2px;
}
.ch-tl { top: -4px; left: -4px; }
.ch-tr { top: -4px; right: -4px; }
.ch-bl { bottom: -4px; left: -4px; }
.ch-br { bottom: -4px; right: -4px; }

.crop-center-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #38bdf8;
  border: 2px solid #090d16;
  transform: translate(-50%, -50%);
}

.share-crop-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.share-zoom-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.share-zoom-wrap input[type="range"] {
  width: 115px;
  accent-color: var(--accent);
}

.share-ring-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
}

.share-ring-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.share-ring-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
}

.share-ring-bar .share-zoom-wrap input[type="range"] {
  width: 82px;
}

.share-ring-scrub {
  width: 96px !important;
  accent-color: var(--emerald);
}

.share-toggles-box {
  display: flex;
  flex-direction: column;
  gap: 7px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}

.share-result-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.share-actions-bar,
.social-links-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.share-qr-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.share-qr-svg {
  background: #ffffff;
  border-radius: 8px;
  padding: 6px;
  line-height: 0;
}

.share-social-guide {
  background: rgba(56, 189, 248, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 12px;
  color: var(--text);
  line-height: 1.45;
}

.share-fw-note.ok {
  color: var(--emerald);
  margin: 4px 0 0;
}

.share-fw-note.warn {
  color: #f59e0b;
  margin: 4px 0 6px;
}

.share-qr-info {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.proof-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text-muted);
}

.proof-event-meta {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 12px;
}

.hotkeys-ref-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ref-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
}

.ref-card h4 { margin: 0 0 8px; font-size: 13px; color: var(--accent); }
.ref-card ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 12px; }

/* Toasts */
.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 95;
  pointer-events: none;
}

.toast {
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  color: var(--text);
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  box-shadow: var(--shadow);
  max-width: 360px;
}

.toast.success { border-left-color: var(--emerald); }
.toast.error { border-left-color: var(--rose); }

@media (max-width: 1120px) {
  .workspace-grid,
  .kpi-grid,
  .kpi-grid-3,
  .notes-grid,
  .report-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .form-grid-2,
  .video-source-tools,
  .hotkeys-ref-grid,
  .tech-moves-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body { background: #fff; color: #111827; }
  .no-print { display: none !important; }
  .report-container { max-width: 100%; padding: 0; }
  .card, .kpi-card { background: #fff !important; color: #111827 !important; border-color: #cbd5e1 !important; box-shadow: none !important; }
  textarea { border-color: #cbd5e1 !important; background: #f8fafc !important; color: #111827 !important; }
}

/* Web App Additions: Plan Badge, OAuth Buttons, Plan/Promo Modal */
.badge-beta-btn {
  border: 1px solid rgba(56, 189, 248, 0.35);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.badge-beta-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.badge-beta.pro {
  background: rgba(16, 185, 129, 0.18);
  border-color: rgba(16, 185, 129, 0.5);
  color: #6ee7b7;
}

.oauth-btn-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.oauth-google-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.oauth-google-slot {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
}

.btn-oauth {
  width: 100%;
  justify-content: center;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  min-height: 40px;
}

.btn-oauth-google:hover:not(:disabled) {
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.14);
}

.btn-oauth-facebook:hover:not(:disabled) {
  border-color: #38bdf8;
  background: rgba(14, 165, 233, 0.14);
}

.auth-legal-strip {
  margin: 8px 0 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.65);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-legal-strip.highlight-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.22);
}

.btn-link-inline {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.btn-link-inline:hover {
  color: #7dd3fc;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 8px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.plan-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 4px;
}

.plan-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.plan-card.featured {
  border-color: rgba(16, 185, 129, 0.55);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08), var(--bg));
}

.plan-card-title {
  font-size: 13px;
  font-weight: 700;
}

.plan-card-price {
  font-size: 20px;
  font-weight: 800;
  color: #f8fafc;
}

.plan-card-price span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

@media (max-width: 680px) {
  .oauth-btn-row,
  .plan-cards-grid {
    grid-template-columns: 1fr;
  }
}

.plans-topbar-group {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1.1;
}

.btn-plans-cta {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.28), rgba(56, 189, 248, 0.24));
  border: 1px solid rgba(56, 189, 248, 0.72);
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 13px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.16);
}

.btn-plans-cta:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.4), rgba(56, 189, 248, 0.34));
  border-color: #7dd3fc;
  color: #ffffff;
  transform: translateY(-1px);
}

.plans-topbar-sub {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.plans-topbar-sub.pro {
  color: #6ee7b7;
}

.plans-topbar-sub.warn {
  color: #fbbf24;
}

.plans-topbar-sub.expired {
  color: #fca5a5;
}

#plan-single-sport-select {
  width: 100%;
  font-size: 12px;
  padding: 5px 8px;
}

.plan-card .btn {
  margin-top: auto;
}

.share-trim-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 8px;
  font-size: 12px;
}

.share-trim-bar .window-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.share-trim-bar input[type="number"] {
  width: 66px;
  padding: 3px 6px;
  font-size: 12px;
}

.share-trim-dur-pill {
  color: #cbd5e1;
  white-space: nowrap;
}

#share-trim-hint {
  color: #fbbf24;
  flex-basis: 100%;
}
