/* App surfaces are progressive and screen-only. No clipped or fixed-height content. */
@media screen{
 body.is-tool-app #main{padding:14px 22px 18px}
 body.is-tool-app .pager,body.is-tool-app #main>footer{display:none}
 .tool-app-page{max-width:1120px;margin:0 auto}
 .tool-app-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}
 html body .tool-app-bar h1{font:750 23px/1.25 Arial,"Noto Sans CJK SC",sans-serif;letter-spacing:0;max-width:none;margin:0}
 body .tool-app-bar #tuner-title.compact-tool-title{font:750 23px/1.25 Arial,"Noto Sans CJK SC",sans-serif;letter-spacing:0;margin:0}
 .tool-app-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
 .tool-app-actions button,.tool-switch{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:7px 12px;border:1px solid #b8ccc2;border-radius:9px;background:#fff;font-size:14px;line-height:1.3;text-decoration:none}
 .tool-app-ready{--tool-line:#c9d8cd;--tool-green:#193c39;font-size:15px;line-height:1.45}
 .tool-app-ready p{font-size:14px;line-height:1.5}
 .tool-app-ready button{font-size:14px;line-height:1.3;min-height:44px}
 .tool-app-ready button:disabled{opacity:1!important;color:#68736d!important;background:#e9ede8!important;border-color:#cbd2cc!important;cursor:not-allowed}
 .tool-app-ready button:focus-visible,.tool-app-actions :focus-visible,.tool-app-ready select:focus-visible{outline:3px solid #a85413;outline-offset:3px}
 .tool-help-dialog{max-width:min(780px,calc(100vw - 28px));max-height:85dvh;padding:20px;border:1px solid #9bb5a8;border-radius:16px;background:#fcfbf7;color:#293f3d}
 .tool-help-dialog::backdrop{background:#102b2a80}
 .tool-help-dialog .dialog-header{position:sticky;top:-20px;background:#fcfbf7;z-index:2;padding:8px 0;border-bottom:1px solid #c9d8cd}
 .tool-help-dialog h2{font-size:23px;margin:0}.tool-help-content h2{margin:20px 0 10px}
 .tool-help-content :is(p,li,figcaption){font-size:16px!important;line-height:1.7!important}
 .tool-help-content figcaption{margin:0;background:transparent}
 .tool-help-content .eyebrow{font-size:12px!important;margin:12px 0}
 .tool-help-content .lede{font-size:17px!important}
 .tool-help-content .peg-calibration{display:block}.tool-help-content .reference-volume{display:flex}
 .tool-help-content .tuner-prerequisite{padding:10px}.tool-help-content .tuner-reading-help summary{font-size:16px}
 .tool-help-content .fingering-quick-v16{margin:16px 0}
 .tool-caption-guide{padding:12px 0;border-bottom:1px solid #dce1d8}
 .tool-caption-guide h3{margin:0 0 8px;font-size:17px}
 /* Tuner: readout and practice controls beside the hardware, not below it. */
 #violin-tuner.tool-app-ready{margin:0;padding:14px;border:1px solid var(--tool-line);border-radius:18px;background:#f4f7f0;box-shadow:0 6px 24px #183c3609}
 .tool-session-tabs{display:flex;gap:4px;padding:4px;margin:0 0 12px;background:#e4ece3;border-radius:11px;width:fit-content}
 .tool-session-tabs button{border:0;padding:8px 18px;min-height:38px;font-weight:700}
 .tool-session-tabs [aria-pressed=true]{background:#193c39;color:#fff;box-shadow:0 2px 5px #193c3920}
 .tuner-app-work{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:14px;align-items:start}
 .tuner-app-left{min-width:0;display:flex;flex-direction:column}
 .tool-app-ready .tuner-console-v14{border:0;padding:0;background:transparent}
 .tool-app-ready .tuner-mode{display:flex;gap:4px;margin:0 0 8px}
 .tool-app-ready .tuner-mode button{flex:1;padding:6px 8px;font-size:13px;min-height:36px}
 .tool-app-ready .tuner-strings{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0 0 10px}
 .tool-app-ready .tuner-strings button{min-width:0;padding:6px 4px;min-height:40px;font-weight:750}
 .tuner-live-reading{padding:12px;border:1px solid var(--tool-line);border-radius:12px;background:white}
 .tuner-live-reading [data-tuner-target]{font-size:13px;margin:0;color:#445e54}
 .tool-app-ready .tuner-readings{display:grid;grid-template-columns:1fr auto;gap:0 8px;min-height:64px;margin:2px 0;border:0;padding:0;background:transparent}
 .tool-app-ready [data-tuner-note]{grid-row:1/3;font-size:42px;line-height:1.4;font-weight:750}
 .tool-app-ready [data-tuner-frequency],.tool-app-ready [data-tuner-cents]{font-size:14px;text-align:right;align-self:center}
 .tool-app-ready .tuner-meter{height:20px;margin:8px 2px 6px}.tool-app-ready .tuner-scale{font-size:11px}
 .tool-app-ready [data-tuner-status]{font-size:13px;line-height:1.5;min-height:0;padding:0;margin:8px 0 0;background:transparent}
 .tool-app-ready .tuner-actions{display:flex;gap:6px;margin:10px 0 0}.tool-app-ready .tuner-actions button{padding:7px 10px;flex:1;min-width:0;font-size:13px}
 .tool-app-ready .tuner-actions [data-tuner-start]{font-size:15px;flex:1.3}.tool-app-ready .tuner-actions [data-tuner-start] small{font-size:11px}
 .tool-app-ready .tuner-visual{display:flex;flex-direction:column;gap:8px;margin:0;padding:10px;background:#fff;border:1px solid var(--tool-line);box-shadow:none}
 .tool-app-ready .tuner-photos{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%}
 .tool-app-ready .tuner-photos svg{display:block;width:100%;height:160px;object-fit:contain;border-radius:8px}
 /* Non-scaling strokes need explicit screen sizes; a 5px stroke overwhelms a
    phone-sized screw. Viewports also reserve space for the complete marker. */
 body .tool-app-ready .tuner-photo [data-turn-arrow]>path{stroke-width:2;filter:none}
 .tool-app-ready .tuner-photos figure{border:0;padding:0;background:transparent;box-shadow:none}
 .tool-app-ready .tuner-photos figcaption{font-size:12px!important;line-height:1.4!important;margin:5px 0 0;padding:0;background:transparent;border:0}
 .tool-app-ready .tuner-photos figcaption strong{font-size:inherit!important;line-height:inherit!important}
 .tool-app-ready .tuner-guidance{margin:0;width:100%;display:flex;flex-direction:column;gap:8px}
 .tool-app-ready .tuner-guidance>p{margin:0}.tool-app-ready .tuner-guidance>p:first-child{display:none}
 .tool-app-ready .tuner-guidance [data-tuner-guide-copy]{font-size:14px;line-height:1.5}
 .tool-app-ready .tuner-direction{order:-1;min-height:52px;margin:0;padding:8px;font-size:14px;line-height:1.4}
 .tool-app-ready .direction-arrow{font-size:26px}
 .tool-app-ready .tuner-demo-lab{border:0;padding:0;margin:10px 0 0;background:transparent}
 .tool-app-ready .tuner-demo-lab>summary{display:none}
 .tool-app-ready[data-session=live] .tuner-demo-lab,.tool-app-ready[data-session=simulation] .tuner-actions,.tool-app-ready[data-session=simulation] .tuner-mode{display:none}
 .tool-app-ready .demo-cases{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:0 0 8px}
 .tool-app-ready .demo-cases button{padding:5px 3px;min-height:48px;font-size:13px}.tool-app-ready .demo-cases small{font-size:11px!important;margin-top:2px!important}
 .tool-app-ready .simulation-reading{padding:7px 8px!important;font-size:13px!important;min-height:0!important;margin:0 0 8px;border:1px solid #bc994e;line-height:1.4!important}
 .tool-app-ready .simulation-reading{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 .tool-app-ready .simulation-controls{grid-template-columns:1fr 1fr;gap:7px}
 .tool-app-ready[data-session=live] .simulation-controls{display:none}
 .tool-app-ready .simulation-controls>div{padding:7px;background:white}
 .tool-app-ready .simulation-controls h3{font-size:13px;margin:0 0 5px}
 .tool-app-ready .simulation-controls>div>div{gap:5px}.tool-app-ready .simulation-controls button{padding:6px 3px;font-size:13px;min-height:40px}
 .tool-app-ready .simulation-controls button:not(:disabled){background:#193c39;border-color:#193c39;color:#fff;font-weight:750}
 .tool-app-ready [data-demo-feedback]{font-size:12px;line-height:1.4;margin:7px 0;color:#624300}
 .tool-app-ready [data-tuner-demo-clear]{display:none}.tool-app-ready[data-session=live] [data-demo-feedback]{display:none}
 .tool-app-ready .tuner-demo-banner{order:-1;font-size:12px;line-height:1.4;border:1px solid #bc994e;border-radius:8px;padding:7px 9px;margin:0 0 8px}
 .simulation-select{display:none}
 /* Fingering: controls above, notation and taped board side by side. */
 #interactive-fingering.tool-app-ready{margin:0;padding:14px;border-radius:18px;display:grid;grid-template-columns:1fr;gap:10px}
 .tool-app-ready .finger-controls{display:grid;grid-template-columns:1fr;gap:8px}
 .finger-find{display:flex;align-items:center;gap:10px}.finger-find label{font-size:14px}.finger-find select{flex:1;min-width:0;min-height:38px}
 .tool-app-ready .finger-string-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
 .tool-app-ready .finger-string-tabs button{min-height:38px;padding:5px}
 .tool-app-ready .finger-note-buttons{margin:0;min-height:0;gap:6px}.tool-app-ready .finger-note-buttons button{min-height:56px;padding:5px 3px}
 .tool-app-ready .finger-note-buttons b{font-size:17px}.tool-app-ready .finger-note-buttons small{font-size:12px}
 .tool-app-ready .finger-selected{margin:0;padding:7px 10px;gap:12px;min-height:48px}
 .tool-app-ready #finger-result-note{font-size:28px}.tool-app-ready #finger-result-place{font-size:15px}
 .tool-app-ready .finger-visuals{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px}
 .tool-app-ready .finger-visuals h2{font:700 15px/1.4 Arial,"Noto Sans CJK SC",sans-serif;margin:0 0 6px}
 .tool-app-ready .finger-staff-figure svg{height:160px;object-fit:contain}.tool-app-ready .finger-board-figure svg{height:270px;max-height:none}
 .tool-app-ready #finger-result-instruction{font-size:14px;line-height:1.5;padding:8px;background:#e4ede5;border-radius:8px;margin:8px 0 0}
 .tool-app-ready #fingerboard-note{font-size:13px;line-height:1.4;margin:6px 0 0}
 .tool-app-ready .finger-app-alternatives{display:flex;align-items:center;gap:8px;margin:0;padding-top:8px}
 .tool-app-ready .finger-app-alternatives h3{font-size:12px;margin:0;max-width:130px}
 .tool-app-ready .finger-alternatives{gap:6px;flex:1}.tool-app-ready .finger-alternatives button{font-size:13px;padding:6px 8px;min-height:40px}
 @media(min-width:1200px){.tool-app-ready .finger-controls{grid-template-columns:1fr 1.5fr}.tool-app-ready .finger-note-buttons{grid-column:1/-1}.tool-app-ready .finger-board-figure svg{height:300px}.tool-app-ready .finger-staff-figure svg{height:190px}.tool-app-ready .tuner-photos svg{height:220px}}
 @media(max-width:760px){
  body.is-tool-app{--header:62px}body.is-tool-app .topbar{min-height:62px;height:62px;padding:5px 12px;flex-wrap:nowrap}body.is-tool-app .brand small{display:none}body.is-tool-app .brand strong{font-size:18px}body.is-tool-app .mark{display:none}
  body.is-tool-app #main{padding:10px 10px 16px}.tool-app-bar{gap:6px;margin-bottom:8px}.tool-app-actions{gap:5px}html body .tool-app-bar h1{font-size:18px}.tool-app-actions button,.tool-switch{font-size:12px;padding:6px 8px;min-height:36px}
  body .tool-app-bar #tuner-title.compact-tool-title{font-size:18px}
  #violin-tuner.tool-app-ready,#interactive-fingering.tool-app-ready{padding:10px;border-radius:13px}
  #violin-tuner.tool-app-ready{padding:8px}
  .tuner-app-work{grid-template-columns:1fr;gap:6px}.tool-session-tabs{margin:0 0 6px;padding:3px}.tool-session-tabs button{min-height:34px;padding:5px 14px}
  .tool-app-ready .tuner-strings{margin:0 0 6px}.tool-app-ready .tuner-mode{margin-bottom:7px}.tuner-live-reading{padding:6px 10px}
  .tool-app-ready .tuner-meter{height:14px}.tool-app-ready .tuner-demo-lab{margin-top:6px}
  .tool-app-ready .tuner-readings{min-height:48px}.tool-app-ready [data-tuner-note]{font-size:34px}.tool-app-ready [data-tuner-status]{margin-top:6px;font-size:12px}
  .tool-app-ready .tuner-visual{display:grid;grid-template-columns:minmax(0,1fr);gap:7px;padding:7px}
  .tool-app-ready .tuner-photos{min-width:0;gap:12px}.tool-app-ready .tuner-photos figure{min-width:0}
  .tool-app-ready .tuner-photos svg{height:106px}
  .tool-app-ready .tuner-photos figcaption{font-size:11px!important;line-height:1.3!important}
  body .tool-app-ready .tuner-photo [data-turn-arrow]>path{stroke-width:1.75}
  .tool-app-ready .tuner-photo [data-guide-control],.tool-app-ready .tuner-photo [data-guide-control].is-lit{stroke-width:2.5}
  .tool-app-ready .tuner-photo [data-control-halo]{stroke-width:5}
  .tool-app-ready .tuner-photo [data-guide-string]{stroke-width:2}.tool-app-ready .tuner-photo [data-string-halo]{stroke-width:4}
  .tool-app-ready .tuner-guidance{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:8px;align-items:center}
  .tool-app-ready .tuner-guidance>p,.tool-app-ready .tuner-direction{grid-column:auto}
  .tool-app-ready .tuner-direction{font-size:12px;min-height:40px;padding:6px;gap:5px}.tool-app-ready .tuner-direction strong{font-size:12px}.tool-app-ready .direction-arrow{font-size:23px}.tool-app-ready .tuner-guidance [data-tuner-guide-copy]{font-size:12px;line-height:1.45}
  .tool-app-ready .demo-cases{display:none}.simulation-select{display:flex;align-items:center;gap:8px;font-size:12px;margin-bottom:7px}.simulation-select select{flex:1;min-width:0;min-height:38px;font:inherit;color:#503600;background:white;border:1px solid #886000;border-radius:6px;padding:5px}
  .tool-app-ready .simulation-reading{font-size:12px!important;padding:6px!important;margin-bottom:6px}
  .tool-app-ready .simulation-controls{display:block;grid-column:1/-1;width:100%}.tool-app-ready .simulation-controls>div{display:none}.tool-app-ready .simulation-controls>div[data-active=true]{display:block;padding:5px}
  .tool-app-ready [data-demo-feedback]{grid-column:1/-1;margin:0}
  .tool-app-ready .simulation-controls>div>div{grid-template-columns:1fr 1fr}.tool-app-ready .simulation-controls button{padding-top:3px;padding-bottom:3px}.tool-app-ready .simulation-controls h3{font-size:12px;margin-bottom:4px}.tool-app-ready [data-demo-feedback]{font-size:12px;margin:4px 0}
  .tool-app-ready .tuner-demo-banner{padding:5px 7px;font-size:11px;margin-bottom:6px}
  .tool-app-ready .finger-note-buttons{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.tool-app-ready .finger-note-buttons button{min-height:48px;gap:1px}.tool-app-ready .finger-note-buttons b{font-size:16px}.tool-app-ready .finger-note-buttons small{font-size:12px}
  #interactive-fingering.tool-app-ready{gap:6px}.tool-app-ready .finger-visuals{gap:9px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .tool-app-ready .finger-visuals h2{font-size:13px}.tool-app-ready .finger-staff-figure svg{height:125px}.tool-app-ready .finger-board-figure svg{height:215px}
  .tool-app-ready #finger-result-instruction{font-size:13px;line-height:1.45;padding:6px;margin-top:6px}.tool-app-ready #fingerboard-note{font-size:12px}
  .tool-app-ready .finger-selected{padding:6px 8px;min-height:42px}.tool-app-ready #finger-result-note{font-size:25px}.tool-app-ready #finger-result-place{font-size:13px}
  .tool-app-ready .finger-app-alternatives{display:block;padding-top:6px}.tool-app-ready .finger-app-alternatives h3{max-width:none;margin-bottom:4px;font-size:12px}.tool-app-ready .finger-alternatives button{min-height:36px;font-size:12px}
  .tool-help-dialog{padding:14px;max-height:88dvh}.tool-help-dialog .dialog-header{top:-14px}.tool-help-dialog h2{font-size:20px}
 }
 @media(max-width:360px){body.is-tool-app .brand{display:none}.tool-app-actions .tool-switch{display:none}.tool-app-ready .tuner-visual{grid-template-columns:1fr}.tool-app-ready .tuner-photos svg{height:100px}.tool-app-ready .finger-board-figure svg{height:200px}.tool-app-ready .finger-staff-figure svg{height:105px}}
}
@media print{[data-app-generated]{display:none!important}}
