:root {
  --ink: #10191b;
  --ink-2: #172326;
  --ink-3: #213034;
  --paper: #f2eddf;
  --paper-2: #e5decb;
  --red: #f04d3e;
  --red-deep: #b52b25;
  --gold: #d8b56c;
  --mint: #7bbda9;
  --muted: #8b9a98;
  --line: rgba(229, 222, 203, .12);
  --shadow: 0 24px 70px rgba(1, 10, 12, .3);
}

.library-nav a.button, .novel-lane a.button, .library-actions a.button, .library-actions a.button:visited { color: var(--paper); text-decoration: none; }
.library-actions a.button { box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
#homeNovelEditor { height: 100vh; width: 100%; }
#homeNovelFrame { display: block; border: 0; width: 100%; height: 100%; }
#homeNovelForm label { display: grid; gap: 10px; color: var(--gold); }
#homeNovelTitle { padding: 12px; border: 1px solid var(--line); background: var(--ink); color: var(--paper); }
#homeNovelError { color: #ffac9c; }
.production-lane.novel-lane { border-left: 2px solid var(--mint); }

/* Topic research extends the existing studio palette; evidence and judgement
   stay visually separate instead of hiding behind an invented score. */
.project-dialog.topic-dialog { width: min(1180px, 96vw); max-width: 1180px; max-height: 92vh; padding: 32px; overflow: auto; }
.project-dialog.topic-dialog form { padding: 0; }
.topic-dialog p, .topic-dialog label, .topic-dialog summary, .topic-dialog dd { font-size: 1rem; line-height: 1.65; }
.topic-dialog p { overflow-wrap: anywhere; }
.topic-dialog fieldset { border: 1px solid var(--line); padding: 20px; min-width: 0; }
.topic-dialog legend, .topic-dialog dt { color: var(--gold); font-size: .875rem; }
.topic-grid, .topic-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.topic-dialog label { display: grid; gap: 7px; margin: 10px 0; }
.topic-dialog input:not([type=checkbox]), .topic-dialog textarea, .topic-dialog select { width: 100%; min-width: 0; border: 1px solid var(--line); padding: 10px; color: var(--paper); background: var(--ink); border-radius: 3px; }
.topic-dialog textarea { resize: vertical; field-sizing: content; min-height: 80px; }
.topic-dialog input[type=checkbox] { width: auto; justify-self: start; }
.topic-dialog a { color: var(--mint); text-decoration: underline; overflow-wrap: anywhere; }
.topic-import { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.topic-import summary, .topic-candidate summary { cursor: pointer; color: var(--gold); }
.topic-source { padding: 16px 0; border-bottom: 1px solid var(--line); }
.topic-source > div { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; }
.topic-source span, .topic-evidence-label { color: var(--mint); font-size: .875rem; }
.topic-actions, .topic-candidate footer { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.topic-rank-panel { margin: 8px 0 22px; padding: 18px; border: 1px solid var(--line); background: var(--ink-2); }
.topic-rank-title, .topic-rank-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.topic-rank-title h3, .topic-rank-title p { margin: 0; }
.topic-rank-controls select { min-width: 150px; }
.topic-rank-controls .button { min-height: 42px; }
.topic-rank-status { margin: 12px 0 0; color: var(--muted); }
.topic-step-title { margin: 22px 0 8px; color: var(--paper); }
.topic-quick-settings { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(300px, 1.2fr); gap: 18px; }
.topic-create-actions { align-items: center; }
.topic-rank-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 18px 0 10px; color: var(--mint); }
.topic-rank-head span, .topic-source-note, .topic-rank-empty { color: var(--muted); }
.topic-rank-list { max-height: 360px; overflow: auto; margin: 0; padding: 0; border: 1px solid var(--line); list-style: none; }
.topic-rank-list li { display: grid; grid-template-columns: 28px minmax(245px, 1fr) minmax(260px, 1.25fr) 200px 132px; align-items: stretch; gap: 14px; min-height: 128px; padding: 15px 16px; border-bottom: 1px solid var(--line); }
.topic-rank-list li:last-child { border-bottom: 0; }
.topic-rank-list li.is-reference { background: color-mix(in srgb, var(--mint) 9%, transparent); box-shadow: inset 3px 0 var(--mint); }
.topic-book-core, .topic-book-insights { min-width: 0; align-self: center; }
.topic-rank-list small { display: block; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.topic-book-style { color: var(--paper) !important; white-space: normal !important; }
.topic-rank-name { display: flex; align-items: center; gap: 9px; min-width: 0; margin-bottom: 7px; }
.topic-rank-name b { overflow: hidden; color: var(--paper); font-size: 20px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.topic-source-link { flex: 0 0 auto; padding: 5px 9px; border: 1px solid rgba(123,189,169,.48); border-radius: 3px; background: rgba(123,189,169,.1); color: #a9d9ca; font-size: 13px; font-weight: 700; line-height: 1; text-decoration: none; box-shadow: 0 0 14px rgba(123,189,169,.05); }
.topic-source-link:hover { border-color: rgba(123,189,169,.78); background: rgba(123,189,169,.18); color: #e0f3ed; }
.topic-source-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.topic-book-insights { padding-left: 18px; border-left: 1px solid rgba(229,222,203,.1); }
.topic-dialog .topic-book-blurb { display: -webkit-box; overflow: hidden; margin: 0; color: #b8c4c0; font-size: 12px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.topic-book-blurb.is-empty { color: var(--muted); }
.topic-dialog .topic-book-signals, .topic-dialog .topic-book-latest { overflow: hidden; margin: 6px 0 0; font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.topic-book-signals { color: var(--mint); }
.topic-book-latest { color: var(--muted); }
.topic-book-metrics { align-self: center; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; min-width: 0; color: var(--paper); }
.topic-book-metrics span { display: flex; min-width: 0; flex-direction: column; justify-content: center; gap: 5px; padding: 2px 4px; white-space: nowrap; }
.topic-book-metrics b { overflow: hidden; font: 700 12px/1.05 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: -.03em; text-overflow: ellipsis; }
.topic-book-metrics em { order: -1; color: var(--muted); font: 500 9px/1 system-ui, sans-serif; font-style: normal; letter-spacing: .08em; }
.topic-book-metrics .is-primary b { color: var(--paper); font-size: 13px; }
.topic-book-metrics .is-primary em { color: var(--gold); }
.topic-source-unavailable { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
.topic-reference-file { display: inline-block; margin-top: 7px; color: var(--mint); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.topic-rank-no { align-self: center; color: var(--gold); font: 700 16px/1 ui-monospace, monospace; }
.topic-reference-button { align-self: center; min-height: 40px; margin: 0; padding-inline: 12px; font-size: 12px; white-space: nowrap; }
.topic-candidate { min-width: 0; padding: 24px; border: 1px solid var(--line); border-top: 3px solid var(--gold); background: var(--ink-2); }
.topic-candidate h3 { font: 700 1.6rem "STKaiti", "KaiTi", serif; }
.topic-candidate dd { margin: 6px 0 20px; white-space: pre-wrap; overflow-wrap: anywhere; }
.topic-candidate dt { border-top: 1px solid var(--line); padding-top: 14px; }
.topic-premise { color: var(--paper); font-weight: 600; }
#topicStatus { padding: 14px 0; color: var(--gold); }
@media (max-width: 1100px) { .topic-rank-list li { grid-template-columns: 28px minmax(225px, 1fr) minmax(235px, 1.15fr) 180px 124px; gap: 12px; padding-inline: 12px; } .topic-book-insights { padding-left: 12px; } .topic-dialog .topic-book-blurb { -webkit-line-clamp: 2; } .topic-book-metrics span { padding: 8px; } }
@media (max-width: 880px) { .topic-rank-list li { grid-template-columns: 32px minmax(210px, .9fr) minmax(260px, 1.1fr); } .topic-book-metrics { grid-column: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); } .topic-reference-button { grid-column: 3; grid-row: 2; justify-self: end; width: 142px; } }
@media (max-width: 700px) { .topic-grid, .topic-results, .topic-quick-settings { grid-template-columns: 1fr; } .project-dialog.topic-dialog { padding: 24px 16px; } .topic-rank-title { align-items: flex-start; flex-direction: column; } .topic-rank-list li { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; } .topic-book-core, .topic-book-insights, .topic-book-metrics, .topic-reference-button { grid-column: 2; } .topic-book-insights { padding: 12px 0 0; border-top: 1px solid rgba(229,222,203,.1); border-left: 0; } .topic-book-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .topic-reference-button { grid-row: auto; justify-self: stretch; width: auto; } }

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--ink); color: var(--paper); font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .32;
  background-image: linear-gradient(rgba(255,255,255,.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.015) 1px, transparent 1px);
  background-size: 32px 32px;
}

[hidden] { display: none !important; }

.home-screen { min-height: 100vh; position: relative; overflow: hidden; }
.home-screen::after { content: "剧"; position: fixed; right: -2vw; bottom: -17vh; color: rgba(229,222,203,.018); font: 700 54vw/1 "STKaiti", serif; pointer-events: none; }
.library-topbar { height: 76px; display: grid; grid-template-columns: 190px 1fr auto; align-items: center; border-bottom: 1px solid var(--line); position: relative; z-index: 2; background: rgba(16,25,27,.9); backdrop-filter: blur(16px); }
.home-brand { height: 76px; }
.library-nav { padding-left: 34px; display: flex; align-items: baseline; gap: 12px; }
.library-nav strong { font: 700 18px "STKaiti", serif; letter-spacing: .08em; }
.library-actions { display: flex; align-items: center; gap: 18px; padding-right: 34px; }
.library-actions .model-badge { text-align: right; }
.library-main { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 74px 0 100px; position: relative; z-index: 1; }
.library-intro { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 48px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.library-intro h1 { max-width: 760px; margin: 11px 0 12px; font: 700 clamp(36px, 5.6vw, 72px)/1.04 "STKaiti", "KaiTi", serif; letter-spacing: .02em; }
.library-intro p { max-width: 620px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.library-stats { display: flex; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.library-stats span { width: 108px; min-height: 78px; display: grid; place-content: center; gap: 4px; text-align: center; background: var(--ink); color: var(--muted); font-size: 9px; }
.library-stats b { display: block; color: var(--paper); font: 700 23px Consolas, monospace; }
.library-section { margin-top: 42px; }
.library-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 19px; }
.library-heading h2 { margin: 5px 0 0; font: 700 25px "STKaiti", serif; letter-spacing: .06em; }
.library-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.production-lanes { display: grid; gap: 28px; }
.production-lane { position: relative; padding: 20px; border: 1px solid var(--line); background: rgba(23,35,38,.42); }
.production-lane > header { display: flex; align-items: end; justify-content: space-between; gap: 22px; padding: 0 0 17px; margin-bottom: 17px; border-bottom: 1px solid var(--line); }
.production-lane h3 { margin: 5px 0 4px; font: 700 25px "STKaiti", serif; letter-spacing: .08em; }
.production-lane p { margin: 0; color: var(--muted); font-size: 10px; }
.production-lane.original-lane { border-left: 2px solid var(--gold); }
.production-lane.adaptation-lane { border-left: 2px solid var(--red); }
.production-lane.adaptation-lane .eyebrow, .adaptation-project-card .project-card-top > span { color: #ee8c75; }
.production-lane .button { color: var(--gold); border-color: rgba(216,181,108,.3); }
.adaptation-lane .button { color: #f1a18e; border-color: rgba(240,77,62,.36); }
.project-card { min-height: 280px; display: grid; grid-template-columns: 64px 1fr; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(33,48,52,.78), rgba(17,28,30,.96)); box-shadow: 0 22px 55px rgba(0,0,0,.2); cursor: pointer; transition: .2s ease; }
.project-card:hover { transform: translateY(-3px); border-color: rgba(216,181,108,.32); box-shadow: var(--shadow); }
.project-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-color: rgba(216,181,108,.68); }
.video-script-project-card { color: var(--paper); text-decoration: none; }
#videoScriptCatalogStatus:not(:empty) { margin-bottom: 16px; }
.project-card-index { border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; padding: 20px 0; }
.project-card-index span { color: var(--gold); font: 700 11px Consolas, monospace; }
.project-card-index i { flex: 1; width: 3px; margin-top: 15px; background: linear-gradient(to top, var(--red) 0 var(--written), var(--gold) var(--written) var(--planned), rgba(229,222,203,.1) var(--planned) 100%); box-shadow: 0 0 12px rgba(240,77,62,.2); }
.project-card-body { padding: 22px 24px 20px; min-width: 0; display: flex; flex-direction: column; }
.project-card-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; color: var(--gold); font: 700 12px/1.6 Consolas, monospace; letter-spacing: .08em; }
.project-card-top small { color: var(--muted); font-size: 11px; line-height: 1.6; letter-spacing: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.project-card-top .project-created-date { margin-left: auto; }
.project-card h3 { margin: 18px 0 7px; font: 700 27px "STKaiti", serif; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-card-body > p { margin: 0; min-height: 54px; color: var(--muted); font-size: 11px; line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.project-card-progress { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 24px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.project-card-progress > span { display: inline-flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.project-card-progress b { color: var(--paper); font: 700 14px/1.6 Consolas, monospace; }
.project-card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 17px; }
.project-card-foot em { color: #94a5a2; font-size: 9px; font-style: normal; }
.project-card-foot .button { border-color: rgba(216,181,108,.28); color: var(--gold); }
.project-card-foot .button span { margin-left: 7px; }
.project-card-actions { display: flex; align-items: center; gap: 7px; }
.project-card-utility { min-height: 32px; border: 1px solid rgba(229,222,203,.16); padding: 0 10px; background: transparent; color: #9ca8a5; font-size: 10px; cursor: pointer; transition: .18s ease; }
.project-card-utility:hover { color: var(--paper); border-color: rgba(216,181,108,.45); background: rgba(216,181,108,.06); }
.project-card-utility.delete:hover { color: #ffb0a4; border-color: rgba(240,77,62,.62); background: rgba(240,77,62,.08); }
.novel-lane .project-card, .novel-lane .create-project-card { min-height: 210px; }
.novel-lane .project-card h3 { margin: 20px 0 0; }
.novel-lane .project-card-progress { margin-top: 14px; }
.novel-lane .project-card-foot { justify-content: flex-end; }
.create-project-card { min-height: 280px; border: 1px dashed rgba(229,222,203,.2); background: rgba(255,255,255,.012); color: var(--muted); cursor: pointer; display: grid; place-content: center; text-align: center; gap: 9px; transition: .2s ease; }
.create-project-card:hover { border-color: var(--gold); color: var(--paper); background: rgba(216,181,108,.035); }
.create-project-card span { color: var(--red); font: 300 38px/1 Consolas, monospace; }.create-project-card b { font: 700 17px "STKaiti", serif; }.create-project-card small { font-size: 9px; }
.create-project-card.adaptation:hover { border-color: var(--red); background: rgba(240,77,62,.035); }

.shell { min-height: 100vh; display: grid; grid-template: 72px 1fr / 164px 1fr; }
.topbar { grid-column: 1 / -1; display: grid; grid-template-columns: 164px 1fr auto; align-items: center; border-bottom: 1px solid var(--line); background: rgba(16,25,27,.94); backdrop-filter: blur(14px); position: relative; z-index: 5; }
.brand { height: 72px; display: flex; gap: 11px; align-items: center; padding: 0 18px; text-decoration: none; color: var(--paper); border-right: 1px solid var(--line); }
.brand b { font-family: "STKaiti", "KaiTi", serif; font-size: 22px; letter-spacing: .16em; display: block; }
.brand small { font-size: 7px; letter-spacing: .16em; color: var(--muted); white-space: nowrap; }
.brand-mark { width: 28px; height: 31px; display: flex; align-items: flex-end; gap: 3px; transform: skew(-6deg); }
.brand-mark i { display: block; width: 6px; background: var(--red); border-radius: 1px; }
.brand-mark i:nth-child(1) { height: 17px; }.brand-mark i:nth-child(2) { height: 29px; }.brand-mark i:nth-child(3) { height: 22px; }
.project-title-wrap { padding-left: 28px; position: relative; }
.crumb-button { display: inline; margin: 0 7px 0 0; padding: 0; border: 0; background: none; color: var(--muted); font: 700 9px Consolas, monospace; letter-spacing: .1em; cursor: pointer; }
.crumb-button:hover { color: var(--gold); }.crumb-button span { margin-left: 7px; color: #53615f; }
.project-title-wrap > .eyebrow { display: inline; }
.eyebrow { display: block; color: var(--gold); font: 700 9px/1.2 Consolas, monospace; letter-spacing: .19em; text-transform: uppercase; }
.project-title { margin-top: 3px; padding: 0; width: min(360px, 48vw); border: 0; background: transparent; color: var(--paper); font-family: "STKaiti", "KaiTi", serif; font-size: 21px; font-weight: 700; }
.top-actions { display: flex; gap: 10px; align-items: center; padding-right: 22px; }
.save-state { font-size: 11px; color: var(--muted); margin-right: 8px; }
.save-state i, .model-badge i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(123,189,169,.09); }
.adaptation-run-badge { min-height: 31px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(123,189,169,.36); padding: 0 10px; background: rgba(123,189,169,.08); color: #b9dccf; cursor: pointer; border-radius: 3px; font: 700 10px/1 Consolas,monospace; letter-spacing: .03em; }
.adaptation-run-badge:hover { border-color: var(--mint); background: rgba(123,189,169,.13); }.adaptation-run-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(123,189,169,.08); animation: adaptation-pulse 1.8s ease-in-out infinite; }.adaptation-run-badge b { color: var(--paper); font: 700 10px/1 Consolas,monospace; }
.button { min-height: 38px; border: 1px solid var(--line); padding: 0 16px; background: transparent; cursor: pointer; border-radius: 4px; font-size: 12px; font-weight: 700; transition: .2s ease; }
.button:hover { transform: translateY(-1px); border-color: rgba(229,222,203,.32); }
.button.primary { background: var(--red); color: white; border-color: var(--red); box-shadow: 0 9px 25px rgba(240,77,62,.17); }
.button:disabled { opacity: .58; cursor: wait; transform: none; }
.button.primary.generation-timer:disabled { opacity: 1; cursor: progress; background: #b64035; border-color: #d55a4d; color: #fff3ec; box-shadow: 0 9px 25px rgba(240,77,62,.2); }
.spark { margin-right: 6px; }

.rail { grid-column: 1; grid-row: 2; padding: 24px 12px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.rail-label { color: #667573; font: 700 9px Consolas, monospace; letter-spacing: .2em; padding: 0 10px 13px; }
.rail nav { display: grid; gap: 6px; }
.rail nav button { position: relative; height: 58px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); cursor: pointer; display: grid; grid-template-columns: 30px 1fr; align-items: center; padding: 0 9px; text-align: left; }
.rail nav button:hover { background: rgba(255,255,255,.035); color: var(--paper); }
.rail nav button.active { background: var(--paper); color: var(--ink); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.rail nav span { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid currentColor; font-family: "STKaiti", serif; }
.rail nav b { font-size: 12px; letter-spacing: .04em; }
.rail nav em { position: absolute; right: 8px; top: 6px; font: 8px Consolas, monospace; color: #5c6b69; font-style: normal; }
.rail nav button.active em { color: var(--red-deep); }
.rail nav button.complete:not(.active)::after { content: "✓"; position: absolute; right: 8px; bottom: 7px; color: var(--mint); font: 9px Consolas,monospace; }
.rail nav button.locked { opacity: .42; cursor: not-allowed; }
.rail nav button.locked span { border-style: dashed; }
.rail-bottom { margin-top: auto; display: grid; gap: 13px; }
.new-project { border: 1px dashed rgba(229,222,203,.2); background: transparent; height: 38px; color: var(--muted); cursor: pointer; font-size: 11px; }
.model-badge { font-size: 9px; color: #758481; text-align: center; }

.workspace { min-width: 0; min-height: calc(100vh - 72px); display: grid; grid-template-columns: 230px minmax(430px, 1fr) 286px; }
.workspace.focus-mode { grid-template-columns: minmax(0,1fr); }
.workspace.focus-mode > .episode-panel, .workspace.focus-mode > .pulse-panel { display: none; }
.workspace.focus-mode > .main-stage { width: min(1180px,100%); margin: 0 auto; }
.episode-panel, .pulse-panel { background: rgba(23,35,38,.62); padding: 24px 18px; min-width: 0; }
.episode-panel { border-right: 1px solid var(--line); }
.pulse-panel { border-left: 1px solid var(--line); }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.panel-head h2 { font-family: "STKaiti", "KaiTi", serif; font-size: 20px; margin: 4px 0 0; letter-spacing: .08em; }
.icon-button { border: 1px solid var(--line); background: transparent; color: var(--paper); width: 30px; height: 30px; cursor: pointer; border-radius: 3px; }
.search { height: 36px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; color: var(--muted); }
.search input { width: 100%; border: 0; background: transparent; color: var(--paper); font-size: 11px; }
.search input::placeholder { color: #61706e; }
.episode-list { margin: 16px -6px 0; display: grid; gap: 5px; max-height: calc(100vh - 230px); overflow-y: auto; padding: 0 6px 20px; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
.episode-item { border: 1px solid transparent; border-left: 2px solid #42514f; background: transparent; padding: 11px 10px; color: var(--muted); text-align: left; cursor: pointer; display: grid; grid-template-columns: 35px 1fr auto; gap: 8px; align-items: start; }
.episode-item:hover { background: rgba(255,255,255,.03); }
.episode-item.active { background: rgba(240,77,62,.08); border-color: rgba(240,77,62,.16); border-left-color: var(--red); color: var(--paper); }
.episode-item .ep-no { font: 700 10px Consolas, monospace; color: var(--gold); padding-top: 2px; }
.episode-item b { font-size: 12px; display: block; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode-item p { margin: 0; font-size: 9px; color: #758481; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 4px; background: #50605d; }
.episode-item.active > .status-dot { background: var(--gold); }
.status-dot.done, .status-dot.approved { background: var(--mint); }.status-dot.draft, .status-dot.review { background: var(--gold); }.status-dot.stale { background: var(--red); box-shadow: 0 0 0 3px rgba(240,77,62,.1); }

.main-stage { min-width: 0; background: #111c1e; padding: 30px 34px 50px; overflow: auto; max-height: calc(100vh - 72px); }
.stage-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.stage-head h1 { margin: 4px 0 0; font: 700 30px/1.15 "STKaiti", "KaiTi", serif; letter-spacing: .05em; }
.stage-head p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field, .textarea-field { display: grid; gap: 7px; }
.field.full, .textarea-field.full { grid-column: 1 / -1; }
.field span, .textarea-field span { color: var(--gold); font: 700 9px Consolas, monospace; letter-spacing: .12em; }
.field input, .field select, .textarea-field textarea, .script-editor { border: 1px solid var(--line); background: var(--ink-2); color: var(--paper); border-radius: 3px; padding: 12px; resize: vertical; }
.field input, .field select { height: 42px; }
.field > small { color: var(--muted); font-size: 8px; line-height: 1.5; }
.textarea-field textarea { min-height: 108px; line-height: 1.7; }
.workflow-strip { display: grid; grid-template-columns: 1fr 44px 1fr 44px 1fr; align-items: center; margin-bottom: 24px; padding: 14px; border: 1px solid var(--line); background: rgba(23,35,38,.6); }
.workflow-strip > i { height: 1px; background: var(--line); }
.workflow-step { display: grid; grid-template-columns: 27px 1fr; column-gap: 9px; align-items: center; color: var(--muted); }
.workflow-step span { grid-row: 1 / 3; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid currentColor; font: 700 9px Consolas, monospace; }
.workflow-step b { color: var(--paper); font-size: 10px; }.workflow-step small { font-size: 8px; margin-top: 3px; }.workflow-step.active span { color: var(--red); }.workflow-step.ready span { color: var(--mint); }
.workflow-map { display: grid; grid-template-columns: minmax(0,1.35fr) 22px repeat(2,minmax(0,1fr) 22px) minmax(0,1fr); align-items: stretch; margin-bottom: 24px; border: 1px solid var(--line); background: rgba(23,35,38,.52); padding: 8px; }
.workflow-map > i { display: grid; place-items: center; color: #52605e; font: 11px Consolas,monospace; font-style: normal; }
.workflow-map-step { min-width: 0; display: grid; grid-template-columns: 27px 1fr; grid-template-rows: 1fr 1fr; column-gap: 8px; align-items: center; border: 1px solid transparent; background: transparent; color: var(--muted); padding: 9px; text-align: left; cursor: pointer; }
.workflow-map-step > span { grid-row: 1 / 3; width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid currentColor; font: 700 9px Consolas,monospace; }
.workflow-map-step b { color: var(--paper); font-size: 10px; white-space: nowrap; }
.workflow-map-step small { font-size: 8px; }
.workflow-map-step.active { border-color: rgba(216,181,108,.38); background: rgba(216,181,108,.055); }
.workflow-map-step.active > span { color: var(--gold); }
.workflow-map-step.approved:not(.active) > span, .workflow-map-step.approved:not(.active) small { color: var(--mint); }
.workflow-map-step.locked { opacity: .38; cursor: not-allowed; }
.world-contract { display: grid; grid-template-columns: 1fr minmax(260px,.8fr); gap: 20px; align-items: end; margin-bottom: 20px; padding: 18px 20px; border-left: 3px solid var(--red); background: linear-gradient(90deg,rgba(240,77,62,.07),rgba(216,181,108,.035)); }
.world-contract h2 { margin: 5px 0 0; font: 700 21px "STKaiti",serif; }
.world-contract p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.trend-receipt { margin: 20px 0 14px; border: 1px solid rgba(216,181,108,.3); background: radial-gradient(circle at 94% 0,rgba(240,77,62,.12),transparent 34%),linear-gradient(115deg,rgba(216,181,108,.065),rgba(23,35,38,.86)); padding: 18px 20px; box-shadow: 0 16px 38px rgba(0,0,0,.12); }
.trend-receipt.waiting { border-style: dashed; border-color: rgba(123,189,169,.28); background: linear-gradient(115deg,rgba(123,189,169,.055),rgba(23,35,38,.76)); }
.trend-receipt-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 22px; }
.trend-receipt h2 { margin: 6px 0 0; font: 700 22px "STKaiti",serif; }
.trend-receipt h2 + small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; }
.trend-receipt > p { max-width: 910px; margin: 14px 0 0; color: var(--paper-2); font-size: 11px; line-height: 1.75; }
.trend-receipt > p b { color: var(--gold); font: 700 15px Consolas,monospace; }
.trend-score { flex: 0 0 auto; padding: 8px 10px; border: 1px solid rgba(216,181,108,.34); color: var(--gold); font: 9px Consolas,monospace; white-space: nowrap; }
.trend-score b { font-size: 18px; }.trend-score i { color: var(--muted); font-style: normal; }
.trend-score.stale { border-color: rgba(240,77,62,.45); color: #ff887d; }
.trend-tags,.trend-signals { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.trend-tags span,.trend-signals span { padding: 6px 8px; border: 1px solid rgba(123,189,169,.2); background: rgba(123,189,169,.055); color: #b9d7ce; font-size: 8px; line-height: 1.35; }
.trend-signals span { border-color: rgba(216,181,108,.21); background: rgba(216,181,108,.04); color: #d7c594; }
.market-pattern-evidence { display: grid; grid-template-columns: minmax(180px,.7fr) repeat(auto-fit,minmax(220px,1fr)); gap: 8px; margin-top: 14px; padding: 11px 12px; border-left: 2px solid var(--red); background: rgba(240,77,62,.045); }
.market-pattern-evidence b { color: var(--paper); font: 700 10px/1.5 "STKaiti",serif; }.market-pattern-evidence span { color: var(--muted); font-size: 8px; line-height: 1.55; }
.trend-receipt footer { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; line-height: 1.6; }
.trend-receipt footer b { color: var(--gold); }.trend-receipt footer small { text-align: right; }.trend-receipt footer a { color: var(--mint); text-decoration: none; }.trend-receipt footer a:hover { text-decoration: underline; }
.world-fields textarea { min-height: 132px; }
.foundation-heading { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.world-contract + .foundation-heading { margin-top: 0; padding-top: 0; border-top: 0; }
.story-spine { margin: 15px 0 14px; padding: 18px 20px 20px; border: 1px solid rgba(216,181,108,.32); background: linear-gradient(150deg,rgba(216,181,108,.075),rgba(15,27,29,.92) 54%); box-shadow: 0 18px 42px rgba(0,0,0,.13); }
.story-spine.empty { display: grid; grid-template-columns: minmax(220px,.7fr) 1fr; align-items: center; gap: 28px; border-style: dashed; border-color: rgba(123,189,169,.28); background: rgba(123,189,169,.035); }
.story-spine.empty h3,.story-spine-head h3 { margin: 5px 0 0; font: 700 21px "STKaiti",serif; }
.story-spine.empty > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.75; }
.story-spine-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.story-spine-status { padding: 6px 9px; border: 1px solid rgba(123,189,169,.3); color: var(--mint); font: 8px Consolas,monospace; white-space: nowrap; }
.selection-brief { margin: 16px 0 18px; padding: 16px; border: 1px solid rgba(123,189,169,.22); background: linear-gradient(135deg,rgba(123,189,169,.055),rgba(9,20,22,.42)); }
.selection-brief-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }.selection-brief-title .eyebrow { width: 100%; }.selection-brief-title h4 { margin: 2px 0 0; color: var(--paper); font: 700 20px "STKaiti",serif; }.selection-brief-title small { color: var(--mint); font-size: 9px; }
.selection-brief-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 12px; }.selection-brief-tags span { padding: 4px 7px; border: 1px solid rgba(216,181,108,.2); color: var(--gold); font-size: 8px; }
.selection-brief-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }.selection-brief-grid p { margin: 0; padding: 10px 11px; border: 1px solid var(--line); background: rgba(23,35,38,.58); color: var(--paper-2); font-size: 9px; line-height: 1.65; }.selection-brief-grid p.wide { grid-column: 1 / -1; }.selection-brief-grid small { display: block; margin-bottom: 5px; color: var(--gold); font: 700 8px Consolas,monospace; letter-spacing: .08em; }
.spine-logline { max-width: 980px; margin: 14px 0 16px; color: var(--paper); font: 700 17px/1.65 "STKaiti",serif; }
.spine-duel { display: grid; grid-template-columns: 1fr 46px 1fr; align-items: stretch; gap: 10px; }
.spine-duel article { padding: 12px 14px; border: 1px solid var(--line); background: rgba(23,35,38,.74); }
.spine-duel small,.spine-reveals small { display: block; margin-bottom: 6px; color: var(--gold); font: 700 8px Consolas,monospace; letter-spacing: .1em; }
.spine-duel b { display: block; color: var(--paper); font-size: 11px; }.spine-duel p { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.spine-duel > i { display: grid; place-items: center; color: var(--red); font: 700 8px Consolas,monospace; font-style: normal; }
.story-beat-line { position: relative; display: grid; grid-template-columns: repeat(auto-fit,minmax(128px,1fr)); gap: 0; margin-top: 18px; padding-top: 11px; border-top: 1px solid rgba(240,77,62,.32); }
.story-beat-line article { position: relative; min-width: 0; padding: 13px 11px 9px 0; }
.story-beat-line article::before { content: ""; position: absolute; width: 7px; height: 7px; top: -15px; left: 0; background: var(--red); transform: rotate(45deg); }
.story-beat-line article > span { color: var(--red); font: 700 8px Consolas,monospace; }.story-beat-line small { margin-left: 5px; color: var(--gold); font-size: 8px; }.story-beat-line b { display: block; margin-top: 6px; color: var(--paper-2); font-size: 9px; line-height: 1.5; }.story-beat-line p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.spine-reveals { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 13px; }
.spine-reveals > p { margin: 0; padding: 10px 12px; border-left: 2px solid rgba(216,181,108,.5); background: rgba(216,181,108,.035); color: var(--paper-2); font-size: 9px; line-height: 1.55; }
.world-support-heading { margin-top: 38px; }
.episode-plan-action { align-self: end; min-height: 70px; border: 1px solid rgba(216,181,108,.2); background: rgba(216,181,108,.045); padding: 10px 12px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 10px; }
.episode-plan-action .eyebrow { grid-column: 1; }.episode-plan-action b { grid-column: 1; color: var(--paper); font-size: 10px; }.episode-plan-action .button { grid-column: 2; grid-row: 1 / 3; color: var(--gold); }
.character-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.character-card { border: 1px solid transparent; background: var(--paper); color: var(--ink); padding: 18px; position: relative; min-height: 180px; box-shadow: var(--shadow); text-align: left; cursor: pointer; }
.character-card::before { content: ""; position: absolute; top: 0; left: 0; width: 38px; height: 4px; background: var(--red); }
.character-card.active { border-color: var(--gold); transform: translateY(-2px); }
.character-card h3 { font: 700 20px "STKaiti", serif; margin: 7px 0 2px; }
.character-card .role { color: var(--red-deep); font-size: 9px; letter-spacing: .15em; font-weight: 700; }
.character-card p { font-size: 11px; line-height: 1.65; margin: 11px 0; }
.trait-row { display: flex; gap: 5px; flex-wrap: wrap; }
.trait-row span { border: 1px solid rgba(16,25,27,.16); padding: 4px 7px; font-size: 9px; }
.character-card small { display: block; margin-top: 13px; color: #596563; font: 9px Consolas, monospace; }
.add-character { min-height: 180px; border: 1px dashed rgba(229,222,203,.2); background: transparent; color: var(--muted); cursor: pointer; }
.voice-workbench, .relationship-workbench, .memory-workbench { margin-top: 22px; border: 1px solid var(--line); background: rgba(23,35,38,.78); padding: 20px; }
.voice-workbench { position: relative; border-top-color: rgba(216,181,108,.55); }
.voice-workbench::before { content: ""; position: absolute; left: 0; top: -1px; width: 94px; height: 3px; background: linear-gradient(90deg, var(--red), var(--gold)); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.section-heading h2 { font: 700 21px "STKaiti", serif; margin: 4px 0 0; }
.section-heading p { color: var(--muted); margin: 5px 0 0; font-size: 9px; }
.voice-trace { display: flex; align-items: center; gap: 3px; height: 26px; }
.voice-trace i { width: 3px; background: var(--gold); }
.voice-trace i:nth-child(1) { height: 7px; }.voice-trace i:nth-child(2) { height: 19px; }.voice-trace i:nth-child(3) { height: 11px; background: var(--red); }.voice-trace i:nth-child(4) { height: 24px; }.voice-trace i:nth-child(5) { height: 9px; }
.compact-grid { gap: 10px; }
.compact-grid .textarea-field textarea { min-height: 76px; }
.compact-grid textarea[data-auto-grow] { min-height: 92px; overflow-y: hidden; resize: none; }
.compact-grid .textarea-field.full textarea[data-auto-grow] { min-height: 132px; }
.identity-fields { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.voice-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.approved-lines { margin-top: 13px; }
.approved-lines textarea { min-height: 125px; }
.character-episode-evidence { margin: 2px 0 18px; padding: 16px; border: 1px solid rgba(216,181,108,.2); background: rgba(216,181,108,.04); }
.character-episode-evidence > div { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin-top: 10px; }
.character-episode-evidence article { padding: 10px 12px; border-left: 2px solid var(--gold); background: rgba(10,20,22,.45); }
.character-episode-evidence b { color: var(--gold); font: 700 10px Consolas, monospace; }
.character-episode-evidence p { margin: 5px 0 0; color: var(--paper); font-size: 10px; line-height: 1.55; }
.character-writing-details { border-top: 1px solid var(--line); padding-top: 14px; }
.character-writing-details summary { color: var(--muted); font-size: 10px; cursor: pointer; margin-bottom: 14px; }
.relationship-tabs { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 13px; }
.relationship-tabs button { border: 1px solid var(--line); background: var(--ink); color: var(--muted); padding: 7px 10px; font-size: 9px; cursor: pointer; }
.relationship-tabs button.active { color: var(--paper); border-color: var(--gold); }
.empty-inline { border: 1px dashed var(--line); color: var(--muted); padding: 18px; font-size: 10px; line-height: 1.7; }
.memory-entry { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.memory-entry input { min-height: 40px; border: 1px solid var(--line); background: var(--ink); color: var(--paper); padding: 0 12px; }
.memory-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.memory-list > span { display: flex; align-items: center; gap: 8px; border: 1px solid rgba(123,189,169,.25); background: rgba(123,189,169,.07); color: #b9d7ce; padding: 7px 9px; font-size: 9px; }
.memory-list button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.memory-list p { color: var(--muted); font-size: 9px; margin: 0; }
.state-evidence { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.state-evidence > b { color: var(--gold); font-size: 10px; }
.state-evidence p { margin: 7px 0 0; color: var(--paper); font-size: 11px; }
.state-evidence small { display: block; margin-top: 2px; color: var(--muted); font-size: 9px; }
.generated-section { margin-top: 18px; }
.outline-board { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.outline-card { border: 1px solid var(--line); background: var(--ink-2); padding: 14px; min-height: 140px; cursor: pointer; }
.outline-card:hover { border-color: rgba(216,181,108,.35); }
.outline-card.active { border-color: var(--gold); box-shadow: inset 3px 0 var(--red); }
.outline-card .no { color: var(--red); font: 700 10px Consolas, monospace; }
.outline-card h3 { margin: 7px 0; font-size: 13px; }
.outline-card p { color: var(--muted); font-size: 10px; line-height: 1.55; margin: 0; }
.outline-card { color: var(--paper); text-align: left; position: relative; }
.outline-card > .status-dot { position: absolute; right: 11px; top: 11px; }
.stage-actions, .episode-nav { display: flex; align-items: center; gap: 7px; }
.outline-layout { display: grid; grid-template-columns: minmax(260px,.78fr) minmax(360px,1.22fr); gap: 16px; align-items: start; }
.outline-layout .outline-board { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: calc(100vh - 190px); overflow-y: auto; padding-right: 5px; scrollbar-width: thin; scrollbar-color: var(--ink-3) transparent; }
.blueprint-editor { position: sticky; top: 0; border: 1px solid rgba(216,181,108,.24); background: var(--ink-2); padding: 18px; }
.blueprint-editor-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 17px; }
.blueprint-editor-head h2 { margin: 4px 0 0; font: 700 21px "STKaiti", serif; }
.episode-nav > span { color: var(--gold); font: 700 10px Consolas, monospace; padding: 0 3px; white-space: nowrap; }
.script-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.script-toolbar .tabs { display: flex; gap: 3px; }
.script-toolbar .tabs button { border: 0; background: transparent; color: var(--muted); padding: 7px 10px; font-size: 10px; cursor: pointer; }
.script-toolbar .tabs button.active { color: var(--paper); background: var(--ink-3); }
.editor-stats { font: 10px Consolas, monospace; color: var(--muted); }
.editor-stats strong { color: var(--gold); }
.script-editor { width: 100%; min-height: calc(100vh - 235px); color: #c1c8c2; font-family: "Microsoft YaHei UI", sans-serif; font-size: 14px; line-height: 1.3; padding: 28px 30px; caret-color: var(--red); }
.quality-list { display: grid; gap: 10px; }
.quality-item { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 16px; background: var(--ink-2); border-left: 3px solid var(--gold); }
.quality-item.error { border-color: var(--red); }.quality-item.ok { border-color: var(--mint); }
.quality-icon { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid currentColor; color: var(--gold); }
.quality-item.error .quality-icon { color: var(--red); }.quality-item.ok .quality-icon { color: var(--mint); }
.quality-item h3 { font-size: 12px; margin: 0 0 5px; }.quality-item p { font-size: 10px; color: var(--muted); margin: 0; }
.quality-item small { display: block; margin-bottom: 4px; color: #667573; font: 8px Consolas, monospace; letter-spacing: .08em; text-transform: uppercase; }
.quality-repair-question { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 20px; margin: 18px 0; padding: 18px 20px; border: 1px solid rgba(240,77,62,.36); border-left: 3px solid var(--red); background: linear-gradient(90deg, rgba(240,77,62,.08), rgba(23,35,38,.76)); }
.quality-repair-question h2 { margin: 6px 0 5px; font: 700 17px "STKaiti", "KaiTi", serif; }
.quality-repair-question p, .quality-repair-progress p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.quality-repair-question > div:last-child { display: flex; gap: 8px; }
.quality-repair-pass { display: flex; align-items: center; gap: 14px; margin: 18px 0; padding: 14px 16px; border-left: 3px solid var(--mint); background: rgba(123,189,169,.05); }
.quality-repair-pass b { color: #b9dccf; font-size: 11px; }.quality-repair-pass span { color: var(--muted); font-size: 9px; }
.quality-repair-progress { display: grid; gap: 7px; border-color: rgba(123,189,169,.28); border-left: 3px solid var(--mint); background: linear-gradient(90deg, rgba(123,189,169,.08), #172326 46%); }
.quality-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }
.quality-summary > div { border: 1px solid var(--line); background: var(--ink-2); padding: 12px; }
.quality-summary span { display: block; color: var(--muted); font-size: 8px; margin-bottom: 5px; }
.quality-summary b { font: 700 20px Consolas, monospace; }
.dialogue-learning-trend { margin-top: -8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dialogue-learning-trend > div { background: rgba(123,189,169,.035); }
.knowledge-spine { display: grid; grid-template-columns: 1fr 34px 1fr 34px 1fr; align-items: stretch; margin-bottom: 18px; border: 1px solid rgba(216,181,108,.22); background: linear-gradient(115deg,rgba(240,77,62,.055),rgba(216,181,108,.025) 48%,rgba(123,189,169,.055)); }
.knowledge-spine article { min-height: 150px; padding: 17px; position: relative; overflow: hidden; }
.knowledge-spine article::after { content: attr(data-mark); position: absolute; right: -2px; bottom: -23px; color: rgba(229,222,203,.035); font: 700 88px/1 "STKaiti",serif; }
.knowledge-spine > i { display: grid; place-items: center; color: #53615f; font-style: normal; font: 16px Consolas,monospace; }
.knowledge-spine article > span { color: var(--gold); font: 700 8px Consolas,monospace; letter-spacing: .14em; }
.knowledge-spine article > b { display: block; margin: 13px 0 3px; color: var(--paper); font: 700 28px Consolas,monospace; }
.knowledge-spine h3 { margin: 0 0 7px; font: 700 17px "STKaiti",serif; }
.knowledge-spine p { margin: 0; max-width: 260px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.knowledge-layout { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(250px,.72fr); gap: 16px; align-items: start; }
.knowledge-column, .recall-card, .knowledge-form { border: 1px solid var(--line); background: rgba(23,35,38,.66); padding: 18px; }
.corpus-summary { margin-bottom: 14px; }
.corpus-review { margin-bottom: 18px; padding: 0; }
.corpus-review > summary { cursor: pointer; padding: 14px 18px; color: var(--gold); font: 700 11px Consolas,monospace; list-style: none; }
.corpus-review > summary::-webkit-details-marker { display: none; }
.corpus-review > .knowledge-pages { max-height: 520px; overflow: auto; padding: 0 18px 18px; }
.corpus-source-panel { display: grid; grid-template-columns: minmax(260px,1fr) auto; gap: 12px 18px; align-items: end; margin: 14px 0; padding: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.018); }
.corpus-source-panel .field { margin: 0; }
.corpus-source-panel .stage-actions { justify-content: flex-end; }
.corpus-source-panel > p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.corpus-deep-stats { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.corpus-deep-stats span { padding: 6px 9px; border: 1px solid rgba(216,177,94,.2); color: #98a5a2; font: 10px Consolas,monospace; }
.corpus-deep-stats b { color: var(--gold); font-size: 13px; }
.knowledge-column .section-heading { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.knowledge-health { max-width: 190px; padding: 7px 9px; border: 1px solid var(--line); color: var(--muted); font-size: 8px; line-height: 1.45; }
.knowledge-health.healthy { border-color: rgba(123,189,169,.28); color: #acd2c6; }
.knowledge-health.warning { border-color: rgba(240,77,62,.32); color: #df918a; }
.knowledge-pages { display: grid; gap: 8px; }
.knowledge-page { position: relative; border-left: 2px solid var(--gold); background: var(--ink-2); padding: 13px 14px; }
.knowledge-page:has(.scope-badge.project) { border-left-color: var(--mint); }
.knowledge-page.disabled { opacity: .58; border-left-color: #59615f; }
.knowledge-page-head { display: flex; align-items: center; gap: 8px; }
.knowledge-page-head small { color: #81908d; font: 10px Consolas,monospace; }
.scope-badge { padding: 3px 6px; border: 1px solid rgba(216,181,108,.25); color: var(--gold); font-size: 7px; }
.scope-badge.project { border-color: rgba(123,189,169,.28); color: var(--mint); }
.knowledge-page h3 { margin: 9px 0 5px; font-size: 14px; }
.knowledge-page p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.knowledge-page-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.knowledge-page-actions em { color: var(--gold); font: 9px Consolas,monospace; font-style: normal; }
.knowledge-page-actions .button { min-height: 27px; padding: 4px 9px; font-size: 9px; }
.knowledge-empty { border: 1px dashed var(--line); padding: 26px; text-align: center; }
.knowledge-empty b { font: 700 17px "STKaiti",serif; }.knowledge-empty p { color: var(--muted); font-size: 9px; }
.knowledge-side { display: grid; gap: 13px; }
.recall-card { border-top-color: rgba(123,189,169,.38); }
.recall-card h2, .knowledge-form h2 { margin: 5px 0 8px; font: 700 19px "STKaiti",serif; }
.recall-card ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; }
.recall-card li { display: grid; grid-template-columns: 36px 1fr; gap: 8px; padding: 9px 0; border-top: 1px solid var(--line); }
.recall-card li > span { color: var(--mint); font: 7px Consolas,monospace; }
.recall-card li b { display: block; font-size: 11px; }.recall-card li small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.recall-card li em { display: block; margin-top: 4px; color: var(--gold); font: 8px Consolas,monospace; font-style: normal; }
.recall-card .empty-recall { display: block; color: var(--muted); font-size: 9px; line-height: 1.6; }
.knowledge-form { display: grid; gap: 11px; border-top-color: rgba(240,77,62,.42); }
.knowledge-form > p { margin: -3px 0 3px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.knowledge-form .textarea-field textarea { min-height: 118px; }
.knowledge-form .button { justify-self: stretch; }
.generated-block { white-space: pre-wrap; border: 1px solid var(--line); background: var(--ink-2); padding: 24px; line-height: 1.8; font-size: 12px; }
.dialogue-state-panel { border: 1px solid var(--line); background: rgba(23,35,38,.58); margin-bottom: 14px; }
.dialogue-state-panel summary { cursor: pointer; display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; color: var(--gold); font-size: 10px; list-style: none; }
.dialogue-state-panel summary::-webkit-details-marker { display: none; }
.dialogue-state-panel summary small { color: var(--muted); font-size: 8px; }
.dialogue-state-panel > div { padding: 0 13px 13px; }
.construction-sheet { border: 1px solid rgba(216,181,108,.27); background: linear-gradient(135deg,rgba(216,181,108,.07),rgba(23,35,38,.72)); margin-bottom: 14px; }
.construction-sheet summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 15px; list-style: none; }
.construction-sheet summary::-webkit-details-marker, .input-receipt summary::-webkit-details-marker { display: none; }
.construction-sheet summary b { display: block; margin-top: 4px; font: 700 17px "STKaiti",serif; }.construction-sheet summary small { color: var(--muted); font-size: 8px; }
.construction-sheet > .field-grid { padding: 0 15px 15px; gap: 11px; }
.construction-sheet textarea { min-height: 66px; }
.approval-badge { padding: 6px 8px; border: 1px solid var(--line); color: var(--muted); font-size: 8px; white-space: nowrap; }
.approval-badge.approved { border-color: rgba(123,189,169,.35); color: var(--mint); }.approval-badge.review, .approval-badge.draft { border-color: rgba(216,181,108,.35); color: var(--gold); }.approval-badge.stale { border-color: rgba(240,77,62,.42); color: #ff867b; }
.generation-preview, .state-preview { margin-bottom: 16px; border: 1px solid rgba(216,181,108,.32); background: #172326; padding: 16px; box-shadow: 0 18px 45px rgba(0,0,0,.18); }
.preview-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.preview-head h2, .state-preview h2 { font: 700 19px "STKaiti", serif; margin: 5px 0 0; }
.preview-head p, .state-preview > p { color: var(--muted); font-size: 9px; margin: 5px 0 0; }
.preview-head > div:last-child { display: flex; gap: 7px; }
.generation-preview pre { max-height: 360px; overflow: auto; white-space: pre-wrap; border-top: 1px solid var(--line); margin: 14px 0 0; padding: 16px 4px 4px; color: var(--paper-2); font: 12px/1.8 "Microsoft YaHei UI", sans-serif; }
.rejection-feedback { margin-top: 14px; padding: 14px; border: 1px solid rgba(240,77,62,.35); background: rgba(240,77,62,.06); }
.rejection-feedback[hidden] { display: none; }
.rejection-feedback h3 { margin: 4px 0; font-size: 14px; }.rejection-feedback p { margin: 0; color: var(--muted); font-size: 9px; }
.rejection-reasons { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; margin: 12px 0; }
.rejection-reasons label { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 7px 9px; border: 1px solid var(--line); background: var(--ink-2); color: var(--paper-2); font-size: 9px; cursor: pointer; }
.rejection-reasons input { accent-color: var(--red); }.rejection-feedback textarea { min-height: 58px; }
.rejection-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 10px; }
.logic-gate-pass, .logic-gate-legacy { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 12px; border: 1px solid rgba(106,213,181,.3); background: rgba(106,213,181,.08); color: #a9dacb; font-size: 12px; }
.logic-gate-pass b, .logic-gate-legacy b { color: #d9f4ec; }
.logic-gate-legacy { border-color: rgba(255,80,69,.35); background: rgba(255,80,69,.08); color: #e7a7a1; }
.logic-gate-legacy b { color: #ffd1cd; }
.draft-preview { border-color: rgba(123,189,169,.28); }
.draft-quality-state { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 11px; align-items: center; margin-top: 14px; padding: 12px 13px; border-radius: 4px; background: rgba(216,181,108,.06); color: #d8c69f; }
.draft-quality-state > i { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-style: normal; font: 700 12px Consolas,monospace; }
.draft-quality-state.running > i { border-top-color: transparent; animation: quality-spin 1s linear infinite; }
.draft-quality-state b, .draft-quality-state span { display: block; }.draft-quality-state b { color: var(--paper); font-size: 11px; }.draft-quality-state span { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.6; }
.draft-quality-state.passed { background: rgba(123,189,169,.07); color: var(--mint); }.draft-quality-state.review { background: rgba(216,181,108,.07); color: var(--gold); }
@keyframes quality-spin { to { transform: rotate(360deg); } }
.integrated-quality-alert { margin-top: 10px; color: var(--gold); font-size: 9px; }.integrated-quality-alert summary { cursor: pointer; }.integrated-quality-alert ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.65; }
.construction-proof { margin-top: 10px; border: 1px solid rgba(216,181,108,.2); background: rgba(7,15,16,.28); }
.construction-proof summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 11px 13px; }
.construction-proof summary::-webkit-details-marker { display: none; }.construction-proof summary b,.construction-proof summary small { display: block; }.construction-proof summary b { color: var(--paper-2); font-size: 10px; }.construction-proof summary small { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.55; }
.construction-proof summary strong { color: var(--gold); font: 700 13px Consolas,monospace; }.construction-proof.passed summary strong { color: var(--mint); }.construction-proof.failed { border-left: 2px solid var(--red); }
.construction-proof ul { list-style: none; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; margin: 0; padding: 1px; background: rgba(229,222,203,.06); }
.construction-proof li { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 8px; min-height: 48px; padding: 9px 10px; background: #142022; }.construction-proof li i { color: var(--gold); font-style: normal; }.construction-proof li.pass i { color: var(--mint); }.construction-proof li.fail i { color: var(--red); }
.construction-proof li b,.construction-proof li span { display: block; }.construction-proof li b { color: var(--paper-2); font-size: 9px; }.construction-proof li span { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.motivation-proof { margin-top: 10px; border: 1px solid rgba(123,189,169,.2); background: rgba(123,189,169,.035); }
.motivation-proof > summary { cursor: pointer; list-style: none; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 11px 13px; }.motivation-proof > summary::-webkit-details-marker { display: none; }
.motivation-proof summary b,.motivation-proof summary small,.motivation-proof.running b,.motivation-proof.running span { display: block; }.motivation-proof summary b,.motivation-proof.running b { color: var(--paper-2); font-size: 10px; }.motivation-proof summary small,.motivation-proof.running span { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.55; }.motivation-proof summary strong { color: var(--mint); font-size: 9px; }.motivation-proof.failed { border-left: 2px solid var(--red); }.motivation-proof.failed summary strong { color: var(--red); }
.motivation-proof.running { padding: 11px 13px; border-color: rgba(216,181,108,.2); }.motivation-proof ul { list-style: none; margin: 0; padding: 0 13px 11px; }.motivation-proof li { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 8px; padding: 9px 0; border-top: 1px solid rgba(229,222,203,.07); }.motivation-proof li i { color: var(--mint); font-style: normal; }.motivation-proof li b,.motivation-proof li span,.motivation-proof li em { display: block; }.motivation-proof li b { font-size: 9px; }.motivation-proof li span { margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.55; }.motivation-proof li em { margin-top: 4px; color: #a9d5c8; font-style: normal; }
.inline-quality-shell { margin-bottom: 16px; border: 1px solid rgba(123,189,169,.24); border-left: 3px solid var(--mint); background: rgba(23,35,38,.72); }
.inline-quality-shell.attention { border-color: rgba(216,181,108,.28); border-left-color: var(--gold); }
.inline-quality-shell > summary { display: flex; justify-content: space-between; gap: 18px; align-items: center; min-height: 48px; padding: 9px 17px; cursor: pointer; list-style: none; }
.inline-quality-shell > summary::-webkit-details-marker { display: none; }
.inline-quality-shell > summary div > span, .inline-quality-shell > summary div > b { display: block; }
.inline-quality-shell > summary div > b { margin-top: 3px; color: var(--paper); font: 700 14px "STKaiti",serif; }
.inline-quality-shell > summary > span { color: var(--muted); font-size: 9px; white-space: nowrap; }
.inline-quality-shell[open] > summary { border-bottom: 1px solid rgba(229,222,203,.08); }
.inline-quality-shell > .inline-quality { margin: 0; border: 0; border-left: 0; }
.inline-quality { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px 18px; align-items: center; margin-bottom: 16px; padding: 15px 17px; border: 1px solid rgba(123,189,169,.24); border-left: 3px solid var(--mint); background: linear-gradient(100deg, rgba(123,189,169,.06), rgba(23,35,38,.88) 45%); }
.inline-quality.attention { border-color: rgba(216,181,108,.28); border-left-color: var(--gold); background: linear-gradient(100deg, rgba(216,181,108,.06), rgba(23,35,38,.88) 45%); }
.inline-quality.empty { grid-template-columns: 1fr; color: var(--muted); }
.inline-quality-copy b, .inline-quality.empty b { display: block; margin: 4px 0; color: var(--paper); font: 700 15px "STKaiti",serif; }.inline-quality-copy p, .inline-quality.empty p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.inline-quality-copy { grid-column: 1; grid-row: 1; }
.inline-quality-metrics { grid-column: 1 / -1; grid-row: 2; display: grid; grid-template-columns: repeat(4,minmax(52px,1fr)); gap: 12px; padding-top: 11px; border-top: 1px solid rgba(229,222,203,.08); }
.inline-quality-metrics span { min-width: 0; }.inline-quality-metrics small, .inline-quality-metrics b { display: block; }.inline-quality-metrics small { color: var(--muted); font-size: 8px; }.inline-quality-metrics b { margin-top: 4px; color: var(--paper); font: 700 15px Consolas,monospace; }
.inline-semantic-gates { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }.inline-semantic-gates > span { min-width: 130px; padding: 8px 10px; background: rgba(255,255,255,.018); border-left: 2px solid var(--red); }.inline-semantic-gates > span.pass { border-left-color: var(--mint); }.inline-semantic-gates > span.pending { border-left-color: rgba(216,181,108,.7); background: rgba(216,181,108,.035); }.inline-semantic-gates > span.running { border-left-color: var(--mint); background: rgba(123,189,169,.045); }.inline-semantic-gates b,.inline-semantic-gates small { display: block; }.inline-semantic-gates b { color: var(--paper-2); font-size: 9px; }.inline-semantic-gates small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.inline-polish-controls { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 13px 14px; border-top: 1px solid rgba(229,222,203,.09); background: rgba(7,15,17,.28); }
.inline-polish-controls label > span { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; color: var(--paper); font-size: 14px; font-weight: 800; letter-spacing: .02em; }.inline-polish-controls label > span em { margin: 0; padding: 3px 7px; border: 1px solid rgba(216,181,108,.42); background: rgba(216,181,108,.09); color: #efd48e; font: 700 11px/1 Consolas,"Microsoft YaHei",sans-serif; letter-spacing: .05em; }
.inline-polish-controls textarea { box-sizing: border-box; width: 100%; height: 42px; min-height: 42px; resize: vertical; overflow-y: auto; border: 1px solid rgba(216,181,108,.3); background: rgba(10,20,22,.76); color: var(--paper); padding: 9px 12px; font: 12px/1.6 "Microsoft YaHei",sans-serif; outline: none; }.inline-polish-controls textarea:focus { border-color: rgba(216,181,108,.66); box-shadow: 0 0 0 2px rgba(216,181,108,.08); }.inline-polish-controls textarea::placeholder { color: #7a898b; }
.inline-polish-controls small { display: block; margin-top: 6px; color: var(--muted); font-size: 8px; line-height: 1.5; }.inline-polish-controls > .button { min-width: 124px; height: 42px; }
.inline-motive-evidence { grid-column: 1 / -1; padding-top: 9px; border-top: 1px solid var(--line); color: var(--mint); font-size: 9px; }.inline-motive-evidence summary { cursor: pointer; }.inline-motive-evidence p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }.inline-motive-evidence p b { color: var(--paper-2); }.inline-motive-evidence p em { display: block; color: #9bc9bb; font-style: normal; }
.inline-quality-details { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid var(--line); color: var(--gold); font-size: 9px; }.inline-quality-details summary { cursor: pointer; }.inline-quality-details ul { margin: 8px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.7; }
.inline-quality > .button { grid-column: 2; grid-row: 1; min-width: 118px; white-space: nowrap; }
.state-preview { border-left: 3px solid var(--mint); }
.state-origin-note { padding-left: 9px; border-left: 2px solid rgba(123,189,169,.3); color: #80908d !important; }
.state-preview.state-missing { border-left-color: var(--gold); }.state-preview.state-invalid { border-left-color: var(--red); }
.state-errors, .receipt-warnings { margin: 11px 0; padding: 8px 10px; background: rgba(240,77,62,.07); border-left: 2px solid var(--red); }.state-errors p, .receipt-warnings p { margin: 3px 0; color: #df918a; font-size: 9px; }
.state-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0; }
.state-chips span { padding: 7px 9px; border: 1px solid rgba(123,189,169,.22); color: #b9d7ce; font-size: 9px; }
.state-actions { display: flex; gap: 8px; justify-content: flex-end; }
.input-receipt { margin-top: 13px; border: 1px solid var(--line); background: rgba(6,13,14,.25); }
.input-receipt summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; padding: 10px 12px; color: var(--paper-2); font-size: 9px; }.input-receipt summary small { color: var(--muted); }
.receipt-body { padding: 0 12px 11px; }.receipt-sources { display: grid; gap: 5px; }
.receipt-sources article { display: grid; grid-template-columns: 54px 1fr; gap: 8px; padding: 8px; border: 1px solid rgba(229,222,203,.06); background: rgba(255,255,255,.018); }.receipt-sources article > span { color: var(--gold); font: 7px Consolas,monospace; text-transform: uppercase; }.receipt-sources b { display: block; font-size: 9px; }.receipt-sources p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }

.score-badge { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--red); color: var(--red); font: 700 11px Consolas, monospace; transform: rotate(3deg); }
.pulse-graph { height: 122px; border-bottom: 1px solid var(--line); position: relative; margin-bottom: 18px; }
.pulse-graph svg { width: 100%; height: 87px; overflow: visible; }
.pulse-area { fill: url(#area); }.pulse-line { fill: none; stroke: var(--red); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 7px rgba(240,77,62,.35)); }
.pulse-reversal-markers circle { fill: var(--gold); stroke: #172326; stroke-width: 1.4; filter: drop-shadow(0 0 4px rgba(216,181,108,.75)); }
.beat-labels { display: grid; grid-template-columns: repeat(5,1fr); color: #61706e; font: 8px Consolas, monospace; }
.beat-labels span { display: grid; gap: 2px; justify-items: center; }
.beat-labels span:first-child { justify-items: start; }.beat-labels span:last-child { justify-items: end; }
.beat-labels b { color: #788683; font: inherit; font-weight: 600; }.beat-labels small { color: #9baaa6; font: 700 8px Consolas,monospace; }
.beat-labels .peak b, .beat-labels .peak small { color: var(--gold); }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 16px; }
.metric { background: rgba(255,255,255,.025); padding: 10px; border: 1px solid rgba(229,222,203,.06); }
.metric span { color: var(--muted); font-size: 9px; display: block; }.metric b { font: 700 18px Consolas, monospace; color: var(--paper); }.metric i { color: var(--gold); font: 8px Consolas, monospace; font-style: normal; margin-left: 4px; }
.rule-card { border: 1px solid var(--line); padding: 0 14px; margin: 12px 0; }
.rule-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--paper); font-size: 11px; font-weight: 700; padding: 13px 0; cursor: pointer; list-style: none; }
.rule-title::-webkit-details-marker { display: none; }
.rule-title::before { content: "+"; color: var(--gold); font: 700 13px/1 Consolas,monospace; }
.rule-title span { flex: 1; }
.rule-title em { color: var(--muted); font: normal 8px/1.2 "Microsoft YaHei",sans-serif; }
.rule-card[open] .rule-title { border-bottom: 1px solid var(--line); }
.rule-card[open] .rule-title::before { content: "−"; }
.rule-card[open] .rule-title em { color: var(--gold); }
.rule-card-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 10px; color: #667573; font-size: 8px; }
.rule-card-toolbar button { border: 0; background: none; color: var(--gold); font-size: 9px; cursor: pointer; }
.rule-card dl { display: grid; grid-template-columns: 40px 1fr; gap: 8px; margin: 12px 0 14px; font-size: 9px; line-height: 1.45; }
.rule-card dt { color: #667573; }.rule-card dd { margin: 0; color: var(--paper-2); }
.hint-card { background: rgba(216,181,108,.08); border-left: 2px solid var(--gold); padding: 12px; display: grid; grid-template-columns: 18px 1fr; gap: 7px; }
.hint-card span { color: var(--gold); }.hint-card p { margin: 0; color: #a9b3b0; font-size: 9px; line-height: 1.6; }
.export-dock { position: relative; overflow: hidden; margin: 0 0 12px; padding: 16px; border: 1px solid rgba(196,154,99,.28); border-left: 3px solid #c49a63; background: linear-gradient(135deg,rgba(170,122,69,.14),rgba(196,154,99,.045) 58%,rgba(10,20,22,.5)); box-shadow: 0 15px 34px rgba(0,0,0,.14); }
.export-dock::after { content: "DOC"; position: absolute; right: -9px; top: 3px; color: rgba(216,181,108,.06); font: 900 48px/1 Consolas,monospace; letter-spacing: -.08em; pointer-events: none; transform: rotate(-4deg); }
.export-dock-copy { position: relative; z-index: 1; }
.export-dock-copy h3 { margin: 5px 0 4px; color: var(--paper); font: 700 17px/1.2 "STKaiti","KaiTi",serif; letter-spacing: .06em; }
.export-dock-copy p { margin: 0 0 13px; color: #96a3a0; font-size: 9px; line-height: 1.65; }
.export-doc-button { position: relative; z-index: 1; width: 100%; min-height: 54px; display: grid; grid-template-columns: 38px minmax(0,1fr) 18px; align-items: center; gap: 10px; padding: 7px 12px 7px 8px; border: 1px solid #c9a36d; border-radius: 4px; background: linear-gradient(135deg,#8d673f,#a57949); color: #fff8ea; text-align: left; cursor: pointer; box-shadow: 0 9px 22px rgba(79,50,25,.2); transition: transform .18s ease,filter .18s ease,box-shadow .18s ease; }
.export-doc-button:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 13px 28px rgba(94,61,30,.27); }
.export-doc-button:active { transform: translateY(0); }
.export-doc-button:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.export-doc-button.exported { border-color: #8ed6bc; background: linear-gradient(135deg,#356c5d,#4f8b76); color: #f1fff9; box-shadow: 0 9px 24px rgba(37,105,82,.3); }
.export-doc-button.exported .export-doc-symbol { border-color: rgba(241,255,249,.42); }
.export-doc-symbol { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(255,248,234,.4); background: rgba(67,42,20,.2); font: 800 9px/1 Consolas,monospace; letter-spacing: .08em; clip-path: polygon(0 0,75% 0,100% 25%,100% 100%,0 100%); }
.export-doc-label { display: grid; gap: 3px; min-width: 0; }
.export-doc-label strong { font-size: 13px; letter-spacing: .04em; }
.export-doc-label small { color: rgba(255,248,234,.74); font-size: 8px; font-weight: 500; }
.export-doc-button > i { font: normal 18px/1 Consolas,monospace; transition: transform .18s ease; }
.export-doc-button:hover > i { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .export-doc-button,.export-doc-button > i { transition: none; } }

.ai-dialog, .project-dialog, .account-dialog, .material-dialog, .admin-dialog { width: min(680px, calc(100vw - 30px)); color: var(--paper); background: #172326; border: 1px solid rgba(216,181,108,.26); padding: 0; box-shadow: 0 40px 120px rgba(0,0,0,.62); }
.material-dialog { width: min(900px, calc(100vw - 30px)); }
.admin-dialog { width: min(1120px, calc(100vw - 30px)); }
.ai-dialog::backdrop, .project-dialog::backdrop, .account-dialog::backdrop, .material-dialog::backdrop, .admin-dialog::backdrop { background: rgba(4,10,11,.72); backdrop-filter: blur(5px); }
.ai-dialog form, .project-dialog form { padding: 30px; position: relative; }.ai-dialog form { max-height: min(820px,calc(100vh - 36px)); overflow-y: auto; }
.ai-dialog h2, .project-dialog h2 { font: 700 25px "STKaiti", serif; margin: 7px 0 8px; }
.project-dialog form > p { margin: 0 0 21px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.project-form-grid { display: grid; grid-template-columns: 1fr 150px; gap: 13px; }.project-form-grid .full { grid-column: 1 / -1; }
#projectDialog[data-project-kind="adaptation"] { width: min(760px,calc(100vw - 30px)); }
.adaptation-quick-start { margin-top: 22px; }
#homeNovelDialog { width: min(1020px,calc(100vw - 30px)); max-height: calc(100dvh - 30px); overflow-y: auto; }
#homeNovelDrop { width: 100%; margin-top: 16px; }
#homeNovelFileStatus { color: var(--muted); font-size: 12px; line-height: 1.7; }
#homeNovelError { color: var(--red); }
.novel-mode-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 24px 0; }
.novel-mode-card { display: flex; flex-direction: column; gap: 12px; padding: 22px; border: 1px solid var(--line); border-top: 3px solid var(--muted); background: var(--ink); color: var(--paper); text-align: left; cursor: pointer; }
.novel-mode-card strong { font: 700 24px "STKaiti",serif; }
.novel-mode-card > span:not(.eyebrow), .novel-mode-card small { color: var(--muted); font-size: 12px; line-height: 1.7; }
.novel-mode-card[aria-pressed="true"] { border-color: var(--gold); background: rgba(216,181,108,.08); }
.novel-mode-card[data-novel-mode="continuation"][aria-pressed="true"] { border-color: var(--mint); background: rgba(123,189,169,.08); }
.novel-mode-card:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.novel-mode-info { border-left: 3px solid var(--gold); padding: 0 16px; margin-bottom: 24px; }
.novel-mode-info h3 { color: var(--paper); margin: 0 0 8px; font-size: 16px; }
.novel-mode-info p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.novel-inspiration-options { display: grid; gap: 16px; margin: 20px 0; padding: 20px; border-left: 3px solid var(--gold); background: rgba(216,181,108,.04); }
.novel-inspiration-options[hidden] { display: none; }.novel-inspiration-options > div { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.novel-inspiration-options p { margin: 0; color: var(--paper); font-size: 13px; line-height: 1.7; }.novel-inspiration-options small { color: var(--muted); line-height: 1.7; }
.novel-inspiration-options input,.novel-inspiration-options textarea { width: 100%; min-width: 0; padding: 12px; border: 1px solid var(--line); background: var(--ink); color: var(--paper); font: inherit; }
@media (max-width: 760px) { .novel-mode-grid { grid-template-columns: 1fr; } .novel-mode-card { padding: 16px; gap: 7px; } .novel-inspiration-options > div { grid-template-columns: 1fr; } }
.novel-quick-drop { position: relative; isolation: isolate; min-height: 238px; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 30px; border: 1px dashed rgba(216,181,108,.38); background: linear-gradient(145deg,rgba(216,181,108,.055),rgba(8,18,20,.42)); text-align: center; cursor: pointer; transition: border-color .2s ease,background .2s ease,transform .2s ease; }
.novel-quick-drop::after { content: "稿"; position: absolute; z-index: -1; right: 28px; bottom: -46px; color: rgba(229,222,203,.025); font: 700 230px/1 "STKaiti",serif; transform: rotate(-5deg); pointer-events: none; }
.novel-quick-drop:hover,.novel-quick-drop:focus-visible,.novel-quick-drop.dragging { outline: none; border-color: var(--gold); background: linear-gradient(145deg,rgba(216,181,108,.1),rgba(8,18,20,.5)); transform: translateY(-1px); }
.novel-quick-drop.busy { pointer-events: none; border-color: rgba(123,189,169,.62); }
.novel-drop-mark { position: relative; width: 52px; height: 58px; display: grid; place-items: center; color: var(--red); }
.novel-drop-mark i { position: absolute; inset: 0 5px 0 0; border: 1px solid rgba(240,77,62,.72); background: rgba(240,77,62,.025); }
.novel-drop-mark i::after { content: ""; position: absolute; right: -1px; top: -1px; border-top: 14px solid #172326; border-left: 14px solid transparent; }
.novel-drop-mark b { z-index: 1; font: 300 28px/1 Consolas,monospace; }
.novel-quick-drop strong { color: var(--paper); font: 700 22px "STKaiti",serif; letter-spacing: .04em; }
.novel-quick-drop small { color: var(--muted); font-size: 10px; }
.novel-import-divider { position: relative; height: 43px; display: grid; place-items: center; color: #7f8e8b; font-size: 9px; }
.novel-import-divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line); }
.novel-import-divider span { z-index: 1; padding: 0 13px; background: #172326; }
.novel-url-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 10px; }
.novel-url-row label { display: grid; gap: 7px; color: var(--gold); font-size: 10px; }
.novel-url-row input { width: 100%; height: 45px; border: 1px solid var(--line); padding: 0 14px; background: #0d181a; color: var(--paper); font-size: 12px; }
.novel-url-row input:focus { outline: 1px solid var(--gold); border-color: var(--gold); }
.novel-url-row .button { min-height: 45px; white-space: nowrap; }
.novel-quick-status { margin: 14px 0 0 !important; padding: 10px 12px; border-left: 2px solid rgba(123,189,169,.55); background: rgba(123,189,169,.055); color: #a4c8bd !important; }
.novel-quick-status[data-state="working"] { color: var(--gold) !important; border-left-color: var(--gold); background: rgba(216,181,108,.06); }
.novel-quick-status[data-state="error"] { color: #efaaa2 !important; border-left-color: var(--red); background: rgba(240,77,62,.07); }
.novel-source-rights { display: block; margin-top: 9px; color: #71807d; font-size: 8px; line-height: 1.55; }
.dialog-close { position: absolute; right: 18px; top: 14px; border: 0; background: none; color: var(--muted); font-size: 24px; cursor: pointer; }

.account-dialog form, .material-dialog > div, .admin-dialog > div { position: relative; padding: 30px; max-height: min(840px, calc(100vh - 36px)); overflow-y: auto; }
.account-dialog h2, .material-dialog h2, .admin-dialog h2 { margin: 7px 0 8px; font: 700 27px "STKaiti",serif; }
.account-dialog form > p, .material-dialog > div > p, .admin-dialog > div > p { margin: 0 0 22px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.account-fields { display: grid; gap: 14px; }
.account-error { margin: 0 0 14px; padding: 11px 13px; border: 1px solid rgba(240,77,62,.5); border-left: 3px solid var(--red); background: rgba(240,77,62,.08); color: #f0b0aa; font-size: 10px; line-height: 1.6; }
.account-mode-switch { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.account-mode-switch button { min-height: 42px; border: 0; background: #111c1e; color: var(--muted); cursor: pointer; }
.account-mode-switch button.active { color: var(--paper); background: rgba(216,181,108,.1); box-shadow: inset 0 -2px var(--gold); }
.account-recovery-link { justify-self: end; min-height: 44px; padding: 6px 0; border: 0; background: transparent; color: var(--gold); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.account-recovery-link:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.account-recovery-status { margin: 0 0 14px; padding: 11px 13px; border: 1px solid rgba(123,189,169,.4); border-left: 3px solid var(--mint); background: rgba(123,189,169,.08); color: var(--paper); font-size: 12px; line-height: 1.6; }
.account-recovery-status[data-tone="error"] { border-color: rgba(240,77,62,.5); border-left-color: var(--red); color: #f0b0aa; background: rgba(240,77,62,.08); }
.password-reset-code-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; }
.password-reset-code-row .button { min-height: 44px; margin-bottom: 0; }
@media (max-width: 480px) { .password-reset-code-row { grid-template-columns: 1fr; } .password-reset-code-row .button { width: 100%; } }
.signed-in-panel { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 18px; border: 1px solid rgba(123,189,169,.28); background: rgba(123,189,169,.045); }
.signed-in-panel > span { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid var(--mint); color: var(--mint); font: 700 20px "STKaiti",serif; }
.signed-in-panel h3 { margin: 4px 0; font: 700 18px "STKaiti",serif; }.signed-in-panel p { margin: 0; color: var(--muted); font-size: 9px; }
.credit-badge { border: 1px solid rgba(216,181,108,.42); background: rgba(216,181,108,.06); color: var(--gold); min-height: 32px; padding: 0 11px; font: 700 9px Consolas,monospace; cursor: pointer; }
.credit-dialog > div { position: relative; padding: 30px; max-height: min(840px, calc(100vh - 36px)); overflow-y: auto; }.credit-dialog h2 { margin: 7px 0 8px; font: 700 27px "STKaiti",serif; }.credit-dialog > div > p { margin: 0 0 18px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.credit-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 9px; align-items: end; padding: 18px; border-left: 3px solid var(--gold); background: rgba(216,181,108,.055); }.credit-summary b { font: 700 32px Consolas,monospace; color: var(--gold); }.credit-summary span { color: var(--paper); font-size: 11px; }.credit-summary em { color: var(--muted); font: 9px Consolas,monospace; font-style: normal; }
.credit-rates { margin-top: 12px; padding: 14px; border: 1px solid var(--line); background: var(--ink-2); }.credit-rates b { color: var(--paper); font-size: 11px; }.credit-rates p,.credit-rates small { display: block; margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; }.credit-rates small { color: var(--gold); }
.credit-ledger { display: grid; gap: 7px; margin-top: 14px; }.credit-ledger article { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; padding: 11px 13px; border: 1px solid var(--line); background: rgba(17,28,30,.78); }.credit-ledger article b { color: var(--paper); font-size: 10px; }.credit-ledger article span,.credit-ledger article small { color: var(--muted); font-size: 8px; }.credit-ledger article small { grid-column: 1 / -1; }
.material-dropzone { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; border: 1px dashed rgba(216,181,108,.38); border-left: 3px solid var(--gold); background: linear-gradient(100deg,rgba(216,181,108,.07),rgba(23,35,38,.3)); }
.material-dropzone b { display: block; font: 700 18px "STKaiti",serif; }.material-dropzone small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }
.material-list { display: grid; gap: 8px; margin-top: 18px; }
.material-item { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 13px; align-items: center; padding: 14px; border: 1px solid var(--line); background: #111c1e; }
.material-item > span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid rgba(123,189,169,.35); color: var(--mint); font: 700 8px Consolas,monospace; }
.material-item h3 { margin: 0 0 4px; font-size: 12px; }.material-item p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }.material-item-actions { display: flex; gap: 7px; }
.material-empty { padding: 40px; border: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 10px; }
.admin-user-list { display: grid; gap: 8px; }
.admin-user-row { display: grid; grid-template-columns: 42px minmax(150px,1fr) repeat(3,88px) auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line); background: #111c1e; }
.admin-user-row > span { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold); font: 700 9px Consolas,monospace; }
.admin-user-row h3 { margin: 0 0 3px; font-size: 12px; }.admin-user-row p, .admin-user-row small { margin: 0; color: var(--muted); font-size: 8px; }.admin-user-row > b { font: 700 16px Consolas,monospace; }.admin-user-row > b small { display: block; font-weight: 400; }
.admin-user-actions { display: flex; gap: 7px; }.admin-user-actions .button { min-height: 31px; padding: 0 10px; font-size: 9px; }
.admin-content-preview { margin-top: 18px; padding: 18px; border: 1px solid rgba(123,189,169,.28); background: rgba(123,189,169,.035); }
.admin-content-preview h3 { margin: 5px 0 13px; font: 700 21px "STKaiti",serif; }.admin-project-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }.admin-project-list article { padding: 12px; border: 1px solid var(--line); background: #111c1e; }.admin-project-list b { display: block; font-size: 11px; }.admin-project-list small { display: block; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.admin-project-list details { margin-top: 10px; border-top: 1px solid var(--line); }.admin-project-list summary { padding: 9px 0 2px; color: var(--gold); cursor: pointer; font-size: 9px; }.admin-project-list pre { max-height: 360px; overflow: auto; white-space: pre-wrap; color: var(--paper-2); font: 10px/1.8 "Microsoft YaHei UI",sans-serif; }
.admin-open-project { width: 100%; margin-top: 12px; }
.admin-edit-banner { position: fixed; z-index: 40; top: 10px; left: 50%; transform: translateX(-50%); min-height: 38px; display: flex; align-items: center; gap: 12px; padding: 5px 6px 5px 14px; border: 1px solid rgba(240,77,62,.55); background: rgba(29,25,24,.96); box-shadow: 0 16px 42px rgba(0,0,0,.4); color: var(--paper); }
.admin-edit-banner > span { color: #ff978c; font: 700 8px Consolas,monospace; letter-spacing: .12em; }.admin-edit-banner > b { font-size: 10px; }.admin-edit-banner button { min-height: 28px; border: 0; padding: 0 11px; background: var(--red); color: white; font-size: 9px; font-weight: 700; cursor: pointer; }
.admin-landing { min-height: 420px; display: grid; place-content: center; justify-items: start; padding: 64px; border: 1px solid rgba(216,181,108,.22); background: radial-gradient(circle at 80% 20%,rgba(123,189,169,.08),transparent 35%),linear-gradient(145deg,rgba(216,181,108,.045),rgba(10,20,22,.5)); }
.admin-landing h1 { max-width: 700px; margin: 12px 0 10px; font: 700 44px/1.18 "STKaiti",serif; }.admin-landing p { max-width: 680px; margin: 0 0 26px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.admin-control-only .library-intro,.admin-control-only .production-lanes,.admin-control-only #homeNovelBtn,.admin-control-only #homeAdaptBtn,.admin-control-only #homeCreateBtn { display: none; }
.admin-editing .material-library-button,.admin-editing .admin-console-button,.admin-editing #homeNovelBtn,.admin-editing #homeAdaptBtn,.admin-editing #homeCreateBtn,.admin-editing #newProjectBtn { display: none; }
.guest-save .save-state i { background: var(--gold); }
.action-choices { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.action-choices button { min-height: 68px; text-align: left; background: #111c1e; border: 1px solid var(--line); padding: 12px; cursor: pointer; }
.action-choices button.selected { border-color: var(--red); box-shadow: inset 3px 0 var(--red); }
.action-choices button:disabled { opacity: .38; cursor: not-allowed; }
.action-choices b { display: block; font-size: 12px; }.action-choices small { display: block; color: var(--muted); font-size: 9px; margin-top: 5px; }
.ai-context-panel { margin-top: 14px; padding: 12px; border: 1px solid rgba(216,181,108,.2); background: rgba(7,15,16,.28); }.ai-context-head { display: flex; justify-content: space-between; color: var(--gold); font-size: 9px; }.ai-context-head small { color: var(--muted); font: 7px Consolas,monospace; }.ai-context-panel .input-receipt { margin-top: 9px; }.receipt-empty { margin: 10px 0 0; color: var(--muted); font-size: 9px; }
.instruction-label { display: grid; gap: 7px; color: var(--gold); font-size: 10px; margin-top: 17px; }
.instruction-label textarea { background: #111c1e; border: 1px solid var(--line); color: var(--paper); padding: 12px; resize: vertical; }
.dialog-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; }
.dialog-footer > span { color: var(--muted); font-size: 9px; }
.dialog-footer .button span { padding-left: 12px; }
.project-rename-dialog { width: min(560px, calc(100vw - 30px)); }
.project-rename-form { padding: 30px; position: relative; }
.project-rename-panel { display: grid; gap: 17px; margin-top: 20px; padding: 18px; border: 1px solid rgba(216,181,108,.28); border-left: 2px solid var(--gold); background: rgba(216,181,108,.035); }
.project-rename-current { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(229,222,203,.1); }
.project-rename-current span { color: var(--muted); font: 8px Consolas,monospace; letter-spacing: .12em; }
.project-rename-current b { min-width: 0; color: var(--paper); font: 700 16px "STKaiti", "KaiTi", serif; overflow-wrap: anywhere; }
.project-rename-footer > div { display: flex; gap: 8px; }
.project-manage-dialog { width: min(560px, calc(100vw - 30px)); }
.project-delete-confirm p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.button.danger { color: #ffc1b6; border-color: rgba(240,77,62,.48); }
.button.danger:hover { color: white; border-color: var(--red); background: rgba(240,77,62,.12); }
.project-delete-confirm { display: grid; gap: 12px; margin-top: 20px; padding: 18px; border: 1px solid rgba(240,77,62,.3); border-left: 2px solid var(--red); background: rgba(240,77,62,.035); }
.project-delete-confirm b { color: var(--paper); }
.foundation-architecture { position: relative; margin: 16px 0 24px; padding: 22px 22px 20px 25px; border-left: 3px solid var(--red); background: radial-gradient(circle at 92% 0,rgba(240,77,62,.1),transparent 31%),linear-gradient(145deg,rgba(216,181,108,.055),rgba(10,21,23,.72)); box-shadow: 0 20px 44px rgba(0,0,0,.13); }
.foundation-architecture::before { content: ""; position: absolute; top: 0; left: 25px; right: 22px; height: 1px; background: linear-gradient(90deg,rgba(216,181,108,.58),transparent 72%); }
.foundation-architecture.empty { display: grid; grid-template-columns: minmax(250px,.72fr) 1fr; align-items: center; gap: 34px; min-height: 120px; border-left-color: var(--gold); }
.foundation-architecture.empty h3,.foundation-architecture-head h3 { margin: 5px 0 0; color: var(--paper); font: 700 23px "STKaiti",serif; }
.foundation-architecture.empty > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.foundation-architecture.warning { border-left-color: var(--gold); }
.foundation-architecture-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding-bottom: 17px; }
.foundation-architecture-head p { margin: 7px 0 0; color: var(--muted); font-size: 9px; line-height: 1.65; }
.foundation-audit { flex: 0 0 auto; margin-top: 5px; padding: 6px 9px; background: rgba(123,189,169,.08); color: var(--mint); font: 8px Consolas,monospace; white-space: nowrap; }
.foundation-architecture.warning .foundation-audit { color: var(--gold); }
.foundation-opening { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); background: rgba(7,15,16,.34); }
.foundation-opening article { display: grid; grid-template-columns: 31px minmax(0,1fr); gap: 9px; min-width: 0; padding: 13px 15px; border-right: 1px solid rgba(229,222,203,.09); }
.foundation-opening article:last-child { border-right: 0; }
.foundation-opening article > span { color: var(--red); font: 700 15px Consolas,monospace; }
.foundation-opening small,.foundation-engine small,.foundation-stage-body small,.foundation-rewards > small,.foundation-guardrails small { display: block; color: var(--gold); font: 700 8px Consolas,monospace; letter-spacing: .06em; }
.foundation-opening b { display: block; margin-top: 5px; color: var(--paper-2); font-size: 10px; line-height: 1.55; }
.foundation-engine { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin: 12px 0 18px; border-bottom: 1px solid rgba(229,222,203,.09); }
.foundation-engine p { margin: 0; padding: 10px 14px 13px 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.foundation-engine p + p { padding-left: 14px; border-left: 1px solid rgba(229,222,203,.08); }
.foundation-engine small { margin-bottom: 5px; color: var(--mint); }
.foundation-stage-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; background: rgba(229,222,203,.08); }
.foundation-stage-list > article { display: grid; grid-template-columns: 47px minmax(0,1fr); gap: 12px; min-width: 0; padding: 17px; background: #122123; }
.foundation-stage-index { padding-top: 1px; border-right: 1px solid rgba(240,77,62,.3); }
.foundation-stage-index b { display: block; color: var(--red); font: 700 17px Consolas,monospace; }
.foundation-stage-index small { display: block; margin-top: 7px; color: var(--gold); font-size: 8px; writing-mode: vertical-rl; letter-spacing: .08em; }
.foundation-stage-body { min-width: 0; }
.foundation-stage-body h4 { margin: 0 0 7px; color: var(--paper); font: 700 16px "STKaiti",serif; }
.foundation-stage-body p { margin: 6px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; overflow-wrap: anywhere; }
.foundation-stage-body p.stage-conflict { margin: 0 0 9px; color: var(--paper-2); font-size: 10px; }
.foundation-stage-body p.stage-payoff { color: #ffd993; }
.foundation-stage-body p.stage-hook { color: #ff968a; }
.foundation-stage-body small { display: inline; margin-right: 7px; }
.foundation-rewards { display: flex; align-items: stretch; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.foundation-rewards > small { display: grid; place-items: center; padding-right: 4px; color: var(--mint); }
.foundation-rewards span { flex: 1 1 170px; padding: 9px 11px; background: rgba(216,181,108,.045); color: var(--muted); font-size: 8px; line-height: 1.45; }
.foundation-rewards span b { display: block; margin-bottom: 3px; color: var(--gold); font-size: 9px; }
.foundation-guardrails { margin-top: 13px; color: var(--muted); }
.foundation-guardrails summary { width: fit-content; color: var(--mint); font-size: 9px; cursor: pointer; }
.foundation-guardrails > div { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-top: 13px; }
.foundation-guardrails p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.foundation-guardrails ol { margin: 12px 0 0; padding-left: 18px; color: var(--paper-2); font-size: 9px; line-height: 1.7; }
.outline-payoff-contract { margin-top: 18px; padding-top: 15px; border-top: 1px solid rgba(240,77,62,.34); }
.outline-payoff-contract summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--paper); cursor: pointer; list-style: none; }
.outline-payoff-contract summary::-webkit-details-marker { display: none; }
.outline-payoff-contract summary span { font: 700 16px "STKaiti",serif; }
.outline-payoff-contract summary span::before { content: "◆"; margin-right: 8px; color: var(--red); font-size: 9px; }
.outline-payoff-contract summary small { color: var(--muted); font-size: 8px; }
.outline-payoff-contract[open] summary { margin-bottom: 13px; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; background: var(--paper); color: var(--ink); padding: 12px 18px; font-size: 11px; border-left: 4px solid var(--red); box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1400px) {
  .knowledge-layout { grid-template-columns: 1fr; }
  .knowledge-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1120px) {
  .workspace { grid-template-columns: 210px minmax(430px,1fr); }.pulse-panel { display: none; }
  .outline-layout { grid-template-columns: 1fr; }.outline-layout .outline-board { max-height: 430px; grid-template-columns: repeat(3,minmax(0,1fr)); }.blueprint-editor { position: static; }
  .knowledge-layout { grid-template-columns: 1fr; }.knowledge-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .rejection-reasons { grid-template-columns: 1fr; }
  .library-topbar { height: 64px; grid-template-columns: 112px 1fr auto; }.home-brand { height: 64px; }.library-nav { padding-left: 8px; }.library-nav .eyebrow { display: none; }.library-nav strong { font-size: 15px; }.library-actions { padding-right: 9px; }.library-actions .model-badge { display: none; }.library-actions .button { padding: 0 11px; }
  .library-main { width: calc(100% - 32px); padding: 42px 0 70px; }.library-intro { grid-template-columns: 1fr; gap: 25px; padding-bottom: 30px; }.library-intro h1 { font-size: 39px; }.library-stats { width: 100%; }.library-stats span { width: auto; flex: 1; }.library-heading, .production-lane > header { align-items: flex-start; flex-direction: column; }.project-grid { grid-template-columns: 1fr; }.project-card { grid-template-columns: 46px 1fr; }.project-card-body { padding: 19px 17px; }.project-card-foot { align-items: flex-start; flex-direction: column; }.project-card-foot .button { width: 100%; }.create-project-card { min-height: 190px; }.production-lane { padding: 16px; }.production-lane > header .button { width: 100%; }
  html, body { overflow-x: hidden; }
  .shell { width: 100%; min-width: 0; overflow-x: hidden; grid-template: 64px auto 1fr / minmax(0, 1fr); }.topbar { min-width: 0; grid-template-columns: 112px minmax(0, 1fr) auto; height: 64px; }.brand { height: 64px; padding: 0 10px; border: 0; }.brand small, .save-state, .top-actions .button.ghost, .crumb-button { display: none; }.adaptation-run-badge { min-height: 29px; padding: 0 8px; }.adaptation-run-badge span { display: none; }.project-title-wrap { min-width: 0; padding-left: 8px; }.project-title-wrap > .eyebrow { display: block; }.project-title { width: 100%; font-size: 16px; }.top-actions { padding-right: 8px; }.top-actions .primary { width: 40px; padding: 0; font-size: 0; }.top-actions .primary .spark { margin: 0; font-size: 13px; }.rail { width: 100%; min-width: 0; overflow: hidden; grid-column: 1; grid-row: 2; border: 0; border-bottom: 1px solid var(--line); padding: 7px; }.rail-label, .rail-bottom { display: none; }.rail nav { width: 100%; min-width: 0; display: flex; overflow-x: auto; }.rail nav button { flex: 0 0 112px; min-width: 112px; height: 45px; }.workspace { width: 100%; min-width: 0; grid-column: 1; grid-row: 3; grid-template-columns: minmax(0, 1fr); min-height: 0; }.episode-panel { display: none; }.main-stage { max-width: 100%; max-height: none; padding: 24px 18px; }.character-grid, .field-grid, .voice-fields { grid-template-columns: 1fr; }.outline-board, .outline-layout .outline-board { grid-template-columns: 1fr 1fr; }.quality-summary { grid-template-columns: 1fr 1fr; }.preview-head, .section-heading, .stage-head,.story-spine-head,.foundation-architecture-head { align-items: flex-start; flex-direction: column; }.stage-actions, .episode-nav { width: 100%; flex-wrap: wrap; }.episode-nav .stage-ai { margin-left: auto; }.script-toolbar { align-items: flex-start; gap: 9px; flex-direction: column; }.script-editor { min-height: 65vh; padding: 20px; }.workflow-strip, .workflow-map, .knowledge-spine { grid-template-columns: 1fr; gap: 7px; }.workflow-strip > i, .workflow-map > i, .knowledge-spine > i { display: none; }.workflow-map-step { grid-template-columns: 29px 1fr; }.world-contract,.story-spine.empty,.spine-duel,.spine-reveals,.foundation-architecture.empty { grid-template-columns: 1fr; }.spine-duel > i { padding: 3px 0; }.story-beat-line { grid-template-columns: 1fr 1fr; }.foundation-opening,.foundation-stage-list { grid-template-columns: 1fr; }.foundation-opening article { border-right: 0; border-bottom: 1px solid rgba(229,222,203,.09); }.foundation-engine,.foundation-guardrails > div { grid-template-columns: 1fr 1fr; }.knowledge-spine article { min-height: 118px; border-bottom: 1px solid var(--line); }.knowledge-layout, .knowledge-side { grid-template-columns: 1fr; }.knowledge-health { max-width: none; }.episode-plan-action { grid-column: 1 / -1; }.project-form-grid { grid-template-columns: 1fr; }.project-form-grid .full { grid-column: 1; }
}
@media (max-width: 820px) {
  .trend-receipt-top { flex-direction: column; }
  .trend-receipt footer { grid-template-columns: 1fr; }
  .trend-receipt footer small { text-align: left; }
  .top-actions .contv-password-button { display: inline-flex; white-space: nowrap; padding: 0 8px; font-size: 11px; }
  .library-actions .contv-password-button { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* 小说改编：原著事实先行，之后再汇入现有创作工作流。 */
.file-button { cursor: pointer; }
.project-path-footer > div { display: flex; gap: 8px; }
.adaptation-spine { display: grid; grid-template-columns: 1fr 24px 1fr 24px 1fr 24px 1fr; align-items: stretch; margin: 0 0 18px; border: 1px solid var(--line); background: rgba(23,35,38,.48); }
.adaptation-generation-hint { margin: 14px 0 0; padding: 10px 12px; border-left: 2px solid var(--gold); background: rgba(216,181,108,.07); color: #c5b997; font-size: 10px; line-height: 1.55; }
.adaptation-generation-hint.ready { border-left-color: var(--mint); background: rgba(123,189,169,.07); color: #9acdbd; }
.adaptation-spine > i { display: grid; place-items: center; color: #52605e; font-style: normal; }
.adaptation-spine article { min-height: 70px; display: grid; grid-template-columns: 32px 1fr; align-content: center; gap: 2px 9px; padding: 12px; opacity: .42; border-top: 2px solid transparent; }
.adaptation-spine article.active { opacity: 1; border-top-color: var(--gold); background: rgba(216,181,108,.035); }
.adaptation-spine article > span { grid-row: 1 / 3; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid currentColor; color: var(--gold); font: 9px Consolas,monospace; }
.adaptation-spine article > b { font-size: 11px; }.adaptation-spine article > small { color: var(--muted); font-size: 8px; }
.adaptation-job-status { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 15px; margin: 0 0 18px; padding: 15px 17px; border: 1px solid var(--line); background: rgba(23,35,38,.78); }
.adaptation-job-status > span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid currentColor; color: var(--gold); font: 700 13px Consolas,monospace; }
.adaptation-job-status h3 { margin: 4px 0 2px; font-size: 12px; }.adaptation-job-status p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.65; }.adaptation-job-status small { color: #a29884; font-size: 8px; }
.adaptation-job-status.running { border-color: rgba(123,189,169,.34); }.adaptation-job-status.running > span { border-radius: 50%; color: var(--mint); background: rgba(123,189,169,.16); animation: adaptation-pulse 1.8s ease-in-out infinite; }
.adaptation-run-meter { min-width: 116px; display: grid; gap: 3px; padding: 8px 10px; border-left: 1px solid rgba(123,189,169,.26); text-align: right; }.adaptation-run-meter span { color: var(--muted); font: 8px Consolas,monospace; letter-spacing: .12em; text-transform: uppercase; }.adaptation-run-meter b { color: var(--paper); font: 700 19px/1 Consolas,monospace; }.adaptation-run-meter small { color: var(--mint); }
.adaptation-job-status.failed { border-color: rgba(240,77,62,.38); border-left: 3px solid var(--red); }.adaptation-job-status.failed > span { color: #ff867b; }
@keyframes adaptation-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(123,189,169,.08); opacity: .72; } 50% { box-shadow: 0 0 0 8px rgba(123,189,169,.02); opacity: 1; } }
.adaptation-source-panel { margin-bottom: 18px; padding: 22px; border: 1px solid rgba(216,181,108,.24); background: #172326; }
.adaptation-source-head, .adaptation-draft-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.adaptation-source-head h2, .adaptation-draft-head h2 { margin: 5px 0 0; font: 700 22px "STKaiti",serif; }
.source-count { padding: 7px 9px; border: 1px solid var(--line); color: var(--mint); font: 9px Consolas,monospace; white-space: nowrap; }
.source-count.over { color: #ff867b; border-color: rgba(240,77,62,.45); }
.adaptation-source-panel textarea[data-adaptation-field="sourceText"] { min-height: 370px; color: #c1c8c2; font-size: 12px; line-height: 1.9; }
.adaptation-source-field { min-width: 0; align-self: start; align-content: start; grid-template-rows: 14px 50px; gap: 8px; }
.adaptation-source-field > span { display: flex; align-items: center; min-width: 0; line-height: 14px; }
.adaptation-source-field input, .adaptation-source-field select { width: 100%; min-width: 0; height: 50px; padding-block: 0; padding-inline: 14px; line-height: 1.45; }
.adaptation-fidelity-field { grid-template-rows: 14px 50px auto; }
.adaptation-fidelity-field select { padding-right: 42px; font-size: 13px; }
.adaptation-fidelity-field > small { display: block; min-height: 24px; margin: 0; line-height: 1.55; overflow: visible; }
.adaptation-notes-field { grid-column: 1 / -1; min-width: 0; margin-top: 2px; }
.adaptation-notes-field > span { color: #e5bf66; font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif; font-size: 12px; font-weight: 700; line-height: 16px; letter-spacing: .04em; }
.adaptation-notes-field input { width: 100%; min-width: 0; height: 42px; padding: 0 14px; line-height: 42px; white-space: nowrap; overflow-x: auto; }
.adaptation-edit-scope { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(280px,1fr) auto 20px auto auto; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid rgba(216,181,108,.48); border-left: 3px solid var(--gold); background: linear-gradient(100deg,rgba(216,181,108,.09),rgba(10,20,22,.28)); }
.adaptation-edit-scope h3 { margin: 4px 0 2px; font: 700 18px "STKaiti",serif; }
.adaptation-edit-scope p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.adaptation-edit-scope > label { display: grid; grid-template-columns: auto 64px auto; align-items: center; gap: 7px; color: var(--paper-2); font-size: 10px; white-space: nowrap; }
.adaptation-edit-scope input { width: 64px; height: 42px; padding: 8px; border: 1px solid rgba(216,181,108,.58); background: #0d181a; color: var(--paper); text-align: center; font: 700 17px Consolas,monospace; }
.adaptation-edit-scope > i { color: var(--gold); font-style: normal; }
.adaptation-edit-scope > strong { padding: 10px 12px; border: 1px solid rgba(123,189,169,.32); color: var(--mint); font: 700 10px Consolas,monospace; white-space: nowrap; }
.adaptation-source-panel .field > small { color: var(--muted); font-size: 8px; line-height: 1.45; }
.adaptation-warning { margin: 13px 0; padding: 10px 12px; border-left: 3px solid var(--red); background: rgba(240,77,62,.08); color: #e6aaa4; font-size: 10px; line-height: 1.6; }
.adaptation-empty { min-height: 150px; display: flex; align-items: center; gap: 18px; padding: 28px; border: 1px dashed var(--line); background: rgba(23,35,38,.35); }
.adaptation-empty > span { color: rgba(216,181,108,.22); font: 700 62px/1 Consolas,monospace; }.adaptation-empty b { font: 700 18px "STKaiti",serif; }.adaptation-empty p { margin: 7px 0 0; color: var(--muted); font-size: 10px; }
.adaptation-draft { padding: 23px; border: 1px solid rgba(123,189,169,.26); background: #152124; }
.adaptation-draft.stale { border-color: rgba(240,77,62,.32); }
.adaptation-draft-head h2 { font-size: 26px; }.adaptation-draft-head p { max-width: 720px; margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.adaptation-story-map { margin: 0 0 16px; padding: 20px; border: 1px solid rgba(216,181,108,.3); border-left: 3px solid var(--gold); background: linear-gradient(110deg,rgba(216,181,108,.055),rgba(23,35,38,.2)); }
.adaptation-story-map h3 { margin: 6px 0 10px; font: 700 21px "STKaiti",serif; }.adaptation-story-map p { margin: 0; white-space: pre-line; color: var(--paper-2); font-size: 10px; line-height: 1.9; }
.pilot-heading { margin-top: 18px; }
.adaptation-pilot-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-bottom: 20px; }
.adaptation-pilot-grid article { display: flex; flex-direction: column; min-height: 330px; padding: 16px; border: 1px solid rgba(123,189,169,.3); border-top: 3px solid var(--mint); background: var(--ink-2); }
.adaptation-pilot-grid header { display: flex; justify-content: space-between; gap: 12px; align-items: center; }.adaptation-pilot-grid header span { color: var(--mint); font: 700 10px Consolas,monospace; }.adaptation-pilot-grid header small { color: var(--muted); font-size: 8px; text-align: right; }
.adaptation-pilot-grid h3 { margin: 13px 0 8px; font: 700 18px "STKaiti",serif; }.adaptation-pilot-grid > article > p { margin: 0 0 13px; color: var(--paper-2); font-size: 10px; line-height: 1.75; }
.adaptation-pilot-grid dl { display: grid; grid-template-columns: 34px 1fr; gap: 7px 9px; margin: 0; font-size: 9px; line-height: 1.55; }.adaptation-pilot-grid dt { color: var(--gold); }.adaptation-pilot-grid dd { margin: 0; color: var(--muted); }
.adaptation-pilot-grid footer { margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line); color: #d5a39d; font-size: 9px; line-height: 1.55; }
.source-contract-card { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(250px,.7fr); border: 1px solid rgba(216,181,108,.24); border-left: 3px solid var(--gold); }
.source-contract-card > div, .source-contract-card > aside { padding: 18px; }.source-contract-card > aside { border-left: 1px solid var(--line); background: rgba(216,181,108,.035); }
.source-contract-card h3 { margin: 5px 0 8px; font: 700 20px "STKaiti",serif; }.source-contract-card p { margin: 0; color: var(--paper-2); font-size: 10px; line-height: 1.8; }.source-contract-card small { color: var(--gold); font-size: 8px; }
.source-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0 18px; }
.source-facts article { display: grid; grid-template-columns: 34px 1fr; gap: 11px; padding: 13px; border: 1px solid var(--line); background: var(--ink-2); }
.source-facts article > span { color: var(--red); font: 9px Consolas,monospace; }.source-facts b { display: block; font-size: 10px; }.source-facts q, .adaptation-character-row q { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.adaptation-strategy-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.adaptation-strategy-grid article { min-height: 132px; padding: 14px; border-top: 2px solid var(--mint); background: rgba(23,35,38,.68); }.adaptation-strategy-grid article.risk { border-top-color: var(--red); }
.adaptation-strategy-grid span { color: var(--gold); font: 700 9px Consolas,monospace; }.adaptation-strategy-grid p { margin: 9px 0 0; color: var(--paper-2); font-size: 9px; line-height: 1.55; }
.adaptation-subhead { margin-top: 28px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }.adaptation-subhead > small { color: var(--muted); font: 9px Consolas,monospace; }
.adaptation-character-row { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.adaptation-character-row article { padding: 14px; border: 1px solid var(--line); background: var(--ink-2); }.adaptation-character-row span { color: var(--red); font-size: 8px; }.adaptation-character-row h3 { margin: 8px 0 5px; font: 700 17px "STKaiti",serif; }.adaptation-character-row p { margin: 0; color: var(--paper-2); font-size: 9px; line-height: 1.6; }
.adaptation-blocks { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.adaptation-blocks article { position: relative; overflow: hidden; padding: 16px; border: 1px solid var(--line); background: var(--ink-2); }.adaptation-blocks article > span { color: var(--gold); font: 700 11px Consolas,monospace; }.adaptation-blocks article > small { margin-left: 8px; color: var(--muted); font-size: 8px; }.adaptation-blocks h3 { margin: 12px 35px 10px 0; font-size: 11px; line-height: 1.65; }.adaptation-blocks p { margin: 6px 0; color: var(--muted); font-size: 9px; line-height: 1.55; }.adaptation-blocks p b { margin-right: 8px; color: var(--paper-2); }.adaptation-blocks footer { margin-top: 11px; padding-top: 9px; border-top: 1px solid var(--line); color: #d5a39d; font-size: 9px; }.adaptation-blocks i { position: absolute; right: 10px; top: 11px; color: rgba(229,222,203,.09); font: 700 30px Consolas,monospace; font-style: normal; }
.adaptation-receipt { border-left-color: var(--mint); }

@media (max-width: 1120px) {
  .adaptation-strategy-grid { grid-template-columns: 1fr 1fr; }
  .adaptation-character-row, .adaptation-pilot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .project-path-footer, .project-path-footer > div, .adaptation-source-head, .adaptation-draft-head { align-items: stretch; flex-direction: column; }
  .project-rename-footer { align-items: stretch; flex-direction: column; }
  .project-rename-footer > div { display: grid; grid-template-columns: 1fr 1fr; }
  .quality-repair-question { grid-template-columns: 1fr; }.quality-repair-question > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .inline-quality { grid-template-columns: 1fr; }.inline-quality-copy,.inline-quality-metrics,.inline-quality > .button { grid-column: 1; grid-row: auto; }.inline-quality-metrics { grid-template-columns: repeat(4,1fr); }.inline-quality .button { width: 100%; }.inline-polish-controls { grid-template-columns: 1fr; }.inline-polish-controls > .button { width: 100%; }
  .material-dropzone { align-items: stretch; flex-direction: column; }.material-dropzone .button { display: grid; place-items: center; }
  .material-item { grid-template-columns: 42px 1fr; }.material-item-actions { grid-column: 1 / -1; }.material-item-actions .button { flex: 1; }
  .admin-user-row { grid-template-columns: 36px 1fr 1fr; }.admin-user-row > b:nth-of-type(2), .admin-user-row > b:nth-of-type(3) { display: none; }.admin-user-actions { grid-column: 1 / -1; }.admin-project-list { grid-template-columns: 1fr; }
  .project-path-footer > div .button { flex: 1; }
  .novel-quick-drop { min-height: 190px; padding: 24px 18px; }.novel-url-row { grid-template-columns: 1fr; }.novel-url-row .button { width: 100%; }
  .adaptation-spine { grid-template-columns: 1fr 1fr; gap: 0; }.adaptation-spine > i { display: none; }
  .adaptation-job-status { grid-template-columns: 34px 1fr; }.adaptation-job-status .button, .adaptation-run-meter { grid-column: 1 / -1; }.adaptation-run-meter { border-top: 1px solid rgba(123,189,169,.26); border-left: 0; text-align: left; }
  .adaptation-source-panel, .adaptation-draft { padding: 16px; }
  .adaptation-edit-scope { grid-template-columns: 1fr 20px 1fr; }
  .adaptation-edit-scope > div, .adaptation-edit-scope > strong { grid-column: 1 / -1; }
  .adaptation-edit-scope > label { justify-content: center; }
  .source-contract-card, .source-facts, .adaptation-strategy-grid, .adaptation-character-row, .adaptation-pilot-grid, .adaptation-blocks { grid-template-columns: 1fr; }
  .source-contract-card > aside { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .project-card { grid-template-columns: 46px 1fr; }
  .project-card-foot { align-items: flex-start; flex-direction: column; }
  .project-card-actions { width: 100%; flex-wrap: wrap; }
  .project-card-actions .button { margin-left: auto; }
}
