/* Minnesinger Bandstand: the full-screen reader. Used by index.html and band.html (stage.js builds the markup).
   Rules: nothing sits over the music while the controls are hidden; every touch target is at least 44 px;
   text stays readable at arm's length. */
.stage {
  --st-bg: #cfc8b6; --st-page: #fffdf8; --st-ink: #15151f; --st-bar: #171a36; --st-bar-text: #fff8e6;
  --st-card: #fffdf8; --st-card-text: #1f2350; --st-line: #ddd2bd; --st-gold: #e8b043; --st-red: #c8391f; --st-blue: #2f5bd3;
  --st-note: #ffe36a; --st-note-text: #1a1500;
  position: fixed; inset: 0; z-index: 2147483000;
  background: var(--st-bg); color: var(--st-card-text);
  font: 16px/1.4 var(--ui, 'Nunito', 'Segoe UI', system-ui, sans-serif);
  overflow: hidden; outline: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.stage[hidden] { display: none; }
.stage * { box-sizing: border-box; }
.stage.theme-night { --st-bg: #000; --st-page: #0a0a0d; --st-card: #15161e; --st-card-text: #f1ead6; --st-line: #34364a; --st-bar: #0b0c14; }
.stage.theme-sepia { --st-bg: #bfae84; --st-page: #f1e3c0; --st-card: #f6ecd0; --st-card-text: #3a2a12; --st-line: #cdb98a; }
body.staged { overflow: hidden; }

/* ---- room for the menu bar: the music gets what's left (the bar never sits over it) ---- */
.stage {
  --st-mh: 30px;                 /* the menu bar */
  --st-menu: var(--st-mh);       /* what it takes now (6 px folded) */
  --st-sat: env(safe-area-inset-top, 0px); --st-sab: env(safe-area-inset-bottom, 0px);
  --st-sal: env(safe-area-inset-left, 0px); --st-sar: env(safe-area-inset-right, 0px);
  --st-top: calc(var(--st-menu) + var(--st-sat)); --st-bot: var(--st-sab);
}
@media (pointer: coarse) { .stage { --st-mh: 34px; } }
.stage.menu-min { --st-menu: 6px; }
.stage.menu-bottom { --st-top: var(--st-sat); --st-bot: calc(var(--st-menu) + var(--st-sab)); }

/* ---- the music ---- */
.st-surface { position: absolute; top: var(--st-top); bottom: var(--st-bot); left: var(--st-sal); right: var(--st-sar); overflow: hidden; touch-action: none; cursor: pointer; }
.st-view { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; will-change: transform; }
.st-view.st-tall { align-items: flex-start; }
.st-ph { position: absolute; background: #2f5bd31f; border-bottom: 3px solid var(--st-blue); border-radius: 3px; pointer-events: none; transition: left .12s, top .12s; }
.theme-night .st-ph { background: #e8b0432b; border-bottom-color: var(--st-gold); }
.st-page { position: relative; flex: none; background: var(--st-page); box-shadow: 0 2px 18px #0006; overflow: hidden; }
.st-reg { position: relative; overflow: hidden; width: 100%; }
.st-in { position: absolute; left: 0; }
.st-in svg { display: block; width: 100%; height: 100%; background: var(--st-page); }
.theme-night .st-in svg { filter: invert(1) hue-rotate(180deg); background: #fff; }
.theme-sepia .st-in svg { filter: sepia(.55) contrast(.95); }
.st-halfp { display: flex; flex-direction: column; }
/* galley: the systems end to end in one long line, moved left by the stop (no gap: the clef starts each piece) */
.st-view.st-gal { justify-content: flex-start; gap: 0; width: auto; }
.st-strip { display: flex; flex: none; align-items: flex-start; background: var(--st-page); }
.st-gsl { flex: none; width: auto; }
.st-gsl + .st-gsl { box-shadow: inset 1px 0 0 #8881; }
.pdf-sl { position: absolute; inset: 0; background: #fff; }
.st-strip-pdf { background: #fff; }
.stage.theme-night:not(.pdf-noinv) .st-strip-pdf, .stage.theme-night:not(.pdf-noinv) .pdf-sl { background: #000; }
.st-split { margin: 0; border: 0; height: 0; border-top: 3px dashed var(--st-gold); flex: none; opacity: .9; }
.st-notes { position: absolute; inset: 0; pointer-events: none; }
.st-note {
  position: absolute; transform: translateY(-100%); pointer-events: auto; max-width: 42%;
  background: var(--st-note); color: var(--st-note-text); border: 1px solid #b89a1a; border-radius: 6px;
  padding: 1px 7px 2px; margin: 0; font: 700 clamp(11px, 1.5vw, 16px)/1.2 var(--ui, 'Nunito', system-ui, sans-serif);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 1px 4px #0005; cursor: pointer; min-height: 0;
}
.st-note b { background: #1a1500; color: var(--st-note); border-radius: 4px; padding: 0 4px; margin-right: 3px; font-size: .85em; }
.st-note:hover { background: #fff0a0; max-width: 80%; white-space: normal; z-index: 2; }
.st-flash { position: absolute; background: #e8b04388; outline: 3px solid var(--st-gold); border-radius: 4px; pointer-events: none; animation: stflash 1.6s ease-out forwards; }
@keyframes stflash { 0% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }

/* ---- edges flash on every turn, so a pedal press is seen even when you don't look ---- */
.st-edge { position: absolute; top: var(--st-top); bottom: var(--st-bot); width: 28px; pointer-events: none; opacity: 0; z-index: 3; }
.st-edge-l { left: 0; background: linear-gradient(90deg, #e8b043, #e8b04300); }
.st-edge-r { right: 0; background: linear-gradient(270deg, #e8b043, #e8b04300); }
.st-edge.go { animation: stedge .45s ease-out; }
@keyframes stedge { 0% { opacity: .95; } 100% { opacity: 0; } }

/* ---- the menu bar: always there, thin; folds to a 6 px strip with a tab ---- */
.st-menu {
  position: absolute; left: 0; right: 0; top: 0; z-index: 6;
  height: calc(var(--st-menu) + var(--st-sat)); padding: var(--st-sat) var(--st-sar) 0 var(--st-sal);
  background: var(--st-bar); color: var(--st-bar-text); box-shadow: 0 1px 0 #ffffff14 inset, 0 2px 10px #0004;
  font: 700 13.5px/1 var(--ui, 'Nunito', 'Segoe UI', system-ui, sans-serif);
}
.menu-bottom .st-menu { top: auto; bottom: 0; height: calc(var(--st-menu) + var(--st-sab)); padding: 0 var(--st-sar) var(--st-sab) var(--st-sal); box-shadow: 0 -1px 0 #ffffff14 inset, 0 -2px 10px #0004; }
.st-mrow { display: flex; align-items: center; gap: 1px; height: var(--st-mh); padding: 0 4px; min-width: 0; }
.menu-min .st-mrow { display: none; }
.stage .st-mb {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: calc(var(--st-mh) - 6px); min-height: 0; max-height: calc(var(--st-mh) - 6px); min-width: 44px; margin: 0; /* (the app's 44 px touch-button rule would make the bar's buttons spill out of it) */ padding: 0 8px; border: 0; border-radius: 7px;
  background: transparent; box-shadow: none; color: inherit; font: inherit; white-space: nowrap; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
/* a 44 px touch area, taller than the bar it sits in */
.stage .st-mb::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
/* touch screens: the touch area starts at the bar's top edge and runs 44 px down, well past the bar (the page
   under it is margin, and a fingertip lands low) */
@media (pointer: coarse) {
  .stage .st-mb::after { top: -3px; height: 44px; transform: none; }
  .menu-bottom .st-mb::after { top: auto; bottom: -3px; }
}
.stage .st-mb:hover { background: #ffffff1c; }
.stage .st-mb:active { background: #ffffff2e; }
.stage .st-mb:disabled { opacity: .38; cursor: default; background: transparent; }
.stage .st-mb[aria-pressed="true"], .stage .st-mb.on, .stage .st-mb[aria-expanded="true"] { background: #e8b04333; color: #ffd98a; }
.stage .st-mb:focus-visible { outline: 2px solid #9db8ff; outline-offset: -2px; }
.st-i { width: 18px; height: 18px; flex: none; display: block; }
.st-mchip .st-i { width: 16px; height: 16px; }
.st-msep { flex: none; width: 1px; height: 16px; background: #ffffff2b; margin: 0 4px; }
.st-mfill { flex: 1 1 0; min-width: 4px; }
.st-msong { flex: 0 1 auto !important; min-width: 0 !important; max-width: 30vw; justify-content: flex-start !important; }
.st-mtitle { min-width: 0; display: flex; align-items: baseline; gap: 6px; overflow: hidden; }
.st-mtitle b { font-weight: 800; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mtitle small { font-weight: 700; font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.st-mwhat { max-width: 22vw; }
.st-mwhat span { overflow: hidden; text-overflow: ellipsis; }
.st-mwhat.folio span::before { content: 'Folio · '; opacity: .65; font-weight: 700; }
.st-mwhat .st-i { width: 14px; height: 14px; opacity: .8; }
.st-mpage { flex: none; min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 800; }
.st-mplay { color: #ffd98a !important; }
.stage .st-mplay[aria-pressed="true"] { background: var(--st-gold); color: #1f2350 !important; }
.st-mchip span { font-variant-numeric: tabular-nums; }
.st-mword { font-weight: 700; }
#stTurns { gap: 3px; }
#stTurns .st-mword { margin-left: 3px; }
.st-mband .st-i { width: 17px; height: 17px; }
.st-mband.off { opacity: .62; }
.st-mband.ok .st-i { color: #8fe0a6; }
.st-mband.warn .st-i { color: #ffb48a; }
.st-mclock { flex: none; padding: 0 8px; font-variant-numeric: tabular-nums; opacity: .7; }
.st-mx:hover { background: #c8391f !important; color: #fff; }
/* folded: a 6 px strip, and a tab to pull it back (one tap) */
.st-grab { display: none; }
.menu-min .st-grab {
  display: block; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); width: 64px; height: 14px; margin: 0; padding: 0;
  border: 0; border-radius: 0 0 9px 9px; background: var(--st-bar); box-shadow: 0 2px 6px #0004; cursor: pointer; touch-action: manipulation;
}
.menu-bottom.menu-min .st-grab { top: auto; bottom: 100%; border-radius: 9px 9px 0 0; box-shadow: 0 -2px 6px #0004; }
.menu-min .st-grab i { position: absolute; left: 50%; top: 5px; width: 24px; height: 3px; margin-left: -12px; border-radius: 2px; background: #fff8e699; }
.menu-bottom.menu-min .st-grab i { top: 6px; }
.menu-min .st-grab::after { content: ''; position: absolute; left: -10px; right: -10px; top: -14px; height: 44px; }
.menu-bottom.menu-min .st-grab::after { top: auto; bottom: -14px; }
.menu-min .st-grab:focus-visible { outline: 2px solid #9db8ff; }
.menu-min .st-menu { cursor: pointer; }
.menu-bottom .st-i-fold { transform: rotate(180deg); }
/* narrower screens: the least-used controls move into ⋯ More (it has everything) */
@media (max-width: 1180px) { .st-mclock { display: none; } }
@media (max-width: 1020px) { #stTurns .st-mword { display: none; } }
@media (max-width: 860px) { .st-mo2 { display: none !important; } .st-mwhat { max-width: 28vw; } }
@media (max-width: 680px) { .st-mo1 { display: none !important; } .st-mband span { display: none; } .st-msong { max-width: 34vw; } .st-mtitle small { display: none; } }
@media (max-width: 480px) { #stTurns, #stBandBtn, .st-msep { display: none !important; } .st-msong { max-width: 26vw; } .st-mpage { min-width: 40px; } .stage .st-mb { padding: 0 6px; min-width: 38px; } }

/* ---- the menu's pop-up lists ---- */
.st-popm {
  position: absolute; z-index: 12; min-width: 240px; max-width: min(360px, calc(100vw - 12px)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--st-card); color: var(--st-card-text); border: 1px solid var(--st-line); border-radius: 12px; padding: 6px;
  box-shadow: 0 10px 34px #0007; font: 600 15px/1.25 var(--ui, 'Nunito', system-ui, sans-serif); cursor: auto;
}
.st-popm[hidden] { display: none; }
.st-pm-h { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; opacity: .6; padding: 8px 10px 4px; }
.stage .st-pm-i {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 0; padding: 6px 10px; border: 0; border-radius: 8px;
  background: transparent; box-shadow: none; color: inherit; font: inherit; text-align: left; white-space: normal; cursor: pointer;
}
.stage .st-pm-i:hover, .stage .st-pm-i:focus-visible { background: color-mix(in srgb, var(--st-card) 84%, var(--st-gold)); outline: none; }
.stage .st-pm-i:disabled { opacity: .5; cursor: default; background: transparent; }
.stage .st-pm-i[aria-checked="true"] { font-weight: 800; }
.st-pm-ck { flex: none; width: 18px; height: 18px; color: #8a5a00; }
.st-pm-ck .st-i { width: 18px; height: 18px; }
.theme-night .st-pm-ck { color: var(--st-gold); }
.st-pm-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-pm-l small { font-size: 12.5px; font-weight: 600; opacity: .68; }
.st-pm-i kbd { flex: none; font: 700 11.5px/1 ui-monospace, Consolas, monospace; padding: 3px 6px; border-radius: 5px; border: 1px solid var(--st-line); opacity: .7; }
.st-pm-sep { border: 0; border-top: 1px solid var(--st-line); margin: 5px 4px; }
.st-pm-row { display: flex; align-items: center; gap: 6px; padding: 4px 6px 6px; }
.st-pm-row output { flex: 1; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; gap: 2px; }
.st-pm-row output small { font-size: 12px; opacity: .65; font-weight: 700; }
.stage .st-pm-b {
  min-width: 44px; min-height: 40px; margin: 0; padding: 4px 12px; border-radius: 9px; border: 1px solid var(--st-line);
  background: var(--st-card); color: inherit; font: 800 17px/1 var(--ui, system-ui, sans-serif); box-shadow: none; cursor: pointer;
}
.stage .st-pm-b:not(:disabled):hover { background: color-mix(in srgb, var(--st-card) 84%, var(--st-gold)); }
.stage .st-pm-b:last-child { font-size: 14px; }
.st-pm-note { margin: 4px 10px 6px; font-size: 12.5px; opacity: .65; }

/* ---- buttons ---- */
.stage .st-btn, .stage button.st-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  min-width: 44px; min-height: 44px; padding: 6px 12px; border-radius: 12px;
  font: 800 16px/1.1 var(--ui, 'Nunito', system-ui, sans-serif); color: inherit; cursor: pointer; white-space: nowrap;
  background: #ffffff1a; border: 1px solid #ffffff40; box-shadow: none; touch-action: manipulation;
}
.st-btn:hover { background: #ffffff33; }
.st-btn[aria-pressed="true"], .st-btn.on { background: var(--st-gold); color: #1f2350; border-color: #d39a2c; }
.st-btn.hot { background: var(--st-gold); color: #1f2350; border-color: #d39a2c; }
.st-btn.hot:hover { background: #f0c25e; }
.st-x { background: #c8391f; border-color: #e0654d; color: #fff; }
.st-drawer .st-btn, .st-pop .st-btn, .st-toast .st-btn {
  background: var(--st-card); color: var(--st-card-text); border: 1px solid var(--st-line);
}
.st-drawer .st-btn.hot, .st-pop .st-btn.hot, .st-drawer .st-btn.on { background: var(--st-gold); color: #1f2350; border-color: #d39a2c; }
.st-drawer .st-btn:hover { background: color-mix(in srgb, var(--st-card) 85%, var(--st-gold)); }
.st-btn:focus-visible, .stage input:focus-visible, .stage select:focus-visible { outline: 3px solid #7aa2ff; outline-offset: 2px; }

/* ---- drawers: set lists (left), settings and band (right) ---- */
.st-drawer {
  position: absolute; top: var(--st-top); bottom: var(--st-bot); z-index: 7; width: min(460px, 100vw); overflow-y: auto; overscroll-behavior: contain;
  background: var(--st-card); color: var(--st-card-text); padding: 14px 14px max(20px, env(safe-area-inset-bottom));
  box-shadow: 0 0 30px #0009; -webkit-user-select: text; user-select: text; cursor: auto; touch-action: pan-y;
}
.st-drawer[hidden] { display: none; }
.st-left { left: 0; }
.st-right { right: 0; }
.st-drawer h3 { margin: 18px 0 6px; font-size: 18px; }
.st-drawer h3:first-child { margin-top: 2px; }
.st-drawer p { margin: 6px 0; }
.st-dim { opacity: .72; font-size: 14px; }
.st-drawer label { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 8px 0; font-weight: 700; }
.st-drawer label.st-check { display: flex; flex-wrap: nowrap; align-items: flex-start; font-weight: 600; }
.st-drawer label.st-check input { margin-top: 4px; width: 22px; height: 22px; flex: none; }
.stage input, .stage select {
  font: 600 16px var(--ui, 'Nunito', system-ui, sans-serif); min-height: 44px; padding: 6px 10px; border-radius: 10px; max-width: 100%;
  border: 1px solid var(--st-line); background: #fff; color: #1f2350; -webkit-user-select: text; user-select: text;
}
.stage.theme-night input, .stage.theme-night select { background: #0d0e16; color: #f1ead6; }
.stage input[type=range] { padding: 0; min-height: 32px; flex: 1; min-width: 140px; accent-color: var(--st-gold); }
.stage input[type=checkbox] { min-height: 0; }
.st-drawer output { font-variant-numeric: tabular-nums; min-width: 64px; }
.st-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.st-row > select, .st-row > input:not([type=file]) { flex: 1; min-width: 120px; }
.st-ped { border: 1px solid var(--st-line); border-radius: 12px; margin: 10px 0; padding: 4px 10px 8px; }
.st-ped legend { font-weight: 800; padding: 0 6px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.st-chip { display: inline-flex; align-items: center; gap: 2px; background: var(--st-bar); color: var(--st-bar-text); border-radius: 999px; padding: 2px 4px 2px 12px; font-weight: 800; font-size: 14px; }
.st-chip button { all: unset; cursor: pointer; min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.st-chip button:hover { background: #ffffff33; }
.st-tester {
  font: 700 15px/1.3 ui-monospace, Consolas, monospace; padding: 12px; border-radius: 12px; margin: 8px 0;
  background: var(--st-bar); color: var(--st-gold); min-height: 56px; word-break: break-word;
}
.st-meters { display: grid; gap: 6px; margin: 6px 0; }
.st-meters span { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 8px; font-size: 14px; }
.st-meters i { display: block; height: 12px; border-radius: 6px; background: var(--st-gold); max-width: 100%; transition: width .08s; }

/* set list rows */
.st-items { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.st-items li {
  display: grid; grid-template-columns: 28px 1fr auto; grid-template-areas: "n go mv" "n part mv" "n note mv";
  gap: 4px 8px; align-items: center; padding: 8px; border: 1px solid var(--st-line); border-radius: 12px; background: color-mix(in srgb, var(--st-card) 92%, #888);
}
.st-items li.on { border-color: var(--st-gold); box-shadow: inset 4px 0 0 var(--st-gold); background: color-mix(in srgb, var(--st-card) 80%, var(--st-gold)); }
.st-items li.drop { outline: 3px dashed var(--st-blue); outline-offset: 1px; }
.st-items li[draggable] { cursor: grab; }
.st-items .st-num { grid-area: n; font-weight: 800; text-align: center; opacity: .7; }
.st-items .st-go { grid-area: go; all: unset; grid-area: go; cursor: pointer; font-weight: 800; font-size: 17px; min-height: 36px; display: flex; align-items: center; overflow: hidden; text-overflow: ellipsis; }
.st-items .st-go:hover { text-decoration: underline; }
.st-items .st-part { grid-area: part; }
.st-items .st-inote { grid-area: note; min-height: 38px; }
.st-items .st-in-break { grid-column: 2; grid-row: 1 / span 3; font-weight: 800; font-style: italic; }
.st-items .st-mv { grid-area: mv; display: flex; flex-direction: column; gap: 4px; }
.st-items .st-mv button { min-width: 44px; min-height: 40px; font-size: 15px; padding: 0; border-radius: 10px; border: 1px solid var(--st-line); background: var(--st-card); color: var(--st-card-text); }
.st-items .st-mv button:hover { background: color-mix(in srgb, var(--st-card) 80%, var(--st-gold)); }
.st-empty { display: block !important; text-align: center; padding: 16px; opacity: .7; }

/* band link */
.st-url { word-break: break-all; font-size: 17px; }
.st-code { font: 800 34px/1 ui-monospace, Consolas, monospace; letter-spacing: .25em; padding: 4px 8px; background: var(--st-bar); color: var(--st-gold); border-radius: 10px; }
.st-qr { width: 190px; max-width: 70%; padding: 8px; background: #fff; border-radius: 10px; margin: 8px 0; }
.st-qr svg { width: 100%; height: auto; display: block; }

/* ---- messages over the music (kept small and brief) ---- */
.st-banner {
  position: absolute; top: 14%; left: 50%; transform: translateX(-50%); z-index: 6; max-width: 90%; text-align: center;
  background: #171a36e8; color: #fff8e6; padding: 12px 22px; border-radius: 16px; font: 800 clamp(20px, 3.2vw, 32px)/1.2 var(--ui, system-ui, sans-serif);
  box-shadow: 0 6px 24px #0007; pointer-events: none;
}
.st-banner[hidden], .st-toast[hidden], .st-caption[hidden], .st-pop[hidden], .st-lockmark[hidden], .st-blur[hidden], .st-autobar[hidden] { display: none; }
.st-toast {
  position: absolute; left: 50%; bottom: calc(var(--st-bot) + 14px); transform: translateX(-50%); z-index: 9; max-width: min(92%, 640px);
  background: #171a36f2; color: #fff8e6; padding: 8px 8px 8px 16px; border-radius: 14px; font-weight: 700; box-shadow: 0 6px 24px #0008;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.st-toast .st-btn { background: var(--st-gold); color: #1f2350; border-color: #d39a2c; }
.st-caption {
  position: absolute; left: 50%; bottom: calc(var(--st-bot) + 70px); transform: translateX(-50%); z-index: 8; max-width: min(94%, 720px);
  background: #171a36e8; color: #fff8e6; padding: 8px 16px; border-radius: 999px; font: 700 18px/1.3 var(--ui, system-ui, sans-serif); text-align: center; pointer-events: none;
}
.st-caption.live { background: #c8391fe8; }
.st-caption.live i { opacity: .95; }
.st-caption.ok { background: #1f6b3be8; }
.st-caption.dim { background: #171a3699; opacity: .9; font-weight: 600; }
.st-lockmark { position: absolute; top: calc(var(--st-top) + 8px); left: 50%; transform: translateX(-50%); z-index: 6; background: #171a36e8; color: #fff8e6; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; pointer-events: none; text-align: center; max-width: 94%; }
.st-autobar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: #ffffff1a; pointer-events: none; }
.menu-bottom .st-autobar { bottom: auto; top: 0; }
.st-autobar i { display: block; height: 100%; width: 0; background: var(--st-gold); }
.st-blur {
  position: absolute; inset: auto 12px 12px 12px; z-index: 10; min-height: 56px; font: 800 18px var(--ui, system-ui, sans-serif);
  background: var(--st-red); color: #fff; border: 0; border-radius: 14px; box-shadow: 0 6px 24px #0008; white-space: normal;
}

/* ---- the little note box (double-tap a bar, N) ---- */
.st-pop {
  position: absolute; left: 50%; top: 22%; transform: translateX(-50%); z-index: 11; width: min(92%, 460px);
  background: var(--st-card); color: var(--st-card-text); padding: 14px; border-radius: 16px; box-shadow: 0 10px 40px #000a;
  -webkit-user-select: text; user-select: text; cursor: auto;
}
.st-pop label { display: block; font-weight: 800; margin-bottom: 6px; }
.st-pop input { width: 100%; }

/* ---- cards: breaks, nothing-to-play ---- */
.st-card {
  background: var(--st-card); color: var(--st-card-text); border-radius: 20px; padding: 28px 36px; text-align: center; max-width: min(92%, 640px);
  box-shadow: 0 6px 30px #0005;
}
.st-card h2 { margin: 0 0 8px; font-size: clamp(26px, 5vw, 48px); line-height: 1.15; }
.st-card p { margin: 6px 0; font-size: clamp(16px, 2.4vw, 22px); }
.st-break { border: 3px dashed var(--st-gold); }

/* phones */
@media (max-width: 560px) {
  .st-drawer { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) {
  .st-edge.go, .st-flash { animation-duration: .01s; }
  .st-ph { transition: none; }
}
@media print { .stage { display: none !important; } }

/* ---- find any chart (/ or Ctrl+K) ---- */
.st-find { position: absolute; inset: 0; z-index: 12; display: flex; justify-content: center; align-items: flex-start; padding: calc(var(--st-sat) + 7vh) 12px 12px; background: #171a3699; -webkit-user-select: text; user-select: text; cursor: auto; touch-action: pan-y; }
.st-find[hidden] { display: none; }
.st-findbox { width: min(640px, 100%); max-height: 100%; display: flex; flex-direction: column; background: var(--st-card); color: var(--st-card-text); border: 1px solid var(--st-line); border-radius: 16px; box-shadow: 0 12px 40px #0009; padding: 12px; }
.st-findhead { display: flex; gap: 8px; }
.st-findhead input { flex: 1; min-width: 0; min-height: 48px; font: 700 18px var(--ui, 'Nunito', 'Segoe UI', system-ui, sans-serif); padding: 8px 12px; border: 1px solid var(--st-line); border-radius: 12px; background: #fff; color: #1f2350; }
.st-findhead .st-btn { background: var(--st-card); color: var(--st-card-text); border: 1px solid var(--st-line); }
.st-findlist { list-style: none; margin: 8px 0 0; padding: 0; overflow-y: auto; overscroll-behavior: contain; max-height: 58vh; }
.st-fo { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.st-fo.on, .st-fo:hover { background: color-mix(in srgb, var(--st-card) 78%, var(--st-gold)); }
.st-fot { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-fot b { font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-fot small { opacity: .72; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-fok { flex: none; font-style: normal; font-weight: 800; font-size: 12px; padding: 2px 9px; border-radius: 99px; border: 1px solid var(--st-line); }
.st-fok-song { background: #2f5bd31a; color: #2f5bd3; }
.st-fok-tune { background: #e8b04333; color: #7a5a10; }
.st-fok-set { background: #c8391f1a; color: #c8391f; }
.st-findhint { margin: 8px 2px 0; font-size: 13px; opacity: .75; }
@media (max-width: 600px) { .st-find { padding-top: calc(var(--st-sat) + 8px); } .st-findlist { max-height: 52vh; } }
