/* Original OneKeyBoard-inspired light/dark palette and rounded card layout. */
.calibration-span-box { margin-top:24px; padding:18px 20px; border:1px solid var(--line); border-radius:12px; background:var(--soft); }
.calibration-span-box>div { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.calibration-span-box strong { color:var(--primary); font:650 25px ui-monospace,monospace; }
.calibration-span-box p { margin-bottom:0; font-size:12px; }
.lighting-modes { display:flex; flex-wrap:wrap; gap:16px 60px; justify-content:center; margin:8px 0 24px; }
.lighting-modes label { display:flex; align-items:center; gap:10px; cursor:pointer; font-size:14px; }
.lighting-modes input { accent-color:var(--primary); width:20px; height:20px; margin:0; }
.lighting-sliders { padding:4px 0 14px; }
.lighting-slider { display:grid; grid-template-columns:48px minmax(60px,1fr) 70px; align-items:center; gap:18px; min-height:48px; font-size:14px; }
.lighting-slider output { text-align:right; font-variant-numeric:tabular-nums; color:var(--muted); }
.lighting-slider input[type=range] { width:100%; min-width:0; margin:0; padding:0; border:0; accent-color:var(--primary); cursor:pointer; }
.lighting-slider.channel-r input { accent-color:#ef5265; }
.lighting-slider.channel-g input { accent-color:#22b77a; }
.lighting-slider.channel-b input { accent-color:#4598ec; }
.color-picker-label { display:flex; justify-content:flex-end; align-items:center; gap:12px; font-size:12px; color:var(--muted); }
.color-picker-label input[type=color] { width:44px; height:32px; padding:3px; cursor:pointer; }
.lighting-preview { display:flex; gap:12px; align-items:center; color:var(--muted); font-size:12px; }
.swatch-shell { display:block; width:72px; height:24px; border-radius:6px; overflow:hidden; background:#15171b; border:1px solid var(--line); }
#rgb-swatch { display:block; width:100%; height:100%; }
@media(max-width:600px) { .lighting-modes { gap:12px 20px; justify-content:flex-start; } .lighting-slider { grid-template-columns:36px minmax(60px,1fr) 56px; gap:10px; } }
:root { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; color-scheme: light; --page:#f2f2f2; --surface:#fff; --soft:#f7f7f8; --text:#1f2937; --muted:#69717d; --line:#e2e4e8; --primary:#4a20ed; --secondary:#d225a1; --tint:#f0ecff; --glass:rgba(255,255,255,.78); --release:#087f72; --press:#b25d04; color:var(--text); background:var(--page); }
:root[data-theme=dark] { color-scheme:dark; --page:#191e24; --surface:#1d232a; --soft:#222a34; --text:#d2d8e2; --muted:#9ba6b6; --line:#343e4b; --primary:#9b9aff; --secondary:#f28ad1; --tint:#30304b; --glass:rgba(37,44,54,.85); --release:#55d6c2; --press:#ffc377; }
* { box-sizing:border-box; } [hidden] { display:none !important; } body { margin:0; } button,input,select,textarea { font:inherit; } button { min-height:44px; padding:10px 17px; border:1px solid var(--line); border-radius:8px; background:var(--page); color:var(--text); font-size:14px; font-weight:600; cursor:pointer; transition:background .15s,transform .15s; }
button:hover:not(:disabled) { background:var(--tint); border-color:var(--primary); } button:active:not(:disabled) { transform:scale(.98); } button.primary { background:var(--primary); color:#fff; border-color:var(--primary); } [data-theme=dark] button.primary { color:#151529; } button:disabled { opacity:.4; cursor:not-allowed; }
:focus-visible { outline:3px solid var(--primary); outline-offset:3px; } input,select,textarea { border:1px solid var(--line); border-radius:8px; padding:10px 12px; background:var(--surface); color:var(--text); max-width:100%; } input[type=number] { width:92px; font-variant-numeric:tabular-nums; } input[type=checkbox] { accent-color:var(--primary); width:20px; height:20px; } textarea { resize:vertical; } .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.site-header { position:sticky; top:0; z-index:10; max-width:592px; margin:0 auto 38px; padding:20px 8px 0; } .navbar { min-height:68px; padding:8px 14px 8px 22px; border-radius:999px; display:flex; justify-content:space-between; align-items:center; gap:14px; background:var(--glass); backdrop-filter:blur(18px); border:1px solid var(--surface); box-shadow:0 14px 30px #00000016; } .brand { text-decoration:none; color:var(--text); font-weight:750; font-size:20px; white-space:nowrap; letter-spacing:-.5px; } .brand>span { color:var(--primary); } .brand small { font-size:10px; vertical-align:middle; border:1px solid var(--line); padding:3px 6px; border-radius:8px; font-weight:600; letter-spacing:0; margin-left:4px; } .nav-actions { display:flex; align-items:center; gap:6px; } .connect-button { background:transparent; border-color:transparent; border-radius:999px; white-space:nowrap; } .theme-picker select { background:transparent; border-color:transparent; font-size:12px; padding:8px 5px; max-width:105px; }
main { max-width:1024px; margin:auto; padding:0 8px 20px; } h1,h2 { font-size:21px; font-weight:650; margin:0 0 22px; line-height:1.4; } h3 { font-size:14px; font-weight:600; margin:0 0 12px; } p { font-size:14px; line-height:1.8; color:var(--muted); margin:8px 0; } .card { background:var(--surface); border-radius:16px; padding:36px 40px; margin-bottom:32px; } .section-top { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; } .badge { font-size:12px; white-space:nowrap; border:1px solid var(--line); border-radius:999px; padding:5px 11px; color:var(--muted); background:var(--surface); } .badge.pressed { color:var(--surface); background:var(--primary); border-color:var(--primary); } .eyebrow { color:var(--muted); letter-spacing:1.2px; font-size:10px; margin:0 0 7px; } .subnote,.muted { font-size:12px; line-height:1.8; color:var(--muted); } .subnote { margin-top:16px; }
.device-stats { display:grid; grid-template-columns:1fr 1fr; margin:8px 0 26px; } .device-stats>div { display:flex; flex-direction:column; gap:7px; padding:12px 26px; border-right:1px solid var(--line); } .device-stats>div:first-child { padding-left:0; } .device-stats>div:last-child { border:0; } .device-stats span { color:var(--muted); font-size:14px; } .device-stats strong { font:700 38px ui-monospace,SFMono-Regular,Consolas,monospace; color:var(--primary); } .device-stats strong.secondary { color:var(--secondary); } .device-stats small { font-size:12px; color:var(--muted); } .device-actions { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; } .device-actions>div { display:flex; gap:8px; flex-wrap:wrap; } #session-state { text-align:right; margin-bottom:0; } .notice { padding:14px 20px; border:1px solid var(--line); border-radius:12px; margin:0 0 32px; background:var(--tint); color:var(--text); } .notice.error { border-color:#e78676; color:#b33527; background:#fff1ee; } [data-theme=dark] .notice.error { color:#ffc1b5; background:#412820; }
.dashboard { display:grid; grid-template-columns:1.35fr 1fr; gap:32px; } .travel-card { min-width:0; padding:8px 0; } .travel-card h2 { font-size:14px; color:var(--muted); font-weight:500; } .travel-number { font-size:64px; line-height:1.15; font-weight:650; color:var(--primary); font-variant-numeric:tabular-nums; letter-spacing:-2px; margin:4px 0 30px; } .travel-number small { font-size:24px; color:var(--muted); letter-spacing:0; margin-left:4px; } .track { position:relative; height:14px; background:var(--page); border-radius:999px; margin:12px 4px 20px; } .track>div { width:0; height:100%; background:var(--primary); opacity:.65; border-radius:999px; } .track>i { position:absolute; top:-7px; height:28px; width:2px; background:var(--primary); left:50%; } .track>#release-marker { left:40%; background:var(--muted); } .track>.rt-line { width:3px; height:36px; top:-11px; opacity:.45; } .track>.rt-line.active { opacity:1; width:4px; } .track>.rt-release { background:var(--release); } .track>.rt-press { background:var(--press); } .legend { display:block; font-size:11px; } .rt-legend { display:flex; gap:10px 16px; flex-wrap:wrap; margin:12px 0; font-size:12px; } .rt-legend>p { flex-basis:100%; margin:0; font-size:11px; } .release-label { color:var(--release); } .press-label { color:var(--press); } .metrics { display:grid; gap:0; padding-left:26px; border-left:1px solid var(--line); } .metrics>div { display:grid; grid-template-columns:1fr auto; align-items:center; padding:14px 0; border-bottom:1px solid var(--line); gap:6px; } .metrics>div:last-child { border:0; } .metrics span { font-size:13px; color:var(--muted); } .metrics strong { font-size:27px; font-weight:600; font-variant-numeric:tabular-nums; } .metrics small { grid-column:1/-1; font-size:11px; color:var(--muted); }
fieldset { border:0; padding:0; margin:0; min-width:0; } .two-columns { display:grid; grid-template-columns:1fr 1fr; gap:24px; } .two-columns>.card { padding:30px; } .steps { display:flex; gap:10px; flex-wrap:wrap; margin-top:22px; } .fields { display:grid; gap:16px; margin-top:22px; } .fields>label { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:14px; } .input-unit { display:flex; align-items:center; gap:7px; color:var(--muted); } .toggle { display:flex; align-items:center; gap:6px; font-size:13px; white-space:nowrap; } .inline-label { display:flex; align-items:center; gap:16px; font-size:14px; margin:0 0 24px; } .key-editor { padding:22px; background:var(--soft); border-radius:12px; min-width:0; } .key-editor h3 { color:var(--primary); } .key-editor label { display:block; font-size:12px; color:var(--muted); margin-bottom:12px; } .key-editor select { width:100%; margin-top:7px; } .key-picks { display:grid; grid-template-columns:1fr 1fr; gap:8px; } .key-picks label:first-child { grid-column:1/-1; } .key-editor textarea { width:100%; min-height:80px; margin-top:7px; } .lighting { display:flex; flex-wrap:wrap; gap:24px; } .lighting label { display:flex; flex-direction:column; gap:9px; font-size:12px; color:var(--muted); } .lighting input[type=color] { width:70px; height:43px; padding:5px; }
.test-tools { display:flex; align-items:center; gap:10px; } #test-capture { background:var(--soft); border:2px dashed var(--line); border-radius:12px; padding:22px; text-align:center; margin:20px 0 14px; cursor:text; } #test-capture:focus { border-color:var(--primary); } #test-capture>span { font-size:12px; color:var(--muted); } #test-held { min-height:40px; display:flex; flex-wrap:wrap; gap:8px; align-items:center; justify-content:center; font-size:14px; margin-top:16px; } kbd { display:inline-block; font:12px ui-monospace,Consolas,monospace; border:1px solid var(--line); border-bottom-width:3px; border-radius:6px; background:var(--surface); padding:6px 9px; color:var(--text); overflow-wrap:anywhere; } #test-held kbd { color:var(--primary); border-color:var(--primary); font-size:16px; padding:9px 14px; } .test-summary { display:flex; flex-wrap:wrap; gap:12px 22px; font-size:12px; color:var(--muted); margin-bottom:24px; } .test-summary b { color:var(--primary); } .event-list { list-style:none; padding:0; margin:0; height:180px; overflow:auto; border:1px solid var(--line); border-radius:10px; background:var(--soft); } .event-list li { display:flex; align-items:center; gap:8px; flex-wrap:wrap; border-bottom:1px solid var(--line); padding:10px 12px; font-size:11px; } .event-list li>span:last-child { color:var(--muted); overflow-wrap:anywhere; } .event-list .event-down>span:first-child { color:var(--primary); } .event-list .event-up>span:first-child { color:var(--release); } .event-list .empty-event,.event-list .event-info { color:var(--muted); } .test-text-label { font-size:14px; font-weight:600; } #test-text { display:block; width:100%; min-height:180px; margin-top:12px; font-size:14px; font-weight:400; } .test-toast { position:fixed; right:24px; bottom:24px; z-index:20; padding:14px 22px; border-radius:12px; color:var(--text); background:var(--surface); border:1px solid var(--line); box-shadow:0 8px 30px #0002; font-size:14px; pointer-events:none; } .test-toast::before { content:"⌨ "; color:var(--primary); }
footer { background:var(--surface); border-radius:16px; text-align:center; padding:30px 20px; margin-top:40px; font-size:11px; color:var(--muted); line-height:1.9; } .footer-brand { display:block; font-size:18px; font-weight:700; color:var(--text); margin-bottom:12px; }
@media(max-width:760px) { .site-header { margin-bottom:24px; padding-top:10px; } main { padding:0 12px 16px; } .card { padding:24px; margin-bottom:22px; } .dashboard,.two-columns { grid-template-columns:1fr; gap:20px; } .two-columns>.card { padding:24px; margin-bottom:0; } fieldset>.two-columns { margin-bottom:22px; } .metrics { padding-left:0; border-left:0; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; } .metrics>div { display:flex; flex-direction:column; align-items:flex-start; border-bottom:0; padding:10px 0; } .metrics span { font-size:12px; } .metrics strong { font-size:24px; } .inline-label { flex-direction:column; align-items:flex-start; } .device-actions { flex-direction:column; align-items:stretch; } .device-actions>div { display:grid; grid-template-columns:1fr 1fr; } .device-stats>div { padding:10px 16px; } .device-stats strong { font-size:30px; } .steps { flex-direction:column; } .test-tools { gap:6px; } .test-tools button { padding:8px 10px; } .notice { margin-bottom:22px; } }
@media(max-width:430px) { .navbar { padding:7px 10px 7px 15px; gap:6px; } .brand { font-size:18px; } .brand small { display:none; } .connect-button { padding:9px 10px; font-size:13px; } .theme-picker select { max-width:85px; font-size:11px; } h1,h2 { font-size:18px; } .card { padding:20px; } .section-top { gap:8px; } .fields>label { font-size:13px; } }

#linear-fields { border:0; padding:0; margin:0; min-width:0; } #linear-panel select { max-width:100%; } .linear-preview { margin:20px 0; padding:18px; background:var(--soft); border-radius:12px; } #linear-touch-preview { min-height:150px; display:flex; align-items:center; justify-content:center; } #linear-dot { display:block; border-radius:8px; background:var(--primary); transition:width .1s,height .1s,opacity .1s; } .linear-actions { display:flex; gap:10px; flex-wrap:wrap; }

.firmware-file { padding-bottom:24px; margin-bottom:24px; border-bottom:1px solid var(--line); }
.firmware-download { display:inline-flex; align-items:center; justify-content:center; min-height:44px; max-width:100%; margin:12px 0 4px; padding:10px 17px; border:1px solid var(--primary); border-radius:8px; background:var(--primary); color:#fff; font-size:14px; font-weight:600; text-decoration:none; transition:filter .15s,transform .15s; }
.firmware-download:hover { filter:brightness(1.1); }
.firmware-download:active { transform:scale(.98); }
[data-theme=dark] .firmware-download { color:#151529; }

/* Keep both languages usable without changing control values or layout state. */
.site-header { max-width:760px; }
.language-picker select { background:transparent; border-color:transparent; font-size:12px; padding:8px 5px; max-width:96px; }
.inline-label { flex-wrap:wrap; }
.fields>label input[type=number] { flex-shrink:0; }
.fields>label select { min-width:0; }
html[lang=en] .card p { overflow-wrap:break-word; }
html[lang=en] .theme-picker select { max-width:140px; }
@media (max-width:600px) {
  .navbar { flex-wrap:wrap; border-radius:24px; gap:8px; }
  .nav-actions { flex:1 1 100%; flex-wrap:wrap; justify-content:flex-end; }
  .fields>label { flex-wrap:wrap; }
  .inline-label select { min-width:0; width:100%; }
}

/* Identity fields stay readable with both interface languages and narrow screens. */
.device-stats { grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:16px 0; }
.device-stats>div { min-width:0; padding:12px 16px; }
.device-stats strong.secondary { font-size:22px; overflow-wrap:anywhere; }
#chip-uid { font-size:20px; }
#rgb-hue .lighting-slider { grid-template-columns:130px minmax(60px,1fr) 56px; }
@media(max-width:600px) {
  .device-stats { grid-template-columns:1fr; gap:0; }
  .device-stats>div { padding:12px 0; border-right:0; border-bottom:1px solid var(--line); }
  #rgb-hue .lighting-slider { grid-template-columns:100px minmax(60px,1fr) 40px; }
}

.site-header { max-width:860px; }
.nav-actions>a { color:var(--primary); font-size:13px; padding:8px; text-decoration:none; }
.nav-actions>a:hover { text-decoration:underline; }
