﻿:root{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:#2a2018;background:#f0ece6}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #3b6fd4;outline-offset:4px}#app{position:absolute;width:800px;height:600px;left:50%;top:50%;transform-origin:center;background:#faf8f5;overflow:hidden}#top-bar{position:absolute;inset:0 0 auto;height:35px;background:white;padding:2px 18px}#top-bar img{height:30px;max-width:200px}#title-bar{position:absolute;top:35px;width:100%;height:65px;background:#37474f;color:white}h1{position:absolute;left:100px;top:12px;margin:0;font-size:30px;font-weight:700}#btn-info{position:absolute;right:14px;top:8px;width:50px;height:50px;border:0;border-radius:50%;background:#8e24aa;color:white;font:italic 32px Georgia}#workspace{position:absolute;top:100px;width:800px;height:500px}.intro{position:absolute;top:12px;left:0;width:100%;margin:0;text-align:center;color:#74685e;font-size:17px}.instrument{position:absolute;left:44px;top:48px;width:300px;height:398px}#ukulele{width:300px;height:350px;display:block}#notes{position:absolute;left:88px;top:350px;display:flex;gap:6px}.note-button{width:40px;height:44px;border:1px solid #ded5ca;border-radius:13px;background:#fff;font-size:15px;font-weight:700;color:#74685e;padding:0}.note-button.selected{background:#2a9d5c;color:white;border-color:#2a9d5c;box-shadow:0 4px 12px #2a9d5c30}.string{stroke:#f9e6c4;stroke-width:2.3;pointer-events:none}.string.selected{stroke:#34c785;stroke-width:4;filter:drop-shadow(0 0 3px #34c785)}.hit{stroke:transparent;stroke-width:18;fill:none;cursor:pointer}.peg{cursor:pointer}.peg .key{fill:#858884;stroke:#666b66;stroke-width:2}.peg.selected .key{fill:#34c785;stroke:#21814d}.peg.selected .post{fill:#34c785}.peg.selected{filter:drop-shadow(0 0 4px #34c78560)}.tuner{position:absolute;left:370px;top:65px;width:380px;height:315px;background:white;border:1px solid #e5dfd7;border-radius:24px;padding:22px;text-align:center;box-shadow:0 7px 24px #59402a06}.target-label{font-size:11px;letter-spacing:1.8px;color:#8a7f74;font-weight:700}.target{height:80px;display:flex;align-items:center;justify-content:center;gap:14px}#note-name{font-size:48px;font-weight:750}#note-letter{font-size:18px;color:#8a7f74;background:#f7f3ee;padding:5px 10px;border-radius:9px}#meter{position:relative;height:53px;margin-top:3px}.meter-colors{position:absolute;top:16px;width:100%;height:14px;border-radius:10px;background:linear-gradient(to right,#ef4565 0%,#ed6a49 18%,#f4b24c 35%,#34c785 46%,#34c785 54%,#f4b24c 65%,#ed6a49 82%,#ef4565 100%)}.center-mark{position:absolute;left:50%;top:11px;width:2px;height:24px;background:#20764c}#needle{position:absolute;top:-8px;left:50%;transform:translateX(-50%);color:#37474f;font-size:24px;transition:left .18s ease}.ticks{position:absolute;top:36px;width:100%;display:flex;justify-content:space-between;font-size:11px;color:#8a7f74}.directions{display:flex;justify-content:space-between;font-size:13px;color:#8a7f74;margin-top:5px}#status{display:inline-block;margin-top:15px;border-radius:30px;padding:7px 22px;font-size:22px;font-weight:750;background:#fff1dc;color:#9a5c06}#status.tuned{background:#e3f7ec;color:#21814d}#status.far{background:#ffeaee;color:#b42c46}#hint{margin:8px 0;font-size:13px;color:#74685e}.frequency{display:flex;justify-content:center;gap:20px;color:#8a7f74;font-size:12px}dialog{width:560px;max-width:90%;border:0;border-radius:18px;background:#f7f3ee;color:#2a2018;padding:28px;line-height:1.65}dialog::backdrop{background:#0008}dialog h2{margin-top:0}#close-info{float:right;border:0;background:none;font-size:26px;color:#74685e}
body.portrait{background:#faf8f5}body.portrait #app{position:relative;left:auto;top:auto;width:100%;max-width:430px;height:auto;min-height:100vh;margin:auto;overflow:visible}body.portrait #top-bar{height:40px}body.portrait #title-bar{top:40px;height:50px}body.portrait h1{left:18px;top:12px;font-size:22px}body.portrait #btn-info{width:34px;height:34px;top:8px;font-size:25px}body.portrait #workspace{position:relative;top:auto;padding:106px 16px 20px;width:100%;height:auto;display:flex;flex-direction:column;align-items:center;gap:15px}body.portrait .intro{position:static;font-size:15px}body.portrait .instrument{position:relative;left:auto;top:auto;width:260px;height:285px}body.portrait #ukulele{width:260px;height:250px}body.portrait #notes{left:72px;top:250px;gap:3px}body.portrait .note-button{width:35px;height:35px;font-size:13px}body.portrait .tuner{position:relative;left:auto;top:auto;width:100%;height:300px;max-width:380px}
/* Reference drawing: fine nylon strings, compact grey keys, no guide lines. */
#notes{left:120px;top:354px;gap:0}
.note-button{width:19px;height:34px;border:0;border-radius:6px;background:transparent;font-size:10px;color:#62594e}
.note-button.selected{box-shadow:none}
.string{stroke:#f8e9c8;stroke-width:.8}
.string.selected{stroke:#34c785;stroke-width:1.5;filter:none}
.hit{stroke-width:8;fill:none;stroke:transparent}
.peg .key{fill:#81847e;stroke:#6d706a;stroke-width:.7}
.peg.selected{filter:none}
.peg.selected .key{stroke:#21814d;stroke-width:1}
body.portrait #notes{left:108px;top:254px;gap:0}
body.portrait .note-button{width:14px;height:30px;font-size:9px}
/* Use the shared SVG's original geometry and align labels with its string ends. */
#notes{left:0;width:100%;gap:0}
.note-button{position:absolute;transform:translateX(-50%);width:24px;font-size:11px}
.string{stroke:#ffff66;stroke-width:1}
.string.selected{stroke:#34c785;stroke-width:1.6}
.hit{stroke-width:7;stroke:transparent;fill:none}
.peg.selected path{fill:#34c785}
body.portrait #notes{left:0;width:100%;gap:0}
body.portrait .note-button{width:18px;font-size:9px}
#notation-toggle{position:absolute;right:50px;top:23px;display:flex;align-items:center;gap:10px;padding:7px 12px;border:1px solid #e5dfd7;border-radius:20px;background:#f7f3ee;color:#62594e;font-size:12px}
.switch-track{position:relative;display:inline-block;width:34px;height:19px;border-radius:20px;background:#b6afa5}
.switch-track span{position:absolute;left:3px;top:3px;width:13px;height:13px;border-radius:50%;background:white;transition:transform .15s}
#notation-toggle[aria-checked="true"] .switch-track{background:#3b6fd4}
#notation-toggle[aria-checked="true"] .switch-track span{transform:translateX(15px)}
#notation-toggle:disabled{opacity:.6}
body.portrait #notation-toggle{position:relative;left:auto;right:auto;top:auto;align-self:flex-end;margin-right:max(0px,calc((100% - 380px)/2))}


.microphone{position:absolute;left:370px;top:393px;width:380px;text-align:center}
#mic-button{border:0;border-radius:24px;background:#ff6b35;color:white;padding:11px 22px;font-weight:700;cursor:pointer}
#mic-button.listening{background:#37474f}
#mic-button:disabled{opacity:.5;cursor:wait}
#mic-state{display:block;margin-top:6px;font-size:12px;color:#74685e}
.privacy{font-size:10px;color:#8a7f74;margin:6px 0 0}
#status.idle{background:#f7f3ee;color:#74685e;font-size:20px}
#hint{min-height:32px;line-height:16px}
#needle[hidden]{display:none}
body.portrait .microphone{position:relative;left:auto;top:auto;width:100%;max-width:380px}
/* Reserve space for microphone guidance inside the meter card. */
.tuner{padding:18px}
.target{height:72px}
#status{margin-top:12px;padding:6px 18px;font-size:20px}
#hint{font-size:12px;line-height:16px;margin:6px 0}
body.portrait .tuner{height:315px}
.selection-mode{position:absolute;left:44px;top:441px;width:300px;display:flex;align-items:center;justify-content:center;gap:8px;color:#74685e;font-size:11px}
#auto-toggle{display:flex;align-items:center;gap:8px;padding:4px 9px;border:1px solid #e5dfd7;border-radius:20px;background:#f7f3ee;color:#62594e;font-size:11px}
#auto-toggle[aria-checked="true"] .switch-track{background:#3b6fd4}
#auto-toggle[aria-checked="true"] .switch-track span{transform:translateX(15px)}
#auto-toggle:disabled{opacity:.6;cursor:wait}
body.portrait .selection-mode{position:relative;left:auto;top:auto;width:100%}
#info{max-height:calc(100dvh - 32px);overflow-y:auto;font-size:15px;line-height:1.5}
#info h3{font-size:16px;margin:16px 0 6px}
#info ul{padding-left:21px;margin:0}
#info li{margin:5px 0}
