.view-switch{display:flex;align-items:center;gap:4px}
.view-switch button{min-height:44px;padding:8px 12px;font-size:14px;background:transparent;border-color:var(--line);color:inherit;white-space:nowrap}
.view-switch button[aria-pressed="true"]{border-color:var(--orange);color:var(--orange);box-shadow:inset 0 -2px var(--orange)}
#notebookPanel[hidden]{display:none!important}
#notebookPanel{min-width:0;min-height:0;display:flex;flex-direction:column;gap:12px;background:#1b1b1be8;padding:16px}
.notebook-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.notebook-heading h2{margin:0;color:var(--orange);font-size:18px;letter-spacing:1px}
.notebook-heading span{font-size:14px;color:var(--muted)}
.notebook-description{margin:0;font-size:14px;line-height:1.5;color:var(--muted)}
.notebook-table-wrap{min-height:0;overflow:auto;flex:1;border:1px solid var(--line);border-radius:3px}
.notebook-table{width:100%;min-width:480px;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}
.notebook-table th,.notebook-table td{padding:6px 12px;border-bottom:1px solid var(--line);text-align:center}
.notebook-table thead th{position:sticky;top:0;z-index:1;background:#252525;color:var(--orange);font-weight:600;height:40px}
.notebook-table tbody tr:nth-child(4n+1){border-top:2px solid #777}
.notebook-table tbody th{width:55px;color:var(--muted)}
.notebook-table select{width:100%;min-width:68px;min-height:36px;padding:4px 8px;font-size:14px}
.notebook-table input[type=checkbox]{width:22px;height:22px;accent-color:var(--orange);cursor:pointer}
.notebook-table .notebook-selected{background:#ffffff08}
.notebook-actions{display:flex;flex-wrap:wrap;gap:8px}
.notebook-actions button{font-size:14px;min-height:44px}
#notebookSave{border-color:var(--orange);color:var(--orange)}
html[data-view="notebook"] main>.scope-panel,html[data-view="notebook"] main>#desktopRandomize,html[data-view="notebook"] main>.sequencer,html[data-view="notebook"] main>.lower,html[data-view="notebook"] main>.sound,html[data-view="notebook"] main>.distortion,html[data-view="notebook"] main>.transport,html[data-view="notebook"] .kick-control,html[data-view="notebook"] #genQuick{display:none!important}
@media(min-width:1024px) and (hover:hover) and (pointer:fine){
 html[data-view="notebook"] #notebookPanel{grid-column:1/-1;grid-row:3/7}
 html[data-view="notebook"] main>.topbar{grid-template-columns:minmax(276px,380px) 246px 80px 1fr 32px}
 .header-controls{gap:10px}
}
@media(max-width:1023px),(hover:none),(pointer:coarse){
 main>header{flex-wrap:wrap;align-items:center}
 .header-controls{flex-wrap:wrap;gap:8px;max-width:100%;flex-shrink:1}
 .header-controls .desktop-subscription{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px;border:1px solid var(--line);border-radius:3px;color:inherit;font-size:14px;text-decoration:none}
 .view-switch button{padding:8px}
 html[data-view="notebook"] main{display:block!important;height:auto!important;max-height:none!important;min-height:100dvh}
 html[data-view="notebook"] main>.topbar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:14px 0}
 html[data-view="notebook"] .topbar .pattern-library{width:100%;max-width:none}
 html[data-view="notebook"] .topbar .topbar-actions{display:flex;margin-left:auto;gap:10px}
 #notebookPanel{margin:12px 0;padding:12px}
 .notebook-table-wrap{max-height:60dvh}
 .notebook-table th,.notebook-table td{padding:6px 8px}
 .notebook-table select{min-height:44px;font-size:16px}
}
@media print{
 @page{size:A4;margin:12mm}
 html[data-view="notebook"] body{background:white;color:black;padding:0}
 html[data-view="notebook"] main{display:block!important;height:auto!important;max-height:none!important;background:white!important;padding:0;min-height:0}
 html[data-view="notebook"] main>header,html[data-view="notebook"] main>.topbar,html[data-view="notebook"] main>footer,html[data-view="notebook"] .notebook-actions,html[data-view="notebook"] #appVersion{display:none!important}
 html[data-view="notebook"] #notebookPanel{background:white;border:0;padding:0;display:block}
 .notebook-heading{margin-bottom:10px}.notebook-heading h2,.notebook-heading span,.notebook-description{color:black}
 .notebook-table-wrap{max-height:none;overflow:visible;margin-top:12px;border-color:#999}
 .notebook-table{min-width:0}.notebook-table thead th{position:static;background:white;color:black}
 .notebook-table th,.notebook-table td{border-color:#bbb;padding:5px;color:black}
 .notebook-table select{appearance:none;border:0;background:white;color:black;min-height:24px;padding:0}
 .notebook-table input{accent-color:black}.notebook-selected{background:white!important}
}

.view-switch[hidden]{display:none!important}
@media(hover:none),(pointer:coarse){.view-switch{display:none!important}}

#notebookScopeHost{flex:0 0 auto;min-width:0}
#notebookScopeHost>.scope-panel{display:flex;flex-direction:column;margin:0;padding:0;min-width:0;height:clamp(140px,20vh,190px);overflow:hidden}
#notebookScopeHost #scope{display:block;width:100%;flex:1 1 0;height:0;min-height:0;max-height:100%;contain:size}
#notebookScopeHost .scope-caption{flex:0 0 auto}
@media print{#notebookScopeHost{display:none!important}}

html[data-developer-preview="true"] main>header{flex-wrap:wrap}
html[data-developer-preview="true"] .header-controls{flex-wrap:wrap;flex-shrink:1;justify-content:flex-end;gap:8px}

#notebookImportDialog{width:min(720px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;overflow:auto}
#notebookImportDialog label{display:block;margin:12px 0 6px;font-size:14px;line-height:1.5}
#notebookImportDialog [hidden]{display:none!important}
#notebookImportDialog textarea,#notebookImportFile{width:100%;box-sizing:border-box;font-size:16px;max-width:100%}
#notebookImportDialog textarea{resize:vertical;min-height:110px}
#notebookImportDialog button{min-height:44px;margin-top:8px}
#notebookImportMessage{white-space:pre-wrap;overflow-wrap:anywhere}
.notebook-import-table{overflow:auto;max-height:35dvh;border:1px solid var(--line)}
#notebookImportWarning{padding:12px;border:1px solid var(--orange);border-radius:3px}
#notebookImportReplace{width:20px;height:20px;vertical-align:middle;accent-color:var(--orange)}
