:root{color-scheme:dark;color:#e6eef8;background:#0a0f18;--line:#2b3648;--muted:#9aabc2;--blue:#4386fa}
body,.workspace{background:#0a0f18}header{background:#111824}.sidebar{background:#090e17}
.card,.hero{background:#141d2a;border-color:var(--line)}.hero img{mix-blend-mode:normal}.hero-bottom{background:#141d2af2;border-color:var(--line)}
h1,h2,h3,.quick,.breadcrumb b{color:#e6eef8}.heading p,.muted,.test-top p,.capture-card p,.wire-inspector label,.wire-inspector output,.padded label,.device-card>p,.quick p,.quick small,dt,.wire-legend,.hardware-title,.hardware-foot{color:#a4b4cb}
.eyebrow,.wire-card-head .eyebrow{color:#8caee4}.breadcrumb,.header-right,.section-heading span,footer{color:#a0aec2}
header,footer,.hero-bottom,.quick small,dl div,.wire-legend,.wire-direction,.hardware-title,.hardware-foot{border-color:var(--line)}dd{color:#d3e0f1}
.outline,.padded select,.wire-inspector select,.test-toolbar select{background:#1b2739;color:#d7e5f7;border-color:#36465e}.outline:hover{background:#273b57;color:#fff}
.pill,.status,.avatar,.file-meta,.key-grid label,.map-chip,.socd-preview,.mapping-flow,.auto-input-device,.part-state,.capture-prompt,.live-result-keys span,#capture-summary span{background:#1b283b;color:#b8cbe5;border-color:#34445d}
.status.connected{background:#173a31;color:#75e4b2}.notice,.bridge-card{background:#172840;color:#b9cce8;border-color:#304565}
.padded .upload,.quick-icon,.device-symbol,.steps li:before{background:#1b2c45;border-color:#354b6c;color:#abcaff}
.slots,.light-region-tabs{background:#101a29;border-color:#2c3c52}.slots .selected,.light-region-tabs .selected{background:#29446a;color:#e8f2ff}
.slots button,.light-region-tabs button{color:#a5b9d5}.capture-prompt b,.auto-input-device b{color:#b0d1ff}.capture-card #capture-device{color:#a4c8f5}
.controller-wire,.hardware-stage{background:#0c131f}.controller-wire pattern path{stroke:#344054;opacity:.45}
.wire-shell{fill:#192332;stroke:#667a95}.wire-inset{fill:#0d1623;stroke:#42546f}.wire-line{stroke:#3e4f66}
.wire-static,.wire-touch,.wire-switch rect{fill:#202f43;stroke:#657d9c}.wire-small,.wire-switch text{fill:#bdcce0}.wire-brand{fill:#6e87a8}
.wire-cap{fill:#202e42;stroke:#6d86a5}.wire-symbol{fill:#d9e7fa}.wire-target{fill:#a6bad6}
.wire-control.selected .wire-cap{fill:#2a405f;stroke:#91bdff}.wire-control.has-color .wire-cap{fill:var(--led-color);stroke:var(--led-color);filter:drop-shadow(0 0 7px var(--led-color))}
.wire-control.has-color .wire-symbol{fill:var(--preview-ink,#08111c)}
.wire-control.actual-rgb .wire-cap{fill:var(--actual-color);stroke:var(--actual-color);stroke-width:2;stroke-opacity:1!important;filter:drop-shadow(0 0 8px var(--actual-color))}
.wire-control.actual-rgb .wire-symbol{fill:var(--cap-ink,#071019);font-weight:750}
.wire-control.has-color.selected .wire-cap{stroke:var(--led-color);stroke-width:5;stroke-dasharray:4 2}
.wire-control.selected .wire-actual-led{stroke:#fff;stroke-width:2;stroke-dasharray:3 3;opacity:1;filter:none}
.wire-control.live-pressed .wire-cap{fill:#163f32;stroke:#81f4bc;stroke-width:4}
.wire-control.actual-rgb.live-pressed .wire-cap{fill:var(--actual-color);stroke:var(--actual-color);stroke-width:2}
.wire-control.live-pressed .wire-actual-led{stroke:#fff;stroke-width:4;stroke-dasharray:none;opacity:1;filter:drop-shadow(0 0 4px #fff)}
.wire-control.live-pressed .wire-symbol{font-weight:900}.wire-control.actual-rgb.live-pressed .wire-symbol{fill:var(--cap-ink,#071019)}
.wire-control.shared-output .wire-actual-led{stroke:#ffcb70;stroke-dasharray:4 3;opacity:1}
.wire-fixed{opacity:.65}.wire-switch.reported-switch text{fill:#9cc6ff}.wire-switch.reported-switch path{stroke:#9cc6ff}
.hardware-stage img{opacity:.32}.hardware-point{background:#1b2b41;color:#dcecff}.hardware-point.key{background:var(--reported-color,#1b2b41);color:var(--reported-ink,#e3efff);border-color:var(--reported-color,#7395c3);box-shadow:0 0 13px var(--reported-color,transparent),inset 0 0 0 1px #ffffff40}
.hardware-point.key.pressed{background:var(--reported-color,#255f4b);color:var(--reported-ink,#fff);outline:3px solid #fff;outline-offset:4px;box-shadow:0 0 18px var(--reported-color,#45d89d)}
.hardware-point.shared-output{outline:3px dashed #ffcb70;outline-offset:4px}.hud-mirror span,.raw-buttons span,.direction-output{background:#1b293b;color:#c1d2e8;border-color:#405674}.hud-mirror span{color:#8290a2}
.hud-mirror span.lit{background:#57252b;color:#ff6672;text-shadow:0 0 8px #ff4659}.raw-buttons span.pressed{background:#256648;color:#fff}.toast{background:#253c5b;color:#edf5ff}

.capture-classification{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:end;margin-bottom:20px}.capture-classification>div{grid-column:1/-1}.capture-classification label{margin:0}.capture-matrix-card{margin-bottom:20px}#capture-matrix{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.capture-cell{padding:12px 8px;border-radius:7px;border:1px solid #34445d;background:#172235;color:#a8bad5;font-size:10px;line-height:1.8}.capture-cell.selected{border-color:#88b9ff;color:#dbeaff;background:#253d5d}.capture-cell.completed{box-shadow:inset 0 -3px #53b88d}.capture-result-actions{margin-top:18px;flex-wrap:wrap}.capture-card .card-title{flex-wrap:wrap}.capture-card select{background:#1b2739;color:#d7e5f7;border:1px solid #36465e;border-radius:6px;padding:9px;max-width:240px}.developer-capture-grid{display:grid;grid-template-columns:1fr 1.25fr;gap:20px;align-items:start}.developer-capture-grid pre{font:11px/1.9 Consolas,monospace;white-space:pre-wrap;overflow-wrap:anywhere;color:#bbcee9;padding:14px;background:#101a29;border-radius:6px}.developer-capture-grid details{font-size:11px;color:#a4b4cb}.developer-capture-grid .wire-control.capture-target .wire-actual-led{stroke:#ffcb70;stroke-width:4;stroke-dasharray:4 3;opacity:1;filter:drop-shadow(0 0 4px #ffcb70)}
@media(max-width:1100px){#capture-matrix{grid-template-columns:repeat(3,minmax(0,1fr))}.developer-capture-grid{grid-template-columns:1fr}.capture-classification{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){#capture-matrix{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-matrix-card .card-title{align-items:start;flex-direction:column}.capture-prompt{flex-direction:column;align-items:start}.capture-step .actions,.capture-card .actions{flex-wrap:wrap}}

.sidebar{overflow-y:auto}.sidebar .nav-label.second{margin-top:24px}

.switch-panel{margin-bottom:20px}.switch-position-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-top:20px}.switch-position-row{background:#101a29;padding:14px;border:1px solid #2c3c52;border-radius:8px}.switch-position-row>b{font-size:11px;color:#d4e4f9}.switch-position-track{display:flex;flex-direction:column;gap:6px;margin-top:12px}.switch-position-track span{padding:7px 9px;border:1px solid #35435a;border-radius:5px;font-size:11px;color:#91a5c1}.switch-position-track .observed{border-left:3px solid #58ac89}.switch-position-track .active{background:#2b4b70;color:#fff;border-color:#92c5ff}.switch-position-row output{display:block;margin-top:10px;font-size:10px;line-height:1.7;color:#9cb7dc}.switch-effects{margin-top:17px;font-size:11px;color:#b1c7e5;line-height:1.9}.wire-strap circle{fill:#283749;stroke:#61748d;stroke-width:1.5}.wire-strap[data-state=expected-on] circle{fill:#f0d489;filter:drop-shadow(0 0 4px #e6b85f)}.wire-strap text{font-size:8px}.wire-window.hud-enabled{stroke:#80c8ff;stroke-width:3}.wire-window.hud-disabled{fill:#080d14;stroke:#354056}.controller-wire .wire-control.led-disabled .wire-cap{fill:#172133;stroke:#43536a;stroke-width:2;stroke-opacity:1;filter:none}.controller-wire .wire-control.led-disabled .wire-actual-led{stroke:#43536a;filter:none;opacity:.4}.controller-wire .wire-control.led-disabled .wire-symbol{fill:#bdccdf}.controller-wire .wire-control.led-disabled.live-pressed .wire-actual-led{stroke:#fff;opacity:1}.controller-wire .wire-control.c-disabled .wire-symbol{text-decoration:line-through}.hardware-point.key.led-disabled{background:#172133;color:#bdccdf;border-color:#43536a;box-shadow:none}.hardware-point.c-disabled:after{content:'禁用';position:absolute;bottom:-13px;font-size:8px;color:#ffd393}.hardware-point.switch-known:before{content:'';position:absolute;left:12%;right:12%;height:2px;top:var(--switch-position);background:#a5d2ff;box-shadow:0 0 4px #8ac0ff}.shared-switch-panel{margin-bottom:20px}
@media(max-width:1100px){.switch-position-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:600px){.switch-position-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Live bar pixels own the physical strip; drafts stay in the color picker. */
#test .test-switch-diagnostics,#test .test-bottom{display:none!important}
#test .test-details{grid-template-columns:minmax(0,1fr)}
.sidebar [hidden]{display:none!important}
#ui-language{max-width:180px;background:#172333;color:#e4efff;border:1px solid #46617c;border-radius:7px;padding:8px;font:12px inherit}
.manual-tools{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:24px}.manual-tools input{width:min(480px,65%);background:#142131;border:1px solid #3e536b;border-radius:7px;color:#e6f0ff;padding:13px}.manual-tools a{color:#a4d9ff;font-size:13px}
.manual-layout{display:grid;grid-template-columns:215px minmax(0,1fr);gap:24px}.manual-chapters{position:sticky;top:20px;align-self:start;display:grid;gap:5px}.manual-chapters a{display:flex;gap:10px;align-items:center;color:#b3c9df;text-decoration:none;padding:12px;border-radius:7px;font-size:12px}.manual-chapters a:hover{background:#20334b;color:white}.manual-chapters svg,.guide-section-heading svg{width:28px;height:28px;fill:none;stroke:currentColor;flex-shrink:0}.manual-chapter-content>section{background:#141f2c;border:1px solid #304357;border-radius:12px;margin-bottom:24px;padding:26px;scroll-margin-top:20px}.guide-section-heading{display:flex;align-items:center;gap:13px;border-bottom:1px solid #33465b;padding-bottom:18px;margin-bottom:20px;color:#bce6ff}.guide-section-heading h3{margin:0;font-size:21px}.guide-chapter-number{font-size:12px;color:#7c9bb9}.manual-body{line-height:1.9;color:#c3d2e1;font-size:14px}.manual-body h4{font-size:16px;color:#e5f2ff;margin:24px 0 12px}.manual-body li{margin-bottom:8px}.manual-topic{margin-bottom:30px}.manual-visuals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}.manual-figure{margin:0;min-width:0}.manual-figure.wide{grid-column:1/-1}.manual-figure-button{position:relative;display:block;width:100%;padding:22px;background:#131b22;border:1px solid #2c3d4b;border-radius:10px;cursor:zoom-in}.manual-figure-button img{display:block;width:100%;height:auto;max-height:520px;object-fit:contain}.manual-magnifier{position:absolute;right:10px;bottom:8px;color:#99bcd2;font-size:23px}.manual-figure figcaption{display:flex;gap:9px;font-size:11px;align-items:start;padding:11px 2px;color:#adbed1}.manual-figure-index{color:#75b9e9}.manual-figure-source{margin-left:auto;white-space:nowrap;color:#91cbf1}.manual-lightbox{width:min(1100px,94vw);max-height:92vh;background:#131b22;color:#dce9f3;border:1px solid #486070;border-radius:12px;padding:36px 18px 18px}.manual-lightbox::backdrop{background:#000b}.manual-lightbox-body img{display:block;max-width:100%;max-height:75vh;margin:auto;object-fit:contain}.manual-lightbox-body p{text-align:center;color:#b7cad9}.manual-lightbox-close{position:absolute;right:10px;top:7px;border:0;background:transparent;color:#d5e7f5;font-size:28px;cursor:pointer}
@media(max-width:950px){.manual-layout{grid-template-columns:1fr}.manual-chapters{position:static;display:flex;overflow:auto}.manual-chapters a{min-width:150px}.manual-chapter-content>section{padding:20px}}@media(max-width:600px){.manual-visuals{grid-template-columns:1fr}.manual-figure{grid-column:1/-1}.guide-section-heading h3{font-size:18px}#ui-language{max-width:130px}.header-right{gap:8px}}
#test .inspector{display:none!important}.test-input-monitor{display:flex;flex-direction:column;gap:16px;min-width:0;align-self:start}.input-live-card{padding:24px;border-color:#496c83}.input-monitor-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.input-monitor-head h3{margin:0;font-size:13px}.input-connection,.input-live-source,.input-log-count{font-size:10px;color:#a5b7ca}.input-live-value{display:block;margin:24px 0 16px;font-size:22px;line-height:1.6;color:#aebdce;overflow-wrap:anywhere}.input-live-value.active{color:#9ce9ff}.input-log-card{overflow:hidden}.input-log-card .input-monitor-head{padding:19px 16px;border-bottom:1px solid #304052}.input-log-clear{border:0;background:transparent;color:#a9bfd4;font-size:11px;cursor:pointer}.input-log-columns,.input-log-row{display:grid;grid-template-columns:83px minmax(0,1fr) 32px;gap:9px;padding:11px 13px;font-size:10px}.input-log-columns{color:#97aabd;background:#101a25}.input-log-rows{height:420px;overflow-y:auto;scrollbar-color:#455e78 #111c28}.input-log-row{border-bottom:1px solid #243446;align-items:start}.input-log-row>span:first-child{font-family:Consolas,monospace;color:#94a6bb}.input-log-row>span:nth-child(2){color:#a3e5ff;font-size:12px;overflow-wrap:anywhere}.input-log-row>span:last-child{color:#a6b5c6}.input-log-empty{padding:18px;font-size:11px;color:#91a6bf}
@media(max-width:1100px){.test-input-monitor{display:grid;grid-template-columns:1fr 1.5fr}.input-log-rows{height:240px}}@media(max-width:650px){.test-input-monitor{display:flex}.input-live-value{margin:14px 0}.input-log-rows{height:280px}}
.sapphire-controller .hardware-switch .switch-thumb{opacity:.35}
.sapphire-controller .hardware-switch.switch-reported .switch-thumb{opacity:1;filter:drop-shadow(0 0 3px #43baff88)}
.sapphire-controller .hardware-switch.switch-reported .switch-thumb>rect:first-child{fill:#278cd2;stroke:#b9edff;stroke-width:1.5}
.sapphire-controller .hardware-switch.switch-reported .switch-thumb>rect:last-child{opacity:.55}
.sapphire-controller .hardware-header .hardware-switch text.switch-active{fill:#a7eeff;font-weight:900;filter:drop-shadow(0 0 2px #32aaff);paint-order:stroke;stroke:#16465c;stroke-width:.4px}
.sapphire-controller .hardware-switch .switch-lock-icon.switch-active{color:#a7eeff;stroke-width:2;filter:drop-shadow(0 0 2px #32aaff)}
#lighting.rgb-unavailable .sapphire-controller .sapphire-key:not(.live-pressed) .wire-cap{fill:var(--button-surface);stroke:#42545f;filter:none}
.sapphire-controller .sapphire-key.mapping-key-labels .wire-symbol{font-size:23px;font-weight:850;fill:#f3f8ff;paint-order:stroke;stroke:#06121b;stroke-width:.7px}
.sapphire-controller .sapphire-key.mapping-key-labels .wire-target{font-size:10px;font-weight:500;fill:#d8e5ef;opacity:.85;pointer-events:none}
.controller-wire.sapphire-controller{background:#1a2129}
.sapphire-controller>.wire-inset{fill:#111c25;stroke:#465662}.sapphire-controller>.wire-brand{fill:#9dafba;letter-spacing:5px}
.sapphire-controller .button-bezel{fill:#101b23;stroke:#71818c;stroke-width:2;pointer-events:none}
.sapphire-controller .sapphire-key .wire-cap{fill:var(--button-surface);stroke:#42545f;stroke-width:1.5;filter:none}
.sapphire-controller .sapphire-key .wire-symbol{fill:#eef4ff;font-weight:600}
.sapphire-controller .sapphire-key.has-color .wire-cap{fill:color-mix(in srgb,var(--led-color) 48%,#101a23);stroke:#5c727e;filter:none}
.sapphire-controller .sapphire-key.actual-rgb .wire-cap{fill:var(--key-glow);stroke:#57707b;filter:none}
.sapphire-controller .sapphire-key :is(.wire-cap,.wire-symbol){transition:none}
.sapphire-controller .sapphire-key .wire-actual-led{stroke:#607582;stroke-width:1;opacity:.25;filter:none}
.sapphire-controller .sapphire-key.selected .wire-actual-led{stroke:#c3e6ff;stroke-width:2;opacity:1;filter:none}
.sapphire-controller .sapphire-key.live-pressed .wire-cap{fill:var(--key-glow,var(--actual-color,#367d70));stroke:#e4fff7;filter:none}
.sapphire-controller .sapphire-key.live-pressed .wire-actual-led{stroke:#fff;stroke-width:2;filter:none;opacity:1}
.sapphire-controller .hardware-header{color:#9fb3c1}.sapphire-controller .hardware-header text{fill:#9fb3c1;font-size:8px;font-family:inherit}.sapphire-controller .header-recess{fill:#0d1921;stroke:#47606e}.sapphire-controller .switch-rail{fill:#09121a;stroke:#47606e}.sapphire-controller .header-button{cursor:pointer;color:#58adff}.sapphire-controller .header-button text{fill:#61b6ff;font-weight:700}.sapphire-controller .header-button rect,.sapphire-controller .ps-cap circle{stroke:#4d6572;stroke-width:1}.sapphire-controller .hardware-header .touch-brand{font-size:23px;font-weight:850;letter-spacing:2px;fill:#6f8997}.sapphire-controller .hardware-header .hardware-hud-symbol{fill:#314550;font-size:7px}.sapphire-controller .hardware-header .hardware-hud-symbol.lit{fill:#98edff}.sapphire-controller .hardware-hud.hud-disabled{fill:#080d14}.sapphire-controller .hardware-hud.hud-enabled{stroke:#507481;stroke-width:1}
.sapphire-test-stage{aspect-ratio:auto!important;background:#1a2129;padding:0!important}.sapphire-test-stage>img,.sapphire-test-stage>#hardware-points{display:none}.sapphire-test-stage #test-controller-diagram{position:relative;width:100%}
.mapping-picker{width:min(920px,calc(100vw - 32px));max-height:88vh;box-sizing:border-box;overflow:auto;border:1px solid #415775;border-radius:16px;background:#121d2c;color:#e6f0ff;padding:24px;box-shadow:0 24px 90px #0009}
.mapping-picker::backdrop{background:#030813bb;backdrop-filter:blur(4px)}
.picker-heading,.picker-tabs,.picker-actions{display:flex;align-items:center;gap:12px}.picker-heading{justify-content:space-between}.picker-heading h3{font-size:19px}.picker-tabs{margin:20px 0}.picker-tabs button{flex:1;padding:13px;background:#1d2d43;border:1px solid #476080;border-radius:8px;color:#d6e8ff}.picker-tabs button.selected{background:#2466c8;border-color:#7db7ff;color:white}
.picker-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;margin:20px 0}.mapping-picker[data-tab=keyboard] .picker-options{grid-template-columns:repeat(12,minmax(0,1fr))}.picker-key{min-height:46px;border:1px solid #49617f;background:#1c2a3d;color:#d9eaff;border-radius:9px;font-size:14px;cursor:pointer}.picker-key.selected{background:#2865ad;border-color:#a6d4ff;box-shadow:0 0 0 2px #7fbaff55}.picker-key:focus-visible{outline:2px solid #fff;outline-offset:2px}.mapping-picker[data-tab=keyboard] .picker-key{font-size:10px;overflow-wrap:anywhere;padding:5px}.picker-actions{justify-content:flex-end;flex-wrap:wrap;margin-top:20px}.picker-result{color:#a9d8ff}.picker-close{font-size:20px}
@media(max-width:650px){.mapping-picker{padding:16px}.mapping-picker[data-tab=keyboard] .picker-options{grid-template-columns:repeat(6,minmax(0,1fr))}.picker-options{grid-template-columns:repeat(4,minmax(0,1fr))}}
/* Keep diagnostic data active while hiding its cards on the three user pages. */
:is(#mapping,#lighting,#test) :is(.shared-switch-panel,.live-results,.switch-panel){display:none!important}
.wire-control.wire-bar.has-color .wire-cap,.wire-control.wire-bar.has-color.selected .wire-cap{fill:transparent;stroke:#64748b;stroke-width:1;stroke-dasharray:none;filter:none}
.wire-control.wire-bar.selected .wire-cap{stroke:#e2e8f0;stroke-width:2}
.actual-bar-segments{pointer-events:none}
.actual-bar-segments rect{filter:none}
.controller-wire .wire-bar .wire-cap{fill:#080d16;stroke:#59657a;stroke-width:1;filter:none}
.controller-wire .wire-bar.selected .wire-cap,.controller-wire .wire-bar.has-color.selected .wire-cap{fill:#080d16;stroke:#d6e7ff;stroke-width:1.5;filter:none}
.controller-wire .diffused-strip rect{stroke:none;pointer-events:none}
.controller-wire .diffused-strip .strip-halo-wide{filter:brightness(2.8) blur(13px);opacity:.65}
.controller-wire .diffused-strip .strip-halo-near{filter:brightness(2.6) blur(3px);opacity:1}
.controller-wire .diffused-strip .strip-emitter{filter:brightness(2.4) saturate(1.12)}
.controller-wire .diffused-strip .strip-core{filter:brightness(4);opacity:.85}
.controller-wire .diffused-strip .strip-glass{opacity:.8}
.controller-wire .diffused-strip.strip-off .strip-glass{opacity:0}

/* Supplied QANBA artwork: retain proportions, keep the lower source margin outside the logo frame. */
.sidebar .brand{display:flex;align-items:center;gap:12px;flex-direction:column;padding-bottom:24px;text-align:center;text-decoration:none}
.brand .qanba-logo-frame{display:block;width:150px;aspect-ratio:2191 / 312;overflow:hidden;background:transparent;border-radius:0;padding:0;letter-spacing:normal}
.qanba-logo-frame img,.header-logo-frame img,.footer-logo-frame img{display:block;width:100%;height:auto;max-width:none}
.brand-wordmark{font-size:26px;font-weight:800;letter-spacing:2px;color:#f5f8ff;line-height:1.2}
.brand .brand-wordmark span{display:block;margin-top:7px;font-size:8px;letter-spacing:3px;color:#8caee4}
.header-logo-frame{display:block;width:80px;aspect-ratio:2191 / 312;overflow:hidden;background:transparent;border-radius:0;flex-shrink:0}
.footer-brand{display:inline-flex;align-items:center;gap:10px;letter-spacing:1px}
.footer-logo-frame{display:inline-block;width:60px;aspect-ratio:2191 / 312;overflow:hidden;background:transparent;border-radius:0;flex-shrink:0}
@media(max-width:760px){.sidebar .brand{gap:7px;padding-bottom:14px}.brand .qanba-logo-frame{width:90px}.brand-wordmark{font-size:20px}.footer-brand{letter-spacing:0;font-size:9px}}

.manual-figure-button:hover{border-color:#5e91ac;background:#131b22}.manual-figure-button:focus-visible{outline:2px solid #86c6e9;outline-offset:3px}.manual-topic{padding-bottom:16px;border-bottom:1px solid #2a3b4b}.manual-topic:last-child{border-bottom:0}.manual-figure figcaption{padding:13px 3px}.manual-lightbox-close:hover{color:#fff}
/* Numbered reference lists flow down each column, preserving PDF numbering. */
.manual-topic[data-topic="parts"]>ol,.manual-topic[data-topic="accessories"]>ol{columns:3 220px;column-gap:36px;padding-left:28px}
.manual-topic[data-topic="parts"]>ol>li,.manual-topic[data-topic="accessories"]>ol>li{break-inside:avoid;padding-right:12px}
.wire-side-column{display:grid;gap:18px;min-width:0;align-self:start}
.wire-side-column>.wire-inspector{position:static;min-width:0}
.write-log-card{overflow:hidden;min-width:0}
.write-log-head{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:17px 18px;border-bottom:1px solid #304052}
.write-log-head h3{margin:0;font-size:13px;flex:1}
.write-log-count{color:#95abc2;font-size:10px;white-space:nowrap}
.write-log-clear{border:0;background:transparent;color:#a9bfd4;font-size:10px;cursor:pointer;padding:4px}
.write-log-clear:disabled{opacity:.45;cursor:default}
.write-log-rows{max-height:300px;overflow-y:auto;scrollbar-color:#455e78 #111c28}
.write-log-empty{padding:26px 18px;margin:0;min-height:110px;color:#95abc2;font-size:11px;display:flex;align-items:center;justify-content:center}
.write-log-row{padding:14px 18px;border-bottom:1px solid #29394b;overflow-wrap:anywhere}
.write-log-row:last-child{border-bottom:0}
.write-log-meta{display:flex;justify-content:space-between;flex-wrap:wrap;gap:7px;font-size:10px;line-height:1.6}
.write-log-meta time{color:#95abc2;font-family:Consolas,monospace}
.write-log-meta strong{color:#9bdfff;font-weight:600}
.write-log-row[data-status="success"] strong{color:#81d9b2}
.write-log-row[data-status="failed"] strong,.write-log-error{color:#ff9f9f}
.write-log-row[data-status="partial"] strong{color:#ffd280}
.write-log-subject{color:#d7e5f7;font-size:12px;margin:9px 0 0;line-height:1.7}
.write-log-detail,.write-log-error{font-size:11px;margin:6px 0 0;line-height:1.7}
.write-log-detail{color:#a8bdd2}
#mapping .mapping-card-head{display:grid;grid-template-columns:minmax(145px,1fr) minmax(390px,2.5fr) auto;gap:16px;align-items:center}
#mapping .mapping-top-controls{display:grid;grid-template-columns:minmax(120px,1fr) minmax(130px,1fr) auto;gap:6px 12px;margin:0;padding:0;border:0;align-items:end;min-width:0}
#mapping .mapping-top-controls h3{grid-column:1/-1;width:auto;margin:0;font-size:11px}
#mapping .mapping-top-controls label{display:block;margin:0;color:#a4b4cb;font-size:10px;min-width:0}
#mapping .mapping-top-controls select{display:block;width:100%;margin-top:6px;padding:9px 10px;min-height:35px;border:1px solid #36465e;border-radius:6px;background:#1b2739;color:#d7e5f7;font-size:11px}
#mapping .mapping-top-controls select:disabled{color:#8c9bae}
#mapping .mapping-top-controls button{margin:0;padding:10px 12px;min-height:35px;font-size:10px;white-space:normal}
#mapping .mapping-device-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:nowrap;padding:12px 24px;border-bottom:1px solid #2c3c52;background:#111c2b}
#mapping .mapping-device-toolbar .slots{margin:0;flex:0 0 auto}
#mapping .mapping-device-toolbar #read-profile{margin-left:auto}
#mapping .mapping-device-toolbar>.outline,#mapping .mapping-device-toolbar>.primary{flex:0 0 auto;white-space:nowrap}
#mapping .mapping-device-toolbar #reset-mapping{width:auto}
#lighting .light-device-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 24px;border-bottom:1px solid #2c3c52;background:#111c2b}
#lighting .light-device-toolbar .light-region-tabs{flex:0 0 auto;margin-right:4px}
#lighting .light-device-toolbar button{white-space:nowrap}
#lighting .light-device-toolbar #preset-blue{margin-left:auto}
@media(max-width:1150px){#lighting .light-device-toolbar #preset-blue{margin-left:0}}
#firmware .fw-color-guide{margin-top:22px}
#firmware .fw-color-guide p{margin:0 0 12px}
#guide .guide-card{max-width:1000px}
#guide .guide-card>.muted{margin:0 0 20px}
#guide .guide-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:10px}
#mapping .mapping-device-toolbar .button-label{display:inline-flex;align-items:center;justify-content:center}
@media(max-width:900px){#mapping .mapping-device-toolbar{flex-wrap:wrap}#mapping .mapping-device-toolbar .slots{width:100%;justify-content:space-between}#mapping .mapping-device-toolbar .slots button{flex:1}#mapping .mapping-device-toolbar #read-profile{margin-left:0}}
@media(max-width:650px){#mapping .mapping-device-toolbar{padding:12px;gap:8px}#mapping .mapping-device-toolbar .slots button{padding:9px 7px}#mapping .mapping-device-toolbar .outline,#mapping .mapping-device-toolbar .primary{flex:1;white-space:nowrap;padding:9px 7px}}
@media(max-width:1650px){#mapping .mapping-card-head{grid-template-columns:minmax(0,1fr) auto}#mapping .mapping-top-controls{grid-column:1/-1;grid-row:2}#mapping #map-source{grid-column:2;grid-row:1}}
@media(max-width:650px){#mapping .mapping-top-controls{grid-template-columns:repeat(2,minmax(0,1fr))}#mapping .mapping-top-controls button{grid-column:1/-1;justify-self:end;width:auto}#mapping .mapping-card-head{gap:14px 8px}}

.qanba-logo-frame img,.header-logo-frame img,.footer-logo-frame img{filter:brightness(0) invert(1);object-fit:contain}.sidebar .brand{gap:8px;padding-top:8px}.brand .brand-wordmark span{margin-top:0;letter-spacing:2.8px;font-size:8px}.sapphire-controller .hardware-header .touch-logo{filter:brightness(0) invert(1);opacity:.5}

.sidebar .brand .qanba-logo-frame{width:150px;aspect-ratio:2191 / 1409;overflow:visible;background:transparent;border-radius:0}.sidebar .brand .qanba-logo-frame img{filter:none;width:100%;height:auto;object-fit:contain}@media(max-width:760px){.sidebar .brand .qanba-logo-frame{width:100px}}
footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}#release-version{margin-left:auto;white-space:nowrap;font-size:12px;font-weight:700;letter-spacing:.6px;color:#c5d8f8}
.firmware-external-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}.firmware-external-grid .card{min-width:0}.firmware-external-grid #fw-download{display:flex;align-items:center;justify-content:center;margin:24px 0 12px;min-height:46px;text-decoration:none}.firmware-external-grid #fw-note{margin-top:24px;line-height:1.7}.firmware-next{display:flex;gap:12px;flex-wrap:wrap;margin-top:20px}.firmware-external-grid .steps li{margin-bottom:22px}.firmware-external-grid .steps p{line-height:1.7}@media(max-width:900px){.firmware-external-grid{grid-template-columns:1fr}}
.panel-mode-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:12px 0 22px}.panel-mode-buttons button{min-height:40px;padding:8px 5px;font-size:10px;white-space:nowrap;text-align:center}.panel-mode-buttons button.selected{background:#2766e9;color:#fff;border-color:#5a9aff}.panel-mode-buttons button:focus-visible{outline:2px solid #9ccaff;outline-offset:2px}
.panel-mode-tip{margin:0 0 20px;line-height:1.7}
.sapphire-controller .hardware-header [data-key="PS"].live-pressed circle,.sapphire-controller .hardware-header [data-key="OPTIONS"].live-pressed rect,.sapphire-controller .hardware-header .touch-surface.live-pressed{fill:#176b82;stroke:#bff6ff;stroke-width:3;filter:drop-shadow(0 0 8px #6ee7ff)}.sapphire-controller .hardware-header [data-key="PS"].live-pressed text,.sapphire-controller .hardware-header [data-key="OPTIONS"].live-pressed path{fill:#fff;stroke:#fff}
.sapphire-controller .hardware-header [data-key="CREATE"].live-pressed rect{fill:#176b82;stroke:#bff6ff;stroke-width:3;filter:drop-shadow(0 0 8px #6ee7ff)}.sapphire-controller .hardware-header [data-key="CREATE"].live-pressed path{stroke:#fff;filter:drop-shadow(0 0 3px #fff)}
#mapping.hud-green .hardware-header .hardware-hud-symbol.lit,#lighting.hud-green .hardware-header .hardware-hud-symbol.lit,#test.hud-green .hardware-header .hardware-hud-symbol.lit{fill:#70e695;filter:drop-shadow(0 0 3px #5aff86)}
#test.hud-green .hud-mirror span.lit{background:#23523b;color:#a6ffb9;text-shadow:0 0 8px #5aff86}
.sapphire-controller .hardware-header .hardware-hud-symbol{fill:#687785}
.sapphire-controller .hardware-header .hardware-hud-symbol.lit{fill:#ff6672;filter:drop-shadow(0 0 3px #ff4659)}
#test .sapphire-controller .sapphire-key.live-pressed .wire-cap{fill:#57252b;stroke:#ff6672;stroke-width:3;filter:drop-shadow(0 0 7px #ff4659)}
#test .sapphire-controller .sapphire-key.live-pressed .wire-symbol{fill:#ff808a;filter:drop-shadow(0 0 4px #ff4659)}
#test .sapphire-controller .sapphire-key.live-pressed .wire-actual-led{stroke:#ff6672;filter:drop-shadow(0 0 5px #ff4659)}
#test.hud-green .sapphire-controller .sapphire-key.live-pressed .wire-cap{fill:#23523b;stroke:#70e695;filter:drop-shadow(0 0 7px #5aff86)}
#test.hud-green .sapphire-controller .sapphire-key.live-pressed .wire-symbol{fill:#a6ffb9;filter:drop-shadow(0 0 4px #5aff86)}
#test.hud-green .sapphire-controller .sapphire-key.live-pressed .wire-actual-led{stroke:#70e695;filter:drop-shadow(0 0 5px #5aff86)}
.mapping-duplicate-dialog{width:min(520px,calc(100vw - 32px));padding:24px;background:#17202b;color:#e7f0fb;border:1px solid #54657a;border-radius:10px;box-shadow:0 20px 65px #0009}
.mapping-duplicate-dialog::backdrop{background:#000a}
.mapping-duplicate-dialog h3{font-size:18px;line-height:1.6;margin:0 0 16px}
.mapping-duplicate-dialog ul{margin:0 0 16px;padding-left:24px;max-height:240px;overflow:auto;line-height:1.8;font-size:13px}
.mapping-duplicate-dialog p{color:#9eb3cd;font-size:11px;line-height:1.6}
.mapping-duplicate-dialog .actions{justify-content:flex-end;margin-top:20px}
.mapping-duplicate-dialog .actions button{min-width:100px}
.configuration-mode-dialog{width:min(440px,calc(100vw - 32px));padding:26px;background:#172235;color:#e7f0fb;border:1px solid #526985;border-radius:10px;box-shadow:0 20px 65px #0009}
.configuration-mode-dialog::backdrop{background:#000a}
.configuration-mode-dialog h3{font-size:18px;line-height:1.5;margin:0 0 12px}
.configuration-mode-dialog p{font-size:13px;line-height:1.8;color:#d3e2f5;margin:0 0 12px}
.configuration-mode-dialog .mode-note{font-size:11px;color:#9fb4cf}
.configuration-mode-dialog button{display:block;margin:20px 0 0 auto;min-width:100px}
