/* A quiet, dedicated tuning instrument. */
#tunerBackdrop {
  position:fixed;inset:0;z-index:1199;background:rgba(14,24,25,.38);
  backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);
}
#tunerBackdrop[hidden]{display:none}
body.tuner-open{overflow:hidden}
html:has(body.tuner-open){overflow:hidden;scrollbar-gutter:stable}
#tunerQuickPanel {
  --tu-paper:var(--surface,#fff);--tu-ink:var(--text-main,#18202a);--tu-muted:var(--text-muted,#667085);--tu-line:var(--border,#d8dde5);
  --tu-accent:#347fc4;--tu-wash:#edf5ff;--tu-warm:#b77835;--tu-success:#20854c;--tu-success-wash:#e8f6ed;
  position:fixed!important;inset:50% auto auto 50%!important;transform:translate(-50%,-50%);
  width:min(440px,calc(100% - 24px))!important;max-height:calc(100dvh - 32px)!important;
  padding:24px!important;box-sizing:border-box;overflow-y:auto!important;overflow-x:hidden!important;
  border:1px solid rgba(255,255,255,.35);border-radius:28px!important;
  color:var(--tu-ink);background:var(--tu-paper)!important;
  box-shadow:0 35px 110px rgba(10,25,22,.28),inset 0 1px rgba(255,255,255,.6);
  z-index:1200!important;scrollbar-width:none;overscroll-behavior:contain;
  font-family:inherit;text-shadow:none;animation:none;
}
#tunerQuickPanel::-webkit-scrollbar{display:none}
#tunerQuickPanel.open {
  display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  grid-template-areas:"tuner-head" "tuner-stage" "tuner-guide" "tuner-error" "tuner-privacy"!important;
  grid-template-rows:auto!important;gap:0!important;
}
body.dark-mode #tunerQuickPanel {
  --tu-accent:#79b8ff;--tu-wash:#24354a;--tu-warm:#e6b376;--tu-success:#6ce6a0;--tu-success-wash:#19362b;
  border-color:var(--tu-line);box-shadow:0 35px 110px rgba(0,0,0,.48),inset 0 1px rgba(255,255,255,.05);
}
body.cyberpunk-mode #tunerQuickPanel{
  --tu-accent:#00e7ff;--tu-wash:#102837;--tu-warm:#ff36cf;--tu-success:#6dff9a;--tu-success-wash:#103527;
  border-color:#1d5369;border-radius:18px!important;
  background:radial-gradient(ellipse at 50% 30%,#102b3c 0%,#090d1a 65%)!important;
  box-shadow:0 30px 100px #000b,0 0 35px #00e7ff14,inset 0 1px #00e7ff55;
}
body.cyberpunk-mode #tunerQuickPanel .tuner-note-letter{
  font-family:inherit;font-weight:300;letter-spacing:-3px;text-shadow:0 0 28px #00e7ff55;
}
body.cyberpunk-mode #tunerQuickPanel .tuner-dial-pointer{filter:drop-shadow(0 0 5px #ff36cf88)}
body.cyberpunk-mode #tunerQuickPanel .tuner-dial-pointer line{stroke:#ff36cf}
body.cyberpunk-mode #tunerQuickPanel .tuner-dial-pointer circle{fill:#ff36cf}
body.cyberpunk-mode #tunerQuickPanel .tuner-arc-zone{filter:drop-shadow(0 0 4px #00e7ff99)}
body.cyberpunk-mode #tunerQuickPanel .tuner-guide-string.current::before{border-color:#00e7ff66;box-shadow:inset 0 0 15px #00e7ff0d}
body.cyberpunk-mode #tunerQuickPanel .tuner-panel-head strong{color:var(--tu-ink);text-shadow:none}
#microphoneNotice{
  box-sizing:border-box;width:min(440px,calc(100% - 32px));max-height:calc(100dvh - 32px);
  padding:28px;border:1px solid var(--border,#d8dde5);border-radius:22px;
  background:var(--surface,#fff);color:var(--text-main,#18202a);font-family:inherit;
  box-shadow:0 24px 90px #0004;
}
#microphoneNotice::backdrop{background:#10182766;backdrop-filter:blur(6px)}
#microphoneNotice h2{font-size:21px;line-height:1.3;font-weight:500;margin:0 0 16px}
#microphoneNotice p{font-size:14px;line-height:1.65;color:var(--text-muted,#667085);margin:12px 0}
#microphoneNotice form{display:flex;justify-content:flex-end;margin-top:22px}
#microphoneNotice button{min-height:44px;padding:10px 24px;border:1px solid var(--border,#d8dde5);border-radius:99px;background:var(--surface-soft,#f7f8fa);color:var(--text-main,#18202a);font:inherit;cursor:pointer}
#microphoneNotice button:focus-visible{outline:2px solid var(--note-fill,#347fc4);outline-offset:3px}
body.cyberpunk-mode #microphoneNotice{border-color:#1d5369;box-shadow:0 24px 90px #0009,0 0 24px #00e7ff22}
#tunerQuickPanel .tuner-panel-head {
  grid-area:tuner-head;position:static;margin:0;padding:0!important;gap:10px;
  border:0;border-radius:0;background:none;align-items:center;
}
#tunerQuickPanel .tuner-panel-head>div:first-child{min-width:0;gap:5px}
#tunerQuickPanel .tuner-panel-head strong {
  color:var(--tu-ink);font-size:19px;font-weight:500;letter-spacing:-.6px;line-height:1.2;
}
#tunerQuickPanel .tuner-panel-head span {color:var(--tu-muted);font-size:10px;font-weight:400;letter-spacing:0;line-height:1.4}
#tunerQuickPanel .metro-quick-head-actions{gap:4px;flex-shrink:0;align-items:center}
#tunerQuickPanel #tunerQuickCloseBtn {
  width:44px;height:44px;min-width:44px;border:0;border-radius:50%;background:none;
  color:var(--tu-muted);font-size:25px;font-weight:300;box-shadow:none;
}
#tunerQuickPanel #tunerStartBtn {
  width:auto;min-width:90px;height:44px;min-height:44px;margin:0;padding:0 13px;
  display:flex;align-items:center;justify-content:center;gap:8px;
  color:var(--tu-ink);background:transparent;border:1px solid var(--tu-line);border-radius:99px;
  box-shadow:none;font-size:11px;font-weight:500;letter-spacing:0;
}
#tunerStartBtn::before{content:"";width:7px;height:7px;flex:none;border-radius:50%;background:var(--tu-muted)}
#tunerQuickPanel #tunerStartBtn.running{background:var(--tu-wash);border-color:var(--tu-accent);color:var(--tu-accent)}
#tunerStartBtn.running::before{background:var(--tu-accent);box-shadow:0 0 0 4px var(--tu-wash)}
#tunerQuickPanel button:focus-visible,#tunerQuickPanel .tuner-auto-control:focus-within {
  outline:2px solid var(--tu-accent);outline-offset:3px;
}
#tunerQuickPanel #tunerStage {
  grid-area:tuner-stage;align-self:center;width:100%;box-sizing:border-box;
  padding:19px 0 18px!important;overflow:visible;border:0;border-radius:0;
  background:none;box-shadow:none;transition:none;
}
#tunerQuickPanel #tunerStage::before{display:none}
.tuner-dial{position:relative;width:100%;max-width:370px;aspect-ratio:370/282;margin:0 auto}
.tuner-dial-svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;color:var(--tu-line)}
.tuner-arc{fill:none;stroke:currentColor;stroke-width:1}
.tuner-arc-fine{opacity:.45}
.tuner-dial-ticks{stroke:var(--tu-muted);stroke-width:1;opacity:.65}
.tuner-arc-zone{fill:none;stroke:var(--tu-accent);stroke-width:3;stroke-linecap:round;opacity:.6}
.tuner-dial-index{fill:var(--tu-accent)}
.tuner-dial-pointer{transform-origin:185px 170px;transform:rotate(var(--tuner-angle,0deg));transition:transform 90ms linear;opacity:1}
.tuner-dial-pointer line{stroke:var(--tu-accent);stroke-width:2;stroke-linecap:round}
.tuner-dial-pointer circle{fill:var(--tu-accent)}
.tuner-dial-svg text{fill:var(--tu-muted);font-family:Arial,Helvetica,sans-serif;font-size:9px;letter-spacing:1.5px;text-anchor:middle}
#tunerQuickPanel .tuner-note-display {
  position:absolute;inset:35% 0 auto;height:34%;min-height:0;align-items:baseline;line-height:1;
}
#tunerQuickPanel .tuner-note-letter {
  color:var(--tu-ink);font-family:Georgia,'Times New Roman',serif;font-size:clamp(68px,16vw,96px);
  font-weight:400;letter-spacing:-5px;text-shadow:none;transform:none;
}
#tunerQuickPanel .tuner-note-accidental{align-self:auto;margin:0 0 0 5px;color:var(--tu-accent);font-size:29px;font-weight:400}
#tunerQuickPanel .tuner-note-octave{margin:0 0 0 6px;color:var(--tu-muted);font-size:16px;font-weight:400}
.tuner-dial-caption{position:absolute;top:74%;left:0;right:0;text-align:center;color:var(--tu-muted);font-size:9px;letter-spacing:2.2px;text-transform:uppercase}
#tunerQuickPanel .tuner-status {
  min-height:36px;margin:-5px 0 0;text-align:center;color:var(--tu-ink);
  font-size:13px;font-weight:400;letter-spacing:0;line-height:1.4;
}
#tunerQuickPanel #tunerStage{--tuner-feedback:color-mix(in srgb,var(--tu-success) var(--tuner-green,0%),var(--tu-warm))}
#tunerQuickPanel .tuner-has-pitch .tuner-note-letter,
#tunerQuickPanel .tuner-has-pitch .tuner-note-accidental{color:var(--tuner-feedback);transition:color 120ms linear}
#tunerQuickPanel .tuner-has-pitch .tuner-arc,
#tunerQuickPanel .tuner-has-pitch .tuner-arc-zone,
#tunerQuickPanel .tuner-has-pitch .tuner-dial-ticks,
#tunerQuickPanel .tuner-has-pitch .tuner-dial-pointer line{stroke:var(--tuner-feedback);transition:stroke 120ms linear}
#tunerQuickPanel .tuner-has-pitch .tuner-dial-index,
#tunerQuickPanel .tuner-has-pitch .tuner-dial-pointer circle{fill:var(--tuner-feedback)}
#tunerQuickPanel .tuner-has-pitch .tuner-arc-zone{opacity:1}
#tunerQuickPanel .tuner-confirmed .tuner-status{color:var(--tu-success);font-size:16px;font-weight:600;letter-spacing:.1px}
#tunerQuickPanel .tuner-confirmed .tuner-note-letter{text-shadow:0 0 25px color-mix(in srgb,var(--tu-success) 25%,transparent)}
.tuner-confirmed-check{position:absolute;top:76%;left:calc(50% - 15px);width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:var(--tu-success);color:var(--tu-paper);font:600 19px/1 system-ui;opacity:0;transform:scale(.7);transition:opacity 150ms ease,transform 200ms ease}
.tuner-confirmed .tuner-confirmed-check{opacity:1;transform:scale(1)}
.tuner-lock-progress{width:80px;height:3px;margin:0 auto 8px;border-radius:9px;background:var(--tu-line);opacity:0;overflow:hidden}
.tuner-lock-progress>span{display:block;width:100%;height:100%;background:var(--tu-success);transform:scaleX(var(--tuner-lock-progress,0));transform-origin:left;transition:transform 70ms linear}
.tuner-confirming .tuner-lock-progress{opacity:1}
.tuner-announcement{position:absolute!important;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#tunerQuickPanel.tuner-string-celebrate .tuner-confirmed-check{animation:tunerConfirmPop 400ms ease-out}
@keyframes tunerConfirmPop{0%{transform:scale(.65);box-shadow:0 0 0 0 transparent}55%{transform:scale(1.12);box-shadow:0 0 0 12px color-mix(in srgb,var(--tu-success) 14%,transparent)}100%{transform:scale(1);box-shadow:0 0 0 18px transparent}}
body.cyberpunk-mode #tunerQuickPanel .tuner-has-pitch .tuner-dial-pointer{filter:drop-shadow(0 0 6px var(--tuner-feedback))}
body.cyberpunk-mode #tunerQuickPanel .tuner-has-pitch .tuner-dial-pointer line{stroke:var(--tuner-feedback)}
body.cyberpunk-mode #tunerQuickPanel .tuner-has-pitch .tuner-dial-pointer circle{fill:var(--tuner-feedback)}
body.cyberpunk-mode #tunerQuickPanel .tuner-confirmed .tuner-note-letter{text-shadow:0 0 28px color-mix(in srgb,var(--tu-success) 40%,transparent)}
body.cyberpunk-mode #tunerQuickPanel .tuner-has-pitch .tuner-arc-zone{filter:drop-shadow(0 0 5px var(--tuner-feedback))}
#tunerQuickPanel .tuner-flat,#tunerQuickPanel .tuner-sharp,#tunerQuickPanel .tuner-wrong{--tuner-indicator:var(--tu-warm)}
#tunerQuickPanel .tuner-idle .tuner-dial-pointer,#tunerQuickPanel .tuner-listening .tuner-dial-pointer{opacity:.18}
#tunerQuickPanel .tuner-signal-hold .tuner-dial-pointer{opacity:.4}
#tunerQuickPanel .tuner-reading-row{display:flex;justify-content:center;gap:0;margin:0}
#tunerQuickPanel .tuner-reading-row>div{flex:1;min-width:0;min-height:0;padding:0 5px;border:0;border-radius:0;background:none}
#tunerQuickPanel .tuner-reading-row>div+div{border-left:1px solid var(--tu-line)}
#tunerQuickPanel .tuner-reading-row span{color:var(--tu-muted);font-size:9px;font-weight:400;letter-spacing:.6px}
#tunerQuickPanel .tuner-reading-row strong{color:var(--tu-ink);font-size:12px;font-weight:400;margin-top:5px;font-variant-numeric:tabular-nums}
#tunerQuickPanel .tuner-signal{width:44px;height:2px;margin:15px auto 0;background:var(--tu-line)}
#tunerQuickPanel .tuner-signal>span{background:var(--tu-accent)}
#tunerQuickPanel #tunerGuide {
  grid-area:tuner-guide;margin:0!important;padding:15px 0 0!important;
  border:0;border-top:1px solid var(--tu-line);border-radius:0;background:none;box-shadow:none;
}
#tunerQuickPanel .tuner-guide-head{display:flex;align-items:center;gap:6px;margin:0 0 12px}
#tunerQuickPanel .tuner-guide-copy>span{color:var(--tu-muted);font-size:9px;font-weight:400;letter-spacing:1.4px}
#tunerQuickPanel .tuner-guide-copy small{display:none}
#tunerQuickPanel .tuner-guide-head-actions{gap:4px;min-width:0}
#tunerQuickPanel .tuner-auto-control {
  display:flex;gap:8px;min-height:44px;padding:0 7px;border:0;border-radius:99px;background:none;
}
#tunerQuickPanel .tuner-auto-copy{display:flex}
#tunerQuickPanel .tuner-auto-copy strong{color:var(--tu-ink);font-size:11px;font-weight:400}
#tunerQuickPanel .tuner-auto-copy small{display:none}
#tunerQuickPanel .tuner-auto-track{width:30px;height:18px;flex-basis:30px;padding:2px;background:var(--tu-line);box-shadow:none}
#tunerQuickPanel .tuner-auto-track i{width:14px;height:14px;box-shadow:0 1px 2px #0002}
#tunerQuickPanel .tuner-auto-control input:checked+.tuner-auto-track{background:var(--tu-accent);box-shadow:none}
#tunerQuickPanel .tuner-auto-control input:checked+.tuner-auto-track i{transform:translateX(12px)}
#tunerQuickPanel #tunerGuideReset {
  min-height:44px;padding:0 8px;color:var(--tu-muted);border:0;background:none;font-size:11px;
  font-weight:400;text-transform:none;
}
#tunerQuickPanel .tuner-guide-strings{gap:3px}
#tunerQuickPanel .tuner-guide-string {
  position:relative;height:60px;padding:8px 1px;border:0;border-radius:50%;background:none;
  box-shadow:none;transform:none;animation:none;isolation:isolate;
}
#tunerQuickPanel .tuner-guide-string::before{
  content:"";position:absolute;z-index:-1;width:44px;height:44px;max-width:100%;border-radius:50%;
  left:50%;top:50%;transform:translate(-50%,-50%);border:1px solid transparent;
}
#tunerQuickPanel .tuner-guide-string small{color:var(--tu-muted);font-size:9px;font-weight:400}
#tunerQuickPanel .tuner-guide-string strong{margin-top:6px;color:var(--tu-ink);font-size:20px;font-weight:400}
#tunerQuickPanel .tuner-guide-string.current::before{width:52px;height:60px;background:var(--tu-wash);border-color:var(--tu-line);border-radius:99px}
#tunerQuickPanel .tuner-guide-string.done strong,#tunerQuickPanel .tuner-guide-string.done small{color:var(--tu-success)}
#tunerQuickPanel .tuner-guide-string.done::before{width:52px;height:60px;border-radius:99px;background:var(--tu-success-wash);border-color:var(--tu-success);box-shadow:0 0 12px color-mix(in srgb,var(--tu-success) 16%,transparent)}
#tunerQuickPanel .tuner-guide-string.done::after{content:"";position:absolute;bottom:-4px;left:calc(50% - 3px);width:6px;height:6px;border-radius:50%;background:var(--tu-success);box-shadow:0 0 8px var(--tu-success)}
#tunerQuickPanel .tuner-guide-string.just-done::before{animation:tunerStringGlow 600ms ease-out}
body.cyberpunk-mode #tunerQuickPanel .tuner-guide-string.done::before{border-color:var(--tu-success);box-shadow:0 0 14px color-mix(in srgb,var(--tu-success) 28%,transparent)}
@keyframes tunerStringGlow{0%{box-shadow:0 0 0 0 transparent}45%{box-shadow:0 0 18px color-mix(in srgb,var(--tu-success) 45%,transparent)}100%{box-shadow:0 0 12px color-mix(in srgb,var(--tu-success) 16%,transparent)}}
#tunerQuickPanel .tuner-guide-instruction{min-height:28px;margin:16px 0 0;color:var(--tu-muted);font-size:11px;font-weight:400;line-height:1.5;letter-spacing:0}
#tunerQuickPanel .tuner-guide-instruction:empty{display:none}
#tunerQuickPanel .tuner-privacy{grid-area:tuner-privacy;margin:8px 0 0!important;color:var(--tu-muted);font-size:9px;line-height:1.5;max-width:290px;justify-self:center}
#tunerQuickPanel .tuner-error{grid-area:tuner-error;font-size:12px;font-weight:400;padding:10px;margin:8px 0!important}
#tunerQuickPanel [hidden]{display:none!important}
@media(hover:hover){
  #tunerQuickPanel #tunerStartBtn:hover,#tunerQuickPanel #tunerQuickCloseBtn:hover{background:var(--tu-wash)}
  #tunerQuickPanel .tuner-guide-string:hover::before{border-color:var(--tu-line)}
}
@media(max-width:720px){
  #tunerQuickPanel{width:calc(100% - 20px)!important;max-width:440px;padding:21px!important;max-height:calc(100dvh - max(20px,env(safe-area-inset-top)) - max(20px,env(safe-area-inset-bottom)))!important}
}
@media(max-width:360px){
  #tunerQuickPanel{padding:16px!important;width:calc(100% - 16px)!important;border-radius:22px!important}
  #tunerQuickPanel .tuner-panel-head strong{font-size:17px}
  #tunerQuickPanel .tuner-panel-head span{max-width:128px;font-size:9px}
  #tunerQuickPanel #tunerStartBtn{min-width:75px;padding:0 9px}
  #tunerQuickPanel .tuner-panel-head{gap:4px}
  #tunerQuickPanel .tuner-guide-copy>span{font-size:8px;letter-spacing:1px}
}
@media(max-height:700px) and (orientation:portrait){
  #tunerQuickPanel{padding:16px!important}
  #tunerQuickPanel #tunerStage{padding:6px 0 12px!important}
  #tunerQuickPanel .tuner-dial{max-width:290px}
  #tunerQuickPanel .tuner-guide-head{margin-bottom:4px}
  #tunerQuickPanel #tunerGuide{padding-top:5px!important}
  #tunerQuickPanel .tuner-guide-instruction{margin-top:9px;min-height:22px}
}
@media(max-height:520px) and (min-width:540px) and (orientation:landscape){
  #tunerQuickPanel{width:min(760px,calc(100% - 32px))!important;max-width:none;padding:16px 22px!important;max-height:calc(100dvh - 16px)!important}
  #tunerQuickPanel.open{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;grid-template-areas:"tuner-head tuner-head" "tuner-stage tuner-guide" "tuner-stage tuner-error" "tuner-stage tuner-privacy"!important;column-gap:24px!important}
  #tunerQuickPanel #tunerStage{padding:0!important}
  #tunerQuickPanel .tuner-dial{max-width:240px}
  #tunerQuickPanel .tuner-note-letter{font-size:66px}
  #tunerQuickPanel .tuner-status{font-size:11px;min-height:27px}
  #tunerQuickPanel #tunerGuide{border:0;padding:8px 0 0!important;align-self:center}
  #tunerQuickPanel .tuner-guide-head{flex-wrap:wrap;margin-bottom:6px}
  #tunerQuickPanel .tuner-guide-head-actions{margin-left:0}
  #tunerQuickPanel .tuner-guide-instruction{margin-top:12px}
  #tunerQuickPanel .tuner-signal{margin-top:10px}
  #tunerQuickPanel .tuner-privacy{align-self:start;margin-top:0!important}
}
@media(prefers-reduced-motion:reduce){
  #tunerQuickPanel *,#tunerQuickPanel *::before,#tunerQuickPanel *::after{transition:none!important;animation:none!important}
}
@media(max-width:360px) and (max-height:620px){
  #tunerQuickPanel .tuner-dial{max-width:225px}
}
@media(max-height:360px) and (min-width:540px) and (orientation:landscape){
  #tunerQuickPanel .tuner-dial{max-width:196px}
  #tunerQuickPanel .tuner-note-letter{font-size:58px}
}
