:root{color-scheme:dark;--bg:#09111a;--panel:#111c28;--line:#2b3e51;--muted:#a1b3c4;--text:#e9f0f5;--cyan:#78d8e9;--gold:#f5b963;--green:#68d6b4;--red:#fa7581}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Noto Sans JP","Segoe UI",sans-serif;line-height:1.5}h1,h2,p{margin:0}h2{font-size:15px;font-weight:700;letter-spacing:.025em}.site-head{padding:22px max(18px,calc((100vw - 1220px)/2));display:flex;justify-content:space-between;gap:20px;border-bottom:1px solid var(--line);background:linear-gradient(115deg,#122a36,#0b141e)}.eyebrow{font-size:11px;color:var(--green);letter-spacing:.15em;font-weight:800}h1{font-size:clamp(21px,3.3vw,33px);letter-spacing:-.04em;margin:3px 0}h1 span{color:var(--cyan)}.head-copy p{font-size:12px;color:var(--muted)}.version{text-align:right;font-size:12px;color:#8facc1;white-space:nowrap}.version small{font-size:10px;letter-spacing:.08em}main{max-width:1252px;margin:auto;padding:16px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:12px;overflow:hidden}.input-card{padding:16px;margin-bottom:14px}.row-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:10px}.privacy,.mini,.legend,.note{color:var(--muted);font-size:11px}.privacy{color:var(--green)}.file-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.upload{padding:10px 17px;border-radius:10px;border:1px solid var(--cyan);color:var(--cyan);cursor:pointer;display:flex;flex-direction:column;align-items:flex-start}.upload strong{font-size:14px}.upload span{font-size:10px}#wavFile{position:absolute;width:1px;height:1px;opacity:0}.file-meta{font-size:13px;color:#bcd0df;word-break:break-word;flex:1;min-width:120px}.controls{display:flex;align-items:end;flex-wrap:wrap;gap:10px;margin-top:12px}.controls label{font-size:12px;color:var(--muted);display:flex;flex-direction:column;gap:4px}input[type=number],select{font:inherit;background:#0b1621;border:1px solid #496071;color:var(--text);border-radius:7px;padding:10px;max-width:110px;min-height:42px}button{font:inherit;cursor:pointer;font-size:13px;font-weight:700;border:1px solid #4b6477;border-radius:8px;padding:10px 17px;min-height:42px;color:var(--text);background:#24384a}button.primary{border:0;background:#56c7d3;color:#08232a}button:disabled{opacity:.35;cursor:not-allowed}.progress{height:4px;background:#243648;border-radius:5px;margin-top:14px;overflow:hidden}.progress-bar{background:linear-gradient(90deg,#44a8d0,#82e8bb);height:100%;width:0%}.status{font-size:12px;color:#bdcedd;min-height:18px;margin-top:8px}.status.error{color:var(--red)}.player{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:10px}.player audio{width:min(470px,100%);height:40px}.play-info{font-size:11px;color:#a1b3c4;flex:1}.dashboard{display:grid;grid-template-columns:1.2fr .8fr;gap:14px}.dashboard>.panel{min-width:0;padding:13px}.hero{grid-column:1/-1}.hero canvas{height:clamp(360px,54vw,620px)}canvas{display:block;width:100%;background:#0c111a;border-radius:6px}.legend{display:flex;gap:10px;justify-content:space-between;margin-top:8px;flex-wrap:wrap}.meters-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.meter{background:#0b151f;padding:18px 8px;text-align:center;border:1px solid #203347;border-radius:8px}.value{font-size:clamp(22px,4vw,37px);font-weight:750;letter-spacing:-.04em;color:#f3ba70;font-variant-numeric:tabular-nums}.value.secondary-value{color:var(--cyan)}.meter-name{font-size:11px;color:#99b0c4}.note{margin-top:10px}.spectrum canvas,.field canvas{height:220px}.field-stats{display:flex;justify-content:space-around;margin:10px 0;font-size:12px;color:#a2b8cc}.field-stats strong{color:#f0f6ff;font-size:18px;display:block;text-align:center}.toggle{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:6px;white-space:nowrap}.footnotes{margin-top:14px;padding:17px;font-size:12px;color:#a6b9c8}.footnotes h2{margin-bottom:8px;color:var(--text)}.footnotes p+p{margin-top:10px}.footnotes a{color:#80dbe9}@media(max-width:780px){.dashboard{grid-template-columns:1fr}.hero{grid-column:auto}.site-head{padding:15px 16px}.input-card{padding:13px}.hero canvas{height:clamp(385px,112vw,540px)}.meters-grid{grid-template-columns:repeat(2,1fr)}.spectrum canvas,.field canvas{height:210px}.privacy{font-size:10px;max-width:155px;text-align:right}}@media(orientation:landscape) and (max-height:600px){.hero canvas{height:65vh}.site-head{padding-top:8px;padding-bottom:8px}}

.spectrum-info{font-size:11px;color:#91adbf;text-align:right;margin-top:7px}
.hero .row-title{flex-wrap:wrap}
@media(max-width:430px){.hero canvas{height:clamp(365px,114vw,510px)}}

/* Four explicit colour choices: three tonal maps + one rainbow. Zero extra canvases. */
.themes{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 10px;padding:0;border:0;min-width:0}
.themes legend{font-size:10px;color:#a2b6c5;margin-bottom:6px;font-weight:700;letter-spacing:.05em}
.theme-option{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid #384a5c;border-radius:8px;color:#bfcedd;background:#0c1721;font-size:11px;font-weight:650;cursor:pointer;min-height:36px;white-space:nowrap}
.theme-option:has(input:checked){border-color:#b8d4dd;color:#fff;background:#1f303d;box-shadow:inset 0 0 0 1px #738d9c}
.theme-option:focus-within{outline:2px solid #92d8f5;outline-offset:1px}
.theme-option input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.theme-dot{height:13px;width:23px;border-radius:4px;flex:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)}
.theme-amber .theme-dot{background:linear-gradient(90deg,#17395a,#c25318,#fff2a2)}
.theme-ice .theme-dot{background:linear-gradient(90deg,#0b224e,#177ac6,#ccfdff)}
.theme-green .theme-dot{background:linear-gradient(90deg,#063e31,#0fb95c,#e2ff8f)}
.theme-rainbow .theme-dot{background:linear-gradient(90deg,#a235f2,#3064ff,#00e9ed,#9dff56,#ffdc30,#ff4786)}
@media(max-width:480px){.theme-option{font-size:10px;flex:1 1 calc(50% - 6px);justify-content:center;padding:8px 5px}.themes{gap:6px}}
/* v0.5.1: drag-to-move WAV overview (reference interaction: 聴き比べできるもん！). */
.range-picker{margin-top:17px}.range-head,.wave-select-head,.range-timing{display:flex;align-items:center;justify-content:space-between;gap:8px}.range-head{font-size:14px}.range-head>span{font-variant-numeric:tabular-nums;color:#acc8d8;font-size:12px}.duration-choices{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:9px 0 12px;padding:0;border:0}.duration-choices legend{font-size:11px;color:var(--muted);margin-bottom:7px}.duration-choices label{cursor:pointer;min-width:0;position:relative}.duration-choices input{position:absolute;opacity:0;width:1px;height:1px}.duration-choices span{display:flex;align-items:center;justify-content:center;background:#0c1925;border:1px solid #536b80;border-radius:9px;min-height:46px;font-weight:700;font-size:13px}.duration-choices input:checked+span{background:#244f50;border:2px solid #9ce0d0}.duration-choices input:focus-visible+span{outline:3px solid #ecce84;outline-offset:1px}.duration-choices input:disabled+span{opacity:.35;cursor:not-allowed}.wave-select-wrap{border:1px solid #456273;border-radius:12px;padding:10px;background:#0b1824}.wave-select-head{font-size:11px;color:#a9cddb;flex-wrap:wrap;margin-bottom:7px}#waveSelect{height:128px;width:100%;background:#071520;cursor:crosshair;touch-action:none;user-select:none}.range-timing{font-size:12px;font-variant-numeric:tabular-nums;margin-top:7px;color:#cee9e9}#startRange{width:100%;accent-color:#a8e1cf;min-height:30px;margin-top:6px;cursor:pointer}.wave-hint{font-size:11px;color:#b3cddd;margin:8px 0 0}.full-warning{border-left:4px solid #e1b468;border-radius:6px;background:#342b21;color:#f5d8a6;font-size:12px;padding:10px 12px;margin-top:10px}.controls{margin-top:12px}
@media(max-width:480px){.wave-select-head{font-size:10px}#waveSelect{height:104px}.duration-choices span{font-size:12px;min-height:44px}.wave-select-wrap{padding:8px}}

/* v0.5.2: strict vertical monitoring order and bounded L/R sample-peak bars. */
.dashboard{grid-template-columns:minmax(0,1fr)}
.dashboard>.hero{grid-column:1}
.stereo-level-list{display:grid;gap:12px;margin:14px 0}
.level-line{display:grid;grid-template-columns:22px minmax(0,1fr) 76px;align-items:center;gap:10px}
.level-channel{font-weight:750;color:#b4d8e5;font-size:14px}
.level-track{height:23px;background:#07131e;border:1px solid #334b5d;border-radius:6px;overflow:hidden;position:relative}
.level-track::after{content:"";display:block;position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(10% - 1px),rgba(4,13,19,.5) calc(10% - 1px),rgba(4,13,19,.5) 10%);pointer-events:none}
.level-fill{height:100%;display:block;width:0;transition:width .12s linear;background:linear-gradient(90deg,#288fbd 0%,#58d1bb 60%,#dbe46c 84%,#f1b66c 94%,#f57979 100%)}
.level-readout{font-variant-numeric:tabular-nums;text-align:right;color:#dbebf4;font-size:13px}
.stereo-levels .note{margin-top:7px}
.field canvas{height:clamp(200px,34vw,330px)}
@media(max-width:480px){.level-line{grid-template-columns:20px minmax(0,1fr) 71px;gap:7px}.level-track{height:21px}.level-readout{font-size:12px}}
