:root {
  --bg: #090909;
  --panel: #111111;
  --panel-2: #151515;
  --line: #383838;
  --line-strong: #777777;
  --text: #f3f3ef;
  --soft: #d1d1cc;
  --muted: #969690;
  --faint: #686862;
  --danger: #e5c2c2;
  --radius: 0;
  --side: 224px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Noto Sans Mono", "Microsoft YaHei", monospace; font-size: 13px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; }

.is-hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.kicker { margin: 0 0 8px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.form-error { min-height: 18px; margin: 9px 0 0; color: var(--danger); font-size: 11px; line-height: 1.5; }
.inline-note { min-height: 18px; margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }

.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-frame { width: min(100%, 430px); border: 1px solid var(--line-strong); padding: 32px; background: var(--panel); }
.auth-mark { margin-bottom: 28px; color: var(--soft); font-size: 11px; line-height: 1.5; white-space: pre; }
.auth-frame h1 { margin: 0; font-size: 25px; letter-spacing: 0; }
.auth-sub { margin: 9px 0 27px; color: var(--muted); font-size: 12px; }
.auth-form { display: grid; gap: 13px; }
.auth-form label, .compact-fields label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--side) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 17px 13px; border-right: 1px solid var(--line); background: #0c0c0c; }
.brand-block { margin-bottom: 19px; padding: 14px 12px; border: 1px solid var(--line-strong); }
.brand-title { font-size: 14px; font-weight: 700; }
.brand-sub { margin-top: 7px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.nav { display: grid; gap: 5px; }
.nav-item { display: grid; grid-template-columns: 29px 1fr; gap: 6px; padding: 11px 9px; border: 1px solid transparent; background: transparent; color: var(--muted); text-align: left; }
.nav-item span { color: var(--faint); }
.nav-item:hover, .nav-item.is-active { border-color: var(--line); background: var(--panel); color: var(--text); }
.nav-item.is-active span { color: var(--text); }
.sidebar-status { display: grid; grid-template-columns: 1fr auto; gap: 7px 10px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.4; }
.sidebar-status strong { color: var(--soft); font-size: 9px; font-weight: 400; text-align: right; }
.mobile-nav { display: none; }

.main-shell { min-width: 0; padding: 18px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.topbar h2 { margin: 0; font-size: 18px; }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.topbar-meta { color: var(--muted); font-size: 10px; white-space: nowrap; }
.view { display: none; }
.view.is-active { display: block; }
.panel.mobile-hidden { display: none; }

.hero-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; margin-bottom: 16px; padding: 19px; border: 1px solid var(--line-strong); }
.hero-band.compact { min-height: 132px; }
.hero-band h1 { max-width: 760px; margin: 0; font-size: clamp(20px, 2.3vw, 30px); line-height: 1.25; }
.hero-copy { max-width: 700px; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.ascii-box { margin: 0; color: var(--soft); font-size: 11px; line-height: 1.35; white-space: pre; }
.ascii-box.small { font-size: 10px; }

.workspace-grid { display: grid; grid-template-columns: minmax(260px, .94fr) minmax(340px, 1.35fr) minmax(245px, .9fr); gap: 12px; align-items: start; }
.panel { min-width: 0; border: 1px solid var(--line); background: var(--panel); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 40px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.panel-head strong { font-size: 12px; }
.panel-head span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.panel-body { padding: 12px; }
.section-label { display: block; margin: 0 0 7px; color: var(--muted); font-size: 10px; line-height: 1.4; }

.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.choice { min-height: 53px; padding: 9px 8px; border: 1px solid var(--line); background: #0e0e0e; color: var(--soft); text-align: left; }
.choice small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.choice:hover, .choice.is-active { border-color: var(--text); background: #191919; color: var(--text); }
.choice.is-active small { color: var(--soft); }
.field-block { margin-top: 14px; }
.upload-zone { display: grid; gap: 5px; min-height: 74px; place-content: center; padding: 12px; border: 1px dashed var(--line-strong); background: #0c0c0c; text-align: center; }
.upload-zone:hover { border-color: var(--text); }
.upload-title { color: var(--soft); }
.upload-hint { color: var(--muted); font-size: 10px; }
.file-list { display: grid; gap: 4px; max-height: 110px; margin-top: 7px; overflow: auto; }
.file-item { overflow: hidden; padding-top: 5px; border-top: 1px solid var(--line); color: var(--soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
textarea, input, select { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); outline: none; background: #0a0a0a; color: var(--text); }
input, select { min-height: 38px; padding: 8px 9px; }
textarea { min-height: 107px; padding: 9px; resize: vertical; line-height: 1.6; }
textarea:focus, input:focus, select:focus { border-color: var(--text); }
.field-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 5px; color: var(--faint); font-size: 9px; }
.compact-fields { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 8px; }
.catalog-fields { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 94px; gap: 7px; }
.catalog-fields label { display: grid; min-width: 0; gap: 5px; color: var(--muted); font-size: 10px; }
.catalog-fields select { min-width: 0; }
.catalog-selection-note { min-height: 31px; margin: 7px 0 0; color: var(--faint); font-size: 9px; line-height: 1.55; }

.button { min-height: 36px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #0d0d0d; color: var(--text); }
.button:hover { border-color: var(--text); background: #181818; }
.button.primary { border-color: var(--text); background: var(--text); color: #080808; font-weight: 700; }
.button.primary:hover { background: #d3d3ce; }
.button.secondary { color: var(--soft); }
.button.agent-action { border-color: #6e927e; color: #c8e2d1; background: #18211c; }
.button.agent-action:hover { border-color: #b9e2c5; background: #223128; color: #f2fff5; }
.button.ghost { min-height: 30px; padding: 5px 9px; border-color: var(--line); color: var(--muted); font-size: 10px; }
.button.full { width: 100%; margin-top: 13px; }

.preview-wrap { display: grid; place-items: center; padding: 14px; }
.phone { width: min(100%, 310px); aspect-ratio: 9 / 16; position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; border: 1px solid var(--line-strong); background: #050505; }
.phone::after { content: ""; position: absolute; inset: 10px; border: 1px solid #202020; pointer-events: none; }
.phone-top, .phone-bottom { position: relative; z-index: 1; display: flex; justify-content: space-between; gap: 8px; padding: 12px; color: var(--muted); font-size: 9px; }
.phone-stage { position: relative; z-index: 1; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; margin: 0 14px; padding: 15px; border: 1px solid var(--line); background: #101010; overflow: hidden; }
.timeline-block { padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.track { display: grid; grid-template-columns: 45px repeat(5, minmax(0, 1fr)); gap: 4px; align-items: center; margin-top: 6px; }
.track-name { color: var(--muted); font-size: 9px; }
.clip { display: flex; min-height: 26px; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); color: var(--muted); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.clip.on { border-color: #a8a8a3; background: #1b1b1b; color: var(--soft); }
.result-box { margin: 0 12px 12px; padding: 10px; border-top: 1px solid var(--line-strong); color: var(--soft); font-size: 11px; line-height: 1.7; }
.result-box strong { display: block; margin-bottom: 4px; color: var(--text); }

.scene-list { display: grid; gap: 7px; }
.scene { padding: 10px; border: 1px solid var(--line); background: #0d0d0d; }
.scene.is-active, .scene:hover { border-color: var(--text); }
.scene-row { display: flex; justify-content: space-between; gap: 9px; font-size: 10px; }
.scene-row span { color: var(--muted); white-space: nowrap; }
.scene p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.tag { display: inline-block; margin: 7px 4px 0 0; padding: 2px 5px; border: 1px solid var(--line); color: var(--soft); font-size: 8px; font-weight: 400; }
.status-rail { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.status-rail .section-label { display: flex; justify-content: space-between; gap: 8px; }
.status-rail .section-label span { color: var(--soft); }
.status-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 32px; align-items: center; gap: 7px; margin: 9px 0; color: var(--muted); font-size: 9px; }
.status-row em { color: var(--muted); font-size: 9px; font-style: normal; text-align: right; }
.progress { height: 7px; border: 1px solid var(--line); background: #080808; }
.progress i { display: block; width: 0; height: 100%; background: #d6d6d0; transition: width .35s ease; }

.mobile-tabs { display: none; gap: 6px; margin-bottom: 10px; overflow-x: auto; }
.tab { flex: 0 0 auto; padding: 8px 11px; border: 1px solid var(--line); background: #0d0d0d; color: var(--muted); }
.tab.is-active { border-color: var(--text); color: var(--text); }

.metric-strip { display: grid; grid-template-columns: repeat(3, auto); align-items: baseline; gap: 3px 10px; min-width: 205px; padding-left: 16px; border-left: 1px solid var(--line); }
.metric-strip strong { font-size: 24px; font-weight: 400; }
.metric-strip span { color: var(--muted); font-size: 9px; }
.project-list, .asset-list { display: grid; gap: 8px; }
.project-row, .asset-row { display: grid; grid-template-columns: minmax(0, 1.5fr) auto; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); background: #0d0d0d; }
.project-row:hover, .asset-row:hover { border-color: var(--text); }
.project-open { display: grid; grid-template-columns: minmax(0, 1.5fr) 110px 90px 90px; gap: 12px; align-items: center; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.row-actions { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.project-name, .asset-name { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.project-meta, .asset-meta { color: var(--muted); font-size: 10px; }
.status-label { color: var(--soft); font-size: 10px; }
.status-label.ready { color: var(--text); }
.status-label.failed { color: var(--danger); }
.empty-state { margin: 0; padding: 24px 10px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }

.settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.provider-body code { display: block; margin-bottom: 9px; color: var(--text); font-size: 12px; }
.provider-body p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.provider-body .field-block { margin-top: 15px; }
.segment-list { display: grid; gap: 5px; margin-top: 9px; }
.segment { display: grid; grid-template-columns: 25px minmax(0, 1fr) 52px; gap: 6px; padding: 6px; border-top: 1px solid var(--line); color: var(--soft); font-size: 9px; }
.segment small { color: var(--muted); text-align: right; }
.segment a { color: var(--soft); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.segment-links { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.provider-ok { color: var(--soft) !important; }
.provider-off { color: var(--muted) !important; }

.footer-note { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 15px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; max-width: min(360px, calc(100vw - 36px)); padding: 10px 12px; border: 1px solid var(--line-strong); background: #151515; color: var(--soft); font-size: 10px; opacity: 0; transform: translateY(7px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

/* Growth workspace: publishing operations and lead tracking stay dense and scan-friendly. */
.growth-hero { grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); }
.growth-project-picker { min-width: 0; padding-left: 18px; border-left: 1px solid var(--line); }
.growth-project-picker > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.growth-project-picker select { min-width: 0; }
.growth-workspace { display: grid; grid-template-columns: 210px minmax(390px, 1.4fr) minmax(300px, 1fr); gap: 12px; align-items: start; }
.growth-scoreboard { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--line-strong); background: var(--panel); }
.growth-scoreboard > div { min-width: 0; padding: 12px 14px; border-left: 1px solid var(--line); }
.growth-scoreboard > div:first-child { border-left: 0; }
.growth-scoreboard span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.growth-scoreboard strong { display: block; overflow: hidden; color: var(--text); font-size: 22px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.growth-platform-list { display: grid; gap: 6px; padding: 10px; }
.growth-platform { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 45px; padding: 8px 9px; border: 1px solid var(--line); background: #0c0c0c; color: var(--muted); text-align: left; }
.growth-platform span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.growth-platform small { color: var(--faint); font-size: 8px; }
.growth-platform:hover, .growth-platform.is-active { border-color: var(--text); background: #191919; color: var(--text); }
.growth-platform.is-active small { color: var(--soft); }
.growth-platform-meta { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 9px; padding: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.growth-platform-meta strong { min-width: 0; overflow: hidden; color: var(--soft); font-size: 9px; font-weight: 400; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.growth-form, .lead-form { display: grid; gap: 10px; }
.growth-form > label, .growth-form-row label, .growth-metrics-grid label, .lead-form > label { display: grid; min-width: 0; gap: 5px; color: var(--muted); font-size: 9px; }
.growth-form-row { display: grid; gap: 8px; }
.growth-form-row.split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.growth-form textarea { min-height: 70px; }
.growth-form #growthDescription { min-height: 116px; }
.growth-metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; min-width: 0; margin: 2px 0 0; padding: 11px; border: 1px solid var(--line); }
.growth-metrics-grid legend { padding: 0 6px; color: var(--soft); font-size: 9px; }
.growth-metrics-grid input { min-width: 0; }
.growth-form .form-error, .lead-form .form-error { margin: -3px 0 0; }
.lead-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border-bottom: 1px solid var(--line); background: var(--line); }
.lead-summary span { min-width: 0; padding: 8px 10px; overflow: hidden; background: #0d0d0d; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.lead-form { padding: 11px; border-bottom: 1px solid var(--line); }
.lead-form textarea { min-height: 62px; }
.lead-list { display: grid; gap: 7px; max-height: 640px; padding: 10px; overflow: auto; }
.lead-row { display: grid; grid-template-columns: minmax(0, 1fr) 104px auto; gap: 7px; align-items: center; min-width: 0; padding: 9px; border: 1px solid var(--line); background: #0c0c0c; }
.lead-main { min-width: 0; }
.lead-main strong, .lead-main a, .lead-main small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-main strong { color: var(--soft); font-size: 10px; font-weight: 400; }
.lead-main a { margin-top: 4px; color: var(--text); font-size: 9px; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.lead-main small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.lead-row select { min-width: 0; min-height: 30px; padding: 5px; font-size: 9px; }
.lead-row > p { grid-column: 1 / -1; margin: 1px 0 0; padding-top: 7px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; line-height: 1.55; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  /* Let the two-column layout shrink to the available content width at the
     narrow edge of the 761-1100px range; the panels already opt into
     min-width: 0 and the phone preview keeps its 9:16 aspect ratio. */
  .workspace-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); }
  .structure-panel { grid-column: 1 / -1; }
  .structure-panel .panel-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .structure-panel .scene-list { display: contents; }
  .status-rail { grid-column: 1 / -1; }
  .settings-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid .panel:last-child { grid-column: 1 / -1; }
  .growth-workspace { grid-template-columns: 200px minmax(0, 1fr); }
  .growth-leads-panel { grid-column: 1 / -1; }
  .lead-list { max-height: 430px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) and (min-width: 761px) {
  .catalog-fields { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; position: sticky; top: 49px; z-index: 19; margin: 0 -10px 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .mobile-nav .nav-item { min-height: 31px; padding: 5px 4px; border: 1px solid var(--line); background: #0d0d0d; color: var(--muted); font-size: 9px; }
  .mobile-nav .nav-item span { margin-right: 3px; color: var(--faint); font-size: 8px; }
  .mobile-nav .nav-item.is-active { border-color: var(--text); color: var(--text); }
  .main-shell { padding: 10px; }
  .topbar { position: sticky; top: 0; z-index: 20; margin: 0 -10px 10px; padding: 10px; background: var(--bg); }
  .topbar h2 { font-size: 15px; }
  .topbar-meta { display: none; }
  .hero-band { grid-template-columns: 1fr; padding: 14px; }
  .hero-band h1 { font-size: 20px; }
  .ascii-box { display: none; }
  .mobile-tabs { display: flex; }
  .workspace-grid { display: block; }
  .workspace-grid > .panel { margin-bottom: 10px; }
  .panel.mobile-hidden { display: none; }
  .preview-wrap { padding: 10px; }
  .phone { width: min(100%, 320px); }
  .structure-panel .panel-body { display: block; }
  .structure-panel .scene { margin-bottom: 7px; }
  .metric-strip { min-width: 0; padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .project-row, .asset-row { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .project-open { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .project-open .project-name { grid-column: 1 / -1; }
  .row-actions { justify-content: flex-start; }
  .project-row .project-name, .asset-row .asset-name { grid-column: 1 / -1; }
  .settings-grid { display: block; }
  .settings-grid .panel { margin-bottom: 10px; }
  .catalog-fields { grid-template-columns: 1fr 1fr; }
  .catalog-fields label:last-child { grid-column: 1 / -1; }
  .growth-hero { grid-template-columns: 1fr; }
  .growth-project-picker { padding: 12px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .growth-workspace { display: block; }
  .growth-scoreboard { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 9px; }
  .growth-scoreboard > div { padding: 10px; }
  .growth-scoreboard > div:nth-child(4) { border-left: 0; }
  .growth-scoreboard > div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .growth-scoreboard strong { font-size: 18px; }
  .growth-workspace > .panel { margin-bottom: 9px; }
  .growth-platform-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .growth-platform { grid-template-columns: 1fr; gap: 4px; min-height: 50px; }
  .growth-form-row.split { grid-template-columns: 1fr; }
  .growth-metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead-list { max-height: none; grid-template-columns: 1fr; }
  .footer-note { padding-bottom: 66px; }
  button:not(.track-action):not(.asset-preview-trigger):not(.timeline-item) { min-height: 44px; }
  input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(.visually-hidden), select { min-height: 44px; }
}

@media (min-width: 761px) {
  .panel.mobile-hidden { display: block; }
}

@media (max-width: 420px) {
  .auth-shell { padding: 12px; }
  .auth-frame { padding: 22px; }
  .choice-grid { grid-template-columns: 1fr; }
  .compact-fields { grid-template-columns: 1fr 92px; }
  .catalog-fields { grid-template-columns: 1fr; }
  .catalog-fields label:last-child { grid-column: auto; }
  .mobile-nav { gap: 3px; padding-left: 7px; padding-right: 7px; }
  .mobile-nav .nav-item { padding-left: 2px; padding-right: 2px; font-size: 8px; }
  .mobile-nav .nav-item span { display: none; }
  .growth-project-picker > div { grid-template-columns: minmax(0, 1fr); }
  .growth-project-picker .button { width: 100%; }
  .growth-scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .growth-scoreboard > div:nth-child(3) { border-top: 1px solid var(--line); border-left: 0; }
  .growth-scoreboard > div:nth-child(4) { border-left: 1px solid var(--line); }
  .growth-scoreboard > div:nth-child(5) { grid-column: 1 / -1; border-top: 1px solid var(--line); border-left: 0; }
  .lead-row { grid-template-columns: minmax(0, 1fr) auto; }
  .lead-row select { grid-column: 1 / -1; }
  .phone-hook { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* V0.02 editor surface: a dense, predictable workbench rather than a decorative card grid. */
.editor-workspace { --track-label: 108px; display: grid; grid-template-columns: minmax(220px, .82fr) minmax(420px, 1.65fr) minmax(250px, .95fr); gap: 12px; align-items: start; margin-top: 12px; }
.editor-workspace > .panel { min-width: 0; }
.editor-mobile-tabs { display: none; }
.editor-panel-body { padding: 10px; }
.asset-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 9px; }
.asset-toolbar select { min-width: 0; min-height: 30px; flex: 1 1 125px; padding: 5px 7px; font-size: 10px; }
.asset-toolbar .button { flex: 0 0 auto; }
.editor-asset-library { display: grid; gap: 7px; max-height: 560px; overflow: auto; }
.asset-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 31px; margin-top: 9px; color: var(--faint); font-size: 8px; }
.asset-pagination .button { min-height: 28px; padding: 4px 8px; font-size: 8px; }
.editor-asset-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 7px; min-width: 0; padding: 6px; border: 1px solid var(--line); background: #0c0c0c; }
.editor-asset-card:hover, .editor-asset-card.is-selected { border-color: var(--text); }
.asset-thumb { width: 64px; height: 58px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: #070707; color: var(--faint); font-size: 8px; }
.asset-thumb img, .asset-thumb video { width: 100%; height: 100%; object-fit: cover; }
.asset-thumb audio { width: 58px; height: 30px; }
.asset-preview-trigger { position: relative; width: 100%; height: 100%; min-height: 0; overflow: hidden; padding: 0; border: 0; background: #070707; color: var(--text); }
.asset-preview-trigger img { display: block; width: 100%; height: 100%; object-fit: cover; }
.asset-preview-trigger::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .12); }
.asset-preview-trigger:hover::after, .asset-preview-trigger:focus-visible::after { background: rgba(0, 0, 0, .38); }
.asset-preview-trigger:focus-visible { outline: 1px solid var(--text); outline-offset: -1px; }
.asset-preview-icon { position: absolute; z-index: 1; left: 50%; top: 50%; width: 28px; height: 28px; transform: translate(-50%, -50%); border: 1px solid rgba(243, 243, 239, .8); background: rgba(0, 0, 0, .72); }
.asset-preview-trigger[data-preview-kind="video"] .asset-preview-icon::before, .asset-preview-trigger[data-preview-kind="audio"] .asset-preview-icon::before { content: ""; position: absolute; left: 10px; top: 7px; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid var(--text); }
.asset-preview-trigger[data-preview-kind="image"] .asset-preview-icon::before, .asset-preview-trigger[data-preview-kind="image"] .asset-preview-icon::after { content: ""; position: absolute; left: 7px; top: 13px; width: 12px; height: 1px; background: var(--text); }
.asset-preview-trigger[data-preview-kind="image"] .asset-preview-icon::after { transform: rotate(90deg); }
.asset-loaded-media { display: block; max-width: 100%; }
.asset-card-body { min-width: 0; }
.asset-card-name { overflow: hidden; color: var(--soft); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.asset-card-meta { margin-top: 4px; color: var(--muted); font-size: 8px; }
.asset-card-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.asset-card-actions .button { min-height: 24px; padding: 3px 5px; font-size: 8px; }
.asset-vision { margin-top: 6px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.asset-vision strong { color: var(--soft); font-weight: 400; }
.editor-toolbar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.toolbar-group { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.dirty-indicator { color: var(--muted); font-size: 9px; }
.dirty-indicator.is-dirty { color: var(--text); }
.timeline-scroll { max-height: 405px; overflow: auto; padding: 8px 10px 10px; background: #0a0a0a; }
.timeline-ruler, .timeline-row { min-width: 760px; }
.timeline-ruler { position: relative; width: calc(100% - var(--track-label)); min-width: calc(760px - var(--track-label)); height: 24px; margin-left: var(--track-label); border-bottom: 1px solid var(--line-strong); box-sizing: border-box; }
.timeline-mark { position: absolute; top: 0; bottom: -1px; border-left: 1px solid var(--line); color: var(--muted); font-size: 8px; transform: translateX(-1px); }
.timeline-mark span { position: absolute; top: 2px; left: 3px; white-space: nowrap; }
.timeline-row { display: grid; grid-template-columns: var(--track-label) minmax(0, 1fr); align-items: stretch; min-height: 59px; border-bottom: 1px solid #242424; }
.timeline-track-label { display: grid; grid-template-columns: 1fr auto; gap: 4px; align-items: center; padding: 6px 7px 6px 0; color: var(--soft); font-size: 9px; }
.timeline-track-label small { display: block; color: var(--muted); font-size: 8px; }
.track-actions { display: flex; gap: 2px; }
.track-action { width: 21px; height: 20px; padding: 0; border: 1px solid var(--line); background: #0c0c0c; color: var(--muted); font-size: 8px; }
.track-action:hover, .track-action.is-active { border-color: var(--line-strong); color: var(--text); }
.timeline-lane { position: relative; min-width: 0; min-height: 58px; background-color: #0c0c0c; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc(10% - 1px), #202020 calc(10% - 1px), #202020 10%); }
.timeline-item { position: absolute; top: 9px; min-width: 18px; height: 39px; display: flex; align-items: center; overflow: hidden; padding: 0 10px; border: 1px solid #70706b; background: #262623; color: var(--text); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; touch-action: none; user-select: none; }
.timeline-item.video { background: #242a2a; border-color: #747c78; }
.timeline-item.background { background: #26302c; border-color: #728c7b; }
.timeline-item.audio { background: #2a2520; border-color: #7a7063; }
.timeline-item.voice { background: #26302a; border-color: #708774; }
.timeline-item.subtitle { background: #25272c; border-color: #777c8a; }
.timeline-item.overlay { background: #2d242b; border-color: #866e7c; }
.timeline-item:hover, .timeline-item.is-selected { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.timeline-item .item-caption { overflow: hidden; text-overflow: ellipsis; }
.timeline-item .item-time { margin-left: auto; padding-left: 5px; color: var(--muted); font-size: 8px; }
.timeline-item .item-handle { position: absolute; top: 0; bottom: 0; z-index: 2; width: 8px; background: transparent; cursor: ew-resize; touch-action: none; }
.timeline-item .item-handle::after { content: ""; position: absolute; top: 10px; bottom: 10px; width: 1px; background: var(--soft); opacity: .65; }
.timeline-item .item-handle-left { left: 0; }
.timeline-item .item-handle-left::after { left: 3px; }
.timeline-item .item-handle-right { right: 0; }
.timeline-item .item-handle-right::after { right: 3px; }
.timeline-item .item-handle:hover::after { opacity: 1; background: var(--text); }
.playhead { position: absolute; top: 0; bottom: 0; width: 1px; z-index: 5; background: var(--text); pointer-events: none; }
.playhead::before { content: ""; position: absolute; top: -4px; left: -4px; width: 8px; height: 8px; background: var(--text); }
.timeline-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; color: var(--muted); font-size: 8px; }
.timeline-foot span:last-child { color: var(--faint); text-align: right; }
.agent-workflow-result { margin: 0 10px 8px; padding: 9px 10px; border-top: 1px solid #526d5b; border-bottom: 1px solid var(--line); background: #101712; color: var(--muted); font-size: 9px; line-height: 1.55; }
.agent-workflow-result strong { color: #d8f0de; font-weight: 400; }
.agent-workflow-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.agent-workflow-head span { color: #9bc5a8; }
.agent-workflow-selection { margin-top: 6px; color: var(--soft); }
.agent-workflow-steps { display: grid; gap: 3px; margin-top: 7px; }
.agent-workflow-step { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 7px; padding-top: 3px; border-top: 1px solid #233026; }
.agent-workflow-step b { color: #a9c9b1; font-weight: 400; }
.agent-workflow-step.is-failed b { color: var(--danger); }
.agent-workflow-actions { display: flex; justify-content: flex-end; margin-top: 8px; padding-top: 7px; border-top: 1px solid #233026; }
.render-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.render-result strong { color: var(--soft); font-weight: 400; }
.render-result a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.qc-result { padding: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.qc-result.is-stale { opacity: .62; }
.qc-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.qc-head strong { color: var(--text); font-size: 11px; font-weight: 400; }
.qc-head span { color: var(--soft); }
.qc-checks { display: grid; gap: 5px; }
.qc-check { display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; gap: 6px; align-items: start; padding: 6px 0; border-top: 1px solid #252525; }
.qc-check:first-child { border-top: 0; }
.qc-mark { color: var(--soft); text-align: center; }
.qc-check.is-failed .qc-mark { color: var(--danger); }
.qc-check-main { min-width: 0; }
.qc-check-main strong { display: block; overflow-wrap: anywhere; color: var(--soft); font-weight: 400; }
.qc-check-main small { display: block; margin-top: 3px; color: var(--faint); line-height: 1.5; overflow-wrap: anywhere; }
.qc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.qc-actions .button { min-height: 24px; padding: 3px 5px; font-size: 8px; }
.inspector-empty { min-height: 112px; display: grid; place-content: center; text-align: center; }
.inspector-empty strong { color: var(--soft); font-size: 11px; font-weight: 400; }
.inspector-empty p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.inspector-form { padding-top: 10px; }
.inspector-title, .inspector-subhead { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 10px; }
.inspector-title strong, .inspector-subhead strong { color: var(--text); font-size: 11px; font-weight: 400; }
.inspector-title span, .inspector-subhead span { color: var(--muted); font-size: 8px; }
.inspector-form textarea { min-height: 58px; margin-bottom: 10px; }
.inspector-form > select { min-height: 32px; margin-bottom: 10px; padding: 6px; font-size: 10px; }
.inspector-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.inspector-grid label, .tts-mini-grid label, .tts-settings-grid label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.inspector-grid input, .inspector-form > input, .tts-mini-grid input, .tts-settings-grid input, .tts-mini-grid select, .tts-settings-grid select { min-height: 30px; padding: 5px 6px; font-size: 10px; }
.inspector-audio { width: 100%; height: 30px; margin: 9px 0 0; }
.inspector-audio-fields { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.inspector-chroma-fields { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.inspector-chroma-fields input[type="color"] { width: 100%; min-height: 30px; padding: 2px; }
.inspector-chroma-fields input[type="text"] { min-height: 30px; padding: 5px 6px; font-size: 10px; }
.audio-role-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(112px, .8fr); gap: 7px; align-items: end; }
.audio-role-grid > label:not(.audio-check), .audio-mix-grid label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; }
.audio-role-grid select, .audio-mix-grid input { min-height: 30px; padding: 5px 6px; font-size: 10px; }
.audio-check { display: flex; align-items: center; gap: 7px; min-height: 30px; color: var(--muted); font-size: 8px; cursor: pointer; }
.audio-check input { width: 14px; height: 14px; flex: 0 0 auto; accent-color: #d6d6d0; }
.audio-check-wide { margin: 6px 0; }
.audio-fade-grid { margin-top: 7px; }
.audio-envelope-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; color: var(--muted); font-size: 8px; }
.audio-envelope-head .button { min-height: 25px; padding: 3px 6px; font-size: 8px; }
.audio-envelope-points { display: grid; gap: 5px; margin-top: 6px; }
.audio-envelope-empty { padding: 7px 0; color: var(--faint); font-size: 8px; }
.audio-envelope-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 27px; gap: 5px; align-items: end; }
.audio-envelope-row label { display: grid; gap: 3px; min-width: 0; color: var(--faint); font-size: 7px; }
.audio-envelope-row input { width: 100%; min-height: 28px; padding: 4px 5px; font-size: 9px; }
.audio-envelope-remove { width: 27px; min-height: 28px; padding: 0; font-size: 15px; line-height: 1; }
.inspector-audio-mix { margin: 12px; padding-top: 11px; border-top: 1px solid var(--line-strong); }
.audio-mix-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 7px 0; }
.audio-mix-range { grid-template-columns: 42px minmax(0, 1fr) 42px; }
.inspector-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-top: 13px; }
.inspector-actions .button { margin-top: 0; }
.inspector-tts { margin: 12px; padding-top: 11px; border-top: 1px solid var(--line-strong); }
.inspector-tts textarea { min-height: 58px; }
.tts-mini-grid, .tts-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 82px; gap: 7px; margin: 8px 0; }
.range-line { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 7px; align-items: center; margin: 7px 0; color: var(--muted); font-size: 9px; }
.range-line input[type="range"] { width: 100%; min-height: 17px; accent-color: #d6d6d0; }
.range-line output { color: var(--soft); font-size: 9px; text-align: right; }
.tts-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.tts-actions .button { min-height: 31px; padding: 5px 6px; font-size: 9px; }
.preview-media, .preview-layers, .preview-text-layers { position: absolute; inset: 0; overflow: hidden; }
.preview-media { background: #070707; }
.preview-layer { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; will-change: transform, opacity; }
.preview-web-scene { --scene-accent: #42b8b2; --scene-accent-alt: #f04b3a; --scene-ink: #0b0c0c; --scene-paper: #f2f0e8; display: block; overflow: hidden; color: var(--scene-paper); background: var(--scene-ink); font-family: "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }
.web-scene-frame { position: absolute; inset: 2.6%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; padding: 7.5% 6%; border: 1px solid #3b3d3c; background: #0b0c0c; }
.web-scene-frame header > span { display: block; overflow: hidden; color: var(--scene-accent); font-size: 10px; font-weight: 700; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.web-scene-frame header > i { display: block; width: 18%; height: 3px; margin: 9px 0 18px; background: var(--scene-accent-alt); }
.web-scene-frame h2 { display: -webkit-box; max-height: 92px; margin: 0; overflow: hidden; color: #f2f0e8; font-size: 28px; font-weight: 800; line-height: 1.12; letter-spacing: 0; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.web-scene-artwork { position: relative; min-height: 0; margin: 18px 0 14px; overflow: hidden; }
.web-scene-frame footer { min-width: 0; }
.web-scene-frame footer p { display: -webkit-box; min-height: 28px; max-height: 40px; margin: 0 0 9px; overflow: hidden; color: #8b8f8c; font-size: 9px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.web-scene-frame footer b { display: block; color: var(--scene-accent-alt); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 8px; font-weight: 500; text-align: right; }
.web-info-card { position: absolute; inset: 5% 0 3%; display: grid; align-content: start; overflow: hidden; padding: 15% 10%; border-radius: 3px; background: #f2f0e8; color: #121313; }
.web-info-card small { color: #f04b3a; font-size: 8px; font-weight: 800; }
.web-info-card p { display: -webkit-box; max-height: 145px; margin: 14px 0 22px; overflow: hidden; font-size: 17px; font-weight: 700; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow-wrap: anywhere; }
.web-info-card span { justify-self: start; padding: 9px 14px; border-radius: 2px; background: #121313; color: #f2f0e8; font-size: 9px; font-weight: 700; }
.web-chart { position: absolute; inset: 8% 2% 5%; display: flex; align-items: flex-end; justify-content: space-around; gap: 7px; padding: 24px 8px 0; border-bottom: 1px solid #6c706e; }
.web-chart-column { position: relative; display: flex; align-items: stretch; align-self: stretch; justify-content: flex-end; flex: 1; flex-direction: column; min-width: 0; text-align: center; }
.web-chart-column span { margin-bottom: 5px; color: #f2f0e8; font-size: 9px; }
.web-chart-column i { display: block; width: 100%; min-height: 8%; max-height: 86%; background: var(--scene-accent); }
.web-chart-column i[data-tone="1"] { background: var(--scene-accent-alt); }
.web-mind { position: absolute; inset: 4% 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; }
.web-mind > strong { align-self: center; justify-self: center; max-width: 80%; padding: 12px 18px; overflow: hidden; border-radius: 3px; background: #f2f0e8; color: #0b0c0c; font-size: 13px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.web-mind > div { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: center; }
.web-mind > div::before { content: ""; position: absolute; inset: 50% 16% auto; border-top: 1px solid #555a57; }
.web-mind span { z-index: 1; display: grid; place-items: center; min-height: 48px; overflow: hidden; padding: 7px; border: 1px solid var(--scene-accent); border-radius: 3px; background: #171919; color: #f2f0e8; font-size: 10px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
.web-path { position: absolute; inset: 5% 0; width: 100%; height: 90%; overflow: visible; }
.web-path path, .web-path polyline { fill: none; stroke: var(--scene-accent); stroke-width: 14; stroke-linecap: square; }
.web-path polyline { stroke: #f2f0e8; stroke-width: 12; }
.web-path circle:first-of-type { fill: var(--scene-accent-alt); }
.web-path circle:last-of-type { fill: var(--scene-paper); }
.web-scene-cat-meme { padding: 1px; border: 0; background: var(--scene-ink); }
.web-scene-cat-meme::before { content: "!?"; position: absolute; z-index: 1; top: 2.5%; right: 5%; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; background: var(--scene-accent-alt); color: var(--scene-paper); font-size: 19px; font-weight: 900; transform: rotate(9deg); }
.web-scene-cat-meme header > span { color: var(--scene-accent); font-weight: 900; }
.web-scene-cat-meme header > i { width: 28%; height: 5px; background: var(--scene-accent-alt); transform: rotate(-2deg); }
.web-scene-cat-meme h2 { color: var(--scene-paper); font-weight: 900; }
.web-scene-cat-meme { border: 4px solid var(--scene-accent); background: var(--scene-ink); }
.web-scene-cat-meme .web-info-card { border: 5px solid var(--scene-accent-alt); border-radius: 10px; background: var(--scene-accent); color: var(--scene-ink); transform: rotate(-1deg); }
.web-scene-cat-meme .web-info-card small { color: var(--scene-ink); font-weight: 900; }
.web-scene-cat-meme .web-info-card span { border-radius: 8px; background: var(--scene-accent-alt); color: var(--scene-paper); font-weight: 900; transform: rotate(2deg); }
.web-scene-cat-meme .web-chart { border-bottom: 4px solid var(--scene-accent-alt); transform: rotate(-1deg); }
.web-scene-cat-meme .web-chart-column i { border: 2px solid var(--scene-paper); }
.web-scene-cat-meme .web-mind > strong { border: 4px solid var(--scene-accent-alt); border-radius: 10px; background: var(--scene-accent); color: var(--scene-ink); font-weight: 900; transform: rotate(-2deg); }
.web-scene-cat-meme .web-mind span { border: 3px solid var(--scene-paper); border-radius: 10px; background: var(--scene-accent); color: var(--scene-ink); font-weight: 900; }
.web-scene-cat-meme .web-mind span:nth-child(2n) { background: var(--scene-accent-alt); }
.web-scene-cat-meme .web-path path { stroke-width: 22; }
.web-scene-cat-meme .web-path polyline { stroke: var(--scene-paper); stroke-width: 16; }
.web-scene-cat-meme .web-scene-frame footer b { color: var(--scene-accent); font-weight: 900; }
.web-scene-cat-meme.web-scene-variant-sticker-burst .web-scene-artwork { transform: rotate(-1deg); }
.web-scene-cat-meme.web-scene-variant-sticker-burst .web-scene-artwork::after { content: "砰!"; position: absolute; z-index: 3; right: 2%; bottom: 4%; display: grid; width: 54px; height: 54px; place-items: center; clip-path: polygon(50% 0, 61% 27%, 85% 15%, 75% 40%, 100% 50%, 73% 61%, 86% 86%, 61% 75%, 50% 100%, 39% 74%, 14% 86%, 26% 61%, 0 50%, 27% 39%, 15% 14%, 40% 27%); background: var(--scene-accent-alt); color: var(--scene-paper); font-size: 13px; font-weight: 900; transform: rotate(10deg); }
.web-scene-cat-meme.web-scene-variant-chat-bubble::before { content: "笑死"; top: 8%; right: 7%; width: 62px; height: 38px; border: 3px solid var(--scene-ink); border-radius: 12px 12px 12px 2px; background: var(--scene-paper); color: var(--scene-ink); font-size: 13px; transform: rotate(-6deg); }
.web-scene-cat-meme.web-scene-variant-chat-bubble .web-scene-artwork { margin: 13px 1% 24px; padding: 7%; overflow: visible; border: 4px solid var(--scene-paper); border-radius: 18px; background: var(--scene-ink); transform: translateY(2%); }
.web-scene-cat-meme.web-scene-variant-chat-bubble .web-scene-artwork::after { content: ""; position: absolute; left: 12%; bottom: -19px; width: 28px; height: 28px; border-right: 4px solid var(--scene-paper); border-bottom: 4px solid var(--scene-paper); background: var(--scene-ink); transform: rotate(45deg); }
.web-scene-cat-meme.web-scene-variant-chat-bubble .web-info-card { inset: 3%; transform: rotate(1deg); }
.web-scene-cat-meme.web-scene-variant-split-panel .web-scene-artwork { box-sizing: border-box; margin-left: 41%; overflow: visible; border-left: 4px dashed var(--scene-accent); }
.web-scene-cat-meme.web-scene-variant-split-panel .web-scene-artwork::before { content: "本来以为\A VS\A 结果却是"; position: absolute; top: 5%; right: calc(100% + 10px); bottom: 5%; display: grid; width: 62%; place-items: center; padding: 10px 6px; background: var(--scene-accent-alt); color: var(--scene-paper); font-size: 12px; font-weight: 900; line-height: 2.7; text-align: center; white-space: pre; }
.web-scene-cat-meme.web-scene-variant-split-panel .web-chart, .web-scene-cat-meme.web-scene-variant-split-panel .web-info-card, .web-scene-cat-meme.web-scene-variant-split-panel .web-mind, .web-scene-cat-meme.web-scene-variant-split-panel .web-path { left: 7%; right: 0; transform: rotate(1deg); }
.web-scene-cat-meme.web-scene-variant-reaction-stamp::before { content: "离谱！"; top: 7%; width: 74px; height: 34px; border: 3px solid var(--scene-paper); border-radius: 8px; background: var(--scene-accent-alt); color: var(--scene-paper); font-size: 14px; transform: rotate(-11deg); }
.web-scene-cat-meme.web-scene-variant-reaction-stamp .web-scene-artwork { margin: 24px 3% 10px; border: 4px solid var(--scene-accent-alt); background: color-mix(in srgb, var(--scene-accent) 10%, var(--scene-ink)); transform: rotate(-2deg) scale(.94); }
.web-scene-cat-meme.web-scene-variant-reaction-stamp .web-scene-artwork::after { content: "反应过载"; position: absolute; z-index: 3; right: 3%; bottom: 4%; padding: 7px 11px; border: 3px solid var(--scene-paper); background: var(--scene-accent-alt); color: var(--scene-paper); font-size: 10px; font-weight: 900; transform: rotate(-8deg); }
.web-scene-cat-meme.web-scene-variant-reaction-stamp .web-mind > strong { transform: rotate(2deg); }
.web-scene-variant-offset-card .web-scene-artwork { margin: 22px 0 8px 4%; border: 3px solid var(--scene-accent); box-shadow: 12px 12px 0 color-mix(in srgb, var(--scene-accent-alt) 44%, transparent); transform: translate(2%, -2%) rotate(1deg); }
.web-scene-variant-offset-card .web-info-card { inset: 3%; }
.web-scene-variant-signal-line .web-scene-artwork { background-image: repeating-linear-gradient(0deg, transparent 0 32px, color-mix(in srgb, var(--scene-accent) 24%, transparent) 32px 33px); }
.web-scene-variant-signal-line .web-chart { border-bottom: 3px dashed var(--scene-accent-alt); }
.preview-text-layers { z-index: 2; pointer-events: none; }
.preview-text-layer { position: absolute; width: 88%; margin: 0; color: #fff; font-family: "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; font-weight: 700; line-height: 1.22; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: none; will-change: transform, opacity; }
.preview-placeholder { position: absolute; inset: 0; display: grid; place-content: center; gap: 7px; padding: 18px; color: var(--muted); text-align: center; background: repeating-linear-gradient(135deg, #090909 0, #090909 12px, #0d0d0d 12px, #0d0d0d 13px); }
.preview-placeholder span { color: var(--faint); font-size: 9px; }
.preview-placeholder strong { color: var(--soft); font-size: 12px; font-weight: 400; }
.preview-placeholder small { color: var(--faint); font-size: 8px; }
.preview-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 8px 12px 12px; border-top: 1px solid var(--line); }
.preview-time { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 180px; color: var(--muted); font-size: 9px; }
.preview-time input[type="range"] { min-width: 80px; flex: 1; accent-color: #d6d6d0; }
.preview-time output { width: 42px; color: var(--soft); text-align: right; }
.preview-hint { max-width: 130px; overflow: hidden; color: var(--faint); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.preview-source-label { min-height: 27px; padding: 0 12px 10px; overflow: hidden; color: var(--faint); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.asset-list { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.asset-row { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 9px; }
.asset-row .asset-preview { width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: #080808; }
.asset-preview img, .asset-preview video { width: 100%; height: 100%; object-fit: cover; }
.asset-preview audio { width: 92%; height: 30px; }
.asset-preview .asset-loaded-media:is(img, video) { width: 100%; height: 100%; object-fit: contain; }
.asset-preview .asset-loaded-media:is(audio) { width: 92%; height: 30px; }
.asset-row-head { display: flex; justify-content: space-between; gap: 8px; }
.asset-row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.asset-row-actions .button { min-height: 26px; padding: 4px 6px; font-size: 8px; }
.asset-row .asset-vision { border-top: 1px solid var(--line); padding-top: 6px; }
.tts-settings-grid { grid-template-columns: minmax(0, 1fr) 92px; }

@media (max-width: 1200px) and (min-width: 761px) {
  .editor-workspace { grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); }
  .editor-inspector-panel { grid-column: 1 / -1; }
  .inspector-form { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; }
  .inspector-form .inspector-title, .inspector-form .section-label, .inspector-form textarea, .inspector-form > select, .inspector-form .inspector-grid, .inspector-form .inspector-audio-fields, .inspector-form .inspector-audio, .inspector-form .inspector-actions { grid-column: 1 / -1; }
  .inspector-tts { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .editor-workspace { display: block; margin-top: 10px; }
  .editor-mobile-tabs { display: flex; gap: 5px; margin-bottom: 7px; overflow-x: auto; }
  .editor-tab { flex: 1 0 0; min-height: 44px; border: 1px solid var(--line); background: #0d0d0d; color: var(--muted); font-size: 10px; }
  .editor-tab.is-active { border-color: var(--text); color: var(--text); }
  .editor-workspace > .panel { display: none; margin-bottom: 9px; }
  .editor-workspace > .panel.is-mobile-active { display: block; }
  .editor-asset-library { max-height: none; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-asset-card { grid-template-columns: 1fr; }
  .asset-thumb { width: 100%; height: 82px; }
  .asset-thumb audio { width: 88%; }
  .timeline-scroll { max-height: 360px; padding-left: 7px; padding-right: 7px; }
  .timeline-foot { display: block; line-height: 1.6; }
  .timeline-foot span { display: block; }
  .timeline-foot span:last-child { margin-top: 3px; text-align: left; }
  .inspector-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inspector-tts { margin: 10px; }
  .asset-list { grid-template-columns: 1fr; }
  .preview-controls { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 420px) {
  .editor-asset-library { grid-template-columns: 1fr; }
  .editor-asset-card { grid-template-columns: 70px minmax(0, 1fr); }
  .asset-thumb { width: 70px; height: 64px; }
  .inspector-grid { gap: 6px; }
  .audio-role-grid { grid-template-columns: 1fr; }
  .audio-mix-grid { grid-template-columns: 1fr 1fr; }
}
