.app{height:var(--app-height,100dvh);min-height:0;padding-bottom:env(safe-area-inset-bottom,0px)}
#notebook-button{font-size:12px}#notebook-count{font-size:10px;background:#e3e9da;padding:2px 5px;border-radius:10px}
dialog{position:fixed;top:calc(var(--viewport-top,0px) + env(safe-area-inset-top,0px));bottom:auto;margin:12px auto;max-height:calc(var(--app-height,100dvh) - 24px - env(safe-area-inset-bottom,0px))}
.notebook-dialog{width:calc(100% - 24px);max-width:1000px;height:min(820px,calc(var(--app-height,100dvh) - 24px - env(safe-area-inset-bottom,0px)));padding:18px;overflow:auto}
.notebook-dialog[open]{display:grid;grid-template-rows:auto auto auto minmax(0,1fr) auto;gap:8px}
.notebook-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.notebook-heading h2{font-family:Georgia,serif;font-weight:400;font-size:27px;margin:0}.notebook-heading p{font-size:12px;margin:4px 0;color:var(--muted)}.notebook-heading>button{font-size:24px;padding:3px 12px}
.notebook-overview{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:15px;border-block:1px solid var(--line);padding:6px 0}.notebook-overview .notebook-thumbnail{height:80px;width:100%}.notebook-current-tools{display:flex;align-items:center;gap:6px;flex-wrap:wrap;max-width:440px}.notebook-current-tools span{font-size:11px;color:var(--muted)}.notebook-current-tools button{font-size:11px;min-height:44px;padding:8px}
.notebook-tabs{display:flex;gap:5px}.notebook-tabs button{font-size:12px;min-height:44px}.notebook-tabs [aria-pressed=true]{background:#e4ecda;border-color:#9aad87}
.notebook-content{overflow:auto;min-height:0;overscroll-behavior:contain;padding:2px}.notebook-empty{padding:16px;color:var(--muted)}
.listening-card{display:grid;grid-template-columns:190px minmax(0,1fr);gap:14px;padding:14px;border:1px solid var(--line);border-radius:10px;margin:0 0 10px;background:#fffdf8}.listening-card h3,.comparison-card h3{font-size:17px;font-family:Georgia,serif;margin:0;font-weight:400;overflow-wrap:anywhere}.listening-card p{font-size:11px;margin:5px 0;white-space:pre-wrap;overflow-wrap:anywhere}.notebook-thumbnail{width:100%;height:100px;background:#f4f6ee;border-radius:7px}.notebook-thumbnail text{font:9px sans-serif;fill:#64736a}
.card-actions{display:flex;gap:6px;flex-wrap:wrap}.card-actions button{font-size:11px;min-height:44px;padding:7px 9px}.card-actions label{display:flex;gap:7px;align-items:center;font-size:11px;margin:0;min-height:44px;padding:5px}.card-actions input{width:18px;height:18px;margin:0;padding:0;accent-color:var(--teal)}
.notebook-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding-top:8px}.notebook-footer p{font-size:11px;margin:0;flex:1;overflow-wrap:anywhere}.notebook-footer>div{display:flex;gap:6px}.notebook-footer button{font-size:11px;min-height:44px;padding:7px 9px}
.comparison-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.comparison-card{min-width:0;border:1px solid var(--line);border-radius:8px;padding:12px}.comparison-card p{font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}.comparison-note{border-top:1px solid var(--line);padding:12px 0}.comparison-note strong{font-size:12px}.comparison-note small{font-size:10px;color:var(--muted)}.comparison-context{font-size:12px;color:var(--muted)}
.listening-range{display:grid;grid-template-columns:1fr 1fr;gap:12px}.listening-range label{min-width:0}.listening-range input{margin-top:8px}#replay-pass{width:100%;min-height:44px}#replay-map .notebook-thumbnail{height:150px}#notebook-replay-audio{display:block;width:100%;margin:12px 0}#replay-time{font-size:12px}#replay-missing{font-size:11px}
@media(max-width:760px){.header .brand-icon{display:none}.header{gap:5px}.header h1{font-size:14px}.header-actions{gap:0}.header-actions button{font-size:11px;padding:6px}.notebook-dialog{padding:12px}.notebook-heading h2{font-size:22px}.notebook-heading p{font-size:10px}.notebook-overview{grid-template-columns:1fr;gap:2px}.notebook-overview .notebook-thumbnail{height:58px}.notebook-current-tools{justify-content:space-between;gap:3px;max-width:none}.notebook-current-tools span{display:none}.notebook-current-tools button{font-size:10px;flex:1}.notebook-tabs button{font-size:10px;flex:1;padding:6px}.listening-card{grid-template-columns:1fr;padding:10px;gap:6px}.listening-card .notebook-thumbnail{height:70px}.notebook-footer{flex-wrap:wrap;gap:6px}.notebook-footer p{flex-basis:100%;font-size:10px}.notebook-footer>div{width:100%}.notebook-footer button{flex:1}.comparison-grid{grid-template-columns:1fr 1fr;gap:6px}.comparison-card{padding:7px}.comparison-card h3{font-size:15px}.comparison-card p{font-size:11px}dialog input,dialog textarea,dialog select{font-size:16px}.notebook-content{scroll-padding-block:8px}}
@media(max-height:600px){.app{grid-template-rows:44px 40px minmax(0,1fr) 24px}.studio{padding-top:6px}.map-heading{padding-bottom:4px}.map-heading h2{font-size:19px;margin:2px 0}.map-heading .eyebrow,.map-heading p{display:none}.map-actions{padding:0}.board-wrap{min-height:90px}.map-board{grid-template-rows:minmax(22px,1fr) 40px minmax(22px,1fr)}.lane-caption{top:2px}.lane-hint{display:none}.annotation-section .note,.annotation-section:nth-child(even) .note{top:0;min-height:24px;padding:4px}.player{padding:5px 0}.map-toolbar{padding:2px 0}.source-bar{min-height:24px;font-size:9px}.notebook-heading p{display:none}.notebook-overview .notebook-thumbnail{height:38px}.notebook-overview{padding:2px 0}.notebook-dialog{gap:4px}.notebook-current-tools button,.notebook-tabs button,.notebook-footer button{min-height:36px}.notebook-footer p{font-size:9px}.notebook-heading h2{font-size:19px}}
.app{grid-template-columns:minmax(0,1fr)}.header,.brand,.brand>div,.footer{min-width:0}
@media(max-width:760px){.header{display:grid;grid-template-columns:minmax(0,1fr) auto}.header h1{font-size:13px;white-space:normal;line-height:1.2}.header-actions{flex-shrink:0}#notebook-button{font-size:11px}.footer{align-items:center}}
/* Keep grid children inside the studio, including the longer empty-state copy. */
.studio{grid-template-columns:minmax(0,1fr)}.studio>*{min-width:0}.empty-state{min-width:0}.empty-state button{max-width:100%;min-height:44px;flex-shrink:0}
@media(max-width:760px) and (max-height:750px){.empty-state{padding:6px}.empty-symbol,.empty-state h3{display:none}.empty-state p{font-size:11px;line-height:1.4;margin:0 0 4px}.empty-state .privacy-note{font-size:9px;margin-top:5px}}
@media(max-height:600px){.empty-symbol,.empty-state h3,.empty-state p{display:none}.empty-state{padding:4px}.empty-state .privacy-note{font-size:9px;margin-top:3px}}
