:root{--paper:#f6f7f9;--surface:#fff;--ink:#242c3c;--muted:#626e80;--line:#dce1e8;--accent:#285c77;--accent-soft:#e9f1f5;--danger:#a33334;--radius:6px;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;font-size:14px;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{border:1px solid var(--line);background:var(--surface);color:var(--ink);padding:8px 11px;border-radius:var(--radius);cursor:pointer;line-height:1.35;white-space:nowrap;min-height:36px}button:hover{background:var(--accent-soft);border-color:#9eafbc}button:active{background:#dce9ef}button:disabled{color:#7c8592;background:#eef0f3;border-color:#e0e4e9;cursor:not-allowed}button.primary{background:var(--accent);border-color:var(--accent);color:#fff}button.primary:hover{background:#1c4961}button.primary:disabled{background:#d2dce2;border-color:#d2dce2;color:#526675}.danger-text{color:var(--danger)}.text-button{border:0;padding-left:0;background:transparent;color:var(--accent);justify-self:start}input,select{min-width:0;width:100%;padding:9px 10px;border:1px solid #bfc7d1;background:#fff;color:var(--ink);border-radius:var(--radius);min-height:38px;caret-color:var(--accent)}input::placeholder{color:#687588}input[type=checkbox]{accent-color:var(--accent);width:16px;height:16px;min-height:0;margin:0}input[type=range]{accent-color:var(--accent);width:88px;padding:0;min-height:24px}input[type=color]{width:28px;min-height:28px;height:28px;padding:2px;cursor:pointer}label{display:grid;gap:7px;font-size:12px;color:#4f5d70}a{color:var(--accent);text-underline-offset:3px}::selection{background:#bfdae6;color:#152f40}:focus-visible{outline:3px solid #397b9c;outline-offset:3px}*{scrollbar-width:thin;scrollbar-color:#b6c1cd transparent}h1,h2,h3,p{margin:0}h1{font-size:24px;font-weight:650;letter-spacing:-.02em}h2{font-size:16px;font-weight:650}h3{font-size:14px;font-weight:650;margin:22px 0 12px}small,.hint,.canvas-hint{font-size:12px;line-height:1.7;color:var(--muted)}.muted{color:var(--muted)}[hidden]{display:none!important}.full{width:100%}.paired{display:grid;grid-template-columns:1fr 1fr;gap:10px}.inline{display:flex;align-items:center;gap:7px;white-space:nowrap;font-size:12px}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.topbar{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:20px;padding:0 24px}.brand{display:flex;gap:12px;align-items:baseline}.brand strong{font-size:20px;letter-spacing:-.02em}.brand span{font-size:12px;color:var(--muted)}.topbar nav{display:flex;align-self:stretch;gap:8px}.topbar nav button{border:0;border-radius:0;padding:0 15px;background:transparent;border-bottom:2px solid transparent}.topbar nav button[aria-current=page]{color:var(--accent);border-bottom-color:var(--accent);font-weight:650}.account{display:flex;gap:8px;align-items:center;font-size:12px}.account button{font-size:12px}.notice{position:sticky;top:0;z-index:6;padding:12px 24px;background:#e8f1f4;color:#24485e;border-bottom:1px solid #afc9d7;font-size:13px;line-height:1.6}.notice.error{background:#fbedeb;border-color:#dfb5b0;color:#8b2c2b}.workbench{display:grid;grid-template-columns:248px minmax(440px,1fr) 276px;min-height:calc(100dvh - 68px)}.catalog{background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;height:calc(100dvh - 68px);position:sticky;top:0}.catalog .section-head{padding:22px 16px 18px}.catalog .small{padding:7px 9px;font-size:12px}.search{margin:0 16px 12px}.catalog-filters{display:flex;gap:8px;margin:0 16px 16px}.catalog-filters select{font-size:12px}.catalog-filters button{font-size:12px}.level-list{overflow:auto;flex:1;min-height:160px;padding:0 8px 16px}.level-row{width:100%;display:flex;align-items:center;gap:12px;text-align:left;border:0;border-radius:6px;background:transparent;padding:11px 10px;min-height:64px}.level-row[aria-current=true]{background:var(--accent-soft);color:#204e66}.level-number{width:27px;flex-shrink:0;font-variant-numeric:tabular-nums;font-size:18px;color:#66768a}.level-meta{display:flex;flex-wrap:wrap;gap:4px 7px;font-size:12px;color:var(--muted)}.status-published{color:#24614e}.status-archived{color:#775e3c}.catalog-footer{padding:14px 16px;border-top:1px solid var(--line);display:flex;gap:8px}.catalog-footer button{flex:1;font-size:12px}.drawing{min-width:0;padding:24px 26px 20px}.editor-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:24px}.editor-heading p{font-size:12px;margin-top:9px;overflow-wrap:anywhere}.save-actions{display:flex;align-items:center;gap:10px}.save-actions span{font-size:12px;color:var(--muted);max-width:100px}.toolbar,.palette-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.toolbar button,.palette-bar button,.selection-tools button{font-size:12px}.tool-group{display:flex;gap:0}.tool-group button{border-radius:0;margin-right:-1px}.tool-group button:first-child{border-radius:6px 0 0 6px}.tool-group button:last-child{border-radius:0 6px 6px 0}.tool-group button[aria-pressed=true]{background:var(--accent);color:#fff;border-color:var(--accent);position:relative}.palette-bar{font-size:12px;color:var(--muted);margin:14px 0}.palette{display:flex;gap:6px}.swatch{width:24px;height:24px;min-height:24px;padding:0;border:2px solid transparent;border-radius:4px}.swatch[aria-pressed=true]{outline:2px solid #3e5068;outline-offset:2px}.custom-color{display:flex;align-items:center;gap:5px}.cell-info{margin-left:auto;font-variant-numeric:tabular-nums}.canvas-viewport{background:#e9edf2;overflow:auto;padding:12px;max-height:calc(100dvh - 310px);min-height:310px;scrollbar-gutter:stable;border:1px solid #d1d9e3;border-radius:6px}.canvas-viewport canvas{display:block;max-width:none;touch-action:none;cursor:crosshair;width:100%;height:auto;outline-offset:0}#canvas-wrap{width:100%;min-width:380px;margin:auto}.canvas-footer{display:flex;justify-content:space-between;gap:10px;padding:12px 0;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}.selection-tools{display:flex;align-items:center;flex-wrap:wrap;gap:6px;border-top:1px solid var(--line);padding-top:12px}.selection-tools span{font-size:12px;flex:1;min-width:90px;color:var(--muted)}.canvas-hint{margin-top:12px;max-width:70ch}.properties{padding:24px 20px;background:#fff;border-left:1px solid var(--line)}.properties h2{margin-bottom:20px}.properties form{display:grid;gap:14px}.properties form h3{margin:7px 0 0}.properties .hint{margin-top:0}.properties details{border-top:1px solid var(--line);padding-top:14px;margin-top:4px}.properties summary{cursor:pointer;font-size:12px;color:#4a596e;padding:5px 0}.properties details .paired{margin:12px 0}.release{border-top:1px solid var(--line);margin-top:24px}.release>button,.release>.paired,.release>label{margin-top:10px}.release .hint{padding-bottom:6px}.release button{font-size:12px}.empty{padding:64px 16px;max-width:480px}.empty p{margin:15px 0 24px;line-height:1.8;color:var(--muted)}.report{padding:36px;max-width:1250px;margin:auto}.report p{margin:14px 0 28px;line-height:1.8}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;background:white;text-align:left;font-size:12px;font-variant-numeric:tabular-nums}td,th{padding:13px 16px;border-bottom:1px solid var(--line);line-height:1.65;vertical-align:top}th{background:#edf1f5;color:#526074;font-weight:550}td.detail{max-width:500px;overflow-wrap:anywhere}.login-shell{min-height:100dvh;display:grid;place-items:center;padding:30px}.login-form{width:360px;max-width:100%;display:grid;gap:20px}.login-form h1{font-size:32px}.login-form>p:first-of-type{color:var(--muted);margin:-8px 0 15px}#login-error{color:var(--danger);font-size:13px}.login-form small{margin-top:8px}dialog{padding:28px;border:1px solid var(--line);border-radius:12px;width:540px;max-width:calc(100% - 32px);max-height:85dvh;overflow:auto;color:var(--ink);background:#fff}dialog::backdrop{background:#17233477}dialog form{display:grid;gap:16px}dialog h3{border-top:1px solid var(--line);padding-top:20px;margin-top:24px}#users{margin-bottom:20px}.user-row{display:flex;align-items:center;gap:12px;padding:9px 0;font-size:12px}.user-row span{flex:1}.mobile-only{display:none}
@media(min-width:1600px){.workbench{grid-template-columns:270px minmax(500px,1fr) 300px}.drawing{padding:28px 42px}.canvas-viewport{max-height:calc(100dvh - 315px)}#canvas-wrap{max-width:850px}}
@media(max-width:1100px){.workbench{grid-template-columns:210px minmax(390px,1fr)}.properties{grid-column:2;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:0 28px}.properties>h2{grid-column:1/-1}.release{margin-top:0;border-top:0}.release h3{margin-top:0}.catalog{grid-row:1/3}.drawing{padding:22px 18px}.topbar{padding:0 16px;gap:12px}.brand span{display:none}.account>span{display:none}.save-actions{align-items:flex-end;flex-direction:column;gap:5px}.save-actions span{max-width:none}.canvas-viewport{max-height:640px}.cell-info{display:none}}
@media(max-width:700px){.topbar{height:auto;min-height:104px;flex-wrap:wrap;gap:0;padding:14px 16px 0}.brand strong{font-size:18px}.account{margin-left:auto}.account button{font-size:12px;padding:6px 8px}.topbar nav{order:3;width:100%;height:44px;gap:0}.topbar nav button{flex:1;font-size:12px;padding:0 10px}.workbench{display:block}.catalog{display:none;height:70dvh;position:relative;border-right:0;border-bottom:1px solid var(--line)}.catalog.open{display:flex}.drawing{padding:20px 14px}.editor-heading{margin-bottom:20px;gap:8px}.editor-heading h1{font-size:20px;margin-top:10px}.editor-heading p{max-width:190px}.mobile-only{display:inline-block;font-size:12px;min-height:30px;padding:4px 8px}.save-actions{padding-top:7px}.save-actions button{font-size:12px}.toolbar{gap:8px}.toolbar>.inline{font-size:12px}.tool-group{width:100%}.tool-group button{flex:1}.palette-bar{gap:10px}.palette-bar button{min-height:32px}.palette-bar .swatch{min-height:24px}.canvas-viewport{max-height:490px;padding:6px}#canvas-wrap{min-width:350px}.canvas-footer{flex-wrap:wrap;row-gap:12px}.properties{display:block;border-left:0;padding:24px 20px}.release{border-top:1px solid var(--line);margin-top:24px}.release h3{margin-top:20px}.report{padding:24px 16px}.report h1{font-size:22px}.report .section-head{align-items:flex-start}.notice{padding:10px 16px}.canvas-hint{font-size:12px}}



.notice{position:relative;top:auto;right:auto;max-width:none;display:flex;align-items:center;gap:20px;border:0;border-bottom:1px solid #afc9d7;border-radius:0;box-shadow:none}.notice-text{flex:1}.notice-close{flex:none;background:transparent;font-size:12px}@media(max-width:700px){.notice{top:auto;right:auto;max-width:none;gap:12px;align-items:flex-start}.notice-close{padding:6px;min-height:30px}}
.toolbar select{width:auto;font-size:12px}.selection-properties{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}.selection-properties>p{flex-basis:100%}.selection-properties button{font-size:12px}.user-row{display:block;border-bottom:1px solid var(--line);padding:16px 0}.user-summary{display:flex;gap:16px;justify-content:space-between;margin-bottom:10px}.user-summary span{flex:none;color:var(--muted)}.user-row summary{cursor:pointer;color:var(--accent);padding:8px 0}.user-row form{padding:12px 0}.user-row .inline{flex-direction:row-reverse;justify-content:flex-end}.diff-previews{display:grid;grid-template-columns:1fr 1fr;gap:24px}.diff-previews figure{margin:0}.diff-previews canvas{width:100%;height:auto;max-width:520px}.diff-previews figcaption{font-size:14px;margin-bottom:12px}.report .diff-summary{margin:24px 0 16px}.report details{margin-top:24px}.report summary{padding:10px 0;cursor:pointer}.report>#report-body>label{max-width:360px}
@media(max-width:700px){.diff-previews{grid-template-columns:1fr}.selection-properties{align-items:stretch}.selection-properties>label{flex:1;min-width:140px}.user-summary{flex-wrap:wrap;gap:8px}}

.extra-drawing{margin-top:8px}.extra-drawing>summary{cursor:pointer;color:var(--accent);padding:12px 0;font-size:13px}.extra-drawing .selection-tools{border-top:0;padding-top:6px}.history-tools>label,.history-tools>button,.history-tools>.paired{margin-top:12px}.history-tools>button{width:100%}.conflict-actions{display:flex;flex-wrap:wrap;gap:12px;margin:24px 0}

/* Whole-field fit is the default; zoom enlarges the same editable grid. */
#canvas-wrap{min-width:0;max-width:none}
.board-guide{font-size:12px;color:var(--muted);line-height:1.7;margin:0 0 10px}
#zoom-value{min-width:36px}
