:root {
  --color-primary: #e11d48;
  --color-primary-dark: #be123c;
  --color-primary-soft: #fff1f2;
  --color-accent: #1d4ed8;
  --color-background: #fff8f8;
  --color-surface: #ffffff;
  --color-surface-muted: #f8f5f5;
  --color-ink: #29191d;
  --color-muted: #746269;
  --color-border: #eadfe2;
  --color-danger: #b91c1c;
  --color-success: #08704f;
  --color-dark: #25181c;
  --shadow-sm: 0 1px 2px rgba(64, 30, 40, .05);
  --shadow-md: 0 14px 34px rgba(74, 30, 44, .08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --sidebar-width: 248px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--color-ink);
  background: var(--color-background);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--color-background); }
body { margin: 0; min-height: 100vh; font-size: 16px; line-height: 1.6; background: var(--color-background); }
body.modal-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .48; }
button, input, select, textarea { touch-action: manipulation; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid rgba(225, 29, 72, .28); outline-offset: 2px; }
.skip-link { position: fixed; z-index: 2000; top: 10px; left: 10px; transform: translateY(-150%); padding: 10px 16px; color: white; background: var(--color-dark); border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(1.75rem, 2.2vw, 2.5rem); line-height: 1.2; letter-spacing: -.04em; }
h2 { margin-bottom: 5px; font-size: 1.15rem; line-height: 1.35; }
h3 { margin-bottom: 6px; font-size: 1rem; }
p { color: var(--color-muted); }
code { padding: 2px 6px; font-family: Consolas, monospace; font-size: .85em; color: #8f1236; background: #fff0f3; border-radius: 5px; overflow-wrap: anywhere; }

.eyebrow { margin-bottom: 7px; color: var(--color-primary-dark); font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.field-hint, .fine-print { margin: 6px 0 0; color: var(--color-muted); font-size: .78rem; line-height: 1.5; }
.remember-login { display: flex; min-height: 48px; align-items: center; gap: 10px; margin: 10px 0 4px; color: var(--color-muted); font-size: .82rem; font-weight: 600; }
.remember-login svg { width: 24px; height: 24px; flex: 0 0 auto; color: var(--color-success); }
.remember-login span, .remember-login strong, .remember-login small { display: block; }
.remember-login strong { color: var(--color-ink); font-size: .84rem; }
.remember-login small { margin-top: 1px; color: var(--color-muted); font-size: .7rem; font-weight: 500; line-height: 1.45; }
.field-error { min-height: 1.5em; margin: 5px 0; color: var(--color-danger); font-size: .82rem; font-weight: 600; }
label, legend { color: #4b3940; font-size: .78rem; font-weight: 700; }

input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--color-ink);
  background: var(--color-surface);
  border: 1px solid #d8cbd0;
  border-radius: var(--radius-sm);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
input:hover, select:hover, textarea:hover { border-color: #bba9af; }
input:focus, select:focus, textarea:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(225, 29, 72, .1); outline: none; }
textarea { resize: vertical; line-height: 1.65; }

.button, .icon-button, .text-button, .nav-item {
  border: 0;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 10px 17px; font-weight: 750; border-radius: var(--radius-sm); }
.button.primary { color: white; background: var(--color-primary); box-shadow: 0 8px 20px rgba(225, 29, 72, .18); }
.button.primary:hover { background: var(--color-primary-dark); }
.button.secondary { color: #4b3039; background: white; border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.button.secondary:hover { color: var(--color-primary-dark); border-color: #e8b4c0; background: #fffafa; }
.button.dark { color: white; background: var(--color-dark); }
.button.dark:hover { background: #100a0c; }
.button.compact { min-height: 44px; padding: 8px 13px; font-size: .86rem; }
.button.full { width: 100%; }
.icon-button { display: inline-grid; width: 44px; height: 44px; place-items: center; color: var(--color-muted); background: transparent; border-radius: 10px; }
.icon-button:hover { color: var(--color-primary-dark); background: var(--color-primary-soft); }
.text-button { min-height: 44px; padding: 6px 2px; color: var(--color-muted); background: transparent; font-size: .84rem; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; }
.text-button:hover { color: var(--color-primary-dark); }
.text-button.centered { display: block; margin: 6px auto 0; }

.auth-screen { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 24px; background: #fff7f8; overflow-y: auto; }
.auth-screen::before, .auth-screen::after { content: ""; position: fixed; width: 300px; height: 300px; border: 1px solid #f3c6d1; border-radius: 50%; pointer-events: none; }
.auth-screen::before { top: -130px; right: -70px; }
.auth-screen::after { bottom: -160px; left: -90px; }
.auth-card { position: relative; width: min(100%, 470px); padding: clamp(28px, 5vw, 48px); background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.auth-card h1 { max-width: 11em; font-size: clamp(1.8rem, 6vw, 2.6rem); }
.auth-description { margin-bottom: 26px; }
.brand-mark { display: grid; width: 52px; height: 52px; margin-bottom: 22px; place-items: center; color: white; background: var(--color-primary); border-radius: 15px 15px 15px 4px; font-weight: 900; box-shadow: 0 9px 20px rgba(225, 29, 72, .22); }
.brand-mark.small { width: 38px; height: 38px; margin: 0; border-radius: 11px 11px 11px 3px; }
.password-field { position: relative; }
.password-field input { padding-right: 52px; }
.password-field .icon-button { position: absolute; top: 1px; right: 1px; }
.local-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 24px; padding-top: 18px; color: var(--color-muted); border-top: 1px solid var(--color-border); font-size: .78rem; }
.local-note svg { flex: 0 0 auto; color: var(--color-success); }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 100; inset: 0 auto 0 0; display: flex; width: var(--sidebar-width); flex-direction: column; padding: 24px 16px; color: #f9f2f4; background: #211417; }
.sidebar-brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 27px; }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { font-size: 1rem; }
.sidebar-brand span { color: #bdaeb2; font-size: .7rem; }
.nav-list { display: grid; gap: 7px; }
.nav-item { display: flex; min-height: 48px; align-items: center; gap: 12px; padding: 10px 13px; color: #bfaeb3; background: transparent; border-radius: 11px; text-align: left; }
.nav-item:hover { color: white; background: rgba(255,255,255,.06); }
.nav-item.active { color: white; background: var(--color-primary); box-shadow: 0 8px 22px rgba(225,29,72,.2); }
.nav-item svg { width: 20px; height: 20px; }
.sidebar-footer { margin-top: auto; padding: 18px 9px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer .text-button { color: #a9999e; }
.status-row { display: flex; gap: 8px; align-items: center; color: #ccbfc3; font-size: .75rem; }
.status-dot { width: 8px; height: 8px; background: #34d399; border-radius: 50%; box-shadow: 0 0 0 4px rgba(52,211,153,.1); }

.workspace { min-width: 0; grid-column: 2; }
.topbar { position: sticky; z-index: 60; top: 0; display: flex; min-height: 76px; align-items: flex-end; gap: 14px; padding: 12px clamp(20px, 4vw, 52px); background: rgba(255, 248, 248, .96); border-bottom: 1px solid var(--color-border); backdrop-filter: blur(10px); }
.source-picker { width: 210px; }
.source-picker.grow { width: min(430px, 36vw); }
.source-picker label { display: block; margin-bottom: 2px; color: var(--color-muted); font-size: .68rem; }
.source-picker select { min-height: 40px; padding: 7px 33px 7px 10px; background-color: transparent; border: 0; font-weight: 750; }
.source-picker select:focus { box-shadow: 0 0 0 2px rgba(225,29,72,.16); }
.mobile-only { display: none; }

main { min-height: calc(100vh - 76px); padding: clamp(28px, 4vw, 52px); }
.view { display: none; max-width: 1440px; margin: 0 auto; }
.view.active { display: block; animation: view-in 180ms ease-out; }
@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.page-heading p:last-child { margin: 0; }
.date-control { width: 170px; padding: 10px 13px; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.date-control label { display: block; margin-bottom: -1px; }
.date-control input { min-height: 30px; padding: 0; border: 0; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card { position: relative; min-height: 118px; padding: 17px 19px; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); overflow: hidden; }
.metric-card::after { content: ""; position: absolute; top: 0; right: 0; width: 5px; height: 100%; background: #f8ced7; }
.metric-card span, .metric-card small { display: block; color: var(--color-muted); }
.metric-card span { font-size: .76rem; font-weight: 700; }
.metric-card strong { display: block; margin: 2px 0 -1px; font-family: ui-monospace, Consolas, monospace; font-size: 2rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.metric-card small { font-size: .7rem; }

.today-layout { display: grid; grid-template-columns: minmax(0, 1fr) 318px; gap: 22px; align-items: start; }
.candidate-section, .action-panel, .settings-card, .notice-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.candidate-section { min-height: 560px; padding: clamp(19px, 2.4vw, 30px); }
.section-heading, .section-heading > div, .card-heading, .card-heading > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading { margin-bottom: 20px; }
.section-heading h2, .section-heading p { margin: 0; }
.section-heading p { font-size: .75rem; }
.step-number, .card-kicker { display: inline-grid; flex: 0 0 auto; width: 31px; height: 31px; place-items: center; color: var(--color-primary-dark); background: var(--color-primary-soft); border-radius: 9px; font-family: ui-monospace, Consolas, monospace; font-size: .7rem; font-weight: 800; }
.candidate-list { display: grid; gap: 15px; }
.candidate-empty { display: grid; min-height: 390px; place-content: center; justify-items: center; padding: 30px; text-align: center; }
.candidate-empty p { max-width: 350px; margin: 0; font-size: .9rem; }
.draw-orbit { position: relative; width: 78px; height: 78px; margin-bottom: 18px; border: 1px solid #f0bec9; border-radius: 50%; }
.draw-orbit::before { content: ""; position: absolute; inset: 14px; border: 1px dashed #e8a2b2; border-radius: 50%; }
.draw-orbit span { position: absolute; width: 10px; height: 10px; background: var(--color-primary); border-radius: 3px; }
.draw-orbit span:nth-child(1) { top: 10px; left: 17px; }
.draw-orbit span:nth-child(2) { top: 28px; right: 9px; }
.draw-orbit span:nth-child(3) { bottom: 8px; left: 29px; }

.question-card { padding: 18px; background: #fffdfd; border: 1px solid var(--color-border); border-radius: var(--radius-md); transition: border-color 180ms ease, box-shadow 180ms ease; }
.question-card:hover { border-color: #e7b7c2; box-shadow: 0 8px 25px rgba(84,35,49,.06); }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.user-meta { display: flex; min-width: 0; align-items: center; gap: 10px; }
.avatar { display: grid; flex: 0 0 auto; width: 36px; height: 36px; place-items: center; color: var(--color-primary-dark); background: #fde7ec; border-radius: 11px; font-weight: 850; }
.user-meta strong, .user-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta strong { font-size: .87rem; }
.user-meta span { color: var(--color-muted); font-size: .68rem; }
.card-actions { display: flex; gap: 5px; }
.card-actions .icon-button { width: 44px; height: 44px; }
.card-actions .favorite-active { color: var(--color-primary); background: var(--color-primary-soft); }
.card-actions .favorite-active svg { fill: currentColor; }
.question-content { margin: 0 0 15px; color: #2d1c22; font-size: 1rem; font-weight: 650; line-height: 1.65; overflow-wrap: anywhere; }
.question-status { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
.status-chip { display: inline-flex; min-height: 44px; align-items: center; padding: 6px 10px; color: var(--color-muted); background: white; border: 1px solid var(--color-border); border-radius: 9px; font-size: .74rem; font-weight: 700; }
.status-chip:hover { color: var(--color-primary-dark); border-color: #e4a8b6; }
.status-chip.active { color: #8f1236; background: #fff0f3; border-color: #f0a5b7; }
.status-chip.reject.active { color: #8b2c2c; background: #fff1f1; border-color: #f0b3b3; }
.answer-label { display: block; margin-bottom: 6px; }
.answer-area { min-height: 104px; background: white; }
.answer-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.saved-at { color: var(--color-muted); font-size: .72rem; }

.action-panel { position: sticky; top: 98px; padding: 24px; }
.action-block h2 { margin: 10px 0 4px; }
.action-block > p { margin-bottom: 14px; font-size: .83rem; }
.step-label { display: flex; align-items: center; gap: 9px; color: #5c454d; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.action-divider { height: 1px; margin: 22px 0; background: var(--color-border); }
.size-picker { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin: 12px 0; padding: 0; border: 0; }
.size-picker legend { grid-column: 1 / -1; margin-bottom: 4px; }
.size-picker label { position: relative; }
.size-picker input { position: absolute; opacity: 0; pointer-events: none; }
.size-picker span { display: grid; min-height: 44px; place-items: center; color: var(--color-muted); background: var(--color-surface-muted); border: 1px solid transparent; border-radius: 9px; }
.size-picker input:focus-visible + span { outline: 3px solid rgba(225,29,72,.25); }
.size-picker input:checked + span { color: var(--color-primary-dark); background: var(--color-primary-soft); border-color: #edb0bd; }

.empty-panel { padding: 58px 24px; background: white; border: 1px dashed #debcc5; border-radius: var(--radius-lg); text-align: center; }
.empty-panel svg { width: 46px; height: 46px; margin-bottom: 12px; color: var(--color-primary); }
.empty-panel p { margin-bottom: 20px; }

.library-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.library-card { padding: 22px; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.library-card blockquote { margin: 15px 0; color: var(--color-ink); font-size: 1.03rem; font-weight: 650; }
.library-card .answer-preview { padding: 12px 14px; color: #59454c; background: var(--color-surface-muted); border-radius: 10px; font-size: .83rem; white-space: pre-wrap; }
.meta-line { color: var(--color-muted); font-size: .72rem; }
.empty-library { grid-column: 1 / -1; padding: 56px; color: var(--color-muted); background: white; border: 1px dashed var(--color-border); border-radius: var(--radius-lg); text-align: center; }

.notice-card { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; padding: 17px 19px; border-color: #cbd8f4; background: #f7f9ff; }
.notice-card svg { flex: 0 0 auto; color: var(--color-accent); }
.notice-card strong { font-size: .88rem; }
.notice-card p { margin: 2px 0 0; font-size: .8rem; }
.draft-list { display: grid; gap: 16px; }
.draft-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 20px; padding: 22px; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.draft-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.draft-title-row h2 { margin: 0; }
.draft-content { max-height: 240px; margin: 14px 0 0; padding: 15px; overflow: auto; color: #49363d; background: #faf7f8; border-radius: 11px; font-size: .84rem; white-space: pre-wrap; }
.draft-actions { display: flex; min-width: 146px; flex-direction: column; gap: 9px; }
.tag { display: inline-flex; min-height: 28px; align-items: center; padding: 3px 8px; color: #6e4a55; background: #f6edf0; border-radius: 999px; font-size: .68rem; font-weight: 750; }
.tag.published { color: var(--color-success); background: #e9f8f2; }

.launch-heading { align-items: center; }
.launch-heading-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.launch-workbench { display: grid; grid-template-columns: minmax(300px,.78fr) minmax(420px,1.22fr); gap: 20px; align-items: start; }
.launch-editor, .launch-preview-panel, .launch-caption-card { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.launch-editor, .launch-preview-panel { min-height: 720px; padding: 22px; }
.launch-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.launch-panel-heading > div { display: flex; align-items: center; gap: 10px; }
.launch-panel-heading span { display: grid; width: 31px; height: 31px; place-items: center; color: var(--color-primary-dark); background: var(--color-primary-soft); border-radius: 9px; font-family: ui-monospace, Consolas, monospace; font-size: .7rem; font-weight: 850; }
.launch-panel-heading h2 { margin: 0; font-size: 1rem; }
.launch-panel-heading small { color: var(--color-muted); font-size: .68rem; }
.launch-slide-tabs { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; margin-bottom: 18px; }
.launch-slide-tabs button { display: grid; min-width: 0; min-height: 62px; place-items: center; gap: 2px; padding: 7px 3px; color: var(--color-muted); background: var(--color-surface-muted); border: 1px solid transparent; border-radius: 9px; font-size: .61rem; line-height: 1.2; cursor: pointer; }
.launch-slide-tabs button:hover { color: var(--color-primary-dark); border-color: #edb3c0; }
.launch-slide-tabs button.active { color: var(--color-primary-dark); background: #fff0f3; border-color: #e996aa; box-shadow: 0 0 0 2px rgba(225,29,72,.08); }
.launch-slide-tabs button span { font-family: ui-monospace, Consolas, monospace; font-size: .82rem; font-weight: 850; }
.launch-fields { display: grid; gap: 12px; }
.launch-fields label, .launch-caption-grid label { display: grid; gap: 6px; }
.launch-fields textarea { min-height: 82px; resize: vertical; }
.launch-fields textarea[name="items"] { min-height: 124px; }
.launch-preview-panel { position: sticky; top: 98px; }
.launch-preview-stage { display: grid; min-height: 590px; place-items: center; padding: 20px; background: #eee8e9; border-radius: 16px; overflow: hidden; }
.launch-card-preview { position: relative; display: flex; width: min(100%, 405px); aspect-ratio: 3 / 4; flex-direction: column; padding: 26px 27px 22px; color: #fff8f3; background: #201417; border-radius: 4px; box-shadow: 0 24px 58px rgba(41,19,27,.22); overflow: hidden; }
.launch-card-preview::before { content: ""; position: absolute; z-index: 0; top: -55px; right: -55px; width: 180px; height: 180px; background: currentColor; border-radius: 50%; opacity: .07; }
.launch-card-preview::after { content: ""; position: absolute; z-index: 0; inset: 0 auto 0 0; width: 7px; background: #ff315f; }
.launch-card-preview[data-layout="audience"] { color: #201417; background: #fff8f1; }
.launch-card-preview[data-layout="method"] { color: #182033; background: #edf4ff; }
.launch-card-preview[data-layout="offer"] { color: white; background: #ff315f; }
.launch-card-preview[data-layout="offer"]::after { background: #d9ff70; }
.launch-card-preview[data-layout="cta"] { color: #201417; background: #d9ff70; }
.launch-card-preview[data-layout="cta"]::after { background: #ff315f; }
.launch-card-preview > * { position: relative; z-index: 1; }
.launch-card-preview header, .launch-card-preview footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .57rem; font-weight: 800; letter-spacing: .06em; }
.launch-card-preview header b, .launch-card-preview footer b { flex: 0 0 auto; font-family: ui-monospace, Consolas, monospace; }
.launch-card-preview footer { margin-top: auto; padding-top: 13px; border-top: 1px solid currentColor; opacity: .76; }
.launch-card-preview footer span { max-width: 73%; }
.launch-card-content { display: flex; min-height: 0; flex: 1; flex-direction: column; padding: 31px 0 18px; }
.launch-card-eyebrow { align-self: flex-start; max-width: 100%; margin-bottom: 14px; padding: 6px 10px; color: white; background: #ff315f; border-radius: 999px; font-size: .61rem; font-weight: 850; overflow-wrap: anywhere; }
.launch-card-preview[data-layout="offer"] .launch-card-eyebrow { color: white; background: #201417; }
.launch-card-preview h2 { margin: 0; color: currentColor; font-size: clamp(1.72rem, 3.3vw, 2.48rem); line-height: 1.18; letter-spacing: -.055em; font-weight: 950; }
.launch-card-preview .launch-card-subtitle { margin: 12px 0 0; color: currentColor; font-size: .84rem; font-weight: 800; line-height: 1.45; }
.launch-card-preview .launch-card-subtitle + p, .launch-card-content > p:not(.launch-card-subtitle) { margin: 10px 0 0; color: currentColor; font-size: .7rem; line-height: 1.65; opacity: .82; }
.launch-cover-line { width: 78px; height: 7px; margin-top: auto; margin-bottom: 18px; background: #ff315f; border-radius: 999px; }
.launch-card-items, .launch-card-steps, .launch-price-list, .launch-check-list { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.launch-card-items li, .launch-card-steps li { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; align-items: center; min-height: 58px; padding: 9px 11px; background: white; border-radius: 12px; box-shadow: 0 6px 20px rgba(70,38,45,.05); }
.launch-card-items li span, .launch-card-steps li span { display: grid; width: 31px; height: 31px; place-items: center; color: white; background: #ff315f; border-radius: 9px; font-family: ui-monospace, Consolas, monospace; font-size: .61rem; }
.launch-card-items li strong, .launch-card-steps li strong { font-size: .71rem; line-height: 1.45; }
.launch-card-steps li { background: rgba(255,255,255,.82); }
.launch-price-list li { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; color: #201417; background: rgba(255,255,255,.94); border-radius: 13px; }
.launch-price-list li.featured { min-height: 70px; color: white; background: #201417; }
.launch-price-list li > span { font-size: .74rem; font-weight: 800; }
.launch-price-list strong { color: #ff315f; font-family: ui-monospace, Consolas, monospace; font-size: 1.5rem; line-height: 1; }
.launch-price-list .featured strong { color: #d9ff70; font-size: 1.78rem; }
.launch-price-list small { margin-right: 2px; font-size: .7rem; }
.launch-check-list { margin-top: auto; padding-top: 14px; }
.launch-check-list li { display: flex; align-items: center; gap: 9px; font-size: .7rem; font-weight: 750; }
.launch-check-list li span { width: 8px; height: 8px; flex: 0 0 auto; background: #ff315f; border-radius: 50%; }
.launch-export-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 15px; }
.launch-caption-card { margin-top: 20px; padding: 22px; }
.launch-caption-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.launch-caption-body { grid-column: 1 / -1; }
.launch-caption-body textarea { min-height: 260px; line-height: 1.72; resize: vertical; }

.settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: start; }
.settings-grid.smart-source-grid { grid-template-columns: minmax(300px,.7fr) minmax(0,1.3fr); }
.settings-card { padding: 24px; }
.settings-card.connector-card { grid-column: 1 / -1; }
.connection-banner { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px 28px; margin-bottom: 18px; padding: 24px; background: var(--color-dark); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.connection-copy { display: flex; align-items: center; gap: 13px; }
.connection-copy h2 { margin: 0; color: white; font-size: 1.08rem; }
.connection-copy p { margin: 2px 0 0; color: #cbbdc1; font-size: .8rem; }
.connection-state-dot { width: 12px; height: 12px; flex: 0 0 auto; background: #f59e0b; border: 3px solid rgba(255,255,255,.18); border-radius: 50%; box-sizing: content-box; }
.connection-state-dot.connected { background: #34d399; }
.connection-actions { display: flex; gap: 9px; align-items: center; }
.connection-steps { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 0; padding: 16px 0 0; border-top: 1px solid rgba(255,255,255,.12); list-style: none; counter-reset: connect-step; }
.connection-steps li { display: grid; grid-template-columns: 28px minmax(0,1fr); column-gap: 9px; align-items: center; color: white; counter-increment: connect-step; }
.connection-steps li::before { content: counter(connect-step); display: grid; width: 28px; height: 28px; grid-row: 1 / 3; place-items: center; color: #ffb4c3; background: rgba(255,255,255,.08); border-radius: 8px; font-family: ui-monospace, Consolas, monospace; font-size: .7rem; font-weight: 800; }
.connection-steps strong, .connection-steps span { display: block; }
.connection-steps strong { font-size: .78rem; }
.connection-steps span { color: #bdaeb3; font-size: .68rem; }
.sync-policy-card { margin-bottom: 18px; padding: 24px; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.sync-policy-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.sync-policy-heading h2, .sync-policy-heading p { margin-bottom: 0; }
.sync-policy-heading .eyebrow { margin-bottom: 5px; }
.sync-policy-heading #sync-policy-summary { margin-top: 5px; font-size: .78rem; }
.sync-policy-options { display: grid; min-width: 0; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.sync-policy-options legend { grid-column: 1 / -1; width: 100%; margin-bottom: 2px; }
.sync-policy-option { position: relative; display: flex; min-width: 0; min-height: 84px; align-items: center; gap: 10px; padding: 14px; color: var(--color-ink); background: var(--color-surface-muted); border: 1px solid var(--color-border); border-radius: var(--radius-sm); cursor: pointer; transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease; }
.sync-policy-option:hover { border-color: #e3a7b5; background: #fffafa; }
.sync-policy-option:has(input:checked) { border-color: var(--color-primary); background: var(--color-primary-soft); box-shadow: 0 0 0 3px rgba(225,29,72,.09); }
.sync-policy-option input { width: 20px; height: 20px; min-height: 20px; flex: 0 0 auto; margin: 0; padding: 0; accent-color: var(--color-primary); }
.sync-policy-option span, .sync-policy-option strong, .sync-policy-option small { display: block; min-width: 0; }
.sync-policy-option strong { font-size: .82rem; }
.sync-policy-option small { margin-top: 3px; color: var(--color-muted); font-size: .67rem; line-height: 1.45; }
.sync-policy-option em { position: absolute; top: 7px; right: 8px; padding: 2px 6px; color: var(--color-primary-dark); background: white; border-radius: 999px; font-size: .58rem; font-style: normal; font-weight: 800; }
.sync-policy-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.sync-policy-footer p { max-width: 760px; margin: 0; font-size: .72rem; line-height: 1.6; }
.sync-policy-footer .button { flex: 0 0 auto; }
.live-badge.paused { color: var(--color-danger); background: #fdefef; }
.live-badge.paused span { background: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.12); }
.verified-legend { color: var(--color-success); font-size: .7rem; font-weight: 750; }
.account-picker { display: grid; gap: 12px; }
.account-choice { width: 100%; padding: 17px; color: var(--color-ink); background: #fffdfd; border: 1px solid var(--color-border); border-radius: var(--radius-md); text-align: left; }
.account-choice:hover { border-color: #e3a7b5; box-shadow: 0 8px 22px rgba(84,35,49,.06); }
.account-choice.selected { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(225,29,72,.1); }
.account-choice-head { display: flex; gap: 13px; align-items: center; }
.profile-avatar { display: grid; width: 58px; height: 58px; flex: 0 0 auto; place-items: center; color: var(--color-primary-dark); background: #fde7ec; border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 1px var(--color-border); font-size: 1.1rem; font-weight: 850; object-fit: cover; }
.account-identity { min-width: 0; flex: 1; }
.account-name-line { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.account-name-line strong { font-size: .98rem; }
.verified-badge, .summary-badge { display: inline-flex; min-height: 26px; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: .65rem; font-weight: 800; }
.verified-badge { color: var(--color-success); background: #e8f8f2; }
.summary-badge { color: #79540c; background: #fff4d6; }
.account-id { display: block; margin-top: 2px; color: var(--color-muted); font-family: ui-monospace, Consolas, monospace; font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-bio { margin: 12px 0; color: #59454c; font-size: .78rem; }
.account-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.account-stats span { display: block; color: var(--color-muted); font-size: .64rem; }
.account-stats strong { display: block; font-family: ui-monospace, Consolas, monospace; font-size: .88rem; }
.post-library-toolbar { display: grid; grid-template-columns: minmax(0,1fr) 150px; gap: 10px; margin: -4px 0 16px; }
.post-library-toolbar label { display: grid; gap: 5px; }
.post-library-toolbar label > span { color: var(--color-muted); font-size: .66rem; font-weight: 750; }
.post-library-toolbar input, .post-library-toolbar select { min-height: 42px; padding-block: 8px; font-size: .78rem; }
.post-picker-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap: 12px; }
.post-choice { display: flex; min-width: 0; flex-direction: column; padding: 0; color: var(--color-ink); background: #fffdfd; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; text-align: left; }
.post-choice:hover { border-color: #e3a7b5; box-shadow: 0 8px 22px rgba(84,35,49,.06); }
.post-choice.selected { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(225,29,72,.1); }
.post-cover { position: relative; display: grid; width: 100%; aspect-ratio: 4 / 3; place-items: center; color: #9b7d86; background: #f7eef0; overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; }
.post-cover svg { width: 34px; height: 34px; }
.post-cover-badges { position: absolute; inset: 9px 9px auto; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.pin-badge, .current-badge, .monitoring-badge { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 8px; border-radius: 999px; box-shadow: 0 4px 12px rgba(30,12,18,.14); font-size: .64rem; font-weight: 850; }
.pin-badge { color: #7b4800; background: #fff1bd; }
.current-badge { margin-left: auto; color: white; background: var(--color-primary); }
.monitoring-badge { margin-left: auto; color: #087452; background: #e8f8f2; }
.post-choice-body { display: grid; gap: 7px; padding: 13px; }
.post-choice-title { display: -webkit-box; margin: 0; font-size: .84rem; line-height: 1.5; font-weight: 800; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.post-choice-content { display: -webkit-box; margin: 0; color: var(--color-muted); font-size: .7rem; line-height: 1.55; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.post-choice-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: center; color: var(--color-muted); font-size: .64rem; }
.post-load-more { width: 100%; margin-top: 14px; }
.source-empty { grid-column: 1 / -1; padding: 30px 18px; color: var(--color-muted); background: var(--color-surface-muted); border: 1px dashed var(--color-border); border-radius: var(--radius-md); text-align: center; }
.source-empty strong { display: block; margin-bottom: 4px; color: var(--color-ink); }
.card-heading { margin-bottom: 18px; }
.card-heading h2 { margin: 0; }
.source-list { display: grid; gap: 9px; margin-bottom: 20px; }
.source-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 13px; background: var(--color-surface-muted); border-radius: 10px; }
.source-row strong, .source-row span { display: block; }
.source-row strong { font-size: .84rem; }
.source-row span { color: var(--color-muted); font-size: .7rem; overflow-wrap: anywhere; }
.source-count { flex: 0 0 auto; padding: 3px 8px; color: var(--color-primary-dark) !important; background: white; border-radius: 999px; font-weight: 750; }
.inline-form { display: grid; gap: 7px; padding-top: 18px; border-top: 1px solid var(--color-border); }
.inline-form .button { margin-top: 6px; }
.beta-badge { padding: 3px 8px; color: #78510a; background: #fff5d8; border-radius: 999px; font-size: .68rem; font-weight: 800; }
.instruction-list { display: grid; gap: 8px; margin: 0 0 18px; padding-left: 22px; color: #58454c; font-size: .84rem; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }
.manual-fallback { grid-column: 1 / -1; }
.manual-fallback summary { min-height: 44px; color: #5d454d; font-weight: 750; cursor: pointer; }
.manual-fallback > p { font-size: .8rem; }
.manual-forms-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.manual-forms-grid .inline-form { padding: 18px; background: var(--color-surface-muted); border: 0; border-radius: var(--radius-md); }
.manual-forms-grid h3 { margin: 0 0 6px; }

.modal-backdrop { position: fixed; z-index: 500; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(29, 15, 20, .55); overflow-y: auto; }
.modal { width: min(100%, 680px); max-height: calc(100vh - 44px); padding: 25px; background: white; border-radius: var(--radius-lg); box-shadow: 0 30px 80px rgba(25,10,15,.3); overflow-y: auto; animation: modal-in 180ms ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(9px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.modal-heading h2 { font-size: 1.35rem; }
.modal > p { font-size: .84rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.post-detail-modal { width: min(100%, 1000px); }
.post-detail-hero { display: grid; grid-template-columns: minmax(240px,330px) minmax(0,1fr); gap: 24px; align-items: start; }
.post-detail-cover { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius-md); background: var(--color-surface-muted); object-fit: cover; }
.post-detail-cover-empty { display: grid; place-items: center; color: var(--color-muted); border: 1px dashed var(--color-border); }
.post-detail-summary { min-width: 0; }
.post-detail-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.post-detail-badges .current-badge { margin-left: 0; }
.post-detail-account { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.post-detail-account-avatar { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; color: var(--color-primary-dark); background: #fde7ec; border-radius: 50%; font-size: .82rem; font-weight: 850; object-fit: cover; }
.post-detail-account > div { min-width: 0; }
.post-detail-account strong, .post-detail-account span { display: block; }
.post-detail-account strong { font-size: .88rem; }
.post-detail-account span { margin-top: 2px; color: var(--color-muted); font-family: ui-monospace, Consolas, monospace; font-size: .65rem; overflow-wrap: anywhere; }
.post-detail-bio { margin: 10px 0 0; color: var(--color-muted); font-size: .72rem; line-height: 1.6; }
.post-detail-account-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-top: 12px; }
.post-detail-account-stats span { padding: 9px; color: var(--color-muted); background: var(--color-surface-muted); border-radius: 9px; font-size: .61rem; }
.post-detail-account-stats strong { display: block; margin-bottom: 2px; color: var(--color-ink); font-family: ui-monospace, Consolas, monospace; font-size: .78rem; }
.post-detail-copy { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.post-detail-copy h3 { margin: 0; font-size: .76rem; }
.post-detail-copy > p { margin: 7px 0 0; color: #4f3c43; font-size: .8rem; line-height: 1.72; white-space: pre-wrap; overflow-wrap: anywhere; }
.post-detail-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.post-detail-tags span { padding: 4px 8px; color: var(--color-primary-dark); background: #fff0f3; border-radius: 999px; font-size: .64rem; font-weight: 750; }
.post-detail-missing { margin: 9px 0 0; color: var(--color-muted); font-size: .66rem; }
.post-engagement-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-top: 20px; }
.post-engagement-grid article { padding: 14px; background: var(--color-surface-muted); border: 1px solid var(--color-border); border-radius: var(--radius-sm); }
.post-engagement-grid strong, .post-engagement-grid span { display: block; }
.post-engagement-grid strong { font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; }
.post-engagement-grid span { margin-top: 3px; color: var(--color-muted); font-size: .64rem; }
.post-detail-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; margin: 14px 0 0; overflow: hidden; background: var(--color-border); border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.post-detail-meta div { min-width: 0; padding: 13px 15px; background: white; }
.post-detail-meta dt { color: var(--color-muted); font-size: .65rem; font-weight: 750; }
.post-detail-meta dd { margin: 4px 0 0; font-size: .78rem; overflow-wrap: anywhere; }
.post-comment-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--color-border); }
.post-comment-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.post-comment-heading h3 { margin: 0; font-size: 1rem; }
.post-comment-heading p { margin: 3px 0 0; color: var(--color-muted); font-size: .7rem; }
.post-comment-actions { display: flex; gap: 8px; align-items: center; }
.live-badge { display: inline-flex; min-height: 30px; align-items: center; gap: 6px; padding: 4px 9px; color: #087452; background: #e8f8f2; border-radius: 999px; font-size: .67rem; font-weight: 800; white-space: nowrap; }
.live-badge span { width: 7px; height: 7px; background: #10b981; border-radius: 50%; box-shadow: 0 0 0 3px rgba(16,185,129,.13); }
.button.secondary.danger { color: var(--color-danger); border-color: #efc6c6; background: #fffafa; box-shadow: none; }
.button.secondary.danger:hover { color: #991b1b; border-color: #eaa0a0; background: #fff1f1; }
.post-comment-feed { display: grid; gap: 9px; margin-top: 14px; }
.post-comment-item { padding: 14px 15px; background: var(--color-surface-muted); border: 1px solid transparent; border-radius: var(--radius-sm); }
.post-comment-item:focus { border-color: var(--color-primary); outline: 3px solid rgba(225,29,72,.11); }
.post-comment-user { display: flex; min-width: 0; gap: 9px; align-items: center; }
.comment-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; color: var(--color-primary-dark); background: #fde7ec; border-radius: 50%; font-size: .75rem; font-weight: 850; object-fit: cover; }
.post-comment-user > .comment-avatar-placeholder { position: relative; display: grid; place-items: center; color: #85747a; background: #f0ebed; border: 1px solid #e3dadd; }
.comment-avatar-placeholder svg { position: absolute; inset: 50% auto auto 50%; width: 17px; height: 17px; margin: 0; transform: translate(-50%,-50%); stroke-width: 1.7; }
.post-comment-user > div { min-width: 0; flex: 1; }
.post-comment-user > div:not(.comment-badges) strong,
.post-comment-user > div:not(.comment-badges) span { display: block; }
.post-comment-user strong { font-size: .78rem; }
.post-comment-user > div span { color: var(--color-muted); font-size: .64rem; }
.comment-state { flex: 0 0 auto; padding: 3px 7px; color: #6b5960; background: white; border: 1px solid var(--color-border); border-radius: 999px; font-size: .62rem; font-weight: 750; }
.comment-state.question { color: var(--color-success); background: #e8f8f2; border-color: transparent; }
.comment-state.rejected { color: #8b2434; background: #fdecef; border-color: transparent; }
.comment-badges { display: flex; flex: 0 0 auto !important; gap: 5px; align-items: center; }
.comment-author-badge { padding: 3px 7px; color: var(--color-primary-dark) !important; background: #fff0f3; border-radius: 999px; font-size: .62rem !important; font-weight: 800; }
.post-comment-item > p { margin: 10px 0 0 43px; color: #3f3035; font-size: .82rem; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.comment-likes { display: block; margin: 6px 0 0 43px; color: var(--color-muted); font-size: .64rem; }
.post-comment-empty { display: grid; gap: 4px; padding: 26px 18px; color: var(--color-muted); background: var(--color-surface-muted); border: 1px dashed var(--color-border); border-radius: var(--radius-md); text-align: center; font-size: .76rem; }
.post-comment-empty strong { color: var(--color-ink); font-size: .84rem; }

.toast-region { position: fixed; z-index: 1600; right: 22px; bottom: 22px; display: grid; width: min(360px, calc(100vw - 44px)); gap: 9px; }
.toast { padding: 13px 15px; color: white; background: #25181c; border-radius: 11px; box-shadow: 0 14px 34px rgba(32,13,19,.25); font-size: .84rem; animation: toast-in 180ms ease-out; }
.toast.error { background: #8c1d2d; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1120px) {
  :root { --sidebar-width: 220px; }
  .today-layout { grid-template-columns: minmax(0,1fr) 285px; }
  .topbar { padding-inline: 25px; }
  main { padding-inline: 25px; }
  .source-picker { width: 170px; }
  .launch-workbench { grid-template-columns: minmax(280px,.85fr) minmax(380px,1.15fr); }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .workspace { grid-column: auto; }
  .sidebar { transform: translateX(-105%); box-shadow: 16px 0 40px rgba(25,10,15,.25); transition: transform 220ms ease; }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: inline-grid; flex: 0 0 auto; }
  .topbar { align-items: center; }
  .source-picker { width: 150px; }
  .source-picker.grow { width: auto; flex: 1; }
  .today-layout { grid-template-columns: 1fr; }
  .action-panel { position: static; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
  .action-divider { display: none; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .connection-banner { grid-template-columns: 1fr; }
  .connection-actions, .connection-steps { grid-column: auto; }
  .connection-steps { grid-template-columns: 1fr; }
  .sync-policy-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .settings-grid.smart-source-grid { grid-template-columns: 1fr; }
  .settings-card.connector-card, .manual-fallback { grid-column: auto; }
  .launch-workbench { grid-template-columns: 1fr; }
  .launch-preview-panel { position: static; }
  .launch-editor, .launch-preview-panel { min-height: 0; }
}

@media (max-width: 680px) {
  input, select, textarea { font-size: 1rem; }
  .topbar {
    display: grid;
    min-height: auto;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    gap: 6px;
    align-items: center;
    padding: max(6px, env(safe-area-inset-top)) 10px 8px;
    background: var(--color-background);
    backdrop-filter: none;
  }
  #mobile-menu-button { grid-column: 1; grid-row: 1; }
  .source-picker { width: auto; min-width: 0; grid-column: 2; grid-row: 1; }
  .source-picker.grow { width: auto; min-width: 0; grid-column: 1 / -1; grid-row: 2; }
  .source-picker label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .source-picker select { min-height: 44px; padding-block: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #open-post-button { width: 44px; min-width: 44px; padding: 0; grid-column: 3; grid-row: 1; font-size: 0; }
  #open-post-button svg { width: 21px; height: 21px; }
  main { padding: 18px 12px calc(32px + env(safe-area-inset-bottom)); }
  .page-heading { align-items: stretch; flex-direction: column; gap: 12px; margin-bottom: 18px; }
  .page-heading h1 { font-size: clamp(1.65rem, 8vw, 2rem); }
  .page-heading p { margin-bottom: 0; }
  .date-control { width: 100%; }
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 88px; padding: 12px 14px; }
  .metric-card strong { font-size: 1.65rem; }
  .candidate-section, .action-panel, .settings-card { border-radius: var(--radius-md); }
  .candidate-section { min-height: 0; padding: 14px; }
  .section-heading { align-items: flex-start; }
  .section-heading > div { align-items: flex-start; }
  .question-card { padding: 14px; content-visibility: auto; contain-intrinsic-size: 280px; }
  .question-meta { align-items: flex-start; }
  .question-status { gap: 6px; }
  .status-chip { flex: 1; justify-content: center; }
  .answer-footer { align-items: stretch; flex-direction: column; }
  .answer-footer .button { width: 100%; }
  .action-panel { display: block; padding: 20px; }
  .action-divider { display: block; }
  .library-grid, .settings-grid { grid-template-columns: 1fr; }
  .settings-card.connector-card { grid-column: auto; }
  .draft-card { grid-template-columns: 1fr; }
  .draft-actions { min-width: 0; }
  .launch-heading-actions, .launch-export-actions, .launch-caption-grid { grid-template-columns: 1fr; }
  .launch-heading-actions { display: grid; width: 100%; }
  .launch-caption-body { grid-column: auto; }
  .launch-editor, .launch-preview-panel, .launch-caption-card { padding: 16px; border-radius: var(--radius-md); }
  .launch-preview-stage { min-height: 420px; padding: 10px; }
  .launch-card-preview { width: min(100%, 350px); padding: 23px 23px 19px; }
  .launch-card-preview h2 { font-size: clamp(1.7rem, 9vw, 2.15rem); }
  .modal-backdrop { padding: 0; place-items: stretch; overflow: hidden; overscroll-behavior: contain; }
  .modal {
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
    border-radius: 0;
    box-shadow: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    animation: none;
  }
  .modal-heading { gap: 10px; margin-bottom: 10px; }
  .modal-heading h2 { font-size: 1.15rem; }
  .modal-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex-direction: initial; padding-bottom: env(safe-area-inset-bottom); }
  .modal-actions .button { width: 100%; }
  .connection-banner { padding: 16px; border-radius: var(--radius-md); box-shadow: none; }
  .connection-actions { align-items: stretch; flex-direction: column; }
  .connection-actions .button { width: 100%; }
  .sync-policy-card { padding: 16px; border-radius: var(--radius-md); }
  .sync-policy-heading, .sync-policy-footer { align-items: stretch; flex-direction: column; }
  .sync-policy-heading .live-badge { align-self: flex-start; }
  .sync-policy-options { grid-template-columns: 1fr; }
  .sync-policy-option { min-height: 68px; }
  .sync-policy-footer .button { width: 100%; }
  .post-picker-grid, .manual-forms-grid { grid-template-columns: 1fr; }
  .post-library-toolbar, .post-detail-hero, .post-detail-meta { grid-template-columns: 1fr; }
  .post-detail-hero { gap: 14px; }
  .post-detail-cover { aspect-ratio: 16 / 9; max-height: 230px; }
  .post-engagement-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .post-comment-heading { align-items: stretch; flex-direction: column; }
  .post-comment-actions { justify-content: space-between; }
  .post-comment-item > p { margin-left: 0; }
  .comment-likes { margin-left: 0; }
  .post-choice, .post-comment-item, .library-card, .draft-card { content-visibility: auto; contain-intrinsic-size: 220px; }
  .toast-region { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); width: calc(100vw - 24px); }
}

@media (max-width: 420px) {
  .source-picker select { font-size: 1rem; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card small { display: none; }
  .metric-card { min-height: 88px; }
  .auth-screen { padding: 13px; }
  .auth-card { padding: 26px 20px; }
}

@media (hover: none), (pointer: coarse) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .button, .nav-item, .question-card, .metric-card, .post-choice, .account-choice, .candidate-section, .action-panel, .settings-card, .modal, .toast { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
