:root{--page: #17191B;--housing: #1B1C1E;--silver-l: #D9DADB;--silver-d: #AEB1B4;--keypanel: #292A2C;--key-top: #252628;--key-edge: #101112;--legend: #F3F2EE;--f-legend: #D9A353;--g-legend: #69B8C8;--f-key: #CF8A2B;--g-key: #288AA7;--lcd-bg: #B8C1B1;--lcd-active: #182017;--focus: #96C9FF}*{box-sizing:border-box;margin:0;padding:0}html,body{height:100%}body{background:var(--page);font-family:Segoe UI,system-ui,-apple-system,sans-serif;overflow:hidden}#app,.calculator-root{width:100%;height:100dvh;display:flex;flex-direction:column}.app-strip{height:32px;flex:0 0 32px;display:flex;align-items:center;gap:8px;padding:0 10px;background:#101112;color:#9aa0a6;font-size:13px}.app-strip .title{font-weight:600;color:var(--legend);margin-right:auto}.app-strip button{background:none;border:1px solid #3a3d40;color:#c8cbcf;border-radius:4px;padding:2px 10px;font-size:12px;cursor:pointer}.app-strip button:hover{background:#2a2d30}.app-strip button:focus-visible,.key:focus-visible,.lcd button:focus-visible{outline:2px solid var(--focus);outline-offset:1px}.housing{container-type:size;container-name:housing;flex:1 1 auto;min-height:0;display:flex;flex-direction:column;background:var(--housing);padding:18px;gap:10px;border-radius:14px;margin:6px;box-shadow:inset 0 1px #ffffff0f,0 8px 30px #00000080}.silver-band{flex:0 0 auto;min-height:94px;max-height:200px;height:clamp(94px,22cqh,170px);display:grid;grid-template-columns:13fr 69fr 12fr;gap:10px;align-items:center;padding:10px 16px;border-radius:10px;background:linear-gradient(180deg,var(--silver-l),var(--silver-d))}.model-label{font-size:clamp(10px,min(2.3cqh,1.6cqw),18px);font-weight:700;color:#2b2e31;line-height:1.15;padding-right:4px}.model-label small{display:block;font-weight:400;font-size:.68em;opacity:.75}.lcd{background:var(--lcd-bg);border:2px solid #7c8478;box-shadow:inset 0 3px 8px #00000073;border-radius:6px;height:100%;min-height:74px;display:flex;flex-direction:column;justify-content:space-between;padding:8px 14px;font-family:Cascadia Mono,Consolas,DejaVu Sans Mono,monospace;position:relative}.lcd .annunciators{display:flex;gap:10px;font-size:clamp(9px,min(1.7cqh,1.2cqw),13px);font-weight:700;color:var(--lcd-bg);min-height:1em}.lcd .annunciators span{color:#e8ebe4;opacity:0}.lcd .annunciators span.on{opacity:1;color:var(--lcd-active)}.lcd .num{font-size:clamp(26px,min(7.2cqh,5cqw),54px);font-weight:700;color:var(--lcd-active);text-align:right;letter-spacing:.04em;white-space:nowrap;overflow:hidden;font-variant-numeric:tabular-nums}.lcd .weekday{position:absolute;left:14px;bottom:6px;color:var(--lcd-active);font-size:13px;font-weight:700;visibility:hidden}.lcd .weekday.on{visibility:visible}.deco{display:flex;align-items:center;justify-content:center}.deco .dot{width:clamp(14px,min(2.9cqh,2cqw),26px);height:clamp(14px,min(2.9cqh,2cqw),26px);border-radius:50%;background:radial-gradient(circle at 35% 35%,#f0f0f0,#9a9da0 70%)}.keypad{flex:1 1 auto;min-height:0;display:grid;gap:8px 12px;background:var(--keypanel);border-radius:10px;padding:10px;grid-template-columns:repeat(10,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr))}.keypad[data-layout=compact]{gap:6px 8px;padding:8px}.keypad[data-layout=compact] .key{font-size:clamp(17px,min(5cqh,5.4cqw),30px)}.keypad[data-layout=compact] .f-label{font-size:clamp(10px,min(2.6cqh,3cqw),15px);height:16px;line-height:16px}.keypad[data-layout=compact] .key .g-label{font-size:clamp(9px,min(2.2cqh,2.6cqw),14px)}.key-cell{display:flex;flex-direction:column;min-width:0;min-height:0}.key-cell .f-label{height:18px;flex:0 0 auto;color:var(--f-legend);font-size:clamp(11px,min(1.7cqh,1.2cqw),15px);font-weight:700;text-align:center;line-height:18px;cursor:pointer;-webkit-user-select:none;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.key-cell .f-label.empty{visibility:hidden}.key-cell .f-label:hover{text-decoration:underline}.key{flex:1 1 auto;min-height:30px;border:none;border-radius:8px 8px 10px 10px;background:linear-gradient(180deg,var(--key-top) 0%,var(--key-top) 78%,var(--key-edge) 100%);color:var(--legend);font-size:clamp(15px,min(3.2cqh,2.2cqw),30px);font-weight:600;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;box-shadow:0 2px #000a,inset 0 1px #ffffff17;touch-action:manipulation;-webkit-user-select:none;user-select:none}.key:hover{filter:brightness(1.12)}.key:active{transform:translateY(1px);box-shadow:0 1px #000a}.key .g-label{position:absolute;right:7px;bottom:4px;color:var(--g-legend);font-size:clamp(10px,min(1.6cqh,1.1cqw),14px);font-weight:700;cursor:pointer}.key .g-label:hover{text-decoration:underline}.key .g-label.empty{visibility:hidden}.key.f-key{background:linear-gradient(180deg,#e09a38,var(--f-key) 70%,#8f5a14);color:#241300}.key.g-key{background:linear-gradient(180deg,#34a3c2,var(--g-key) 70%,#175d71);color:#04222b}.key.enter-key{font-size:clamp(13px,min(2.3cqh,1.6cqw),20px);letter-spacing:.25em;font-weight:700}dialog{background:#202326;color:var(--legend);border:1px solid #4a4e52;border-radius:10px;max-width:640px;width:min(92vw,640px);max-height:min(86dvh,720px);overflow-y:auto;padding:20px 24px;margin:auto;box-shadow:0 20px 60px #0009}dialog::backdrop{background:#0000008c}dialog h2{font-size:18px;margin-bottom:12px}dialog h3{font-size:14px;margin:14px 0 6px;color:var(--f-legend)}dialog p,dialog li{font-size:13.5px;line-height:1.5;color:#cfd3d7}dialog ul,dialog ol{margin:4px 0 8px 20px}dialog table{border-collapse:collapse;font-size:13px;margin:8px 0}dialog td,dialog th{border:1px solid #3a3e42;padding:4px 10px;text-align:left}dialog kbd{background:#2e3134;border:1px solid #55595e;border-bottom-width:3px;border-radius:4px;padding:0 6px;font-size:12px;font-family:monospace}dialog .close-row{margin-top:16px;display:flex;gap:10px;justify-content:flex-end}dialog button.btn{background:#3a3e42;color:#fff;border:1px solid #55595e;padding:6px 16px;border-radius:6px;cursor:pointer;font-size:13px}dialog button.btn.danger{background:#7c2d12;border-color:#a3461f}dialog label{display:block;margin:8px 0;font-size:13.5px}dialog input[type=range]{width:220px}dialog .stat-grid{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;font-size:13px;font-family:monospace}.sr-status{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}@media (max-width: 319px),(max-height: 479px){body{overflow:auto}.housing{min-height:480px}}
