html:root .tools-page{max-width:800px;margin:0 auto;color:var(--ink)}
.tools-heading{margin-bottom:24px}.tools-heading h1{margin:5px 0 10px}.tools-heading p{color:var(--muted);font-size:14px}
html:root .tools-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:6px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft,#f6f8fb);margin-bottom:18px}
html:root .tools-tabs button{background:transparent;border:1px solid transparent;color:var(--muted);border-radius:10px;min-height:44px;font-size:13px;font-weight:600;cursor:pointer}
html:root .tools-tabs button[aria-pressed=true]{background:var(--surface,#fff);border-color:var(--line);color:var(--ink)}
html:root .tool-card{border:1px solid var(--line);border-radius:20px;background:var(--surface,#fff);padding:24px;display:grid;gap:22px}
.tool-display{text-align:center;padding:24px 12px;background:var(--surface-soft,#f6f8fb);border-radius:16px;display:grid;gap:10px}
.tool-display [data-tool-phase]{font-size:14px;font-weight:650;color:var(--muted)}.tool-display strong{font-size:clamp(52px,12vw,88px);line-height:1.15;font-variant-numeric:tabular-nums;letter-spacing:-3px;color:var(--ink)}
.tool-display [data-tool-detail]{font-size:13px;color:var(--muted)}.tool-progress{height:5px;background:var(--line);border-radius:5px;overflow:hidden;margin-top:12px}.tool-progress span{display:block;height:100%;background:var(--accent,#7190ae)}
html:root .tool-config{margin:0;padding:0;border:0;display:grid;gap:12px;min-width:0}.tool-config legend{font-weight:650;font-size:15px;margin-bottom:14px}.tool-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
html:root .tool-config label{display:grid;gap:6px;font-size:12px;font-weight:600;min-width:0;margin:0}html:root .tool-config input,html:root .tool-config select{width:100%;min-width:0;box-sizing:border-box;min-height:44px;padding:10px;border-radius:10px;font-size:16px}
.tool-config fieldset:disabled{opacity:.7}.tool-config>fieldset{margin:0;padding:0;border:0;display:grid;gap:12px;min-width:0}.tool-presets{display:flex;gap:8px;flex-wrap:wrap}.tool-presets button{border:1px solid var(--line);border-radius:20px;padding:8px 14px;background:var(--surface,#fff);color:var(--ink);font-size:12px;min-height:36px;cursor:pointer}
html:root .tools-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}html:root .tools-actions .button{width:100%;min-height:48px;justify-content:center;font-size:14px;border-radius:12px;background:var(--surface-soft,#edf4fa);color:var(--ink);border:1px solid var(--line)}
html:root .tool-sound{display:flex;align-items:center;gap:9px;margin:18px 0 10px;font-size:13px;min-height:44px}html:root .tool-sound input{width:18px!important;height:18px!important;min-height:18px!important;padding:0!important;margin:0;box-sizing:border-box;flex:none}
.tools-page .tool-help{font-size:11px;line-height:1.5;color:var(--muted);margin:0}.tool-error{font-size:12px;color:#b93640;margin:0}.tool-error:empty{display:none}
.tools-page button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
html:root[data-theme=midnight] .tool-error{color:#ffb4b4}
@media(max-width:600px){html:root .tool-card{padding:16px;gap:18px}.tool-display{padding:20px 8px}.tool-fields{gap:12px}.tools-tabs button{font-size:12px;padding:7px 4px}.tools-heading{margin-bottom:18px}}

.tools-tabs small{display:block;font-size:10px;font-weight:400;margin-top:3px;min-height:12px}.tools-tabs small:empty{display:none}

html:root .tools-fullscreen,html:root .tools-page:fullscreen{position:fixed;inset:0;z-index:10000;max-width:none;margin:0;overflow:auto;padding: max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));box-sizing:border-box;background:var(--surface);color:var(--ink)}
.tools-fullscreen .tools-heading,.tools-page:fullscreen .tools-heading{display:none}.tools-fullscreen .tool-config,.tools-page:fullscreen .tool-config{display:none}.tools-fullscreen .tool-display strong,.tools-page:fullscreen .tool-display strong{font-size:clamp(80px,20vw,220px)}.tools-fullscreen .tool-card,.tools-page:fullscreen .tool-card{max-width:1100px;margin:16px auto}.tool-fullscreen{margin-bottom:16px;min-height:44px}.tool-saved{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border-top:1px solid var(--line);padding-top:16px}.tool-saved .button{min-height:44px;font-size:13px}.tools-fullscreen .tool-display [data-tool-phase],.tools-page:fullscreen .tool-display [data-tool-phase]{font-size:24px}
html:root .tools-heading{display:block;padding:0;background:transparent;border:0;min-width:0}html:root .tools-heading h1{white-space:normal;word-break:normal;overflow-wrap:normal;font-size:30px;width:auto}html:root .tools-tabs{display:grid}html:root .tool-display{display:grid}html:root .tool-config fieldset{border:0;padding:0;margin:0}body.tools-focus-open{overflow:hidden!important}body.tools-focus-open> :not(.tools-page){visibility:hidden!important}body>.tools-fullscreen{visibility:visible!important;height:100dvh;min-height:100vh;z-index:2147483647!important}.tool-audio-status{font-size:12px;color:var(--muted);margin:8px 0}.tool-test-sound{min-height:44px;margin-bottom:8px}
html:root .tool-display{position:relative;padding-top:58px}
html:root .tool-icon-button{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);cursor:pointer}
html:root .tool-display .tool-fullscreen{position:absolute;top:10px;right:10px;margin:0}
.tool-icon-button svg{width:22px;height:22px;flex:none}
html:root .tools-fullscreen{height:100dvh;min-height:0!important;display:flex;flex-direction:column;overflow:auto}
html:root .tools-fullscreen>.tools-heading,html:root .tools-fullscreen>.tools-tabs,html:root .tools-fullscreen>.tool-test-sound,html:root .tools-fullscreen>.tool-audio-status,html:root .tools-fullscreen>.tool-sound,html:root .tools-fullscreen>.tool-help{display:none!important}
html:root .tools-fullscreen #spotter-tool-panel{display:flex;flex:1;min-height:0;width:100%}
html:root .tools-fullscreen .tool-card{display:flex;flex-direction:column;flex:1;min-width:0;max-width:1100px;width:100%;margin:0 auto;padding:0;border:0;border-radius:0;background:transparent;gap:24px}
html:root .tools-fullscreen .tool-config,html:root .tools-fullscreen .tool-error{display:none!important}
html:root .tools-fullscreen .tool-display{flex:1;display:flex;flex-direction:column;align-items:stretch;justify-content:center;padding:60px 20px 24px;background:transparent;gap:16px;min-height:200px}
html:root .tools-fullscreen [data-tool-time]{order:1;font-size:clamp(72px,18vw,210px);letter-spacing:-2px;line-height:1.1}
html:root .tools-fullscreen [data-tool-phase]{order:2;font-size:clamp(20px,4vw,30px)}
html:root .tools-fullscreen [data-tool-detail]{order:3;font-size:clamp(16px,3vw,24px)}
html:root .tools-fullscreen .tool-progress{order:4;height:8px;width:100%;max-width:800px;align-self:center;margin-top:28px}
html:root .tools-fullscreen .tools-actions{flex:none;width:100%;max-width:800px;align-self:center;gap:14px}
html:root .tools-fullscreen .tools-actions .button{min-height:64px;font-size:20px}
@media(max-width:600px){html:root .tools-fullscreen{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))}html:root .tools-fullscreen .tool-card{gap:16px}html:root .tools-fullscreen .tool-display{padding-left:0;padding-right:0}html:root .tools-fullscreen .tools-actions{grid-template-columns:1fr}html:root .tools-fullscreen [data-tool-time]{font-size:clamp(64px,21vw,126px)}}
@media(max-height:460px) and (orientation:landscape){html:root .tools-fullscreen .tool-display{min-height:110px;gap:4px;padding:24px 50px 8px}html:root .tools-fullscreen [data-tool-time]{font-size:64px}html:root .tools-fullscreen .tool-progress{margin-top:8px}html:root .tools-fullscreen .tools-actions{grid-template-columns:repeat(2,minmax(0,1fr))}html:root .tools-fullscreen .tools-actions .button{min-height:48px}}
