/* Shared studio language, with iPhone as the primary layout. */
.creation-brief { display:grid; gap:12px; padding:16px; margin:16px 0; border:1px solid #e9e5ef; border-radius:16px; background:white; }
.creation-brief label { display:grid; gap:8px; font-size:14px; }
.creation-brief input, .creation-brief select, .creation-brief textarea { width:100%; box-sizing:border-box; padding:12px; border:1px solid #ded7e8; border-radius:10px; font:inherit; font-size:16px; background:#fff; }
.evidence-note { color:#635574; font-size:13px; line-height:1.65; padding-top:12px; border-top:1px solid #e9e5ef; }
.photo-remove { position:absolute; right:4px; top:4px; z-index:2; border:0; border-radius:50%; background:#fff; width:32px; height:32px; }
@media (max-width: 760px) {
  body .stepper { position:sticky; top:var(--mobile-header); }
  body .workspace { padding-top:12px; }
  body .screen-head { padding:16px; margin-bottom:12px; }
  body #screenProfile h1 { font-size:28px; }
  body .screen-head .eyebrow { display:none; }
  body .screen h1 { font-size:27px; line-height:1.3; }
  body .lead { font-size:15px; line-height:1.65; }
  body .drop-zone { min-height:180px; padding:20px 14px; }
  body .sticky-action { position:static; margin:20px 0 12px; }
  body .opportunity-card > p, body .why-copy { font-size:15px; }
}
:root { --canvas: #f7f6fb; --ink: #272333; --muted: #777184; --line: #e9e5ef; --violet: #7551d8; --violet-dark: #5a36b3; --violet-soft: #f1ecfb; --shadow: 0 8px 32px rgba(46, 30, 77, .035); --radius: 22px; }
body { background: var(--canvas); }
button, a, [role="button"] { touch-action: manipulation; }
:focus-visible { outline: 3px solid #9978e5; outline-offset: 4px; }
.identity-option input:focus-visible + span, .outcome-options input:focus-visible + span { outline: 3px solid #9978e5; outline-offset: 3px; }
.brand-mark { background: #7653cf; box-shadow: none; }
.brand strong { font-weight: 800; letter-spacing: -.4px; }
.button-primary { background: #7551d8; box-shadow: 0 6px 14px rgba(117, 81, 216, .14); }
.button-ai { background: #f2edfc; box-shadow: none; }
.button-danger { color: #a62e44; background: #fff1f3; border-color: #f3d5dc; }
.connection-pill { display: inline-flex; align-items: center; gap: 6px; color: #70697a; font-size: 11px; white-space: nowrap; }
.connection-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #a5a0ac; }
.connection-pill[data-state="ready"]::before { background: #359271; }
.connection-pill[data-state="error"] { color: #a35c2a; }
.connection-pill[data-state="error"]::before { background: #cc833c; }
.flow-caption { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 28px; font-size: 11px; color: var(--muted); }
.flow-caption > span:first-child { color: #665978; font-weight: 700; }
.revision-notice { padding: 12px 15px; margin: 0 0 20px; border: 1px solid #efdfb8; border-radius: 13px; color: #886b35; background: #fff9ed; font-size: 12px; line-height: 1.7; }
.mobile-break, .mobile-nav { display: none; }
.heading-dot { color: var(--violet); }
.form-section-heading { display: flex; align-items: flex-start; gap: 8px; margin: 28px 0 16px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-section-heading h2 { font-size: 15px; margin: 0; }
.form-section-heading p { color: var(--muted); font-size: 12px; margin: 5px 0 0; }
.section-number { display: inline-block; color: #9b8bb5; font-size: 11px; font-weight: 700; margin-right: 4px; line-height: 22px; }
.form-grid { margin-top: 0; }
.identity-option input:checked + span { box-shadow: inset 0 0 0 .5px var(--violet); }
.identity-option input:checked + span::after { content: ""; position: absolute; right: 13px; top: 10px; width: 5px; height: 9px; border: solid var(--violet-dark); border-width: 0 1.5px 1.5px 0; transform: rotate(40deg); }
.settings-dialog { width: min(480px, calc(100% - 32px)); max-height: min(90dvh, 900px); padding: 24px; border: 1px solid var(--line); border-radius: 26px; color: var(--ink); background: var(--canvas); box-shadow: 0 30px 100px #26183a33; overscroll-behavior: contain; }
.settings-dialog::backdrop { background: #27213166; backdrop-filter: blur(5px); }
.settings-dialog > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.settings-dialog h2 { font-size: 24px; margin: 6px 0 0; }
.settings-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; margin-top: 12px; }
.settings-card h3 { font-size: 15px; margin: 0 0 12px; }
.settings-card p { font-size: 13px; line-height: 1.75; color: var(--muted); }
.settings-card dl { margin: 0; }
.settings-card dl > div { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid #f2f0f5; font-size: 13px; }
.settings-card dt { flex-shrink: 0; color: var(--muted); }
.settings-card dd { text-align: right; margin: 0; overflow-wrap: anywhere; }
.settings-card .button { width: 100%; margin-top: 8px; min-height: 44px; }
.settings-footer { text-align: center; font-size: 11px; color: var(--muted); margin: 20px 0 0; }
body.settings-open { overflow: hidden; }
.access-dialog { width: min(420px, calc(100% - 32px)); padding: 34px; border: 1px solid var(--line); border-radius: 28px; color: var(--ink); background: var(--canvas); box-shadow: 0 30px 100px #26183a33; text-align: center; }
.access-dialog::backdrop { background: #27213180; backdrop-filter: blur(9px); }
.access-mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 19px; color: #fff; background: linear-gradient(145deg, var(--violet), #49289d); box-shadow: 0 14px 34px #6c49c945; font-size: 27px; font-weight: 900; }
.access-dialog h2 { margin: 8px 0 10px; font-size: 26px; letter-spacing: -.03em; }
.access-dialog > p { margin: 0 auto 24px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.access-dialog form { display: grid; gap: 12px; text-align: left; }
.access-dialog label span { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.access-dialog input { width: 100%; }
.access-dialog .button { width: 100%; min-height: 50px; }
.access-dialog > small { display: block; margin-top: 18px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.access-error { min-height: 20px; margin: 0 !important; color: #b5364b !important; font-size: 12px !important; }
.ai-drawer { grid-template-rows: auto auto auto auto minmax(0, 1fr) auto auto; }
.ai-message p { overflow-wrap: anywhere; }
.ai-messages { min-height: 0; overscroll-behavior: contain; }
.preview-thumb { min-height: 44px; }
.toast { max-width: calc(100vw - 32px); width: max-content; text-align: center; line-height: 1.6; }

@media (max-width: 760px) {
  :root { --mobile-header: calc(68px + env(safe-area-inset-top, 0px)); --mobile-nav: calc(66px + env(safe-area-inset-bottom, 0px)); }
  html { scroll-padding-top: calc(var(--mobile-header) + 76px); }
  body { min-width: 0; }
  .topbar { height: var(--mobile-header); min-height: var(--mobile-header); padding: env(safe-area-inset-top, 0px) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left)); border: 0; background: #f7f6fbf2; }
  .brand { gap: 10px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 12px; font-size: 19px; }
  .brand strong { font-size: 15px; }
  .brand small { display: block; font-size: 10px; line-height: 1.6; color: #918799; }
  .session-strip { gap: 0; }
  .session-strip .ai-open-button, #backStepTop, .header-settings, .condition-badge, .privacy-badge { display: none !important; }
  .connection-pill { font-size: 10px; padding: 7px 9px; background: #efedf4; border-radius: 20px; }
  main { min-height: calc(100dvh - var(--mobile-header)); }
  .stepper { top: var(--mobile-header); padding: 0 16px 10px; border: 0; background: #f7f6fbf2; }
  .stepper ol { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; }
  .stepper li { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; min-height: 56px; border-radius: 12px; }
  .stepper li div { display: block; }
  .stepper li div small { display: none; }
  .stepper li strong { display: block; font-size: 11px; font-weight: 650; }
  .stepper li > span { width: 25px; height: 25px; font-size: 10px; background: #efedf4; border: 0; color: #a29baa; box-shadow: none; }
  .stepper li.active { color: var(--violet-dark); background: #ebe4f8; }
  .stepper li.active > span { background: var(--violet); color: #fff; box-shadow: none; }
  .stepper li.complete > span { background: #e2f0e9; color: #367d60; }
  .stepper li.navigable { color: #6d647a; }
  .workspace { width: min(calc(100% - 40px), 560px); padding: 18px 0 calc(var(--mobile-nav) + 28px); }
  .flow-caption { font-size: 10px; margin: 0 0 23px; }
  .flow-caption > span:last-child { font-size: 10px; color: #9a91a4; }
  .screen-head { gap: 16px; }
  .screen-head .eyebrow { font-size: 10px; letter-spacing: .16em; color: #9c87bd; }
  h1 { font-size: 30px; font-weight: 760; letter-spacing: -.04em; line-height: 1.3; margin-top: 10px; }
  #screenProfile h1 { font-size: 37px; line-height: 1.23; }
  .mobile-break { display: block; }
  .heading-dot { margin-left: 3px; }
  .screen-head-actions { justify-content: flex-start; gap: 8px; }
  .screen-head-actions .button-ai { border-radius: 20px; min-height: 44px; font-size: 12px; padding: 0 15px; }
  .time-pill { display: none; }
  #photoCountPill, #trendFreshness { display: block; font-size: 11px; margin: 0; }
  .lead { font-size: 13px; line-height: 1.85; margin: 16px 0 24px; color: #81768b; }
  .profile-form, .baseline-card, .publish-check { padding: 20px 16px; border-color: #eee9f4; border-radius: 22px; box-shadow: var(--shadow); }
  legend { font-size: 14px; margin-bottom: 14px; }
  .identity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .identity-option span { min-height: 91px; padding: 17px 10px 12px; border-radius: 13px; align-content: center; }
  .identity-option b { font-size: 12px; line-height: 1.5; }
  .identity-option small { font-size: 10px; line-height: 1.65; }
  .form-grid { gap: 18px; }
  label > span, .field-label { font-size: 13px; font-weight: 650; margin-bottom: 9px; }
  input, select, textarea, .ai-model-bar select, .ai-composer textarea { font-size: 16px; }
  input, select { height: 49px; padding: 0 12px; border-color: #e6e0ed; background: #fdfcfe; }
  textarea { padding: 12px; border-color: #e6e0ed; background: #fdfcfe; }
  .examples-field > span { line-height: 1.65; }
  .examples-field textarea { min-height: 150px; font-size: 16px; }
  .consent-row { padding: 12px; gap: 10px; }
  .consent-row input { width: 20px; height: 20px; min-width: 20px; }
  .consent-row span { font-size: 11px; line-height: 1.8; }
  .action-row { gap: 12px; }
  .microcopy { font-size: 11px; line-height: 1.6; }
  .button { min-height: 48px; font-size: 14px; border-radius: 13px; }
  .button-small, .button.button-small { min-height: 44px; font-size: 12px; }
  .button-primary { min-height: 50px; }
  .button:not(:disabled):active { transform: scale(.985); }
  .icon-button { width: 44px; min-width: 44px; height: 44px; border-radius: 13px; }
  .drop-zone { padding: 26px 16px; border-color: #cfc0e7; background: #ffffff; min-height: 280px; }
  .drop-zone h3 { font-size: 17px; }
  .drop-zone p { font-size: 11px; line-height: 1.8; max-width: 245px; }
  .drop-zone .drop-actions { width: 100%; gap: 8px; }
  .photo-grid { gap: 8px; margin-bottom: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .photo-tile { border-radius: 12px; }
  .photo-tile .photo-score { font-size: 10px; }
  .photo-analysis-state { font-size: 9px; }
  .photo-debug-dialog { width: 100%; max-height: calc(100dvh - env(safe-area-inset-top) - 14px); margin: auto auto 0; padding: 20px 16px calc(22px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; }
  .photo-debug-dialog h2 { font-size: 21px; }
  .photo-debug-dialog dl { grid-template-columns: 1fr; }
  .photo-debug-dialog dl > div { font-size: 12px; }
  .sticky-action { bottom: calc(var(--mobile-nav) + 10px); padding: 14px; gap: 10px; margin-top: 24px; border-radius: 18px; box-shadow: 0 8px 28px #40315914; }
  .sticky-action strong { font-size: 12px; line-height: 1.6; }
  .sticky-action small { display: none; }
  .trend-entry-action { position: static; }
  .opportunity-card { padding: 20px; border-radius: 20px; }
  .opportunity-card > p, .why-copy { font-size: 13px; min-height: 0; }
  .reason > div { font-size: 12px; }
  .baseline-photo-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .selection-editor { grid-template-columns: 1fr auto; padding: 17px 14px; border-radius: 18px; }
  .selection-editor p { font-size: 12px; line-height: 1.65; }
  .baseline-card p { font-size: 13px; line-height: 1.75; }
  .draft-layout { gap: 18px; margin-top: 24px; }
  .draft-editor { padding: 18px 14px; border-radius: 20px; }
  #draftBody { min-height: 380px; font-size: 16px; line-height: 1.9; }
  .editor-stats { font-size: 11px; flex-wrap: wrap; gap: 8px; }
  .image-plan p, .disclosure, .risk-section li { font-size: 12px; line-height: 1.75; }
  .export-grid { gap: 10px; margin-top: 22px; }
  .export-card { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; padding: 16px; gap: 10px; }
  .export-card > div { margin: 0; }
  .export-card h3 { font-size: 15px; margin: 0 0 5px; }
  .export-card p { font-size: 12px; margin: 0; line-height: 1.6; }
  .export-icon { width: 36px; height: 36px; font-size: 15px; }
  .export-card .button { grid-column: 1 / -1; margin-top: 2px; }
  .platform-preview-section { padding: 20px 12px; border-radius: 22px; }
  .platform-preview-head h2 { font-size: 21px; line-height: 1.5; }
  .platform-preview-head p { font-size: 12px; line-height: 1.75; }
  .platform-tabs { gap: 4px; padding: 4px; border-radius: 13px; }
  .platform-tabs button { min-height: 44px; padding: 8px 6px; font-size: 12px; border-radius: 10px; }
  .preview-phone { width: 100%; max-width: 350px; height: 690px; margin: 18px auto 0; border: 3px solid #25212d; padding: 4px; border-radius: 29px; box-shadow: 0 12px 30px #3528461a; }
  .preview-arrow { width: 44px; height: 44px; }
  .preview-guide { padding: 18px; }
  .preview-guide > p { font-size: 13px; }
  .preview-disclaimer b, .preview-disclaimer span { font-size: 11px; line-height: 1.6; }
  .publish-check { gap: 22px; }
  .publish-check p { font-size: 13px; }
  .outcome-options span { padding: 14px; }
  .outcome-options small { font-size: 12px; }
  .score-row { grid-template-columns: 1fr auto; }
  .score-row > span { grid-column: 1 / -1; }
  .score-row input { min-height: 44px; }
  .trend-source-note { padding: 15px; }
  .trend-source-note p, .trend-status, .trend-platform-group header p { font-size: 12px; line-height: 1.75; }
  .trend-toolbar .platform-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .trend-card { min-height: 190px; padding: 16px; border-radius: 16px; }
  .trend-card h3 { font-size: 17px; }
  .trend-card p { font-size: 13px; }
  .trend-card > div:first-child span, .trend-card > div:first-child small { font-size: 11px; }
  .trend-card > div:last-child a { font-size: 12px; min-height: 44px; display: flex; align-items: center; }
  .trend-mode { font-size: 10px; }
  .trend-connectors { padding: 18px; gap: 18px; }
  .trend-connectors p, .connector-list span { font-size: 12px; line-height: 1.7; }
  .connector-list b { font-size: 13px; }
  .mobile-nav { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); height: var(--mobile-nav); padding: 6px max(20px, env(safe-area-inset-right)) env(safe-area-inset-bottom, 0px) max(20px, env(safe-area-inset-left)); border-top: 1px solid #ede8f4; background: #fffffff2; backdrop-filter: blur(20px); }
  .mobile-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 0; color: #968da2; background: transparent; border-radius: 14px; min-height: 52px; font-size: 11px; }
  .mobile-nav button.active { color: var(--violet-dark); }
  .mobile-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .mobile-nav circle { fill: #fff; }
  #mobileAi { color: #7250bc; }
  #mobileAi svg { fill: #efe8fc; }
  .settings-dialog { width: 100%; max-width: 560px; max-height: calc(100dvh - env(safe-area-inset-top) - 20px); margin: auto auto 0; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); border-radius: 28px 28px 0 0; }
  .access-dialog { width: calc(100% - 32px); padding: 30px 22px calc(26px + env(safe-area-inset-bottom)); border-radius: 26px; }
  .access-dialog input { height: 52px; font-size: 17px; }
  .ai-drawer { width: 100%; top: var(--keyboard-top, 0px); height: var(--keyboard-height, 100dvh); border: 0; transform: translateY(105%); background: var(--canvas); }
  .ai-drawer.open { transform: translateY(0); }
  .ai-drawer-head { padding: calc(16px + env(safe-area-inset-top)) 20px 14px; align-items: center; }
  .ai-drawer-head .eyebrow { font-size: 9px; }
  .ai-drawer-head h2 { font-size: 21px; }
  .ai-model-bar { padding: 12px 20px; }
  .ai-model-bar > label { font-size: 12px; }
  .ai-model-bar select { height: 46px; }
  .ai-model-meta small { font-size: 10px; }
  .ai-mode-badge { font-size: 11px; }
  .ai-context-bar { padding: 10px 20px; }
  .ai-context-bar > span, .share-photos span { font-size: 12px; }
  .share-photos input { width: 20px; min-width: 20px; height: 20px; }
  .ai-quick-actions { padding: 8px 20px; }
  .ai-quick-actions button { min-height: 44px; font-size: 12px; padding: 8px 13px; }
  .ai-messages { padding: 20px 16px; gap: 18px; }
  .ai-message p { font-size: 14px; line-height: 1.85; }
  .ai-message small, .ai-patch-list span { font-size: 11px; }
  .ai-message > div { border-radius: 4px 17px 17px 17px; padding: 13px; box-shadow: none; }
  .ai-message.user > div { border-radius: 17px 4px 17px 17px; background: #7551d8; }
  .ai-composer { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
  .ai-composer textarea { min-height: 78px; max-height: 120px; border-radius: 15px; }
  .ai-composer > div { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; }
  .ai-composer small { font-size: 10px; line-height: 1.5; }
  .voice-notice { font-size: 11px; padding: 10px; }
  .toast { bottom: calc(var(--mobile-nav) + 16px); font-size: 13px; border-radius: 14px; }
  body.ai-open .toast { bottom: 26px; }
  body.keyboard-open .mobile-nav { display: none; }
  body.keyboard-open .ai-drawer-head { padding-top: 10px; }
  body.keyboard-open .ai-model-bar, body.keyboard-open .ai-quick-actions { display: none; }
  body.keyboard-open .ai-drawer { grid-template-rows: auto auto minmax(0, 1fr) auto auto; }
  body.keyboard-open .ai-composer { padding-bottom: 10px; }
}
@media (max-width: 360px) {
  .workspace { width: calc(100% - 28px); }
  .topbar { padding-left: 14px; padding-right: 14px; }
  .brand strong { font-size: 14px; }
  .profile-form { padding: 18px 12px; }
  #screenProfile h1 { font-size: 34px; }
  .flow-caption { flex-wrap: wrap; gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  html, .ai-messages { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 0.2 visual system — premium, editorial and AI-native. */
:root {
  --canvas: #f8f7fc;
  --ink: #1d1930;
  --muted: #746f82;
  --line: rgba(79, 65, 112, .12);
  --panel: rgba(255, 255, 255, .88);
  --violet: #6847f2;
  --violet-dark: #4f2fc9;
  --violet-soft: #f0ecff;
  --accent: #ff7b5d;
  --cyan: #4fc6ff;
  --green: #169a70;
  --shadow: 0 22px 60px rgba(37, 27, 72, .09), 0 2px 8px rgba(37, 27, 72, .035);
  --shadow-soft: 0 12px 34px rgba(37, 27, 72, .065);
  --radius: 24px;
}

html { background: var(--canvas); }
body {
  position: relative;
  color: var(--ink);
  background:
    radial-gradient(circle at 84% -5%, rgba(117, 77, 246, .17), transparent 31rem),
    radial-gradient(circle at 7% 43%, rgba(79, 198, 255, .08), transparent 27rem),
    linear-gradient(180deg, #fbfaff 0%, #f7f6fb 56%, #faf9fc 100%);
}
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}
body::before { top: 19%; right: -190px; border: 1px solid rgba(104, 71, 242, .12); box-shadow: 0 0 0 42px rgba(104, 71, 242, .025), 0 0 0 86px rgba(104, 71, 242, .018); }
body::after { bottom: 8%; left: -220px; border: 1px solid rgba(79, 198, 255, .12); box-shadow: 0 0 0 52px rgba(79, 198, 255, .02); }
.app-shell { isolation: isolate; }

.topbar {
  border-bottom-color: rgba(87, 73, 119, .1);
  background: rgba(250, 249, 253, .76);
  box-shadow: 0 8px 30px rgba(36, 27, 67, .035);
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
}
.brand { gap: 13px; }
.brand-mark {
  position: relative;
  overflow: hidden;
  color: #fff;
  border: 1px solid rgba(255,255,255,.68);
  background: linear-gradient(145deg, #8f70ff 0%, #6041e7 48%, #4124a9 100%);
  box-shadow: 0 10px 25px rgba(91, 59, 212, .27), inset 0 1px 0 rgba(255,255,255,.35);
}
.brand-mark::before { content: ""; position: absolute; width: 28px; height: 28px; top: -17px; right: -10px; border: 7px solid rgba(255,255,255,.33); border-radius: 50%; }
.brand-mark::after { content: ""; position: absolute; inset: auto 6px 5px auto; width: 4px; height: 4px; border-radius: 50%; background: #9cecff; box-shadow: 0 0 12px #9cecff; }
.brand strong { color: #211b34; font-weight: 850; letter-spacing: -.025em; }
.brand small { color: #827a8f; }
.condition-badge { color: #5a3bd2; border-color: rgba(104,71,242,.15); background: rgba(240,236,255,.72); }
.privacy-badge { border-color: rgba(22,154,112,.14); background: rgba(238,251,246,.78); }
.connection-pill { padding: 7px 10px; border: 1px solid rgba(64, 151, 116, .11); border-radius: 999px; background: rgba(245, 252, 249, .72); }
.header-settings { border-color: transparent; background: rgba(239,236,247,.72); }

main { grid-template-columns: 294px minmax(0, 1fr); }
.stepper {
  position: relative;
  overflow: hidden;
  border-right-color: rgba(79,65,112,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.63), rgba(249,247,253,.78));
}
.stepper::after { content: ""; position: absolute; top: -110px; left: -90px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(104,71,242,.09), transparent 70%); pointer-events: none; }
.stepper-intro, .stepper ol, .experiment-note { position: relative; z-index: 1; }
.stepper-intro h2 { font-size: 23px; font-weight: 820; color: #211a37; }
.eyebrow, .mini-label { color: #6b48e9; letter-spacing: .14em; }
.stepper ol::before { width: 2px; border-radius: 9px; background: linear-gradient(180deg, rgba(104,71,242,.28), rgba(104,71,242,.06)); }
.stepper li { padding: 12px 0; transition: color .2s ease, transform .2s ease; }
.stepper li.navigable:hover { transform: translateX(2px); }
.stepper li > span { border-color: rgba(79,65,112,.13); background: rgba(255,255,255,.9); box-shadow: 0 5px 15px rgba(39,27,73,.05); }
.stepper li.active > span { border-color: transparent; background: linear-gradient(145deg, #8768fb, #5936d8); box-shadow: 0 9px 22px rgba(94,60,218,.3); }
.stepper li.complete > span { border-color: rgba(22,154,112,.13); background: #e7f8f1; }
.experiment-note { border-color: rgba(104,71,242,.14); background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(241,236,255,.78)); box-shadow: var(--shadow-soft); }

.workspace { width: min(1140px, calc(100% - 72px)); }
.flow-caption { padding-bottom: 12px; border-bottom: 1px solid rgba(79,65,112,.08); }
.screen-head { position: relative; }
.screen-head h1 { max-width: 780px; color: #1a152b; font-weight: 820; text-wrap: balance; }
.heading-dot { color: transparent; background: linear-gradient(145deg, #7d5df8, #ff8064); background-clip: text; -webkit-background-clip: text; }
.lead { color: #777083; }
.time-pill { border-color: rgba(79,65,112,.12); background: rgba(255,255,255,.68); box-shadow: 0 6px 18px rgba(37,27,72,.035); backdrop-filter: blur(16px); }

.profile-form, .baseline-card, .publish-check, .draft-editor, .draft-aside, .platform-preview-section {
  border-color: rgba(79,65,112,.11);
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(253,252,255,.86));
  box-shadow: var(--shadow);
}
.profile-form { position: relative; overflow: hidden; }
.profile-form::before { content: ""; position: absolute; top: 0; left: 28px; right: 28px; height: 2px; border-radius: 0 0 9px 9px; background: linear-gradient(90deg, transparent, #8d71ff 22%, #55c6ff 66%, transparent); opacity: .8; }
.identity-option span { position: relative; min-height: 112px; align-content: end; border-color: rgba(79,65,112,.11); background: linear-gradient(150deg, #fff, #faf9fd); box-shadow: 0 8px 24px rgba(37,27,72,.045); }
.identity-option span:hover { transform: translateY(-2px); border-color: rgba(104,71,242,.25); box-shadow: 0 14px 32px rgba(37,27,72,.08); }
.identity-option input:checked + span { color: #4f2fc9; border-color: rgba(104,71,242,.45); background: linear-gradient(145deg, #f7f4ff, #eeebff); box-shadow: inset 0 0 0 1px rgba(104,71,242,.28), 0 14px 32px rgba(82,52,192,.1); }
.identity-icon { width: 31px; height: 31px; display: grid; place-items: center; margin-bottom: 7px; border: 1px solid rgba(104,71,242,.12); border-radius: 10px; color: #6948e8; background: #f2efff; font-size: 12px; font-style: normal; font-weight: 850; }
.identity-option input:checked + span .identity-icon { color: #fff; border-color: transparent; background: linear-gradient(145deg,#8566f9,#5b38db); box-shadow: 0 7px 16px rgba(91,56,219,.22); }
.form-section-heading { border-top-color: rgba(79,65,112,.09); }
input, select, textarea { border-color: rgba(79,65,112,.16); background: rgba(253,252,255,.92); box-shadow: inset 0 1px 2px rgba(38,26,71,.025); }
input:hover, select:hover, textarea:hover { border-color: rgba(104,71,242,.28); }
input:focus, select:focus, textarea:focus { border-color: #7656ef; box-shadow: 0 0 0 4px rgba(104,71,242,.11), 0 9px 24px rgba(54,35,109,.055); background: #fff; }
.consent-row { border-color: rgba(22,154,112,.13); background: linear-gradient(145deg, #f8fcfa, #f1faf6); }

.button { position: relative; overflow: hidden; border-radius: 13px; letter-spacing: -.01em; }
.button-primary { border-color: rgba(73,42,189,.08); background: linear-gradient(135deg, #8060f8 0%, #6240e5 55%, #4c2abf 100%); box-shadow: 0 11px 26px rgba(91,57,215,.24), inset 0 1px 0 rgba(255,255,255,.28); }
.button-primary::before { content: ""; position: absolute; top: -80%; bottom: -80%; left: -55%; width: 30%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent); transform: rotate(18deg); transition: left .45s ease; }
.button-primary:not(:disabled):hover::before { left: 125%; }
.button-primary:not(:disabled):hover { box-shadow: 0 15px 34px rgba(91,57,215,.31); }
.button-secondary { border-color: rgba(104,71,242,.17); background: linear-gradient(145deg,#f6f3ff,#eee9ff); }
.button-ghost { border-color: rgba(79,65,112,.12); background: rgba(255,255,255,.46); }
.button-ai { color: #5230ca; border-color: rgba(104,71,242,.18); background: linear-gradient(135deg, rgba(248,246,255,.98), rgba(235,228,255,.92)); box-shadow: 0 8px 20px rgba(89,55,202,.08), inset 0 1px 0 #fff; }
.button-ai span { color: #7652f0; text-shadow: 0 0 12px rgba(118,82,240,.35); }

.drop-zone { overflow: hidden; border-color: rgba(104,71,242,.34); background: linear-gradient(145deg, rgba(255,255,255,.9), rgba(245,242,255,.74)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), var(--shadow-soft); }
.drop-zone::before { content: ""; position: absolute; inset: -80px auto auto -80px; width: 190px; height: 190px; border-radius: 50%; background: radial-gradient(circle, rgba(79,198,255,.12), transparent 70%); }
.drop-icon { color: #fff; background: linear-gradient(145deg,#8b6bfa,#5b38d8); box-shadow: 0 11px 24px rgba(91,56,216,.22); }
.analysis-status { border-color: rgba(104,71,242,.12); background: linear-gradient(145deg,#fff,#f7f4ff); box-shadow: var(--shadow-soft); }
.progress-track span { background: linear-gradient(90deg,#6542e5,#966eff 58%,#55c7ff); }
.ai-applied-note { border-color: rgba(104,71,242,.17); background: linear-gradient(135deg, #fbfaff, #eeebff 60%, #eef9ff); box-shadow: 0 12px 30px rgba(62,42,126,.06); }
.photo-tile { border: 2px solid rgba(255,255,255,.9); box-shadow: 0 8px 20px rgba(28,21,53,.11); transition: transform .2s ease, box-shadow .2s ease; }
.photo-tile:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 14px 28px rgba(28,21,53,.16); }
.photo-subject { background: linear-gradient(90deg, rgba(51,31,100,.86), rgba(89,54,184,.78)); }
.sticky-action { border-color: rgba(79,65,112,.12); background: rgba(255,255,255,.8); box-shadow: 0 20px 48px rgba(34,23,66,.15); backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%); }

.opportunity-card { border-color: rgba(79,65,112,.11); background: linear-gradient(155deg,#fff 0%,#fdfcff 72%,#f8f6ff 100%); box-shadow: var(--shadow-soft); }
.opportunity-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #7b59f4, #51c7ff); opacity: 0; transition: opacity .2s ease; }
.opportunity-card:hover::before, .opportunity-card.selected::before { opacity: 1; }
.opportunity-card.selected { border-color: rgba(104,71,242,.5); box-shadow: inset 0 0 0 1px rgba(104,71,242,.22), 0 22px 48px rgba(69,43,158,.13); }
.score-ring { background: conic-gradient(#6d49ed calc(var(--score) * 1%), #eeeaf7 0); box-shadow: 0 8px 22px rgba(52,33,108,.1); }
.reason-track span { background: linear-gradient(90deg,#6e49eb,#9e7aff); }
.thumb-strip img { box-shadow: 0 7px 16px rgba(20,16,41,.16); }
.draft-editor textarea { background: linear-gradient(180deg,#fff,#fcfbff); }
.editor-stats span { border: 1px solid rgba(79,65,112,.08); background: #f6f4fa; }
.risk-section { background: linear-gradient(145deg,#fffaf8,#fff6f3); }

.platform-preview-section { background: radial-gradient(circle at 85% 12%, rgba(104,71,242,.1), transparent 21rem), linear-gradient(145deg, rgba(255,255,255,.98), rgba(248,246,255,.9)); }
.platform-tabs { border-color: rgba(79,65,112,.12); background: rgba(235,233,241,.72); box-shadow: inset 0 1px 2px rgba(34,25,61,.04); }
.platform-tabs button.active { background: linear-gradient(145deg,#29243c,#171322); box-shadow: 0 8px 20px rgba(24,19,38,.22); }
.preview-phone { border: 1px solid rgba(255,255,255,.17); background: linear-gradient(145deg,#262232,#0f0d16); box-shadow: 0 34px 80px rgba(19,15,38,.3), 0 0 0 7px rgba(26,22,37,.05), inset 0 1px 0 rgba(255,255,255,.14); }
.preview-guide { border-color: rgba(104,71,242,.12); background: rgba(255,255,255,.77); box-shadow: var(--shadow-soft); }
.export-card { border-color: rgba(79,65,112,.11); background: linear-gradient(145deg,#fff,#fbfaff); box-shadow: 0 9px 26px rgba(37,27,72,.05); transition: transform .2s ease, box-shadow .2s ease; }
.export-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.export-icon { background: linear-gradient(145deg,#f0ecff,#e8f7ff); }

.trend-source-note, .trend-platform-group, .trend-connectors { border-color: rgba(79,65,112,.11); box-shadow: var(--shadow-soft); }
.trend-card { border-color: rgba(79,65,112,.1); box-shadow: 0 8px 22px rgba(37,27,72,.045); transition: transform .2s ease, box-shadow .2s ease; }
.trend-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }

.settings-dialog, .access-dialog { border-color: rgba(255,255,255,.7); background: radial-gradient(circle at 90% 0%, rgba(104,71,242,.12), transparent 19rem), #f9f8fc; box-shadow: 0 40px 110px rgba(25,18,47,.3); }
.access-mark { border: 1px solid rgba(255,255,255,.75); background: linear-gradient(145deg,#906fff,#6040e3 56%,#4123a6); box-shadow: 0 17px 42px rgba(82,49,199,.3); }
.settings-card { border-color: rgba(79,65,112,.1); box-shadow: 0 10px 28px rgba(37,27,72,.045); }
.ai-drawer { border-left-color: rgba(79,65,112,.13); background: #f8f7fc; box-shadow: -34px 0 90px rgba(26,19,51,.24); }
.ai-drawer-head { position: relative; overflow: hidden; color: #fff; border: 0; background: radial-gradient(circle at 84% -30%, rgba(126,218,255,.34), transparent 12rem), linear-gradient(135deg,#2b2148,#5132b9 72%,#6849e8); }
.ai-drawer-head .eyebrow { color: #cfc1ff; }
.ai-drawer-head h2 { color: #fff; }
.ai-drawer-head .icon-button { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.1); }
.ai-avatar { background: linear-gradient(145deg,#8b69fa,#5130c6); box-shadow: 0 7px 16px rgba(72,43,177,.22); }
.ai-message > div { border-color: rgba(79,65,112,.1); box-shadow: 0 9px 24px rgba(37,27,72,.055); }
.ai-message.user > div { background: linear-gradient(145deg,#7855ef,#5533ca); border-color: transparent; }
.ai-composer { border-top-color: rgba(79,65,112,.1); background: rgba(255,255,255,.92); backdrop-filter: blur(20px); }
.toast { background: rgba(27,22,43,.92); box-shadow: 0 18px 42px rgba(20,15,35,.24); backdrop-filter: blur(16px); }

@media (max-width: 760px) {
  :root { --mobile-header: calc(72px + env(safe-area-inset-top, 0px)); --mobile-nav: calc(76px + env(safe-area-inset-bottom, 0px)); }
  body { background: radial-gradient(circle at 88% 0%, rgba(120,81,245,.15), transparent 19rem), linear-gradient(180deg,#fbfaff,#f7f6fb 52%,#fbfafc); }
  .topbar { padding-left: max(17px, env(safe-area-inset-left)); padding-right: max(17px, env(safe-area-inset-right)); background: rgba(250,249,253,.82); }
  .brand-mark { width: 38px; height: 38px; border-radius: 13px; }
  .brand strong { font-size: 16px; }
  .brand small { color: #8b8298; font-size: 9px; letter-spacing: .02em; }
  .connection-pill { color: #5f586b; border-color: rgba(79,65,112,.08); background: rgba(255,255,255,.64); }
  .stepper { top: var(--mobile-header); padding: 3px 12px 9px; background: rgba(249,248,252,.86); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%); }
  .stepper::after { display: none; }
  .stepper ol { gap: 4px; padding: 4px; border: 1px solid rgba(79,65,112,.08); border-radius: 17px; background: rgba(255,255,255,.62); box-shadow: 0 8px 24px rgba(40,29,73,.045); }
  .stepper li { min-height: 53px; padding: 5px 0; border-radius: 13px; }
  .stepper li > span { width: 23px; height: 23px; background: transparent; box-shadow: none; }
  .stepper li strong { font-size: 10px; }
  .stepper li.active { color: #4f2fc9; background: linear-gradient(145deg,#f0ebff,#e9e4ff); box-shadow: inset 0 0 0 1px rgba(104,71,242,.07); }
  .stepper li.active > span { background: linear-gradient(145deg,#8262f8,#5a37d8); box-shadow: 0 5px 12px rgba(91,56,216,.22); }
  .workspace { width: min(calc(100% - 32px), 580px); padding-top: 16px; }
  .flow-caption { margin-bottom: 20px; padding: 0 2px 11px; }
  .screen-head { display: grid; overflow: hidden; padding: 21px 18px 18px; border: 1px solid rgba(104,71,242,.1); border-radius: 25px; background: radial-gradient(circle at 94% -15%, rgba(80,199,255,.18), transparent 11rem), linear-gradient(145deg, rgba(255,255,255,.94), rgba(243,239,255,.78)); box-shadow: var(--shadow-soft); }
  .screen-head::after { content: ""; position: absolute; right: -28px; bottom: -58px; width: 118px; height: 118px; border: 1px solid rgba(104,71,242,.1); border-radius: 50%; box-shadow: 0 0 0 22px rgba(104,71,242,.025); }
  .screen-head > * { position: relative; z-index: 1; }
  .screen-head .eyebrow { color: #7155ce; }
  h1, #screenProfile h1 { font-size: clamp(28px, 9vw, 36px); line-height: 1.24; }
  .screen-head-actions .button-ai { color: #5130c7; border-color: rgba(104,71,242,.14); background: rgba(255,255,255,.82); box-shadow: 0 8px 18px rgba(50,35,101,.06); }
  .lead { padding: 0 3px; }
  .profile-form, .baseline-card, .publish-check { padding: 19px 15px; border-radius: 24px; }
  .profile-form::before { left: 20px; right: 20px; }
  .identity-option span { min-height: 119px; padding: 14px 12px 13px; align-content: end; }
  .identity-icon { width: 29px; height: 29px; margin-bottom: 7px; }
  .identity-option b { font-size: 13px; }
  input, select, textarea { border-radius: 13px; background: rgba(255,255,255,.9); }
  .button { border-radius: 14px; }
  .button-primary { box-shadow: 0 11px 24px rgba(91,57,215,.22); }
  .drop-zone { border-radius: 24px; background: linear-gradient(145deg,rgba(255,255,255,.94),rgba(243,239,255,.82)); }
  .drop-icon { width: 54px; height: 54px; border-radius: 17px; }
  .photo-tile { border-radius: 14px; }
  .sticky-action { bottom: calc(var(--mobile-nav) + 9px); border-radius: 20px; background: rgba(255,255,255,.82); }
  .opportunity-card { border-radius: 24px; }
  .platform-preview-section { border-radius: 25px; }
  .preview-phone { border-color: rgba(255,255,255,.18); background: linear-gradient(145deg,#292436,#111019); box-shadow: 0 24px 52px rgba(25,18,44,.23), 0 0 0 6px rgba(30,23,50,.035); }
  .export-card { border-radius: 18px; }
  .mobile-nav { left: 12px; right: 12px; bottom: 9px; height: var(--mobile-nav); padding: 7px max(12px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom,0px)) max(12px,env(safe-area-inset-left)); border: 1px solid rgba(79,65,112,.12); border-radius: 24px; background: rgba(255,255,255,.84); box-shadow: 0 18px 44px rgba(31,23,55,.16); backdrop-filter: blur(25px) saturate(160%); -webkit-backdrop-filter: blur(25px) saturate(160%); }
  .mobile-nav button { border-radius: 16px; }
  .mobile-nav button.active { color: #5331c9; background: linear-gradient(145deg,rgba(241,237,255,.9),rgba(235,247,255,.68)); }
  #mobileAi { color: #6745df; }
  .settings-dialog, .access-dialog { background: radial-gradient(circle at 88% 0%,rgba(104,71,242,.13),transparent 18rem),#faf9fd; }
  .ai-drawer-head { padding-left: 20px; padding-right: 20px; }
}
