:root {
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: #20242a;
  background: #f4f5f7;
  --green: #167c62;
  --green-dark: #0e654f;
  --green-soft: #e8f4f0;
  --line: #e7e9ed;
  --muted: #7c838d;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f4f5f7; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar {
  height: 72px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 clamp(20px, 5vw, 76px);
  gap: 50px; position: sticky; top: 0; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--green); color: #fff; font-weight: 800; font-size: 18px; }
.brand-mark-large { width: 54px; height: 54px; border-radius: 17px; font-size: 25px; }
.brand-logo { width: 36px; height: 36px; object-fit: contain; }
.main-nav { display: flex; align-items: center; gap: 30px; height: 100%; font-size: 13px; color: #7d838c; }
.main-nav a { height: 100%; display: grid; place-items: center; position: relative; }
.main-nav a.active { color: #20242a; font-weight: 600; }
.main-nav a.active:after { content: ""; position: absolute; height: 2px; bottom: 0; left: 0; right: 0; background: var(--green); border-radius: 3px; }
.account { margin-left: auto; display: flex; align-items: center; gap: 17px; }
.account form { margin: 0; }
.account-name { font-size: 12px; color: #777f89; }
.help-entry { padding: 7px 11px; font-size: 11px; }
.help-entry > span { display: grid; place-items: center; width: 16px; height: 16px; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; }
.help-entry.is-active { color: var(--green); border-color: #b7d8cc; background: #f1f8f5; }
.page-shell { max-width: 1200px; margin: 0 auto; padding: 46px 32px 84px; }
.page-heading { margin-bottom: 27px; }
.page-heading h1 { margin: 5px 0 8px; font-size: 30px; letter-spacing: -1px; }
.eyebrow { font-size: 10px; letter-spacing: 1.7px; color: #8f969e; font-weight: 700; margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.7; }
.heading-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 8px; padding: 11px 17px; font-size: 12px; font-weight: 600; transition: .15s ease; white-space: nowrap; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: white; box-shadow: 0 4px 11px #167c6220; }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { background: #fff; border-color: #dfe3e6; color: #39434a; }
.button-danger { background: #fff; border-color: #f0d6d2; color: #a6463b; }
.button:disabled { opacity: .5; cursor: not-allowed; }
.project-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.project-actions form { margin: 0; }
.button-quiet { background: transparent; color: #707882; padding: 6px 9px; }
.button-small { font-size: 11px; }
.button-wide { width: 100%; padding: 14px; }
.plus { font-size: 16px; font-weight: 400; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 23px; }
.stat-card { padding: 19px 20px 18px; background: #fff; border: 1px solid var(--line); border-radius: 10px; min-height: 121px; display: flex; flex-direction: column; align-items: flex-start; }
.stat-card > span { font-size: 11px; color: #7d848d; }
.stat-card strong { font-size: 26px; line-height: 1.3; margin-top: 8px; font-weight: 700; letter-spacing: -.8px; }
.stat-card small { font-size: 10px; color: #9aa0a7; margin-top: 4px; }
.stat-accent strong { font-size: 18px; color: var(--green); margin-top: 12px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 2px 6px #25334005; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 23px; }
.panel-heading h2 { font-size: 15px; margin: 0 0 4px; }
.panel-heading p { margin: 0; }
.project-filters { display: flex; align-items: center; gap: 9px; padding: 0 23px 17px; }
.project-filters label { margin: 0; }
.project-filters input, .project-filters select { height: 36px; border: 1px solid #e3e6e9; border-radius: 7px; background: #fff; color: #39434a; font-size: 11px; outline: 0; }
.project-filters input:focus, .project-filters select:focus { border-color: #7bb5a4; box-shadow: 0 0 0 3px #167c6214; }
.filter-search { flex: 1; min-width: 180px; }
.filter-search input { width: 100%; padding: 0 11px; }
.filter-status select { min-width: 112px; padding: 0 9px; }
.project-filters .button { height: 36px; padding: 0 14px; }
.filter-reset { padding-left: 4px; white-space: nowrap; }
.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; }
.text-link, .row-arrow { font-size: 11px; color: var(--green); font-weight: 600; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { font-size: 10px; font-weight: 500; color: #a0a6ad; padding: 0 22px 11px; border-bottom: 1px solid #eff0f2; }
td { font-size: 12px; padding: 14px 22px; border-bottom: 1px solid #f0f1f3; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.project-title { display: block; font-weight: 600; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-sub { display: block; margin-top: 4px; color: #a0a6ad; font-size: 10px; max-width: 390px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; background: #f2f3f4; border-radius: 999px; font-size: 10px; color: #737a82; white-space: nowrap; }
.status-pill:before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-completed { background: #e8f4ef; color: #168064; }
.status-processing, .status-analyzing, .status-editing, .status-running { background: #fff3dc; color: #ad7515; }
.status-failed { background: #fdecea; color: #cb4d42; }
.status-queued, .status-planned { background: #eef0f3; color: #707983; }
.empty-state { text-align: center; padding: 62px 20px 68px; }
.empty-icon { margin: 0 auto 13px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #edf5f2; color: var(--green); font-size: 19px; }
.empty-state h3 { font-size: 15px; margin: 0 0 8px; }
.empty-state p { font-size: 11px; color: #8a9199; margin: 0 0 22px; }
.page-not-found { padding-top: 115px; }
.notice { border-radius: 8px; padding: 11px 14px; margin: 0 0 16px; font-size: 12px; line-height: 1.6; }
.notice-success { background: #e9f5ef; color: #226e58; }
.notice-error { background: #fff0ee; color: #a6463b; }
.notice-warning { background: #fff6e4; color: #8f681d; }
.notice a { font-weight: 700; text-decoration: underline; }
.back-link { display: inline-block; font-size: 11px; color: #7c838c; margin-bottom: 22px; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .85fr); gap: 18px; align-items: start; }
.upload-form { padding: 26px; }
.field-label, .settings-fields label, .form-stack label { display: flex; flex-direction: column; gap: 8px; font-size: 11px; font-weight: 600; color: #4a5057; }
.text-input, .settings-fields input, .settings-fields select, .form-stack input { width: 100%; height: 42px; border: 1px solid #e3e6e9; border-radius: 7px; background: #fff; padding: 0 12px; color: #222831; font-size: 12px; outline: none; }
.text-input:focus, .settings-fields input:focus, .settings-fields select:focus, .form-stack input:focus { border-color: #7bb5a4; box-shadow: 0 0 0 3px #167c6214; }
.text-input { margin: 8px 0 24px; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0 0 24px; }
.number-control { display: flex; align-items: center; height: 42px; border: 1px solid #e3e6e9; border-radius: 7px; overflow: hidden; margin-top: 8px; }
.number-control button { width: 42px; height: 100%; border: 0; background: #f8f9fa; color: #6a717a; font-size: 18px; }
.number-control input { width: 55px; border: 0; text-align: center; outline: 0; font-size: 13px; font-weight: 600; appearance: textfield; }
.number-control input::-webkit-inner-spin-button, .number-control input::-webkit-outer-spin-button { appearance: none; }
.field-help { display: block; color: #939aa2; font-size: 10px; line-height: 1.6; margin-top: 8px; }
.estimated-output { display: flex; flex-direction: column; justify-content: center; padding: 8px 14px; border-radius: 8px; background: #f6f8f7; }
.mini-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: #98a09e; }
.estimated-output strong { font-size: 12px; margin: 6px 0 3px; }
.estimated-output small { font-size: 10px; color: #929a9c; }
.drop-zone { position: relative; min-height: 148px; border: 1px dashed #cfd8d5; border-radius: 8px; background: #fafcfb; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px; margin-top: 9px; color: #626c6d; cursor: pointer; transition: .15s; }
.drop-zone:hover, .drop-zone.dragging, .drop-zone.has-file { border-color: #77ad9c; background: #f3faf7; }
.drop-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-zone strong { font-size: 11px; max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-zone > span:last-child { font-size: 9px; color: #a0a7a8; }
.upload-icon { display: grid; place-items: center; width: 31px; height: 31px; background: #e9f4f0; border-radius: 50%; color: var(--green); font-size: 18px; }
.privacy-note { font-size: 10px; color: #92999e; margin: 15px 0 19px; }
.privacy-note span { color: #29866d; font-weight: 700; padding-right: 5px; }
.submit-hint { text-align: center; color: #a1a7ac; font-size: 9px; margin: 10px 0 0; }
.side-note { padding: 24px; }
.note-icon { display: grid; place-items: center; width: 33px; height: 33px; border-radius: 10px; background: #edf5f2; color: var(--green); font-size: 18px; }
.side-note h3 { font-size: 14px; margin: 14px 0 20px; }
.workflow-list { list-style: none; margin: 0; padding: 0; }
.workflow-list li { display: flex; gap: 12px; padding: 0 0 18px; }
.workflow-list li:last-child { padding-bottom: 0; }
.workflow-list li > span { font-size: 9px; color: #46917a; background: #edf5f2; border-radius: 5px; width: 24px; height: 24px; display: grid; place-items: center; flex: none; }
.workflow-list li div { display: flex; flex-direction: column; gap: 4px; }
.workflow-list strong { font-size: 10px; }
.workflow-list small { font-size: 9px; color: #969da3; line-height: 1.5; }
.side-note .notice { margin-top: 19px; margin-bottom: 0; font-size: 10px; }
.project-head { align-items: center; }
.project-status-panel { padding: 17px 19px; margin-bottom: 18px; }
.status-summary { display: flex; align-items: center; gap: 11px; }
.status-summary .muted { font-size: 10px; }
.progress-track { height: 4px; background: #eef0f1; border-radius: 4px; margin-top: 14px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: #319378; border-radius: 4px; transition: width .5s; }
.project-summary { padding-top: 13px; margin: 13px 0 0; border-top: 1px solid #eff0f2; color: #626970; font-size: 12px; line-height: 1.8; }
.episode-list { display: flex; flex-direction: column; gap: 13px; }
.episode-list-heading { padding: 8px 2px 4px; }
.episode-card { padding: 21px 22px; }
.episode-topline { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.episode-heading { display: flex; align-items: center; gap: 12px; }
.episode-number { display: grid; place-items: center; width: 39px; height: 39px; background: #eaf4f0; color: var(--green); font-weight: 700; font-size: 13px; border-radius: 10px; }
.episode-heading .eyebrow { margin: 0 0 4px; font-size: 8px; }
.episode-heading h3 { font-size: 15px; margin: 0; }
.episode-meta { display: flex; gap: 16px; margin: 14px 0; color: #9198a0; font-size: 10px; }
.script-block { background: #f7f8f8; border: 1px solid #eff0f0; border-radius: 8px; padding: 14px 15px; margin: 12px 0; }
.block-label { font-size: 9px; color: #71807b; font-weight: 700; margin-bottom: 8px; }
.script-block p { font-size: 11px; line-height: 1.9; color: #4f5857; margin: 0; }
.episode-video { display: block; width: min(100%, 650px); max-height: 390px; background: #101315; border-radius: 8px; margin: 14px 0; }
.download-button { margin: 2px 0 10px; }
.plan-details { margin-top: 13px; border-top: 1px solid #eef0f1; padding-top: 11px; }
.plan-details summary { cursor: pointer; list-style: none; font-size: 10px; font-weight: 600; color: #68717a; }
.plan-details summary::-webkit-details-marker { display: none; }
.plan-details summary:after { content: "+"; float: right; color: #7b858c; }
.plan-details[open] summary:after { content: "−"; }
.plan-details summary span { font-weight: 400; color: #9aa0a6; margin-left: 8px; }
.segment-list { margin: 10px 0; }
.segment-row { display: grid; grid-template-columns: 150px 1fr; gap: 16px; border-bottom: 1px solid #f1f2f3; padding: 7px 0; font-size: 10px; }
.segment-row time { color: var(--green); font-variant-numeric: tabular-nums; }
.segment-row span { color: #7d848b; }
.plan-details pre { white-space: pre-wrap; word-break: break-word; background: #f7f8f9; color: #747e85; border-radius: 6px; padding: 12px; font-size: 9px; max-height: 320px; overflow: auto; }
.processing-placeholder { text-align: center; padding: 65px 20px; }
.processing-placeholder h2 { font-size: 15px; margin: 14px 0 6px; }
.processing-placeholder p { margin: 0; }
.spinner { width: 26px; height: 26px; margin: auto; border: 2px solid #dcebe5; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.settings-form { display: flex; flex-direction: column; gap: 15px; }
.settings-section { padding: 22px 24px; }
.settings-heading { display: flex; align-items: center; gap: 12px; padding-bottom: 17px; border-bottom: 1px solid #eff0f2; }
.settings-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #edf5f2; color: var(--green); font-size: 15px; }
.settings-heading h2 { font-size: 13px; margin: 0 0 3px; }
.settings-heading p { font-size: 10px; margin: 0; }
.settings-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.settings-fields label { font-size: 10px; }
.settings-fields input, .settings-fields select { margin-top: 1px; }
.settings-fields select:disabled { background: #f5f6f7; color: #949ba3; cursor: not-allowed; }
.speech-credentials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 16px; background: #f8faf9; border: 1px solid #edf1ef; border-radius: 8px; }
[hidden] { display: none !important; }
.logo-field { display: flex; flex-direction: column; gap: 9px; font-size: 10px; }
.logo-preview { width: 48px; height: 48px; object-fit: contain; border: 1px solid #eff0f2; border-radius: 8px; padding: 4px; }
.logo-field input { height: auto; border: 0; padding: 0; }
.logo-field small { font-size: 9px; color: #969da4; }
.storage-fields { display: none; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 15px; background: #f8faf9; border: 1px solid #edf1ef; border-radius: 8px; }
.storage-fields.is-visible { display: grid; }
.wide-field { grid-column: 1 / -1; margin: 0; }
.field-help code { font-size: 9px; background: #f0f2f2; padding: 2px 4px; border-radius: 3px; }
.form-actions { display: flex; align-items: center; gap: 13px; margin: 5px 0; }
.form-actions .muted { font-size: 10px; }
.password-section { margin-top: 15px; }
.password-submit { display: flex; align-items: flex-end; }
.auth-page { min-height: 100vh; background: radial-gradient(ellipse at 16% 14%, #dfeee9 0, #f4f5f7 38%, #f4f5f7 100%); }
.auth-main { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 390px); padding: 34px; background: #fff; border: 1px solid #e9ebed; border-radius: 13px; box-shadow: 0 20px 60px #20392e0d; }
.login-brand { display: flex; align-items: center; gap: 14px; }
.login-brand h1 { font-size: 19px; margin: 0; }
.login-card > .muted { margin: 12px 0 23px; }
.login-card .eyebrow { font-size: 8px; margin-bottom: 5px; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.form-stack label { font-size: 10px; }
.form-stack input { margin-top: 1px; }
.form-stack button { margin-top: 4px; }
.button-spinner { width: 12px; height: 12px; border: 2px solid #ffffff77; border-top-color: white; border-radius: 50%; animation: spin .8s linear infinite; }
.guide-index { display: flex; flex-wrap: wrap; gap: 9px 22px; padding: 17px 22px; margin-bottom: 18px; }
.guide-index a { font-size: 12px; color: var(--green); font-weight: 600; padding: 4px 0; }
.guide-sections { display: grid; gap: 18px; }
.guide-section { padding: 25px 28px; scroll-margin-top: 90px; font-size: 13px; line-height: 1.9; color: #515b65; }
.guide-heading { display: flex; align-items: flex-start; gap: 13px; padding-bottom: 17px; margin-bottom: 18px; border-bottom: 1px solid #eff0f2; }
.guide-number { display: grid; place-items: center; flex: 0 0 35px; height: 35px; color: var(--green); background: var(--green-soft); border-radius: 9px; font-size: 13px; font-weight: 700; }
.guide-heading h2 { font-size: 17px; color: #28332f; margin: 0 0 3px; }
.guide-heading p { font-size: 12px; color: var(--muted); margin: 0; }
.guide-section p { margin: 12px 0; }
.guide-section a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.guide-section li { margin: 10px 0; padding-left: 4px; }
.guide-section ol, .guide-section ul { padding-left: 22px; margin: 12px 0; }
.guide-section strong { color: #36423d; }
.guide-fields { margin: 16px 0; }
.guide-fields > div { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 18px; padding: 13px 0; border-bottom: 1px solid #eff0f2; }
.guide-fields > div:last-child { border-bottom: 0; }
.guide-fields dt { color: #36423d; font-weight: 600; }
.guide-fields dd { margin: 0; }
.guide-section .guide-tip { background: #f3f8f6; border-left: 3px solid #9bc7b8; border-radius: 4px; padding: 12px 15px; font-size: 12px; }
.guide-section code { overflow-wrap: anywhere; background: #edf1ef; border-radius: 3px; padding: 2px 4px; font-size: 12px; }
.guide-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; padding: 14px 17px; background: #f6f8f7; border-radius: 7px; color: var(--green-dark); font-size: 12px; }
.guide-faq { border-bottom: 1px solid #edf0ef; }
.guide-faq:last-child { border-bottom: 0; }
.guide-faq summary { padding: 15px 0; cursor: pointer; color: #36423d; font-weight: 600; }
.guide-faq p { margin: 0 0 17px; }
@media (max-width: 850px) {
  .topbar { gap: 23px; padding: 0 22px; }
  .page-shell { padding: 35px 22px 60px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .upload-layout { grid-template-columns: 1fr; }
  .side-note { display: none; }
  .settings-section { padding: 19px; }
}
@media (max-width: 560px) {
  .topbar { height: auto; min-height: 62px; padding: 12px 15px 0; gap: 0 12px; flex-wrap: wrap; }
  .brand { font-size: 13px; gap: 8px; }
  .brand { max-width: calc(100% - 150px); }
  .brand > span:last-child { overflow: hidden; text-overflow: ellipsis; }
  .brand-mark, .brand-logo { flex-shrink: 0; }
  .brand-mark { width: 30px; height: 30px; }
  .main-nav { gap: 24px; font-size: 11px; order: 3; width: 100%; height: 43px; }
  .account { gap: 5px; flex-shrink: 0; }
  .help-entry { padding: 7px 8px; }
  .account-name { display: none; }
  .page-shell { padding: 27px 14px 50px; }
  .page-heading h1 { font-size: 25px; }
  .heading-row { align-items: flex-start; }
  .heading-row > .button { padding: 10px 11px; font-size: 10px; }
  .stats-grid { gap: 9px; }
  .stat-card { padding: 14px; min-height: 106px; }
  .stat-card strong { font-size: 23px; }
  .panel-heading { padding: 17px; }
  .project-filters { align-items: stretch; flex-wrap: wrap; padding: 0 17px 15px; }
  .filter-search { flex-basis: 100%; }
  .filter-status { flex: 1; }
  .filter-status select { width: 100%; }
  .upload-form { padding: 19px; }
  .form-two { grid-template-columns: 1fr; gap: 12px; }
  .estimated-output { min-height: 72px; }
  .episode-card { padding: 16px; }
  .settings-fields, .storage-fields, .speech-credentials { grid-template-columns: 1fr; }
  .wide-field { grid-column: auto; }
  .episode-video { max-height: 250px; }
  .segment-row { grid-template-columns: 120px 1fr; gap: 9px; }
  .status-summary { align-items: flex-start; flex-direction: column; gap: 8px; }
  .project-head { flex-direction: column; }
  .guide-index { gap: 7px 18px; padding: 14px 17px; }
  .guide-section { padding: 20px 18px; scroll-margin-top: 115px; }
  .guide-fields > div { grid-template-columns: 1fr; gap: 5px; }
}
