*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;min-height:100%;font-family:Arial,Helvetica,sans-serif}
body{background:#f4f2ed;color:#151515;overflow:hidden}
button,input,select{font:inherit}
button{cursor:pointer}
main{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));outline-offset:-8px;cursor:pointer}
#face{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(10px,3vh,26px);min-width:0;max-width:100%}
#face svg{display:block;width:min(82vw,82dvh);height:auto;max-width:900px;max-height:80dvh;overflow:visible}
.digital{font-size:clamp(54px,min(19vw,34vh),300px);font-weight:300;line-height:1;letter-spacing:-.065em;font-variant-numeric:tabular-nums;white-space:nowrap}
.date{font-size:clamp(13px,2.2vw,23px);letter-spacing:.12em;text-align:center;text-transform:uppercase;opacity:.7}
body.night .date{opacity:.55}
#panel{position:fixed;z-index:3;right:max(10px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));width:min(400px,calc(100vw - 20px));max-height:min(86dvh,700px);overflow:auto;border:1px solid #5b5b5b;border-radius:18px;padding:16px;background:#1c1e1f;color:#f4f2ed;box-shadow:0 10px 50px #0007}
#panel header{display:flex;justify-content:space-between;align-items:center;gap:12px}
#panel header strong{letter-spacing:.04em}
#panel button,#panel select,#panel input:not([type="checkbox"]){min-height:44px;border:1px solid #777;border-radius:9px;padding:8px 10px;background:#292c2d;color:#fff}
#panel input[type="color"]{min-width:72px;padding:3px}
#panel input[type="range"]{width:145px;padding:0}
#panel input[type="checkbox"]{width:24px;height:24px;accent-color:#dc5d49}
#panel nav{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;margin:16px 0}
#panel nav button{padding:7px 3px}
#panel nav button.active{background:#e9e4d8;color:#141414}
.section{display:flex;flex-direction:column;gap:12px}
.section label,#editorFields label{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;font-size:14px}
.section label>select,.section label>input:not([type="checkbox"]){width:54%;max-width:190px}
.section label.check{justify-content:flex-start;flex-direction:row-reverse}
#editorFields{display:flex;flex-direction:column;gap:7px}
.hint,#wakeStatus,#timeStatus{font-size:13px;color:#d1c7bb;line-height:1.4;margin:3px 0}
.actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.actions button{flex:1}
#updateNotice{border-top:1px solid #555;margin-top:15px;padding-top:12px;font-size:13px}
#updateNotice button{margin:5px}
@media(max-width:600px) and (orientation:landscape){#face svg{width:min(65vw,74dvh)}.digital{font-size:min(18vw,40dvh)}.date{font-size:13px}#panel{max-height:92dvh}}
