#fixedToolsToggle,.quick-bank-row{display:none}
#fixedTools[hidden]{display:none!important}
.fixed-sr{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#fixedTools{position:fixed;z-index:28;top:calc(var(--safe-top) + 54px);left:50%;transform:translateX(-50%);width:min(calc(100% - 16px),850px);max-height:calc(var(--fixed-height,100dvh) - var(--safe-top) - var(--safe-bottom) - 64px);overflow:auto;background:var(--panel2);border:1px solid var(--gold);border-radius:16px;padding:10px;box-shadow:0 12px 36px #0009}
.fixed-tool-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.fixed-tool-actions button{width:100%;min-height:54px;text-align:center;line-height:1.25;overflow-wrap:anywhere;font-size:14px}
.fixed-tool-actions button,.quick-bank-row button,.quick-bank-items button,#quickBankEditorItems button,#fixedToolsToggle{min-height:44px;border:1px solid var(--line2);border-radius:12px;background:var(--panel2);color:var(--gold);padding:6px 10px;font-weight:700}
#fixedToolsToggle{display:none}
body.fixed-view{overflow:hidden}
body.fixed-view #isokratisContent{position:fixed;top:var(--fixed-top,0px);left:0;right:0;height:var(--fixed-height,100dvh);overflow:hidden;background:var(--bg)}
body.fixed-view #isokratisContent .app{display:flex;flex-direction:column;gap:6px;width:100%;max-width:1280px;height:100%;min-height:0;margin:auto;padding:calc(var(--safe-top) + 4px) 8px calc(var(--safe-bottom) + 4px);overflow:hidden}
body.fixed-view #isokratisContent .top{display:flex;position:relative;flex:0 0 44px;min-height:44px;gap:8px;padding:0;justify-content:space-between;margin:0}
body.fixed-view #isokratisContent .top-left{display:contents}
body.fixed-view #isokratisContent .brand{display:none}
body.fixed-view #isokratisContent .top-menu{display:block;width:44px;height:44px;flex:0 0 44px;margin:0}
body.fixed-view #isokratisContent .stop{display:block;min-width:76px;height:44px;padding:0 12px;font-size:14px}
body.fixed-view #fixedToolsToggle{display:block;flex:1;max-width:280px;height:44px;font-size:14px}
body.fixed-view #isokratisContent .status{display:flex;flex:0 0 28px;min-height:28px;padding:2px 8px;margin:0;border-radius:8px}
body.fixed-view #isokratisContent .status-summary{display:flex;align-items:center;gap:8px;min-width:0}
body.fixed-view #isokratisContent .status .mode{font-size:12px;white-space:nowrap}
body.fixed-view #isokratisContent .current{margin:0}
body.fixed-view #isokratisContent .current strong{font-size:20px}
body.fixed-view #isokratisContent #freqLabel{display:none}
body.fixed-view #isokratisContent .ready{padding:2px 6px;font-size:10px}
body.fixed-view #isokratisContent .status-summary{flex-wrap:nowrap}
body.fixed-view #isokratisContent .status .ready{flex:0 1 auto;min-width:0;max-width:48%;gap:5px}
body.fixed-view #isokratisContent .status #readyText{position:static;width:auto;height:auto;margin:0;clip-path:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.fixed-view #isokratisContent .status .dot{flex-shrink:0}
body.fixed-view #isokratisContent .instrument{flex:1;display:flex;flex-direction:column;min-height:0;height:auto;padding:6px;gap:6px;margin:0;border-radius:16px;overflow:hidden}
body.fixed-view #isokratisContent #noteGrid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:6px;width:100%;height:auto;margin:0;padding:0}
body.fixed-view #isokratisContent #noteGrid .note{min-height:0;height:100%;padding:0;border-radius:12px;font-size:clamp(26px,7vw,44px)}
body.fixed-view #isokratisContent #noteGrid .tag{font-size:8px;top:4px;left:5px}
body.fixed-view #isokratisContent .caption,body.fixed-view #isokratisContent .hint,body.fixed-view #isokratisContent .compact-toolbar,body.fixed-view #isokratisContent .dock{display:none}
body.fixed-view #isokratisContent .quick-controls{flex:0 0 auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:0;padding:0;border:0;background:none}
body.fixed-view #isokratisContent .quick-control{padding:0;min-width:0}
body.fixed-view #isokratisContent .quick-head{font-size:12px;min-height:18px;margin:0;line-height:18px;display:flex;justify-content:space-between;gap:3px}
body.fixed-view #isokratisContent .quick-head output{font-size:12px;padding:0 3px;line-height:18px}
body.fixed-view #isokratisContent .quick-control input{display:block;height:36px;margin:0}
body.fixed-view #isokratisContent .quick-note{display:none}
body.fixed-view #isokratisContent .pitch-nudges{grid-column:1/-1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:0}
body.fixed-view #isokratisContent .pitch-nudges button{min-height:44px;height:44px;padding:0;font-size:15px}
body.fixed-view #isokratisContent .quick-bank-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;flex:0 0 44px}
.quick-bank-row button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:14px}
.quick-bank-items{display:grid;gap:8px}
.quick-bank-items button{text-align:left;min-width:0;overflow-wrap:anywhere}
.quick-bank-items small{display:block;color:var(--muted);font-size:12px}
.quick-bank-item{border:1px solid var(--line2);border-radius:14px;padding:10px;display:grid;gap:7px;min-width:0;background:var(--panel2)}
.quick-bank-item strong{overflow-wrap:anywhere}
.quick-bank-item>button{width:100%}
.quick-bank-item button.selected{background:var(--gold);color:#201a10;border-color:var(--gold)}
.quick-bank-level{display:flex;align-items:center;gap:10px;min-height:44px}
.quick-bank-level input{flex:1;min-width:0;min-height:44px;accent-color:var(--gold)}
.quick-bank-level output{min-width:42px;text-align:right;font-weight:800;color:var(--gold)}
.quick-bank-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.quick-bank-actions button{text-align:center;font-size:13px}
#quickBankName{display:block;width:100%;min-height:44px;background:var(--panel2);color:var(--text);border:1px solid var(--line2);border-radius:10px;padding:8px}
#sheet-quickbanks label{display:block;margin:12px 0 5px}
#quickBankEditorItems .bank-editor-row{display:flex;align-items:center;gap:4px;flex-wrap:wrap;border-bottom:1px solid var(--line2);padding:10px 0}
.bank-editor-row span{flex:1 0 100%;overflow-wrap:anywhere}
#quickBankEditorItems button{min-width:44px}
body.fixed-view #isokratisContent #scaleStudyStrip:not([hidden]){flex:0 0 auto;max-height:70px;overflow:auto;margin:0}
body.fixed-view #isokratisContent .error.show{position:fixed;z-index:27;top:calc(var(--safe-top) + 60px);left:10px;right:10px;max-height:30vh;overflow:auto}
body.fixed-view.pdf-open #isokratisContent .status{display:flex}
body.fixed-view.pdf-open #isokratisContent .pdf-workspace{flex:1;min-height:0;height:auto!important;max-height:none;margin:0;display:flex;flex-direction:column}
body.fixed-view.pdf-open #isokratisContent .pdf-head{display:block;flex:0 0 auto;padding:4px 5px 5px;min-width:0}
body.fixed-view.pdf-open #isokratisContent .pdf-title-row{min-height:25px}
body.fixed-view.pdf-open #isokratisContent .pdf-actions{display:flex;flex-wrap:nowrap;gap:5px;overflow-x:auto;overscroll-behavior-x:contain;padding:2px 0 4px;scrollbar-width:thin}
body.fixed-view.pdf-open #isokratisContent .pdf-actions .pdf-btn{flex:0 0 auto;min-height:40px!important;height:40px!important;font-size:12px!important;padding:0 9px!important}
body.fixed-view.pdf-open #isokratisContent #pdfSearchBtn{order:-3}
body.fixed-view.pdf-open #isokratisContent #pdfOpenBtn{order:-2}
body.fixed-view.pdf-open #isokratisContent #pdfRecentBtn{order:-1}
body.fixed-view.pdf-open #isokratisContent .pdf-nav{display:flex;flex-wrap:nowrap;gap:4px;margin-top:2px;min-width:0}
body.fixed-view.pdf-open #isokratisContent .pdf-nav .pdf-btn{min-height:40px!important;height:40px!important}
body.fixed-view.pdf-open #isokratisContent .pdf-nav .pdf-btn.icon{flex:0 0 40px;width:40px}
body.fixed-view.pdf-open #isokratisContent .pdf-nav .pdf-btn.page{flex:1 1 auto;min-width:60px}
body.fixed-view.pdf-open #isokratisContent .pdf-zoom-val{flex:0 0 auto;font-size:12px}
body.fixed-view.pdf-open #isokratisContent .pdf-layout{display:none}
body.fixed-view.pdf-open #isokratisContent .pdf-viewport{flex:1;min-height:0;height:100%!important;max-height:none;overflow:auto;overscroll-behavior:contain}
body.fixed-view.pdf-open #isokratisContent .pdf-help{display:none}
body.fixed-view.pdf-open #isokratisContent .pdf-resizer{display:block;flex:0 0 18px;min-height:18px;height:18px;margin:0;touch-action:none}
body.fixed-view.pdf-open #isokratisContent .instrument{flex:0 0 var(--fixed-key-height,270px)}
body.fixed-view.pdf-open #isokratisContent #noteGrid{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
body.fixed-view.pdf-open #isokratisContent #noteGrid .note{font-size:22px}
body.fixed-view.pdf-open #isokratisContent #noteGrid .tag{font-size:6px}
@media(orientation:landscape){
 body.fixed-view #isokratisContent #noteGrid{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
 body.fixed-view #isokratisContent .status{display:flex}
 body.fixed-view.pdf-open #isokratisContent .app{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,1fr);grid-template-rows:44px 28px minmax(0,1fr);gap:6px}
 body.fixed-view.pdf-open #isokratisContent .top{grid-column:1/-1}
 body.fixed-view.pdf-open #isokratisContent .status{grid-column:1/-1;grid-row:2}
 body.fixed-view.pdf-open #isokratisContent .pdf-workspace{grid-column:1;grid-row:3;height:100%!important}
 body.fixed-view.pdf-open #isokratisContent .instrument{grid-column:2;grid-row:3;height:100%;min-height:0}
}

.fixed-pdf-space{display:none;margin:10px 0;font-size:14px}body.pdf-open .fixed-pdf-space{display:block}.fixed-pdf-space input{display:block;height:44px}
body.fixed-view.compact-notes:not(.pdf-open) #isokratisContent #noteGrid{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
body.fixed-view.pdf-open:not(.compact-notes) #isokratisContent #noteGrid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr))}
@media(orientation:landscape){body.fixed-view.pdf-open #isokratisContent .pdf-resizer{display:none}body.fixed-view.pdf-open:not(.compact-notes) #isokratisContent #noteGrid{grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}}
/* Override legacy 12-column spans and compact rules only in fixed mode. */
body.fixed-view #isokratisContent #noteGrid .note{grid-column:auto!important;grid-row:auto;min-height:0!important;height:100%!important;padding:0!important}
body.fixed-view #isokratisContent #noteGrid{grid-template-columns:repeat(3,minmax(0,1fr))!important;grid-template-rows:repeat(4,minmax(0,1fr))!important;gap:6px!important;flex:1 1 0!important}
body.fixed-view.compact-notes #isokratisContent #noteGrid{grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important}
body.fixed-view #isokratisContent .quick-controls{grid-template-columns:repeat(2,minmax(0,1fr))!important}
body.fixed-view #isokratisContent .pitch-nudges{grid-column:1/-1!important}
@media(orientation:landscape){body.fixed-view #isokratisContent #noteGrid{grid-template-columns:repeat(6,minmax(0,1fr))!important;grid-template-rows:repeat(2,minmax(0,1fr))!important}}
body.fixed-view #isokratisContent:not([hidden]){display:block}
body.fixed-view.pdf-open #isokratisContent .app{height:100%!important;min-height:0!important;overflow:hidden!important;padding-bottom:calc(var(--safe-bottom) + 4px)!important}
body.fixed-view.pdf-open #isokratisContent .instrument{flex:0 0 var(--fixed-key-height,270px)!important;overflow:hidden!important}
body.fixed-view.pdf-open #isokratisContent .pdf-viewport{min-height:0!important}
body.fixed-view #backupReminder{position:fixed;z-index:27;top:calc(var(--safe-top) + 54px);left:10px;right:10px;max-height:40dvh;overflow:auto;margin:0;box-shadow:0 10px 30px #0008}
@media(orientation:landscape) and (max-height:380px){
 body.fixed-view #isokratisContent .instrument{gap:4px}
 body.fixed-view #isokratisContent #noteGrid{gap:4px!important}
 body.fixed-view:not(.pdf-open) #isokratisContent .quick-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 236px!important;align-items:center}
 body.fixed-view:not(.pdf-open) #isokratisContent .pitch-nudges{grid-column:auto!important}
}

body.fixed-view.pdf-open #isokratisContent #noteGrid{gap:4px!important}
#layoutChangeBanner{position:fixed;z-index:31;top:calc(var(--safe-top,0px) + 6px);left:50%;transform:translateX(-50%);box-sizing:border-box;width:min(calc(100% - 20px),660px);max-height:calc(100dvh - var(--safe-top,0px) - var(--safe-bottom,0px) - 12px);overflow:auto;margin:0;padding:18px;border:2px solid var(--gold);border-radius:18px;background:var(--panel2,#14202c);color:var(--text,#fff);box-shadow:0 10px 35px #000b}
#layoutChangeBanner h2{margin:0 0 12px;font-size:clamp(22px,5.5vw,30px);line-height:1.18;color:var(--gold)}
#layoutChangeBanner p{margin:9px 0;line-height:1.5}
#layoutChangeBanner .release-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
#layoutChangeBanner button{min-height:44px;padding:8px 12px;border-radius:10px;border:1px solid var(--gold);background:transparent;color:var(--gold);font-size:15px;font-weight:800}
#layoutChangeBanner button:first-child{background:var(--gold);color:#201a10}
.help-topic{margin:14px 0;padding:14px;border:1px solid rgba(228,189,114,.22);border-radius:14px;background:rgba(228,189,114,.045)}
.help-topic h3{margin:0 0 7px;color:var(--gold);font-size:17px}
.help-topic>p{margin:0 0 10px;line-height:1.5}
.help-detail summary{cursor:pointer;min-height:44px;display:flex;align-items:center;color:var(--gold);font-weight:800;list-style:none}
.help-detail summary::-webkit-details-marker{display:none}
.help-detail summary::before{content:'▸';margin-right:9px;transition:transform .15s}
.help-detail[open] summary::before{transform:rotate(90deg)}
.help-detail ol{padding-left:23px;line-height:1.6}
.help-detail li{margin:8px 0}
.help-detail p{line-height:1.6}
body.fixed-view #isokratisContent #noteGrid .note{background:linear-gradient(155deg,#19232c 0%,#111922 58%,#0d141c 100%)!important;border:2px solid #78414a!important;color:#e9c984!important;box-shadow:inset 0 1px 0 #ffffff12,0 5px 15px #0004!important;text-shadow:0 1px 1px #0008}
body.fixed-view #isokratisContent #noteGrid .note:active{transform:scale(.985);filter:brightness(1.17)}
body.fixed-view #isokratisContent #noteGrid .note.active{background:linear-gradient(160deg,#ffdc8c,#dba64e)!important;color:#20180e!important;border-color:#fff0bf!important;box-shadow:inset 0 0 0 2px #9f682b,0 0 0 2px #ddb061,0 8px 22px #0005!important;text-shadow:none}
@media(orientation:portrait) and (min-width:760px){
 body.fixed-view #isokratisContent .instrument{gap:10px;padding:10px}
 body.fixed-view #isokratisContent .quick-bank-row{flex-basis:60px;gap:10px}
 body.fixed-view #isokratisContent .quick-bank-row button{font-size:18px}
 body.fixed-view #isokratisContent .quick-controls{min-height:185px;padding:12px;gap:10px}
 body.fixed-view #isokratisContent .quick-head{font-size:16px;min-height:24px}
 body.fixed-view #isokratisContent .quick-head output{font-size:16px}
 body.fixed-view #isokratisContent .quick-control input{height:52px}
 body.fixed-view #isokratisContent .pitch-nudges button{height:58px;font-size:19px}
 body.fixed-view #isokratisContent #noteGrid .note{font-size:clamp(40px,5.5vw,64px)}
 body.fixed-view #fixedTools{top:calc(var(--safe-top) + 52px);left:auto;right:8px;transform:none;width:min(34vw,340px);max-height:calc(var(--fixed-height,100dvh) - var(--safe-top) - var(--safe-bottom) - 60px)}
 body.fixed-view #fixedTools .fixed-tool-actions{display:grid;grid-template-columns:1fr;gap:8px}
 body.fixed-view #fixedTools .fixed-tool-actions button{min-height:56px;font-size:16px;text-align:left}
 body.fixed-view.fixed-tools-open #isokratisContent .app{width:calc(100% - min(34vw,340px) - 20px);margin-left:8px;margin-right:0}
}
/* Keep playable keys in very short landscape PDF layouts. */
@media(orientation:landscape) and (max-height:340px){
 body.fixed-view.pdf-open #isokratisContent .app{grid-template-rows:44px 22px minmax(0,1fr);gap:4px}
 body.fixed-view.pdf-open #isokratisContent .status{flex-basis:22px;min-height:22px;padding-top:0;padding-bottom:0}
 body.fixed-view.pdf-open #isokratisContent .instrument{padding:2px!important;gap:2px}
 body.fixed-view.pdf-open #isokratisContent .quick-head{min-height:14px;line-height:14px;font-size:11px}
 body.fixed-view.pdf-open #isokratisContent .quick-head output{line-height:14px;font-size:11px}
 body.fixed-view.pdf-open #isokratisContent .quick-control input{height:24px}
}
