/* ═══════════════════════════════════════════════════════════════════════════
   SHORTER — Moments Worth Sharing Stylesheet
   Warm Cream & Forest Green Clean SaaS Aesthetic
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Surface colors */
  --bg-page:         #faf8f5;
  --bg-card:         #ffffff;
  --bg-subtle:       #f4f1ea;
  --bg-input:        #ffffff;
  --bg-pill:         #e8ede9;
  --bg-green-light:  #f0fdf4;

  /* Borders */
  --border-subtle:   #ece9e2;
  --border-base:     #e2ded5;
  --border-focus:    #134e4a;
  --border-green:    #10b981;

  /* Brand Accents */
  --c-green-dark:    #134e4a;
  --c-green-primary: #113f36;
  --c-green-hover:   #0d312a;
  --c-green-bright:  #10b981;
  --c-orange:        #ea580c;
  --c-orange-light:  #f97316;
  --c-orange-bg:     #fff7ed;

  /* Typography */
  --text-main:       #18181b;
  --text-muted:      #52525b;
  --text-faint:      #71717a;
  --text-light:      #a1a1aa;

  /* Fonts */
  --font-sans:   'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-doodle: 'Caveat', cursive, sans-serif;
  --font-mono:   'JetBrains Mono', monospace;

  /* Radii & Shadows */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 9999px;

  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-dropdown: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 20px 40px -10px rgba(0, 0, 0, 0.15);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 0.16s;
}

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

html {
  font-size: 15px;
  background-color: var(--bg-page);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.shorter-body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Subtle warm background shapes */
.bg-shape {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(60px);
}
.bg-shape-1 {
  width: 450px;
  height: 450px;
  background: rgba(240, 237, 230, 0.8);
  top: -120px;
  left: -100px;
}
.bg-shape-2 {
  width: 500px;
  height: 500px;
  background: rgba(235, 243, 238, 0.6);
  top: 100px;
  right: -150px;
}
.bg-shape-3 {
  width: 400px;
  height: 400px;
  background: rgba(254, 243, 235, 0.4);
  bottom: -100px;
  left: 20%;
}

/* ── Top Navigation Bar ──────────────────────────────────────────────────── */
.shorter-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 24px;
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-main);
}

.logo-wordmark {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur);
}

.nav-link:hover {
  color: var(--c-green-dark);
}

.nav-user-dropdown {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: var(--r-pill);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-base);
}

/* ── Main Layout Viewport ─────────────────────────────────────────────────── */
.shorter-main {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 40px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Hero Section ─────────────────────────────────────────────────────────── */
.hero-cluster {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 8px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  background: var(--bg-pill);
  color: #2d4a3e;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  margin-bottom: 18px;
}

.headline-container {
  position: relative;
  display: inline-block;
  margin-bottom: 14px;
}

.doodle-sparks {
  position: absolute;
  top: -8px;
  left: -32px;
  pointer-events: none;
}

.hero-headline {
  font-size: 3.1rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: #1e293b;
  line-height: 1.15;
}

.hero-headline .highlight-green {
  color: #134e4a;
}

.doodle-annotation {
  position: absolute;
  top: -12px;
  right: -130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.doodle-text {
  font-family: var(--font-doodle);
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--c-orange);
  line-height: 1.1;
  white-space: nowrap;
  transform: rotate(4deg);
}

.doodle-arrow {
  margin-top: -6px;
  margin-left: -20px;
}

.hero-subheadline {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 680px;
}

/* ── Primary Configuration Box (White Card) ─────────────────────────────── */
.main-card-frame {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 10px;
}

/* URL Input Bar */
.url-input-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.url-field-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 1px solid var(--border-base);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  gap: 10px;
  transition: border-color var(--dur);
}

.url-field-wrap:focus-within {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 1px var(--border-focus);
}

.yt-icon-box {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.url-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
}

.url-input::placeholder {
  color: var(--text-light);
}

.input-clear-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  display: flex;
  align-items: center;
  padding: 4px;
}

.input-clear-btn:hover {
  color: var(--text-main);
}

.btn-find-clips {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-green-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--r-sm);
  padding: 12px 24px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--dur), transform var(--dur);
}

.btn-find-clips:hover {
  background: var(--c-green-hover);
}

.btn-find-clips:active {
  transform: scale(0.98);
}

/* Examples Strip */
.examples-section {
  display: flex;
  flex-direction: column;
}

.examples-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.btn-random-example {
  background: none;
  border: none;
  color: #0d9488;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: color var(--dur);
}

.btn-random-example:hover {
  color: var(--c-green-dark);
}

.example-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.example-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-md);
  padding: 10px 12px;
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.example-card:hover {
  border-color: #cbd5e1;
  background: #fafaf9;
}

.example-card.selected {
  border-color: #10b981;
  background: var(--bg-green-light);
}

.ex-thumb-wrap {
  position: relative;
  width: 90px;
  height: 56px;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
}

.ex-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ex-thumb-dur {
  position: absolute;
  bottom: 4px;
  right: 4px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
}

.ex-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.ex-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
}

.ex-meta {
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* Preferences Section (Dropdowns) */
.preferences-section {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 24px;
}

.pref-desc-col {
  max-width: 280px;
}

.pref-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
}

.pref-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 4px;
}

.pref-dropdowns-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.pref-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dropdown-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
}

.custom-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.clean-dropdown {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-sm);
  padding: 9px 34px 9px 12px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  outline: none;
  transition: border-color var(--dur);
}

.clean-dropdown:focus {
  border-color: var(--border-focus);
}

.dropdown-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: var(--text-faint);
  display: flex;
  align-items: center;
}

/* ── How It Works Feature Card (From Screenshot) ─────────────────────────── */
.how-it-works-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.how-header {
  text-align: left;
}

.how-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.how-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.how-steps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.how-step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
}

.step-icon-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e6f4f1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-heading {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
}

.step-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-top: 2px;
}

.how-connector {
  flex: 0 0 40px;
  height: 1px;
  background: var(--border-base);
  margin-top: -12px;
}

/* ── Processing State Monitor ─────────────────────────────────────────────── */
.processing-banner {
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.processing-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.spinner-ring {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--c-green-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.processing-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 3px;
}

.processing-progress-track {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: var(--r-pill);
  overflow: hidden;
}

.processing-progress-bar {
  width: 30%;
  height: 100%;
  background: var(--c-green-bright);
  transition: width 0.3s var(--ease);
}

/* ── Error Banner ─────────────────────────────────────────────────────────── */
.error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--r-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.error-body {
  flex: 1;
  font-size: 0.88rem;
  color: #991b1b;
  font-weight: 500;
}

.error-dismiss {
  background: none;
  border: none;
  color: #b91c1c;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 8px;
}

/* ── Results Studio Workspace ─────────────────────────────────────────────── */
.results-workspace {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Hero Card */
.results-hero-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.hero-thumb-box {
  width: 180px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
  position: relative;
  flex-shrink: 0;
}

.hero-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-thumb-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.hero-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.hero-video-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -0.02em;
}

.hero-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.hero-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--r-pill);
}

.tag-badge.green {
  background: #e6f4f1;
  color: var(--c-green-dark);
}

.tag-badge.orange {
  background: var(--c-orange-bg);
  color: var(--c-orange);
}

/* 4-Stat Metrics Row */
.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

.metric-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}

.metric-val {
  font-size: 1.6rem;
  font-weight: 800;
  margin: 6px 0 2px;
}

.metric-val.text-green { color: var(--c-green-dark); }
.metric-val.text-dark  { color: #1e293b; }

.metric-sub {
  font-size: 0.72rem;
  color: var(--text-light);
}

/* Timeline Heatmap */
.timeline-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
}

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

.timeline-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.timeline-timecode {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
}

.timeline-track-wrap {
  width: 100%;
  height: 24px;
  background: var(--bg-subtle);
  border-radius: var(--r-sm);
  position: relative;
  overflow: hidden;
}

.timeline-track-bar {
  position: relative;
  width: 100%;
  height: 100%;
}

.timeline-clip-marker {
  position: absolute;
  top: 0;
  height: 100%;
  background: #10b981;
  opacity: 0.85;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.timeline-clip-marker:hover {
  opacity: 1;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

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

.filter-tabs-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-pill);
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--dur);
}

.filter-btn:hover {
  border-color: #cbd5e1;
  color: var(--text-main);
}

.filter-btn.active {
  background: #134e4a;
  color: #ffffff;
  border-color: #134e4a;
}

.toolbar-search-wrap {
  flex: 1;
  max-width: 280px;
}

.toolbar-search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-base);
  border-radius: var(--r-pill);
  padding: 7px 14px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-main);
  outline: none;
}

.btn-export-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #134e4a;
  color: #ffffff;
  border: none;
  border-radius: var(--r-pill);
  padding: 8px 18px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--dur);
}

.btn-export-all:hover {
  background: #0d312a;
}

/* Results Heading */
.results-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.results-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
}

.clips-count-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
  margin-left: 8px;
}

/* Clips Grid */
.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}

.studio-clip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform var(--dur), border-color var(--dur);
}

.studio-clip-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
}

.studio-clip-card.card-rank-1 {
  border-left: 4px solid #10b981;
}

/* Card Header */
.card-meta-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-rank-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rank-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  background: #f1f5f9;
  color: #334155;
  padding: 2px 6px;
  border-radius: 4px;
}

.timecode-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
}

.duration-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: #e6f4f1;
  color: var(--c-green-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

.virality-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--c-orange-bg);
  color: var(--c-orange);
}

/* Hook callout */
.hook-callout-box {
  background: #fafaf9;
  border-left: 3px solid #10b981;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 10px 14px;
}

.hook-box-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  color: #047857;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.hook-quote-text {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.4;
}

/* Cadence Equalizer */
.cadence-visualizer-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cadence-bars-wrap {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}

.c-bar {
  width: 3px;
  background: #10b981;
  border-radius: 1px;
}
.c-bar:nth-child(even) { height: 70%; background: #047857; }
.c-bar:nth-child(odd) { height: 40%; }
.c-bar:nth-child(3n) { height: 95%; background: var(--c-orange); }

.cadence-label-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-faint);
}

/* Trimmer Drawer */
.trimmer-drawer {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--r-sm);
  padding: 12px;
  display: none;
  flex-direction: column;
  gap: 8px;
}

.trimmer-drawer.open {
  display: flex;
}

.trimmer-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trimmer-header-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  color: #1e293b;
}

.trimmer-adjusted-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

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

.trim-channel-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--r-sm);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.trim-channel-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-faint);
}

.trim-channel-value {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 800;
  color: #1e293b;
  text-align: center;
  padding: 4px;
  background: #f8fafc;
  border-radius: 4px;
}

.trim-nudge-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}

.btn-nudge {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 3px 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  text-align: center;
  transition: all var(--dur);
}

.btn-nudge:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.trimmer-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #e2e8f0;
  padding-top: 6px;
}

.trimmer-dur-readout {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.btn-trim-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-faint);
  cursor: pointer;
}

.btn-trim-reset:hover {
  border-color: #f87171;
  color: #dc2626;
  background: #fef2f2;
}

/* Transcript Accordion */
.transcript-collapsible {
  border: 1px solid var(--border-base);
  border-radius: var(--r-sm);
  padding: 8px 12px;
}

.transcript-toggle-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.transcript-chevron {
  transition: transform var(--dur);
}

.transcript-collapsible.open .transcript-chevron {
  transform: rotate(180deg);
}

.transcript-body-text {
  display: none;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 8px;
  max-height: 120px;
  overflow-y: auto;
}

.transcript-collapsible.open .transcript-body-text {
  display: block;
}

/* Card Actions */
.card-actions-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}

.btn-card-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--r-sm);
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all var(--dur);
}

.btn-card-action:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.btn-card-action.btn-play-action {
  background: #134e4a;
  color: #ffffff;
  border-color: #134e4a;
}

.btn-card-action.btn-play-action:hover {
  background: #0d312a;
}

.btn-card-action.btn-adjust-action.active {
  background: #f0fdf4;
  border-color: #10b981;
  color: #047857;
}

.btn-card-action.btn-download-action {
  background: var(--c-green-primary);
  color: #ffffff;
  border-color: var(--c-green-primary);
  margin-left: auto;
}

.btn-card-action.btn-download-action:hover {
  background: var(--c-green-hover);
}

/* ── Modal Dialog ────────────────────────────────────────────────────────── */
.shorter-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.shorter-modal-card {
  background: #ffffff;
  border-radius: var(--r-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-modal);
  padding: 24px;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
}

/* Aspect Ratio Switcher Bar in Modal */
.modal-aspect-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.modal-aspect-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aspect-toggle-pill-group {
  display: inline-flex;
  background: #f1f5f9;
  border-radius: var(--r-full);
  padding: 3px;
  gap: 2px;
}

.aspect-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.73rem;
  font-weight: 700;
  padding: 5px 12px;
  border: none;
  background: transparent;
  color: #64748b;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all 0.15s ease;
}

.aspect-pill-btn:hover {
  color: #0f172a;
}

.aspect-pill-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.modal-player-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #090d16;
  border-radius: var(--r-lg);
  padding: 18px 16px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

/* 9:16 Vertical Phone Mockup */
.modal-player-wrap.ratio-9-16 {
  width: 270px;
  height: 480px;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  border: 3px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
  background: #000;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 auto;
}

.modal-player-wrap.ratio-9-16 iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 316.05%;
  height: 100%;
  transform: translate(-50%, -50%);
  border: none;
}

/* Phone notch / Island header */
.phone-island-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 16px;
  background: #000000;
  border-radius: 20px;
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* 9:16 Shorts Overlay Badge */
.shorts-crop-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 10;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* 16:9 Landscape */
.modal-player-wrap.ratio-16-9 {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  background: #000;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-player-wrap.ratio-16-9 iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* 1:1 Square */
.modal-player-wrap.ratio-1-1 {
  width: 380px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  position: relative;
  overflow: hidden;
  background: #000;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 auto;
}

.modal-player-wrap.ratio-1-1 iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78%;
  height: 100%;
  transform: translate(-50%, -50%);
  border: none;
}

/* Base fallback */
.modal-player-wrap {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #000;
}

/* Aspect Pill Tag on Clip Cards */
.card-aspect-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(19, 78, 74, 0.08);
  color: #134e4a;
  border: 1px solid rgba(19, 78, 74, 0.2);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: var(--r-full);
}

.modal-meta-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-clip-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1e293b;
}

.modal-trim-deck {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-trim-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-trim-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-modal-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
}

.btn-modal-replay {
  background: #134e4a;
  color: #ffffff;
  border: 1px solid #134e4a;
}

.btn-modal-export {
  background: var(--c-green-primary);
  color: #ffffff;
  border: 1px solid var(--c-green-primary);
}

/* ── Floating Sticky Dock ─────────────────────────────────────────────────── */
.floating-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  transition: transform 0.25s var(--ease), opacity 0.25s;
}

.dock-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #18181b;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--r-pill);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.dock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}

.dock-text {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.dock-export-btn {
  background: #10b981;
  color: #000000;
  border: none;
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.dock-top-btn {
  background: #27272a;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Toast Notifications */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast-item {
  background: #18181b;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.toast-item.toast-success { border-left: 3px solid #10b981; }
.toast-item.toast-error   { border-left: 3px solid #ef4444; }
.toast-item.toast-info    { border-left: 3px solid #f97316; }

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 860px) {
  .headline-container .doodle-annotation {
    display: none;
  }
  .example-cards-grid {
    grid-template-columns: 1fr;
  }
  .how-steps-row {
    flex-direction: column;
    align-items: stretch;
  }
  .how-connector {
    display: none;
  }
  .preferences-section {
    flex-direction: column;
    align-items: flex-start;
  }
  .metrics-row {
    grid-template-columns: 1fr 1fr;
  }
}


/* ── Google Auth Navbar Styles ─────────────────────────────────────────── */
.btn-google-sign-in {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  background: var(--c-surface, #1e2130);
  border: 1.5px solid var(--c-border, #2d3148);
  border-radius: 20px;
  font-family: var(--font-ui, 'Plus Jakarta Sans', sans-serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text, #f1f5f9);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn-google-sign-in:hover {
  border-color: var(--c-amber, #f59e0b);
  background: var(--c-hover, #252840);
}
.auth-name-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text, #f1f5f9);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-signout-btn {
  background: none;
  border: none;
  padding: 3px;
  cursor: pointer;
  color: var(--c-muted, #64748b);
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.auth-signout-btn:hover { color: var(--c-amber, #f59e0b); }

/* ── Navbar Plan Badge ──────────────────────────────────────────────────── */
.nav-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(234, 88, 12, 0.09);
  border: 1px solid rgba(234, 88, 12, 0.25);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  color: var(--c-orange, #ea580c);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.nav-plan-badge:hover {
  background: rgba(234, 88, 12, 0.16);
  transform: translateY(-1px);
}
.nav-plan-badge.plan-active-pro {
  background: rgba(19, 78, 74, 0.1);
  border-color: rgba(19, 78, 74, 0.3);
  color: var(--c-green-dark, #134e4a);
}
.nav-plan-badge.plan-active-basic {
  background: rgba(234, 88, 12, 0.12);
  border-color: rgba(234, 88, 12, 0.35);
  color: var(--c-orange, #ea580c);
}

/* ── Pricing Card Section ────────────────────────────────────────────────── */
.pricing-card {
  max-width: 1040px;
  margin: 40px auto 0;
  background: var(--bg-card, #ffffff);
  border: 1.5px solid var(--border-base, #e2ded5);
  border-radius: var(--r-xl, 20px);
  padding: 44px 36px 36px;
  box-shadow: var(--shadow-card);
  position: relative;
  z-index: 1;
}

.pricing-header {
  text-align: center;
  margin-bottom: 36px;
}
.pricing-eyebrow {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 800;
  color: var(--c-orange, #ea580c);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.pricing-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main, #18181b);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.pricing-desc {
  font-size: 0.95rem;
  color: var(--text-muted, #52525b);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.5;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.plan-card {
  background: var(--bg-subtle, #f4f1ea);
  border: 1.5px solid var(--border-base, #e2ded5);
  border-radius: var(--r-lg, 16px);
  padding: 28px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.plan-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-green-dark, #134e4a);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.plan-card.popular-plan {
  background: #ffffff;
  border: 2px solid var(--c-orange, #ea580c);
  box-shadow: 0 8px 30px rgba(234, 88, 12, 0.08);
}
.plan-card.pro-plan {
  background: #ffffff;
  border: 1.5px solid var(--border-base, #e2ded5);
}
.plan-card.pro-plan:hover {
  border-color: var(--c-green-dark, #134e4a);
}

.popular-ribbon,
.pro-ribbon {
  position: absolute;
  top: -11px;
  right: 20px;
  padding: 3px 12px;
  border-radius: 9999px;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.popular-ribbon {
  background: var(--c-orange, #ea580c);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.3);
}
.pro-ribbon {
  background: var(--c-green-dark, #134e4a);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(19, 78, 74, 0.3);
}

.plan-card-header {
  margin-bottom: 4px;
}
.plan-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main, #18181b);
  letter-spacing: -0.01em;
}
.plan-tagline {
  font-size: 0.82rem;
  color: var(--text-muted, #52525b);
  margin-top: 4px;
  min-height: 38px;
  line-height: 1.4;
}
.plan-price-wrap {
  margin-top: 14px;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.plan-currency {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main, #18181b);
}
.plan-amount {
  font-size: 2.35rem;
  font-weight: 800;
  color: var(--text-main, #18181b);
  letter-spacing: -0.03em;
  line-height: 1;
}
.plan-cycle {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted, #52525b);
  margin-left: 4px;
}

.plan-divider {
  height: 1px;
  background: var(--border-base, #e2ded5);
  margin: 18px 0;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 11px;
  flex: 1;
  padding: 0;
  margin: 0;
}
.plan-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-main, #18181b);
  line-height: 1.45;
}
.plan-feature-item svg {
  flex-shrink: 0;
  margin-top: 2px;
}

.plan-cta-wrap {
  margin-top: 24px;
}
.plan-cta-btn {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--r-md, 12px);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.16s ease;
  text-decoration: none;
}
.current-tier-btn {
  background: var(--bg-pill, #e8ede9);
  color: var(--text-muted, #52525b);
  border: 1px solid var(--border-base, #e2ded5);
  cursor: default;
}
.upgrade-btn {
  background: var(--c-orange, #ea580c);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.25);
}
.upgrade-btn:hover {
  background: #c2410c;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.32);
}
.pro-cta-btn {
  background: var(--c-green-dark, #134e4a);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(19, 78, 74, 0.25);
}
.pro-cta-btn:hover {
  background: var(--c-green-hover, #0d312a);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(19, 78, 74, 0.32);
}

.pricing-trust-note {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle, #ece9e2);
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-faint, #71717a);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pricing-card {
    padding: 32px 20px 24px;
  }
}

