#history-open{display:none}
.device-heading-labels{display:flex;align-items:center;justify-content:space-between;gap:20px;flex:1;min-width:0}
@media(max-width:760px){.device-heading-labels{align-items:flex-start;flex-direction:column;gap:6px}.device-heading-labels #mode-label{text-align:left}}
.history-dialog{width:min(440px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:16px;color:#cbd2b9;background:linear-gradient(125deg,#30372d,#1b241d 58%,#272e25);border:1px solid #788268;box-shadow:inset 0 0 0 3px #111910,0 18px 70px #000b;overflow:auto}
.history-dialog::backdrop{background:#030805c9;backdrop-filter:blur(4px)}
.history-panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:12px}
.history-panel-heading p{margin:0 0 5px;font:10px/1.3 'PT Mono',Consolas,monospace;letter-spacing:.13em;color:#9aa88c}
.history-panel-heading h2{margin:0;font:600 18px/1.25 Onest,Arial,sans-serif;letter-spacing:0;color:#d6d2b9}
.history-panel-heading form{margin:0;flex:none}
.history-panel-close{display:grid;place-items:center;width:44px;height:44px;padding:0;background:#121b12;border:1px solid #647458;box-shadow:inset 0 0 0 2px #212b1e;font:30px/1 Onest,Arial,sans-serif;color:#d5d8c4}
.history-panel-close:hover{background:#303d29}
.history-panel-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:repeat(4,44px);gap:6px 10px;padding:10px;border:1px solid #4b5c3f;background:linear-gradient(110deg,#071b11,#102819);box-shadow:inset 0 2px 9px #0008}
.history-panel-choice{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-width:0;min-height:44px;padding:7px 10px;background:#102a19;border:1px solid #3b6837;border-radius:0;color:#7ad35e;text-shadow:0 0 3px #38ac2b44;touch-action:manipulation}
.history-panel-number{font:10px/1 'PT Mono',Consolas,monospace;color:#9dab87}
.history-panel-choice-code{font:700 22px/1.2 'PT Mono',Consolas,monospace;letter-spacing:1px}
.history-panel-choice.is-selected{background:#75ad60;border-color:#adc986;color:#09291a;text-shadow:none;box-shadow:inset 0 0 0 1px #172d1c}
.history-panel-choice.is-selected .history-panel-number{color:#183b24}
.history-panel-choice:not(:disabled):hover{border-color:#c2d49f}
.history-dialog button:focus-visible{outline:2px solid #f1df9b;outline-offset:2px}
.history-panel-feedback{display:grid;grid-template-columns:minmax(0,1fr) 62px 62px;gap:8px;align-items:center;margin-top:12px;padding:10px;background:#0d190fe8;border:1px solid #536349}
.history-panel-selected-label{margin:0 0 5px;font:10px/1.35 'PT Mono',Consolas,monospace;letter-spacing:.06em;text-transform:uppercase;color:#9fab8e}
.history-panel-selected-code{display:block;font:700 25px/1.2 'PT Mono',Consolas,monospace;letter-spacing:2px;color:#b7de9a}
.history-panel-feedback .history-panel-summary{margin:8px 0 0;font:11px/1.45 Onest,Arial,sans-serif;color:#b5c1a8}
.history-panel-lamp{display:flex;flex-direction:column;align-items:center;gap:5px;margin:0}
.history-panel-lamp img{display:block;width:30px;height:130px;object-fit:contain}
.history-panel-lamp figcaption{font:600 14px/1.2 Onest,Arial,sans-serif;color:#c2cdb5;text-align:center}
@media(max-width:760px){#history-open{display:inline-flex;align-items:center;justify-content:center;flex:none;min-width:76px;min-height:44px;padding:8px 10px;border:1px solid #687558;background:linear-gradient(#3a4731,#202b20);box-shadow:inset 0 0 0 2px #172016;font:12px/1.2 Onest,Arial,sans-serif;letter-spacing:0;color:#d9dbbc;touch-action:manipulation}#history-open:disabled{opacity:.45}#history-open:not(:disabled):hover{background:#46573a}}
@media(max-width:340px){.history-dialog{padding:12px}.history-panel-heading h2{font-size:16px}.history-panel-grid{padding:8px;gap:6px}.history-panel-choice{padding:7px}.history-panel-choice-code{font-size:20px}.history-panel-feedback{grid-template-columns:minmax(0,1fr) 50px 50px;padding:8px;gap:6px}.history-panel-lamp img{width:27px;height:117px}.history-panel-selected-code{font-size:23px}.history-panel-lamp figcaption{font-size:13px}}
