/* Reference-driven tool surfaces. All rules are scoped to these two routes. */
.main:has(>.tool-workspace){padding:16px 24px 28px!important;background:#fcf9fa;overflow:auto;min-height:0;display:block}
.main>.tool-workspace{--tool-ink:#171840;--tool-muted:#8680ab;--tool-line:#e9e3ef;--tool-purple:#a388e3;--tool-fill:#f2edff;--tool-gap:18px;color:var(--tool-ink);font-family:inherit;font-size:16px;line-height:1.5;width:100%;max-width:1920px;margin:0 auto;min-width:0}
.tool-workspace *{box-sizing:border-box}.tool-workspace [hidden]{display:none!important}.tool-workspace h1,.tool-workspace h2,.tool-workspace h3,.tool-workspace p{margin:0}.tool-workspace h2{font-size:20px;font-weight:650;line-height:1.4;letter-spacing:0}.tool-workspace h3{font-size:18px;font-weight:600}.tool-workspace svg{flex-shrink:0}.tool-workspace button,.tool-workspace input,.tool-workspace select{font:inherit}.tool-workspace button,.tool-workspace select{cursor:pointer}.tool-workspace button:disabled,.tool-workspace input:disabled,.tool-workspace select:disabled{cursor:default}.tool-workspace button:focus-visible,.tool-workspace select:focus-visible,.tool-workspace input:focus-visible,.tool-workspace summary:focus-visible,.tool-file-button:focus-within{outline:2px solid #9470d8;outline-offset:3px}.tool-workspace button{transition:background .15s,box-shadow .15s}.tool-workspace button:disabled{opacity:.43}.tool-workspace input:not([type=range]):not([type=file]):not([type=checkbox]),.tool-workspace select{height:46px;border:1px solid #e3dbef;border-radius:9px;background:#fff;color:var(--tool-ink);padding:0 16px;box-shadow:none;width:100%;min-width:0}.tool-workspace select{appearance:none;background:#f5f0ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' stroke='%23837aa9' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 16px center;padding-right:40px}.tool-workspace select:disabled{color:#a7a0bb;background-color:#efecf4;border-color:#efecf4}.tool-breadcrumb{display:flex;gap:12px;align-items:center;height:32px;margin-bottom:14px;color:var(--tool-muted);font-size:16px}.tool-breadcrumb strong{color:var(--tool-ink);font-weight:600}.tool-card{background:#fffdfd;border:1px solid #ebe5ed;border-radius:12px;min-width:0;box-shadow:0 2px 9px #422e4e02}.tool-tabs{display:flex;gap:8px;border-bottom:1px solid #e5dfeb;height:46px;margin-bottom:22px}.tool-tabs button{border:0;background:transparent;color:#847b9f;font-size:17px;min-width:114px;padding:0 22px 13px;border-bottom:2px solid transparent;border-radius:0}.tool-tabs button[aria-selected=true]{color:#ff655f;border-image:linear-gradient(90deg,#ff9149,#f33892) 1;border-bottom-width:2px;border-bottom-style:solid}.tool-audio-layout{display:grid;grid-template-columns:minmax(0,1.82fr) minmax(310px,1fr);gap:var(--tool-gap);align-items:stretch}.tool-source{padding:20px 22px 14px;display:flex;flex-direction:column}.tool-source>h2{margin-bottom:18px}.tool-file-row{display:flex;align-items:center;gap:20px;border:1px solid #e7dfed;border-radius:10px;padding:12px 16px;min-height:86px}.tool-file-icon{display:grid;place-items:center;width:64px;height:64px;flex-shrink:0;border-radius:12px;background:linear-gradient(135deg,#f2edff,#eee7ff);color:#9b7bdd}.tool-file-info{flex:1;min-width:0}.tool-file-info h3{font-size:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-file-info p{color:var(--tool-muted);font-size:15px;margin-top:4px}.tool-file-button{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:46px;padding:10px 20px;background:var(--tool-fill);color:var(--tool-ink);border:1px solid transparent;border-radius:9px;cursor:pointer;font-size:16px;font-weight:500;overflow:hidden;flex-shrink:0;max-width:100%}.tool-file-button>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.tool-file-button input[type=file]{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer;margin:0;padding:0}.tool-file-button:hover{background:#e9dfff}.tool-file-button.is-disabled{opacity:.45;pointer-events:none}.tool-waveform{display:flex;align-items:center;justify-content:center;background:linear-gradient(100deg,#f6f2ff,#f5f0ff);border-radius:9px;min-height:100px;height:clamp(100px,13.6vh,150px);margin-top:14px;overflow:hidden;color:var(--tool-muted);padding:10px 7px;flex:1}.tool-waveform svg{width:100%;height:100%;fill:#b69ce9;display:block}.tool-wave-time{display:flex;justify-content:space-between;font-size:14px;color:var(--tool-muted);margin:0 3px 12px}.tool-measurements{display:grid;grid-template-columns:1fr 1.08fr 1.1fr auto;align-items:center;background:#f5f1ff;border-radius:10px;padding:18px 22px;gap:0;margin-bottom:18px;min-height:84px}.tool-measurements>div{display:flex;flex-direction:column;gap:2px;border-right:1px solid #e3daf0;padding-left:24px;min-width:0}.tool-measurements>div:first-child{padding-left:0}.tool-measurements>div:nth-child(3){border:0}.tool-measurements>div>span{font-size:14px;color:var(--tool-muted)}.tool-measurements strong{font-size:20px;white-space:nowrap;line-height:1.35;color:#f3378c;font-weight:600}.tool-measurements>div:first-child strong{color:var(--tool-ink)}.tool-measure-note{display:flex;align-items:center;gap:8px;color:var(--tool-muted);font-size:14px;white-space:nowrap}.tool-player-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:22px}.tool-player-section{min-width:0}.tool-player-section>h3{font-size:18px;margin:0 0 8px}.tool-player{display:flex;align-items:center;gap:22px;border:1px solid #e7e0ed;border-radius:10px;padding:24px 16px;min-height:124px;background:#fffdfd;position:relative}.tool-player audio{display:none}.tool-play{border:0;width:60px;height:60px;display:grid;place-items:center;border-radius:50%;background:#efe8ff;color:#382178;flex-shrink:0;padding:0}.tool-play>svg{fill:currentColor;stroke-width:1}.tool-player-content{min-width:0;flex:1}.tool-player-time{display:flex;flex-wrap:wrap;color:var(--tool-muted);font-size:14px;gap:5px}.tool-player-placeholder{font-size:14px;color:var(--tool-muted);line-height:1.5;margin-bottom:8px!important}.tool-workspace input[type=range]{appearance:none;padding:0;height:5px;border:0;border-radius:10px;min-width:0;box-shadow:none;background:linear-gradient(to right,#9977ed var(--progress,0%),#e5dfed var(--progress,0%));accent-color:#9977ed;cursor:pointer;margin:0}.tool-workspace input[type=range]::-webkit-slider-thumb{appearance:none;border-radius:50%;width:16px;height:16px;background:white;border:1px solid #e2d8f5;box-shadow:0 1px 3px #51398c15}.tool-workspace [data-tool-seek]{width:100%;flex-basis:100%}.tool-workspace [data-tool-seek]::-webkit-slider-thumb{width:9px;height:9px}.tool-player-volume{display:flex;align-items:center;gap:12px;margin-top:17px}.tool-player-volume input{width:80px;--progress:100%}.tool-icon-button{display:grid;place-items:center;border:0;padding:0;background:transparent;color:#6c559b}.tool-player-menu{margin:0 0 0 auto;position:relative;color:#74638f}.tool-player-menu summary{list-style:none;cursor:pointer;letter-spacing:2px;line-height:20px}.tool-player-menu label{position:absolute;bottom:100%;right:0;background:white;box-shadow:0 3px 18px #30204722;min-width:130px;padding:10px;border-radius:8px;font-size:12px}.tool-player-menu select{height:32px!important;padding-left:8px!important;font-size:12px!important}.tool-player.is-empty{background:#fcfafc}.tool-player.is-empty .tool-play{background:#eeebf2;color:#bdb6ca}.tool-player.is-empty .tool-player-volume,.tool-player.is-empty input{opacity:.45}.tool-player-error{font-size:12px;color:#d34d64}.tool-feedback{font-size:12px;min-height:16px;color:var(--tool-muted);display:flex;justify-content:space-between;margin-top:8px;line-height:1.4}.tool-processing{padding:20px 22px 24px;display:flex;flex-direction:column}.tool-processing>h2{margin-bottom:24px}.tool-processing>form{display:flex;flex-direction:column;flex:1;gap:0;min-height:0}.tool-parameter-fields{display:flex;flex-direction:column;gap:18px}.tool-parameter{display:grid;grid-template-columns:minmax(96px,1fr) minmax(90px,1.45fr) 48px;align-items:center;gap:16px;white-space:nowrap}.tool-parameter input{font-size:22px!important;height:52px!important;padding-left:18px!important}.tool-unit{font-size:17px}.tool-reference{border-top:1px solid #eee7f1;margin-top:24px;padding-top:20px}.tool-reference p{display:flex;align-items:center;gap:9px;margin-bottom:12px}.tool-reference p span{display:inline-flex;color:var(--tool-muted)}.tool-reference .tool-file-button{width:100%;min-height:44px}.tool-estimate{margin-top:auto;padding:18px 20px;border:1px solid #ffe3dc;background:#fff6f3;border-radius:10px;min-height:124px;display:flex;flex-direction:column;justify-content:center;gap:4px;margin-bottom:16px}.tool-estimate>span{display:flex;align-items:center;gap:8px}.tool-estimate>span svg{color:#777099}.tool-estimate strong{font-size:28px;color:#ff6074;font-weight:600}.tool-estimate small{font-size:12px;color:#9c7b8a}.tool-reference+.tool-estimate{margin-top:42px}.tool-primary{border:1px solid transparent;border-radius:10px;background:linear-gradient(110deg,#ff904d 0%,#ff4b76 55%,#dd338f 100%);color:white;padding:16px 22px;min-height:62px;display:flex;align-items:center;justify-content:center;gap:12px;font-size:20px!important;font-weight:600;box-shadow:0 3px 8px #f4658110}.tool-primary:hover:not(:disabled){filter:brightness(1.04);box-shadow:0 4px 14px #f4658130}.tool-service-check{display:flex;align-items:center;justify-content:space-between;font-size:14px;color:var(--tool-muted);margin:16px 0}.tool-consent{display:flex;gap:8px;align-items:center;font-size:13px;margin:0 0 16px;color:#847795}.tool-consent input{accent-color:#aa7ae4}.tool-text-button{padding:4px 0;border:0;background:transparent;color:#8c69c4;font-size:13px}.tool-soft-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:9px 20px;background:#f2eef9;border:1px solid transparent;border-radius:9px;color:#655985;white-space:nowrap;box-shadow:none}.tool-soft-button:hover:not(:disabled){background:#eae1f7}.tool-error{padding:8px 16px;background:#fff0f0;border-radius:8px;color:#c6455c;font-size:14px}
/* Pitch layout tracks the supplied four horizontal bands. */
.tool-pitch-heading{display:flex;align-items:flex-start;gap:24px;margin:4px 0 24px}.tool-back{min-height:46px;border:1px solid #e4ddec;border-radius:10px;display:flex;align-items:center;gap:12px;padding:9px 20px;text-decoration:none;color:var(--tool-ink);background:#fffdfd;white-space:nowrap}.tool-back svg{transform:rotate(180deg)}.tool-pitch-heading h1{font-size:32px;line-height:1.2;font-weight:650;margin:0 0 7px}.tool-pitch-heading p{font-size:17px;color:var(--tool-muted)}.tool-pitch-inputs{display:grid;grid-template-columns:minmax(200px,1fr) minmax(270px,1.25fr) minmax(200px,.7fr);gap:26px;padding:20px 24px;align-items:center;margin-bottom:18px;min-height:110px}.tool-mic-field{display:flex;flex-direction:column;gap:6px;min-width:0}.tool-select-icon{position:relative;display:flex;align-items:center}.tool-select-icon>svg:first-child{position:absolute;left:16px;pointer-events:none;z-index:1}.tool-select-icon>svg:last-child{position:absolute;right:16px;pointer-events:none;color:#7e6a9b}.tool-select-icon select{padding-left:48px;background-image:none!important}.tool-pitch-file{border-left:1px solid #e3dcec;padding-left:26px;min-width:0}.tool-pitch-file>label>span{color:var(--tool-muted)}.tool-pitch-file>div{display:flex;gap:8px;margin-top:6px}.tool-local-file{display:flex;align-items:center;gap:12px;flex:1;min-width:0;border:1px solid #e9dff7;border-radius:7px;background:#f5f0ff;padding:10px 16px;height:46px;color:#8b7fa8}.tool-local-file>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-local-file>svg{color:var(--tool-ink)}.tool-pitch-start{border-left:1px solid #e3dcec;padding-left:26px}.tool-pitch-start button{width:100%;min-height:64px}.tool-pitch-middle{display:grid;grid-template-columns:minmax(0,3fr) minmax(270px,1fr);gap:12px;margin-bottom:18px}.tool-pitch-live{padding:12px 24px 26px;min-height:248px;display:flex;flex-direction:column}.tool-pitch-observation{text-align:center;display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;min-height:126px;gap:4px}.tool-pitch-observation strong{font-size:62px;font-weight:700;line-height:1.05;color:#191a49}.tool-pitch-observation>span{font-size:22px;color:#777699}.tool-pitch-observation small{font-size:13px;color:#9690af}.tool-pitch-ruler{display:flex;align-items:center;gap:34px;color:#68688d;font-size:14px;height:45px;margin-top:8px}.tool-ruler-line{position:relative;flex:1;height:2px;background:#d4d2e7;margin-bottom:12px}.tool-ruler-line i{position:absolute;top:-6px;height:14px;width:1px;background:#cdc9e3}.tool-ruler-line i.major{top:-14px;height:30px;width:2px;background:#b3b2d2}.tool-ruler-line label{position:absolute;top:18px;font-size:15px;transform:translateX(-50%)}.tool-ruler-line .ruler-low{left:0}.tool-ruler-line .ruler-center{left:50%}.tool-ruler-line .ruler-high{left:100%}.tool-ruler-line b{position:absolute;top:-16px;width:4px;height:34px;background:#a17edc;transform:translateX(-50%);border-radius:3px}.tool-pitch-target{padding:14px 20px 20px;display:flex;flex-direction:column;gap:14px}.tool-pitch-target>h2{margin-bottom:0}.tool-pitch-target label{display:flex;flex-direction:column;gap:5px;font-size:16px}.tool-scale-fields{display:flex;gap:8px}.tool-scale-fields label{min-width:0;flex:1}.tool-pitch-history{padding:12px 24px 22px;margin-bottom:0;min-height:206px}.tool-pitch-history>header{display:flex;align-items:center;justify-content:space-between;margin-bottom:22px}.tool-pitch-history>header>span{font-size:14px;color:var(--tool-muted)}.tool-history-plot{display:flex;gap:14px;height:124px;min-width:0}.tool-chart-labels{display:flex;flex-direction:column;justify-content:space-between;width:30px;flex-shrink:0;font-size:15px;color:#797397;line-height:1}.tool-workspace .pitch-chart{flex:1;min-width:0;position:relative;border:1px solid #e4dff0;border-radius:0;background:#fffdfd;overflow:hidden;width:auto}.tool-workspace .pitch-chart svg{display:block;width:100%;height:100%;min-height:0;max-height:none;color:#d5c9e9}.tool-chart-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#9184ae;font-size:15px}.tool-pitch-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;position:relative;min-height:68px;margin-top:4px;padding:10px 24px}.tool-tolerance{display:flex;align-items:center;gap:16px;color:var(--tool-muted);white-space:nowrap}.tool-tolerance>span{display:flex}.tool-tolerance select{width:156px;background-color:#fffdfd;color:var(--tool-ink)}.tool-pitch-footer form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.tool-pitch-footer form button{align-self:end}.tool-workspace .form-error{font-size:13px;color:#c94a66;margin:5px 0}
/* Scale spacious desktop geometry to actual available CSS pixels, not device model names. */
@media(min-width:1700px){.main:has(>.tool-workspace){padding:20px 30px 28px!important}.main>.tool-workspace{--tool-gap:22px}.tool-source,.tool-processing{padding:24px}.tool-pitch-live{min-height:280px}.tool-pitch-history{min-height:240px}.tool-history-plot{height:154px}.tool-file-row{min-height:96px}.tool-waveform{min-height:130px}.tool-player{min-height:138px}.tool-reference+.tool-estimate{margin-top:52px}}
@media(min-width:1101px) and (max-height:900px){.main:has(>.tool-workspace){padding:12px 20px 16px!important}.main>.tool-workspace{font-size:14px;--tool-gap:14px}.tool-breadcrumb{height:25px;margin-bottom:8px;font-size:14px}.tool-tabs{height:39px;margin-bottom:14px}.tool-tabs button{font-size:15px;padding-bottom:9px}.tool-source,.tool-processing{padding:16px}.tool-source>h2{margin-bottom:12px}.tool-workspace h2{font-size:18px}.tool-file-row{padding:10px 12px;min-height:74px;gap:14px}.tool-file-icon{width:50px;height:50px}.tool-file-info h3{font-size:18px}.tool-file-info p{font-size:13px}.tool-waveform{height:94px;min-height:80px;margin-top:12px;flex:0 0 auto}.tool-measurements{padding:12px 18px;min-height:70px;margin-bottom:14px}.tool-measurements strong{font-size:18px}.tool-measure-note{font-size:12px}.tool-player{min-height:106px;padding:18px 14px;gap:14px}.tool-play{width:48px;height:48px}.tool-player-section>h3{font-size:16px}.tool-player-placeholder,.tool-player-time{font-size:12px}.tool-player-volume{margin-top:13px}.tool-processing>h2{margin-bottom:18px}.tool-parameter-fields{gap:12px}.tool-parameter{grid-template-columns:minmax(78px,1fr) minmax(70px,1.3fr) 40px;gap:10px}.tool-parameter input{height:44px!important;font-size:19px!important}.tool-unit{font-size:15px}.tool-reference{padding-top:16px;margin-top:18px}.tool-reference+.tool-estimate{margin-top:auto}.tool-estimate{padding:14px 18px;min-height:98px;margin-bottom:14px}.tool-estimate strong{font-size:25px}.tool-primary{font-size:18px!important;min-height:54px;padding:12px 18px}.tool-soft-button{padding:8px 16px;font-size:14px;min-height:40px}.tool-pitch-heading{margin:4px 0 20px;gap:20px}.tool-pitch-heading h1{font-size:28px}.tool-pitch-heading p{font-size:15px}.tool-back{min-height:42px;padding:8px 18px}.tool-pitch-inputs{padding:16px 20px;min-height:94px;gap:20px;margin-bottom:14px}.tool-pitch-start,.tool-pitch-file{padding-left:20px}.tool-pitch-start button{min-height:56px}.tool-pitch-middle{margin-bottom:14px}.tool-pitch-live{min-height:216px;padding:12px 20px 22px}.tool-pitch-observation{min-height:112px}.tool-pitch-observation strong{font-size:56px}.tool-pitch-observation>span{font-size:20px}.tool-pitch-target{padding:12px 18px 16px;gap:10px}.tool-pitch-target label{font-size:14px}.tool-pitch-history{padding:12px 20px 18px;min-height:174px}.tool-pitch-history>header{margin-bottom:16px}.tool-history-plot{height:104px}.tool-pitch-footer{min-height:58px;padding:8px 20px}.tool-workspace input:not([type=range]):not([type=file]):not([type=checkbox]),.tool-workspace select{height:42px}.tool-tolerance select{width:140px}}
@media(min-width:1101px) and (max-height:740px){.main:has(>.tool-workspace){padding:8px 18px 12px!important}.tool-tabs{margin-bottom:10px;height:34px}.tool-breadcrumb{margin-bottom:5px}.tool-source,.tool-processing{padding:12px 16px}.tool-source>h2{margin-bottom:8px}.tool-file-row{min-height:64px;padding:8px 12px}.tool-file-icon{width:44px;height:44px}.tool-file-info h3{font-size:16px}.tool-file-button{min-height:38px;padding:8px 14px;font-size:14px}.tool-waveform{height:78px;min-height:60px;margin-top:8px}.tool-wave-time{margin-bottom:8px;font-size:12px}.tool-measurements{min-height:60px;margin-bottom:10px;padding:10px 16px}.tool-measurements strong{font-size:17px}.tool-player{min-height:88px;padding:14px 12px}.tool-play{width:42px;height:42px}.tool-player-volume{margin-top:11px}.tool-player-section>h3{margin-bottom:6px}.tool-primary{min-height:48px;padding:10px 16px;font-size:17px!important}.tool-estimate{min-height:82px;padding:10px 16px;margin-bottom:10px}.tool-reference{margin-top:14px;padding-top:14px}.tool-processing>h2{margin-bottom:14px}.tool-pitch-heading{margin-bottom:16px;gap:18px}.tool-pitch-heading h1{font-size:26px}.tool-pitch-heading p{font-size:14px}.tool-pitch-inputs{padding:12px 20px;min-height:84px;margin-bottom:12px}.tool-pitch-start button{min-height:50px}.tool-pitch-live{min-height:190px;padding-bottom:20px}.tool-pitch-target{padding:12px 16px;gap:8px}.tool-pitch-middle{margin-bottom:12px}.tool-pitch-observation{min-height:88px}.tool-pitch-observation strong{font-size:48px}.tool-pitch-observation>span{font-size:18px}.tool-pitch-history{min-height:150px;padding:10px 20px 16px}.tool-pitch-history>header{margin-bottom:12px}.tool-history-plot{height:90px}.tool-pitch-footer{min-height:54px;padding:6px 20px}}
@media(max-width:1350px){.tool-measure-note{display:none}.tool-measurements{grid-template-columns:1fr 1.2fr 1.2fr}.tool-player-pair{gap:12px}.tool-player{gap:12px;padding-left:12px;padding-right:12px}.tool-play{width:44px;height:44px}.tool-player-volume{gap:8px}.tool-player-volume input{width:60px}.tool-pitch-inputs{grid-template-columns:minmax(180px,1fr) minmax(260px,1.2fr) minmax(160px,.7fr);gap:16px}.tool-pitch-start,.tool-pitch-file{padding-left:16px}.tool-pitch-middle{grid-template-columns:minmax(0,2.5fr) minmax(240px,1fr)}}
@media(max-width:1100px){.main:has(>.tool-workspace){padding:14px 18px 24px!important}.main>.tool-workspace{font-size:14px;--tool-gap:14px}.tool-audio-layout{grid-template-columns:minmax(0,1.55fr) minmax(270px,1fr)}.tool-source,.tool-processing{padding:16px}.tool-workspace h2{font-size:18px}.tool-file-row{gap:10px;padding:10px;flex-wrap:wrap}.tool-file-icon{width:42px;height:42px}.tool-file-info h3{font-size:17px}.tool-file-info p{font-size:12px}.tool-file-row>.tool-file-button{margin-left:auto;min-height:36px;padding:6px 12px;font-size:13px}.tool-parameter{grid-template-columns:80px minmax(60px,1fr) 40px;gap:8px}.tool-parameter input{height:44px!important;font-size:18px!important;padding-left:12px!important}.tool-unit{font-size:14px}.tool-reference{margin-top:18px;padding-top:16px}.tool-reference+.tool-estimate{margin-top:22px}.tool-file-button{font-size:14px;padding:8px 14px}.tool-player-pair{grid-template-columns:1fr}.tool-player{padding:16px;min-height:94px}.tool-player-time{flex-wrap:nowrap;align-items:center;white-space:nowrap;gap:14px}.tool-player-time input{flex:1}.tool-player-section>h3{font-size:16px}.tool-measurements{padding:12px;min-height:72px}.tool-measurements>div{padding-left:12px}.tool-measurements strong{font-size:17px}.tool-primary{font-size:18px!important;min-height:54px}.tool-pitch-inputs{grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);gap:16px;padding:18px}.tool-pitch-start{grid-column:1/-1;border:0;padding:0}.tool-pitch-start button{min-height:48px}.tool-pitch-middle{grid-template-columns:minmax(0,2fr) minmax(220px,1fr)}.tool-pitch-heading h1{font-size:28px}.tool-pitch-heading p{font-size:15px}.tool-pitch-live{padding:16px;min-height:246px}.tool-pitch-ruler{gap:20px;font-size:12px}.tool-pitch-target{padding:16px;gap:14px}.tool-pitch-target label{font-size:14px}.tool-pitch-history{padding:16px 18px;min-height:210px}.tool-soft-button{font-size:14px}}
@media(max-width:800px){.tool-audio-layout{grid-template-columns:minmax(0,1fr)}.tool-file-row{flex-wrap:nowrap}.tool-player-pair{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.tool-player-time{flex-wrap:wrap;gap:5px}.tool-parameter{grid-template-columns:110px minmax(100px,1fr) 50px}.tool-processing>h2{margin-bottom:18px}.tool-reference+.tool-estimate{margin-top:20px}.tool-estimate{min-height:92px}.tool-player-placeholder{font-size:12px}.tool-pitch-middle{grid-template-columns:minmax(0,1fr)}.tool-pitch-target{display:grid;grid-template-columns:1fr 1fr;gap:14px}.tool-pitch-target>h2{grid-column:1/-1}.tool-pitch-live{min-height:238px}.tool-pitch-heading{gap:18px}.tool-pitch-heading h1{font-size:26px}.tool-pitch-heading p{font-size:14px}.tool-pitch-inputs{grid-template-columns:minmax(0,1fr)}.tool-pitch-file{padding:0;border:0}.tool-pitch-inputs .tool-file-button{min-width:100px}.tool-pitch-footer{padding:10px 16px}.tool-tolerance{gap:10px}.tool-tolerance select{width:126px}.tool-pitch-footer form{grid-template-columns:1fr}}
@media(max-width:520px){.main:has(>.tool-workspace){padding:12px 10px 20px!important}.main>.tool-workspace{font-size:14px}.tool-breadcrumb{font-size:14px;margin-bottom:10px;height:24px}.tool-tabs{height:40px;margin-bottom:14px}.tool-tabs button{font-size:15px}.tool-source,.tool-processing{padding:14px}.tool-source>h2{margin-bottom:12px}.tool-file-row{flex-wrap:wrap;padding:10px;gap:12px}.tool-file-row>.tool-file-button{width:100%;margin:0}.tool-file-info h3{font-size:16px}.tool-file-info p{font-size:12px}.tool-file-icon{width:42px;height:42px}.tool-waveform{height:100px;min-height:100px}.tool-measurements{padding:12px 8px}.tool-measurements>div{padding-left:8px}.tool-measurements strong{font-size:15px}.tool-measurements>div>span{font-size:12px}.tool-player-pair{grid-template-columns:1fr;gap:14px}.tool-player{min-height:104px;padding:16px;gap:16px}.tool-play{width:48px;height:48px}.tool-player-time{flex-wrap:nowrap;white-space:nowrap;gap:12px}.tool-player-time input{flex:1;flex-basis:auto}.tool-parameter{grid-template-columns:84px minmax(70px,1fr) 44px}.tool-reference p{font-size:14px}.tool-primary{min-height:52px}.tool-pitch-heading{flex-wrap:wrap;gap:12px;margin-bottom:18px}.tool-back{min-height:36px;padding:6px 12px;font-size:13px}.tool-pitch-heading>div{width:100%}.tool-pitch-heading h1{font-size:26px}.tool-pitch-inputs{padding:14px;gap:14px}.tool-pitch-file>div{gap:6px}.tool-pitch-file .tool-file-button{min-width:80px;padding:8px 10px;gap:8px}.tool-local-file{padding:10px;gap:8px;font-size:13px}.tool-pitch-live{padding:14px;min-height:224px}.tool-pitch-observation strong{font-size:52px}.tool-pitch-observation>span{font-size:20px}.tool-pitch-ruler{gap:16px}.tool-pitch-target{padding:14px;grid-template-columns:1fr}.tool-pitch-target>h2{grid-column:auto}.tool-pitch-history{padding:14px;min-height:196px}.tool-pitch-history>header{margin-bottom:20px}.tool-pitch-history>header>span{font-size:12px}.tool-history-plot{gap:8px}.tool-chart-labels{font-size:12px;width:24px}.tool-pitch-footer{flex-wrap:wrap;gap:12px;padding:12px 14px}.tool-tolerance{flex:1}.tool-tolerance select{flex:1;min-width:110px}}
@media(prefers-reduced-motion:reduce){.tool-workspace *{transition:none!important}}
.tool-waveform{flex:0 0 auto}.tool-waveform svg{min-height:0;max-height:100%}
/* Sidebar width is owned by sidebar-stars.css for every page. */
.tool-workspace details{margin:0;padding:0;border:0;background:transparent}.tool-workspace summary{margin:0}.tool-workspace .tool-player-menu{margin-left:auto}.tool-workspace .tool-player-menu summary{padding:0;border:0;min-height:0}.tool-workspace .tool-player-menu summary:after{display:none}.tool-workspace input[type=range]{min-height:0;height:5px}.tool-workspace input[type=range]::-webkit-slider-runnable-track{height:5px;background:transparent}.tool-player{height:138px;padding:18px 16px}.tool-player-pair{align-items:stretch}.tool-player-section{display:flex;flex-direction:column}.tool-player-section>.tool-player{flex:1}.tool-player-placeholder{margin-bottom:4px!important}.tool-breadcrumb{margin-bottom:6px}.tool-feedback{margin-top:4px;min-height:12px;font-size:11px}.tool-reference p{color:var(--tool-ink)}
@media(min-width:1101px) and (max-height:900px){.tool-player{height:106px;min-height:106px;padding:14px}.tool-feedback{font-size:10px}}
@media(min-width:1101px) and (max-height:740px){.tool-player{height:88px;min-height:88px;padding:10px 12px}}

@media(min-width:1101px) and (max-height:900px){.tool-pitch-heading{margin-bottom:14px}.tool-pitch-history{min-height:164px}.tool-history-plot{height:94px}}
@media(max-width:380px){.tool-measurements{grid-template-columns:1fr;padding:8px 12px}.tool-measurements>div,.tool-measurements>div:first-child{flex-direction:row;justify-content:space-between;align-items:center;padding:6px 0;border-right:0;border-bottom:1px solid #e3daf0}.tool-measurements>div:last-of-type{border-bottom:0}.tool-measurements strong{font-size:15px}}
/* Fit mode is based on measured available height, also after host/browser zoom. */
.tool-fit-compact .tool-breadcrumb{height:22px;margin-bottom:4px;font-size:13px}
.tool-fit-compact .tool-tabs{height:32px;margin-bottom:8px}
.tool-fit-compact .tool-source,.tool-fit-compact .tool-processing{padding:10px 12px}
.tool-fit-compact h2{font-size:17px}.tool-fit-compact h3{font-size:15px}
.tool-fit-compact .tool-source>h2,.tool-fit-compact .tool-processing>h2{margin-bottom:8px}
.tool-fit-compact .tool-file-row{padding:6px 10px;min-height:54px;gap:10px}
.tool-fit-compact .tool-file-icon{width:36px;height:36px}
.tool-fit-compact .tool-file-info h3{font-size:16px}.tool-fit-compact .tool-file-info p{font-size:12px}
.tool-fit-compact .tool-file-button{min-height:32px;padding:5px 10px;font-size:13px}
.tool-fit-compact .tool-waveform{height:64px;min-height:0;margin-top:8px}
.tool-fit-compact .tool-wave-time{font-size:12px;margin-bottom:6px}
.tool-fit-compact .tool-measurements{padding:8px 12px;min-height:50px;margin-bottom:8px}
.tool-fit-compact .tool-measurements strong{font-size:16px}
.tool-fit-compact .tool-player-section>h3{font-size:14px;margin-bottom:4px}
.tool-fit-compact .tool-player{height:80px;min-height:80px;padding:10px;gap:10px}
.tool-fit-compact .tool-play{width:36px;height:36px}
.tool-fit-compact .tool-player-time,.tool-fit-compact .tool-player-placeholder{font-size:12px}
.tool-fit-compact .tool-player-volume{margin-top:9px}
.tool-fit-compact .tool-parameter-fields{gap:8px}
.tool-fit-compact .tool-parameter input{height:36px!important;min-height:36px;font-size:17px!important}
.tool-fit-compact .tool-reference{padding-top:8px;margin-top:10px}
.tool-fit-compact .tool-reference p{margin-bottom:6px;font-size:13px}
.tool-fit-compact .tool-reference+.tool-estimate{margin-top:10px}
.tool-fit-compact .tool-estimate{min-height:66px;padding:8px 12px;margin-bottom:8px}
.tool-fit-compact .tool-estimate strong{font-size:23px}
.tool-fit-compact .tool-primary{min-height:40px;padding:8px 12px;font-size:16px!important}
.tool-fit-compact .tool-service-check{margin:8px 0}.tool-fit-compact .tool-consent{margin-bottom:8px}
.tool-fit-compact .tool-soft-button{min-height:32px;padding:5px 10px;font-size:13px}
.tool-fit-compact .tool-pitch-heading{margin:2px 0 10px;gap:14px}
.tool-fit-compact .tool-pitch-heading h1{font-size:24px}.tool-fit-compact .tool-pitch-heading p{font-size:13px}
.tool-fit-compact .tool-back{min-height:34px;padding:5px 12px}
.tool-fit-compact .tool-pitch-inputs{padding:10px 12px;gap:10px;min-height:70px;margin-bottom:8px}
.tool-fit-compact .tool-pitch-start button{min-height:40px}
.tool-fit-compact .tool-pitch-middle{margin-bottom:8px;gap:8px}
.tool-fit-compact .tool-pitch-live{min-height:160px;padding:10px 14px 18px}
.tool-fit-compact .tool-pitch-observation{min-height:70px}.tool-fit-compact .tool-pitch-observation strong{font-size:42px}
.tool-fit-compact .tool-pitch-observation>span{font-size:17px}
.tool-fit-compact .tool-pitch-target{padding:10px 12px;gap:8px}
.tool-fit-compact .tool-pitch-history{padding:10px 12px;min-height:120px}
.tool-fit-compact .tool-pitch-history>header{margin-bottom:8px}
.tool-fit-compact .tool-history-plot{height:74px}
.tool-fit-compact .tool-pitch-footer{min-height:46px;padding:6px 12px;gap:8px}
.tool-fit-compact select{height:34px;min-height:34px;font-size:13px}
.tool-fit-compact .tool-pitch-file .tool-local-file{height:34px}
@media(max-width:1100px) and (min-width:801px){.tool-fit-compact .tool-player-pair{grid-template-columns:1fr 1fr}.tool-fit-compact .tool-player-time{flex-wrap:wrap;gap:4px}.tool-fit-compact .tool-player-time input{flex-basis:100%}.tool-fit-compact .tool-pitch-inputs{grid-template-columns:1fr 1.2fr .7fr}.tool-fit-compact .tool-pitch-start{grid-column:auto;padding-left:10px}.tool-fit-compact .tool-pitch-file{padding-left:10px}.tool-fit-compact .tool-pitch-file .tool-file-button{padding:5px}}
@media(max-width:800px){.tool-fit-compact .tool-player-pair{grid-template-columns:1fr 1fr;gap:8px}.tool-fit-compact .tool-player{gap:6px;padding:8px}.tool-fit-compact .tool-player-time{flex-wrap:wrap;gap:4px}.tool-fit-compact .tool-player-time input{flex-basis:100%}.tool-fit-compact .tool-player-volume{gap:6px}.tool-fit-compact .tool-player-volume input{width:40px}.tool-fit-compact .tool-play{width:30px;height:30px}.tool-fit-compact .tool-pitch-target{grid-template-columns:1fr 1fr}.tool-fit-compact .tool-pitch-target>h2{grid-column:1/-1}.tool-fit-compact .tool-pitch-heading{flex-wrap:nowrap}.tool-fit-compact .tool-pitch-heading>div{width:auto}.tool-fit-compact .tool-pitch-heading p{font-size:12px}}
/* Small landscape windows retain side-by-side panels instead of becoming a tall phone layout. */
@media(min-width:600px) and (max-width:1100px) and (orientation:landscape){
 .tool-fit-compact .tool-audio-layout{grid-template-columns:minmax(0,1.5fr) minmax(230px,1fr);gap:10px}
 .tool-fit-compact .tool-parameter{grid-template-columns:74px minmax(60px,1fr) 38px;gap:6px}
 .tool-fit-compact .tool-file-row{flex-wrap:nowrap}.tool-fit-compact .tool-file-row>.tool-file-button{width:auto}
 .tool-fit-compact .tool-pitch-inputs{grid-template-columns:minmax(120px,1fr) minmax(180px,1.3fr) minmax(120px,.8fr);gap:10px}
 .tool-fit-compact .tool-pitch-start{grid-column:auto;padding-left:10px}
 .tool-fit-compact .tool-pitch-file{padding-left:10px;border-left:1px solid #e3dcec}
 .tool-fit-compact .tool-pitch-file .tool-file-button{min-width:0;padding:5px 8px}
 .tool-fit-compact .tool-pitch-middle{grid-template-columns:minmax(0,2.6fr) minmax(180px,1fr)}
 .tool-fit-compact .tool-pitch-target{display:flex}
 .tool-fit-compact .tool-pitch-target label{font-size:13px}
 .tool-fit-compact .tool-pitch-live{min-height:150px}
}
/* Result playback lives in its player; export actions appear only after generation. */
.tool-processing-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:24px;position:relative}
.tool-processing-heading>h2{white-space:nowrap}
.tool-output-actions{display:flex;justify-content:flex-end;align-items:center;gap:16px;margin-top:8px}
.tool-output-actions button{display:inline-flex;align-items:center;gap:5px}
.tool-fit-compact .tool-processing-heading{margin-bottom:8px}
@media(max-width:1100px){.tool-processing-heading{flex-wrap:wrap;gap:4px;margin-bottom:12px}}
@media(max-width:520px){.tool-output-actions{gap:10px}}
/* A single Tools destination shares the same three tabs. */
a.top-tools{color:inherit;text-decoration:none;padding:6px 10px;border-radius:18px;-webkit-app-region:no-drag}
a.top-tools:hover,a.top-tools[aria-current=page]{background:#f1e7ff;color:#392e75}
.tool-tabs a{display:flex;align-items:center;justify-content:center;text-decoration:none;color:#847b9f;font-size:17px;min-width:114px;padding:0 22px 13px;border-bottom:2px solid transparent}
.tool-tabs a[aria-current=page]{color:#ff655f;border-image:linear-gradient(90deg,#ff9149,#f33892) 1}
.tool-tabs a:focus-visible{outline:2px solid #9470d8;outline-offset:-2px}
.tool-fit-compact .tool-tabs a{font-size:14px;padding:0 14px 7px;min-width:90px}
@media(max-width:520px){.tool-tabs a{min-width:0;flex:1;padding:0 7px 8px;font-size:14px}}


/* Navigation stays at the practice tab size regardless of content fitting. */
.tool-workspace>.tool-tabs{height:39px;min-height:39px;flex-shrink:0;gap:8px;margin-bottom:10px}
.tool-workspace>.tool-tabs a{font-size:14px;line-height:20px;min-width:90px;padding:0 14px 7px;white-space:nowrap}
@media(max-width:520px){.tool-workspace>.tool-tabs{gap:0}.tool-workspace>.tool-tabs a{min-width:0;flex:1;padding:0 7px 7px}}

.tool-fit-content{display:flow-root;min-width:0}
