:root { color-scheme:light; font-family: "Segoe UI", "Microsoft YaHei", sans-serif; color:#292335; background:#f1edf5; font-synthesis:none; }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; height:100vh; display:flex; flex-direction:column; }
button, input, textarea { font:inherit; }
button, .button { border:1px solid transparent; border-radius:9px; padding:10px 15px; font-size:13px; cursor:pointer; text-decoration:none; transition:background .16s; }
button:disabled, .disabled { opacity:.45; cursor:not-allowed; }
a.disabled { pointer-events:none; }
a { color:inherit; }
:focus-visible { outline:3px solid #af91dc; outline-offset:2px; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:17px 24px; background:#251c34; color:#faf8ff; flex-shrink:0; }
.brand { display:flex; align-items:center; gap:18px; }
.brand strong { display:block; font-size:16px; font-weight:600; letter-spacing:.05em; }
.brand small { display:block; margin-top:5px; color:#baadc9; font-size:11px; letter-spacing:.1em; }
.back-link { text-decoration:none; font-size:13px; color:#dccce9; white-space:nowrap; }
.brand-divider { height:30px; width:1px; background:#55445e; }
.actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.primary { background:#cab3e8; color:#2a1c3c; font-weight:600; }
.primary:hover:not(:disabled) { background:#dfcbf8; }
.primary span { margin-left:16px; }
.secondary { background:transparent; color:inherit; border-color:#675773; }
.button { background:#42334f; color:#ede3f7; border-color:#675773; }
.workspace { display:grid; grid-template-columns:minmax(0, 49%) minmax(0, 1fr); gap:18px; min-height:0; flex:1; padding:20px 24px; }
.panel { min-width:0; min-height:0; border:1px solid #e3dce9; border-radius:16px; background:#fff; box-shadow:0 5px 24px #281b4007; overflow:hidden; display:flex; flex-direction:column; }
.panel-heading { padding:22px 24px 18px; border-bottom:1px solid #eee9f3; }
.eyebrow { display:block; font-size:10px; letter-spacing:.16em; color:#a08bab; margin-bottom:9px; }
h1, .preview-heading h2 { margin:0; font-size:22px; font-weight:600; letter-spacing:.04em; }
.panel-heading p { margin:8px 0 0; color:#8a8193; font-size:12px; }
.form-area { overflow-y:auto; padding:22px 24px 30px; }
.table-block { margin-bottom:26px; }
.table-block h2 { margin:0 0 12px; font-size:14px; font-weight:600; }
.table-subtitle { margin:-4px 0 13px; color:#8a8193; font-size:11px; line-height:1.8; }
.table-scroll { max-width:100%; overflow-x:auto; border:1px solid #e8e1ee; border-radius:8px; }
.data-table { width:100%; border-collapse:collapse; font-size:11px; }
.data-table th, .data-table td { border-right:1px solid #eee8f3; border-bottom:1px solid #eee8f3; padding:6px; text-align:center; }
.data-table th { background:#f8f5fb; font-weight:500; white-space:nowrap; }
.data-table tbody th { text-align:left; min-width:139px; position:sticky; left:0; z-index:1; }
.data-table input { width:68px; border:1px solid transparent; border-radius:4px; padding:7px 4px; text-align:center; color:#3b2e47; background:#fcfafc; font-size:12px; }
.data-table input:focus { border-color:#b298cc; background:#fff; }
.meta-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px; }
.meta-grid label { position:relative; display:block; font-size:12px; color:#6b5e77; }
.required { color:#9669b5; }
.meta-grid input { display:block; width:100%; margin-top:7px; border:1px solid #e2dbe9; border-radius:7px; padding:10px; background:#fdfcfe; }
textarea { resize:vertical; width:100%; min-height:125px; padding:12px; border:1px solid #e2dbe9; border-radius:8px; font-size:13px; line-height:1.8; }
.result-label { display:block; font-size:12px; color:#6b5e77; margin-bottom:7px; }
.hint { font-size:11px; color:#8a8193; line-height:1.8; margin-bottom:20px; }
.preview-heading { display:flex; justify-content:space-between; align-items:center; }
.live-badge { font-size:11px; color:#877293; display:flex; align-items:center; gap:6px; }
.live-badge i { width:6px; height:6px; background:#ac91c6; border-radius:50%; }
.status { margin:0; padding:10px 20px; background:#fcfafc; font-size:12px; color:#8a8193; border-bottom:1px solid #eee9f3; }
.pdf-toolbar { display:flex; align-items:center; justify-content:center; gap:10px; padding:9px; border-bottom:1px solid #eee9f3; font-size:12px; flex-wrap:wrap; }
.pdf-toolbar button { padding:6px 11px; background:#f2edf6; color:#493656; }
.toolbar-divider { width:1px; height:17px; background:#e4dce9; margin:0 6px; }
#zoomLabel { min-width:40px; text-align:center; }
#pdfViewport { flex:1; min-height:0; overflow:auto; background:#e8e3ed; padding:22px; }
#pdfCanvas { display:block; margin:0 auto; background:#fff; box-shadow:0 4px 16px #30233822; }
.empty-preview { display:flex; height:100%; min-height:260px; flex-direction:column; align-items:center; justify-content:center; color:#9a8ca7; text-align:center; }
.empty-preview h3 { font-size:16px; color:#7b698b; font-weight:500; margin:24px 0 4px; }
.empty-preview p { font-size:12px; line-height:1.9; }
.paper-icon { width:80px; height:104px; padding:27px 18px; background:#f9f6fc; border:1px solid #d8cde4; border-radius:5px; box-shadow:8px 8px 0 #e0d7e9; transform:rotate(-5deg); }
.paper-icon span { display:block; height:2px; background:#d8cbe2; margin-bottom:10px; }
.paper-icon span:last-child { width:60%; }
.preview-footer { display:flex; justify-content:space-between; gap:12px; padding:12px 18px; color:#a094aa; font-size:10px; }
.error { margin:12px 16px; padding:12px; border:1px solid #e8bac2; border-radius:8px; color:#8c2632; background:#fff4f5; white-space:pre-wrap; overflow:auto; max-height:170px; font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
@media(max-width:900px) { body { height:auto; min-height:100vh; } .topbar { align-items:flex-start; flex-direction:column; padding:18px; } .workspace { grid-template-columns:minmax(0,1fr); padding:14px; gap:14px; flex:none; } .form-area { max-height:65vh; padding:18px; } .preview-panel { height:75vh; min-height:480px; } .panel-heading { padding:18px; } .preview-footer span:last-child { display:none; } }

