:root { --ink:#263b31; --muted:#76817a; --line:#dce4df; --green:#26775c; --mint:#edf5ef; --red:#bd5149; }
html { background:#f4f6f4; }
body { margin:0; color:var(--ink); font:14px -apple-system,BlinkMacSystemFont,'Segoe UI','PingFang SC',sans-serif; }
button,input,textarea,select { font:inherit; }
button,.button,.icon-button { cursor:pointer; }
button,.button { min-height:36px; border:1px solid var(--line); border-radius:5px; background:white; color:var(--ink); padding:7px 13px; display:inline-flex; align-items:center; justify-content:center; gap:7px; text-decoration:none; }
button:hover,.button:hover { background:#f1f6f2; border-color:#adbbaf; }
button:disabled { opacity:.45; cursor:wait; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid #82b9a2; outline-offset:2px; }
svg.lucide { width:17px; height:17px; flex-shrink:0; }
a { color:#277559; text-underline-offset:3px; }
.primary { background:var(--green); border-color:var(--green); color:white; }
.primary:hover { background:#1f654d; border-color:#1f654d; }
.wide { width:100%; }
.app-header { height:78px; padding:0 30px; display:flex; align-items:center; justify-content:space-between; background:white; border-bottom:1px solid var(--line); gap:20px; }
.brand { display:flex; align-items:center; gap:12px; }
.brand-mark { width:42px; height:42px; border:1px solid #b8544c; color:#b8544c; display:grid; place-items:center; font:30px WenKai,serif; border-radius:3px; }
.brand h1 { font-size:20px; margin:0 0 3px; font-weight:650; }
.brand div>span { color:var(--muted); font-size:11px; }
.header-actions { display:flex; align-items:center; gap:8px; }
#saveState { font-size:12px; color:var(--muted); margin-right:8px; }
.icon-button { width:34px; height:34px; min-height:34px; padding:7px; flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; }
.workspace { display:grid; grid-template-columns:300px minmax(0,1fr); max-width:1800px; margin:0 auto; min-height:calc(100vh - 78px); }
.sidebar { background:#fff; border-right:1px solid var(--line); padding:24px; }
.sidebar section { padding-bottom:23px; margin-bottom:23px; border-bottom:1px solid var(--line); }
h2 { font-size:14px; margin:0 0 16px; font-weight:650; }
h3 { font-size:14px; margin:0 0 16px; font-weight:600; }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:13px; }
.section-heading h2,.section-heading h3 { margin:0; }
.text-button { border:0; background:transparent; padding:0; min-height:24px; font-size:12px; color:#3e795e; display:inline-flex; align-items:center; gap:5px; cursor:pointer; }
.text-button:hover { background:transparent; color:#195637; }
#characters { width:100%; resize:vertical; min-height:84px; max-height:200px; border:1px solid #bdcdc2; background:#fafcfb; border-radius:5px; padding:13px; color:var(--ink); font:25px WenKai,serif; line-height:1.6; }
.input-meta { display:flex; justify-content:space-between; align-items:center; margin:7px 0 14px; font-size:11px; color:var(--muted); }
.status { color:var(--muted); font-size:11px; line-height:1.55; margin:9px 0 0; }
.status:empty { display:none; }
.field { display:flex; flex-direction:column; gap:7px; font-size:12px; color:#5d6d61; margin-bottom:14px; min-width:0; }
.field input,.field select { width:100%; height:36px; color:var(--ink); padding:7px 9px; border:1px solid #d6dfd8; border-radius:4px; background:white; min-width:0; }
.layout-options { border:0; padding:0; margin:18px 0 14px; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.layout-options legend { font-size:12px; color:#5d6d61; margin-bottom:8px; }
.layout-options label { position:relative; }
.layout-options input { position:absolute; opacity:0; }
.layout-options span { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:5px; border:1px solid var(--line); border-radius:4px; padding:10px 5px; font-size:12px; cursor:pointer; }
.layout-options small { width:100%; text-align:center; font-size:10px; color:#6c7b71; }
.layout-options input:checked+span { border-color:#448465; background:#eef6ef; color:#226445; }
.layout-options input:focus-visible+span { outline:3px solid #82b9a2; }
.toggle-row { display:flex; align-items:center; justify-content:space-between; min-height:36px; gap:8px; font-size:12px; }
.toggle-row input { flex-shrink:0; }
.settings-section .field:has(select) { margin-top:12px; }
.word-edit-row { display:grid; grid-template-columns:minmax(80px, .8fr) minmax(100px, 1.5fr) 64px; align-items:center; gap:12px; }
.word-level { font-size:11px; color:#367255; }
.word-edit-row input[data-word-field=text] { font-family:var(--card-font, CardKaiti),WenKai,serif; font-size:21px; }
.word-edit-row .field { margin-bottom:10px; }
.component-edit-row { display:grid; grid-template-columns:65px minmax(80px,1fr) 54px 34px; gap:10px; align-items:center; }
.component-edit-row input[data-part-field=text] { font-family:var(--card-font, CardKaiti),WenKai,serif; font-size:21px; }
.component-edit-row .field { margin-bottom:10px; }
.toggle-row input[type=checkbox] { appearance:none; width:30px; height:18px; border-radius:15px; background:#cad3cc; position:relative; cursor:pointer; margin:0; }
.toggle-row input[type=checkbox]:after { content:''; position:absolute; width:12px; height:12px; border-radius:50%; background:white; top:3px; left:3px; transition:transform .15s; }
.toggle-row input:checked { background:var(--green); }
.toggle-row input:checked:after { transform:translateX(12px); }
input[type=color] { width:30px; height:25px; border:0; background:none; padding:0; cursor:pointer; }
.export-secondary { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:8px; }
.credits { color:#6f7d73; font-size:11px; line-height:1.9; }
.credits summary { cursor:pointer; }
.main-panel { min-width:0; }
.workspace-toolbar { height:65px; background:#fff; padding:0 27px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); gap:8px; }
.tabs { display:flex; height:100%; gap:25px; }
.tabs button { border:0; border-radius:0; padding:0 2px; border-bottom:3px solid transparent; background:none; font-size:13px; color:#7a867d; }
.tabs button[aria-selected=true] { border-bottom-color:var(--green); color:#276c4e; }
.document-state { font-size:11px; color:#7e8c83; white-space:nowrap; }
.document-state.dirty { color:#ba6a37; }
.preview-tools { padding:16px 28px; display:flex; align-items:center; justify-content:space-between; gap:10px; color:#647369; font-size:11px; }
.pager { display:flex; align-items:center; gap:6px; }
.pager>span { min-width:42px; text-align:center; font-variant-numeric:tabular-nums; }
.pager button { background:transparent; border-color:transparent; width:28px; height:28px; min-height:28px; padding:4px; }
.paper-workspace { padding:10px 28px 24px; min-height:440px; display:flex; justify-content:center; align-items:flex-start; }
#pdfCanvas { display:block; max-width:100%; width:100%; height:auto; background:white; box-shadow:0 3px 15px #243f2514; border:1px solid #d8dfd9; }
#pdfCanvas.portrait { max-width:680px; }
[hidden] { display:none !important; }
.empty-state { min-height:420px; width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; color:#839188; gap:10px; background:#fff; border:1px solid var(--line); }
.empty-state svg { width:32px; height:32px; }
.preview-footer { display:flex; justify-content:space-between; padding:0 28px 24px; gap:20px; color:#839086; font-size:10px; }
#previewWarning { color:#ad6d40; }
#editPanel { background:white; padding:24px 34px 40px; max-width:1050px; margin:auto; }
.character-tabs { display:flex; flex-wrap:wrap; gap:8px; padding-bottom:23px; border-bottom:1px solid var(--line); }
.character-tabs button { width:40px; height:40px; min-height:40px; font:24px WenKai,serif; padding:0; }
.character-tabs button[aria-pressed=true] { color:#227455; border-color:#438d6a; background:#edf6ef; }
.editor-heading { display:flex; align-items:center; justify-content:space-between; padding:22px 0 15px; }
.editor-heading h2 { margin:0; display:flex; align-items:center; gap:12px; }
#selectedChar { font:42px WenKai,serif; }
.editor-heading h2>span:last-child { font-size:15px; }
.danger { color:#be635a; }
.entry-warning { color:#aa6339; font-size:12px; margin:0 0 18px; line-height:1.6; }
.entry-warning:empty { display:none; }
.entry-fields { display:grid; grid-template-columns:1fr 1fr; gap:0 18px; }
.entry-fields .full { grid-column:1/-1; }
.asset-section { border-top:1px solid var(--line); margin-top:12px; padding-top:22px; }
.asset-section h3 small { color:#829086; font-size:11px; margin-left:7px; font-weight:400; }
.stroke-preview { display:flex; flex-wrap:wrap; gap:8px; padding:0 0 15px; }
.stroke-preview figure { margin:0; width:64px; text-align:center; }
.stroke-preview svg { width:64px; height:64px; display:block; }
.stroke-preview figcaption { color:#8a948f; font-size:11px; margin-top:4px; }
.stroke-preview figure.playing { background:#e9f4ed; }
.evolution-preview { display:flex; justify-content:space-around; gap:14px; padding:8px 0 16px; }
.evolution-preview figure { margin:0; text-align:center; font-size:11px; color:#78877c; }
.evolution-preview figure>img,.evolution-preview figure>svg,.evolution-preview figure>span { width:65px; height:65px; display:grid; place-items:center; object-fit:contain; margin-bottom:8px; }
.evolution-preview>img { max-width:100%; max-height:160px; object-fit:contain; }
.asset-actions,.source-actions { display:flex; flex-wrap:wrap; gap:15px; align-items:center; margin:10px 0 16px; }
.source-actions { gap:9px; }
.source-actions button,.source-actions label { font-size:12px; }
dialog { border:1px solid var(--line); border-radius:8px; padding:0; max-width:1000px; width:calc(100% - 32px); max-height:92vh; box-shadow:0 12px 60px #0003; }
dialog::backdrop { background:#1a302956; }
.dialog-heading,.dialog-actions,.source-toolbar { display:flex; align-items:center; justify-content:space-between; padding:15px 22px; gap:12px; border-bottom:1px solid var(--line); }
.dialog-heading h2 { margin:0; }
.source-toolbar { font-size:12px; color:#6a796f; padding:8px 22px; }
.source-viewport { overflow:auto; max-height:65vh; background:#eef2ef; padding:20px; }
.source-canvas-wrap { position:relative; width:100%; max-width:750px; margin:auto; line-height:0; }
#sourceCanvas { width:100%; height:auto; touch-action:none; cursor:crosshair; }
#cropBox { position:absolute; border:2px solid #1674cd; background:#1687da22; pointer-events:none; }
.dialog-actions { border-top:1px solid var(--line); border-bottom:0; font-size:12px; }
.dialog-actions a { margin-right:auto; }
.toast { position:fixed; bottom:25px; left:50%; transform:translateX(-50%); max-width:min(550px,90vw); background:#253b2f; color:white; padding:13px 20px; border-radius:5px; font-size:13px; z-index:10; box-shadow:0 4px 25px #0002; }
@media(min-width:1550px) { .workspace { grid-template-columns:330px minmax(0,1fr); } .sidebar { padding:28px; } .paper-workspace { padding-left:45px; padding-right:45px; } }
@media(max-width:950px) { .workspace { grid-template-columns:260px minmax(0,1fr); } .sidebar { padding:18px; } .workspace-toolbar { padding:0 16px; } .tabs { gap:13px; } .document-state { font-size:10px; } .preview-tools,.preview-footer { padding-left:16px; padding-right:16px; } .paper-workspace { padding:8px 16px 20px; min-height:300px; } #editPanel { padding:20px; } }
@media(max-width:700px) { .app-header { height:68px; padding:0 16px; } .workspace { display:flex; flex-direction:column; } .sidebar { padding:20px; border-right:0; border-bottom:1px solid var(--line); display:grid; grid-template-columns:1fr 1fr; gap:18px; } .sidebar section { margin:0; padding:0; border:0; } .input-section { grid-column:1/-1; } .settings-section { min-width:0; } .sidebar .credits { grid-column:1/-1; } .export-section { align-self:start; position:sticky; top:12px; } .brand h1 { font-size:18px; } #saveState { display:none; } .workspace-toolbar { height:58px; padding:0 18px; } .preview-tools { padding:13px 12px; } #paperInfo { font-size:10px; } .paper-workspace { min-height:0; padding:6px 12px 20px; } .preview-footer { flex-direction:column; gap:5px; } .document-state { max-width:90px; white-space:normal; text-align:right; } .tabs { gap:15px; } .layout-options { grid-template-columns:1fr; } .entry-fields { gap:0 12px; } .dialog-actions { flex-wrap:wrap; padding:12px; } .dialog-actions a { width:100%; } .source-viewport { padding:8px; } .source-toolbar { padding:8px 12px; } .evolution-preview { gap:5px; } .evolution-preview figure>img,.evolution-preview figure>svg,.evolution-preview figure>span { width:52px; height:52px; } }
.ui-language-select { margin-left:auto; max-width:150px; min-height:36px; padding:6px 24px 6px 9px; border:1px solid var(--line,#cbd8d0); border-radius:4px; background:white; color:var(--ink,#22382f); font:14px Arial,sans-serif; cursor:pointer; }
.ui-language-select:focus-visible { outline:2px solid #26775c; outline-offset:2px; }
/* Shared app chrome; print documents deliberately do not load this stylesheet. */
:root { --ink:#263e3a; --muted:#697a78; --line:#dce4e5; --green:#256e5c; --mint:#eef5f3; }
html { background:#f3f5f7; }
body { letter-spacing:0; }
.visually-hidden { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
body .app-header { height:88px; padding:0 28px; gap:24px; }
.brand-logo { display:flex; flex:none; align-items:center; text-decoration:none; }
.brand-logo img { display:block; width:196px; height:78px; object-fit:contain; }
.catalog-page .brand-logo img { width:250px; height:88px; }
body .brand { min-width:0; gap:16px; }
body .brand h1 { font-size:18px; line-height:1.35; margin:0; overflow-wrap:anywhere; }
.maker-page .brand>div>span { display:block; margin-top:3px; }
.maker-page .brand-logo { border-right:1px solid var(--line); padding-right:16px; }
.maker-page .workspace { max-width:none; }
.maker-page .sidebar { padding:20px; }
.maker-page .sidebar section { margin-bottom:20px; padding-bottom:20px; }
.maker-page .field { font-size:13px; gap:6px; }
.maker-page .field input,.maker-page .field select { height:39px; border-color:#cfdada; border-radius:5px; }
.maker-page .field input:hover,.maker-page .field select:hover { border-color:#90aaa4; }
.maker-page .toggle-row { font-size:13px; min-height:40px; }
.maker-page .toggle-row input[type=checkbox] { width:34px; height:20px; }
.maker-page .toggle-row input[type=checkbox]:after { width:14px; height:14px; }
.maker-page .toggle-row input:checked:after { transform:translateX(14px); }
.maker-page button,.maker-page .button { min-height:38px; }
.maker-page .icon-button { min-height:36px; width:36px; height:36px; }
.maker-page .text-button { min-height:28px; }
.maker-page .sidebar .maker-export { position:sticky; bottom:-20px; z-index:3; background:#fff; margin:0 -20px -20px; padding:16px 20px 20px; border-bottom:0; border-top:1px solid var(--line); box-shadow:0 -6px 12px #243e3708; }
.maker-export .primary { min-height:42px; font-weight:600; }
.maker-settings>summary { display:flex; align-items:center; justify-content:space-between; cursor:pointer; list-style:none; font-weight:650; padding:0 0 16px; font-size:14px; }
.maker-settings>summary::-webkit-details-marker { display:none; }
.maker-settings>summary:after { content:''; width:7px; height:7px; border-right:1.5px solid #55766b; border-bottom:1.5px solid #55766b; transform:rotate(45deg); margin-right:3px; }
.maker-settings:not([open])>summary:after { transform:rotate(-45deg); }
.maker-settings:not([open])>summary { padding-bottom:0; }
.maker-page .workspace-toolbar { background:white; }
.maker-page .workspace-toolbar .tabs button { color:#536963; font-size:13px; }
.maker-page .workspace-toolbar .tabs button[aria-selected=true] { color:var(--green); font-weight:600; }
.maker-page .main-panel { background:#edf1f4; }
.maker-page #studioCanvas,.maker-page #pdfCanvas { box-shadow:0 4px 20px #273e3f12; }
.maker-page .empty-state { border-style:dashed; background:#ffffffb8; color:#657a75; }
.maker-page .header-actions #saved { font-size:12px; color:var(--muted); }
@media(min-width:901px) {
  .maker-page .workspace { height:calc(100dvh - 88px); min-height:0; grid-template-columns:320px minmax(0,1fr); }
  .maker-page .sidebar,.maker-page .main-panel { overflow:auto; scrollbar-width:thin; scrollbar-color:#b9c9c5 transparent; min-height:0; }
  .maker-page .main-panel .workspace-toolbar { position:sticky; top:0; z-index:2; }
  .maker-page .sidebar { scroll-padding-top:16px; scroll-padding-bottom:220px; }
}
@media(max-width:900px) {
  .maker-page .workspace { display:flex; flex-direction:column; }
  .maker-page .sidebar { display:block; border-right:0; }
  .maker-page .sidebar .maker-export { position:static; margin:16px -20px -20px; }
  body .app-header { height:auto; min-height:80px; flex-wrap:wrap; padding:8px 18px; gap:8px; }
  .maker-page .brand { width:100%; gap:10px; }
  .maker-page .brand-logo { padding-right:10px; }
  .maker-page .brand-logo img { width:145px; height:55px; }
  .maker-page .brand h1 { font-size:15px; }
  .maker-page .header-actions { margin-left:auto; }
  .maker-page .header-actions #saved,.maker-page #saveState { display:none; }
  .maker-page .sidebar .maker-export button { min-height:42px; }
}
@media(prefers-reduced-motion:reduce) { *,*:before,*:after { transition:none!important; scroll-behavior:auto!important; } }
html:not([lang=zh-CN]) .tool-card strong { overflow-wrap:anywhere; }
html:not([lang=zh-CN]) .tool-card>span { min-height:78px; }
@media(max-width:700px) { .app-header { flex-wrap:wrap; height:auto; min-height:70px; gap:10px; padding:8px 16px; } .header-actions { flex-wrap:wrap; margin-left:auto; } .ui-language-select { max-width:116px; } .catalog-toolbar .tabs { height:auto; flex-wrap:wrap; } .catalog-toolbar .tabs button { white-space:normal; } }
