/* Minnesinger phone: the Stage tab, the full-screen stage, and the Find chords box. Same colors as phone.css. */

/* ---- Find chords (Chart tab) ---- */
.ugbox { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px 12px; margin: 0 0 12px; }
.ugbox > summary { min-height: 48px; display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.ugrow2 { display: flex; gap: 8px; }
.ugrow2 input { flex: 1; min-width: 0; font: 600 16px/1.3 var(--ui); color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 12px; min-height: 48px; padding: 10px 12px; }
.ugrow2 button { flex: none; min-width: 72px; }
.uglist { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.ugrow { text-align: left; display: block; width: 100%; font-weight: 700; }
.ugrow small { display: block; color: var(--muted); font-weight: 600; font-size: 13px; margin-top: 2px; }
#ugTitle { margin: 6px 0; overflow-wrap: anywhere; }
.ugprev { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 6px 0; font: 12px/1.35 ui-monospace, 'Roboto Mono', Consolas, monospace; overflow: auto; max-height: 190px; white-space: pre; }

/* ---- Stage tab ---- */
.psname, .pssel, #tabStage select { font: 600 16px/1.3 var(--ui); color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 12px; min-height: 48px; padding: 10px 12px; }
#tabStage .field select { display: block; width: 100%; margin-top: 4px; }
.psname { flex: 1 1 160px; min-width: 0; }
.pssel { flex: 1 1 160px; min-width: 0; }
.filebtn { display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 10px 0; border: 1px dashed var(--line); border-radius: 14px; font-weight: 700; cursor: pointer; }
.psitems { list-style: none; margin: 8px 0; padding: 0; }
.psitems li { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 6px; margin: 6px 0; flex-wrap: wrap; }
.psitems .ps-n { width: 26px; text-align: center; font-weight: 800; color: var(--accent2); }
.psitems .ps-t { flex: 1 1 120px; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.psitems li select { flex: 1 1 130px; min-height: 44px; font-size: 14px; padding: 6px 8px; }
.psitems li button { min-height: 44px; min-width: 44px; padding: 0 8px; }
.psitems .ps-none { color: var(--muted); border-style: dashed; }
.ps-ped { border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; padding: 6px 12px 12px; background: var(--panel); }
.ps-ped legend { font-weight: 800; padding: 0 6px; }
.ps-ped button[data-learn] { width: 100%; }
.ps-keys { margin: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.ps-chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; font-weight: 700; font-size: 13px; }
.ps-dim { color: var(--muted); }
.ps-tester { background: #1f2350; color: #fff8e6; border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-weight: 700; min-height: 48px; overflow-wrap: anywhere; }
button.hot { background: var(--gold); }

/* ---- the full-screen stage ---- */
body.staged { overflow: hidden; }
.ps {
  --ps-bg: #ebe5d4; --ps-ink: #15151f; --ps-chord: #a82a12; --ps-sec: #6b4800; --ps-bar: #171a36; --ps-bartext: #fff8e6; --ps-card: #fffdf8; --ps-cardtext: #1f2350; --ps-line: #ddd2bd;
  --ps-menu: 46px; --ps-sat: env(safe-area-inset-top, 0px); --ps-sab: env(safe-area-inset-bottom, 0px);
  position: fixed; inset: 0; z-index: 2147483000; background: var(--ps-bg); color: var(--ps-ink);
  font: 16px/1.4 var(--ui); overflow: hidden; outline: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.ps[hidden] { display: none; }
.ps * { box-sizing: border-box; }
.ps.night { --ps-bg: #000; --ps-ink: #f1ead6; --ps-chord: #ffc857; --ps-sec: #9fb4ff; --ps-bar: #0b0c14; --ps-card: #15161e; --ps-cardtext: #f1ead6; --ps-line: #34364a; }
.ps.menu-min { --ps-menu: 6px; }
.ps-bar {
  position: absolute; left: 0; right: 0; top: 0; z-index: 3; height: calc(var(--ps-menu) + var(--ps-sat)); padding-top: var(--ps-sat);
  display: flex; align-items: stretch; background: var(--ps-bar); color: var(--ps-bartext); overflow: hidden;
}
.ps.menu-min .ps-bar > * { visibility: hidden; }
.ps-bar button {
  flex: none; min-width: 44px; min-height: 44px; height: 100%; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit;
  font: 800 17px/1 var(--ui); padding: 0 8px;
}
.ps-bar button:active { background: #ffffff22; }
.ps-bar button:disabled { opacity: .3; }
.ps-bar .ps-ttl { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; padding: 0 6px; }
.ps-bar .ps-ttl span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.ps-bar .ps-ttl small { font: 600 12px/1.1 var(--ui); opacity: .8; white-space: nowrap; }
.ps-bar #psSmaller, .ps-bar #psBigger { font-size: 15px; }
.ps-surface {
  position: absolute; left: env(safe-area-inset-left, 0px); right: env(safe-area-inset-right, 0px);
  top: calc(var(--ps-menu) + var(--ps-sat)); bottom: var(--ps-sab); overflow: hidden; touch-action: none; cursor: pointer;
}
.ps-view { width: 100%; will-change: transform; }
.ps-col { padding: 0 14px; font-family: ui-monospace, 'Roboto Mono', Consolas, 'Courier New', monospace; white-space: pre; color: var(--ps-ink); }
.ps-probe { position: absolute; visibility: hidden; white-space: pre; font-family: ui-monospace, 'Roboto Mono', Consolas, 'Courier New', monospace; }
.ps-gap { height: .7em; }
.ps-sec { font: 800 .8em/1.2 var(--ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ps-sec); padding: .35em 0 .15em; white-space: normal; }
.ps-pair { padding: 0; }
.ps-ch { color: var(--ps-chord); }
.ps-ch b { font-weight: 800; }
.ps-ly { color: var(--ps-ink); }
.ps-score { background: #fffdf8; }
.ps.night .ps-score { filter: invert(1) hue-rotate(180deg); }
.ps-score svg { display: block; max-width: none; }
/* galley: one long line, moved left by the stop */
.ps.ps-galley .ps-view { width: max-content; }
.ps-score.ps-gal { display: inline-block; min-height: 100%; }
.ps-galrow .pdf-sl { background: #fff; }
.ps-msg { padding: 24px; text-align: center; font-weight: 700; }
.ps-edge { position: absolute; top: calc(var(--ps-menu) + var(--ps-sat)); bottom: 0; width: 10px; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .12s; background: var(--ps-chord); }
.ps-edge.l { left: 0; } .ps-edge.r { right: 0; } .ps-edge.on { opacity: .85; }
.ps-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; background: var(--ps-bar); color: var(--ps-bartext); padding: 10px 18px; border-radius: 12px; font-weight: 800; }
.ps-say { position: absolute; left: 16px; right: 16px; bottom: calc(18px + var(--ps-sab)); z-index: 5; background: var(--ps-bar); color: var(--ps-bartext); border-radius: 14px; padding: 12px 16px; font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
.ps-say.show { opacity: .95; }
.ps-blur { position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--ps-sab)); z-index: 6; background: var(--ps-chord); color: #fff; border: 0; border-radius: 14px; min-height: 52px; font-weight: 800; }
.ps.night .ps-blur { color: #000; }
.ps.locked .ps-surface { cursor: not-allowed; }
.ps.locked .ps-bar #psTitleBtn::after { content: ' 🔒'; }

.ps-drawer { position: absolute; inset: calc(var(--ps-menu) + var(--ps-sat)) 0 0 0; z-index: 7; background: #0009; overflow: auto; padding: 10px 10px calc(14px + var(--ps-sab)); }
.ps-card { background: var(--ps-card); color: var(--ps-cardtext); border: 1px solid var(--ps-line); border-radius: 16px; padding: 12px 14px 14px; max-width: 560px; margin: 0 auto; }
.ps-card h2 { font-size: 19px; margin: 0; flex: 1; overflow-wrap: anywhere; }
.ps-card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; margin: 14px 0 6px; }
.ps-card button { color: inherit; background: transparent; border: 1px solid var(--ps-line); }
.ps-card .ps-tester { background: var(--ps-bar); color: var(--ps-bartext); }
.ps-drow { display: flex; align-items: center; gap: 10px; }
.ps-seg { display: flex; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.ps-seg button { flex: 1 1 110px; }
.ps-seg output { flex: 1 1 110px; display: grid; place-items: center; font-weight: 800; min-height: 48px; }
.ps-seg button.on, .ps-jump button.on { background: var(--ps-chord); color: #fff; border-color: transparent; }
.ps.night .ps-seg button.on, .ps.night .ps-jump button.on { color: #000; }
.ps-jump { list-style: none; margin: 0; padding: 0; }
.ps-jump li { margin: 6px 0; }
.ps-jump button { width: 100%; text-align: left; }
.ps-chk { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 700; }
.ps-chk input { width: 26px; height: 26px; }
.ps-card .ps-dim { color: inherit; opacity: .75; margin: 4px 0; }
