:root {
  --ink: #20222a;
  --muted: #777985;
  --line: #e8e7eb;
  --paper: #fbfaf8;
  --panel: #ffffff;
  --lavender: #eee9ff;
  --purple: #6c4ee8;
  --purple-dark: #4931b6;
  --coral: #ea806b;
  --green: #208861;
  --shadow: 0 12px 35px rgba(55, 42, 105, .06);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
button, textarea, select, input { font: inherit; }
button { cursor: pointer; border: 0; }
.topbar { height: 74px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.88); display: flex; align-items: center; justify-content: space-between; padding: 0 38px; position: sticky; top: 0; z-index: 5; backdrop-filter: blur(10px); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--purple); font-weight: 800; border-radius: 9px; box-shadow: 0 4px 10px rgba(108,78,232,.25); }
.brand strong { display: block; font-family: Georgia, "Songti SC", serif; font-size: 16px; letter-spacing: 1px; }
.brand span:last-child { display: block; color: #aaa9b1; font-size: 10px; margin-top: 2px; text-transform: uppercase; letter-spacing: 1px; }
.top-actions, .result-actions { display: flex; align-items: center; gap: 10px; }
.icon-button, .secondary-button, .primary-button { min-height: 36px; border-radius: 7px; padding: 0 15px; font-size: 13px; font-weight: 650; transition: .2s ease; }
.icon-button { background: transparent; color: #8c8b93; font-size: 20px; padding: 0 8px; }
.icon-button:hover, .secondary-button:hover { background: #f0eff3; color: var(--ink); }
.secondary-button { color: #55535c; background: #f1f0f2; }
.primary-button { color: white; background: var(--purple); box-shadow: 0 5px 14px rgba(108,78,232,.2); }
.primary-button:hover { background: var(--purple-dark); transform: translateY(-1px); }
.primary-button span { opacity: .7; font-size: 11px; margin-left: 7px; }
.workspace { display: flex; max-width: 1500px; margin: 0 auto; min-height: calc(100vh - 74px); }
.sidebar { width: 238px; padding: 49px 25px 28px 30px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.eyebrow { color: var(--coral); font-weight: 800; letter-spacing: 2px; font-size: 10px; }
.steps { margin-top: 28px; display: grid; gap: 9px; }
.step { display: flex; text-align: left; align-items: flex-start; gap: 12px; padding: 12px 10px; background: transparent; border-left: 2px solid transparent; color: #a09fa6; }
.step > span { font-family: Georgia, serif; font-size: 13px; padding-top: 1px; }
.step b { display: block; font-size: 13px; color: #77757f; font-weight: 700; }
.step small { display: block; font-size: 10px; margin-top: 5px; color: #b1afb5; }
.step.active { border-left-color: var(--purple); background: #f7f5ff; }
.step.active > span, .step.active b { color: var(--purple); }
.sidebar-note { border-top: 1px solid var(--line); margin-top: auto; padding-top: 21px; display: flex; gap: 10px; color: var(--purple); }
.note-icon { font-size: 19px; }
.sidebar-note b { font-size: 11px; }
.sidebar-note p { color: #96939e; font-size: 10px; line-height: 1.6; margin: 7px 0 0; }
.sidebar-footer { color: #aaa8ae; border-top: 1px solid var(--line); margin-top: 21px; padding-top: 16px; font-size: 10px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #5bb68e; margin-right: 4px; }
.content { flex: 1; max-width: 1160px; padding: 53px 58px 90px; }
.page-heading, .result-heading { display: flex; justify-content: space-between; align-items: end; }
h1, h2 { font-family: Georgia, "Songti SC", serif; font-weight: 500; letter-spacing: .2px; margin: 9px 0 7px; }
h1 { font-size: clamp(26px, 3vw, 36px); }
h2 { font-size: 22px; }
.page-heading p, .result-heading p { color: #9997a0; font-size: 12px; margin: 0; }
.heading-stat { display: flex; gap: 5px; align-items: baseline; color: #aaa8ae; margin-bottom: 4px; }
.heading-stat b { font-family: Georgia, serif; font-size: 26px; color: var(--purple); font-weight: 500; }
.heading-stat span { font-size: 11px; }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .9fr); gap: 18px; margin-top: 37px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; padding: 21px 23px 15px; }
.panel-tools { display: flex; align-items: center; gap: 9px; }
.text-button { color: var(--purple); background: transparent; font-size: 10px; font-weight: 700; padding: 4px 0; }
.text-button:hover { color: var(--purple-dark); text-decoration: underline; }
.panel-head h2 { font-family: inherit; font-size: 14px; font-weight: 750; margin: 0 0 4px; }
.hint { color: #a8a6ad; font-size: 10px; }
.badge { font-size: 9px; color: var(--coral); background: #fff0ed; padding: 5px 7px; border-radius: 4px; letter-spacing: 1px; font-weight: 800; }
.badge.purple { color: var(--purple); background: #f0edff; }
textarea { resize: vertical; display: block; border: 0; border-top: 1px solid #f0eff1; border-bottom: 1px solid #f0eff1; width: 100%; min-height: 320px; padding: 21px 23px; outline: none; color: #48464f; line-height: 1.9; font-size: 13px; background: #fff; }
textarea:focus { box-shadow: inset 0 0 0 2px rgba(108,78,232,.12); }
.compact-textarea { min-height: 72px; resize: vertical; font-size: 11px; line-height: 1.65; padding: 11px 12px; border: 1px solid #ecebee; border-radius: 5px; margin-top: 7px; background: #f8f7f8; }
.compact-textarea:focus { background: #fff; }
.panel-foot { display: flex; justify-content: space-between; color: #aaa8ae; padding: 12px 23px; font-size: 10px; }
.settings-panel { padding-bottom: 19px; }
.settings-panel > label, .field-row label { display: block; color: #77757e; font-size: 11px; font-weight: 700; padding: 0 23px; margin: 12px 0 8px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 0 23px; }
.segmented button { color: #8d8b94; background: #f6f5f6; border: 1px solid transparent; border-radius: 5px; padding: 9px 4px; font-size: 11px; }
.segmented button.selected { border-color: var(--purple); background: var(--lavender); color: var(--purple); font-weight: 700; }
.continuity-mode { grid-template-columns: repeat(2, 1fr); }
.generation-mode { grid-template-columns: repeat(2, 1fr); }
.segmented small { display: block; font-size: 9px; opacity: .7; margin-top: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.field-row label { padding-right: 10px; }
.field-row label + label { padding-left: 10px; padding-right: 23px; }
select { display: block; width: 100%; color: #68666e; background: #f8f7f8; border: 1px solid #ecebee; border-radius: 5px; outline: none; padding: 9px 10px; font-size: 11px; margin-top: 7px; }
select:focus { border-color: var(--purple); }
input { display: block; width: 100%; color: #68666e; background: #fff; border: 1px solid #e4e2e7; border-radius: 5px; outline: none; padding: 9px 10px; font-size: 11px; margin-top: 7px; }
input:focus { border-color: var(--purple); box-shadow: 0 0 0 2px rgba(108,78,232,.1); }
.api-settings { margin: 13px 23px 4px; padding: 14px; background: #f8f7f8; border: 1px solid #ebe9ee; border-radius: 7px; }
.api-settings-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 11px; }
.api-settings-head b { display: block; color: #56535e; font-size: 11px; }
.api-settings-head span { display: block; color: #aaa7af; font-size: 9px; margin-top: 3px; }
.api-settings > label, .api-field-row label { display: block; color: #77757e; font-size: 10px; font-weight: 700; margin: 0; padding: 0; }
.api-field-row { gap: 8px; margin-top: 10px; }
.api-field-row label, .api-field-row label + label { padding: 0; }
.api-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 11px; color: #aaa7af; font-size: 9px; line-height: 1.4; }
.compact-button { flex: none; min-height: 30px; padding: 0 10px; font-size: 10px; }
.connection-status { flex: none; color: #99969f !important; margin-top: 1px !important; }
.connection-status.success { color: var(--green) !important; }
.connection-status.error { color: var(--coral) !important; }
.primary-button:disabled, .secondary-button:disabled { cursor: wait; opacity: .6; transform: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.chip { color: #88868f; background: #f6f5f6; border: 1px solid transparent; border-radius: 5px; padding: 7px 9px; font-size: 10px; }
.chip.selected { color: var(--purple); background: var(--lavender); border-color: #d8d0ff; }
.action-row { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; color: #aaa8ae; font-size: 11px; }
.large { min-height: 43px; padding: 0 21px; }
.hidden { display: none; }
.result-section { margin-top: 71px; border-top: 1px solid var(--line); padding-top: 35px; }
.result-heading { align-items: center; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(235px, .6fr); gap: 18px; margin-top: 25px; align-items: start; }
.markdown-preview { border: 1px solid var(--line); border-radius: 8px; background: #fff; min-height: 400px; padding: 24px 27px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.75; color: #55525c; white-space: pre-wrap; overflow: auto; max-height: 620px; }
.markdown-preview .md-title { color: #33217f; font-family: Georgia, serif; font-size: 18px; font-weight: 600; }
.markdown-preview .md-heading { color: var(--purple); font-weight: 700; }
.markdown-preview .md-code { display: block; color: #565464; background: #f8f7fb; border-left: 3px solid #cfc6ff; padding: 9px 12px; margin: 4px 0 10px; }
.check-panel { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 20px; }
.check-title { display: flex; gap: 10px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.success-icon { display: grid; place-items: center; color: white; background: var(--green); width: 22px; height: 22px; border-radius: 50%; font-size: 13px; }
.warning-icon { background: var(--coral); }
.warning-text { color: var(--coral) !important; }
.check-title b.warning-text { color: var(--coral) !important; }
.check-title b { display: block; color: var(--green); font-size: 12px; }
.check-title small { display: block; color: #aaa8ae; font-size: 10px; margin-top: 3px; }
.checks { padding: 13px 0; border-bottom: 1px solid var(--line); }
.check-item { color: #6e6c75; font-size: 10px; padding: 6px 0; }
.check-item span { color: var(--green); font-weight: 800; margin-right: 7px; }
.continuity { display: flex; gap: 9px; padding-top: 17px; color: var(--purple); font-size: 17px; }
.continuity b { color: #65626d; font-size: 10px; display: block; padding-top: 3px; }
.continuity p { color: #99969f; font-size: 10px; line-height: 1.6; margin: 6px 0 0; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 10px 18px; color: #fff; background: #27252e; border-radius: 6px; opacity: 0; pointer-events: none; transition: .25s; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 900px) { .sidebar { width: 190px; padding-left: 17px; padding-right: 14px; } .content { padding: 38px 28px 70px; } .topbar { padding: 0 20px; } .top-actions .icon-button { display: none; } }
@media (max-width: 680px) { .topbar { height: 62px; } .brand strong { font-size: 14px; } .top-actions .secondary-button { display: none; } .workspace { display: block; } .sidebar { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 18px 14px; } .steps { display: flex; margin-top: 12px; gap: 3px; } .step { flex: 1; padding: 8px 5px; gap: 5px; border-left: 0; border-bottom: 2px solid transparent; } .step.active { border-bottom-color: var(--purple); border-left: 0; } .step small, .sidebar-note, .sidebar-footer { display: none; } .step b { font-size: 10px; } .step > span { font-size: 10px; } .content { padding: 31px 16px 55px; } .page-heading { align-items: start; } .heading-stat { display: none; } h1 { font-size: 27px; } .editor-layout, .result-layout { grid-template-columns: 1fr; } textarea { min-height: 260px; } .api-field-row { grid-template-columns: 1fr; } .api-actions { align-items: flex-end; } .action-row { align-items: flex-start; gap: 12px; } .action-row span { line-height: 1.5; } .result-heading { display: block; } .result-actions { margin-top: 17px; } }
