@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --ink: #111923;
  --ink-soft: #202b37;
  --paper: #f1f2ed;
  --paper-pure: #fafbf7;
  --line: #d9ddd7;
  --muted: #899199;
  --muted-dark: #58636d;
  --acid: #c9f36a;
  --acid-dark: #a6ce42;
  --coral: #f18873;
  --white: #fff;
  --mono: 'DM Mono', 'Cascadia Code', Consolas, monospace;
  --sans: 'Manrope', 'Microsoft YaHei UI', 'PingFang SC', sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid #72a834; outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-shell { min-height: 100vh; }
.rail { position: fixed; inset: 0 auto 0 0; z-index: 5; display: flex; width: 206px; flex-direction: column; padding: 26px 17px 18px; color: #e9eee8; background: var(--ink); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px 36px; color: inherit; text-decoration: none; }
.brand-mark { display: flex; width: 31px; height: 31px; align-items: center; justify-content: center; gap: 3px; border-radius: 9px; background: var(--acid); }
.brand-mark i { width: 3px; height: 14px; background: var(--ink); border-radius: 2px; }
.brand-mark i:nth-child(2) { height: 20px; }
.brand-name { display: flex; flex-direction: column; font-size: 16px; font-weight: 800; letter-spacing: .03em; line-height: 1.08; }
.brand-name span { margin-top: 4px; color: #86919a; font: 8px var(--mono); letter-spacing: .12em; }
.rail-nav { display: grid; gap: 5px; }
.rail-link { display: flex; width: 100%; align-items: center; gap: 13px; padding: 12px 13px; color: #a7b0b7; border: 0; border-radius: 8px; background: transparent; text-align: left; font-size: 13px; cursor: pointer; transition: color .18s ease, background .18s ease; }
.rail-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.rail-link:hover { color: #fff; background: #1b2732; }
.rail-link.is-active { color: var(--acid); background: #202b31; }
.rail-bottom { display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 11px 8px 0; color: #909ba4; font-size: 11px; border-top: 1px solid #2b343d; }
.rail-dot, .status-pulse { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #66727c; }
.rail-dot.is-online { background: var(--acid); box-shadow: 0 0 0 3px #c9f36a20; }
.icon-button { display: inline-grid; width: 34px; height: 34px; place-items: center; padding: 0; color: inherit; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; transition: border .18s ease, background .18s ease; }
.icon-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { border-color: #9da69c; background: #ffffff0c; }
.icon-button.small { width: 27px; height: 27px; margin-left: auto; border-color: #3b454e; }
.icon-button.small svg { width: 14px; height: 14px; }

.main-area { min-height: 100vh; margin-left: 206px; }
.topbar { position: sticky; top: 0; z-index: 4; display: flex; height: 57px; align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid #dfe2dc; background: #f1f2edee; backdrop-filter: blur(14px); }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #7d878f; font-size: 11px; }
.breadcrumb strong { color: #29343d; font-weight: 600; }
.crumb-slash { color: #c3c8c2; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.workspace-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 9px; color: #5e686f; border: 1px solid #dfe2dc; border-radius: 99px; font-size: 10px; }
.status-pulse { width: 6px; height: 6px; flex-basis: 6px; background: var(--acid-dark); }
.avatar { display: grid; width: 28px; height: 28px; place-items: center; color: #34404a; border-radius: 50%; background: #dce4d4; font-size: 11px; font-weight: 700; }
.page-wrap { width: min(1180px, calc(100% - 84px)); margin: 0 auto; }

.intro-block { display: grid; min-height: 281px; grid-template-columns: minmax(0, 1fr) 337px; align-items: center; gap: 66px; padding: 43px 0 34px; }
.intro-copy { max-width: 620px; }
.kicker { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; color: #66717a; font-size: 11px; }
.kicker-line { width: 19px; height: 2px; background: #9bbd51; }
.intro-copy h1 { margin: 0; color: #151e26; font-size: clamp(35px, 4vw, 49px); font-weight: 800; letter-spacing: -.065em; line-height: 1.18; }
.intro-copy h1 span { color: #4d5e66; }
.intro-copy p { max-width: 490px; margin: 14px 0 23px; color: #717b82; font-size: 12px; line-height: 1.9; }
.intro-meta { display: flex; align-items: center; gap: 13px; color: #7d878e; font-size: 10px; }
.intro-meta b { margin-right: 5px; color: #323e45; font: 10px var(--mono); }
.intro-meta i { width: 3px; height: 3px; border-radius: 50%; background: #aeb5ad; }

.frame-art { position: relative; overflow: hidden; height: 202px; padding: 12px 14px 10px; color: #c6ceca; border: 1px solid #34404a; border-radius: 5px; background: #1c2731; box-shadow: 8px 9px 0 #daddd6; transform: rotate(1.2deg); }
.frame-top, .frame-bottom { display: flex; height: 18px; align-items: center; justify-content: space-between; color: #7e8a90; font: 8px var(--mono); letter-spacing: .08em; }
.frame-scene { position: relative; overflow: hidden; height: 142px; margin: 3px 0; border: 1px solid #52606a; background: radial-gradient(ellipse at 68% 55%, #35484a 0, #25363d 19%, #202f39 43%, #17232d 78%); }
.frame-scene::before, .frame-scene::after { position: absolute; top: 0; bottom: 0; width: 8px; content: ''; background: repeating-linear-gradient(to bottom, #80908b 0 4px, transparent 4px 10px); opacity: .44; }
.frame-scene::before { left: 5px; }
.frame-scene::after { right: 5px; }
.scene-orbit { position: absolute; top: 50%; left: 56%; width: 143px; height: 143px; border: 1px solid #bbd95855; border-radius: 50%; transform: translate(-50%, -50%); }
.orbit-two { width: 98px; height: 98px; border-color: #c9f36a88; }
.scene-slice { position: absolute; top: -25px; left: 49%; width: 1px; height: 200px; background: #b5d35466; transform: rotate(31deg); }
.slice-b { left: 72%; background: #f1887344; transform: rotate(-26deg); }
.scene-word { position: absolute; z-index: 1; color: #eef1df; font-size: 30px; font-weight: 800; letter-spacing: -.08em; }
.word-one { top: 25px; left: 49px; }
.word-two { top: 63px; left: 92px; color: var(--acid); }
.scene-sub { position: absolute; right: 22px; bottom: 18px; color: #b5c0b9; font-size: 8px; letter-spacing: .1em; }
.scene-stamp { position: absolute; top: 13px; right: 20px; display: grid; width: 30px; height: 30px; place-items: center; color: var(--acid); border: 1px solid #c9f36a80; border-radius: 50%; font: 7px/1.2 var(--mono); text-align: center; transform: rotate(12deg); }
.waveform { display: flex; height: 12px; align-items: center; gap: 2px; }
.waveform i { width: 2px; height: 3px; background: var(--acid-dark); }
.waveform i:nth-child(3n) { height: 9px; }
.waveform i:nth-child(4n) { height: 6px; }

.step-track { display: flex; align-items: center; gap: 13px; padding: 13px 0 15px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step { display: inline-flex; align-items: center; gap: 8px; color: #9aa19d; font-size: 10px; transition: color .2s ease; }
.step-mark { display: grid; width: 21px; height: 21px; place-items: center; border: 1px solid #d0d5cf; border-radius: 50%; font: 9px var(--mono); }
.step.is-current { color: #202c33; font-weight: 700; }
.step.is-current .step-mark { color: #18211e; border-color: var(--acid); background: var(--acid); }
.step.is-done .step-mark { color: var(--ink); border-color: var(--acid-dark); background: #dff3b0; }
.step-rule { width: 35px; height: 1px; background: #d8ddd6; }

.stage { padding: 33px 0 54px; }
.stage-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-index { display: block; margin-bottom: 8px; color: #8b9595; font: 9px var(--mono); letter-spacing: .1em; }
.stage-heading h2 { margin: 0; color: #1e2931; font-size: 22px; font-weight: 700; letter-spacing: -.045em; }
.quiet-note { padding-bottom: 3px; color: #909a9b; font-size: 10px; }
.input-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(245px, .78fr); gap: 18px; align-items: stretch; }
.manuscript-panel, .settings-panel { border: 1px solid #d9ddd7; border-radius: 8px; background: var(--paper-pure); }
.manuscript-panel { min-width: 0; padding: 0 20px 14px; }
.panel-toolbar { display: flex; height: 51px; align-items: center; justify-content: space-between; border-bottom: 1px solid #e6e8e2; }
.tab-switch { display: flex; height: 100%; gap: 19px; }
.tab { position: relative; padding: 0 1px; color: #8b9497; border: 0; background: transparent; font-size: 11px; cursor: pointer; }
.tab.is-selected { color: #27323a; font-weight: 700; }
.tab.is-selected::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ''; background: #9fca42; }
.file-limit { color: #a1a9a5; font: 8px var(--mono); letter-spacing: .04em; }
.paste-pane { padding-top: 12px; }
#sourceText { display: block; width: 100%; height: 166px; resize: vertical; padding: 8px 1px; color: #313e43; border: 0; outline: 0; background: transparent; font-size: 12px; line-height: 1.9; }
#sourceText::placeholder { color: #b3bbb6; }
#sourceText:focus-visible { outline: 0; }
.textarea-foot { display: flex; align-items: center; justify-content: space-between; color: #a0a8a2; font-size: 9px; }
.textarea-foot b { color: #58665f; font: 9px var(--mono); }
.upload-pane { min-height: 213px; padding: 17px 0 8px; }
.dropzone { display: flex; width: 100%; min-height: 159px; align-items: center; justify-content: center; flex-direction: column; gap: 10px; color: #48555b; border: 1px dashed #cbd2c8; border-radius: 6px; background: #f7f8f3; cursor: pointer; transition: border-color .16s ease, background .16s ease; }
.dropzone.is-dragover, .dropzone:hover { border-color: #9ab951; background: #f2f7e7; }
.upload-symbol { display: grid; width: 35px; height: 35px; place-items: center; color: #667d45; border-radius: 50%; background: #e5efd3; }
.upload-symbol svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.drop-title { font-size: 11px; }
.drop-title u { color: #4a6722; text-underline-offset: 3px; }
.drop-subtitle { color: #929b97; font-size: 9px; }
.file-info { margin-top: 9px; padding: 9px 10px; color: #58645c; border-radius: 5px; background: #eef3e6; font-size: 10px; }
.inline-error { margin-top: 9px; padding: 9px 10px; color: #904b41; border-left: 2px solid var(--coral); background: #fff0ed; font-size: 10px; line-height: 1.6; }
.manuscript-actions { display: flex; justify-content: space-between; margin-top: 13px; padding-top: 12px; border-top: 1px solid #eceee9; }
.text-button { padding: 3px 0; color: #7d888a; border: 0; background: transparent; font-size: 10px; cursor: pointer; transition: color .16s ease; }
.text-button:hover { color: #30434c; }
.sample-button { color: #586d35; }
.sample-button span { margin-left: 4px; font-size: 12px; }

.settings-panel { padding: 18px 17px 15px; }
.settings-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; color: #29363c; font-size: 12px; font-weight: 700; }
.settings-spark { color: #91b542; font-size: 14px; }
.field-label { display: block; margin-bottom: 8px; color: #657076; font-size: 10px; }
.field-label > span { margin-left: 4px; color: #a8afaa; font-weight: 400; }
.select-wrap { position: relative; }
.select-wrap select { width: 100%; height: 37px; appearance: none; padding: 0 31px 0 10px; color: #3d494f; border: 1px solid #e0e4de; border-radius: 5px; background: #fff; font-size: 10px; cursor: pointer; }
.select-wrap select:disabled { color: #9aa39d; cursor: wait; }
.select-wrap > svg { position: absolute; top: 11px; right: 10px; width: 14px; height: 14px; pointer-events: none; fill: none; stroke: #859087; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.field-note { margin-top: 6px; color: #9da6a1; font-size: 9px; line-height: 1.55; }
.field-note.is-error { color: #a15c50; }
.field-divider { height: 1px; margin: 15px 0; background: #e8ebe5; }
.count-control { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 18px; }
.count-control button { height: 31px; color: #748077; border: 1px solid #e2e6df; border-radius: 4px; background: #fff; font: 10px var(--mono); cursor: pointer; transition: border .15s ease, color .15s ease, background .15s ease; }
.count-control button:hover { border-color: #b8c79b; }
.count-control button.is-active { color: #283325; border-color: #c9f36a; background: #e9f5d4; font-weight: 700; }
.direction-label { margin-bottom: 8px; }
.primary-button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 13px; padding: 0 15px; color: #172018; border: 0; border-radius: 5px; background: var(--acid); font-size: 11px; font-weight: 700; cursor: pointer; transition: background .17s ease, transform .17s ease, opacity .17s ease; }
.primary-button:hover:not(:disabled) { background: #d5f98a; transform: translateY(-1px); }
.primary-button:disabled { color: #75816c; background: #e0e7d3; cursor: not-allowed; }
.primary-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.generate-button { width: 100%; margin-top: 18px; }
.privacy-note { display: flex; align-items: flex-start; gap: 6px; margin: 11px 0 0; color: #9ca5a0; font-size: 8px; line-height: 1.55; }
.privacy-note svg { width: 12px; height: 12px; flex: 0 0 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.results-heading { align-items: flex-end; margin-bottom: 16px; }
.results-heading p { margin: 8px 0 0; color: #84908e; font-size: 10px; }
.results-toolbar { display: flex; height: 38px; align-items: center; justify-content: space-between; color: #8a9592; border-bottom: 1px solid var(--line); font: 9px var(--mono); }
.results-origin { display: flex; align-items: center; gap: 9px; min-width: 0; }
.skill-use-badge { overflow: hidden; padding: 4px 7px; color: #647745; border: 1px solid #e0e9d0; border-radius: 3px; background: #f4f8eb; font: 8px var(--sans); text-overflow: ellipsis; white-space: nowrap; }
.hook-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.hook-grid.is-detailed { grid-template-columns: minmax(0, 1fr); }
.hook-card { position: relative; display: flex; min-height: 162px; flex-direction: column; padding: 15px 16px 12px; border: 1px solid #dce1d8; border-radius: 7px; background: var(--paper-pure); cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.hook-card:hover { border-color: #aab99b; transform: translateY(-1px); }
.hook-card.is-selected { border-color: #9fca42; background: #fbfff4; box-shadow: inset 0 0 0 1px #c9f36a; }
.hook-top { display: flex; align-items: center; justify-content: space-between; }
.hook-number { color: #9ca59d; font: 9px var(--mono); }
.hook-tag { padding: 4px 7px; color: #6c7a57; border-radius: 3px; background: #eef3e4; font-size: 8px; }
.hook-copy { flex: 1; margin: 18px 0 16px; color: #29353b; font-size: 15px; font-weight: 600; letter-spacing: -.025em; line-height: 1.65; }
.hook-grid.is-detailed .hook-card { min-height: auto; text-align: left; }
.hook-grid.is-detailed .hook-copy { margin: 12px 0 15px; font-size: 11px; font-weight: 400; letter-spacing: 0; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.hook-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; color: #9aa39e; border-top: 1px solid #edf0e9; font-size: 8px; }
.hook-duration { display: flex; align-items: center; gap: 5px; font: 8px var(--mono); }
.hook-duration span { display: block; width: 17px; height: 2px; background: #c6df8d; }
.selection-mark { display: grid; width: 17px; height: 17px; place-items: center; color: transparent; border: 1px solid #d2d8ce; border-radius: 50%; font-size: 9px; }
.hook-card.is-selected .selection-mark { color: #24311d; border-color: var(--acid); background: var(--acid); }
.results-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.results-footer > span { color: #87918d; font-size: 10px; }
.continue-button { min-width: 173px; }

.video-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 17px; align-items: start; }
.video-left { display: grid; gap: 13px; }
.selected-script, .video-config, .video-right { border: 1px solid #d9ddd7; border-radius: 7px; background: var(--paper-pure); }
.selected-script { padding: 16px 18px 13px; }
.selected-label { display: flex; align-items: center; gap: 8px; color: #87918c; font-size: 9px; }
.mini-play { display: grid; width: 20px; height: 20px; place-items: center; padding-left: 1px; color: #25311d; border-radius: 50%; background: var(--acid); font-size: 7px; }
.selected-label > span:last-child { margin-left: auto; color: #6b7b54; }
.selected-script blockquote { overflow: auto; max-height: 360px; margin: 15px 0 16px; color: #28343b; font-size: 13px; font-weight: 500; letter-spacing: 0; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.selected-duration { display: flex; align-items: center; gap: 8px; color: #9da69f; font: 8px var(--mono); }
.duration-rule { display: block; width: 23px; height: 2px; background: var(--acid-dark); }
.video-config { padding: 17px 18px 15px; }
.config-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; color: #37434a; font-size: 11px; font-weight: 700; }
.soft-tag { padding: 4px 7px; color: #81906b; border-radius: 3px; background: #eff3e7; font-size: 8px; font-weight: 400; }
.config-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.style-label { margin-top: 16px; }
.style-input { width: 100%; min-height: 69px; resize: vertical; padding: 9px 10px; color: #4a565a; border: 1px solid #e0e4de; border-radius: 5px; background: #fff; font-size: 10px; line-height: 1.7; }
.style-input::placeholder { color: #b0b8b1; }
.style-note { margin-top: 5px; }
.video-right { padding: 16px; }
.preview-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; color: #5f6b6b; font-size: 10px; }
.preview-label span { color: #abb2ab; font: 8px var(--mono); }
.storyboard { padding: 9px; border: 1px solid #e1e5dd; border-radius: 5px; background: #f4f5ef; }
.storyboard-vignette { position: relative; display: grid; overflow: hidden; aspect-ratio: 9 / 7; place-items: center; color: #e6efdd; background: radial-gradient(ellipse at 67% 51%, #526361 0, #3b4b4b 23%, #25343d 54%, #1b2731 100%); transition: aspect-ratio .2s ease; }
.storyboard-vignette::before, .storyboard-vignette::after { position: absolute; inset: 0; content: ''; background: linear-gradient(115deg, transparent 30%, #b8d15317 30.5%, transparent 31%), linear-gradient(294deg, transparent 54%, #f1887314 54.5%, transparent 55%); }
.vignette-line { position: absolute; width: 1px; height: 160%; background: #cadb883f; transform: rotate(32deg); }
.line-one { left: 39%; }
.line-two { left: 69%; background: #e89c7940; transform: rotate(-28deg); }
.vignette-shape { width: 77px; height: 77px; border: 1px solid #c9f36a91; border-radius: 50%; box-shadow: 0 0 0 20px #c9f36a12, 0 0 0 40px #c9f36a09; }
.vignette-caption { position: absolute; bottom: 13px; left: 14px; color: #eef2dd; font-size: 11px; font-weight: 700; line-height: 1.5; }
.focus-corner { position: absolute; width: 8px; height: 8px; border-color: var(--acid); border-style: solid; }
.c1 { top: 9px; left: 9px; border-width: 1px 0 0 1px; }.c2 { top: 9px; right: 9px; border-width: 1px 1px 0 0; }.c3 { right: 9px; bottom: 9px; border-width: 0 1px 1px 0; }.c4 { bottom: 9px; left: 9px; border-width: 0 0 1px 1px; }
.storyboard-meta { display: flex; justify-content: space-between; margin-top: 8px; color: #99a39b; font: 8px var(--mono); }
.video-notice { display: flex; gap: 9px; margin-top: 14px; padding: 10px; color: #68754f; border: 1px solid #e1e9cf; border-radius: 5px; background: #f3f7e9; }
.notice-icon { display: grid; width: 16px; height: 16px; flex: 0 0 16px; place-items: center; color: #566f32; border: 1px solid #b1ca83; border-radius: 50%; font: 10px var(--mono); }
.video-notice strong { display: block; margin: 0 0 4px; font-size: 9px; }
.video-notice p { margin: 0; color: #89947c; font-size: 8px; line-height: 1.55; }
.video-submit { width: 100%; margin-top: 12px; }
.secondary-button { width: 100%; min-height: 36px; margin-top: 7px; color: #717d78; border: 1px solid #e0e4de; border-radius: 5px; background: transparent; font-size: 9px; cursor: pointer; }
.secondary-button:hover { color: #35434a; background: #f5f6f1; }
.video-task-status { margin-top: 11px; padding: 10px 11px; color: #5d6f49; border-left: 2px solid #a7c950; border-radius: 0 4px 4px 0; background: #f3f7e9; font-size: 9px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.generated-video { display: grid; gap: 7px; margin-top: 12px; }
.generated-video video { display: block; width: 100%; max-height: 360px; border-radius: 5px; background: #111923; }
.generated-video .secondary-button { display: grid; place-items: center; margin: 0; color: #4f623c; text-decoration: none; }
.uncertain-video-retry { margin-top: 10px; color: #875c3f; border-color: #e7d6c7; background: #fff8f0; line-height: 1.6; }

.admin-heading { align-items: center; margin-bottom: 20px; }
.admin-heading p { margin: 8px 0 0; color: #84908e; font-size: 10px; }
.admin-local-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; color: #657252; border: 1px solid #dce6ce; border-radius: 4px; background: #f5f8ed; font-size: 9px; white-space: nowrap; }
.admin-local-badge i, .channel-state i { display: block; width: 6px; height: 6px; border-radius: 50%; background: #b5c28e; }
.admin-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 14px; align-items: start; }
.admin-nav { display: grid; gap: 5px; padding: 7px; border: 1px solid #d9ddd7; border-radius: 7px; background: #e9ebe5; }
.admin-nav-item { display: flex; min-height: 58px; align-items: center; gap: 10px; padding: 8px; color: #75807d; border: 1px solid transparent; border-radius: 5px; background: transparent; text-align: left; cursor: pointer; }
.admin-nav-item:hover { color: #38444a; background: #f4f5f0; }
.admin-nav-item.is-active { color: #29353b; border-color: #dce1d7; background: var(--paper-pure); }
.admin-nav-mark { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; color: #334129; border-radius: 5px; background: #e5f1ce; font: 12px var(--mono); }
.admin-nav-mark.video-mark { color: #46525d; background: #e0e6e9; }
.admin-nav-mark.skill-mark { color: #735f34; background: #efe6d2; }
.admin-nav-item b, .admin-nav-item small { display: block; }
.admin-nav-item b { font-size: 10px; font-weight: 700; }
.admin-nav-item small { margin-top: 4px; color: #9aa29d; font: 8px var(--mono); }
.admin-nav-status { width: 6px; height: 6px; flex: 0 0 6px; margin-left: auto; border-radius: 50%; background: #c7ccc5; }
.admin-nav-status.is-set { background: #a4ca4d; box-shadow: 0 0 0 3px #c9f36a2c; }
.admin-content { min-width: 0; }
.channel-form { padding: 20px 21px 15px; border: 1px solid #d9ddd7; border-radius: 7px; background: var(--paper-pure); }
.channel-form-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding-bottom: 16px; border-bottom: 1px solid #e8ebe5; }
.channel-overline { color: #98a293; font: 8px var(--mono); letter-spacing: .08em; }
.channel-form-head h3 { margin: 5px 0 5px; color: #27333a; font-size: 17px; letter-spacing: -.04em; }
.channel-form-head p { max-width: 440px; margin: 0; color: #87918e; font-size: 9px; line-height: 1.7; }
.channel-state { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; padding: 6px 8px; color: #8b948d; border: 1px solid #e3e7df; border-radius: 99px; font-size: 8px; white-space: nowrap; }
.channel-state.is-set { color: #627548; border-color: #deebc7; background: #f5f9ed; }
.channel-state.is-set i { background: #a4ca4d; }
.admin-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px; padding: 18px 0 15px; }
.field-wide { grid-column: 1 / -1; }
.admin-field { display: block; min-width: 0; }
.admin-field > span { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; color: #626f72; font-size: 9px; }
.admin-field > span small { color: #a2aaa4; font-size: 8px; font-weight: 400; }
.admin-field input, .admin-field select { width: 100%; height: 35px; padding: 0 10px; color: #3f4c50; border: 1px solid #e0e4de; border-radius: 4px; background: #fff; font-size: 10px; }
.admin-field input::placeholder { color: #b1b9b2; }
.admin-field input[type="password"] { font-family: var(--mono); }
.admin-check { display: flex; align-items: center; gap: 7px; margin-top: -7px; color: #929b95; font-size: 8px; cursor: pointer; }
.admin-check input { width: 12px; height: 12px; margin: 0; accent-color: #a2c848; }
.model-field > span { margin-bottom: 6px; }
.model-picker-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.model-picker-row select { min-width: 0; height: 36px; padding: 0 9px; color: #3f4c50; border: 1px solid #e0e4de; border-radius: 4px; background: white; font-size: 9px; }
.check-channel { width: auto; min-height: 36px; margin: 0; padding: 0 10px; color: #5e6b64; font-size: 8px; white-space: nowrap; }
.admin-help { display: block; margin-top: 6px; color: #9da69f; font-size: 8px; line-height: 1.55; }
.channel-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 13px; border-top: 1px solid #e8ebe5; }
.channel-actions > span { color: #9ba39e; font-size: 8px; }
.channel-actions .primary-button { min-height: 37px; padding-inline: 12px; font-size: 9px; }
.channel-actions .primary-button svg { width: 14px; height: 14px; }
.channel-message { margin: 0 0 13px; padding: 9px 10px; color: #587043; border-left: 2px solid #acd14d; background: #f2f7e8; font-size: 9px; line-height: 1.6; }
.channel-message.is-error { color: #904b41; border-left-color: var(--coral); background: #fff0ed; }
.protocol-note { display: flex; gap: 9px; padding: 10px; color: #727d62; border: 1px solid #e4e9d8; border-radius: 4px; background: #f5f7ef; }
.protocol-icon { display: grid; width: 15px; height: 15px; flex: 0 0 15px; place-items: center; color: #6d824a; border: 1px solid #c3d0a4; border-radius: 50%; font: 9px var(--mono); }
.protocol-note p { margin: 0; font-size: 8px; line-height: 1.65; }
.protocol-note b { color: #596a42; }
.skill-upload-area { display: flex; align-items: center; gap: 12px; margin: 18px 0 16px; padding: 13px; border: 1px dashed #ccd4c7; border-radius: 5px; background: #f6f7f2; }
.skill-upload-mark { position: relative; display: grid; width: 35px; height: 40px; flex: 0 0 35px; place-items: center; color: #56633f; border: 1px solid #d9e3c8; border-radius: 4px; background: #edf3e2; font: 12px var(--mono); }
.skill-upload-mark span { position: absolute; right: -5px; bottom: -4px; display: grid; width: 14px; height: 14px; place-items: center; color: #25311c; border: 1px solid var(--paper-pure); border-radius: 50%; background: var(--acid); font: 10px var(--sans); }
.skill-upload-copy { display: grid; flex: 1; gap: 5px; }
.skill-upload-copy b { color: #4a5757; font-size: 10px; }
.skill-upload-copy span { color: #98a19a; font-size: 8px; }
.skill-upload-area .secondary-button { width: auto; min-height: 31px; margin: 0; padding: 0 10px; background: var(--paper-pure); font-size: 8px; }
.skill-current { margin: 0 0 16px; padding: 13px; border: 1px solid #e0e4dc; border-radius: 5px; background: #fff; }
.skill-current-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.skill-current-head h4 { margin: 4px 0; color: #354147; font-size: 12px; }
.skill-current-head p { margin: 0; color: #89938d; font-size: 8px; line-height: 1.6; }
.remove-skill { color: #a16458; white-space: nowrap; }
.skill-preview { overflow: hidden; margin-top: 12px; border: 1px solid #303c44; border-radius: 4px; background: #18232c; }
.skill-preview-bar { display: flex; height: 25px; align-items: center; gap: 4px; padding: 0 8px; color: #9ca9a8; border-bottom: 1px solid #34414a; font: 8px var(--mono); }
.skill-preview-bar > span { width: 5px; height: 5px; border-radius: 50%; background: #75827d; }
.skill-preview-bar > span:first-child { background: #d38b75; }.skill-preview-bar > span:nth-child(2) { background: #d6c479; }.skill-preview-bar > span:nth-child(3) { background: #9abf66; }
.skill-preview-bar b { margin-left: 5px; font-weight: 400; }
.skill-preview pre { overflow: auto; max-height: 220px; margin: 0; padding: 10px; color: #c6d0c7; font: 8px/1.7 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.skill-current-foot { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: #9ca69e; font-size: 8px; }
.skill-guidance { margin-top: 17px; }
.skill-run-block { display: flex; align-items: center; gap: 14px; margin: 17px 0 12px; padding: 13px; border: 1px solid #e1e6db; border-radius: 5px; background: #f6f7f2; }
.skill-run-copy { display: grid; flex: 1; gap: 4px; }
.skill-run-copy b { color: #4b5856; font-size: 10px; }
.skill-run-copy span, .skill-run-copy small { color: #919b94; font-size: 8px; line-height: 1.6; }
.skill-run-copy small { color: #a26e4f; }
.skill-run-block > .secondary-button { width: auto; min-height: 33px; margin: 0; padding: 0 11px; color: #526247; background: #fff; font-size: 8px; white-space: nowrap; }
.skill-run-block > .secondary-button:disabled { opacity: .6; cursor: wait; }
.skill-run-results { margin: 0 0 14px; padding: 12px; border: 1px solid #dfe5d9; border-radius: 5px; background: #fff; }
.skill-run-result-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; color: #485653; font-size: 9px; }
.skill-run-result-head span { color: #819260; font: 8px var(--mono); }
.skill-run-hook { padding: 8px 0; border-top: 1px solid #edf0ea; }
.skill-run-hook b { display: block; margin-bottom: 4px; color: #6f7f57; font-size: 8px; font-weight: 500; }
.skill-run-hook p { margin: 0; color: #3c484c; font-size: 10px; line-height: 1.65; }
#skillRunOutputText { overflow: auto; max-height: 420px; padding: 12px; color: #344149; border-radius: 4px; background: #f5f6f1; font-size: 10px; line-height: 1.8; overflow-wrap: anywhere; }
.rendered-markdown h3 { margin: 0 0 8px; color: #334147; font-size: 12px; font-weight: 700; line-height: 1.55; }
.rendered-markdown h4 { margin: 10px 0 5px; color: #546750; font-size: 10px; font-weight: 700; line-height: 1.55; }
.rendered-markdown p { margin: 0 0 9px; }
.rendered-markdown p:last-child { margin-bottom: 0; }
.rendered-markdown ul, .rendered-markdown ol { margin: 4px 0 10px; padding-left: 18px; }
.rendered-markdown li { margin: 3px 0; padding-left: 2px; }
.rendered-markdown code { padding: 1px 3px; color: #536341; border-radius: 2px; background: #edf2e4; font-family: var(--mono); font-size: .92em; }
.analysis-intro { margin-top: 14px; padding: 13px 15px; color: #45524f; border-left: 2px solid #aaca5a; border-radius: 0 4px 4px 0; background: #f8f9f4; font-size: 10px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.analysis-outro { border-left-color: #8599a2; background: #edf1f1; }
.raw-output-details { margin-top: 14px; border-top: 1px solid var(--line); color: #7b8781; font-size: 9px; }
.raw-output-details summary { width: fit-content; padding: 10px 0; cursor: pointer; }
.raw-output-details pre { overflow: auto; max-height: 480px; margin: 0 0 13px; padding: 14px; color: #c9d2ca; border-radius: 5px; background: #19252e; font: 9px/1.8 var(--sans); white-space: pre-wrap; overflow-wrap: anywhere; }

.page-footer { display: flex; align-items: center; justify-content: space-between; padding: 13px 0 19px; color: #9ca49d; border-top: 1px solid var(--line); font-size: 8px; }
.footer-divider { margin: 0 5px; color: #c4c9c2; }
.toast { position: fixed; right: 24px; bottom: 22px; z-index: 20; max-width: min(380px, calc(100vw - 32px)); padding: 11px 15px; color: #edf2e7; border: 1px solid #3c484e; border-radius: 6px; background: #1b2731; box-shadow: 0 8px 26px #12202a30; font-size: 11px; line-height: 1.6; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.guide-dialog { width: min(440px, calc(100% - 32px)); padding: 23px 25px 22px; color: var(--ink); border: 1px solid #dce1d8; border-radius: 9px; background: var(--paper-pure); box-shadow: 0 25px 80px #131d2660; }
.guide-dialog::backdrop { background: #10182091; backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; }
.dialog-head .section-index { margin-top: 10px; }
.dialog-head .icon-button { color: #7b8581; }
.guide-dialog h2 { margin: 9px 0 18px; font-size: 20px; letter-spacing: -.04em; }
.guide-dialog ol { display: grid; gap: 13px; margin: 0; padding: 0; list-style: none; counter-reset: guide; }
.guide-dialog li { display: grid; grid-template-columns: 95px 1fr; gap: 10px; counter-increment: guide; }
.guide-dialog li b { color: #38443f; font-size: 10px; }
.guide-dialog li span { color: #838e88; font-size: 9px; line-height: 1.7; }
.dialog-note { margin: 18px 0; padding: 10px; color: #788267; border-left: 2px solid #b5d65e; background: #f1f5e8; font-size: 9px; line-height: 1.7; }
.dialog-close { width: 100%; }

@media (min-width: 1500px) { .page-wrap { width: min(1240px, calc(100% - 100px)); } .intro-block { min-height: 308px; } }
@media (max-width: 1120px) { .admin-layout { grid-template-columns: 180px minmax(0, 1fr); } .channel-form { padding-inline: 16px; } .model-picker-row { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .admin-layout { grid-template-columns: 1fr; } .admin-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .admin-heading { align-items: flex-start; } .admin-layout { gap: 9px; } .admin-nav { padding: 5px; } .admin-nav-item { min-height: 52px; gap: 7px; padding: 6px; } .admin-nav-item small { font-size: 7px; } .admin-nav-mark { width: 24px; height: 24px; flex-basis: 24px; } .channel-form { padding: 15px 13px 12px; } .channel-form-head { flex-direction: column; gap: 8px; } .channel-state { margin-top: 0; } .admin-fields { grid-template-columns: 1fr; gap: 11px; padding-block: 14px; } .field-wide { grid-column: auto; } .model-picker-row { grid-template-columns: minmax(0, 1fr); } .check-channel { width: 100%; } .channel-actions { align-items: stretch; flex-direction: column; } .channel-actions .primary-button { width: 100%; } .skill-upload-area { flex-wrap: wrap; gap: 9px; } .skill-upload-copy { min-width: calc(100% - 55px); } .skill-upload-area .secondary-button { width: 100%; } .skill-current-foot { flex-direction: column; } .skill-run-block { align-items: stretch; flex-direction: column; } .skill-run-block > .secondary-button { width: 100%; } .results-origin { gap: 6px; } .skill-use-badge { max-width: 175px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #f1f2ed; }
.auth-card { width: min(100%, 420px); padding: 38px; border: 1px solid #d9ddd7; border-radius: 10px; background: #fbfcf8; box-shadow: 0 24px 70px #27322b0b; }
.auth-brand { display: inline-flex; margin-bottom: 44px; text-decoration: none; }
.auth-kicker { color: #8a9690; font: 9px var(--mono); letter-spacing: .1em; }
.auth-card h1 { margin: 12px 0 8px; color: #202a2e; font: 600 24px var(--sans); }
.auth-card > p { margin: 0 0 24px; color: #84908b; font-size: 12px; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 7px; color: #66726d; font-size: 11px; }
.auth-form input { height: 40px; padding: 0 11px; border: 1px solid #dfe3dc; border-radius: 5px; background: white; outline-color: #afca7d; }
.auth-form .primary-button { width: 100%; margin-top: 4px; }
.auth-error { color: #9e4639; font-size: 11px; }
.bootstrap-note { padding: 11px; color: #69745c; border-radius: 5px; background: #eff4e5; font-size: 10px; line-height: 1.6; }
.account-name { color: #77817b; font-size: 10px; }
.users-list { display: grid; gap: 7px; margin-top: 18px; }
.user-row { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid #e2e5df; border-radius: 5px; }
.user-row > div { display: grid; gap: 4px; margin-right: auto; }
.user-row strong { color: #3b4745; font-size: 11px; }
.user-row small { color: #949d97; font-size: 9px; }
.rail-link-text { font-size: 11px; }
.history-heading { align-items: center; margin-bottom: 20px; }
.history-heading p { max-width: 560px; }
.video-history-list { display: grid; gap: 12px; }
.history-item { position: relative; display: grid; gap: 13px; padding: 18px 19px; border: 1px solid #dce0da; border-radius: 7px; background: var(--paper-pure); }
.history-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.history-meta { display: grid; gap: 5px; min-width: 0; }
.history-model { overflow: hidden; color: #374347; font-size: 11px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.history-date { color: #98a19b; font-size: 9px; }
.history-status { flex: 0 0 auto; padding: 5px 8px; color: #74806a; border-radius: 3px; background: #eef3e5; font-size: 9px; }
.history-status.is-processing, .history-status.is-queued { color: #756343; background: #f6f0e3; }
.history-status.is-failed { color: #9c5145; background: #f8eae6; }
.history-hook { display: -webkit-box; overflow: hidden; margin: 0; color: #333f42; font-size: 13px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.history-prompt-details { padding-top: 10px; border-top: 1px solid #eceee9; }
.history-prompt-details summary { width: fit-content; color: #74816d; font-size: 10px; cursor: pointer; }
.history-prompt { overflow-wrap: anywhere; white-space: pre-wrap; margin: 10px 0 0; padding: 12px; color: #56615e; border-radius: 4px; background: #f4f5f0; font: 10px/1.75 var(--sans); }
.history-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; }
.history-actions .secondary-button { min-height: 31px; padding: 0 11px; font-size: 10px; }
.history-download { display: inline-flex; align-items: center; min-height: 30px; text-decoration: none; }
.history-player { display: block; width: min(100%, 640px); max-height: 420px; border-radius: 5px; background: #111923; }
.history-error { margin: 0; color: #9c5145; font-size: 10px; line-height: 1.6; }
.history-delete { justify-self: end; color: #9a7770; }
.history-empty { display: grid; justify-items: start; gap: 10px; padding: 35px 22px; border: 1px dashed #d5dbd1; border-radius: 7px; background: #f7f8f4; }
.history-empty strong { color: #3c4849; font-size: 14px; }
.history-empty p { max-width: 430px; margin: 0 0 5px; color: #87918b; font-size: 11px; line-height: 1.7; }
.history-message { margin-bottom: 12px; padding: 12px 14px; color: #965347; border: 1px solid #ead8d1; border-radius: 5px; background: #f8eeea; font-size: 11px; }
@media (max-width: 680px) {
  .history-heading { align-items: flex-start; gap: 12px; }
  .history-heading > .secondary-button { flex: 0 0 auto; padding-inline: 10px; }
  .history-item { padding: 14px; }
  .history-player { max-height: 320px; }
}
