:root {
  color-scheme: light;
  --bg: #fafafa;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #ffffff;
  --surface-soft: #f4f4f4;
  --text: #0d0d0d;
  --muted: #737373;
  --subtle: #a2a2a2;
  --border: #dedede;
  --border-soft: rgba(0, 0, 0, .075);
  --pink: #e1306c;
  --purple: #833ab4;
  --orange: #f77737;
  --yellow: #fcaf45;
  --blue: #405de6;
  --danger: #d93025;
  --ig-gradient: linear-gradient(135deg, #405de6 0%, #833ab4 33%, #e1306c 63%, #f77737 82%, #fcaf45 100%);
  --glass-shadow: 0 24px 70px rgba(36, 22, 30, .10), inset 0 1px 0 rgba(255,255,255,.88);
  --card-shadow: 0 8px 30px rgba(0, 0, 0, .055);
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #090909;
  --surface: rgba(25, 25, 25, .80);
  --surface-solid: #151515;
  --surface-soft: #202020;
  --text: #f5f5f5;
  --muted: #a8a8a8;
  --subtle: #747474;
  --border: #303030;
  --border-soft: rgba(255, 255, 255, .09);
  --glass-shadow: 0 28px 75px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.08);
  --card-shadow: 0 10px 34px rgba(0,0,0,.23);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--text); background: var(--bg); font-family: var(--font); -webkit-font-smoothing: antialiased; transition: color .25s ease, background .25s ease; }
button, textarea, a { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
::selection { color: #fff; background: var(--pink); }

.ambient-stage { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background:
  radial-gradient(circle at 78% 11%, rgba(225,48,108,.095), transparent 24%),
  radial-gradient(circle at 60% 22%, rgba(131,58,180,.075), transparent 28%),
  radial-gradient(circle at 10% 52%, rgba(64,93,230,.055), transparent 26%),
  var(--bg); }
.grain { display: none; }
.liquid-orb { position: absolute; border-radius: 50%; filter: blur(75px); opacity: .16; }
.orb-one { width: 360px; height: 360px; top: 90px; right: -120px; background: var(--ig-gradient); }
.orb-two { width: 280px; height: 280px; top: 850px; left: -160px; background: linear-gradient(145deg, var(--blue), var(--purple)); }
.liquid-ring { position: absolute; width: 540px; height: 210px; top: 500px; left: 50%; border: 1px solid rgba(225,48,108,.1); border-radius: 50%; transform: translateX(-50%) rotate(-8deg); filter: blur(.2px); }

main { width: min(1480px, calc(100% - 48px)); margin: 0 auto; }
.site-nav { position: relative; z-index: 20; display: grid; grid-template-columns: 1fr auto auto auto auto; align-items: center; gap: 12px; min-height: 76px; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; justify-self: start; align-items: center; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: #fff; background: var(--ig-gradient); font-size: 12px; font-weight: 800; box-shadow: 0 6px 18px rgba(225,48,108,.22); }
.brand-logo { display: block; width: 152px; height: 36px; border-radius: 9px; background-color: #fff; background-image: url("/static/instaspy-logo.jpg"); background-repeat: no-repeat; background-size: 224px 224px; background-position: -29px -90px; box-shadow: 0 5px 18px rgba(225,48,108,.09); }
.nav-status { display: inline-flex; align-items: center; padding: 9px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); backdrop-filter: blur(16px); font-size: 11px; }
.status-dot { width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: #20b759; box-shadow: 0 0 0 3px rgba(32,183,89,.12); }
.nav-link { justify-self: end; color: var(--text); font-size: 12px; font-weight: 680; text-decoration: none; }
.nav-link span { display: inline-grid; place-items: center; width: 31px; height: 31px; margin-left: 8px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 72px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); background: var(--surface); box-shadow: inset 0 1px 0 rgba(255,255,255,.25); backdrop-filter: blur(16px); cursor: pointer; font-size: 10px; font-weight: 700; text-align: center; }
.theme-toggle i { width: 13px; height: 13px; border: 2px solid currentColor; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.theme-toggle span { float: none; margin: 0; }
[data-theme="dark"] .theme-toggle i { background: currentColor; box-shadow: inset 5px 0 0 var(--surface-solid); }
.account-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 78px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text); background: var(--surface); box-shadow: none; backdrop-filter: blur(16px); font-size: 10px; font-weight: 700; text-align: center; }
.account-trigger:hover { border-color: var(--pink); box-shadow: none; transform: none; }
.account-trigger.signed-in { border-color: rgba(225,48,108,.28); background: rgba(225,48,108,.065); }
.account-trigger.service-error { border-color: rgba(217,48,37,.32); }
.account-avatar { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: transparent; background: var(--ig-gradient); box-shadow: inset 0 0 0 2px rgba(255,255,255,.75); }
.account-avatar.large { width: 42px; height: 42px; box-shadow: inset 0 0 0 3px rgba(255,255,255,.78), 0 8px 18px rgba(225,48,108,.18); }

.hero { min-height: 535px; display: flex; align-items: center; padding: 46px 3vw 62px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .72fr); align-items: center; gap: clamp(64px, 8vw, 135px); width: 100%; }
.eyebrow, .step { margin: 0 0 14px; color: var(--pink); font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.eyebrow span { display: inline-grid; place-items: center; width: 23px; height: 23px; margin-right: 8px; border-radius: 50%; color: #fff; background: var(--ig-gradient); font-size: 8px; letter-spacing: 0; }
h1 { max-width: 760px; margin: 0; font-size: clamp(58px, 6.4vw, 94px); font-weight: 800; line-height: .98; letter-spacing: -.06em; }
h1 em { display: inline; color: transparent; background: var(--ig-gradient); background-clip: text; -webkit-background-clip: text; font-style: normal; }
.hero-copy { max-width: 650px; margin: 25px 0 0; color: var(--muted); font-size: 17px; line-height: 1.58; letter-spacing: -.01em; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.hero-tags span { padding: 8px 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); backdrop-filter: blur(12px); font-size: 10px; font-weight: 650; }

.hero-object { position: relative; height: 465px; }
.reel-preview { position: absolute; top: 0; right: 38px; width: 350px; overflow: hidden; border: 1px solid var(--border); border-radius: 23px; background: var(--surface-solid); box-shadow: 0 28px 80px rgba(58,26,52,.17); transform: rotate(1.5deg); }
.preview-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px 14px; }
.avatar-ring { display: grid; place-items: center; width: 34px; height: 34px; padding: 2px; border-radius: 50%; background: var(--ig-gradient); }
.avatar-ring span { display: grid; place-items: center; width: 100%; height: 100%; border: 2px solid var(--surface-solid); border-radius: 50%; color: #fff; background: linear-gradient(145deg, #242424, #676767); font-size: 11px; font-weight: 800; }
.preview-top b { display: block; font-size: 10px; }
.preview-top small { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; }
.preview-top > strong { letter-spacing: 2px; font-size: 10px; }
.preview-media { position: relative; height: 326px; overflow: hidden; color: #fff; background:
  radial-gradient(circle at 76% 23%, rgba(252,175,69,.75), transparent 22%),
  radial-gradient(circle at 24% 76%, rgba(64,93,230,.8), transparent 28%),
  linear-gradient(145deg, #38116b, #b91d6a 53%, #f77737); }
.preview-media::before { content: ""; position: absolute; width: 250px; height: 250px; top: 60px; left: 45px; border: 1px solid rgba(255,255,255,.28); border-radius: 46% 54% 62% 38% / 57% 43% 57% 43%; background: rgba(255,255,255,.08); box-shadow: inset 20px 20px 50px rgba(255,255,255,.12); backdrop-filter: blur(12px); transform: rotate(20deg); }
.reels-label { position: absolute; top: 13px; left: 13px; font-size: 8px; font-weight: 800; letter-spacing: .09em; }
.preview-hook { position: absolute; inset: auto 18px 38px; padding: 16px; border: 1px solid rgba(255,255,255,.25); border-radius: 15px; background: rgba(0,0,0,.32); box-shadow: inset 0 1px 0 rgba(255,255,255,.14); backdrop-filter: blur(15px); }
.preview-hook small { display: block; margin-bottom: 7px; color: rgba(255,255,255,.68); font-size: 7px; font-weight: 750; letter-spacing: .1em; }
.preview-hook b { font-size: 17px; line-height: 1.25; letter-spacing: -.025em; }
.preview-timeline { position: absolute; right: 14px; bottom: 15px; left: 14px; height: 2px; border-radius: 99px; background: rgba(255,255,255,.38); }
.preview-timeline i { display: block; width: 42%; height: 100%; border-radius: inherit; background: #fff; }
.preview-actions { display: flex; align-items: center; gap: 14px; padding: 11px 14px 7px; font-size: 23px; line-height: 1; }
.preview-actions .save-icon { margin-left: auto; font-size: 19px; }
.preview-caption { display: grid; gap: 5px; padding: 0 14px 15px; font-size: 9px; line-height: 1.4; }
.preview-caption > b { font-size: 9px; }
.preview-caption span { color: var(--muted); }
.preview-caption strong { margin-right: 4px; color: var(--text); }
.floating-insight { position: absolute; z-index: 3; border: 1px solid rgba(255,255,255,.7); border-radius: 16px; background: rgba(255,255,255,.64); box-shadow: 0 18px 50px rgba(71,40,61,.16), inset 0 1px 0 rgba(255,255,255,.95); backdrop-filter: blur(20px) saturate(130%); }
[data-theme="dark"] .floating-insight { border-color: rgba(255,255,255,.14); background: rgba(26,26,26,.72); box-shadow: 0 20px 55px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.09); }
.insight-score { left: -12px; bottom: 92px; padding: 15px 17px; transform: rotate(-4deg); }
.insight-score small, .insight-pattern small { display: block; color: var(--pink); font-size: 7px; font-weight: 800; letter-spacing: .09em; }
.insight-score b { font-size: 30px; letter-spacing: -.05em; }
.insight-score span { color: var(--muted); font-size: 8px; }
.insight-pattern { right: -23px; bottom: 32px; display: flex; align-items: center; gap: 10px; padding: 13px 15px; transform: rotate(3deg); }
.insight-pattern > i { width: 30px; height: 30px; border-radius: 9px; background: var(--ig-gradient); box-shadow: 0 5px 16px rgba(225,48,108,.22); }
.insight-pattern b { display: block; margin-top: 3px; font-size: 11px; }

.workspace, .history-panel, .progress-panel, .results, .scope { position: relative; margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--glass-shadow); backdrop-filter: blur(22px) saturate(115%); }
.workspace { padding: clamp(30px, 3.2vw, 48px); }
.history-panel { padding: clamp(25px, 3.2vw, 40px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 15px; }
.section-heading.compact { align-items: center; }
h2 { margin: 0; font-size: clamp(34px, 3.4vw, 48px); font-weight: 760; line-height: 1.05; letter-spacing: -.045em; }
h3 { margin: 7px 0 12px; font-size: clamp(27px, 3vw, 36px); font-weight: 760; letter-spacing: -.04em; }
h4 { margin: 0 0 12px; color: var(--text); font-size: 10px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.section-intro { max-width: 720px; margin: 0 0 23px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.counter, .pill { padding: 8px 12px; border: 1px solid rgba(225,48,108,.24); border-radius: 999px; color: var(--pink); background: rgba(225,48,108,.065); font-size: 11px; font-weight: 700; }
textarea { width: 100%; min-height: 205px; resize: vertical; padding: 22px; border: 1px solid var(--border); border-radius: 17px; outline: none; color: var(--text); background: rgba(255,255,255,.48); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); font-family: var(--mono); font-size: 13px; line-height: 1.7; transition: border-color .2s, box-shadow .2s, background .2s; }
[data-theme="dark"] textarea { background: rgba(0,0,0,.24); box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
textarea:focus { border-color: var(--pink); background: var(--surface-solid); box-shadow: 0 0 0 3px rgba(225,48,108,.09); }
textarea::placeholder { color: var(--subtle); }
.actions { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 17px; }
.privacy-note { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.privacy-note b { display: block; margin-bottom: 2px; color: var(--text); font-size: 11px; }
.privacy-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 11px; color: var(--pink); background: var(--surface-solid); font-size: 16px; }
button { min-width: 178px; border: 0; border-radius: 11px; padding: 15px 17px; cursor: pointer; color: #fff; background: var(--ig-gradient); box-shadow: 0 10px 24px rgba(225,48,108,.2); font-size: 12px; font-weight: 700; text-align: left; transition: transform .15s, box-shadow .15s, opacity .15s; }
button:hover { transform: translateY(-1px); box-shadow: 0 13px 30px rgba(225,48,108,.27); }
button:disabled { cursor: wait; opacity: .55; transform: none; }
button span { float: right; margin-left: 24px; }
.theme-toggle:hover { transform: none; border-color: var(--subtle); box-shadow: none; }
.secondary-action { min-width: 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: var(--surface-solid); box-shadow: none; font-size: 10px; text-align: center; }
.secondary-action:hover { border-color: var(--pink); box-shadow: none; }
.form-error { min-height: 1.2em; margin: 11px 0 0; color: var(--danger); font-size: 11px; }
.pipeline-strip { display: flex; align-items: center; gap: 11px; margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--border); }
.pipeline-strip span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 650; white-space: nowrap; }
.pipeline-strip b { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; color: #fff; background: var(--ig-gradient); font-size: 7px; }
.pipeline-strip i { width: 100%; height: 1px; background: var(--border); }

.progress-panel, .results { padding: clamp(24px, 3.5vw, 40px); }
.history-status { min-height: 18px; margin: 0 0 12px; color: var(--muted); font-size: 10px; }
.history-list { display: grid; gap: 9px; }
.history-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: 17px 19px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-solid); box-shadow: var(--card-shadow); }
.history-card-main { min-width: 0; }
.history-card-main > strong { display: block; font-size: 13px; letter-spacing: -.015em; }
.history-card-main > span { display: block; margin-top: 5px; color: var(--subtle); font-size: 8px; }
.history-card-main > p { overflow: hidden; margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.history-card-side { display: flex; align-items: center; gap: 9px; }
.history-pill { padding: 6px 9px; border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 8px; font-weight: 750; text-transform: capitalize; }
.history-pill.status-completed { color: #168547; background: rgba(32,183,89,.10); }
[data-theme="dark"] .history-pill.status-completed { color: #6bdd9a; }
.history-open { min-width: 0; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; color: var(--blue); background: var(--surface-soft); box-shadow: none; font-size: 8px; text-align: center; }
.history-open:hover { border-color: var(--blue); box-shadow: none; }
.history-empty { display: grid; gap: 6px; place-items: center; padding: 28px; border: 1px dashed var(--border); border-radius: 14px; color: var(--muted); text-align: center; }
.history-empty strong { color: var(--text); font-size: 13px; }
.history-empty span { font-size: 10px; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.progress-bar { height: 100%; width: 0; border-radius: inherit; background: var(--ig-gradient); transition: width .35s ease; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 20px; }
.summary-grid div { padding: 17px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-solid); }
.summary-grid strong { display: block; font-size: 25px; font-weight: 720; letter-spacing: -.04em; }
.summary-grid span { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; }
.export-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.secondary-button { display: inline-flex; align-items: center; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; color: var(--text); background: var(--surface-solid); text-decoration: none; font-size: 9px; font-weight: 700; }
.secondary-button.export-primary { border-color: transparent; color: #fff; background: var(--ig-gradient); box-shadow: 0 8px 20px rgba(225,48,108,.18); }

.result-list { display: grid; gap: 16px; }
.batch-report { margin-bottom: 20px; padding: clamp(23px, 3.5vw, 38px); border: 1px solid rgba(225,48,108,.21); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(131,58,180,.075), rgba(225,48,108,.06) 48%, rgba(247,119,55,.055)); }
.report-eyebrow { color: var(--pink); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.batch-report > p { max-width: 880px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.formula { display: grid; gap: 6px; margin: 20px 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); backdrop-filter: blur(14px); }
.formula span { color: var(--pink); font-size: 8px; font-weight: 750; }
.formula strong { font-size: 16px; line-height: 1.4; }
.batch-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.batch-columns > div { padding: 17px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface); backdrop-filter: blur(12px); }
.batch-columns ul, .detail-copy ul { margin: 0; padding-left: 17px; }
.batch-columns li { margin-bottom: 12px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.batch-columns li:last-child { margin-bottom: 0; }
.batch-columns li strong, .batch-columns li span, .batch-columns li a { display: block; }
.batch-columns li strong, .batch-columns li a { margin-bottom: 3px; color: var(--text); font-weight: 700; text-decoration: none; }
.batch-report details { margin-top: 17px; padding-top: 15px; border-top: 1px solid var(--border); }
.batch-report summary { cursor: pointer; color: var(--muted); font-size: 9px; font-weight: 700; }
.detail-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 14px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.detail-copy strong { color: var(--text); }

.result-card { display: grid; grid-template-columns: 250px 1fr; min-height: 270px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-solid); box-shadow: var(--card-shadow); }
.media-column { position: relative; min-height: 270px; background: #191919; }
.media-column video { width: 100%; height: 100%; min-height: 270px; max-height: 420px; display: block; object-fit: cover; }
.media-fallback { position: absolute; inset: 0; display: none; place-items: center; color: #aaa; font-size: 11px; }
.result-content { display: flex; flex-direction: column; min-width: 0; padding: 24px; }
.result-topline { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.creator { font-size: 12px; font-weight: 750; }
.verified { display: none; margin-left: 4px; color: var(--blue); }
.source-link { color: var(--blue); font-size: 9px; font-weight: 650; text-decoration: none; }
.caption { display: -webkit-box; overflow: hidden; margin: 20px 0; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: auto 0 0; }
.metrics div { padding: 12px; border-radius: 10px; background: var(--surface-soft); }
.metrics dt { color: var(--muted); font-size: 8px; font-weight: 650; }
.metrics dd { margin: 6px 0 0; font-size: 17px; font-weight: 720; }
.metadata { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; color: var(--subtle); font-family: var(--mono); font-size: 8px; }
.output-links { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.output-links a { display: inline-flex; padding: 7px 9px; border-radius: 8px; color: var(--blue); background: rgba(64,93,230,.07); font-size: 8px; font-weight: 700; text-decoration: none; }
.output-links a[hidden] { display: none; }
.processing-state { color: var(--subtle); font-size: 8px; }

.content-report { margin-top: 19px; padding-top: 18px; border-top: 1px solid var(--border); }
.analysis-heading { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: var(--pink); font-size: 9px; font-weight: 750; }
.analysis-engine { padding: 4px 7px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface-soft); font-size: 8px; }
.analysis-summary { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.analysis-block { padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-soft); }
.analysis-block > span, .psychology-section > span, .improvement-section > span { display: block; margin-bottom: 9px; color: var(--muted); font-size: 8px; font-weight: 700; }
.analysis-block blockquote { margin: 0 0 10px; padding-left: 11px; border-left: 3px solid var(--pink); font-size: 14px; font-weight: 650; line-height: 1.4; }
.analysis-block p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.analysis-block .hook-type, .analysis-block .cta-type { color: var(--text); font-weight: 700; }
.psychology-section, .improvement-section { margin-top: 15px; }
.psychology-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.psychology-list article { padding: 13px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface); backdrop-filter: blur(10px); }
.psychology-list strong { display: block; color: var(--purple); font-size: 10px; }
[data-theme="dark"] .psychology-list strong { color: #c88af0; }
.psychology-list p { margin: 6px 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.psychology-list small { color: var(--subtle); font-size: 8px; line-height: 1.4; }
.improvement-list { margin: 0; padding: 13px 18px 13px 31px; border-radius: 11px; color: var(--muted); background: rgba(247,119,55,.075); font-size: 10px; line-height: 1.55; }
.transcript-details { margin-top: 14px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-soft); }
.transcript-details summary { cursor: pointer; color: var(--blue); font-size: 9px; font-weight: 700; }
.timestamped-transcript { max-height: 310px; overflow: auto; margin: 12px 0 0; white-space: pre-wrap; color: var(--muted); font-family: var(--mono); font-size: 9px; line-height: 1.65; }
.analysis-limit, .analysis-unavailable { margin: 12px 0 0; color: var(--subtle); font-size: 8px; line-height: 1.45; }
.failure-card { padding: 20px; border: 1px solid rgba(217,48,37,.25); border-radius: 14px; background: rgba(217,48,37,.055); }
.failure-card strong { display: block; margin-bottom: 7px; color: var(--danger); }
.failure-card p { margin: 0; color: var(--muted); font-size: 11px; }
.failure-card code { display: block; margin-top: 10px; overflow-wrap: anywhere; color: var(--subtle); }

.scope { display: grid; grid-template-columns: .9fr 1.5fr; gap: 60px; margin-top: 90px; padding: clamp(25px, 4vw, 44px); }
.scope-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.scope-grid > div { padding: 16px; border: 1px solid var(--border); border-radius: 13px; background: var(--surface-solid); }
.scope-grid b { display: block; margin-bottom: 28px; color: var(--pink); font-size: 8px; }
.scope-grid span { font-size: 13px; font-weight: 750; }
.scope-grid p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; padding: 26px 3px 36px; border-top: 1px solid var(--border); color: var(--subtle); font-size: 8px; font-weight: 650; }

.auth-dialog { width: min(520px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow: auto; border: 1px solid rgba(255,255,255,.6); border-radius: 24px; outline: none; color: var(--text); background: rgba(255,255,255,.82); box-shadow: 0 35px 110px rgba(43,17,36,.28), inset 0 1px 0 rgba(255,255,255,.9); backdrop-filter: blur(28px) saturate(130%); }
[data-theme="dark"] .auth-dialog { border-color: rgba(255,255,255,.12); background: rgba(20,20,20,.88); box-shadow: 0 38px 120px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.08); }
.auth-dialog::backdrop { background: rgba(15,10,14,.42); backdrop-filter: blur(7px); }
.auth-shell { position: relative; padding: 34px; }
.auth-close { position: absolute; top: 17px; right: 17px; display: grid; place-items: center; width: 32px; min-width: 32px; height: 32px; padding: 0; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); background: var(--surface-solid); box-shadow: none; font-size: 18px; text-align: center; }
.auth-close:hover { color: var(--text); border-color: var(--subtle); box-shadow: none; transform: none; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 35px; color: var(--muted); font-size: 10px; font-weight: 750; }
.auth-kicker { margin: 0 0 10px; color: var(--pink); font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.auth-dialog h2 { max-width: 410px; font-size: 39px; }
.auth-copy { max-width: 420px; margin: 13px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 18px; padding: 4px; border-radius: 12px; background: var(--surface-soft); }
.auth-tab { min-width: 0; padding: 10px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; box-shadow: none; font-size: 10px; text-align: center; }
.auth-tab:hover { box-shadow: none; transform: none; }
.auth-tab.active { color: var(--text); background: var(--surface-solid); box-shadow: 0 3px 12px rgba(0,0,0,.06); }
#auth-form { display: grid; }
#auth-form label { margin: 11px 0 7px; color: var(--text); font-size: 9px; font-weight: 700; }
#auth-form input { width: 100%; padding: 13px 14px; border: 1px solid var(--border); border-radius: 11px; outline: none; color: var(--text); background: var(--surface-solid); font: inherit; font-size: 12px; transition: border-color .2s, box-shadow .2s; }
#auth-form input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(225,48,108,.09); }
.auth-submit { width: 100%; margin-top: 18px; text-align: left; }
.auth-message { min-height: 18px; margin: 12px 0 0; color: var(--pink); font-size: 10px; line-height: 1.45; }
.auth-fineprint { margin: 8px 0 0; color: var(--subtle); font-size: 8px; line-height: 1.5; }
.signed-in-card { display: flex; align-items: center; gap: 13px; margin-top: 22px; padding: 15px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-solid); }
.signed-in-card small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; }
.signed-in-card strong { display: block; overflow: hidden; max-width: 330px; font-size: 12px; text-overflow: ellipsis; }
.sign-out-button { width: 100%; min-width: 0; margin-top: 8px; padding: 12px; border: 1px solid var(--border); color: var(--muted); background: transparent; box-shadow: none; font-size: 10px; text-align: center; }
.sign-out-button:hover { color: var(--danger); border-color: rgba(217,48,37,.28); box-shadow: none; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: no-preference) {
  .reel-preview { animation: reel-float 7s ease-in-out infinite; }
  .insight-score { animation: score-float 6s ease-in-out infinite; }
  .insight-pattern { animation: pattern-float 7.5s ease-in-out infinite; }
  @keyframes reel-float { 0%,100% { transform: rotate(1.5deg) translateY(0); } 50% { transform: rotate(.5deg) translateY(-7px); } }
  @keyframes score-float { 0%,100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-9px); } }
  @keyframes pattern-float { 0%,100% { transform: rotate(3deg) translateY(0); } 50% { transform: rotate(1deg) translateY(8px); } }
}

@media (max-width: 920px) {
  main { width: min(100% - 26px, 760px); }
  .hero { min-height: auto; padding: 70px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 52px; }
  .hero-copy-column { max-width: 680px; }
  .hero-object { width: 410px; max-width: 100%; margin: 0 auto; }
  .scope { grid-template-columns: 1fr; gap: 30px; }
  .batch-columns, .detail-copy { grid-template-columns: 1fr; }
  .nav-status { display: none; }
}

@media (max-width: 700px) {
  .site-nav { grid-template-columns: 1fr auto auto auto; }
  h1 { font-size: clamp(48px, 13vw, 72px); }
  .hero-copy { font-size: 14px; }
  .section-heading, .actions { align-items: stretch; flex-direction: column; }
  button { width: 100%; }
  .pipeline-strip { display: grid; grid-template-columns: 1fr 1fr; }
  .pipeline-strip i { display: none; }
  .summary-grid, .metrics { grid-template-columns: repeat(2, 1fr); }
  .result-card { grid-template-columns: 1fr; }
  .media-column, .media-column video { min-height: 420px; max-height: 600px; }
  .analysis-grid, .psychology-list { grid-template-columns: 1fr; }
  .scope-grid { grid-template-columns: 1fr; }
  .history-card { grid-template-columns: 1fr; gap: 14px; }
  .history-card-side { justify-content: space-between; }
}

@media (max-width: 480px) {
  main { width: min(100% - 18px, 440px); }
  .site-nav { min-height: 65px; gap: 7px; }
  .brand-logo { width: 42px; height: 36px; background-size: 224px 224px; background-position: -29px -90px; }
  .auth-brand .brand-logo { width: 152px; }
  .nav-link { font-size: 0; }
  .nav-link span { margin: 0; font-size: 13px; }
  .theme-toggle { width: 36px; min-width: 36px; padding: 7px; }
  .theme-toggle span { display: none; }
  .account-trigger { width: 36px; min-width: 36px; padding: 7px; }
  .account-trigger #account-label { display: none; }
  .hero { padding: 55px 0; }
  .hero-object { height: 445px; transform: scale(.86); transform-origin: top center; margin-bottom: -55px; }
  .reel-preview { right: auto; left: 50%; animation: none; transform: translateX(-50%) rotate(1deg); }
  .insight-score { left: -10px; }
  .insight-pattern { right: -6px; }
  .workspace, .history-panel, .progress-panel, .results, .scope { padding: 20px; border-radius: 20px; }
  textarea { min-height: 185px; padding: 16px; font-size: 10px; }
  .export-actions { width: 100%; }
  .secondary-button { flex: 1; justify-content: center; }
  footer { flex-direction: column; gap: 7px; }
  .auth-shell { padding: 27px 21px; }
  .auth-dialog h2 { font-size: 32px; }
}
