    :root { color-scheme: light; --bg:#f5f7f6; --panel:#fff; --line:#dce3e0; --text:#18211e; --muted:#63716c; --accent:#176b52; --warn:#bc4e3c; }
    * { box-sizing:border-box; }
    body { margin:0; min-height:100vh; background:var(--bg); color:var(--text); font:14px/1.45 "Microsoft YaHei UI","Segoe UI",sans-serif; }
    header { min-height:86px; padding:14px 22px; border-bottom:1px solid var(--line); background:var(--panel); display:flex; gap:16px; justify-content:space-between; align-items:center; }
    .brand { display:flex; align-items:center; gap:12px; min-width:0; }
    .brand img { border-radius:8px; flex:0 0 auto; }
    .brand h1 span { color:var(--accent); }
    .back-link { color:var(--accent); font-weight:700; text-decoration:none; white-space:nowrap; }
    .back-link:hover,.back-link:focus-visible { text-decoration:underline; }
    h1 { margin:0; font-size:21px; letter-spacing:0; }
    header p { margin:4px 0 0; color:var(--muted); }
    main { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:14px; height:calc(100vh - 86px); padding:14px; }
    .work, .side { background:var(--panel); border:1px solid var(--line); border-radius:8px; min-width:0; }
    .work { display:flex; flex-direction:column; overflow:hidden; }
    .toolbar { display:flex; flex-wrap:wrap; gap:8px; padding:10px; border-bottom:1px solid var(--line); align-items:center; }
    button, .file-label { border:1px solid #b8c6c0; background:#f5f7f6; color:var(--text); border-radius:5px; padding:7px 10px; cursor:pointer; font:inherit; }
    button:hover, .file-label:hover { border-color:var(--accent); }
    button.primary { background:#176b52; border-color:#176b52; color:#fff; }
    button.primary:hover { background:#10523e; }
    button.danger { color:#963e31; }
    button:disabled { opacity:.45; cursor:not-allowed; }
    input, select { width:100%; border:1px solid #b8c6c0; background:#fff; color:var(--text); border-radius:4px; padding:7px 8px; font:inherit; }
    input[type=number] { appearance:textfield; }
    .file-label { display:inline-flex; align-items:center; gap:7px; }
    .file-label input { display:none; }
    .status { margin-left:auto; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:44%; }
    .canvas-wrap { position:relative; flex:1; min-height:240px; background:#090b0a; overflow:auto; }
    canvas { display:block; width:100%; height:100%; touch-action:none; }
    .empty,.hidden { display:none; }
    .bottom { display:grid; grid-template-columns:1fr 1fr; gap:10px; padding:10px; border-top:1px solid var(--line); }
    .bottom .hint { color:var(--muted); }
    .side { overflow:auto; padding:12px; }
    .section { border-bottom:1px solid var(--line); padding:0 0 13px; margin:0 0 13px; }
    .section:last-child { border-bottom:0; margin-bottom:0; }
    h2 { font-size:14px; margin:0 0 9px; }
    .grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
    label { display:block; color:var(--muted); font-size:12px; }
    label > input, label > select { margin-top:4px; }
    .check { display:flex; gap:7px; align-items:center; color:var(--text); margin-top:8px; }
    .check input { width:auto; }
    .image-list { display:grid; gap:5px; max-height:156px; overflow:auto; }
    .image-item { display:flex; align-items:center; gap:7px; padding:7px; border:1px solid var(--line); border-radius:4px; cursor:pointer; }
    .image-item.active { border-color:var(--accent); background:#eef7f3; }
    .image-item small { color:var(--muted); margin-left:auto; }
    .stats { color:var(--muted); display:grid; grid-template-columns:1fr 1fr; gap:5px; }
    .stats strong { display:block; color:var(--text); font-size:16px; }
    .table-wrap { max-height:230px; overflow:auto; border:1px solid var(--line); border-radius:4px; }
    table { width:100%; border-collapse:collapse; font-size:12px; }
    th,td { padding:5px 6px; border-bottom:1px solid #e1e7e4; text-align:right; white-space:nowrap; }
    th:first-child,td:first-child { text-align:left; }
    .note { color:var(--muted); font-size:12px; margin:7px 0 0; }
    .export-actions { margin-top:8px; }
    .app-import { width:100%; margin-top:8px; min-height:40px; font-weight:700; }
    @media (max-width:900px) { main { grid-template-columns:1fr; height:auto; } .work { min-height:65vh; } .status { max-width:100%; width:100%; margin-left:0; } }
    @media (max-width:500px) { header { padding:12px 14px; } .brand h1 { font-size:18px; } .brand p { font-size:12px; } main { padding:9px; gap:9px; } .bottom { grid-template-columns:1fr; } .toolbar { gap:6px; } .status { white-space:normal; } }
    @media (prefers-color-scheme:dark) { :root { color-scheme:dark; --bg:#151918; --panel:#1c211f; --line:#343b39; --text:#edf4f1; --muted:#aebbb6; --accent:#70d5b2; } button,.file-label { background:#242c28; border-color:#476259; } button.primary { background:#176b52; color:#fff; } button.danger { color:#ffb8ac; } input,select { background:#151918; border-color:#476259; } .image-item.active { background:#233a32; } th,td { border-color:#343b39; } }
