/* ── Design tokens ───────────────────────────────────────────────────────── */
:root {
  --p:       #6366F1;   /* indigo – trust, learning */
  --p-dark:  #4338CA;
  --p-light: #EEF2FF;
  --p-mid:   #C7D2FE;
  --amber:   #F59E0B;   /* amber  – energy, action  */
  --amber-l: #FEF3C7;
  --green:   #10B981;   /* emerald – success        */
  --green-l: #D1FAE5;
  --red:     #EF4444;
  --red-l:   #FEE2E2;

  --ink:     #0F172A;
  --ink-2:   #334155;
  --ink-3:   #64748B;
  --ink-4:   #94A3B8;
  --border:  #E2E8F0;
  --bg:      #F5F7FF;
  --surface: #FFFFFF;

  --r:    12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --sh:   0 1px 3px rgba(15,23,42,.06), 0 4px 16px rgba(99,102,241,.08);
  --sh-lg:0 8px 24px rgba(15,23,42,.10), 0 2px 6px rgba(15,23,42,.04);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── Typography ──────────────────────────────────────────────────────────── */
h1,h2,h3 { line-height: 1.2; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.page-wrap { max-width: 820px; margin: 0 auto; padding: 0 1.25rem 5rem; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 45%, #4338CA 100%);
  padding: 3.5rem 1.25rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(99,102,241,.35) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(245,158,11,.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-inner { position: relative; z-index: 1; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 100px;
  padding: .3rem .9rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: .6rem;
}

.hero-highlight {
  background: linear-gradient(90deg, #FDE68A, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  margin-bottom: 2rem;
}

/* ── URL input bar ───────────────────────────────────────────────────────── */
.url-bar {
  display: flex;
  gap: .5rem;
  max-width: 580px;
  margin: 0 auto 1rem;
  background: rgba(255,255,255,.1);
  border: 1.5px solid rgba(255,255,255,.25);
  border-radius: 100px;
  padding: .35rem .35rem .35rem 1.25rem;
  backdrop-filter: blur(8px);
  transition: border-color .2s, box-shadow .2s;
}

.url-bar:focus-within {
  border-color: rgba(255,255,255,.6);
  box-shadow: 0 0 0 4px rgba(99,102,241,.25);
}

.url-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: .95rem;
  min-width: 0;
}

.url-bar input::placeholder { color: rgba(255,255,255,.45); }

.url-bar button {
  background: var(--amber);
  color: #1a0c00;
  border: none;
  border-radius: 100px;
  padding: .55rem 1.3rem;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .1s;
  flex-shrink: 0;
}

.url-bar button:hover   { background: #FBBF24; }
.url-bar button:active  { transform: scale(.97); }
.url-bar button:disabled{ opacity: .55; cursor: not-allowed; transform: none; }

/* ── Returning user chip ─────────────────────────────────────────────────── */
.welcome-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85);
  border-radius: 100px;
  padding: .3rem .85rem;
  font-size: .82rem;
  margin-top: .5rem;
}

/* ── Stepper ─────────────────────────────────────────────────────────────── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1.25rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 8px rgba(15,23,42,.06);
}

.step {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-4);
  white-space: nowrap;
}

.step-num {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--border);
  color: var(--ink-4);
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step.done .step-num   { background: var(--green);  color: #fff; }
.step.done             { color: var(--green); }
.step.active .step-num { background: var(--p); color: #fff; }
.step.active           { color: var(--p); }

.step-sep {
  width: 2.5rem;
  height: 2px;
  background: var(--border);
  margin: 0 .25rem;
  flex-shrink: 0;
}

.step.done + .step-sep { background: var(--green); }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  box-shadow: var(--sh);
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.card-title .icon {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--p-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

/* ── Section wrapper ─────────────────────────────────────────────────────── */
.section {
  margin-top: 1.5rem;
  animation: fadeUp .35s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Stat chips ──────────────────────────────────────────────────────────── */
.stat-row {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.stat-chip {
  flex: 1;
  min-width: 100px;
  background: var(--p-light);
  border-radius: var(--r);
  padding: .75rem 1rem;
  text-align: center;
}

.stat-chip .val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--p-dark);
  line-height: 1;
}

.stat-chip .lbl {
  font-size: .72rem;
  color: var(--ink-3);
  margin-top: .2rem;
  font-weight: 500;
}

.stat-chip.amber { background: var(--amber-l); }
.stat-chip.amber .val { color: #92400E; }

.stat-chip.green { background: var(--green-l); }
.stat-chip.green .val { color: #065F46; }

/* ── Insight banner ──────────────────────────────────────────────────────── */
.insight-banner {
  background: linear-gradient(135deg, var(--p-light), #FFF);
  border: 1px solid var(--p-mid);
  border-radius: var(--r);
  padding: .9rem 1.1rem;
  margin-bottom: 1rem;
  font-size: .88rem;
  color: var(--ink-2);
  line-height: 1.55;
}

.insight-banner strong { color: var(--p-dark); }

/* ── Learner badge ───────────────────────────────────────────────────────── */
.learner-badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: linear-gradient(90deg, #312E81, #4F46E5);
  color: #fff;
  border-radius: 100px;
  padding: .3rem .9rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  margin-bottom: .75rem;
}

/* ── Video list ──────────────────────────────────────────────────────────── */
.video-list {
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--r);
}

.video-list::-webkit-scrollbar { width: 4px; }
.video-list::-webkit-scrollbar-track { background: transparent; }
.video-list::-webkit-scrollbar-thumb { background: var(--p-mid); border-radius: 2px; }

.video-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .55rem .85rem;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
  transition: background .12s;
}

.video-row:last-child { border-bottom: none; }
.video-row:hover { background: var(--p-light); }

.video-row .idx   { color: var(--ink-4); min-width: 1.5rem; text-align: right; font-size: .75rem; }
.video-row .title { flex: 1; color: var(--ink-2); }
.video-row .dur   { color: var(--ink-4); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── Form controls ───────────────────────────────────────────────────────── */
.field { margin-bottom: 1rem; }

label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-3);
  margin-bottom: .35rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

input[type="number"],
input[type="date"] {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  font-size: .95rem;
  background: var(--surface);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}

input:focus {
  outline: none;
  border-color: var(--p);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .field-row { grid-template-columns: 1fr; } }

/* ── Pace insight ────────────────────────────────────────────────────────── */
.pace-bar {
  background: var(--p-light);
  border-radius: var(--r);
  padding: .85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: .88rem;
  color: var(--p-dark);
  font-weight: 500;
  min-height: 2.5rem;
  transition: all .2s;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: none;
  border-radius: 100px;
  font-size: .92rem;
  font-weight: 700;
  padding: .72rem 1.75rem;
  cursor: pointer;
  transition: filter .15s, transform .1s, box-shadow .15s;
  width: 100%;
}

.btn:active  { transform: scale(.98); }
.btn:disabled{ opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--p), var(--p-dark));
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
}

.btn-primary:hover:not(:disabled) { filter: brightness(1.08); box-shadow: 0 6px 18px rgba(99,102,241,.4); }

.btn-success {
  background: linear-gradient(135deg, var(--green), #059669);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,.3);
}

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

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Alert ───────────────────────────────────────────────────────────────── */
.alert {
  padding: .7rem 1rem;
  border-radius: var(--r);
  font-size: .87rem;
  margin-bottom: 1rem;
}
.alert-error { background: var(--red-l); color: #991B1B; border: 1px solid #FECACA; }
.alert-info  { background: var(--p-light); color: var(--p-dark); border: 1px solid var(--p-mid); }

/* ── Schedule: week groups ───────────────────────────────────────────────── */
.week-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-4);
  margin: 1.25rem 0 .5rem;
  padding-left: .25rem;
}

.day-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: .9rem 1rem;
  margin-bottom: .6rem;
  transition: box-shadow .15s, border-color .15s;
  animation: fadeUp .3s ease both;
}

.day-card:hover { box-shadow: var(--sh); border-color: var(--p-mid); }

.day-card.weekend { border-left: 3px solid var(--amber); }
.day-card.weekday { border-left: 3px solid var(--p); }

.day-meta {
  min-width: 72px;
  text-align: center;
  flex-shrink: 0;
}

.day-meta .day-name {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-4);
}

.day-meta .day-date {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
}

.day-meta .day-month {
  font-size: .7rem;
  color: var(--ink-4);
}

.day-body { flex: 1; min-width: 0; }

.day-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: .4rem;
}

.pill {
  background: var(--p-light);
  color: var(--p-dark);
  border-radius: 6px;
  padding: .2rem .55rem;
  font-size: .75rem;
  font-weight: 500;
  max-width: 240px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill.weekend { background: var(--amber-l); color: #92400E; }

/* Split-video pill — visually distinct: scissor-cut appearance */
.pill.split {
  background: #FDF2F8;
  color: #86198F;
  border: 1px dashed #E879F9;
  padding-right: .4rem;
}

.pill.split.weekend {
  background: #FFF7ED;
  color: #9A3412;
  border-color: #FB923C;
}

/* Day-level "divided" badge */
.split-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  background: #FDF2F8;
  color: #86198F;
  border: 1px solid #E879F9;
  border-radius: 100px;
  padding: .1rem .55rem;
  font-size: .7rem;
  font-weight: 700;
}

.day-footer {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .78rem;
  color: var(--ink-4);
}

.day-footer .count-badge {
  background: var(--border);
  border-radius: 100px;
  padding: .1rem .5rem;
  font-weight: 600;
  color: var(--ink-3);
}

.day-footer .study-time {
  font-weight: 700;
  color: var(--green);
}

/* ── Course-wide calendar export ─────────────────────────────────────────── */
.timetable-export {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.gcal-course-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.25rem;
  background: #1a73e8;
  color: #fff;
  font-size: .88rem;
  font-weight: 700;
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .18s, box-shadow .18s;
  box-shadow: 0 2px 8px rgba(26,115,232,.35);
}
.gcal-course-btn:hover {
  background: #1557b0;
  box-shadow: 0 4px 14px rgba(26,115,232,.45);
}

.export-hint {
  font-size: .75rem;
  color: var(--ink-4);
  line-height: 1.4;
}

/* ── Schedule summary stats ──────────────────────────────────────────────── */
.sched-summary {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

/* ── Behavior panel ──────────────────────────────────────────────────────── */
.behavior-panel {
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
  color: #fff;
}

.behavior-panel h3 {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.55);
  margin-bottom: .85rem;
}

.behavior-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

@media (max-width: 420px) { .behavior-grid { grid-template-columns: 1fr; } }

.b-item {
  background: rgba(255,255,255,.08);
  border-radius: 10px;
  padding: .65rem .85rem;
}

.b-item .b-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.b-item .b-lbl {
  font-size: .72rem;
  color: rgba(255,255,255,.55);
  margin-top: .1rem;
}

.b-item .b-type {
  font-size: .82rem;
  font-weight: 700;
  color: #FDE68A;
  margin-top: .2rem;
}

/* ── Sticky calendar bar (appears at top once schedule is ready) ─────────── */
#sticky-cal-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: linear-gradient(90deg, #065F46, #047857);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 1.25rem;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}

#sticky-cal-bar.visible { transform: translateY(0); }

#sticky-cal-bar .bar-text {
  font-size: .88rem;
  font-weight: 600;
  opacity: .9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#sticky-cal-bar .bar-btn {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.4);
  border-radius: 100px;
  padding: .45rem 1.1rem;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
  flex-shrink: 0;
}

#sticky-cal-bar .bar-btn:hover { background: rgba(255,255,255,.28); }

/* Push page content down when bar is visible so stepper isn't hidden */
body.bar-visible .stepper { top: 46px; }

/* ── Calendar card ───────────────────────────────────────────────────────── */
.cal-card {
  background: linear-gradient(135deg, #065F46 0%, #047857 100%);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  color: #fff;
  text-align: center;
}

.cal-card h2 { font-size: 1.1rem; margin-bottom: .5rem; }
.cal-card p  { font-size: .88rem; opacity: .8; margin-bottom: 1.25rem; }
.cal-card .btn-success {
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.4);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 100px;
  font-size: .92rem;
  font-weight: 700;
  padding: .72rem 1.75rem;
  width: 100%;
  box-sizing: border-box;
  transition: background .15s;
}
.cal-card .btn-success:hover { background: rgba(255,255,255,.25); }

/* How-to steps */
.cal-steps {
  display: flex;
  gap: .75rem;
  margin-top: 1.1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cal-step {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  opacity: .8;
}

.cal-step-num {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  font-size: .72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   IMPORT GUIDE
   ══════════════════════════════════════════════════════════════════════════ */

.import-guide { padding: 1.75rem 1.5rem; }

/* Header */
.ig-header { margin-bottom: 1.75rem; }
.ig-badge {
  display: inline-block;
  background: var(--p-light);
  color: var(--p-dark);
  border-radius: 100px;
  padding: .2rem .75rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin-bottom: .5rem;
}
.ig-title-wrap h3 { font-size: 1.05rem; font-weight: 800; color: var(--ink); }
.ig-title-wrap p  { font-size: .82rem; color: var(--ink-3); margin-top: .2rem; }

/* Step grid */
.ig-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: .5rem 0;
  align-items: start;
}

@media (max-width: 680px) {
  .ig-steps { grid-template-columns: 1fr; gap: 1.25rem; }
  .ig-connector { display: none; }
}

/* Connector arrow between steps */
.ig-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding-top: 2.75rem;
  color: var(--ink-4);
  user-select: none;
}
.ig-line {
  width: 2px;
  height: 0;
  background: var(--border);
  animation: line-grow .5s ease both;
}
.ig-arrow-tip {
  font-size: 1.1rem;
  color: var(--p-mid);
  transform: rotate(-90deg);
  display: block;
  margin-top: 2px;
}
@keyframes line-grow { to { height: 28px; } }

/* Each step */
.ig-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .75rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
}
.ig-step.visible {
  opacity: 1;
  transform: translateY(0);
}

.ig-step-num {
  font-size: .68rem;
  font-weight: 800;
  color: var(--p);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ig-text h4 { font-size: .88rem; font-weight: 700; color: var(--ink); margin-bottom: .25rem; }
.ig-text p  { font-size: .78rem; color: var(--ink-3); line-height: 1.55; max-width: 160px; margin: 0 auto; }
.ig-text code {
  background: var(--p-light);
  color: var(--p-dark);
  padding: .1rem .35rem;
  border-radius: 4px;
  font-size: .75rem;
}

/* ── Visual "screen" frame ─────────────────────────────────────────────────── */
.ig-visual {
  position: relative;
  width: 150px;
  flex-shrink: 0;
}

.vis-screen {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(15,23,42,.08);
}

.vis-topbar {
  background: #F1F5F9;
  padding: 5px 8px;
  display: flex;
  gap: 4px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.vis-dot {
  width: 7px; height: 7px; border-radius: 50%;
}
.vis-dot.r { background: #FC6058; }
.vis-dot.y { background: #FEC02F; }
.vis-dot.g { background: #2DC940; }

.vis-body {
  padding: 10px;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ── Step 1: Download ──────────────────────────────────────────────────────── */
.dl-btn-mock {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #fff;
  border-radius: 100px;
  padding: 4px 10px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: pulse-btn 2s ease infinite;
}
.dl-arrow { animation: bounce-dl .9s ease infinite; display: inline-block; }
@keyframes bounce-dl {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(3px); }
}
@keyframes pulse-btn {
  0%,100% { box-shadow: 0 3px 10px rgba(16,185,129,.3); }
  50%     { box-shadow: 0 3px 18px rgba(16,185,129,.6); }
}

.dl-file-mock { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dl-file-icon { position: relative; width: 28px; height: 34px; }
.file-body {
  position: absolute;
  inset: 0;
  background: var(--p-light);
  border: 1.5px solid var(--p-mid);
  border-radius: 4px 8px 4px 4px;
}
.file-ear {
  position: absolute;
  top: -1px; right: -1px;
  width: 10px; height: 10px;
  background: var(--p-mid);
  border-radius: 0 0 0 4px;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}
.file-label {
  position: absolute;
  bottom: 5px; left: 0; right: 0;
  text-align: center;
  font-size: 6px;
  font-weight: 800;
  color: var(--p-dark);
}
.dl-progress {
  width: 60px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.dl-progress-fill {
  height: 100%;
  background: var(--green);
  border-radius: 2px;
  animation: progress-fill 2s ease 0.5s infinite;
}
@keyframes progress-fill {
  0%   { width: 0%; }
  80%  { width: 100%; }
  100% { width: 100%; }
}

/* ── Step 2: Google Calendar ───────────────────────────────────────────────── */
.vis-urlbar {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 7.5px;
  color: #334155;
  width: 100%;
  text-align: center;
}

.gcal-logo-mock {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.gcal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.gcal-sq {
  width: 11px; height: 11px;
  border-radius: 2px;
  animation: sq-pop .4s ease both;
}
.gcal-sq:nth-child(1) { animation-delay: .1s; }
.gcal-sq:nth-child(2) { animation-delay: .2s; }
.gcal-sq:nth-child(3) { animation-delay: .3s; }
.gcal-sq:nth-child(4) { animation-delay: .4s; }
@keyframes sq-pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.gcal-blue   { background: #4285F4; }
.gcal-red    { background: #EA4335; }
.gcal-yellow { background: #FBBC05; }
.gcal-green  { background: #34A853; }
.gcal-wordmark { font-size: 10px; font-weight: 700; color: #5F6368; }

/* ── Step 3: Settings dropdown ─────────────────────────────────────────────── */
.vis-body-menu { position: relative; align-items: flex-end; padding-right: 6px; }

.gear-icon {
  position: absolute;
  top: 6px; right: 8px;
  font-size: 14px;
  animation: gear-spin 6s linear infinite;
  cursor: pointer;
  z-index: 2;
}
@keyframes gear-spin {
  0%,60%    { transform: rotate(0deg); }
  70%,100%  { transform: rotate(60deg); }
}

.dropdown-mock {
  position: absolute;
  top: 20px; right: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(15,23,42,.12);
  overflow: hidden;
  z-index: 3;
  animation: drop-in .35s cubic-bezier(.4,0,.2,1) .8s both;
  min-width: 80px;
}
@keyframes drop-in {
  from { opacity: 0; transform: translateY(-8px) scaleY(.9); }
  to   { opacity: 1; transform: translateY(0) scaleY(1); }
}

.drop-item {
  padding: 4px 10px;
  font-size: 8.5px;
  color: #334155;
  white-space: nowrap;
}
.drop-highlighted {
  background: var(--p-light);
  color: var(--p-dark);
  font-weight: 700;
  animation: highlight-blink 1.6s ease 1.2s infinite;
}
.drop-check { margin-right: 2px; }
@keyframes highlight-blink {
  0%,100% { background: var(--p-light); }
  50%     { background: var(--p-mid); }
}

/* CSS cursor */
.cursor-mock {
  position: absolute;
  bottom: 18px; right: 28px;
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 9px solid #1E1B4B;
  z-index: 10;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,.3));
  animation: cursor-travel 3s ease 1.5s infinite;
}
@keyframes cursor-travel {
  0%          { transform: translate(30px, -20px); opacity: 0; }
  30%         { opacity: 1; }
  55%,75%     { transform: translate(0, 0); opacity: 1; }
  80%         { transform: translate(0, 0) scale(.85); }
  85%         { transform: translate(0, 0) scale(1); }
  100%        { transform: translate(30px, -20px); opacity: 0; }
}

/* ── Step 4: File picker ───────────────────────────────────────────────────── */
.file-picker-mock {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  width: 120px;
  box-shadow: 0 4px 14px rgba(15,23,42,.1);
}
.fpm-header {
  background: #F1F5F9;
  padding: 4px 8px;
  font-size: 7px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid var(--border);
}
.fpm-file {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  background: var(--p-light);
}
.fpm-icon { font-size: 12px; }
.fpm-name { font-size: 7px; font-weight: 600; color: var(--p-dark); }
.fpm-import-btn {
  margin: 6px 8px;
  background: #4285F4;
  color: #fff;
  border-radius: 4px;
  padding: 3px 0;
  font-size: 8px;
  font-weight: 700;
  text-align: center;
  animation: btn-click 2.5s ease 1s infinite;
}
@keyframes btn-click {
  0%,70%  { transform: scale(1); box-shadow: none; }
  78%     { transform: scale(.94); }
  86%,100%{ transform: scale(1); box-shadow: 0 2px 8px rgba(66,133,244,.5); }
}

/* Success overlay on step 4 */
.vis-success-overlay {
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: rgba(255,255,255,.92);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlay-appear .4s ease 3.5s both;
}
@keyframes overlay-appear {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.check-svg { width: 52px; height: 52px; }

.check-circle-anim {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-dasharray: 138;
  stroke-dashoffset: 138;
  animation: draw-circle 0.7s ease 3.7s forwards;
}
@keyframes draw-circle { to { stroke-dashoffset: 0; } }

.check-mark-anim {
  fill: none;
  stroke: var(--green);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: draw-check 0.4s ease 4.4s forwards;
}
@keyframes draw-check { to { stroke-dashoffset: 0; } }

/* ── Compatibility chips ───────────────────────────────────────────────────── */
.ig-compat {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.ig-compat-label {
  font-size: .75rem;
  color: var(--ink-4);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: .25rem;
}
.ig-compat-chip {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .25rem .75rem;
  font-size: .77rem;
  color: var(--ink-3);
  white-space: nowrap;
}

/* ── Result pages ────────────────────────────────────────────────────────── */
.result-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.result-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--sh-lg);
}

.result-card .icon   { font-size: 3.5rem; margin-bottom: .75rem; }
.result-card h2      { font-size: 1.4rem; font-weight: 800; margin-bottom: .5rem; }
.result-card p       { color: var(--ink-3); font-size: .93rem; }
.result-card .errors { margin-top: 1rem; text-align: left; }
.result-card .errors li { color: var(--red); font-size: .82rem; margin-bottom: .25rem; }

.back-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: .65rem 1.75rem;
  background: var(--p);
  color: #fff;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  transition: filter .15s;
}
.back-link:hover { filter: brightness(1.1); }

/* ── Util ────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

.mt-sm { margin-top: .75rem; }
.mt-md { margin-top: 1.25rem; }

/* ── Confetti canvas ─────────────────────────────────────────────────────── */
#confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}
