:root {
  --e-bg: #f5f6f8; --e-panel: #ffffff; --e-text: #1d2330; --e-muted: #6b7385; --e-line: #e3e6ec;
  --e-accent: #3b6cf6; --e-accent-ink: #fff; --e-danger: #d64545; --e-soft: #eef2fe;
  --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --e-bg: #15171c; --e-panel: #1e2128; --e-text: #e8eaf0; --e-muted: #9aa1b2; --e-line: #2f333d; --e-soft: #252c40; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; color: var(--e-text); }
html { background: transparent; }
body { background: var(--e-bg); }
body.presenting { background: transparent; }
body { overflow: hidden; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
.loading { display: grid; place-items: center; height: 100vh; color: var(--e-muted); }
#print-area { display: none; }

/* ---------- buttons & fields ---------- */
.btn { border: 1px solid var(--e-line); background: var(--e-panel); padding: 6px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(0.97); }
.btn.primary { background: var(--e-accent); color: var(--e-accent-ink); border-color: transparent; }
.btn.danger { color: var(--e-danger); }
.btn.small { padding: 3px 8px; font-size: 12px; }
.btn.ghost { background: transparent; border-color: transparent; }
.iconbtn { border: none; background: transparent; cursor: pointer; padding: 4px 6px; border-radius: 6px; color: var(--e-muted); }
.iconbtn:hover { background: var(--e-soft); color: var(--e-text); }
input, select, textarea { border: 1px solid var(--e-line); background: var(--e-panel); border-radius: 7px; padding: 6px 8px; min-width: 0; }
textarea { width: 100%; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--e-accent) 45%, transparent); outline-offset: 0; border-color: var(--e-accent); }
input[type=color] { padding: 2px; width: 44px; height: 32px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--e-accent); }
.fld { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.fld > span { color: var(--e-muted); font-size: 12px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--e-muted); }
.small { font-size: 12px; }
.chk { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; }

/* ---------- editor ---------- */
.editor { display: flex; flex-direction: column; height: 100vh; }
.e-top { display: flex; align-items: center; gap: 16px; padding: 10px 16px 10px 84px; border-bottom: 1px solid var(--e-line); background: var(--e-panel); -webkit-app-region: drag; }
.e-top * { -webkit-app-region: no-drag; }
.brand { font-weight: 700; font-size: 15px; }
.tabs { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: none; background: transparent; padding: 7px 12px; border-radius: 8px; cursor: pointer; color: var(--e-muted); font-weight: 500; white-space: nowrap; }
.tab:hover { background: var(--e-soft); color: var(--e-text); }
.tab.on { background: var(--e-soft); color: var(--e-accent); }
.e-main { flex: 1; overflow: auto; padding: 20px; }
.e-wrap { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--e-panel); border: 1px solid var(--e-line); border-radius: var(--radius); padding: 16px; }
.card h2 { margin: 0 0 4px; font-size: 16px; }
.card h3 { margin: 0 0 8px; font-size: 14px; }
.card .desc { margin: 0 0 12px; color: var(--e-muted); font-size: 13px; }
.card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; }
.split { display: grid; grid-template-columns: 240px 1fr; gap: 16px; align-items: start; }
.list { display: flex; flex-direction: column; gap: 4px; }
.list-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.list-item:hover { background: var(--e-soft); }
.list-item.on { background: var(--e-soft); border-color: var(--e-accent); }
.swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; border: 1px solid rgba(0,0,0,.15); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--e-muted); font-weight: 500; font-size: 12px; padding: 4px 6px; }
.tbl td { padding: 4px 6px; border-top: 1px solid var(--e-line); vertical-align: middle; }
.tbl input:not([type=checkbox]), .tbl select { width: 100%; }
.auto-row { display: grid; grid-template-columns: 24px 210px 1fr 28px; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--e-line); }
.auto-row:first-child { border-top: none; }
.auto-when { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.auto-when input[type=number] { width: 64px; }
.auto-fields { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.auto-fields .fld { min-width: 120px; }
.auto-fields .fld.wide { flex: 1; min-width: 200px; }
.agenda-row { display: grid; grid-template-columns: 24px 1fr 70px 26px 28px; gap: 8px; align-items: center; margin-bottom: 6px; }
.themes { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-chip { border: 2px solid transparent; border-radius: 8px; padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 600; }
.theme-chip.on { border-color: var(--e-accent); }
.preview-strip { border-radius: 10px; padding: 14px 18px; display: flex; justify-content: space-between; align-items: center; background-size: cover; background-position: center; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.week .fld select { width: 100%; }
.days14 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-cell { border: 1px solid var(--e-line); border-radius: 8px; padding: 6px 8px; font-size: 12px; }
.day-cell.today { border-color: var(--e-accent); }
.day-cell b { display: block; font-size: 11px; color: var(--e-muted); font-weight: 500; }
.res-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--e-line); }
.res-item:first-child { border-top: none; }
.pill { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: var(--e-soft); color: var(--e-muted); }
.empty { color: var(--e-muted); font-size: 13px; padding: 10px 0; }
.notice { background: var(--e-soft); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.notes-area { min-height: 320px; font-size: 15px; }
.note-dates { display: flex; flex-wrap: wrap; gap: 6px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #1d2330; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 9999; box-shadow: 0 8px 30px rgba(0,0,0,.25); }

/* ---------- present ---------- */
.present {
  --bg: #0b3954; --accent: #ffd166; --text: #fff;
  --card: color-mix(in srgb, var(--text) 9%, transparent);
  --line: color-mix(in srgb, var(--text) 16%, transparent);
  position: fixed; inset: 0; color: var(--text);
  display: grid; grid-template-rows: auto 1fr; overflow: hidden;
  font-size: clamp(14px, 1.25vw, 22px);
}
.present.hide-cursor { cursor: none; }
.p-bg { position: absolute; inset: 0; background-color: var(--bg); background-size: cover; background-position: center; z-index: 0; }
.p-head { z-index: 2; }
.p-body { grid-row: 2; grid-column: 1; position: relative; z-index: 1; }
.p-head { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr) max-content; align-items: center; gap: 1em; padding: 1.1em 1.6em .8em 1.6em; position: relative; z-index: 50; }
.p-head .p-clock { justify-self: end; }
.p-title { min-width: 0; color: var(--title-text, var(--text)); }
.p-title .t1 { font-size: 2.1em; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.p-title .t2 { font-size: 1em; opacity: .8; margin-top: .25em; display: flex; gap: .6em; align-items: center; flex-wrap: wrap; }
.chip { background: var(--accent); color: var(--bg); font-weight: 700; padding: .12em .6em; border-radius: 99px; font-size: .85em; }
.chip.test { background: #e63946; color: #fff; }
.p-clock { text-align: right; color: var(--clock-text, var(--text)); }
.p-clock .time { font-size: 2.6em; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.p-clock .left { opacity: .85; margin-top: .3em; font-variant-numeric: tabular-nums; }
.p-progress { position: absolute; left: 1.6em; right: 1.6em; bottom: 0; height: 5px; border-radius: 9px; background: var(--line); overflow: hidden; }
.p-progress > div { height: 100%; background: var(--accent); width: 0; transition: width 1s linear; }
.p-body { display: grid; grid-template-columns: minmax(15em, 22%) 1fr; gap: 1.2em; padding: 1.2em 1.6em 1.6em; min-height: 0; }
.p-body.full { grid-template-columns: 1fr; }
.p-side { display: flex; flex-direction: column; gap: 1em; min-height: 0; min-width: 0; overflow: auto; font-size: var(--side-fs, 1em); }
.p-side .p-card { background: var(--side-card, var(--card)); }
.p-body:not(.full) { gap: 0; }
.p-body.side-collapsed .p-side { visibility: hidden; }
.p-body.resizing, .p-body.resizing * { cursor: col-resize !important; user-select: none; }
.p-body.resizing iframe { pointer-events: none; }
.p-split { position: relative; cursor: col-resize; display: flex; align-items: center; justify-content: center; }
/* the drag line is split around the hide/show button in the middle: one part above it, one below */
.p-split::before, .p-split::after { content: ""; position: absolute; width: 4px; border-radius: 4px; background: var(--line); transition: background .2s; }
.p-split::before { top: 12%; bottom: calc(50% + 1.3em + 8px); }
.p-split::after { top: calc(50% + 1.3em + 8px); bottom: 12%; }
.p-split:hover::before, .p-split:hover::after, .p-body.resizing .p-split::before, .p-body.resizing .p-split::after { background: var(--accent); }
.p-split-btn { position: relative; z-index: 1; width: 1.3em; height: 2.6em; border-radius: 8px; border: none; background: var(--card); color: var(--text); cursor: pointer; font-size: 1em; font-weight: 800; opacity: 0; transition: opacity .2s; }
.p-split:hover .p-split-btn, .p-body.side-collapsed .p-split-btn { opacity: 1; }
.p-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1em 1.1em; }
.p-card h4 { margin: 0 0 .6em; font-size: .78em; text-transform: uppercase; letter-spacing: .08em; opacity: .75; display: flex; justify-content: space-between; align-items: center; }
.agenda { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35em; }
.agenda li { display: flex; gap: .6em; align-items: center; padding: .45em .6em; border-radius: 10px; font-size: 1.05em; transition: all .3s; }
.agenda li .n { width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; font-size: .8em; font-weight: 700; background: var(--line); flex: none; }
.agenda li.done { opacity: .45; text-decoration: line-through; }
.agenda li.cur { background: var(--accent); color: var(--bg); font-weight: 700; }
.agenda li.cur .n { background: var(--bg); color: var(--accent); }
.agenda li .m { margin-left: auto; font-size: .75em; opacity: .7; }
.mini-btns { display: flex; gap: .3em; }
.mini-btns button { background: var(--line); border: none; color: var(--text); border-radius: 6px; padding: .1em .5em; cursor: pointer; font-size: .9em; }
.p-stage { position: relative; display: flex; flex-direction: column; min-height: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.stage-tabs { display: flex; gap: .3em; padding: .5em .6em; border-bottom: 1px solid var(--line); overflow-x: auto; align-items: center; }
.stage-tabs button { border: none; background: transparent; color: var(--text); opacity: .7; padding: .35em .8em; border-radius: 8px; cursor: pointer; font-size: .85em; white-space: nowrap; }
.stage-tabs button.on { background: var(--accent); color: var(--bg); opacity: 1; font-weight: 700; }
.stage-tabs .sp { flex: 1; }
.stage-content { position: relative; flex: 1; min-height: 0; }
.stage-content iframe, .stage-content img.res { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.stage-content img.res { object-fit: contain; background: transparent; }
.warmup { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 2em 3em; }
.warmup .lbl { font-size: .9em; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); font-weight: 800; margin-bottom: .8em; }
.warmup .q { font-size: 2.6em; font-weight: 700; line-height: 1.2; white-space: pre-wrap; }
.res-fallback { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 2em; }
.center-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1em; padding: 2em; }
.center-screen .big { font-size: 7em; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; }
.center-screen .msg { font-size: 2em; font-weight: 600; max-width: 30em; }
.center-screen .next { font-size: 1.4em; opacity: .9; }
.center-screen .p-card { min-width: 22em; text-align: left; }
.ev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4em; }
.ev-list li { display: flex; gap: .5em; }

/* signal banner */
.p-signal { position: absolute; left: 50%; top: .8em; transform: translateX(-50%); z-index: 30; padding: .5em 1.6em; border-radius: 99px; font-size: 1.6em; font-weight: 800; box-shadow: 0 10px 40px rgba(0,0,0,.35); cursor: pointer; display: none; }
.p-signal.on { display: block; animation: pop .3s ease-out; }

/* timers */
.p-timers {
  grid-row: 2; grid-column: 1; position: relative; z-index: 25;
  margin: .6em 1em 1em; padding: 8px;
  display: flex; flex-direction: column; gap: .75em; align-items: flex-end;
  pointer-events: none;
}
.present.stage-max .p-timers { margin: 6px 8px 8px; }
.p-timer {
  pointer-events: auto; background: var(--bg); color: var(--text);
  border: 3px solid var(--accent); border-radius: 18px; padding: 8px 12px 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
  display: flex; flex-direction: column; gap: 6px; min-width: 230px; box-sizing: border-box;
}
.p-timer.big { transform-origin: top right; }
.p-timer .ring { width: 46px; height: 46px; flex: none; display: block; }
.p-timer .tl { font-size: 12px; opacity: .85; text-transform: uppercase; letter-spacing: .07em; font-weight: 800; min-width: 0; overflow: hidden; }
.p-timer .tl-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-timer .tv { font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
.p-timer.warn { border-color: #ff6b6b; animation: pulse 1s infinite; }
.p-timer.done { border-color: #ff6b6b; background: #ff6b6b; color: #fff; }
.p-timer .tm-bar { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex: none; width: 100%; }
.p-timer .tm-title-col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; flex: 1 1 0; }
.p-timer .tm-win-acts { display: flex; align-items: center; gap: 5px; flex: none; margin-left: auto; }
.p-timer .tm-body { display: flex; align-items: center; justify-content: center; gap: 12px; flex: 1 1 auto; min-height: 0; min-width: 0; overflow: visible; }
.p-timer .ringwrap { flex: none; display: grid; place-items: center; }
.p-timer .tm-ctrls { display: flex; align-items: center; justify-content: center; gap: 6px; flex: none; }
.p-timer .tm-win-acts button,
.p-timer .tm-end,
.p-timer .tm-ctrls button {
  background: var(--line); border: none; color: inherit; border-radius: 8px; cursor: pointer;
  font-size: 12px; font-weight: 700; padding: 4px 8px; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.p-timer .tm-win-acts button:hover,
.p-timer .tm-end:hover,
.p-timer .tm-ctrls button:hover { filter: brightness(1.08); }
.p-timer .tm-win-acts button.on,
.p-timer .tm-ctrls button.on { background: var(--accent); color: var(--bg); }
.p-timer .tm-end {
  background: color-mix(in srgb, #e5484d 18%, var(--line)); color: inherit; padding: 3px 10px;
}
.p-timer .tm-end:hover { background: #e5484d; color: #fff; }
.p-timer .tm-win-acts .ico,
.p-timer .tm-ctrls .ico { width: 14px; height: 14px; }
/* timer tool: themed like the timers it makes (class colours, big round presets) */
.tool[data-toolwin="timer"] { background: color-mix(in srgb, var(--bg) 92%, #000); color: var(--text); border: 3px solid var(--accent); border-radius: 20px; width: 320px; }
.tool[data-toolwin="timer"] .tool-head { background: transparent; color: var(--text); font-size: 15px; letter-spacing: .02em; }
.tool[data-toolwin="timer"] .tool-head .x { color: var(--text); opacity: .7; }
.tool[data-toolwin="timer"] .tool-body { padding: 4px 14px 14px; }
.tt { display: flex; flex-direction: column; gap: 12px; }
.tt button { font: inherit; color: inherit; cursor: pointer; border: none; }
.tt-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.tt-presets button { background: color-mix(in srgb, var(--text) 10%, transparent); border-radius: 14px; padding: 8px 0 6px; display: flex; flex-direction: column; align-items: center; line-height: 1; transition: background .15s, transform .1s; }
.tt-presets button:hover { background: var(--accent); color: var(--bg); }
.tt-presets button:active { transform: scale(.95); }
.tt-presets b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tt-presets small { font-size: 11px; opacity: .75; text-transform: uppercase; letter-spacing: .08em; margin-top: 3px; }
.tt-custom { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--text) 18%, transparent); }
.tt-step { display: flex; align-items: center; gap: 8px; }
.tt-step > button { width: 40px; height: 40px; border-radius: 50%; background: color-mix(in srgb, var(--text) 12%, transparent); font-size: 22px; font-weight: 700; flex: none; }
.tt-step > button:hover { background: var(--accent); color: var(--bg); }
.tt-step label { flex: 1; display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.tt-step input { width: 90px; text-align: center; font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; background: transparent !important; border: none !important; color: var(--text) !important; padding: 0; -moz-appearance: textfield; }
.tt-step input::-webkit-inner-spin-button { -webkit-appearance: none; }
.tt-step span { opacity: .7; font-weight: 700; }
.tt input#tt-label, .tt select { background: color-mix(in srgb, var(--text) 10%, transparent) !important; color: var(--text) !important; border: 1px solid color-mix(in srgb, var(--text) 20%, transparent) !important; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.tt select option { color: #1d2330; }
.tt-row { display: flex; gap: 8px; }
.tt-row select { flex: 1; min-width: 0; }
.tt-snd { width: 40px; border-radius: 10px; background: color-mix(in srgb, var(--text) 12%, transparent); display: grid; place-items: center; flex: none; }
.tt-snd.off { background: #ff6b6b; color: #fff; }
.tt-snd .ico { width: 20px; height: 20px; }
.tt-go { background: var(--accent); color: var(--bg); border-radius: 12px; padding: 11px; font-weight: 800; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.tt-go:hover { filter: brightness(1.1); }
.tt-go .ico { width: 18px; height: 18px; }
.p-timer .tbtns button { background: var(--line); border: none; color: inherit; border-radius: 6px; cursor: pointer; font-size: .75em; padding: .15em .45em; }

/* overlay message */
.p-overlay { position: absolute; inset: 0; z-index: 40; display: none; place-items: center; background: rgba(0,0,0,.45); backdrop-filter: blur(3px); }
.p-overlay.on { display: grid; }
.p-msg { background: var(--bg); border: 4px solid var(--accent); border-radius: 28px; padding: 1.4em 2.2em; max-width: 70%; text-align: center; font-size: 2.8em; font-weight: 800; line-height: 1.2; box-shadow: 0 20px 80px rgba(0,0,0,.5); animation: pop .35s ease-out; white-space: pre-wrap; }
.p-msg .sub { font-size: .4em; opacity: .7; font-weight: 500; margin-top: 1em; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.p-signal.on { animation: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(255,107,107,.25); } }

/* dock */
.p-dock { position: relative; z-index: 50; display: flex; gap: .15em; align-items: center; padding: .3em; border-radius: 14px; max-width: 100%; overflow-x: auto; scrollbar-width: none; background: rgba(20,22,28,.82); color: #fff; backdrop-filter: blur(12px); box-shadow: 0 10px 40px rgba(0,0,0,.35); transition: opacity .3s, transform .3s, clip-path .4s ease; font-size: 14px; }
.p-dock::-webkit-scrollbar { display: none; }
/* Hidden when idle: the bar shrinks toward its middle into a rounded square as tall as the bar, so you can see
   where it is. Moving the mouse, pressing a key or tapping brings it back. (--dock-h / --dock-w are set by fitDock.) */
.p-dock > * { transition: opacity .2s; }
.p-dock { clip-path: inset(0 0 round 14px); }
.p-dock.hidden { pointer-events: none; clip-path: inset(0 calc(50% - var(--dock-h, 52px) / 2) round 14px); }
.p-dock.vertical.hidden { clip-path: inset(calc(50% - var(--dock-w, 52px) / 2) 0 round 14px); }
.p-dock.hidden > * { opacity: 0; }
.p-dock button, .p-dock select { background: transparent; border: none; color: #fff; padding: 5px 7px; border-radius: 9px; cursor: pointer; font-size: 11px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.p-dock button .i { font-size: 18px; line-height: 1; }
.p-dock button:hover, .p-dock button.on { background: rgba(255,255,255,.16); }
.p-dock select {
  display: inline-block; appearance: none; -webkit-appearance: none;
  background: rgba(255,255,255,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 8px center / 12px 12px;
  max-width: 165px; height: 32px; font-size: 12px; font-weight: 600;
  padding: 0 24px 0 10px; line-height: 32px; white-space: nowrap; text-overflow: ellipsis;
}
.p-dock.dock-light select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231d2330' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
}
.p-dock select option { color: #000; }
.p-dock .sep { width: 1px; align-self: stretch; background: rgba(255,255,255,.2); margin: 4px 4px; }
.sound-chip { position: absolute; left: 1em; bottom: 1em; z-index: 51; background: #e63946; color: #fff; border: none; padding: 8px 14px; border-radius: 99px; cursor: pointer; font-size: 13px; }

/* floating tools */
.tool { position: absolute; z-index: 45; width: 290px; background: rgba(250,250,252,.97); color: #1d2330; border-radius: 16px; box-shadow: 0 16px 50px rgba(0,0,0,.4); font-size: 14px; overflow: hidden; }
.tool-head { display: flex; align-items: center; padding: 8px 10px 8px 14px; background: #eceef3; cursor: grab; font-weight: 700; user-select: none; }
.tool-head .x { margin-left: auto; border: none; background: transparent; cursor: pointer; font-size: 16px; color: #555; }
.tool-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.tool input, .tool select, .tool textarea { background: #fff; border-color: #d8dce4; color: #1d2330; }
.tool .btn { background: #fff; border-color: #d8dce4; color: #1d2330; }
.tool .btn.primary { background: #3b6cf6; color: #fff; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.team { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; }
.team .score { font-size: 26px; font-weight: 800; min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.meter { height: 26px; border-radius: 99px; background: #e6e8ee; overflow: hidden; position: relative; }
.meter > div { height: 100%; width: 0; border-radius: 99px; transition: width .1s, background .3s; }
.meter .lim { position: absolute; top: -3px; bottom: -3px; width: 3px; background: #1d2330; }
.meter-label { font-size: 22px; font-weight: 800; text-align: center; }
.metvol { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.metvol .ico { width: 1.1em; height: 1.1em; }
.metvol input[type=range] { width: 110px; }
.metvol .mv-v { min-width: 3.2em; font-variant-numeric: tabular-nums; font-size: .9em; }
/* dynamics: bold italic serif, like the markings in printed music */
.dyn { font-family: "Times New Roman", Georgia, serif; font-style: italic; font-weight: 900; letter-spacing: .02em; }
.meter-label .dyn { font-size: 44px; line-height: 1; }
.dyn-warn { display: block; font-size: 15px; color: #e63946; }
.dyn-scale { display: grid; grid-template-columns: repeat(6, 1fr); text-align: center; margin-top: -4px; font-family: "Times New Roman", Georgia, serif; font-style: italic; font-weight: 900; font-size: 16px; color: #555c6e; }
.dyn-scale span + span { border-left: 1px solid #d3d7e0; }
.rand-out { font-size: 30px; font-weight: 800; text-align: center; min-height: 44px; padding: 6px; border-radius: 10px; background: #eef2fe; }
.groups { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 13px; max-height: 260px; overflow: auto; }
.groups div { background: #eef2fe; border-radius: 8px; padding: 6px 8px; }
.sig-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sig-grid button { border: none; border-radius: 10px; padding: 10px 6px; font-weight: 700; cursor: pointer; color: #fff; }

/* annotation layer */
.ink { grid-row: 2; grid-column: 1; position: relative; z-index: 20; display: none; }
.ink.on { display: block; }
.ink canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.ink.passive { pointer-events: none; }
.ink.passive canvas { pointer-events: none; }
.ink.passive .ink-bar, .ink.passive .ink-paused-pill, .ink.passive .ink-text { pointer-events: auto; }
.ink-bar { position: absolute; left: 50%; top: .6em; transform: translateX(-50%); z-index: 22; display: flex; gap: 4px; align-items: center; padding: 6px; border-radius: 14px; background: rgba(20,22,28,.85); color: #fff; font-size: 13px; box-shadow: 0 8px 30px rgba(0,0,0,.35); }
.ink-bar button { background: transparent; border: none; color: #fff; padding: 6px 9px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.ink-bar button.on { background: rgba(255,255,255,.22); }
.ink-bar .dot { width: 20px; height: 20px; border-radius: 50%; padding: 0; border: 2px solid transparent; }
.ink-bar .dot.on { border-color: #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.4); }
.ink-text { position: absolute; z-index: 23; background: rgba(255,255,255,.9); border: 2px dashed #3b6cf6; font-weight: 700; padding: 2px 6px; border-radius: 6px; min-width: 120px; }

/* confetti */
.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

/* drive help */
.steps { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.6; }

/* ---------- print ---------- */
@media print {
  html, body { overflow: visible; height: auto; background: #fff; color: #000; }
  #app { display: none !important; }
  #print-area { display: block !important; font-family: Georgia, "Times New Roman", serif; font-size: 12pt; color: #000; }
  #print-area h1 { font-size: 20pt; margin: 0 0 4pt; }
  #print-area h2 { font-size: 14pt; margin: 16pt 0 4pt; border-bottom: 1px solid #999; padding-bottom: 2pt; }
  #print-area .meta { color: #444; font-size: 10pt; margin-bottom: 10pt; }
  #print-area .blk { page-break-inside: avoid; margin-bottom: 8pt; white-space: pre-wrap; }
  #print-area ol, #print-area ul { margin: 4pt 0 4pt 18pt; padding: 0; }
}

/* ---------- free windows on the Present screen ---------- */
.p-wins { grid-row: 2; grid-column: 1; position: relative; z-index: 6; pointer-events: none; margin: .6em 1em 1em; }
.win { --surface: color-mix(in srgb, var(--bg) 86%, var(--text)); position: absolute; pointer-events: auto; display: flex; flex-direction: column; background: var(--surface); border: 2px solid color-mix(in srgb, var(--bg) 60%, var(--text)); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 50px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.25); min-width: 200px; min-height: 140px; }
.win.native { background: transparent; }
.win.native .win-body { background: transparent; }
.win.front { border-color: var(--accent); }
.win-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 12px; min-height: 46px; background: color-mix(in srgb, var(--bg) 82%, #000); color: var(--text); cursor: grab; user-select: none; font-size: 13px; flex: none; }
.win-bar:active { cursor: grabbing; }
.win-bar .wi { font-size: 18px; }
.win-title { flex: 1; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
.win-url { flex: 1; min-width: 60px; background: rgba(255,255,255,.12); border: 1px solid transparent; color: inherit; border-radius: 8px; padding: 7px 10px; font-size: 15px; }
.win-url:focus { background: #fff; color: #1d2330; }
.win-bar button { background: transparent; border: none; color: inherit; cursor: pointer; padding: 6px 10px; min-width: 34px; min-height: 34px; border-radius: 8px; font-size: 17px; white-space: nowrap; }
.win-bar button:hover { background: rgba(255,255,255,.16); }
.win-bar button:disabled { opacity: .35; cursor: default; }
.win-bar .mode { border: 1px solid rgba(255,255,255,.3); font-size: 13px; }
.win-body { position: relative; flex: 1; min-height: 0; background: #fff; }
.win-body iframe, .win-body img, .win-body video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.win-body img { object-fit: contain; background: var(--surface); }
.win-body .warmup { background: var(--surface); color: var(--text); }
.win-body .warmup .q { font-size: 2em; }
.win-start { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #555; padding: 1em; font-size: 15px; background: #f6f7f9; }
.win-rs { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--accent) 50%); opacity: .8; }
.p-wins.dragging iframe { pointer-events: none; }
.win-menu { position: fixed; top: 80px; left: 30%; z-index: 55; background: rgba(250,250,252,.98); color: #1d2330; border-radius: 14px; box-shadow: 0 16px 50px rgba(0,0,0,.4); padding: 8px; width: 340px; max-height: 75vh; overflow: auto; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.win-menu > * { flex-shrink: 0; }
.win-menu .app-sub { color: #6b7385; font-size: 12px; margin-left: 6px; }
.win-menu button { line-height: 1.3; text-align: left; border: none; background: transparent; padding: 8px 10px; border-radius: 8px; cursor: pointer; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-menu button:hover { background: #eef2fe; }
.win-menu .wm-h { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6b7385; padding: 8px 10px 2px; }
.win-menu hr { border: none; border-top: 1px solid #e3e6ec; margin: 4px 0; }
.win-menu .wm-note { font-size: 12px; color: #6b7385; padding: 2px 10px 6px; white-space: normal; }
.win-bar .app-hint { font-size: 11px; opacity: .65; margin-right: 6px; white-space: nowrap; }
.win-bar .mode.editing { background: var(--accent); color: var(--bg); border-color: transparent; font-weight: 700; }

/* ---------- automation timeline ---------- */
.tl-palette { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tl-chip { padding: 5px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; cursor: grab; user-select: none; background: var(--e-soft); border: 1px solid var(--e-line); }
.tl-chip:active { cursor: grabbing; }
.tl-ghost { position: fixed; z-index: 9999; pointer-events: none; transform: translate(-50%, -50%) rotate(-3deg); opacity: .85; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.tl-ghost.ok { opacity: 1; outline: 2px solid var(--e-accent); }
.tl { border: 1px solid var(--e-line); border-radius: 10px; overflow: hidden; user-select: none; }
.tl-ruler, .tl-lane { display: grid; grid-template-columns: 130px 1fr; }
.tl-ruler { height: 34px; border-bottom: 1px solid var(--e-line); background: var(--e-soft); }
.tl-lane { border-bottom: 1px solid var(--e-line); }
.tl-lane:last-child { border-bottom: none; }
.tl-lane-label { font-size: 12px; font-weight: 600; color: var(--e-muted); padding: 8px 10px; border-right: 1px solid var(--e-line); background: var(--e-panel); }
.tl-track { position: relative; margin: 0 14px 0 8px; }
.tl-lane .tl-track { background-image: repeating-linear-gradient(90deg, var(--e-line) 0 1px, transparent 1px var(--tickw, 10%)); cursor: copy; }
.tl-ev.mark.flip { transform: translateX(calc(-100% + 13px)); padding-left: 0; padding-right: 2px; }
.tl-ev.mark.flip::before { left: auto; right: 12px; }
.tl-ev.mark.flip .tl-h { right: auto; left: calc(100% - 4px); }
.tl-tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--e-line); }
.tl-tick span { position: absolute; left: 4px; top: 3px; font-size: 11px; color: var(--e-muted); white-space: nowrap; line-height: 1.15; }
.tl-tick span em { display: block; font-style: normal; opacity: .75; font-size: 10px; }
.tl-tick.end span { left: auto; right: 4px; text-align: right; }
.tl-empty { font-size: 12px; color: var(--e-muted); padding: 8px; }
.tl-ev { position: absolute; height: 26px; border-radius: 7px; font-size: 12px; font-weight: 600; color: #fff; display: flex; align-items: center; cursor: grab; box-shadow: 0 1px 3px rgba(0,0,0,.25); z-index: 1; background: #3b6cf6; }
.tl-ev span { padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.tl-ev.mark { min-width: 0; max-width: 220px; border-radius: 13px; transform: translateX(-13px); padding-left: 2px; }
.tl-ev.mark::before { content: ""; position: absolute; left: 12px; top: -4px; bottom: -4px; width: 2px; background: currentColor; opacity: .5; }
.tl-ev.bar { min-width: 8px; }
.tl-ev.off { opacity: .4; }
.tl-ev.sel { outline: 3px solid var(--e-text); outline-offset: 1px; z-index: 3; }
.tl-ev.dragging { cursor: grabbing; z-index: 5; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.tl-ev.dragging::after { content: attr(data-tip); position: absolute; top: -22px; left: 0; background: #1d2330; color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.tl-h { position: absolute; right: -3px; top: 3px; bottom: 3px; width: 9px; border-radius: 4px; cursor: ew-resize; background: rgba(255,255,255,.55); border: 1px solid rgba(0,0,0,.2); }
.tl-ev.mark .tl-h { right: -10px; }
.tl-ev.k-message { background: #7b2cbf; } .tl-chip.k-message { color: #7b2cbf; }
.tl-ev.k-timer { background: #e76f51; } .tl-chip.k-timer { color: #e76f51; }
.tl-ev.k-sound, .tl-ev.k-musicStart, .tl-ev.k-musicStop { background: #2a9d8f; } .tl-chip.k-sound, .tl-chip.k-musicStart, .tl-chip.k-musicStop { color: #2a9d8f; }
.tl-ev.k-resource, .tl-ev.k-warmup, .tl-ev.k-agenda { background: #3b6cf6; } .tl-chip.k-resource, .tl-chip.k-warmup, .tl-chip.k-agenda { color: #3b6cf6; }
.tl-ev.k-signal, .tl-ev.k-clearSignal { background: #d64545; } .tl-chip.k-signal, .tl-chip.k-clearSignal { color: #d64545; }
.tl-ag { background: color-mix(in srgb, var(--e-accent) 18%, var(--e-panel)); color: var(--e-text); border: 1px solid color-mix(in srgb, var(--e-accent) 45%, transparent); box-shadow: none; border-radius: 6px; cursor: pointer; }
.tl-ag.guess { border-style: dashed; opacity: .75; }
.tl-ag .tl-h { background: var(--e-accent); border: none; opacity: .7; }
.tl-details { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--e-soft); }
.tl-details .fld { min-width: 110px; }
.tl-details .fld.wide { flex: 1; min-width: 200px; }
/* leave room for the camera notch / iPad status bar when covering the screen */
.present { padding-top: max(var(--safe-top, 0px), env(safe-area-inset-top, 0px)); }
.editor { box-sizing: border-box; }
.e-top { padding-top: calc(10px + max(var(--safe-top, 0px), env(safe-area-inset-top, 0px))); }
.snap-menu { position: fixed; z-index: 60; display: grid; grid-template-columns: repeat(4, auto); gap: 4px; padding: 8px; border-radius: 12px; background: rgba(250,250,252,.98); color: #3b6cf6; box-shadow: 0 16px 50px rgba(0,0,0,.4); }
.snap-menu button { border: none; background: transparent; padding: 5px; border-radius: 7px; cursor: pointer; color: inherit; display: grid; place-items: center; }
.snap-menu button:hover { background: #eef2fe; }
.win-bar .zoom-badge { font-size: 11px; font-weight: 700; background: var(--accent); color: var(--bg); border-radius: 99px; padding: 2px 8px; }
.win-bar .zoom-badge[hidden] { display: none; }
.win-body img, .win-body video { transition: transform .05s linear; }
/* bookmarks */
.win-bm { display: flex; gap: 2px; padding: 3px 6px; background: color-mix(in srgb, var(--bg) 72%, #000); overflow-x: auto; flex: none; scrollbar-width: none; }
.win-bm::-webkit-scrollbar { display: none; }
.win-bm .bm { background: transparent; border: none; color: var(--text); font-size: 12px; padding: 3px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; max-width: 170px; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.win-bm .bm:hover { background: rgba(255,255,255,.14); opacity: 1; }
.win-bm .bm-empty { font-size: 11px; color: var(--text); opacity: .6; padding: 3px 6px; white-space: nowrap; }
.bm-menu { position: fixed; z-index: 60; min-width: 220px; max-width: 360px; max-height: 60vh; overflow: auto; display: flex; flex-direction: column; padding: 6px; border-radius: 12px; background: rgba(250,250,252,.98); color: #1d2330; box-shadow: 0 16px 50px rgba(0,0,0,.4); font-size: 13px; }
.bm-menu > * { flex-shrink: 0; }
.bm-menu button { text-align: left; border: none; background: transparent; padding: 6px 10px; border-radius: 7px; cursor: pointer; color: inherit; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bm-menu button:hover { background: #eef2fe; }
.bm-menu .bm-sub { font-size: 11px; font-weight: 700; color: #6b7385; padding: 8px 10px 2px; }
.bm-list { max-height: 360px; overflow: auto; border: 1px solid var(--e-line); border-radius: 8px; padding: 4px 8px; }
.bm-row { display: flex; gap: 8px; align-items: center; padding: 4px 0; border-top: 1px solid var(--e-line); font-size: 13px; }
.bm-row:first-child { border-top: none; }
.bm-row .bm-url { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.p-head .p-dock { justify-self: center; }

/* ---------- sight-reading generator ---------- */
.sr-host { position: absolute; inset: 0; overflow: hidden; background: var(--surface, var(--card)); }
.stage-sr { background: transparent; }
.sr { display: flex; flex-direction: column; height: 100%; max-height: 100%; overflow: hidden; color: var(--text); font-size: 14px; }
.sr-top { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.sr button { border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); border-radius: 9px; padding: 7px 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sr button:hover { background: color-mix(in srgb, var(--text) 16%, transparent); }
.sr button.on { background: var(--accent); color: var(--bg); border-color: transparent; }
.sr .sr-primary { background: var(--accent); color: var(--bg); border-color: transparent; }
.sr-tabs, .sr-presets { display: flex; gap: 3px; padding: 3px; border-radius: 11px; background: color-mix(in srgb, var(--text) 7%, transparent); }
.sr-tabs button, .sr-presets button { border: none; background: transparent; }
.sr-sp { flex: 1; }
.sr-settings { flex: 0 1 auto; max-height: 48%; overflow-y: auto; scrollbar-gutter: stable; padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.sr-form { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.sr-form label, .sr-scard-bd label { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 600; opacity: .94; }
.sr-form select, .sr-form input[type=number], .sr-scard-bd select, .sr-scard-bd input[type=number] { background: rgba(255,255,255,.95); color: #1d2330; border: 1px solid rgba(0,0,0,.15); border-radius: 7px; padding: 4px 6px; font-size: 12.5px; }
.sr-form input[type=number], .sr-scard-bd input[type=number] { width: 56px; }
.sr-scards { display: grid; grid-template-columns: 1.25fr .95fr 1.25fr; gap: 8px; }
.sr-scards.is-two { grid-template-columns: 1fr 1.15fr; }
@container (max-width: 780px) { .sr-scards, .sr-scards.is-two { grid-template-columns: 1fr; } }
.sr-scard { background: color-mix(in srgb, var(--text) 4.5%, transparent); border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); border-radius: 11px; padding: 9px 11px; display: flex; flex-direction: column; gap: 7px; }
.sr-scard-rhy { padding: 7px 11px; }
.sr-scard-hd, .sr-scard-inl { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: color-mix(in srgb, var(--text) 62%, transparent); user-select: none; }
.sr-scard-hd { border-bottom: 1px solid color-mix(in srgb, var(--text) 11%, transparent); padding-bottom: 4px; }
.sr-scard-inl { margin-right: 4px; }
.sr-scard-bd { display: flex; flex-wrap: wrap; gap: 7px 12px; align-items: center; }
.sr-cells { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.srchk { display: inline-flex; gap: 5px; align-items: center; font-size: 12.5px; cursor: pointer; }
.srchk input { accent-color: var(--accent); margin: 0; }
.sr-rhy-pill { padding: 4px 9px; border-radius: 8px; background: color-mix(in srgb, var(--text) 5%, transparent); border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); font-size: 12px; font-weight: 600; transition: background .1s, border-color .1s; }
.sr-rhy-pill:hover { background: color-mix(in srgb, var(--text) 9%, transparent); }
.sr-rhy-pill.on { background: color-mix(in srgb, var(--accent) 16%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.sr-staff { flex: 1 1 0; min-height: 100px; min-width: 0; overflow: auto; scrollbar-gutter: stable; margin: 14px; padding: 12px 8px; background: #ffffff !important; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.sr-staff svg { background: #ffffff; }
.sr-staff svg text { fill: #1d2330; }
.sr-msg { color: #555; padding: 20px; }
/* sight-reading playhead */
.sr-staff { position: relative; }
.sr-ph { position: absolute; width: 4px; margin-left: -2px; border-radius: 3px; background: #e76f51; box-shadow: 0 0 10px rgba(231,111,81,.6); pointer-events: none; display: none; z-index: 2; }
.sr-ph.pulse { animation: srpulse .5s ease-in-out infinite alternate; }
.sr-ph.beat { animation: srbeat .25s ease-out; }
@keyframes srpulse { from { opacity: .35; } to { opacity: 1; } }
@keyframes srbeat { from { width: 10px; margin-left: -5px; } to { width: 4px; margin-left: -2px; } }
/* grading marks: each graded note coloured by its result (before .sr-cur so the playhead still lights notes) */
.sr-staff .gr-n-ok path, .sr-staff .gr-n-ok rect { fill: #1b7a2a !important; stroke: #1b7a2a !important; }
.sr-staff .gr-n-timing path, .sr-staff .gr-n-timing rect { fill: #d9822b !important; stroke: #d9822b !important; }
.sr-staff .gr-n-missed path, .sr-staff .gr-n-missed rect { fill: #c62828 !important; stroke: #c62828 !important; }
.sr-staff .gr-n-pitch path, .sr-staff .gr-n-pitch rect { fill: #7b3fbf !important; stroke: #7b3fbf !important; }
.sr-staff .sr-cur path, .sr-staff .sr-cur rect, .sr-staff .sr-cur text { fill: #e76f51 !important; stroke: #e76f51 !important; }

/* ---------- toolbar: grip, floating, vertical, customize ---------- */
.p-dock .dock-grip { cursor: grab; color: rgba(255,255,255,.55); padding: 0 4px; font-size: 14px; letter-spacing: -2px; user-select: none; flex: none; }
.p-dock .dock-grip:active { cursor: grabbing; }
.p-dock .dock-more { font-size: 18px; }
.p-dock.nolabels button { padding: 7px 8px; }
.p-dock.floating { position: fixed; z-index: 58; max-width: calc(100vw - 8px); }
.p-dock.vertical { flex-direction: column; max-height: calc(100vh - 8px); overflow-y: auto; overflow-x: hidden; }
.p-dock.vertical .sep { width: auto; height: 1px; align-self: stretch; margin: 4px 6px; }
.p-dock.vertical select { max-width: 90px; }
.p-dock.snap-home { outline: 3px dashed var(--accent); outline-offset: 4px; }
body.dock-dragging, body.dock-dragging * { cursor: grabbing !important; user-select: none; }
body.dock-dragging iframe { pointer-events: none; }
.dock-custom { position: fixed; z-index: 60; width: 280px; max-height: 70vh; overflow: auto; background: rgba(250,250,252,.98); color: #1d2330; border-radius: 14px; box-shadow: 0 16px 50px rgba(0,0,0,.4); padding: 10px; font-size: 13px; }
.dock-custom .dc-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 6px; }
.dock-custom button { border: 1px solid #d8dce4; background: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.dock-custom .dc-note { color: #6b7385; font-size: 12px; padding: 0 4px 6px; }
.dc-row { display: flex; align-items: center; gap: 8px; padding: 6px 6px; border-radius: 8px; background: #fff; border: 1px solid #eceef3; margin-bottom: 4px; }
.dc-row.sep { background: #f3f4f7; color: #8a91a3; }
.dc-row.dragging { opacity: .4; }
.dc-row label { display: flex; align-items: center; gap: 6px; flex: 1; cursor: pointer; }
.dc-grip { cursor: grab; color: #9aa1b2; font-size: 16px; }
.dc-opt { display: flex; gap: 6px; align-items: center; padding: 8px 4px; }
.dc-btns { display: flex; gap: 6px; flex-wrap: wrap; }
/* ✕ on class tabs */
.stage-tabs .tabwrap { display: inline-flex; align-items: center; position: relative; }
.stage-tabs .tab-x { opacity: 0; padding: .2em .45em !important; margin-left: -.2em; font-size: .75em !important; border-radius: 6px; transition: opacity .15s; }
.stage-tabs .tabwrap:hover .tab-x { opacity: .75; }
.stage-tabs .tab-x:hover { opacity: 1 !important; background: rgba(230,57,70,.85) !important; color: #fff !important; }

/* ---------- tuner + drone ---------- */
.mu-host { position: absolute; inset: 0; overflow: auto; background: var(--surface, var(--card)); color: var(--text); container-type: size; }
.mu { min-height: 100%; font-size: 14px; }
.mu button { border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); border-radius: 9px; padding: 7px 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.mu button:hover { background: color-mix(in srgb, var(--text) 16%, transparent); }
.mu button.on { background: var(--accent); color: var(--bg); border-color: transparent; }
.mu select, .mu input[type=text], .mu input:not([type]) { background: rgba(255,255,255,.95); color: #1d2330; border: 1px solid rgba(0,0,0,.15); border-radius: 7px; padding: 4px 6px; font-size: 13px; }
.mu-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 8px 0; min-height: 40px; }
.mu-row label { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; }
.mu-chk { font-weight: 500 !important; }
.mu-chk input { accent-color: var(--accent); }
.mu-h { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .7; margin-bottom: 6px; }
.mu.tuner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; align-items: start; }
@container (max-width: 540px) { .mu.tuner { grid-template-columns: 1fr; } .mu.tuner .tu-gauge { width: min(100%, 260px); } .mu.tuner .tu-trace { display: none; } }
.tu-panel, .dr-panel { padding: 12px 16px; }
.dr-panel { border-left: 1px solid var(--line); }
@container (max-width: 640px) { .dr-panel { border-left: none; border-top: 1px solid var(--line); } }
.tu-read { text-align: center; }
.tu-gauge { width: min(100%, 420px); display: block; margin: 4px auto 0; color: var(--text); }
.tu-needle { transition: transform .12s ease-out; transform-origin: 0 0; }
.tu-big { font-size: clamp(56px, 16cqw, 150px); font-weight: 800; line-height: 1; margin-top: -6px; }
.tu-big sub { font-size: .3em; opacity: .6; margin-left: 2px; }
.tu-cents { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 4px; }
.tu-hint { font-size: 18px; font-weight: 700; min-height: 1.2em; }
.tu-hz { font-size: 12px; opacity: .6; margin-top: 4px; }
.tu-read[data-state="ok"] .tu-big, .tu-read[data-state="ok"] .tu-hint { color: #2ecc71; }
.tu-read[data-state="near"] .tu-hint { color: #f4a261; }
.tu-read[data-state="off"] .tu-hint { color: #ff6b6b; }
.tu-read.idle .tu-big, .tu-read.idle .tu-cents, .tu-read.idle .tu-hint { opacity: .35; }
.dr-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.dr-quick button { min-width: 48px; font-size: 16px; }
.dr-play { width: 100%; margin-top: 10px; padding: 12px !important; font-size: 16px !important; }

/* ---------- metronome ---------- */
.mu.metro { display: flex; flex-direction: column; height: 100%; }
.me-panel { display: flex; flex-direction: column; height: 100%; }
.me-display { height: 230px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; }
.me-big { font-size: clamp(64px, 13vw, 120px); font-weight: 900; line-height: 1; width: 7ch; height: 1em; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text); }
.me-big.idle { opacity: .55; }
.me-big.idle::after { content: " BPM"; font-size: .25em; font-weight: 700; }
.me-big.down { color: var(--accent); }
.me-big.hit { animation: mehit .18s ease-out; }
@keyframes mehit { from { transform: scale(1.12); } to { transform: scale(1); } }
.me-dots { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: center; height: 2em; align-items: center; }
.me-dot { width: 1.9em; height: 1.9em; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--text) 12%, transparent); transition: background .08s, transform .08s; }
.me-dot.acc { box-shadow: inset 0 0 0 2px var(--accent); }
.me-dot { cursor: pointer; user-select: none; }
.me-dot.silent { opacity: .35; text-decoration: line-through; }
.me-dot.on { background: var(--accent); color: var(--bg); transform: scale(1.15); }
.me-sub { display: flex; gap: 8px; height: 10px; }
.me-sub i { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--text) 18%, transparent); }
.me-sub i.on { background: var(--text); }
.me-controls { padding: 10px 14px 14px; border-top: 1px solid var(--line); }
.me-tempo { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.me-bpm { font-size: 15px; padding: 0 6px; width: 120px; text-align: center; }
.me-bpm b { font-size: 24px; }
.me-tap { margin-left: auto; }
.me-slider { width: 100%; margin: 8px 0 2px; accent-color: var(--accent); }
.me-subs { display: flex; gap: 4px; }
.me-subs button { padding: 5px 8px; font-size: 12px; }
.me-controls input[type=number] { width: 4.5em; }
.me-controls input[data-mu="rampTo"] { width: 5em; }

/* ---------- edit in place ---------- */
.present.editing [contenteditable="true"] { outline: 2px dashed color-mix(in srgb, var(--accent) 70%, transparent); outline-offset: 3px; border-radius: 6px; cursor: text; min-width: 1.5em; }
.present.editing [contenteditable="true"]:focus { outline-style: solid; background: color-mix(in srgb, var(--text) 8%, transparent); }
.present.editing [contenteditable="true"]:empty::before { content: attr(data-ph); opacity: .45; }
.present .ie-sub:empty { display: inline-block; min-width: 9em; }
.ie-times { display: inline-flex; gap: 4px; align-items: center; font-size: .9em; }
.ie-times input, .ie-ev input, .ie-ev select, .ag-min { background: rgba(255,255,255,.92); color: #1d2330; border: none; border-radius: 6px; padding: 2px 4px; font-size: .85em; }
.ie-card h4 { text-transform: none !important; letter-spacing: 0 !important; font-size: .95em !important; opacity: 1 !important; }
.ie-done { margin-left: auto; background: var(--accent); color: var(--bg); border: none; border-radius: 7px; padding: .2em .8em; font-weight: 700; cursor: pointer; }
.ie-btns { display: flex; flex-wrap: wrap; gap: .4em; }
.ie-btns button, .ie-add, .ie-ev button { background: color-mix(in srgb, var(--text) 12%, transparent); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: .35em .7em; cursor: pointer; font-size: .85em; font-weight: 600; }
.ie-tip { font-size: .8em; opacity: .7; margin-top: .5em; }
.agenda.editing li { gap: .4em; }
.agenda.editing .ag-text { flex: 1; }
.ag-grip { cursor: grab; opacity: .55; padding: 0 .2em; user-select: none; }
.agenda.editing .n { cursor: pointer; }
.ag-min { width: 3.4em; }
.ag-x { background: transparent; border: none; color: inherit; opacity: .55; cursor: pointer; padding: .1em .3em; border-radius: 5px; }
.ag-x:hover { opacity: 1; background: rgba(230,57,70,.8); color: #fff; }
.agenda li.dragging { opacity: .4; }
.agenda li.drop-before { box-shadow: 0 -3px 0 var(--accent); }
.ie-add { width: 100%; margin-top: .5em; }
.ie-ev { display: flex; gap: .3em; margin-top: .6em; flex-wrap: wrap; }
.ie-ev input[data-ie-evtext] { flex: 1; min-width: 7em; }
.ev-list .ag-x { margin-left: auto; }
.ie-notes { width: 100%; background: rgba(255,255,255,.92); color: #1d2330; border: none; border-radius: 8px; padding: .5em; font: inherit; font-size: .85em; resize: vertical; }
.stage-tabs .tabwrap[draggable="true"] { cursor: grab; }
.stage-tabs .tabwrap.dragging { opacity: .4; }
.look-panel { position: fixed; z-index: 62; top: 90px; left: 50%; transform: translateX(-50%); width: min(520px, 92vw); background: rgba(250,250,252,.98); color: #1d2330; border-radius: 14px; box-shadow: 0 16px 50px rgba(0,0,0,.4); padding: 12px; font-size: 13px; display: flex; flex-direction: column; gap: 10px; }
.look-panel button { border: 1px solid #d8dce4; background: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 12px; }
.lp-themes { display: flex; flex-wrap: wrap; gap: 6px; }
.look-panel .lp-theme { border: 2px solid transparent; font-weight: 700; }
.look-panel .lp-theme.on { border-color: #3b6cf6; }
.lp-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.lp-row label { display: flex; gap: 6px; align-items: center; }
.lp-row input[type=color] { width: 40px; height: 28px; border: 1px solid #d8dce4; border-radius: 6px; padding: 1px; }
.lp-dim { display: flex; gap: 8px; align-items: center; font-weight: 600; }
.lp-dim input { flex: 1; }
.auto-drawer { position: fixed; z-index: 61; top: 0; right: 0; bottom: 0; width: min(860px, 96vw); overflow: auto; background: var(--e-bg); color: var(--e-text); box-shadow: -20px 0 60px rgba(0,0,0,.45); padding: 14px; padding-top: calc(14px + var(--safe-top, 0px)); font-size: 14px; }
.auto-drawer .ad-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 16px; }

/* ---------- zoom + maximized stage ---------- */
.stage-content { overflow: hidden; }
.stage-tabs .zoom-badge { font-size: .75em; font-weight: 700; background: var(--accent) !important; color: var(--bg) !important; border-radius: 99px !important; opacity: 1 !important; }
.stage-tabs .zoom-badge[hidden] { display: none; }
.present.stage-max .p-title, .present.stage-max .p-clock, .present.stage-max .p-progress { display: none; }
.present.stage-max .p-head { padding: 6px 10px 0; grid-template-columns: 1fr auto 1fr; }
.present.stage-max .p-head .p-dock { grid-column: 2; }
.present.stage-max .p-body { grid-template-columns: 0 0 minmax(0, 1fr) !important; padding: 6px 8px 8px !important; }
.present.stage-max .p-side, .present.stage-max .p-split { visibility: hidden; }
.present.stage-max .p-wins { margin: 6px 8px 8px; }
.present.stage-max .p-stage { border-radius: 10px; }

/* ---------- PDF viewer ---------- */
.pdf-host { position: absolute; inset: 0; background: #3c3f44; overflow: hidden; }
.pdfv, .pdfv-view { position: absolute; inset: 0; }
.pdfv-view { overflow: auto; -webkit-overflow-scrolling: touch; }
.pdfv-pages { min-height: 100%; min-width: 100%; width: max-content; display: flex; align-items: center; justify-content: center; padding: 8px; box-sizing: border-box; }
.pdfv-pages.scroll { flex-direction: column; justify-content: flex-start; gap: 12px; }
.pdfv-page { background: #fff; display: block; }
.pdfv-pw { position: relative; flex: none; box-shadow: 0 4px 18px rgba(0,0,0,.4); background: #fff; }
.pdfv-ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.pdfv-ink .hl { opacity: .38; mix-blend-mode: multiply; }
.pdfv.annot .pdfv-ink { pointer-events: auto; cursor: crosshair; touch-action: none; }
.pdfv-abar { position: absolute; z-index: 3; top: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; align-items: center; padding: 4px; border-radius: 12px; background: rgba(20,22,28,.92); color: #fff; font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.35); white-space: nowrap; max-width: calc(100% - 16px); overflow-x: auto; }
.pdfv-abar[hidden] { display: none; }
.pdfv-abar button { background: transparent; border: none; color: #fff; padding: 6px 9px; border-radius: 8px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.pdfv-abar button:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.pdfv-abar button.on { background: var(--accent, #e76f51); }
.pdfv-abar button:disabled { opacity: .35; cursor: default; }
.pdfv-abar .ico { width: 17px; height: 17px; }
.pdfv-abar .sw { width: 22px; height: 22px; padding: 0; border-radius: 50%; background: var(--c); margin: 0 2px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.pdfv-abar .sw.on { background: var(--c); box-shadow: 0 0 0 2px #fff; }
.pdfv-abar .sz { width: 28px; justify-content: center; }
.pdfv-abar .sz i { display: block; border-radius: 50%; background: #fff; }
.pdfv-bar [data-pdf="annot"].on { background: var(--accent, #e76f51); color: #fff; }
.pdfv-bar .ico { width: 16px; height: 16px; vertical-align: -3px; }
.pdfv-bar { position: absolute; z-index: 3; bottom: 10px; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; align-items: center; padding: 4px; border-radius: 12px; background: rgba(20,22,28,.85); color: #fff; font-size: 13px; opacity: .45; transition: opacity .2s; box-shadow: 0 6px 20px rgba(0,0,0,.35); white-space: nowrap; }
.pdf-host:hover .pdfv-bar { opacity: 1; }
.pdfv-bar button { background: transparent; border: none; color: #fff; padding: 6px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.pdfv-bar button:hover { background: rgba(255,255,255,.16); }
.pdfv-num { padding: 0 6px; font-variant-numeric: tabular-nums; }
.pdfv-sep { width: 1px; align-self: stretch; background: rgba(255,255,255,.25); margin: 4px; }

/* movable annotation toolbar */
.ink-bar .ink-grip { cursor: grab; color: rgba(255,255,255,.55); padding: 0 4px; letter-spacing: -2px; user-select: none; }
.ink-bar.floating { position: fixed; transform: none; z-index: 60; max-width: calc(100vw - 8px); flex-wrap: wrap; }
.ink-bar.vertical { flex-direction: column; max-height: calc(100vh - 8px); overflow-y: auto; flex-wrap: nowrap; }
.ink-bar.snap-home { outline: 3px dashed var(--accent); outline-offset: 4px; }
/* panels get a soft blur behind them so text stays readable on photos */
/* panel blur only when chosen, and never while a real browser/app view shows through the page
   (a blurred panel is drawn on its own layer, which would show on top of that view) */
.panel-blur:not(.has-native) .p-card, .panel-blur:not(.has-native) .p-stage { backdrop-filter: blur(var(--panel-blur)); -webkit-backdrop-filter: blur(var(--panel-blur)); }
/* big −/+ steppers instead of tiny spinner arrows */
.sr-step { display: inline-flex; align-items: stretch; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.sr .sr-step button { border: none; border-radius: 0; min-width: 40px; min-height: 36px; padding: 0 10px; font-size: 20px; line-height: 1; user-select: none; -webkit-user-select: none; }
.sr-step input[type=number] { width: 52px !important; text-align: center; font-size: 16px !important; font-weight: 700; border: none !important; border-radius: 0 !important; -moz-appearance: textfield; }
.sr-step input::-webkit-inner-spin-button, .sr-step input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sr button, .mu button, .pdfv-bar button, .p-dock button { -webkit-user-select: none; user-select: none; }
/* smoother playhead: soft glowing line that fades at the ends, glides onto notes, rings each note */
.sr-ph { width: 4px; margin-left: -2px; border-radius: 4px; background: linear-gradient(to bottom, rgba(231,111,81,0), #e76f51 18%, #e76f51 82%, rgba(231,111,81,0)); box-shadow: 0 0 12px rgba(231,111,81,.55); }
.sr-ph.glide { transition: left .11s cubic-bezier(.2,.8,.2,1); }
.sr-ring { position: absolute; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; border: 3px solid #e76f51; pointer-events: none; z-index: 2; animation: srring .55s ease-out forwards; }
@keyframes srring { from { transform: scale(.5); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
/* big count-in number over the music */
.sr-count { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(80px, 22vmin, 260px); font-weight: 900; color: rgba(29,35,48,.82); pointer-events: none; z-index: 3; text-shadow: 0 0 30px #fff, 0 0 60px #fff; }
.sr-count.one { color: #e76f51; }
.sr-count.hit { animation: srcount .3s ease-out; }
@keyframes srcount { from { transform: scale(1.25); opacity: .4; } to { transform: scale(1); opacity: 1; } }
.sr-count { align-content: center; }
.sr-count .sr-count-n { line-height: 1; }
.sr-count .sr-count-cue { font-size: clamp(18px, 3.2vmin, 34px); font-weight: 700; color: #1d2330; margin-top: .3em; text-shadow: 0 0 14px #fff, 0 0 24px #fff; }
.sr-count .sr-count-cue b { color: #e76f51; }
/* count-in: steady (no pulse), tucked into the bottom-right corner so it doesn't cover the music */
.sr-count { inset: auto 14px 12px auto; display: block; text-align: right; padding: 6px 16px 8px; border-radius: 14px; background: rgba(255,255,255,.92); box-shadow: 0 6px 22px rgba(0,0,0,.18); font-size: clamp(44px, 8vmin, 100px); text-shadow: none; }
.sr-count.hit { animation: none; }
.sr-count .sr-count-cue { font-size: clamp(13px, 1.8vmin, 20px); margin-top: 0; text-shadow: none; white-space: nowrap; }
/* annotation: brush preview, and the toolbar never runs off the screen */
.ink-cursor { position: absolute; z-index: 21; pointer-events: none; transform: translate(-50%, -50%); border-radius: 50%; background: var(--c); opacity: .9; box-shadow: 0 0 0 1.5px rgba(255,255,255,.9), 0 0 0 3px rgba(0,0,0,.35); display: grid; place-items: center; color: var(--c); font-weight: 800; line-height: 1; }
.ink-cursor.t-hl { opacity: .35; border-radius: 3px; }
.ink-cursor.t-erase { background: rgba(255,255,255,.35); box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px rgba(0,0,0,.6); }
.ink-cursor.t-line, .ink-cursor.t-arrow, .ink-cursor.t-rect, .ink-cursor.t-circle, .ink-cursor.t-text { background: transparent; box-shadow: none; width: auto !important; height: auto !important; font-size: 26px !important; text-shadow: 0 0 3px #fff, 0 0 6px #fff; }
.ink-cursor[hidden] { display: none; }
.ink-bar { max-width: calc(100% - 16px); flex-wrap: wrap; justify-content: center; }
.ink-bar.floating { max-width: calc(100vw - 16px); }
/* split playhead: a piece above and a piece below the note, never over it */
.sr-ph { background: none !important; box-shadow: none !important; width: 4px; }
.sr-ph .seg { position: absolute; left: 0; width: 100%; border-radius: 4px; box-shadow: 0 0 10px rgba(231,111,81,.55); }
.sr-ph .seg.top { top: 0; background: linear-gradient(to bottom, rgba(231,111,81,0), #e76f51 45%); }
.sr-ph .seg.bot { background: linear-gradient(to bottom, #e76f51 55%, rgba(231,111,81,0)); }
.sr-ph.glide .seg { transition: height .11s ease-out, top .11s ease-out; }
.sr-ph.beat .seg { animation: srsegbeat .25s ease-out; }
@keyframes srsegbeat { from { box-shadow: 0 0 18px 4px rgba(231,111,81,.8); } to { box-shadow: 0 0 10px rgba(231,111,81,.55); } }
.sr-ph.beat { animation: none !important; }
.ink canvas.ink-preview { pointer-events: none; }
.ink-cursor { will-change: transform; }

/* two pages side by side */
.pdfv-pages.two { gap: 12px; }
.pdfv-pages.scroll.two { flex-direction: row; flex-wrap: wrap; justify-content: center; align-content: flex-start; }
.pdfv-bar [data-pdf="two"].on { background: var(--accent, #e76f51); color: #fff; }

/* pinned tab shown as a full browser: the real web view sits underneath */
.stage-native { position: absolute; inset: 0; background: transparent; }

/* copy / paste between classes */
.clip-panel { max-height: calc(100vh - 120px); overflow: auto; z-index: 70; }
.clip-panel .cp-h { font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: #6a7080; margin-top: 4px; }
.clip-panel .cp-list { display: flex; flex-direction: column; gap: 2px; max-height: 40vh; overflow: auto; }
.clip-panel .cp-item { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.clip-panel .cp-item:hover { background: #eef0f5; }
.clip-panel .cp-item input { width: 16px; height: 16px; }
.clip-panel .cp-modes { display: flex; flex-direction: column; gap: 6px; }
.clip-panel .cp-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 8px; background: #f3f4f8; border-radius: 8px; font-size: 13px; }
.clip-panel .cp-mode > span { flex-basis: 100%; }
.clip-panel .cp-mode label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.clip-panel .muted { color: #8a90a0; }
.clip-panel .cp-go { background: var(--accent, #e76f51) !important; color: #fff !important; border-color: transparent !important; font-weight: 700; }
.clip-panel .lp-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.clip-panel .grow { flex: 1; }

/* ---------- score practice (MusicXML / MuseScore) */
.score-host { position: absolute; inset: 0; }
.sp-root { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; color: #1d2330; font-size: 13px; }
.sp-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 8px; background: #f3f4f8; border-bottom: 1px solid #dde0e8; }
.sp-top button { border: 1px solid #d3d7e0; background: #fff; border-radius: 8px; padding: 6px 11px; font-size: 13px; cursor: pointer; color: #1d2330; }
.sp-top button.on { background: #ffe1d6; border-color: #e76f51; }
.sp-top .sp-primary { background: #e76f51; color: #fff; border-color: transparent; font-weight: 700; min-width: 78px; }
.sp-range input { width: 52px; padding: 5px; border: 1px solid #d3d7e0; border-radius: 6px; font-size: 13px; }
.sp-tempo { display: inline-flex; align-items: center; gap: 6px; }
.sp-tempo input { width: 120px; }
.sp-bpm { font-weight: 600; font-size: 12px; min-width: 90px; }
.sp-sp { flex: 1; }
.sp-settings { padding: 8px 10px; background: #fafbfd; border-bottom: 1px solid #e3e6ee; display: flex; flex-direction: column; gap: 8px; max-height: 45%; overflow: auto; }
.sp-form { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.sp-form input[type=number] { width: 50px; padding: 3px; }
.sp-parts { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.sp-part { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e0e3ea; border-radius: 8px; padding: 4px 8px; }
.sp-part input[type=range] { width: 80px; }
.sp-note { font-size: 11px; color: #707688; }
.sp-hint { font-size: 12px; color: #5a6072; padding: 3px 10px; min-height: 18px; }
.sp-score { position: relative; flex: 1; overflow: auto; cursor: pointer; }
.sp-osmd { position: relative; }
.sp-ov { position: absolute; left: 0; top: 0; right: 0; height: 0; pointer-events: none; }
.sp-sel i { position: absolute; background: rgba(231,111,81,.09); border: 1.5px solid rgba(231,111,81,.55); border-left-width: 0; border-right-width: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.sp-sel i.start { border-left-width: 3px; border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.sp-sel i.end { border-right-width: 1.5px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.sp-sel i b { position: absolute; left: 6px; top: -11px; font: 700 11px/1 -apple-system, system-ui, sans-serif; color: #fff; background: #e76f51; padding: 3px 7px; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.18); white-space: nowrap; }
.sp-ph { position: absolute; left: 0; top: 0; width: 3px; margin-left: -1px; border-radius: 3px; background: #e76f51; box-shadow: 0 0 10px rgba(231,111,81,.6); will-change: transform; }

.sp-choir { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 6px 8px; background: #f7f4fb; border-bottom: 1px solid #e3e0ec; }
.sp-choir button { border: 1px solid #d6d1e2; background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; color: #1d2330; }
.sp-choir button.on { background: #e76f51; color: #fff; border-color: transparent; font-weight: 700; }
.sp-choir select { padding: 5px; border-radius: 6px; border: 1px solid #d6d1e2; font-size: 13px; }
.sp-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #7a7290; margin: 0 2px 0 8px; }
.sp-lbl:first-child { margin-left: 0; }

.ev-where { font-size: .75em; opacity: .55; }
details.ev-cls summary { cursor: pointer; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
details.ev-cls label { display: flex; gap: 6px; align-items: center; font-size: 13px; padding: 2px 0; }
.agenda .ag-live { outline: 2px solid var(--accent, #e76f51); outline-offset: 2px; border-radius: 4px; padding: 0 3px; background: rgba(255,255,255,.12); cursor: text; }

/* score: coloured parts, rehearsal spots */
.sp-osmd.sp-colored [data-line] path, .sp-osmd.sp-colored [data-line] rect { fill: var(--c, currentColor); stroke: var(--c, currentColor); }
.sp-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.sp-choir button.on .sp-dot { box-shadow: 0 0 0 2px #fff; }
.sp-colt { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 13px; }
.sp-spots { padding: 6px 8px; background: #fbf7ef; border-bottom: 1px solid #ece3cf; max-height: 38%; overflow: auto; }
.sp-spots-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.sp-spots button { border: 1px solid #d8d0bd; background: #fff; border-radius: 7px; padding: 5px 9px; font-size: 13px; cursor: pointer; color: #1d2330; }
.sp-spots .sp-primary { background: #e76f51; color: #fff; border-color: transparent; font-weight: 700; }
.sp-spot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.sp-spot-list li { display: flex; align-items: center; gap: 5px; padding: 2px 4px; border-radius: 8px; }
.sp-spot-list li.cur { background: #ffe1d6; }
.sp-spot-list li.done .sp-spot-name { text-decoration: line-through; opacity: .6; }
.sp-spots .sp-spot-name { flex: 1; text-align: left; border-color: transparent; background: transparent; font-weight: 600; }
.sp-spots .sp-tick { width: 28px; color: #1a9a5a; font-weight: 800; }
.sp-lbls span { position: absolute; transform: translateX(-50%); font-weight: 700; font-family: -apple-system, system-ui, sans-serif; white-space: nowrap; pointer-events: none; line-height: 1; }
.sp-sync { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.sp-sync input { width: 180px; }
.sp-sel.off i { background: rgba(31,111,209,.07); border-color: rgba(31,111,209,.45); }
.sp-sel.off i b { background: #1f6fd1; }
.sp-score { user-select: none; -webkit-user-select: none; }
.sp-root [data-ctl][hidden] { display: none !important; }
.sp-choir.sp-empty { display: none; }
.sp-grp { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.sp-custom { padding: 8px 10px; background: #f1f6fd; border-bottom: 1px solid #d8e3f2; }
.sp-custom button { border: 1px solid #cdd7e6; background: #fff; border-radius: 7px; padding: 5px 10px; font-size: 13px; cursor: pointer; color: #1d2330; }
.sp-custom .sp-primary { background: #e76f51; color: #fff; border-color: transparent; font-weight: 700; }
.sp-cust-cols { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 6px 0; }
.sp-cust-cols > div { display: flex; flex-direction: column; gap: 3px; }
.sp-cust-cols .sp-lbl { margin: 0 0 2px; }

/* score player: compact controls so the music gets the room */
.sp-top { padding: 3px 6px; gap: 4px; }
.sp-top button, .sp-top select { padding: 3px 8px; font-size: 12px; border-radius: 7px; }
.sp-top .sp-primary { min-width: 64px; }
.sp-range input { width: 44px; padding: 3px; font-size: 12px; }
.sp-tempo input { width: 90px; }
.sp-bpm { min-width: 0; font-size: 11px; }
.sp-file { max-width: 170px; }
.sp-choir { padding: 3px 6px; gap: 4px; }
.sp-choir button, .sp-choir select { padding: 3px 8px; font-size: 12px; }
.sp-lbl { font-size: 10px; margin-left: 6px; }
.sp-settings { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 3px 8px; gap: 4px 12px; font-size: 12px; max-height: 30%; }
.sp-form { gap: 4px 10px; }
.sp-parts { gap: 4px 8px; }
.sp-part { padding: 1px 6px; }
.sp-part input[type=range] { width: 60px; }
.sp-sync { font-size: 12px; gap: 4px; }
.sp-sync input { width: 110px; }
.sp-sync .sp-note { display: none; }
.sp-spots, .sp-custom { padding: 3px 8px; }
.sp-spots button { padding: 2px 8px; font-size: 12px; }
.sp-spot-list li { padding: 0 4px; }
.sp-spots-head { margin-bottom: 2px; }
.sp-hint:empty { display: none; }
.sp-lbls span { transform: translateX(-50%); }

.rename-inline { position: fixed; z-index: 200; font: 600 14px -apple-system, system-ui, sans-serif; padding: 2px 8px; border: 2px solid var(--accent, #e76f51); border-radius: 8px; background: #fff; color: #1d2330; box-shadow: 0 6px 20px rgba(0,0,0,.3); outline: none; }
.win-bar .win-title, .stage-tabs [data-action="stage"] { cursor: default; }
.icons-panel { width: min(860px, 94vw); max-height: calc(100vh - 120px); overflow: auto; z-index: 70; }
.icons-panel .ic-sw { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; }
.icons-panel .ic-sw label { display: inline-flex; gap: 5px; align-items: center; }
.icons-panel .ic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 18px; }
.icons-panel h5 { margin: 4px 0; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #6a7080; }
.icons-panel .ic-grid label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 2px 0; }
.icons-panel .ic-in { width: 44px; text-align: center; font-size: 18px; padding: 2px; border: 1px solid #d3d7e0; border-radius: 7px; }
.icons-panel .ic-in::placeholder { opacity: .45; }

/* toolbar look options */
.p-dock { background: rgba(20,22,28,var(--dock-a,.82)); }
.p-dock.dock-light { background: rgba(250,250,252,var(--dock-a,.82)); color: #1d2330; }
.p-dock.dock-light button, .p-dock.dock-light select { color: #1d2330; }
.p-dock.dock-light button:hover, .p-dock.dock-light button.on { background: rgba(0,0,0,.08); }
.p-dock.dock-light .sep { background: rgba(0,0,0,.15); }
.p-dock.dock-light .dock-grip { color: rgba(0,0,0,.4); }
.p-dock.dock-light select { background: rgba(0,0,0,.06); }
.p-dock.dock-class { background: color-mix(in srgb, var(--accent, #e76f51) calc(var(--dock-a,.82) * 100%), transparent); }
.p-dock.dock-sm button { padding: 3px 5px; font-size: 10px; }
.p-dock.dock-sm button .i { font-size: 14px; }
.p-dock.dock-lg button { padding: 8px 11px; font-size: 13px; }
.p-dock.dock-lg button .i { font-size: 26px; }
.p-dock.dock-lg select { font-size: 14px; max-width: 190px; }
.dock-custom .dc-row { display: flex; align-items: center; gap: 6px; }
.dock-custom .dc-row label { flex: 1; }
.dock-custom .dc-emoji { width: 38px; text-align: center; font-size: 16px; padding: 1px; border: 1px solid #d3d7e0; border-radius: 7px; }
.dock-custom .dc-emoji::placeholder { opacity: .5; }
.dock-custom .dc-look { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; font-size: 12px; margin-top: 6px; }
.dock-custom .dc-look label { display: flex; align-items: center; gap: 6px; }
.dock-custom .dc-look input[type=range] { width: 90px; }
.dock-custom .dc-spots { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 12px; margin-top: 6px; }

/* tab folders */
.stage-tabs .tabgroup button .tg-cur { opacity: .75; font-weight: 500; }
.stage-tabs .tabgroup button .tg-caret { font-size: .8em; opacity: .7; }
.stage-tabs .tabwrap.drop-in > button { outline: 2px dashed var(--accent, #e76f51); outline-offset: 2px; }
.group-menu { position: fixed; z-index: 66; min-width: 220px; max-width: 360px; background: rgba(250,250,252,.98); color: #1d2330; border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.35); padding: 6px; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.group-menu .gm-row { display: flex; align-items: center; border-radius: 8px; }
.group-menu .gm-row.on { background: #ffe1d6; }
.group-menu .gm-row:hover { background: #eef0f5; }
.group-menu .gm-open { flex: 1; text-align: left; background: none; border: none; padding: 8px 10px; font-size: 14px; cursor: pointer; color: inherit; }
.group-menu .gm-x { background: none; border: none; cursor: pointer; padding: 6px 9px; opacity: .55; font-size: 14px; }
.group-menu .gm-x:hover { opacity: 1; }
.group-menu hr { border: none; border-top: 1px solid #e3e6ee; margin: 4px 2px; }
.group-menu .gm-act { text-align: left; background: none; border: none; padding: 6px 10px; cursor: pointer; font-size: 13px; color: #4a5060; border-radius: 8px; }
.group-menu .gm-act:hover { background: #eef0f5; }
.backup-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 320px; overflow: auto; }
.backup-row { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 8px; background: rgba(0,0,0,.03); }
.backup-row span:first-child { flex: 1; }
/* sight reading: the measure playback starts from */
.sr-staff { position: relative; }
.sr-staff svg { cursor: pointer; }
.sr-from { position: absolute; pointer-events: none; width: 0; background: transparent; border: 0; border-left: 3px solid #1f6fd1; border-radius: 0; }
.sr-from b { position: absolute; left: -3px; bottom: calc(100% + 4px); font: 700 11px/1 -apple-system, system-ui, sans-serif; color: #fff; background: #1f6fd1; padding: 3px 7px; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.18); }

/* sight reading: ✏️ Build */
.sr-build { flex: 0 0 auto; margin: 6px 14px 0; padding: 8px 10px; background: #ffffff; border: 1px solid color-mix(in srgb, var(--text) 12%, transparent); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; color: #1d2330; }
.sr-build .sb-row { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.sr-build .sb-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #6a7080; min-width: 64px; }
.sr-build button { border: 1px solid #d3d7e0; background: #ffffff; border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: pointer; color: #1d2330; }
.sr-build button:hover:not(:disabled) { background: #eef4ff; border-color: #2563eb; }
.sr-build button.on { background: #2563eb; color: #fff; border-color: transparent; font-weight: 700; }
.sr-build button:disabled { opacity: .4; cursor: default; }
.sr-build .sb-syl button { min-width: 44px; font-weight: 700; }
.sr-build .sb-syl button.do { background: #eef4ff; border-color: #2563eb; }
.sr-build .sb-pat button { font-size: 12px; background: #f4f1fb; border-color: #dcd4ee; }
.sr-build .sb-hint { font-size: 12px; color: #6a7080; }
.sr-staff .sr-sel path, .sr-staff .sr-sel rect { fill: #1f6fd1 !important; stroke: #1f6fd1 !important; }
.sr-build .sb-left { font-size: 12px; font-weight: 700; color: #1a9a5a; margin-left: 6px; }
.sr-build button.sb-note { padding: 2px 6px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; }
.sr-icon { height: 40px; width: auto; display: block; pointer-events: none; }
.sr-build button.sb-note:disabled .sr-icon { opacity: .5; }
.sr-cellchk { display: inline-flex; align-items: center; gap: 4px; }
.sr-cellchk .sr-icon { height: 30px; }
.sr-cellchk span { font-size: 11px; color: #6a7080; }
.sr-build .sb-pairs { display: flex; flex-wrap: wrap; gap: 5px; }
.sr-build .sb-pair { display: flex; flex-direction: column; gap: 4px; }
.sr-build .sb-pair button.sb-note { min-width: 52px; }
.sr-build button.sb-note.is-rest { background: #f8fafd; }
.sr-build .sb-lbl { line-height: 1.2; }
.sr-build button.sb-note.current { outline: 2.5px solid #2563eb; outline-offset: 1px; background: #eef4ff; }
/* toggle buttons keep one width whatever they say */
.sr-tog { display: inline-grid; }
.sr-tog > span { grid-area: 1 / 1; text-align: center; white-space: nowrap; }
.sr-tog > span.h { visibility: hidden; }
.sr [data-sr="play"] { min-width: 5.6em; }
.sr-top button:disabled { opacity: .38; cursor: default; }
/* arrangeable sight-reading bar */
.sr-top .sr-bi { display: inline-flex; }
.sr-top [data-bar] { cursor: grab; }
.sr-top .sr-sp[data-bar="gap"] { min-width: 14px; align-self: stretch; border-radius: 6px; }
.sr-top .sr-sp[data-bar="gap"]:hover { background: rgba(255,255,255,.12); }
.sr-top .dragging { opacity: .4; }
.sr-top .drop-at { outline: 2px dashed #e76f51; outline-offset: 2px; border-radius: 8px; }
.sr-barnote { font-size: 12px; opacity: .75; margin-top: 4px; }
.sr-barnote button { font-size: 12px; padding: 2px 8px; }
/* the bar as a snapping grid */
.sr-top.sr-grid { display: grid !important; grid-template-columns: repeat(24, minmax(0, 1fr)); grid-auto-rows: auto; gap: 6px 0; align-items: center; }
.sr-top.sr-grid > [data-bar] { justify-self: start; min-width: max-content; }
.sr-top [data-bar] { cursor: grab; touch-action: none; }
.sr-top [data-bar].dragging { position: relative; z-index: 5; opacity: .85; cursor: grabbing; }
.sr-top.show-grid { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 1px, transparent 1px calc(100% / 24)); border-radius: 10px; }
/* free placement */
.sr-top.sr-free { display: block !important; position: relative; }
.sr-top.sr-free > [data-bar] { position: absolute; }
.sr-top.sr-free > .sr-sp { display: none; }
.sr-top.show-grid { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 1px, transparent 1px 8px); }
.sr-build .sb-lbl2 { margin-left: 14px; }
.sr-build .sr-icon { height: 32px; }
.sr-build button.sb-note { min-width: 38px; padding: 1px 4px; }
.sr-build .sb-row { gap: 4px; }
.sr-barreset { font-size: 12px; padding: 3px 8px; margin-left: auto; }
.sr-form { gap: 6px 10px !important; }
.sr-top.sr-free > [data-bar] { width: max-content; white-space: nowrap; }

/* grading report: a small closable card in the corner, details hidden until opened */
.gr-card { position: fixed; right: 16px; bottom: 16px; z-index: 9000; width: min(380px, calc(100vw - 32px)); max-height: 60vh; overflow: auto;
  background: #ffffff; color: #1d2330; border: 1px solid #d3d9e6; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.22); padding: 12px 14px 12px; font-size: 14px; line-height: 1.4; }
.gr-card .gr-x { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 16px; cursor: pointer; color: #555; }
.gr-card .gr-head { padding-right: 22px; }
.gr-card .gr-head b { font-size: 16px; }
.gr-card .gr-sub { display: block; color: #555; font-size: 12.5px; margin-top: 4px; }
.gr-card .gr-details { margin: 8px 0; }
.gr-card .gr-details summary { cursor: pointer; font-weight: 600; }
.gr-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12.5px; }
.gr-table th, .gr-table td { text-align: left; padding: 3px 4px; border-bottom: 1px solid #eee; }
.gr-table tr.gr-timing td:nth-child(2), .gr-table tr.gr-pitch td:nth-child(2) { color: #b35c00; }
.gr-table tr.gr-missed td:nth-child(2) { color: #b00020; }
.gr-table tr.gr-ok td:nth-child(2) { color: #1b7a2a; }

/* Icons (Lucide, see icons.js) */
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.125em; flex: none; }
.ico-btn-svg { width: 1.05em; height: 1.05em; }

/* grading marks on the music: timing lane above the staff, rings, extra sounds */
.sr-staff svg .gr-ov { pointer-events: none; }
.sr-staff svg .gr-ov .gr-lane { stroke: #c9ccd6; stroke-width: 1; stroke-dasharray: 2 4; }
.sr-staff svg .gr-ov .gr-tick { stroke: #8a90a2; stroke-width: 1.5; }
.sr-staff svg .gr-ov .gr-dot { stroke: #fff; stroke-width: 1.5; }
.sr-staff svg .gr-ov .gr-dot.ok { fill: #1b7a2a; }
.sr-staff svg .gr-ov .gr-dot.timing { fill: #d9822b; }
.sr-staff svg .gr-ov .gr-off { stroke-width: 3; stroke-linecap: round; }
.sr-staff svg .gr-ov .gr-off.ok { stroke: #1b7a2a; }
.sr-staff svg .gr-ov .gr-off.timing { stroke: #d9822b; }
.sr-staff svg .gr-ov .gr-ring { fill: none; stroke: #c62828; stroke-width: 2; stroke-dasharray: 4 3; }
.sr-staff svg .gr-ov .gr-extra { stroke: #8a90a2; stroke-width: 2; stroke-linecap: round; }
.sr-staff svg .gr-ov text.gr-lbl { fill: #7b3fbf; font: bold 12px Arial, sans-serif; }
.sr-staff svg .gr-ov text.gr-lbl.soft { fill: #8a90a2; font-weight: normal; font-style: italic; }
.gr-chips { position: absolute; top: 6px; right: 8px; z-index: 3; display: flex; gap: 6px; }
.gr-marks-chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid #d3d9e6; background: #ffffff; color: #1d2330; cursor: pointer; }
.gr-marks-chip:hover { background: #eef4ff; }
.gr-card .gr-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 6px 0 8px; font-size: 12.5px; color: #444; }
.gr-card .gr-legend .gr-sub { display: inline; margin: 0; }
.gr-card .gr-legend .gr-marks { margin-left: auto; font-size: 12px; padding: 2px 8px; }
.gr-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.gr-legend .gr-dot.ok { background: #1b7a2a; } .gr-legend .gr-dot.timing { background: #d9822b; }
.gr-legend .gr-dot.missed { background: none; border: 2px dashed #c62828; width: 7px; height: 7px; }
.gr-legend .gr-dot.pitch { background: #7b3fbf; }
.gr-legend .gr-dot.extra { background: none; border-radius: 0; position: relative; }
.gr-legend .gr-dot.extra::before { content: '×'; position: absolute; left: -1px; top: -6px; color: #8a90a2; font-weight: bold; font-size: 14px; }
/* a flash where the playhead is on each space-bar tap */
.gr-tapflash { position: absolute; width: 14px; margin-left: -7px; border-radius: 7px; background: rgba(42,157,143,.45); pointer-events: none; z-index: 2; animation: grtap .45s ease-out forwards; }
.gr-tapflash.corner { left: 12px; top: 12px; width: 22px; height: 22px; margin: 0; border-radius: 50%; }
@keyframes grtap { from { opacity: 1; transform: scaleX(1.4); } to { opacity: 0; transform: scaleX(1); } }

/* Grade ▾ menu: microphone or space bar */
.sr-grmenu { position: fixed; z-index: 9100; width: 260px; display: flex; flex-direction: column; gap: 4px; padding: 6px; background: #ffffff; border: 1px solid #d3d9e6; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.sr-grmenu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 1px solid transparent; border-radius: 8px; background: none; color: #1d2330; cursor: pointer; font-size: 14px; }
.sr-grmenu button:hover, .sr-grmenu button:focus-visible { background: #eef4ff; }
.sr-grmenu button.last { border-color: #c5d3e8; }
.sr-grmenu button .ico { width: 20px; height: 20px; }
.sr-grmenu small { display: block; color: #666; font-size: 12px; }

/* Listen back row & recent attempts on the grade report */
.gr-card .gr-listen-row, .gr-card .gr-again-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 4px 0 8px; }
.gr-card .gr-listen.on { background: #fde7df; border-color: #e76f51; }
.gr-card .gr-mix { font-size: 12.5px; }
.gr-card .gr-back { border: 0; background: none; color: #3b6cf6; font-weight: 600; font-size: 12.5px; padding: 0 0 6px; cursor: pointer; }
.gr-card .gr-back:hover { text-decoration: underline; }
.gr-rec-list { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.gr-rec-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; padding: 7px 10px; border: 1px solid #e2dccd; border-radius: 9px; background: #fff; color: #222; cursor: pointer; font-size: 13px; }
.gr-rec-item:hover { background: #f5efe0; border-color: #cfc6b2; }
.gr-rec-item small { display: block; color: #666; font-size: 11.5px; margin-top: 1px; }
.gr-rec-time { font-size: 11.5px; color: #777; white-space: nowrap; }

/* update banner */
.upd-banner { position: fixed; left: 16px; bottom: 16px; z-index: 9500; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #1d2330; color: #fff; border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.3); font-size: 14px; }
.upd-banner .btn { margin: 0; }
.gr-marks-chip.gr-listen.on { background: #fde7df; border-color: #e76f51; }

/* ---------- toolbar ⋯ menu (tools kept off the bar, and ones that don't fit) */
.dock-more-menu { position: fixed; z-index: 61; min-width: 210px; max-height: 75vh; overflow: auto; padding: 6px; border-radius: 14px; background: rgba(250,250,252,.98); color: #1d2330; box-shadow: 0 16px 50px rgba(0,0,0,.4); font-size: 14px; }
.dock-more-menu .dm-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: none; background: none; color: inherit; border-radius: 9px; cursor: pointer; font-size: 14px; text-align: left; }
.dock-more-menu .dm-item:hover { background: rgba(0,0,0,.06); }
.dock-more-menu .dm-item.on { background: rgba(66,98,160,.14); font-weight: 600; }
.dock-more-menu .dm-item .i { width: 20px; display: inline-flex; justify-content: center; font-size: 18px; }
.dock-more-menu .dm-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
.dock-more-menu .dm-row select { flex: 1; font-size: 14px; padding: 4px; }
.dock-more-menu .dm-sep { height: 1px; background: rgba(0,0,0,.1); margin: 4px 6px; }
.dock-custom .dc-inmenu { flex: none !important; font-size: 12px; color: #6b7280; min-width: 48px; }

/* ---------- bigger targets for the small buttons (mouse and finger) */
.mini-btns button { min-width: 30px; min-height: 28px; font-size: 1.15em; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.stage-tabs .tab-x { min-width: 26px; min-height: 26px; display: inline-flex; align-items: center; justify-content: center; font-size: .9em !important; }
.stage-tabs .tabwrap .tab-x { opacity: .35; }                 /* visible without hover, for iPad */
.stage-tabs .tabwrap:hover .tab-x { opacity: .75; }
.stage-tabs .stage-max { min-width: 40px; min-height: 36px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 9px; font-weight: 700; }

/* ---------- sight reading: A− / A+ music size */
.sr-zoom { display: inline-flex; gap: 2px; }
.sr-zoom button { min-width: 36px; font-weight: 700; }
.sr-staff { overflow: auto; }

/* ---------- update status */
.upd-status { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: #f1f3f7; color: #1d2330; }
.upd-status .ico { flex: none; width: 20px; height: 20px; }
.upd-status.upd-ok { background: #e6f4ea; color: #145c26; }
.upd-status.upd-todo { background: #fff3dc; color: #7a4b00; }
.upd-status.upd-bad { background: #fde8e8; color: #9b1c1c; }
.upd-status.upd-busy { background: #e8eefb; color: #23407a; }
.upd-status.flash { animation: upd-flash .9s ease 2; }
@keyframes upd-flash { 50% { box-shadow: 0 0 0 4px rgba(217,130,43,.45); } }
.upd-spin { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: upd-rot .8s linear infinite; }
@keyframes upd-rot { to { transform: rotate(360deg); } }
.upd-banner.upd-done { background: #e6f4ea; color: #145c26; }
.upd-banner.upd-done .ico { width: 18px; height: 18px; vertical-align: -3px; }
.upd-banner .btn:not(.primary) { background: rgba(255,255,255,.16); color: #fff; border: none; }
.upd-banner.upd-done .btn:not(.primary) { background: rgba(20,92,38,.12); color: #145c26; }

/* ---------- time left in the current agenda step */
.agenda li.cur { position: relative; }
.agenda li.cur .m { opacity: .9; white-space: nowrap; font-weight: 700; }
.agenda li .ag-prog { position: absolute; left: .6em; right: .6em; bottom: 3px; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--bg) 25%, transparent); overflow: hidden; }
.agenda li .ag-prog i { display: block; height: 100%; background: var(--bg); opacity: .7; border-radius: 3px; transition: width 1s linear; }
.pub-note { white-space: pre-wrap; font-size: 1.05em; line-height: 1.4; }

/* ---------- Setup header: the tabs wrap instead of running off a narrow screen; the version next to the name */
.e-top { flex-wrap: wrap; row-gap: 6px; }
.tabs { min-width: 0; flex-wrap: wrap; }
html.web .e-top { padding-left: 16px; }
.brand { white-space: nowrap; }
.brand .ver { font-weight: 500; font-size: 12px; color: var(--e-muted); margin-left: 4px; }

/* ---------- calendar & progress windows (same surface as the tuner / metronome) */
.wg-host { position: absolute; inset: 0; overflow: auto; background: var(--surface, var(--card)); color: var(--text); }
.wg-host button { font: inherit; color: inherit; background: rgba(255,255,255,.1); border: none; border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.wg-host button:hover { background: rgba(255,255,255,.2); }
.cal { display: flex; flex-direction: column; height: 100%; padding: 12px; box-sizing: border-box; gap: 8px; }
.cal-top { display: flex; align-items: center; gap: 10px; font-size: 1.25em; }
.cal-top button { font-size: .8em; min-width: 36px; }
.cal-top { flex-wrap: wrap; }
.cal-show { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.cal-show button { font-size: .6em !important; opacity: .45; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px !important; }
.cal-show button.on { opacity: 1; background: rgba(255,255,255,.2) !important; }
.cal-show .ico { width: 1.1em; height: 1.1em; }
.cal-grid { flex: 1; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; min-height: 0; }
.cal-w { font-size: .75em; font-weight: 700; opacity: .6; text-transform: uppercase; letter-spacing: .05em; padding: 0 4px; }
.cal-d { background: rgba(255,255,255,.07); border-radius: 8px; padding: 4px 6px; overflow: hidden; min-height: 52px; font-size: .8em; display: flex; flex-direction: column; gap: 2px; }
.cal-d.off { background: rgba(0,0,0,.18); }
.cal-d.out { opacity: .4; }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-d.today .cal-n { background: var(--accent); color: var(--bg); border-radius: 99px; padding: 0 7px; align-self: flex-start; }
.cal-n { font-weight: 700; font-size: 1.1em; }
.cal-sp { font-size: .85em; font-weight: 700; color: var(--accent); }
.cal-ev { display: flex; gap: 4px; align-items: flex-start; overflow: hidden; line-height: 1.2; max-height: 2.4em; }
.cal-ev .ico { margin-top: 1px; }
.cal-ev .ico { width: 12px; height: 12px; flex: none; }
.cal-ev.note { opacity: .75; font-style: italic; }
.cal-key { font-size: .75em; opacity: .55; }

.prog { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.prog-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: .9em; }
.prog-sum { display: inline-flex; align-items: center; gap: 6px; }
.prog-add { font-weight: 700; }
.prog-list { display: flex; flex-direction: column; gap: 8px; }
.prog-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.07); border-left: 6px solid transparent; }
.prog-item.green { border-left-color: #2fbf5b; }
.prog-item.yellow { border-left-color: #f2c230; }
.prog-item.red { border-left-color: #e5484d; }
.light { display: inline-block; width: 16px; height: 16px; border-radius: 50%; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.25); }
.light.green { background: #2fbf5b; box-shadow: 0 0 10px #2fbf5b88; }
.light.yellow { background: #f2c230; box-shadow: 0 0 10px #f2c23088; }
.light.red { background: #e5484d; box-shadow: 0 0 10px #e5484d88; }
.wg-host button.light { width: 34px; height: 34px; padding: 0; border-radius: 50%; margin-top: 2px; }
.wg-host button.light.green { background: #2fbf5b; } .wg-host button.light.yellow { background: #f2c230; } .wg-host button.light.red { background: #e5484d; }
.prog-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.prog-row { display: flex; align-items: center; gap: 10px; }
.prog-title { flex: 1; min-width: 0; font: inherit; font-size: 1.2em; font-weight: 700; background: transparent; border: none; color: inherit; padding: 2px 0; outline: none; }
.prog-title:focus, .prog-notes:focus { background: rgba(255,255,255,.08); border-radius: 6px; }
.prog-st { font-size: .8em; font-weight: 700; opacity: .8; white-space: nowrap; }
.prog-x { opacity: .45; padding: 4px 6px !important; }
.prog-notes { font: inherit; font-size: .95em; background: transparent; border: none; color: inherit; opacity: .85; resize: none; outline: none; padding: 2px 0; overflow: hidden; }
.prog-empty { opacity: .65; padding: 12px 4px; line-height: 1.5; }

/* calendar: day editor */
.cal { flex-direction: row; }
.cal-month { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cal-d { cursor: pointer; position: relative; }
.cal-d:hover { background: rgba(255,255,255,.13); }
.cal-d[style*="--mark"] { background: color-mix(in srgb, var(--mark) 28%, transparent); box-shadow: inset 3px 0 0 var(--mark); }
.cal-d.sel { outline: 2px solid var(--accent); outline-offset: -2px; }
.cal-lb { font-size: .85em; font-weight: 700; }
.cal-ev small { opacity: .7; margin-left: 2px; }
.cal-day { width: 290px; flex: none; display: flex; flex-direction: column; gap: 8px; overflow: auto; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.12); font-size: .9em; }
.cal-dh { display: flex; align-items: center; gap: 8px; font-size: 1.1em; }
.cal-dh button { min-width: 30px; }
.cal-f { display: flex; flex-direction: column; gap: 3px; }
.cal-f > span, .cal-sec { font-size: .75em; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .6; }
.cal-sec { margin-top: 6px; }
.cal-day input, .cal-day select, .cal-day textarea { font: inherit; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 7px; padding: 5px 7px; min-width: 0; }
.cal-day select option { color: #000; }
.cal-day textarea { resize: vertical; }
.cal-sw { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-sw button { width: 24px; height: 24px; border-radius: 50%; padding: 0 !important; min-width: 0; border: 2px solid transparent; font-size: .8em; }
.cal-sw button.on { border-color: currentColor; box-shadow: 0 0 0 2px rgba(0,0,0,.3); }
.cal-evrow { display: flex; flex-direction: column; gap: 5px; padding: 7px; border-radius: 9px; background: rgba(255,255,255,.06); }
.cal-er1 { display: flex; align-items: center; gap: 6px; }
.cal-er1 input { flex: 1; font-weight: 700; }
.cal-er1 .ico { width: 15px; height: 15px; flex: none; }
.cal-er2 { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; font-size: .9em; }
.cal-er2 select, .cal-er2 input[type=time] { padding: 3px 5px; }
.cal-er2 label { display: inline-flex; align-items: center; gap: 3px; }
.cal-none { opacity: .55; font-size: .9em; }
.cal-adds { display: flex; gap: 5px; flex-wrap: wrap; }
.cal-adds button { font-size: .85em; }
@container (max-width: 640px) { .cal.has-day .cal-month { display: none; } .cal-day { width: auto; flex: 1; border-left: none; padding-left: 0; } }
.wg-host { container-type: size; }

/* progress: colours, steps, labels */
.prog-st { background: transparent; border: none; color: inherit; cursor: pointer; border-radius: 99px; padding: 3px 10px !important; }
.prog-st.green { background: #2fbf5b33; } .prog-st.yellow { background: #f2c23033; } .prog-st.red { background: #e5484d33; }
.prog-tools { display: inline-flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.prog-item:hover .prog-tools, .prog-item:focus-within .prog-tools { opacity: .7; }
.prog-tools button { padding: 4px 5px !important; min-width: 0; }
.prog-tools button:disabled { opacity: .3; }
.prog-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.prog-pick .pick { display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; padding: 5px 12px 5px 8px !important; font-weight: 600; }
.prog-pick .pick.on { box-shadow: inset 0 0 0 2px currentColor; }
.prog-meta { display: flex; align-items: center; gap: 10px; font-size: .85em; }
.prog-tog { background: transparent !important; border: none; color: inherit; padding: 0 !important; font-weight: 700; opacity: .85; }
.prog-bar { width: 90px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.prog-bar i { display: block; height: 100%; background: #2fbf5b; transition: width .2s; }
.prog-ago { opacity: .5; margin-left: auto; }
.prog-steps { display: flex; flex-direction: column; gap: 2px; }
.prog-step { display: flex; align-items: center; gap: 8px; }
.prog-step input { flex: 1; min-width: 0; font: inherit; color: inherit; background: transparent; border: none; outline: none; padding: 3px 4px; border-radius: 5px; }
.prog-step input:focus { background: rgba(255,255,255,.08); }
.prog-step.done input { text-decoration: line-through; opacity: .55; }
.pg-chk { width: 22px; height: 22px; min-width: 0; padding: 0 !important; border-radius: 6px; border: 2px solid rgba(255,255,255,.45) !important; background: transparent !important; color: #fff; font-weight: 800; font-size: 14px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pg-chk.on { background: #2fbf5b !important; border-color: #2fbf5b !important; }
.prog-sx { opacity: 0; padding: 2px 4px !important; min-width: 0; }
.prog-step:hover .prog-sx { opacity: .5; }
.prog-addstep { align-self: flex-start; background: transparent !important; border: none; color: inherit; opacity: .6; padding: 3px 4px !important; font-size: .9em; }
.prog-addstep:hover { opacity: 1; }
.prog-hint { font-size: .85em; display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 8px; background: #2fbf5b22; }
.prog-labels { display: flex; gap: 10px; flex-wrap: wrap; }
.prog-labels label { display: inline-flex; align-items: center; gap: 6px; }
.prog-labels input { font: inherit; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 7px; padding: 4px 7px; width: 140px; }
.prog-top button.on { box-shadow: inset 0 0 0 2px currentColor; }
.pg-chk .ico{width:15px;height:15px;stroke-width:3}

/* Window menu: tiles + collapsible lists */
.wm-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.win-menu .wm-tile { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; padding: 10px 4px 8px; font-size: 12px; white-space: normal; line-height: 1.15; }
.wm-tile .ico { width: 22px; height: 22px; }
.wm-search { margin: 4px 2px; padding: 7px 10px; border-radius: 8px; border: 1px solid #d8dce4; font: inherit; background: #fff; color: inherit; }
.wm-sec { border-top: 1px solid #e3e6ec; padding-top: 2px; }
.wm-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: #6b7385; }
.wm-sec > summary::-webkit-details-marker { display: none; }
.wm-sec > summary::before { content: ''; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 2px; }
.wm-sec[open] > summary::before { transform: rotate(45deg); }
.wm-sec > summary:hover { background: #eef2fe; }
.wm-n { margin-left: auto; background: #e8ebf1; border-radius: 99px; padding: 1px 8px; font-size: 11px; letter-spacing: 0; }
.wm-items { display: flex; flex-direction: column; max-height: 260px; overflow: auto; }
.wm-items button { display: flex; align-items: center; gap: 6px; }
.wm-items button .ico { flex: none; }
.wm-none { padding: 8px 10px; color: #6b7385; font-size: 13px; }
.wm-foot { display: flex; gap: 4px; border-top: 1px solid #e3e6ec; padding-top: 4px; }
.wm-foot button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* Recorder */
.rec { padding: 14px; display: flex; flex-direction: column; gap: 14px; height: 100%; box-sizing: border-box; }
.rec-idle { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 14px 10px 6px; opacity: .95; }
.rec-idle > div { opacity: .7; max-width: 340px; line-height: 1.4; }
.rec-big { width: 84px; height: 84px; border-radius: 50% !important; padding: 0 !important; display: grid; place-items: center; background: rgba(255,255,255,.1) !important; border: 3px solid rgba(255,255,255,.7) !important; }
.rec-big i { width: 56px; height: 56px; border-radius: 50%; background: #e5484d; transition: transform .15s; }
.rec-big:hover i { transform: scale(.92); }
.rec-live, .rec-review { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.07); }
.rec-status { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.1em; }
.rec-status b { margin-left: auto; font-variant-numeric: tabular-nums; font-size: 1.3em; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #e5484d; animation: recblink 1s infinite; }
.rec-live.paused .rec-dot { animation: none; opacity: .5; }
@keyframes recblink { 50% { opacity: .25; } }
canvas.rec-wave { width: 100%; height: 72px; display: block; color: rgba(255,255,255,.85); flex: 1; min-width: 0; }
.rec-review canvas.rec-wave { cursor: pointer; }
.rec-btns { display: flex; gap: 8px; justify-content: flex-end; }
.rec-btns button { display: inline-flex; align-items: center; gap: 6px; }
.rec-stop { background: #e5484d !important; color: #fff !important; }
.rec-q { font-weight: 800; font-size: 1.15em; }
.rec-player { display: flex; align-items: center; gap: 10px; }
.rec-player .rec-time { font-variant-numeric: tabular-nums; opacity: .8; white-space: nowrap; font-size: .9em; }
.rec-play { width: 34px; height: 34px; border-radius: 50% !important; padding: 0 !important; display: grid !important; place-items: center; flex: none; min-width: 0; }
.rec-play.big { width: 44px; height: 44px; }
.rec-name { display: flex; align-items: center; gap: 8px; font-size: .9em; }
.rec-name input, .rec-info input { font: inherit; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 7px; padding: 5px 8px; flex: 1; min-width: 0; }
.rec-tab { font-size: .9em; display: flex; gap: 6px; align-items: center; opacity: .85; }
.rec-list { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow: auto; }
.rec-lh { font-size: .75em; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .6; }
.rec-item { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 9px; }
.rec-item:hover { background: rgba(255,255,255,.06); }
.rec-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.rec-info input { background: transparent; border-color: transparent; padding: 2px 4px; font-weight: 700; }
.rec-info input:focus { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); }
.rec-info span { font-size: .8em; opacity: .6; padding: 0 5px; }
.rec-item > button:not(.rec-play) { opacity: .55; padding: 4px 6px !important; min-width: 0; }
.rec-item > button:hover { opacity: 1; }
.rec-none { opacity: .5; font-size: .9em; }
.win-menu [hidden] { display: none !important; }

/* ---------- tuner v2 */
.tu-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.mu .tu-go { padding: 9px 16px; font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.mu .mu-ic { padding: 7px 9px; display: inline-grid; place-items: center; }
.mu .ico { width: 16px; height: 16px; vertical-align: -3px; }
.tu-set { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 8px 10px; margin-bottom: 6px; border-radius: 10px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.tu-set label { display: flex; gap: 6px; align-items: center; font-size: 13px; font-weight: 600; }
.tu-gauge { width: min(100%, 440px); }
.tu-arc, .tu-zone { transition: stroke .2s, stroke-opacity .2s; }
.tu-read[data-state="ok"]:not(.idle) .tu-arc { stroke: #2ecc71; stroke-opacity: .28; }
.tu-read[data-state="near"]:not(.idle) .tu-arc { stroke: #f4a261; stroke-opacity: .22; }
.tu-read[data-state="off"]:not(.idle) .tu-arc { stroke: #ff6b6b; stroke-opacity: .2; }
.tu-read .tu-big { transition: color .2s, text-shadow .3s; }
.tu-read[data-state="near"]:not(.idle) .tu-big { color: #f6c48e; }
.tu-read[data-state="off"]:not(.idle) .tu-big { color: #ff8f8f; }
.tu-read[data-lock] .tu-big { text-shadow: 0 0 28px rgba(46,204,113,.75); }
.tu-read[data-lock] .tu-zone { filter: drop-shadow(0 0 6px #2ecc71); }
.tu-hint { display: inline-flex; align-items: center; gap: 6px; }
.tu-hint .ico { width: 20px; height: 20px; stroke-width: 3; }
.tu-read.fresh .tu-big { opacity: .3 !important; }
.tu-wait { width: .6em !important; height: .6em !important; vertical-align: middle !important; stroke-width: 1.6; }
.tu-trace { display: block; width: min(100%, 440px); height: 54px; margin: 10px auto 0; color: var(--text); border-radius: 8px; background: color-mix(in srgb, var(--text) 5%, transparent); }
.tu-read.fresh .tu-trace { opacity: .5; }
/* big view for the room */
.mu.tuner.ens { grid-template-columns: 1fr; }
.mu.tuner.ens .dr-panel, .mu.tuner.ens .tu-hz { display: none; }
.tu-err { display: inline-block; max-width: 360px; font-size: 13px; font-weight: 600; line-height: 1.4; color: #ff6b6b; background: rgba(255,107,107,.12); border: 1px solid rgba(255,107,107,.35); border-radius: 10px; padding: 8px 12px; }
.tu-resume { background: var(--accent); color: var(--bg); border: none; border-radius: 99px; padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.me-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 4px 0 2px; }
.me-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.me-tap.tapping { background: var(--accent) !important; color: var(--bg) !important; border-color: transparent !important; }
.mu.tuner.ens .tu-read { border-radius: 18px; padding: 10px 0 18px; transition: background .25s; }
.mu.tuner.ens .tu-read[data-state="ok"]:not(.idle) { background: rgba(46,204,113,.22); }
.mu.tuner.ens .tu-read[data-state="near"]:not(.idle) { background: rgba(244,162,97,.2); }
.mu.tuner.ens .tu-read[data-state="off"]:not(.idle) { background: rgba(255,107,107,.18); }
.mu.tuner.ens .tu-hint { font-size: clamp(28px, 8cqw, 72px); font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
.mu.tuner.ens .tu-big { font-size: clamp(70px, 22cqw, 220px); }
.mu.tuner.ens .tu-cents { font-size: clamp(18px, 4cqw, 34px); }
/* drone keyboard */
.dr-piano { position: relative; display: flex; height: 120px; margin: 4px 0 10px; }
.mu .dr-piano button { padding: 0 !important; border-radius: 0 0 8px 8px; display: flex; align-items: flex-end; justify-content: center; font-size: 13px; font-weight: 700; }
.mu .dr-piano .wk { flex: 1; background: #f4f5f8; color: #1d2330; border: 1px solid rgba(0,0,0,.25); padding-bottom: 8px !important; }
.mu .dr-piano .wk:hover { background: #e4e8f2; }
.mu .dr-piano .bk { position: absolute; top: 0; width: 13%; height: 62%; background: #1d2330; color: #dfe3ec; border: 1px solid #000; z-index: 1; font-size: 11px; padding-bottom: 6px !important; }
.mu .dr-piano .bk:hover { background: #33405a; }
.mu .dr-piano button span { pointer-events: none; }
.mu .dr-piano .wk.tone { background: color-mix(in srgb, var(--accent) 35%, #f4f5f8); }
.mu .dr-piano .bk.tone { background: color-mix(in srgb, var(--accent) 45%, #1d2330); }
.mu .dr-piano button.on { background: var(--accent); color: var(--bg); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.dr-modes { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.mu .dr-modes button { padding: 5px 10px; font-size: 12.5px; }
.dr-vol { flex: 1; } .dr-vol input { flex: 1; accent-color: var(--accent); }
.mu.tuner.ens .tu-big { font-size: clamp(60px, min(20cqw, 26cqh), 220px); }
.mu.tuner.ens .tu-hint { font-size: clamp(26px, min(8cqw, 8cqh), 72px); }
.mu.tuner.ens .tu-gauge { width: min(100%, 440px, 62cqh); }
.mu.tuner.ens .tu-trace { width: min(100%, 440px); height: 40px; }

/* ---------- metronome v2 */
.mu.metro { position: relative; }
.mu.metro::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; box-shadow: inset 0 0 0 0 transparent; }
@keyframes meflash { from { box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--text) 45%, transparent); } to { box-shadow: inset 0 0 0 0 transparent; } }
@keyframes meflashd { from { box-shadow: inset 0 0 0 8px var(--accent), inset 0 0 60px color-mix(in srgb, var(--accent) 35%, transparent); } to { box-shadow: inset 0 0 0 0 transparent; } }
.me-display { height: auto; min-height: 250px; padding: 16px 10px 10px; gap: 10px; }
.me-big { font-size: clamp(72px, min(18cqw, 20cqh), 150px); }
.me-big.idle { opacity: .9; cursor: ns-resize; touch-action: none; }
.me-big.gap { opacity: .25; }
.me-mark { font-size: 15px; font-weight: 700; letter-spacing: .04em; opacity: .7; min-height: 1.2em; }
.me-dots { gap: 10px; height: auto; }
.me-dot { width: 2.6em; height: 2.6em; font-size: 15px; border: 2px solid transparent; }
.me-dot.acc { box-shadow: none; border-color: var(--accent); }
.me-dot:first-child.on { box-shadow: 0 0 18px var(--accent); }
.me-tip { font-size: 11.5px; opacity: .45; }
.me-controls { display: flex; flex-direction: column; gap: 10px; }
.me-tempo { flex-wrap: nowrap; gap: 8px; }
.me-tempo .me-slider { flex: 1; margin: 0; min-width: 60px; }
.me-seg { display: inline-flex; }
.mu .me-seg button { border-radius: 0; margin-left: -1px; padding: 6px 10px; }
.mu .me-seg button:first-child { border-radius: 9px 0 0 9px; margin-left: 0; }
.mu .me-seg button:last-child { border-radius: 0 9px 9px 0; }
.me-tap { margin-left: 0; }
.me-presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.me-pre { display: inline-flex; }
.mu .me-pre button { padding: 4px 10px; font-size: 12.5px; border-radius: 99px 0 0 99px; }
.mu .me-pre button b { opacity: .7; margin-left: 3px; }
.mu .me-pre .x { border-radius: 0 99px 99px 0; padding: 4px 7px; margin-left: -1px; opacity: .7; }
.mu .me-pre.on button { background: color-mix(in srgb, var(--accent) 30%, transparent); }
.mu .me-presave { padding: 4px 10px; font-size: 12.5px; border-radius: 99px; border-style: dashed; background: transparent; opacity: .8; display: inline-flex; gap: 5px; align-items: center; }
.me-subs { flex-wrap: nowrap; gap: 0; }
.me-go { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mu .me-go button { padding: 12px; font-size: 16px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.me-then { font-size: 13px; display: flex; gap: 6px; align-items: center; margin-top: -4px; }
.me-more { border-top: 1px solid var(--line); padding-top: 6px; }
.me-more summary { cursor: pointer; font-size: 13px; font-weight: 700; opacity: .75; padding: 4px 0; }
.me-opt { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; margin: 8px 0; }
.me-opt > b { width: 7.5em; }
.me-opt span { display: inline-flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.mu input[type=number] { background: rgba(255,255,255,.95); color: #1d2330; border: 1px solid rgba(0,0,0,.15); border-radius: 7px; padding: 4px 6px; font-size: 13px; width: 4.2em; }

/* ---------- recorder v2 */
.rec { gap: 12px; height: auto; min-height: 100%; }
.rec-opts { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center; align-items: center; font-size: 13px; }
.rec-opts label { display: inline-flex; gap: 5px; align-items: center; }
.rec-opts select, .rec-opts input[type=number] { font: inherit; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 7px; padding: 4px 6px; }
.rec-opts select option { color: #000; }
.rec-opts input[type=number] { width: 4.2em; }
.rec-meter { display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 13px; min-height: 32px; }
.rec-meter button { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.rec-lvl { width: 180px; height: 10px; border-radius: 5px; background: rgba(255,255,255,.12); overflow: hidden; }
.rec-lvl i { display: block; height: 100%; width: 0; background: #2fbf5b; border-radius: 5px; transition: width .06s; }
.rec-lvl i.hot { background: #f2c230; } .rec-lvl i.clip { background: #e5484d; }
.rec-lvl-t { opacity: .7; min-width: 9em; }
.rec-count { align-items: center; text-align: center; }
.rec-count b { font-size: 72px; line-height: 1; font-variant-numeric: tabular-nums; }
.rec-count b.hit { animation: mehit .2s ease-out; }
.rec-nm { font-size: .8em; opacity: .7; font-weight: 600; }
.rec-player-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.07); }
.rec-player-card.review { background: color-mix(in srgb, var(--accent) 12%, rgba(255,255,255,.06)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.rec-ph, .rec-cmp { display: flex; align-items: center; gap: 8px; }
.rec-ph b { font-size: 1.05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-cmp .me-seg button { border-radius: 0; padding: 6px 12px; max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-cmp .me-seg button:first-child { border-radius: 9px 0 0 9px; } .rec-cmp .me-seg button:last-child { border-radius: 0 9px 9px 0; }
.rec-cmp button.on, .rec-ctl button.on { background: var(--accent); color: var(--bg); }
canvas.rec-pwave { height: 84px; cursor: pointer; touch-action: none; }
.rec-ctl { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; }
.rec-ctl button { display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; font-size: 13px; }
.rec-ctl select { font: inherit; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 7px; padding: 3px 5px; }
.rec-ctl select option { color: #000; }
.rec-ptime { font-variant-numeric: tabular-nums; opacity: .8; min-width: 7.5em; }
.rec-hint { opacity: .5; font-size: 12px; }
.rec-marks { display: flex; flex-wrap: wrap; gap: 5px; }
.rec-mk { display: inline-flex; }
.rec-mk button { padding: 3px 9px !important; font-size: 12px; border-radius: 99px 0 0 99px; background: rgba(255,107,107,.18) !important; }
.rec-mk .x { border-radius: 0 99px 99px 0; padding: 3px 6px !important; margin-left: 1px; }
.rec-item.cur { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.rec-item.pick { box-shadow: inset 0 0 0 2px var(--accent); }
.rec-mini { width: 90px; height: 22px; flex: none; fill: currentColor; opacity: .45; }
.rec-acts { display: inline-flex; gap: 2px; }
.rec-acts button { opacity: .55; padding: 4px 6px !important; min-width: 0; font-size: 11.5px; font-weight: 700; }
.rec-acts button:hover { opacity: 1; }
.rec-item > button:not(.rec-play) { opacity: 1; }

/* ---------- scaling: resize gracefully & allow scroll rather than hiding controls */
.mu.tuner, .mu.metro { overflow-y: auto; }
@container (max-height: 520px) { .tu-gauge { width: min(100%, 300px); } .tu-big { font-size: clamp(48px, 22cqh, 120px); } }
@container (max-height: 380px) { .tu-gauge { width: min(100%, 210px); } .tu-cents { font-size: 16px; } .tu-hint { font-size: 15px; } .dr-piano { height: 80px; } }
@container (max-width: 640px) { .mu.tuner .dr-panel { padding-top: 8px; } }
@container (max-width: 360px) { .mu .tu-go { padding: 7px 10px; } }
@container (max-height: 560px) { .me-display { min-height: 0; padding: 10px; gap: 6px; } .me-big { font-size: clamp(48px, 18cqh, 120px); } }
@container (max-height: 460px) { .me-dot { width: 2.1em; height: 2.1em; } }
@container (max-height: 360px) { .me-display { flex-direction: row; justify-content: center; flex-wrap: wrap; } .mu .me-go button { padding: 8px; font-size: 14px; } }
@container (max-width: 420px) { .mu .me-tempo .me-seg button { border-radius: 9px !important; } .me-subs button { padding: 5px 6px; font-size: 11px; } .me-tap { padding: 6px 8px !important; } }
/* recorder: the record / stop controls and the player stay; options and the list give way */
@container (max-height: 420px) { .rec-list { display: none; } .rec-opts { display: none; } canvas.rec-pwave { height: 60px; } .rec-hint { display: none; } }
@container (max-height: 300px) { .rec-meter, .rec-marks, .rec-tab { display: none; } .rec-big { width: 60px; height: 60px; } .rec-big i { width: 40px; height: 40px; } canvas.rec-live-wave { height: 44px; } .rec-count b { font-size: 44px; } }
@container (max-width: 420px) { .rec-mini, .rec-acts button[data-rc="cmp"] { display: none; } .rec-idle > div:not(.rec-opts):not(.rec-meter) { display: none; } }
.mu .tu-go { white-space: nowrap; }

/* Progress tracker card in the side panel */
.side-prog { cursor: pointer; }
.side-prog ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.side-prog li { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.side-prog .sp-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.side-prog .sp-steps { display: flex; flex-direction: column; gap: 2px; padding-left: 20px; }
.side-prog .sp-step { display: flex; align-items: flex-start; gap: 7px; background: none; border: none; color: inherit; font: inherit; font-size: .88em; text-align: left; padding: 3px 4px; border-radius: 6px; cursor: pointer; }
.side-prog .sp-step:hover { background: rgba(255,255,255,.1); }
.side-prog .sp-step.done span:last-child { opacity: .6; text-decoration: line-through; }
.side-prog .sp-box { flex: none; width: 1.1em; height: 1.1em; border: 2px solid currentColor; border-radius: 4px; display: grid; place-items: center; font-size: .85em; font-weight: 800; line-height: 1; }
.side-prog .sp-step.done .sp-box { background: #2fbf5b; border-color: #2fbf5b; color: #fff; }
.side-prog .light { width: 12px; height: 12px; }
.sp-t { flex: 1; min-width: 0; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.sp-st { font-size: .75em; opacity: .65; white-space: nowrap; }
.sp-bar { width: 44px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; flex: none; }
.sp-bar i { display: block; height: 100%; background: #2fbf5b; }
.ink.papered { padding: 72px 56px 0; box-sizing: border-box; }

/* ---------- YouTube window */
.yt { display: flex; flex-direction: column; height: 100%; }
.yt-bar { display: flex; gap: 6px; padding: 8px; align-items: center; }
.yt-bar input { flex: 1; min-width: 0; font: inherit; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 7px 10px; }
.yt-bar button { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.yt-main { flex: 1; min-height: 0; display: flex; }
.yt-player { flex: 1; min-width: 0; position: relative; background: #000; }
.yt-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-side { width: 270px; flex: none; display: flex; flex-direction: column; gap: 8px; padding: 8px; overflow: auto; border-left: 1px solid rgba(255,255,255,.1); font-size: 13px; }
.yt.side-off .yt-side { display: none; }
.yt-tabs { display: flex; } .yt-tabs button { flex: 1; border-radius: 0 !important; padding: 6px !important; }
.yt-tabs button:first-child { border-radius: 8px 0 0 8px !important; } .yt-tabs button:last-child { border-radius: 0 8px 8px 0 !important; }
.yt-tabs button.on, .yt-bar button.on { background: var(--accent) !important; color: var(--bg) !important; }
.yt-now { display: flex; align-items: center; gap: 4px; padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--accent) 18%, transparent); font-weight: 700; }
.yt-now span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-now button { padding: 3px 5px !important; } .yt-now label { display: inline-flex; gap: 3px; align-items: center; font-weight: 500; font-size: 12px; }
.yt-addcur { text-align: left; font-size: 12.5px; }
.yt-lhead { display: flex; gap: 4px; align-items: center; }
.yt-lhead select { flex: 1; min-width: 0; font: inherit; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 7px; padding: 4px; }
.yt-lhead select option { color: #000; }
.yt-lhead button { padding: 4px 7px !important; white-space: nowrap; }
.yt-list { display: flex; flex-direction: column; gap: 4px; }
.yt-item { display: flex; align-items: center; gap: 6px; border-radius: 8px; padding: 3px; }
.yt-item:hover { background: rgba(255,255,255,.06); }
.yt-item.cur { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.yt-th { width: 64px; height: 36px; padding: 0 !important; border-radius: 5px !important; overflow: hidden; flex: none; display: grid; place-items: center; }
.yt-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-t { flex: 1; min-width: 0; text-align: left; background: transparent !important; padding: 2px !important; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-acts { display: inline-flex; opacity: 0; } .yt-item:hover .yt-acts { opacity: .8; }
.yt-acts button { padding: 3px 5px !important; }
.yt-side { position: relative; }
.yt-th { position: relative; }
.yt-len { position: absolute; right: 2px; bottom: 2px; background: rgba(0,0,0,.8); color: #fff; font-style: normal; font-size: 10px; padding: 0 3px; border-radius: 3px; line-height: 1.4; }
.yt-t small { display: block; opacity: .6; font-size: 11px; }
.yt-item.sel { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.yt-chk { display: grid; place-items: center; flex: none; cursor: pointer; }
.yt-chk input { width: 16px; height: 16px; accent-color: var(--accent); }
.yt-q { font-size: 12px; opacity: .7; }
.yt-selbar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; }
.yt-selbar .grow { flex: 1; }
.yt-selbar button { padding: 4px 8px !important; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.yt-selbar button:disabled { opacity: .4; cursor: default; }
.yt-selbar .ico { width: 14px; height: 14px; }
.yt-picker { position: absolute; inset: 8px; z-index: 5; display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--bg, #1d2330) 94%, #000); border: 2px solid var(--accent); box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.yt-pk-head { display: flex; align-items: center; justify-content: space-between; }
.yt-pk-head button { padding: 3px 6px !important; }
.yt-pk-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.yt-pk-list button { display: flex; align-items: center; gap: 8px; text-align: left; padding: 8px 10px !important; }
.yt-pk-list button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.yt-pk-list button small { opacity: .6; }
.yt-pk-list button.has { opacity: .65; }
.yt-pk-list .ico { width: 15px; height: 15px; color: var(--accent); }
.yt-pk-new { display: flex; gap: 6px; }
.yt-pk-new input { flex: 1; min-width: 0; font: inherit; color: inherit; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 7px; padding: 6px 8px; }
.yt-pk-new button { white-space: nowrap; background: var(--accent) !important; color: var(--bg, #fff) !important; font-weight: 700; }
.yt-none, .yt-clear { opacity: .55; font-size: 12px; } .yt-clear { align-self: flex-start; background: transparent !important; }
.yt-empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #ccd; gap: 10px; padding: 20px; }
.yt-empty .ico { width: 48px; height: 48px; margin: 0 auto 8px; display: block; }
.yt-resume { position: absolute; inset: 0; padding: 0 !important; border-radius: 0 !important; background: #000 !important; display: grid; place-items: center; }
.yt-resume img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.yt-resume span { position: relative; display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 16px; background: rgba(0,0,0,.6); padding: 10px 16px; border-radius: 99px; color: #fff; }
@container (max-width: 620px) { .yt-main { flex-direction: column; } .yt-side { width: auto; max-height: 42%; border-left: none; border-top: 1px solid rgba(255,255,255,.1); } }
@container (max-height: 380px) { .yt-side { display: none; } }
@container (max-height: 260px) { .yt-bar { display: none; } }
.win-body .yt-th img, .wg-host .yt-th img { position: static; inset: auto; width: 100%; height: 100%; }
.coffee-btn { background: #ffdd00 !important; color: #000 !important; border-color: #e6c700 !important; font-weight: 700; }
.av-cal { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.55); display: grid; place-items: center; }
.av-card { background: #fff; color: #1d2330; border-radius: 16px; padding: 22px 26px; width: min(92vw, 380px); text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.av-card h3 { margin: 0; } .av-card p { margin: 0; color: #5a6275; font-size: 14px; }
.av-pad { width: 150px; height: 150px; border-radius: 50%; border: none; background: #3b6cf6; color: #fff; font-size: 22px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.av-pad.hit { animation: mehit .15s ease-out; } .av-pad:disabled { opacity: .4; }
.av-st { font-weight: 700; min-height: 1.3em; }
/* maximize / restore: bigger, and clearly different when maximized */
.stage-tabs .stage-max .ico { width: 21px; height: 21px; stroke-width: 2.4; }
.stage-tabs .stage-max span:empty { display: none; }
.present.stage-max .stage-tabs .stage-max { background: var(--accent) !important; color: var(--bg) !important; opacity: 1 !important; }
.win-bar .max-btn .ico { width: 20px; height: 20px; stroke-width: 2.4; }
.win-bar .max-btn.on { background: var(--accent); color: var(--bg); }
.win-bar .max-btn.on:hover { background: var(--accent); filter: brightness(1.1); }
.sr-zoom button { display: inline-flex; align-items: center; justify-content: center; }
.sr-zoom button .ico { width: 19px; height: 19px; }
.sr-sync input[type=range] { width: 120px; } .sr-sync b { font-variant-numeric: tabular-nums; min-width: 4em; }
.sr-syncbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 12px; margin: 0 8px 6px; border-radius: 10px; background: color-mix(in srgb, var(--accent) 14%, transparent); font-size: 13px; }
.sr-syncbar > span { opacity: .75; flex: 1 1 220px; }
.sr-syncbar input[type=range] { width: 150px; accent-color: var(--accent); }
.sr-syncbar .av-v { font-variant-numeric: tabular-nums; min-width: 4.2em; }
.sr-syncbar .ico { width: 16px; height: 16px; }
.sr-settings .sr-syncbar { margin: 4px 0; flex-basis: 100%; }
.sr-sync { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; opacity: .9; }
.sr-sync > span { display: flex; align-items: center; gap: 6px; }
.sr-sync input[type=range] { width: 110px; accent-color: var(--accent); }
.sr-sync .av-v { font-variant-numeric: tabular-nums; min-width: 3.6em; font-weight: 600; }
.sr-sync button { padding: 3px 8px; font-size: 12px; }

/* ---------- menus v2: grouped ＋ Open / ⋯, segmented Customize toolbar ---------- */
.win-menu .wm-head, .dock-more-menu .dm-head { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: #6b7385; padding: 8px 10px 3px; }
.win-menu .wm-head:first-child { padding-top: 4px; }
.dock-more-menu .dm-lbl { color: #6b7385; font-size: 13px; }
.dock-custom { width: 400px; max-width: calc(100vw - 24px); }
.dock-custom .dc-row { display: grid; grid-template-columns: 14px 20px minmax(100px, 1fr) auto; gap: 8px; align-items: center; padding: 5px 6px; }
.dock-custom .dc-row.is-off .dc-name, .dock-custom .dc-row.is-off .dc-ico { opacity: .45; }
.dock-custom .dc-ico { display: inline-flex; justify-content: center; font-size: 15px; color: #4b5366; }
.dock-custom .dc-ico .ico { width: 16px; height: 16px; }
.dock-custom .dc-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.dc-seg { display: inline-flex; border: 1px solid #d3d7e0; border-radius: 8px; overflow: hidden; background: #fff; flex: none; }
.dock-custom .dc-seg button { border: 0; border-radius: 0; background: none; height: 26px; padding: 0 8px; font-size: 12px; font-weight: 600; color: #3a4252; min-width: 44px; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; }
.dock-custom .dc-seg button + button { border-left: 1px solid #d3d7e0; }
.dock-custom .dc-seg button[aria-pressed="true"] { background: #1d2330; color: #fff; }
.dock-custom .dc-look { display: flex; flex-direction: column; gap: 0; margin-top: 8px; font-size: 12.5px; }
.dock-custom .dc-lrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 4px; border-top: 1px solid #eceef3; }
.dock-custom .dc-lrow > span:first-child { color: #4b5366; }
.dock-custom .dc-lrow input[type=range] { width: 140px; }
.dock-custom .dc-sw { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 99px; background: #cfd4de; position: relative; cursor: pointer; margin: 0; flex: none; }
.dock-custom .dc-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; }
.dock-custom .dc-sw:checked { background: #1d2330; }
.dock-custom .dc-sw:checked::after { transform: translateX(14px); }
@media (prefers-reduced-motion: reduce) { .dock-custom .dc-sw::after { transition: none; } }
.win-menu { width: 360px; }
.wm-grid.wm-five { grid-template-columns: repeat(5, 1fr); }

/* ---------- music windows v2: score practice uses the same look as sight reading ----------
   Controls follow the class theme (--text / --line / --accent / --bg); the music stays on white paper. */
.sp-root { background: transparent; color: var(--text); font-size: 14px; }
.sp-top, .sp-choir, .sp-settings, .sp-spots, .sp-custom { background: transparent; border-bottom: 1px solid var(--line); color: var(--text); }
.sp-top { padding: 10px 12px; gap: 6px; }
.sp-top button, .sp-choir button, .sp-spots button, .sp-custom button, .sp-settings button {
  border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text);
  border-radius: 9px; padding: 7px 12px; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.sp-top button:hover, .sp-choir button:hover, .sp-spots button:hover, .sp-custom button:hover { background: color-mix(in srgb, var(--text) 16%, transparent); }
.sp-top button.on, .sp-choir button.on, .sp-spots button.on { background: var(--accent); color: var(--bg); border-color: transparent; }
.sp-top .sp-primary, .sp-spots .sp-primary, .sp-custom .sp-primary, .sp-choir .sp-primary { background: var(--accent); color: var(--bg); border-color: transparent; font-weight: 700; }
.sp-top select, .sp-choir select, .sp-settings select, .sp-range input, .sp-form input[type=number] {
  background: rgba(255,255,255,.95); color: #1d2330; border: 1px solid rgba(0,0,0,.15); border-radius: 7px; padding: 5px 6px; font-size: 13px; }
.sp-lbl, .sp-note, .sp-hint { color: color-mix(in srgb, var(--text) 65%, transparent); }
.sp-part { background: color-mix(in srgb, var(--text) 6%, transparent); border-color: var(--line); }
.sp-spot-list li.cur { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.sp-root input[type=checkbox], .sp-root input[type=range] { accent-color: var(--accent); }
.sp-choir button.on .sp-dot { box-shadow: 0 0 0 2px var(--bg); }
.sp-score { background: #fff; color: #1d2330; margin: 8px 10px 10px; border-radius: 10px; }
/* tempo stepper: the same control as sight reading, showing beats per minute */
.sp-step { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sp-top .sp-step button { border: 0; border-radius: 0; padding: 4px 11px; font-size: 16px; background: color-mix(in srgb, var(--text) 8%, transparent); }
.sp-step output { display: grid; place-items: center; min-width: 64px; padding: 0 6px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.05; border-inline: 1px solid var(--line); }
.sp-step output small { font-size: 10px; font-weight: 600; opacity: .7; }
.sp-zoom { display: inline-flex; gap: 2px; }
.sp-top .sp-zoom button { min-width: 36px; justify-content: center; padding: 6px 8px; }
.sp-root .ico, .sr .ico { width: 17px; height: 17px; }
.sp-root .sp-show-cols { display: flex; flex-wrap: wrap; gap: 6px 28px; }
.sp-root .sp-show-cols > div { display: flex; flex-direction: column; gap: 3px; }
/* tempo on the sight-reading bar: same stepper as score practice */
.sr-top .sr-step button { border: 0; border-radius: 0; padding: 4px 11px; font-size: 16px; }
.sr-tempo label { display: grid; place-items: center; border-inline: 1px solid var(--line); line-height: 1.05; padding: 1px 4px; }
.sr-tempo input[type=number] { width: 52px; text-align: center; font-size: 15px; font-weight: 700; border: 0; background: transparent; color: var(--text); padding: 0; -moz-appearance: textfield; }
.sr-tempo input::-webkit-inner-spin-button, .sr-tempo input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sr-tempo small { font-size: 10px; font-weight: 600; opacity: .7; }
.score-host { background: var(--surface, var(--card)); color: var(--text); }
.sp-step output { font-size: 15px; }

/* ---------- music windows v4: Fixed 2-tier toolbar (Action bar + slim Display strip) ---------- */
.score-host, .sr-host { container-type: inline-size; }
.sp-top, .sr-top {
  --ctl-h: 34px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  padding: 7px 10px; flex: none;
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}
.sp-top .sp-primary, .sr-top .sr-primary {
  padding: 0 14px; font-size: 13.5px; font-weight: 700;
}
.sr-sub, .sp-sub {
  --sub-h: 26px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  padding: 5px 10px; flex: none;
  background: color-mix(in srgb, var(--text) 3.5%, transparent);
  border-bottom: 1px solid var(--line);
}
.sr-sub[hidden], .sp-sub[hidden], .sr-sub [hidden], .sp-sub [hidden], .sp-top [hidden] { display: none !important; }
.tb-div {
  width: 1px; height: 18px; margin: 0 3px; flex: none;
  background: color-mix(in srgb, var(--text) 16%, transparent);
}
.sr-sub .tb-div, .sp-sub .tb-div { height: 15px; }
.tb-lbl {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: color-mix(in srgb, var(--text) 62%, transparent); user-select: none; margin-right: 1px;
}

/* Tier 1 controls: one unified height across buttons, tabs, selects, and BPM tile */
.sr-top button, .sp-top button, .sp-choir button, .sp-spots button, .sp-custom button, .sp-settings button {
  padding: 0 9px; font-size: 12.5px; font-weight: 600; border-radius: 8px; gap: 5px;
  display: inline-flex; align-items: center; justify-content: center; white-space: nowrap;
}
.sr-top button, .sp-top button, .sr-top select, .sp-top select, .sp-range input {
  height: var(--ctl-h); box-sizing: border-box; padding-top: 0 !important; padding-bottom: 0 !important; line-height: 1; vertical-align: middle;
}
.sr-top .ico, .sp-top .ico, .sp-choir .ico { width: 15px; height: 15px; }
.sr-top .sr-tabs {
  height: var(--ctl-h); box-sizing: border-box; padding: 2px; gap: 2px;
  border-radius: 9px; align-items: stretch; flex-shrink: 0;
}
.sr-top .sr-tabs button { height: auto; border-radius: 7px; padding: 0 9px; }

/* BPM stepper: exact same height as every other Tier 1 tile, single inline row */
.sr-step.sr-tempo, .sp-step {
  display: inline-flex; align-items: stretch; flex-shrink: 0;
  height: var(--ctl-h); box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: color-mix(in srgb, var(--text) 5%, transparent);
}
.sr-top .sr-step button, .sp-top .sp-step button {
  height: 100%; min-height: 0; min-width: 26px; border: 0; border-radius: 0; padding: 0 6px !important; font-size: 14px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
}
.sr-top .sr-step button:hover, .sp-top .sp-step button:hover {
  background: color-mix(in srgb, var(--text) 16%, transparent);
}
.sr-tempo label, .sp-step output {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px;
  height: 100%; padding: 0 6px; margin: 0;
  border-inline: 1px solid var(--line); line-height: 1; white-space: nowrap;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  min-width: 0;
}
.sr-tempo input[type=number] {
  width: 32px !important; height: 100% !important; text-align: right; font-size: 13px !important; font-weight: 700;
  border: 0 !important; background: transparent; color: var(--text); padding: 0 !important; line-height: 1;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.sr-tempo input[type=number]:focus { outline: none; }
.sr-tempo small, .sp-step output small {
  font-size: 10px; font-weight: 600; opacity: .7; letter-spacing: .02em; line-height: 1;
}
.sp-step output b { font-weight: 700; }
.sp-step output.sp-bpm.is-mod { cursor: pointer; }
.sp-step output.sp-bpm.is-mod:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.sp-tpct {
  font-size: 10.5px; font-weight: 700; padding: 1px 5px; border-radius: 5px; margin-left: 2px;
  background: color-mix(in srgb, var(--text) 10%, transparent); opacity: .78; line-height: 1.25;
}
.sp-tpct.mod {
  background: color-mix(in srgb, var(--accent) 26%, transparent); opacity: 1;
}
.sp-top .sp-step button.sp-treset {
  border-left: 1px solid var(--line); min-width: 26px; padding: 0 6px !important;
  color: var(--text);
}
.sp-top .sp-step button.sp-treset .ico { width: 13px; height: 13px; }

/* Tier 2 controls: slim display strip */
.sr-sub button, .sp-sub button {
  height: var(--sub-h); box-sizing: border-box; padding: 0 9px !important;
  font-size: 12px; font-weight: 600; border-radius: 7px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); cursor: pointer;
}
.sr-sub button:hover:not(:disabled), .sp-sub button:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 14%, transparent); }
.sr-sub button:disabled, .sp-sub button:disabled { opacity: .38; cursor: default; }
.sr-sub button.on, .sp-sub button.on { background: var(--accent); color: var(--bg); border-color: transparent; }
.sr-sub .ico, .sp-sub .ico { width: 13.5px; height: 13.5px; }
.sr-zoom, .sp-zoom { display: inline-flex; align-items: center; gap: 4px; height: var(--sub-h); }
.sr-sub .sr-zoom button:not(.tb-zpct), .sp-sub .sp-zoom button:not(.tb-zpct) {
  width: var(--sub-h); min-width: var(--sub-h); height: var(--sub-h);
  padding: 0 !important; justify-content: center;
}
.tb-zpct, .sr-sub .sr-zoom button.tb-zpct, .sp-sub .sp-zoom button.tb-zpct, .pq-zoom button.tb-zpct {
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  min-width: 48px !important; width: auto !important; height: var(--sub-h, 26px);
  padding: 0 6px !important; text-align: center; color: var(--text); opacity: .9;
  white-space: nowrap; flex: 0 0 auto; box-sizing: border-box;
  border: 1px solid transparent; background: transparent; border-radius: 6px; cursor: pointer;
}
.tb-zpct:hover, .sr-sub .sr-zoom button.tb-zpct:hover, .sp-sub .sp-zoom button.tb-zpct:hover, .pq-zoom button.tb-zpct:hover {
  background: color-mix(in srgb, var(--text) 12%, transparent);
  border-color: var(--line); opacity: 1;
}

.sp-top select, .sp-range input { font-size: 12px; padding: 0 6px; }
.sp-range { height: var(--ctl-h); display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.sp-range input { width: 42px; }
.sp-file { max-width: 155px; }
.sp-grp { display: inline-flex; align-items: center; gap: 4px; }
.sp-choir { --ctl-h: 26px; padding: 4px 10px; gap: 4px; align-items: center; }
.sp-choir button, .sp-choir select { height: var(--ctl-h); box-sizing: border-box; padding-top: 0 !important; padding-bottom: 0 !important; line-height: 1; }
.sp-choir .sp-lbl { font-size: 10px; }
.sp-settings { padding: 4px 8px; }
.sp-choir, .sp-settings, .sp-custom, .sp-spots { flex: 0 1 auto; min-height: 0; overflow: auto; }
.sp-score { flex: 1 0 45%; }
.sr [data-sr="play"] { min-width: 4.6em; }
.sp-root.sp-closed .sp-choir, .sp-root.sp-closed .sp-settings, .sp-root.sp-closed .sp-custom { display: none !important; }

/* Responsive scaling across window widths (both tiers stay on 1 row each from 680px up) */
@container (max-width: 1080px) and (min-width: 680px) {
  .sr-top, .sp-top { gap: 4px; padding: 6px 8px; }
  .sr-top button, .sp-top button { padding: 0 7px; font-size: 12px; gap: 4px; }
  .sr-top .sr-tabs button { padding: 0 7px; }
  .sr-top .sr-step button, .sp-top .sp-step button { padding: 0 5px !important; min-width: 24px; }
  .tb-div { margin: 0 1px; }
}
@container (max-width: 940px) and (min-width: 680px) {
  .sr-top, .sp-top { gap: 4px; padding: 6px 8px; }
  .sr-top button, .sp-top button { padding: 0 7px; font-size: 11.5px; gap: 4px; }
  .sr-top button .ico, .sp-top button .ico { width: 14px; height: 14px; }
}
@container (max-width: 679px) {
  .sr-top, .sp-top { gap: 4px; padding: 5px 8px; }
  .sp-top button, .sr-top button { font-size: 11.5px; gap: 4px; padding: 0 7px; }
  .sr-top .sr-tabs button { font-size: 11.5px; gap: 4px; padding: 0 7px; }
  .sr-top .sr-tabs button .ico { width: 13px; height: 13px; }
  .sp-top button .ico, .sr-top button .ico { width: 14px; height: 14px; }
  .sp-top [data-sp="loop"].on .sp-looplbl { font-size: 11.5px; margin-left: 3px; }
  .sr-top > .sr-sp, .sp-top > .sr-sp, .sr-sub > .sr-sp, .sp-sub > .sr-sp { display: none; }
  .tb-lbl { display: none; }
  .sp-file { max-width: 130px; }
  .sp-choir .sp-lbl { display: none; }
}
@container (max-width: 480px) {
  .sr-top .sr-tabs button { font-size: 11.5px; gap: 3px; padding: 0 6px; }
  .sr-top .sr-tabs button .ico { display: none; }
  .sr-tempo input[type=number] { width: 28px; font-size: 12px; }
  .sr-top .sr-step button, .sp-top .sp-step button { padding: 0 5px !important; }
}

/* ---------- UI polish pass (Phase 1) ---------- */
/* Centered + / - SVG icons everywhere */
.ic-btn, .cal-adds button, .prog-add, .prog-addstep, .ie-add, .yt-addcur, .yt-lhead button, .yt-pk-new button,
.tt-step > button, .sr-step button, .sp-step button, .yt-acts button, .team .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.ic-btn .ico, .cal-adds button .ico, .prog-add .ico, .prog-addstep .ico, .ie-add .ico,
.yt-addcur .ico, .yt-lhead button .ico, .yt-pk-new button .ico, .yt-acts button .ico,
.tt-step > button .ico, .sr-step button .ico, .sp-step button .ico, .team .btn .ico {
  width: 1em; height: 1em; flex: none; vertical-align: middle;
}
.sr-step button .ico, .sp-step button .ico { width: 15px; height: 15px; }
.tt-step > button .ico { width: 20px; height: 20px; }
.p-dock button .i { display: inline-flex; align-items: center; justify-content: center; height: 18px; line-height: 1; }
.p-dock button .i .ico { width: 18px; height: 18px; display: block; }
.p-dock.dock-sm button .i { height: 14px; }
.p-dock.dock-sm button .i .ico { width: 14px; height: 14px; }
.p-dock.dock-lg button .i { height: 26px; }
.p-dock.dock-lg button .i .ico { width: 26px; height: 26px; }
.p-dock .dock-grip { color: rgba(255,255,255,.72); }

/* 1. Signal banner sits clearly below header & above windows, without covering tool popovers/menus */
.p-signal { top: 4.8em; z-index: 42; }
.present.stage-max .p-signal { top: 3.6em; }

/* 2. Paused timer visual state */
.p-timer .tl { display: flex; align-items: center; gap: 6px; }
.p-timer .tl-paused { background: var(--accent); color: var(--bg); font-size: .75em; padding: 1px 7px; border-radius: 99px; letter-spacing: .04em; font-weight: 800; }
.p-timer .tl-paused[hidden] { display: none; }
.p-timer.paused { border-style: dashed; border-color: color-mix(in srgb, var(--accent) 72%, transparent); }
.p-timer.paused .ringwrap, .p-timer.paused .tv { opacity: .65; }

/* 3. Quick Edit agenda layout & subtle themed scrollbars */
.agenda.editing li { flex-direction: column; align-items: stretch; gap: .38em; padding: .55em .65em; }
.agenda.editing .ag-top { display: flex; align-items: flex-start; gap: .5em; min-width: 0; }
.agenda.editing .ag-text { flex: 1; min-width: 0; overflow-wrap: break-word; line-height: 1.3; padding: 1px 3px; }
.agenda.editing .ag-meta { display: flex; align-items: center; gap: .5em; padding-left: 1.85em; }
.agenda.editing .ag-minw { display: inline-flex; align-items: center; gap: 4px; font-size: .82em; opacity: .9; }
.agenda.editing .ag-min { width: 4.2em; min-width: 50px; text-align: center; padding: 3px 5px; }
.agenda.editing .ag-x { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; }
.ie-ev input[data-ie-evtext] { flex: 1 1 100%; }
.p-side, .wg-host, .sr-host, .sr-staff, .sp-score, .pq-staff, .mu-host, .score-host { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--text) 28%, transparent) transparent; }
.p-side::-webkit-scrollbar, .wg-host::-webkit-scrollbar, .sr-host::-webkit-scrollbar, .sr-staff::-webkit-scrollbar, .sp-score::-webkit-scrollbar, .pq-staff::-webkit-scrollbar, .mu-host::-webkit-scrollbar, .score-host::-webkit-scrollbar { width: 7px; height: 7px; }
.p-side::-webkit-scrollbar-track, .wg-host::-webkit-scrollbar-track, .sr-host::-webkit-scrollbar-track, .sr-staff::-webkit-scrollbar-track, .sp-score::-webkit-scrollbar-track, .pq-staff::-webkit-scrollbar-track, .mu-host::-webkit-scrollbar-track, .score-host::-webkit-scrollbar-track { background: transparent; }
.p-side::-webkit-scrollbar-thumb, .wg-host::-webkit-scrollbar-thumb, .sr-host::-webkit-scrollbar-thumb, .sr-staff::-webkit-scrollbar-thumb, .sp-score::-webkit-scrollbar-thumb, .pq-staff::-webkit-scrollbar-thumb, .mu-host::-webkit-scrollbar-thumb, .score-host::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--text) 26%, transparent); border-radius: 99px; }

/* 4. Light themes (Paper, Sky, Mint, Sunshine) contrast + Progress layout + Class-colored dock & PDF toggles */
.wg-host button { background: color-mix(in srgb, var(--text) 10%, transparent); }
.wg-host button:hover { background: color-mix(in srgb, var(--text) 18%, transparent); }
.cal-show button.on { background: color-mix(in srgb, var(--text) 20%, transparent) !important; }
.cal-d { background: color-mix(in srgb, var(--text) 7%, transparent); }
.cal-d:hover { background: color-mix(in srgb, var(--text) 13%, transparent); }
.cal-d.off { background: color-mix(in srgb, var(--text) 14%, transparent); }
.cal-day { border-left-color: color-mix(in srgb, var(--text) 16%, transparent); }
.cal-day input, .cal-day select, .cal-day textarea,
.prog-labels input, .rec-opts select, .rec-opts input[type=number],
.rec-ctl select, .rec-name input, .rec-info input:focus,
.yt-bar input, .yt-lhead select, .yt-pk-new input {
  background: color-mix(in srgb, var(--text) 8%, transparent);
  border-color: color-mix(in srgb, var(--text) 20%, transparent);
}
.cal-evrow, .prog-item, .rec-live, .rec-review, .rec-player-card { background: color-mix(in srgb, var(--text) 7%, transparent); }
.prog-title:focus, .prog-notes:focus, .prog-step input:focus, .rec-item:hover, .yt-item:hover, .side-prog .sp-step:hover {
  background: color-mix(in srgb, var(--text) 9%, transparent);
}
.light { box-shadow: 0 0 0 2px color-mix(in srgb, var(--text) 22%, transparent); }
.pg-chk { border: 2px solid color-mix(in srgb, var(--text) 48%, transparent) !important; }
.prog-bar, .sp-bar, .rec-lvl { background: color-mix(in srgb, var(--text) 18%, transparent); }
.rec-big { background: color-mix(in srgb, var(--text) 10%, transparent) !important; border-color: color-mix(in srgb, var(--text) 55%, transparent) !important; }
canvas.rec-wave { color: color-mix(in srgb, var(--text) 85%, transparent); }
.yt-side { border-left-color: color-mix(in srgb, var(--text) 14%, transparent); }
@container (max-width: 620px) { .yt-side { border-top-color: color-mix(in srgb, var(--text) 14%, transparent); } }
.prog-row { flex-wrap: wrap; row-gap: 6px; }
.prog-title { flex: 1 1 180px; min-width: 140px; }

.p-dock.dock-class { color: var(--bg); }
.p-dock.dock-class button, .p-dock.dock-class select { color: var(--bg); }
.p-dock.dock-class button:hover, .p-dock.dock-class button.on { background: color-mix(in srgb, var(--bg) 16%, transparent); }
.p-dock.dock-class .sep { background: color-mix(in srgb, var(--bg) 25%, transparent); }
.p-dock.dock-class .dock-grip { color: color-mix(in srgb, var(--bg) 65%, transparent); }
.p-dock.dock-class select { background: color-mix(in srgb, var(--bg) 12%, transparent); }
.pdfv-abar button.on, .pdfv-bar [data-pdf="annot"].on, .pdfv-bar [data-pdf="two"].on {
  background: var(--accent, #e76f51); color: var(--bg, #1d2330);
}

/* 5. Setup responsive layout, active tab clarity & dark-mode fixes */
.card-head { flex-wrap: wrap; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
.tab.on { font-weight: 700; box-shadow: inset 0 -2px 0 var(--e-accent); }
.tab:hover:not(.on) { background: color-mix(in srgb, var(--e-text) 6%, transparent); }
.look-panel input, .look-panel select { background: #fff; color: #1d2330; border-color: #d3d7e0; }
@media (prefers-color-scheme: dark) {
  .backup-row { background: rgba(255,255,255,.06); }
  .upd-status { background: #262a34; color: #e8eaf0; }
  .upd-status.upd-ok { background: #173321; color: #7ee29f; }
  .upd-status.upd-todo { background: #3a2d12; color: #ffd073; }
  .upd-status.upd-bad { background: #3b191d; color: #ff9c9c; }
  .upd-status.upd-busy { background: #1c2942; color: #9bc0ff; }
}
@media (max-width: 860px) {
  .e-main { padding: 12px; }
  .split { grid-template-columns: 1fr; }
  .auto-row { grid-template-columns: 24px 1fr 28px; }
  .auto-when { grid-column: 2; }
  .auto-fields { grid-column: 2; }
  .week, .days14 { grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); }
}

/* 6. Sight Reading & Score Practice control sizing + collapsed dock icon */
.sr-top, .sp-top, .sp-choir { --ctl-h: 34px; }
@media (pointer: coarse) { .sr-top, .sp-top, .sp-choir { --ctl-h: 40px; } }
.sr-settings .sr-mstep { height: 32px; align-items: stretch; border-radius: 8px; }
.sr-settings .sr-mstep button { min-width: 30px; min-height: 0; padding: 0 7px; font-size: 14px; }
.sr-settings .sr-mstep input[type=number] { width: 42px !important; font-size: 14px !important; padding: 0 2px !important; }
.dock-idle-ic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); opacity: 0; pointer-events: none; transition: opacity .25s; display: inline-flex; align-items: center; justify-content: center; }
.dock-idle-ic .ico { width: 20px; height: 20px; }
.p-dock.hidden > .dock-idle-ic { opacity: .82; }

/* 7. Tuner transposition pill in Ensemble view + Metronome beat dot wrapping */
.tu-trans-pill { background: var(--accent); color: var(--bg); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.me-dots { flex-wrap: wrap; max-width: 100%; }
.mu .me-dot { padding: 0; border-radius: 50%; }

/* 8. Solid legible popovers (no warm-up text bleed-through) */
.win-menu, .dock-more-menu, .dock-custom, .look-panel, .group-menu, .snap-menu, .bm-menu {
  background: #fafbfd; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(29,35,48,.12);
}

/* 9 & 10. PDF bar narrow/touch + Whiteboard undo + Touch hover-fallbacks + Focus rings */
.pdfv-bar { max-width: calc(100% - 16px); overflow-x: auto; }
.pdf-host:focus-within .pdfv-bar { opacity: 1; }
.ink-bar button:disabled { opacity: .35; cursor: default; }
.prog-step:focus-within .prog-sx, .yt-item:focus-within .yt-acts, .p-split:focus-within .p-split-btn { opacity: .85; }
@media (hover: none), (pointer: coarse) {
  .pdfv-bar, .p-split-btn, .prog-tools, .prog-sx, .yt-acts { opacity: .82 !important; }
}
button:focus-visible, [tabindex]:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent, var(--e-accent)); outline-offset: 2px;
}

/* ---------- Feature 1: Classroom Piano & Vocal Warm-Up Sequencer ---------- */
.wm-grid.wm-music { grid-template-columns: repeat(4, 1fr); }
.pn { display: flex; flex-direction: column; height: 100%; padding: 10px 12px; gap: 10px; box-sizing: border-box; outline: none; }
.pn-bar, .pn-chords, .pq-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.pn-grp, .pn-seg { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.wg-host .pn-grp button, .wg-host .pn-seg button { border-radius: 0; padding: 5px 9px; font-size: 12.5px; }
.wg-host .pn-seg button.on, .wg-host .pn-bar button.on { background: var(--accent); color: var(--bg); font-weight: 700; }
.wg-host .pn-bar button[data-pn="seq-toggle"].on { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--text); border: 1px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.mu .me-start { background: var(--accent); color: var(--bg); border-color: transparent; font-weight: 700; }
.pn-oct { display: inline-flex; align-items: center; padding: 0 8px; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.pn-sel, .pq-row label { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; font-size: 12.5px; }
.pn select, .pn input[type=number] { background: rgba(255,255,255,.94); color: #1d2330; border: 1px solid rgba(0,0,0,.18); border-radius: 7px; padding: 4px 6px; font-size: 12.5px; }
.pn input[type=number] { width: 58px; text-align: center; }
.pn-clbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .65; margin-right: 2px; }
.wg-host .pn-chords button { padding: 4px 10px; font-size: 12.5px; font-weight: 700; min-width: 34px; }
.pn-hint { margin-left: auto; font-size: 11.5px; opacity: .55; }
.pn-keys { position: relative; display: flex; flex: 1 1 120px; min-height: 100px; max-height: 220px; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 18px rgba(0,0,0,.22); touch-action: none; user-select: none; }
.wg-host .pn-keys .pk-key { padding: 0; border-radius: 0 0 7px 7px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; font-weight: 700; transition: background .06s, transform .05s; position: relative; }
.wg-host .pn-keys .wk { flex: 1; background: #fafbfd; color: #242b38; border: 1px solid rgba(0,0,0,.2); padding-bottom: 8px; font-size: 12px; }
.wg-host .pn-keys .wk.is-do { background: color-mix(in srgb, var(--accent) 22%, #fafbfd); }
.wg-host .pn-keys .wk:hover { background: #eef1f8; }
.wg-host .pn-keys .bk { position: absolute; top: 0; height: 63%; z-index: 2; background: #1d2330; color: #e2e6f0; border: 1px solid #0b0e14; padding-bottom: 5px; font-size: 10px; box-shadow: 0 4px 8px rgba(0,0,0,.35); }
.wg-host .pn-keys .bk.is-do { background: color-mix(in srgb, var(--accent) 44%, #1d2330); border-color: var(--accent); }
.wg-host .pn-keys .bk:hover { background: #2f394e; }
.wg-host .pn-keys .pk-key.lit { background: var(--accent) !important; color: var(--bg) !important; transform: translateY(2px); }
.pn-keys button span, .pn-keys button kbd { pointer-events: none; }
.pk-txt { display: flex; flex-direction: column; align-items: center; line-height: 1.05; }
.pk-enh { display: flex; flex-direction: column; align-items: center; line-height: 1.05; gap: 1px; }
.pk-enh b { font-size: 10px; font-weight: 800; letter-spacing: -.02em; }
.pk-enh small { font-size: 8.5px; font-weight: 600; opacity: .82; letter-spacing: -.02em; }
.pk-kbd { font-family: inherit; font-size: 9.5px; font-weight: 700; line-height: 1; padding: 2px 4px; border-radius: 4px; opacity: .72; }
.wk .pk-kbd { background: rgba(29,35,48,.1); color: #242b38; margin-bottom: 2px; }
.bk .pk-kbd { position: absolute; top: 5px; background: rgba(255,255,255,.28); color: #ffffff; font-size: 9px; padding: 1px 4px; opacity: .95; }
.pk-key.lit .pk-kbd { background: rgba(0,0,0,.22); color: inherit; opacity: .95; }
.pn-seq { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--text) 7%, transparent); border: 1px solid var(--line); }
.pq-staff-wrap { position: relative; display: flex; flex-direction: column; min-height: 88px; max-height: 360px; border-radius: 10px; background: #fff; color: #1d2330; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); overflow: hidden; }
.pq-staff { flex: 1; min-height: 0; padding: 4px 8px 10px; display: flex; align-items: center; justify-content: center; overflow: auto; }
.pq-staff svg { width: auto; height: auto; display: block; flex: none; }
.pq-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 11px; display: flex; align-items: center; justify-content: center; cursor: ns-resize; user-select: none; touch-action: none; background: linear-gradient(transparent, rgba(0,0,0,.04)); }
.pq-resize span { width: 36px; height: 3.5px; border-radius: 99px; background: rgba(29,35,48,.24); transition: background .12s, width .12s; }
.pq-resize:hover span { background: var(--accent, #2563eb); width: 48px; }
.pq-zoom button:not(.tb-zpct) { width: 26px; min-width: 26px; height: 26px; padding: 0 !important; border-radius: 7px; border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 6%, transparent); color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pq-zoom button:not(.tb-zpct):hover:not(:disabled) { background: color-mix(in srgb, var(--text) 14%, transparent); }
.pq-zoom button:disabled { opacity: .38; cursor: default; }
.pq-zoom .ico { width: 13.5px; height: 13.5px; }
.pq-staff .sr-cur path, .pq-staff .sr-cur rect, .pq-staff .sr-cur text { fill: #e76f51 !important; stroke: #e76f51 !important; }
.pq-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pq-meta { display: flex; align-items: baseline; gap: 8px; }
.pq-key { font-size: 1.35em; font-weight: 800; color: var(--accent); }
.pq-cnt { font-size: 12px; opacity: .7; font-weight: 600; }
.pq-syls { display: flex; flex-wrap: wrap; gap: 4px; }
.pq-syl { padding: 3px 8px; border-radius: 99px; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--text) 10%, transparent); transition: background .08s, transform .08s; }
.pq-syl.on { background: var(--accent); color: var(--bg); transform: scale(1.1); }
.wg-host .pn-primary { background: var(--accent) !important; color: var(--bg) !important; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.pn-chk { font-weight: 500 !important; cursor: pointer; }
.pn-chk input { accent-color: var(--accent); }

/* ---------- Feature 2: Rehearsal Backing-Track & Reference Audio Player ---------- */
.aud-host { position: absolute; inset: 0; overflow: auto; background: var(--surface, var(--card)); color: var(--text); }
.aud { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; min-height: 100%; box-sizing: border-box; outline: none; }
.aud-head { display: flex; align-items: center; gap: 10px; }
.aud-title { display: inline-flex; align-items: center; gap: 8px; font-size: 1.1em; min-width: 0; }
.aud-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aud-time { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; opacity: .85; white-space: nowrap; }
.aud-wavewrap { position: relative; border-radius: 12px; background: color-mix(in srgb, var(--text) 7%, transparent); border: 1px solid var(--line); padding: 8px; }
canvas.aud-wave { width: 100%; height: 112px; display: block; cursor: pointer; touch-action: none; }
.aud-wstatus { position: absolute; inset: 0; display: grid; place-items: center; font-size: 56px; font-weight: 900; color: var(--accent); background: color-mix(in srgb, var(--bg) 65%, transparent); border-radius: 11px; pointer-events: none; }
.aud-wstatus[hidden] { display: none; }
.aud-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.aud button { font: inherit; color: inherit; background: color-mix(in srgb, var(--text) 10%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 6px 11px; cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.aud button:hover { background: color-mix(in srgb, var(--text) 18%, transparent); }
.aud button.on, .aud .aud-primary { background: var(--accent); color: var(--bg); border-color: transparent; font-weight: 700; }
.aud-sp { flex: 1; }
.aud-speeds { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.aud-speeds button { border: none; border-radius: 0; padding: 5px 8px; font-size: 12.5px; }
.aud-sub { font-size: 12.5px; opacity: .9; }
.aud-chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.aud-chk input { accent-color: var(--accent); }
.aud-bpm { display: inline-flex; align-items: center; gap: 5px; }
.aud-bpm input { width: 56px; text-align: center; background: rgba(255,255,255,.94); color: #1d2330; border: 1px solid rgba(0,0,0,.18); border-radius: 7px; padding: 3px 5px; }
.aud-hint { font-size: 11.5px; opacity: .6; }
.aud-marks-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
.aud-mlbl { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.aud-mlist { display: flex; flex-wrap: wrap; gap: 6px; flex-basis: 100%; margin-top: 2px; }
.aud-mk { display: inline-flex; }
.aud-mk button { border-radius: 99px 0 0 99px; padding: 4px 10px; font-size: 12.5px; background: color-mix(in srgb, #ff6b6b 18%, transparent); border-color: color-mix(in srgb, #ff6b6b 35%, transparent); }
.aud-mk button b { font-variant-numeric: tabular-nums; opacity: .8; margin-right: 3px; }
.aud-mk .x { border-radius: 0 99px 99px 0; padding: 4px 7px; margin-left: -1px; }
.aud-mnone { font-size: 12.5px; opacity: .6; }

/* ---------- Feature 5: Interactive Solfege Ladder, Curwen Hand Signs & Echo Board ---------- */
.sb { display: flex; flex-direction: column; height: 100%; padding: 10px 12px; gap: 10px; box-sizing: border-box; outline: none; }
.sb-bar { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.sb-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; }
.sb-echo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.sb-bar label { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; font-size: 12px; }
.sb select { background: rgba(255,255,255,.94); color: #1d2330; border: 1px solid rgba(0,0,0,.18); border-radius: 7px; padding: 3px 6px; font-size: 12px; }
.wg-host .sb-bar button { padding: 4px 9px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.wm-tile.on { background: color-mix(in srgb, var(--e-accent, #3b6cf6) 16%, transparent); color: var(--e-accent, #3b6cf6); outline: 1.5px solid color-mix(in srgb, var(--e-accent, #3b6cf6) 45%, transparent); }
.wg-host .sb-bar button.on, .wg-host .sb .sb-primary { background: var(--accent) !important; color: var(--bg) !important; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.sb-echo { padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--text) 7%, transparent); border: 1px solid var(--line); }
.sb-elbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .7; }
.sb-elist { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.sb-ehint { font-size: 12px; opacity: .65; }
.sb-echo-item { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; padding: 3px 10px; border-radius: 99px; font-weight: 800; font-size: 13px; background: color-mix(in srgb, var(--text) 14%, transparent); transition: transform .12s, box-shadow .12s; }
.sb.is-col .sb-echo-item.rev { background: var(--sb-bg, var(--accent)); color: var(--sb-fg, var(--bg)); }
.sb-echo-item.hid { background: color-mix(in srgb, var(--accent) 26%, transparent); border: 1px dashed var(--accent); }
.sb-echo-item.lit { transform: scale(1.18); box-shadow: 0 0 0 3px var(--accent); }
.sb-tiles { flex: 1; min-height: 0; overflow: auto; display: grid; grid-auto-rows: minmax(32px, 1fr); gap: 5px; padding: 2px; }
.sb.is-ladder.is-dense .sb-tiles { grid-auto-rows: minmax(26px, 1fr); gap: 4px; }
.sb.is-grid .sb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); grid-auto-rows: auto; align-content: start; gap: 8px; }
.wg-host .sb-tile { position: relative; display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 5px; border-radius: 11px; border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text); text-align: left; transition: transform .08s, filter .1s, box-shadow .1s; box-sizing: border-box; overflow: hidden; }
.sb.is-ladder .sb-tile { height: 100%; min-height: 0; }
.sb.is-ladder.is-dense .sb-tile { padding: 3px 11px 3px 4px; gap: 9px; border-radius: 9px; }
.sb.is-ladder .sb-tile.is-low { opacity: .94; }
.sb.is-grid .sb-tile { flex-direction: column; justify-content: center; text-align: center; padding: 10px 8px; gap: 5px; min-height: 104px; }
.sb.is-col .sb-tile { background: var(--sb-bg, var(--accent)); color: var(--sb-fg, #fff); border-color: rgba(0,0,0,.15); }
.sb.is-col .sb-tile.is-alt { filter: saturate(.75) brightness(.88); border-style: dashed; }
.wg-host .sb-tile:hover { filter: brightness(1.08); }
.wg-host .sb-tile.lit { transform: scale(.98); box-shadow: 0 0 0 3px #fff, 0 0 18px var(--accent); filter: brightness(1.18); }
.sb-hand-wrap { display: inline-flex; align-items: center; justify-content: center; height: 100%; max-height: 54px; min-height: 18px; aspect-ratio: 1.55 / 1; width: auto; border-radius: 7px; background: rgba(255,255,255,.96); padding: 2px 3px; box-sizing: border-box; flex: none; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.sb.is-ladder.is-dense .sb-hand-wrap { border-radius: 6px; padding: 1.5px 2.5px; }
.sb.is-grid .sb-hand-wrap { width: 84px; height: 56px; max-height: none; aspect-ratio: auto; padding: 3px 5px; border-radius: 10px; }
.sb-hand-img, .win-body .sb-hand-img, .wg-host .sb-hand-img { position: static; inset: auto; max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; background: transparent; border: 0; }
.sb-syl { font-size: 1.25em; font-weight: 800; letter-spacing: .01em; line-height: 1.1; }
.sb.is-ladder.is-dense .sb-syl { font-size: 1.12em; }
.sb-note { font-size: .85em; font-weight: 700; opacity: .85; }
.sb-kbd { margin-left: auto; font-family: inherit; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: rgba(0,0,0,.2); opacity: .82; }
.sb.is-grid .sb-kbd { position: absolute; top: 5px; right: 6px; margin: 0; }

/* ---------- Feature 6: Printable Sight-Reading Worksheets (with live SVG preview & swap) ---------- */
.sr-ws-card { width: min(92vw, 440px); text-align: left; align-items: stretch; }
.sr-ws-card.sr-ws-wide { width: min(94vw, 840px); max-height: 88vh; display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; }
.sr-ws-card h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.sr-ws-top { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.sr-ws-top .grow { flex: 1; }
.sr-ws-top button { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.sr-ws-opts { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; font-size: 13px; }
.sr-ws-opts label.fld { display: flex; flex-direction: column; align-items: stretch; gap: 3px; font-weight: 600; font-size: 12px; color: #4a5264; text-align: left; }
.sr-ws-opts input[type=text], .sr-ws-opts input:not([type]), .sr-ws-opts select { background: #fff; color: #1d2330; border: 1px solid #d3d7e0; border-radius: 7px; padding: 5px 8px; font-size: 13px; }
.sr-ws-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-size: 13px; }
.sr-ws-checks label.chk { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.sr-ws-prev { flex: 1; min-height: 220px; max-height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 8px; border-radius: 10px; background: #eef0f5; border: 1px solid #d8dce6; }
.sr-ws-item { background: #fff; border: 1px solid #dce0ea; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.sr-ws-ih { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #3a4252; }
.sr-ws-ih b { font-size: 13px; color: #1d2330; }
.sr-ws-ih button { border: 1px solid #d3d7e0; background: #f8f9fc; color: #1d2330; border-radius: 6px; padding: 3px 8px; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sr-ws-ih button:hover:not(:disabled) { background: #e9edf7; border-color: #b8c0d4; }
.sr-ws-ih button:disabled { opacity: .35; cursor: default; }
.sr-ws-paper { overflow-x: auto; padding: 2px 0; }
.sr-ws-paper svg { max-width: 100%; height: auto; display: block; }
.sr-ws-form { display: flex; flex-direction: column; gap: 10px; }
.sr-ws-form input[type=text], .sr-ws-form input:not([type]), .sr-ws-form select { background: #fff; color: #1d2330; border: 1px solid #d3d7e0; }
@media print {
  #print-area .sr-ws-hdr { display: flex; justify-content: space-between; gap: 12pt; font-size: 10.5pt; margin: 8pt 0 14pt; padding-bottom: 6pt; border-bottom: 1px solid #bbb; }
  #print-area .sr-ws-ex { display: flex; align-items: flex-start; gap: 8pt; margin-bottom: 14pt; page-break-inside: avoid; }
  #print-area .sr-ws-num { font-weight: 700; font-size: 13pt; min-width: 18pt; padding-top: 10pt; }
  #print-area .sr-ws-svg { flex: 1; min-width: 0; }
  #print-area .sr-ws-svg svg { max-width: 100%; height: auto; }
  #print-area .sr-ws-key { page-break-before: always; padding-top: 4pt; }
}

/* ---------- Companion Floating Mini-HUD (resizable 220x64..720x220 + Apps preview drawer) ---------- */
.p-companion { display: none; }
.present.companion {
  grid-template-rows: 1fr;
  width: 100vw; height: 100vh;
  padding-top: 0 !important;
  border-radius: 14px;
  overflow: hidden;
}
.present.companion .p-head,
.present.companion .p-body,
.present.companion .p-wins,
.present.companion .p-timers,
.present.companion .p-signal,
.present.companion #win-menu-host,
.present.companion .ink { display: none !important; }
.present.companion .p-companion {
  display: flex; flex-direction: column; justify-content: flex-start; gap: 7px;
  width: 100%; height: 100%; min-height: 0;
  padding: 9px 12px 10px; box-sizing: border-box;
  position: relative; z-index: 60;
  font-size: 13px; line-height: 1.25; white-space: nowrap; overflow: hidden;
  background: color-mix(in srgb, var(--bg, #132232) 96%, #0d1624);
  color: var(--text, #f3f6fc);
  border: 1.5px solid color-mix(in srgb, var(--accent) 62%, var(--line));
  border-radius: 14px;
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text) 12%, transparent);
  user-select: none; -webkit-user-select: none;
  container-type: size;
}
.comp-row1 {
  display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; flex: none; overflow: hidden;
}
.comp-meta { display: flex; align-items: center; gap: 6px; min-width: 0; margin-left: auto; flex: none; }
.comp-spacer { flex: 1; }
.comp-back {
  border: none; border-radius: 8px; padding: 5px 9px; font-size: 11.5px; font-weight: 800;
  background: var(--accent); color: var(--bg); cursor: pointer; flex: none;
  display: inline-flex; align-items: center; gap: 4px; line-height: 1.1;
}
.comp-back.sm { padding: 3px 7px; font-size: 11px; }
.comp-back:hover { filter: brightness(1.08); }
.comp-back-short { display: none; }
.comp-apps-btn {
  border: 1px solid color-mix(in srgb, var(--text) 24%, transparent);
  background: color-mix(in srgb, var(--text) 12%, transparent);
  color: var(--text); border-radius: 8px; padding: 4px 7px; font-size: 11px; font-weight: 700;
  cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 4px; line-height: 1.1;
}
.comp-apps-btn:hover { background: color-mix(in srgb, var(--text) 20%, transparent); }
.comp-apps-btn .ico { width: 12px; height: 12px; }
.comp-cnt {
  background: var(--accent); color: var(--bg); font-size: 10px; font-weight: 800;
  padding: 0 5px; border-radius: 99px; line-height: 1.4;
}
.comp-clock {
  font-weight: 800; font-size: 13.5px; font-variant-numeric: tabular-nums;
  color: var(--clock-text, var(--text)); flex: none;
}
.comp-left-t {
  opacity: .95; font-variant-numeric: tabular-nums; font-size: 11px; font-weight: 700;
  padding: 2px 6px; border-radius: 99px;
  background: color-mix(in srgb, var(--text) 15%, transparent); color: var(--text);
  max-width: 96px; overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto;
}
.comp-cls {
  font-weight: 800; font-size: 12px; color: var(--title-text, var(--text));
  overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; max-width: 140px;
}
/* Agenda-first Hero Block inside Floating Mini-HUD */
.comp-agenda {
  flex: 1 1 0; min-height: 0; width: 100%;
  display: flex; align-items: stretch; gap: 6px; overflow: hidden;
  padding-top: 3px; border-top: 1px solid color-mix(in srgb, var(--text) 14%, transparent);
}
.comp-agenda-list {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; overflow: hidden;
}
.comp-ag-line {
  display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden;
  color: var(--text); line-height: 1.25;
}
.comp-ag-now { font-size: 13.5px; font-weight: 700; opacity: 1; }
.comp-ag-next1, .comp-ag-next2, .comp-ag-next3, .comp-ag-next4 {
  display: none; font-size: 12px; font-weight: 600; opacity: .86;
}
.comp-ag-txt { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comp-ag-min { font-size: 10.5px; font-weight: 700; opacity: .75; flex: none; font-variant-numeric: tabular-nums; }
.comp-now-tag {
  font-size: 9.5px; font-weight: 800; letter-spacing: .04em;
  padding: 2px 5px; border-radius: 5px; flex: none;
  background: var(--accent); color: var(--bg); line-height: 1.1;
}
.comp-next-tag, .comp-num-tag {
  font-size: 9.5px; font-weight: 800; letter-spacing: .03em; flex: none;
  padding: 1px 5px; border-radius: 5px;
  background: color-mix(in srgb, var(--text) 16%, transparent); color: var(--text); line-height: 1.2;
}
.comp-ag-nav {
  display: none; flex-direction: column; justify-content: center; gap: 3px; flex: none;
}
.comp-ag-nav button {
  width: 22px; height: 22px; padding: 0; border-radius: 6px; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text);
  font-size: 14px; font-weight: 700; line-height: 1; display: grid; place-items: center;
}
.comp-ag-nav button:hover { background: color-mix(in srgb, var(--text) 22%, transparent); }
.comp-timer {
  padding: 2px 7px; border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 26%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 11px; flex: none;
}
.comp-timer.extra { display: none; }
.comp-sig {
  padding: 2px 7px; border-radius: 99px; font-weight: 700; font-size: 11px; color: #fff;
  max-width: 92px; overflow: hidden; text-overflow: ellipsis; flex: none;
}
.comp-chip {
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  background: color-mix(in srgb, var(--text) 9%, transparent);
  color: var(--text); border-radius: 8px; padding: 3px 7px; font-size: 11px; font-weight: 600;
  cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 5px; max-width: 140px;
}
.comp-chip:hover { background: color-mix(in srgb, var(--text) 18%, transparent); }
.comp-chip img { width: 14px; height: 14px; border-radius: 3px; flex: none; object-fit: contain; }
.comp-chip .ico { width: 12px; height: 12px; flex: none; }
.comp-chip span { overflow: hidden; text-overflow: ellipsis; }
.comp-chip.pin-cur { border-style: dashed; }
.comp-next-step { font-size: 11px; opacity: .72; overflow: hidden; text-overflow: ellipsis; }
.comp-grip {
  position: absolute; right: 3px; bottom: 3px; width: 11px; height: 11px; pointer-events: none;
  opacity: .42; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 35%, currentColor 35% 47%, transparent 47% 62%, currentColor 62% 74%, transparent 74%);
  border-bottom-right-radius: 4px;
}
/* Companion inline Apps & Previews drawer */
.comp-apps-panel {
  display: flex; flex-direction: column; gap: 6px; width: 100%; height: 100%; min-height: 0; overflow: hidden;
}
.comp-apps-head {
  display: flex; align-items: center; gap: 5px; flex: none; min-width: 0;
}
.comp-apps-title { font-weight: 800; font-size: 11.5px; opacity: .85; }
.comp-cur-pin {
  border: 1px solid color-mix(in srgb, var(--text) 22%, transparent);
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text); border-radius: 99px; padding: 2px 7px; font-size: 10.5px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: 3px; max-width: 120px; overflow: hidden;
}
.comp-cur-pin.on { background: var(--accent); color: var(--bg); border-color: transparent; }
.comp-cur-pin span { overflow: hidden; text-overflow: ellipsis; }
.comp-cur-pin .ico { width: 11px; height: 11px; flex: none; }
.comp-icon-btn {
  border: none; background: color-mix(in srgb, var(--text) 10%, transparent); color: var(--text);
  border-radius: 6px; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex: none; padding: 0;
}
.comp-icon-btn:hover { background: color-mix(in srgb, var(--text) 20%, transparent); }
.comp-icon-btn .ico { width: 12px; height: 12px; }
.comp-apps-strip {
  flex: 1 1 0; min-height: 0; display: flex; align-items: stretch; gap: 6px;
  overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; scrollbar-width: thin;
}
.comp-app-card {
  position: relative; flex: none; width: 108px; display: flex; flex-direction: column;
  border-radius: 8px; overflow: hidden;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
}
.comp-app-card.is-pinned { border-color: color-mix(in srgb, var(--accent) 65%, transparent); }
.comp-app-go {
  border: none; background: transparent; color: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: stretch; flex: 1; min-height: 0; padding: 0; text-align: left;
}
.comp-app-go:hover { background: color-mix(in srgb, var(--text) 10%, transparent); }
.comp-app-thumb {
  position: relative; flex: 1; min-height: 28px; display: grid; place-items: center;
  background: rgba(0, 0, 0, .22); overflow: hidden;
}
.comp-app-thumb.has-prev img:first-child { width: 100%; height: 100%; object-fit: cover; display: block; }
.comp-app-badge {
  position: absolute; left: 3px; bottom: 3px; width: 16px; height: 16px; border-radius: 4px;
  background: rgba(0, 0, 0, .55); padding: 1px; object-fit: contain;
}
.comp-app-ic { width: 22px; height: 22px; object-fit: contain; }
.comp-app-name {
  font-size: 10.5px; font-weight: 700; padding: 3px 20px 3px 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.comp-app-pin {
  position: absolute; right: 2px; bottom: 2px; width: 18px; height: 18px; padding: 0;
  border: none; border-radius: 5px; background: color-mix(in srgb, var(--bg) 75%, transparent);
  color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: .75;
}
.comp-app-pin:hover, .comp-app-pin.on { opacity: 1; }
.comp-app-pin.on { background: var(--accent); color: var(--bg); }
.comp-app-pin .ico { width: 11px; height: 11px; }
.comp-apps-empty { font-size: 11.5px; opacity: .75; align-self: center; padding: 4px; }

@container (max-width: 315px) {
  .comp-back-full { display: none; }
  .comp-back-short { display: inline; }
  .comp-apps-lbl { display: none; }
  .comp-cls { display: none; }
}
@container (max-width: 280px) {
  .comp-left-t, .comp-timer { display: none; }
}
@container (min-width: 340px) {
  .comp-ag-nav { display: flex; }
}
@container (min-width: 440px) {
  .comp-cls { max-width: 220px; }
  .comp-timer.extra { display: inline-flex; }
  .comp-ag-now { font-size: 14.5px; }
}
@container (min-height: 98px) {
  .comp-ag-next1 { display: flex; }
}
@container (min-height: 132px) {
  .comp-ag-next2 { display: flex; }
  .comp-agenda-list { justify-content: flex-start; gap: 5px; }
  .comp-ag-now { font-size: 14.5px; }
}
@container (min-height: 168px) {
  .comp-ag-next3 { display: flex; }
  .comp-ag-now { font-size: 15.5px; }
  .comp-ag-next1, .comp-ag-next2, .comp-ag-next3 { font-size: 13px; }
}
@container (min-height: 210px) {
  .comp-ag-next4 { display: flex; }
}
@container (min-height: 145px) {
  .comp-apps-strip { flex-wrap: wrap; overflow-x: hidden; overflow-y: auto; align-content: flex-start; }
  .comp-app-card { width: 122px; height: 86px; }
}

/* ---------- Stage tabs (2-zone: scrollable left + permanently anchored top-right cluster) ---------- */
.stage-tabs {
  display: flex; align-items: center; gap: .35em; padding: .42em .5em;
  border-bottom: 1px solid var(--line); overflow: hidden;
}
.stage-tabs-scroll {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: .3em;
  overflow-x: auto; scrollbar-width: none;
}
.stage-tabs-scroll::-webkit-scrollbar { display: none; }
.stage-tabs-end {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  padding-left: 6px; border-left: 1px solid var(--line);
}

/* ---------- Stage web address/search bar, Embedded/Full-browser popover & native clipping ---------- */
.present.has-native .sp-ph { will-change: auto; }
.p-body { z-index: 1; isolation: isolate; }
.p-stage, .stage-content, .stage-content iframe, .stage-content video, .stage-content img.res { z-index: 0; }
.p-wins { z-index: 10; isolation: isolate; }
.win { isolation: isolate; }
.win:not(.native) { transform: translateZ(0); }
.res-ico { display: inline-flex; align-items: center; justify-content: center; color: var(--e-muted); }
.res-ico .ico { width: 18px; height: 18px; }
.stage-webbar {
  display: flex; align-items: center; gap: 6px; padding: 5px 10px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
.stage-webbar[hidden] { display: none !important; }
.stage-webbar button {
  border: none; background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text); cursor: pointer; padding: 4px 9px; min-width: 30px; min-height: 28px;
  border-radius: 7px; font-size: 13px; line-height: 1; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap;
}
.stage-webbar button.swb-nav { font-size: 16px; font-weight: 700; }
.stage-webbar button.mode { border: 1px solid color-mix(in srgb, var(--text) 24%, transparent); }
.stage-webbar button.on, .win-bar button.web-mode-btn.on { background: var(--accent); color: var(--bg); border-color: transparent; }
.stage-webbar button:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 18%, transparent); }
.stage-webbar button.on:hover:not(:disabled) { filter: brightness(1.08); background: var(--accent); }
.stage-webbar button:disabled { opacity: .35; cursor: default; }
.swb-acts { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.stage-url {
  flex: 1; min-width: 80px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 16%, transparent);
  color: var(--text); border-radius: 8px; padding: 5px 10px; font-size: 13.5px;
}
.stage-url::placeholder { color: color-mix(in srgb, var(--text) 55%, transparent); }
.stage-url:focus { background: #fff; color: #1d2330; border-color: var(--accent); outline: none; }
.mode-q {
  display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 99px;
  font-size: 10.5px; font-weight: 800; line-height: 1;
  background: color-mix(in srgb, currentColor 18%, transparent);
}
.web-mode-menu {
  position: fixed; z-index: 68; width: min(330px, calc(100vw - 16px));
  background: #fafbfd; color: #1d2330; border: 1px solid rgba(29, 35, 48, .15);
  border-radius: 13px; box-shadow: 0 16px 46px rgba(0, 0, 0, .38);
  padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 13px;
}
.wmm-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 2px 6px; font-size: 12px; color: #5b6375; text-transform: uppercase; letter-spacing: .05em; }
.wmm-x { border: none; background: transparent; color: #5b6375; cursor: pointer; padding: 4px; border-radius: 6px; display: inline-flex; }
.wmm-x:hover { background: #eef2fe; color: #1d2330; }
.wmm-opt {
  text-align: left; border: 1.5px solid #e1e5ee; background: #fff; color: #1d2330;
  border-radius: 10px; padding: 9px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 4px;
}
.wmm-opt:hover { background: #f4f7ff; border-color: #b8c7f5; }
.wmm-opt.on { background: #eef3ff; border-color: #3b6cf6; }
.wmm-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.wmm-badge { font-size: 10.5px; font-weight: 800; background: #3b6cf6; color: #fff; padding: 1px 7px; border-radius: 99px; }
.wmm-d { font-size: 12px; color: #4c5568; line-height: 1.38; white-space: normal; }

/* ---------- Compact External App rows in ＋ Open ---------- */
.app-cards { display: flex; flex-direction: column; gap: 4px; padding: 2px 2px 6px; }
.app-card {
  position: relative; display: flex; align-items: center; gap: 6px; padding: 3px 5px;
  border-radius: 9px; border: 1px solid #e1e5ef; background: #fff;
}
.app-card:hover { border-color: #c2cff0; background: #f8faff; }
.app-card.is-pinned { border-color: #3b6cf6; background: #f4f7ff; }
.win-menu .app-card-go {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px;
  padding: 3px 4px; border-radius: 6px; white-space: nowrap; overflow: hidden;
}
.win-menu .app-card-go:hover { background: transparent; }
.app-thumb-sm {
  width: 24px; height: 24px; border-radius: 6px; background: #edf0f7;
  display: grid; place-items: center; overflow: hidden; flex: none;
}
.app-thumb-sm .app-ic { width: 20px; height: 20px; object-fit: contain; display: block; }
.app-thumb-sm .app-prev { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-thumb-sm .app-ic-svg .ico { width: 15px; height: 15px; color: #6b7385; }
.app-card-meta { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 0; line-height: 1.2; }
.app-card-name { font-size: 12.5px; font-weight: 700; color: #1d2330; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card-sub { font-size: 10.5px; color: #6b7385; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-menu .app-pin-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; flex: none;
  padding: 3px 8px; margin: 0; border-radius: 7px; font-size: 11px; font-weight: 700;
  background: #f2f4f9; color: #4a5368; border: 1px solid #e1e5ee;
}
.win-menu .app-pin-btn:hover { background: #e6ecfc; color: #1d2330; }
.win-menu .app-pin-btn.on { background: #3b6cf6; color: #fff; border-color: transparent; }
.win-menu .app-pin-btn .ico { width: 11px; height: 11px; }

/* ---------- Docked External App tabs & stage frame ---------- */
.tab-ext-app .tab-app-ic {
  width: 15px; height: 15px; border-radius: 3px; object-fit: contain; flex: none;
}
.swb-app-info {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden;
  font-size: 13px; color: var(--text);
}
.swb-app-ic { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; flex: none; }
.swb-app-sub { opacity: .68; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stage-dock-app {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px;
  background: color-mix(in srgb, var(--bg, #0d1624) 72%, transparent);
}
.stage-dock-app.is-ready { cursor: pointer; }
.dock-card {
  max-width: 440px; width: 100%; padding: 22px 24px; border-radius: 16px; text-align: center;
  background: var(--card, color-mix(in srgb, var(--bg) 92%, #111827));
  border: 1.5px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--text); display: flex; flex-direction: column; align-items: center; gap: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .22);
}
.dock-card.subtle { opacity: .92; }
.dock-card h3 { margin: 0; font-size: 16px; font-weight: 800; }
.dock-card p { margin: 0; font-size: 13px; opacity: .82; line-height: 1.45; }
.dock-ph-ic { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; }
.dock-ph-ic-svg .ico { width: 36px; height: 36px; opacity: .8; }
.dock-card-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding-top: 4px; }
.dock-card-btns button {
  border: 1px solid color-mix(in srgb, var(--text) 22%, transparent);
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text); border-radius: 9px; padding: 7px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.dock-card-btns button:hover { background: color-mix(in srgb, var(--text) 18%, transparent); }
.dock-card-btns button.dock-primary { background: var(--accent); color: var(--bg); border-color: transparent; }
.dock-card-btns button.dock-primary:hover { filter: brightness(1.08); }

/* ---------- Spotlight onboarding tour (no dimming, crisp highlight frame) ---------- */
.tour-backdrop { position: fixed; inset: 0; background: transparent; z-index: 9500; }
.tour-ring {
  position: fixed; z-index: 9501; border-radius: 11px; pointer-events: none;
  border: 3px solid #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .28), 0 0 22px rgba(245, 158, 11, .5);
  transition: left .18s, top .18s, width .18s, height .18s;
}
.tour-card {
  position: fixed; z-index: 9502; width: min(370px, calc(100vw - 24px));
  background: #171c26; color: #f3f6fc; border: 1px solid rgba(255, 209, 102, .5);
  border-radius: 14px; padding: 14px 16px; box-shadow: 0 18px 44px rgba(0, 0, 0, .5);
  display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; line-height: 1.45;
}
.tour-top { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #ffd166; font-weight: 700; }
.tour-card h3 { margin: 0; font-size: 15px; color: #fff; }
.tour-card p { margin: 0; color: #d5dce8; }
.tour-foot { display: flex; align-items: center; gap: 6px; padding-top: 4px; }
.tour-dots { display: flex; gap: 5px; margin: 0 auto; }
.tour-dots i { width: 6px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .25); display: block; }
.tour-dots i.on { background: #ffd166; width: 14px; }
.tour-card button {
  border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .08);
  color: #fff; border-radius: 8px; padding: 5px 11px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.tour-card button:hover { background: rgba(255, 255, 255, .16); }
.tour-card button.primary { background: #ffd166; color: #111827; border-color: transparent; }
.tour-card button.primary:hover { filter: brightness(1.06); }
.tour-card button:disabled { opacity: .4; cursor: default; }

/* ---------- Moveable, resizable & workspace-fullscreen active timers ---------- */
.p-timer { position: relative; cursor: grab; user-select: none; -webkit-user-select: none; }
.p-timer:active { cursor: grabbing; }
.p-timer.floating {
  position: fixed; z-index: 46; margin: 0; min-width: 240px; min-height: 184px;
  box-sizing: border-box; container-type: size; overflow: hidden;
  padding: clamp(8px, 2.8cqh, 20px) clamp(10px, 3.2cqi, 24px);
  gap: clamp(4px, 1.8cqh, 14px);
}
.p-timer .tm-rs {
  position: absolute; right: 4px; bottom: 4px; width: 15px; height: 15px; cursor: nwse-resize;
  opacity: .48; border-radius: 3px;
  background: linear-gradient(135deg, transparent 38%, currentColor 38% 50%, transparent 50% 66%, currentColor 66% 78%, transparent 78%);
}
.p-timer .tm-rs:hover { opacity: .9; }
.p-timer.floating .tm-body { flex: 1 1 0; min-height: 0; overflow: visible; }
.p-timer.floating .ring { width: clamp(32px, min(18cqi, 28cqh), 136px); height: clamp(32px, min(18cqi, 28cqh), 136px); }
.p-timer.floating .tv { font-size: clamp(24px, min(15cqi, 25cqh), 112px); }
.p-timer.floating.done .tv { font-size: clamp(20px, min(10.5cqi, 21cqh), 76px); }
.p-timer.floating .tl { font-size: clamp(11px, min(4.2cqi, 7.5cqh), 24px); }
.p-timer.floating .tm-title-col { gap: clamp(3px, 1.5cqh, 10px); }
.p-timer.floating .tm-ctrls { gap: clamp(6px, 2.2cqi, 16px); }
.p-timer.floating .tm-win-acts button,
.p-timer.floating .tm-end,
.p-timer.floating .tm-ctrls button {
  font-size: clamp(11px, min(3.8cqi, 6.8cqh), 22px);
  padding: clamp(3px, 1.4cqh, 11px) clamp(8px, 2.4cqi, 20px);
  border-radius: clamp(7px, 2.2cqmin, 14px);
}
.p-timer.floating .tm-win-acts .ico,
.p-timer.floating .tm-ctrls .ico {
  width: clamp(13px, min(4.2cqi, 7.8cqh), 26px);
  height: clamp(13px, min(4.2cqi, 7.8cqh), 26px);
}
.p-timer.full {
  position: absolute !important; inset: 0 !important; width: auto !important; height: auto !important;
  z-index: 30; border-radius: 18px; border-width: 3px; padding: 18px 24px 24px;
  justify-content: space-between; align-items: stretch; gap: 16px; text-align: center;
  cursor: default; background: color-mix(in srgb, var(--bg, #0f1c2e) 98%, #070d16);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .42);
}
.p-timer.full .tm-bar { align-items: flex-start; padding-bottom: 10px; border-bottom: 1px solid color-mix(in srgb, var(--text) 12%, transparent); }
.p-timer.full .tm-title-col { gap: 8px; }
.p-timer.full .tl { font-size: clamp(16px, 2.4vmin, 28px); }
.p-timer.full .tm-end { font-size: 14px; padding: 6px 15px; border-radius: 10px; }
.p-timer.full .tm-win-acts button { font-size: 14px; padding: 8px 14px; border-radius: 10px; }
.p-timer.full .tm-win-acts .ico { width: 17px; height: 17px; }
.p-timer.full .tm-body { flex-direction: column; gap: clamp(12px, 2.5vmin, 26px); }
.p-timer.full .ring { width: clamp(96px, 26vmin, 210px); height: clamp(96px, 26vmin, 210px); }
.p-timer.full .tv { font-size: clamp(64px, 16vmin, 184px); letter-spacing: -.02em; }
.p-timer.full.done .tv { font-size: clamp(44px, 10vmin, 124px); }
.p-timer.full .tm-ctrls { gap: 12px; padding-top: 4px; }
.p-timer.full .tm-ctrls button { font-size: 16px; padding: 10px 20px; border-radius: 12px; font-weight: 700; }
.p-timer.full .tm-ctrls .ico { width: 18px; height: 18px; }

/* ---------- Searchable Files Window ---------- */
.files-host { position: absolute; inset: 0; background: #f8fafd; color: #1d2330; display: flex; flex-direction: column; overflow: hidden; }
.files-host.fb-drop { outline: 3px dashed #3b6cf6; outline-offset: -6px; background: #eef4ff; }
.fb-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.fb-top { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; background: #fff; border-bottom: 1px solid #e4e8f0; }
.fb-search {
  flex: 1; min-width: 0; padding: 7px 11px; border-radius: 9px; border: 1.5px solid #d5dce8;
  background: #f6f8fc; color: #1d2330; font-size: 13.5px;
}
.fb-search:focus { outline: none; background: #fff; border-color: #3b6cf6; }
.fb-add {
  border: none; background: #3b6cf6; color: #fff; border-radius: 9px; padding: 7px 12px;
  font-size: 12.5px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.fb-add:hover { filter: brightness(1.08); }
.fb-add .ico { width: 14px; height: 14px; }
.fb-cats {
  display: flex; align-items: center; gap: 5px; padding: 7px 12px; background: #fff;
  border-bottom: 1px solid #e4e8f0; overflow-x: auto; scrollbar-width: none; flex: none;
}
.fb-cats::-webkit-scrollbar { display: none; }
.fb-cat {
  border: 1px solid #dce2ee; background: #f3f6fb; color: #364152; border-radius: 99px;
  padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.fb-cat span { opacity: .65; font-size: 11px; font-variant-numeric: tabular-nums; }
.fb-cat:hover { background: #e8eefc; }
.fb-cat.on { background: #1d2330; color: #fff; border-color: #1d2330; }
.fb-cat.on span { opacity: .85; }
.fb-list { flex: 1 1 0; min-height: 0; overflow-y: auto; padding: 8px 10px; display: flex; flex-direction: column; gap: 5px; }
.fb-row {
  display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e2e6ef;
  border-radius: 10px; padding: 4px 6px; transition: border-color .14s, background .14s;
}
.fb-row:hover { border-color: #b7c6ee; background: #fafcff; }
.fb-row.playing { border-color: #3b6cf6; background: #eef4ff; }
.fb-open {
  flex: 1 1 0; min-width: 0; border: none; background: transparent; color: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 9px; padding: 4px; text-align: left;
}
.fb-ic {
  width: 30px; height: 30px; border-radius: 8px; background: #eef2fa; color: #3b6cf6;
  display: grid; place-items: center; flex: none;
}
.fb-ic .ico { width: 16px; height: 16px; }
.fb-meta { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fb-name { font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-meta small { font-size: 11px; color: #687387; font-weight: 600; }
.fb-btn {
  border: 1px solid #dce2ee; background: #f3f6fb; color: #364152; border-radius: 8px;
  padding: 5px 9px; font-size: 12px; font-weight: 700; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; gap: 4px;
}
.fb-btn:hover { background: #e6eefc; color: #1d2330; }
.fb-btn.on { background: #3b6cf6; color: #fff; border-color: transparent; }
.fb-btn.fb-del { color: #64748b; padding: 5px 7px; }
.fb-btn.fb-del:hover { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.fb-btn .ico { width: 13px; height: 13px; }
.fb-empty { text-align: center; color: #687387; font-size: 13px; padding: 36px 16px; line-height: 1.5; }

/* ---------- Settings: Help & Tutorials Feature Guide ---------- */
.help-card .help-search {
  width: 100%; box-sizing: border-box; margin: 4px 0 12px; padding: 8px 12px;
  border-radius: 9px; border: 1.5px solid #d5dce8; background: #f7f9fc; color: #1d2330; font-size: 13.5px;
}
.help-card .help-search:focus { outline: none; background: #fff; border-color: #3b6cf6; }
.help-grid { display: flex; flex-direction: column; gap: 7px; }
.help-item {
  border: 1px solid #e1e5ef; border-radius: 11px; background: #fff; overflow: hidden;
}
.help-item[open] { border-color: #b7c8f7; box-shadow: 0 4px 14px rgba(59, 108, 246, .08); }
.help-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 12px;
}
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary:hover { background: #f6f8fd; }
.help-ic {
  width: 32px; height: 32px; border-radius: 9px; background: #eef3ff; color: #3b6cf6;
  display: grid; place-items: center; flex: none;
}
.help-ic .ico { width: 17px; height: 17px; }
.help-meta { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.help-meta b { font-size: 13.5px; color: #1d2330; }
.help-meta small { font-size: 12px; color: #5f687a; line-height: 1.35; }
.help-cat {
  font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: 3px 8px; border-radius: 99px; background: #eef2f8; color: #4f596e; flex: none;
}
.help-body { padding: 2px 14px 12px 54px; border-top: 1px solid #eef1f7; }
.help-body ul { margin: 8px 0 10px; padding-left: 18px; font-size: 12.5px; color: #364152; line-height: 1.5; }
.help-body li + li { margin-top: 3px; }
.help-acts { display: flex; gap: 8px; }

/* ---------- Subnautica-style Bug Report Modal ---------- */
.bug-backdrop {
  position: fixed; inset: 0; z-index: 9600; background: rgba(10, 16, 28, .66);
  backdrop-filter: blur(4px); display: grid; place-items: center; padding: 16px;
}
.bug-card {
  width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
  background: #ffffff; color: #1d2330; border-radius: 16px; border: 1px solid #d7dfec;
  box-shadow: 0 24px 68px rgba(0, 0, 0, .45); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 11px; font-size: 13.5px;
}
.bug-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bug-head h3 { margin: 0; font-size: 16px; display: inline-flex; align-items: center; gap: 7px; }
.bug-head h3 .ico { width: 18px; height: 18px; color: #e5484d; }
.bug-x { border: none; background: #f1f4fa; color: #4c5568; border-radius: 8px; width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer; }
.bug-x:hover { background: #e4e9f4; color: #111; }
.bug-cats { display: flex; flex-wrap: wrap; gap: 6px; }
.bug-cat {
  border: 1px solid #d5dce8; background: #f6f8fc; color: #364152; border-radius: 99px;
  padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.bug-cat.on { background: #1d2330; color: #fff; border-color: #1d2330; }
.bug-shot-wrap { border: 1px solid #dce3ef; border-radius: 11px; overflow: hidden; background: #f4f6fb; }
.bug-shot { width: 100%; max-height: 210px; object-fit: contain; display: block; background: #0f172a; }
.bug-shot-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px;
  font-size: 12px; color: #475569; flex-wrap: wrap;
}
.bug-shot-bar label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.bug-sm-btn {
  border: 1px solid #cfd8e8; background: #fff; color: #1d2330; border-radius: 7px;
  padding: 4px 9px; font-size: 11.5px; font-weight: 700; cursor: pointer;
}
.bug-sm-btn:hover { background: #eef3ff; border-color: #3b6cf6; }
.bug-fld { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: 12.5px; color: #334155; }
.bug-fld textarea {
  width: 100%; box-sizing: border-box; resize: vertical; padding: 9px 11px; border-radius: 10px;
  border: 1.5px solid #d5dce8; font: inherit; font-weight: 400; color: #1d2330; background: #f9fbfe;
}
.bug-fld textarea:focus { outline: none; background: #fff; border-color: #3b6cf6; }
.bug-meta { font-size: 11.5px; color: #64748b; background: #f3f6fb; padding: 6px 10px; border-radius: 8px; }
.bug-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 2px; }
.bug-foot .grow { flex: 1; }
.bug-btn {
  border: 1px solid #d5dce8; background: #f6f8fc; color: #1d2330; border-radius: 9px;
  padding: 7px 13px; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.bug-btn:hover { background: #e8eefc; }
.bug-btn.primary { background: #3b6cf6; color: #fff; border-color: transparent; }
.bug-btn.primary:hover { filter: brightness(1.08); }
.bug-btn:disabled { opacity: .6; cursor: default; }
.bug-backdrop[data-tour-demo="1"] { z-index: 9400; }
.bug-fld input[type="email"] {
  width: 100%; box-sizing: border-box; padding: 8px 11px; border-radius: 9px;
  border: 1.5px solid #d5dce8; font: inherit; font-weight: 400; color: #1d2330; background: #f9fbfe;
}
.bug-fld input[type="email"]:focus { outline: none; background: #fff; border-color: #3b6cf6; }
.bug-status {
  display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 9px;
  font-size: 12.5px; line-height: 1.4;
}
.bug-status[hidden] { display: none; }
.bug-status .ico { width: 16px; height: 16px; flex: none; }
.bug-status.info { background: #eef4ff; color: #1e40af; border: 1px solid #c7d9ff; }
.bug-status.ok { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.bug-status.err { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ---------- Inline viewer inside Files Browser ---------- */
.fb-vbar {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  background: #fff; border-bottom: 1px solid #dce2ee; flex: none;
}
.fb-back {
  border: 1px solid #d5dce8; background: #f3f6fb; color: #1d2330; border-radius: 8px;
  padding: 5px 10px; font-size: 12.5px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; flex: none;
}
.fb-back:hover { background: #e6eefc; }
.fb-back .ico { width: 15px; height: 15px; }
.fb-vtitle {
  flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 7px; overflow: hidden;
}
.fb-vic { display: inline-flex; color: #3b6cf6; flex: none; }
.fb-vic .ico { width: 16px; height: 16px; }
.fb-vtitle b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-vbody { position: relative; flex: 1 1 0; min-height: 0; background: #f4f6fb; overflow: hidden; }
.fb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #141923; }
.fb-vid { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.fb-ifr { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }

/* ---------- Per-part checkboxes inside Record Vocals popover ---------- */
.sp-grm-sec-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sp-rec-quick { display: inline-flex; gap: 4px; }
.sp-rec-quick button {
  border: 1px solid #d5dce8; background: #f4f6fb; color: #475569; border-radius: 6px;
  padding: 2px 7px; font-size: 10.5px; font-weight: 700; cursor: pointer; text-transform: none; letter-spacing: 0;
}
.sp-rec-quick button:hover { background: #e6eefc; color: #1d2330; border-color: #93b4fb; }
.sp-rec-parts {
  display: flex; flex-direction: column; gap: 3px; max-height: 175px; overflow-y: auto;
  padding: 4px 2px; border-top: 1px solid #edf0f6; border-bottom: 1px solid #edf0f6;
}
.sp-rec-part { padding: 3px 4px; border-radius: 6px; margin: 0; }
.sp-rec-part:hover { background: #f4f7fc; }
.sp-rec-part.is-self { background: #fff5f5; }
.sp-rec-tag {
  font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  background: #fee2e2; color: #b91c1c; padding: 1px 6px; border-radius: 99px; margin-left: 4px;
}
.sp-rec-metro { border-top: 1px dashed #e2e8f0; margin-top: 3px; padding-top: 6px; }

/* ---------- What's New & Welcome Pop-up ---------- */
.wn-card { width: min(580px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }
.wn-intro { margin: 0; font-size: 13.5px; line-height: 1.45; color: #475569; }
.wn-sec {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: #64748b; margin-top: 2px;
}
.wn-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wn-list li {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px;
  background: #f6f8fc; border: 1px solid #e3e8f2; border-radius: 10px;
}
.wn-list.wn-featured li {
  background: #eef4ff; border-color: #bfdbfe;
}
.wn-list.wn-featured .wn-ic {
  background: #3b6cf6; color: #fff;
}
.wn-ic {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: #e8efff; color: #3b6cf6;
}
.wn-ic .ico { width: 18px; height: 18px; display: block; }
.wn-list > li > div > b { display: block; font-size: 13.5px; color: #1d2330; margin-bottom: 2px; }
.wn-list > li > div > span { display: block; font-size: 12.5px; line-height: 1.42; color: #4b5563; }
.wn-compact {
  list-style: none; margin: 0; padding: 10px 12px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px;
  background: #f8fafd; border: 1px solid #e3e8f2; border-radius: 10px;
}
.wn-compact li {
  position: relative; padding-left: 13px; font-size: 12.5px; font-weight: 600; color: #334155; line-height: 1.35;
}
.wn-compact li::before {
  content: ""; position: absolute; left: 0; top: .48em; width: 5px; height: 5px;
  border-radius: 50%; background: #94a3b8;
}
.wn-more { margin: 0; font-size: 12.5px; line-height: 1.45; color: #475569; }
.wn-bug {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; color: #78350f;
}
.wn-bug .wn-ic { background: #fef3c7; color: #b45309; }
.wn-bug > div > b { display: block; font-size: 13px; color: #78350f; margin-bottom: 2px; }
.wn-bug p { margin: 0; font-size: 12.5px; line-height: 1.42; color: #78350f; }
.wn-bug kbd {
  display: inline-block; padding: 1px 5px; border-radius: 5px;
  background: #fff; border: 1px solid #f59e0b; font: 700 11.5px/1.3 -apple-system, system-ui, sans-serif; color: #78350f;
}
.wn-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wn-foot .bug-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.wn-foot .bug-btn .ico { width: 15px; height: 15px; display: block; }

/* ---------- UX Polish: Live Grading touch pad, mic dot & calibration ---------- */
.gr-tappad {
  position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom, 18px));
  transform: translateX(-50%); z-index: 230;
  width: min(540px, calc(100vw - 28px)); min-height: 78px; padding: 12px 22px;
  border-radius: 20px; border: 2px solid rgba(255,255,255,.35);
  background: linear-gradient(180deg, #3b6cf6, #2554dc); color: #fff;
  box-shadow: 0 14px 38px rgba(17, 24, 39, .45), inset 0 1px 0 rgba(255,255,255,.3);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  user-select: none; -webkit-user-select: none;
  transition: transform .07s ease, background .12s ease, box-shadow .12s ease;
}
.gr-tappad .gr-tp-main { font-size: 20px; font-weight: 800; letter-spacing: .01em; line-height: 1.15; }
.gr-tappad .gr-tp-sub { font-size: 12.5px; font-weight: 600; opacity: .88; }
.gr-tappad.wait {
  background: linear-gradient(180deg, #475569, #334155); border-color: rgba(255,255,255,.22);
}
.gr-tappad.hit {
  transform: translateX(-50%) scale(.965);
  background: linear-gradient(180deg, #22c55e, #16a34a);
  box-shadow: 0 6px 20px rgba(22, 163, 74, .5), 0 0 0 6px rgba(34, 197, 94, .28);
}
.gr-mic-m {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
}
.gr-mic-m .ico { width: 15px; height: 15px; transition: color .08s; }
.gr-mic-m.hot .ico { color: #4ade80; }
.gr-lvl {
  display: inline-flex; align-items: flex-end; width: 5px; height: 15px; border-radius: 3px;
  background: rgba(255,255,255,.28); overflow: hidden; flex: none;
}
.gr-lvl > i {
  display: block; width: 100%; height: 8%; min-height: 2px; border-radius: 2px;
  background: #4ade80; transition: height 55ms linear;
}
.sr-zoom-grp {
  margin-left: auto; display: inline-flex; align-items: center; gap: 5px; flex: none;
}
.gr-cal-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-top: 6px; padding: 7px 10px; border-radius: 9px;
  background: #f4f6fb; border: 1px solid #e2e8f0; font-size: 12.5px; color: #334155;
}
.gr-cal-btn {
  border: 1px solid #cbd5e1; background: #fff; color: #1e293b; border-radius: 7px;
  padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer;
}
.gr-cal-btn:hover { background: #eef4ff; border-color: #93b4fb; color: #1d4ed8; }
.gr-tip-note {
  margin: 4px 0 0; font-size: 12px; color: #64748b; line-height: 1.4;
}
.sr-grmenu .sr-grm-cal {
  border-top: 1px solid #e2e8f0; margin-top: 3px; padding-top: 9px; border-radius: 0 0 8px 8px;
}

/* ---------- UX Polish: Sight Reading custom presets & toolbar summary ---------- */
.sr-scard-pre { padding: 8px 11px; }
.sr-pre-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sr-pre-pill {
  display: inline-flex; align-items: center; border-radius: 99px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  background: color-mix(in srgb, var(--text) 8%, transparent);
}
.sr-pre-pill.on {
  background: var(--accent); color: var(--bg); border-color: transparent;
}
.sr-pre-pill > button {
  border: 0 !important; background: transparent !important; color: inherit !important;
  height: 26px !important; padding: 0 9px !important; font-size: 12px !important; font-weight: 700;
  border-radius: 0 !important; cursor: pointer;
}
.sr-pre-pill > button:hover { background: color-mix(in srgb, currentColor 12%, transparent) !important; }
.sr-pre-pill > button.x {
  padding: 0 7px 0 4px !important; font-size: 14px !important; opacity: .7;
}
.sr-pre-pill > button.x:hover { opacity: 1; }
.sr-pre-form { display: inline-flex; align-items: center; gap: 4px; }
.sr-pre-inp {
  width: 150px; height: 26px; box-sizing: border-box; padding: 0 8px;
  border-radius: 7px; border: 1px solid rgba(0,0,0,.2);
  background: rgba(255,255,255,.96); color: #1d2330; font-size: 12px; font-weight: 600;
}
.sr-pre-ok, .sr-pre-add {
  height: 26px !important; padding: 0 10px !important; font-size: 12px !important;
  border-radius: 99px !important; font-weight: 700; cursor: pointer;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  gap: 4px; line-height: 1 !important; vertical-align: middle;
}
.sr-pre-add .ico { width: 13px; height: 13px; display: block; flex: none; }
.sr-pre-ok { background: var(--accent) !important; color: var(--bg) !important; border-color: transparent !important; }
.sr-pre-empty { font-size: 12px; opacity: .65; margin-right: 4px; }
.sr-top button.sr-sumchip {
  background: color-mix(in srgb, var(--text) 6%, transparent);
  border: 1px dashed color-mix(in srgb, var(--text) 24%, transparent);
  font-size: 11.5px; font-weight: 600; opacity: .88; max-width: 240px;
  overflow: hidden; text-overflow: ellipsis;
}
.sr-top button.sr-sumchip:hover { opacity: 1; border-style: solid; }

/* ---------- UX Polish: Piano route, Audio marker rename, Solfege echo ---------- */
.pq-route {
  font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--text); white-space: nowrap;
}
.aud-mren-inp {
  width: 118px; padding: 2px 6px; border-radius: 6px;
  border: 1px solid var(--accent); background: #fff; color: #1d2330;
  font: 600 12px/1.3 inherit;
}
.sb-ecnt {
  font-size: 11px; font-weight: 700; opacity: .7; font-variant-numeric: tabular-nums;
  padding: 2px 6px; border-radius: 99px;
  background: color-mix(in srgb, var(--text) 10%, transparent);
}
.sb-echo { flex-direction: column; align-items: stretch !important; gap: 7px !important; }
.sb-echo-bar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 28px;
}
.sb-echo-acts {
  display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; flex: none;
}
.sb-echo-acts button:disabled { opacity: .4; cursor: default; }
.sb-esep {
  width: 1px; height: 16px; background: color-mix(in srgb, var(--text) 18%, transparent); margin: 0 2px;
}
.sb-elist {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 28px;
}
button.sb-echo-item {
  border: 0; color: inherit; cursor: pointer; font-family: inherit;
}
button.sb-echo-item:hover { filter: brightness(1.08); }

/* ---------- UX Polish: PDF page jump, zoom & burn message ---------- */
.pdfv-zoom { display: inline-flex; align-items: center; gap: 2px; }
.pdfv-zpct {
  min-width: 44px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700;
  padding: 3px 5px !important;
}
.pdfv-zoom button:disabled { opacity: .38; cursor: default; }
button.pdfv-num {
  border: 1px solid transparent; background: transparent; color: inherit;
  font: inherit; font-weight: 700; border-radius: 7px; padding: 3px 8px; cursor: pointer;
}
button.pdfv-num:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.pdfv-jump-inp {
  width: 60px; padding: 2px 6px; border-radius: 6px; text-align: center;
  border: 1px solid var(--accent); background: #fff; color: #1d2330;
  font: 700 13px/1.3 inherit; font-variant-numeric: tabular-nums;
}
.pdfv-burn-msg {
  font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 22%, transparent); white-space: nowrap;
}

/* ---------- UX Polish: Header pin chip, Annotate Draw|Interact, Signals, Schedule, Files, Companion ---------- */
.chip.pin-chip {
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--text); font-weight: 700; cursor: pointer;
}
.chip.pin-chip:hover { background: color-mix(in srgb, var(--accent) 36%, transparent); }
.swb-hint {
  font-size: 11.5px; opacity: .72; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.win-pinned-tag {
  font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 99px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text); flex: none; letter-spacing: .02em;
}
.ink-mode-seg {
  display: inline-flex; border: 1px solid rgba(255,255,255,.22); border-radius: 9px; overflow: hidden;
  background: rgba(255,255,255,.07); margin-right: 4px;
}
.ink-mode-seg button {
  border: 0 !important; border-radius: 0 !important; padding: 5px 10px !important;
  font-size: 12px; font-weight: 700; background: transparent; color: inherit;
}
.ink-mode-seg button.on { background: var(--accent) !important; color: var(--bg) !important; }
.ink-paused-pill {
  position: absolute; left: 50%; bottom: 18px; top: auto; transform: translateX(-50%); z-index: 24;
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px;
  background: rgba(30, 41, 59, .92); color: #fff; border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 8px 24px rgba(0,0,0,.35); font-size: 12.5px; font-weight: 700;
  backdrop-filter: blur(8px);
}
.ink-paused-pill button {
  border: 0; border-radius: 99px; padding: 3px 10px; font-size: 12px; font-weight: 700;
  background: var(--accent); color: var(--bg); cursor: pointer;
}
.sig-swatches { display: flex; gap: 6px; align-items: center; margin: 6px 0 2px; }
.sig-sw {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
  padding: 0; transition: transform .1s;
}
.sig-sw:hover { transform: scale(1.12); }
.sig-sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.sig-grid button.active {
  box-shadow: inset 0 0 0 2.5px #fff, 0 0 0 2px var(--accent);
}
.per-bad { background: rgba(239, 68, 68, .12) !important; }
.per-err { display: block; font-size: 11px; font-weight: 700; color: #dc2626; margin-top: 2px; }
.fb-empty-drop {
  border: 2px dashed #cbd5e1; border-radius: 14px; padding: 26px 18px;
  background: #f8fafd; color: #475569; cursor: pointer; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%;
  font: inherit; transition: border-color .15s, background .15s;
}
.fb-empty-drop:hover { border-color: #3b6cf6; background: #eef4ff; color: #1e293b; }
button.comp-timer, button.comp-sig { cursor: pointer; font-family: inherit; }
button.comp-timer:hover { filter: brightness(1.12); }
.comp-timer.paused { opacity: .68; border-style: dashed; }
.comp-timer-add {
  border: 1px solid color-mix(in srgb, var(--text) 20%, transparent);
  background: color-mix(in srgb, var(--text) 10%, transparent);
  color: var(--text); border-radius: 99px; padding: 2px 6px; font-size: 10.5px; font-weight: 700;
  cursor: pointer; flex: none;
}
.comp-timer-add:hover { background: color-mix(in srgb, var(--text) 22%, transparent); }
.dc-note { font-size: 11.5px; color: #64748b; padding: 4px 6px 2px; line-height: 1.35; }

/* ---------- Responsive laptop / iPad & Snap labels (F-29) ---------- */
@media (max-width: 1120px) {
  .e-top { gap: 10px; padding: 8px 12px 8px 76px; }
  .tab { padding: 6px 9px; font-size: 13px; }
}
@media (max-width: 820px) {
  .p-body { grid-template-columns: 1fr; padding: .8em; }
  .p-side { max-height: 34vh; }
  .p-split { display: none; }
  .p-head { padding: .8em 1em .6em; gap: .6em; }
}
.snap-menu { display: grid; grid-template-columns: repeat(2, minmax(122px, 1fr)); gap: 5px; padding: 8px; }
.snap-menu button { display: flex; align-items: center; gap: 7px; justify-content: flex-start; padding: 5px 8px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.snap-menu button svg { flex: none; }

/* ---------- Dark-mode overrides (F-30) ---------- */
@media (prefers-color-scheme: dark) {
  .files-host { background: var(--e-bg); color: var(--e-text); }
  .files-host.fb-drop { background: var(--e-soft); }
  .fb-top, .fb-cats, .fb-vbar { background: var(--e-panel); border-color: var(--e-line); }
  .fb-search, .fb-vbody { background: var(--e-bg); color: var(--e-text); border-color: var(--e-line); }
  .fb-search:focus { background: var(--e-panel); }
  .fb-cat, .fb-btn, .fb-back { background: var(--e-soft); color: var(--e-text); border-color: var(--e-line); }
  .fb-cat.on { background: var(--e-accent); color: var(--e-accent-ink); border-color: transparent; }
  .fb-row { background: var(--e-panel); border-color: var(--e-line); color: var(--e-text); }
  .fb-row:hover, .fb-row.playing { background: var(--e-soft); }
  .fb-ic { background: var(--e-soft); }
  .fb-meta small, .fb-empty, .dc-note { color: var(--e-muted); }
  .fb-empty-drop { background: var(--e-panel); border-color: var(--e-line); color: var(--e-muted); }
  .fb-empty-drop:hover { background: var(--e-soft); color: var(--e-text); }

  .help-card .help-search { background: var(--e-bg); color: var(--e-text); border-color: var(--e-line); }
  .help-card .help-search:focus { background: var(--e-panel); }
  .help-item { background: var(--e-panel); border-color: var(--e-line); }
  .help-item summary:hover { background: var(--e-soft); }
  .help-ic { background: var(--e-soft); }
  .help-meta b { color: var(--e-text); }
  .help-meta small, .help-body ul { color: var(--e-muted); }
  .help-cat { background: var(--e-soft); color: var(--e-text); }
  .help-body { border-top-color: var(--e-line); }

  .bug-card { background: var(--e-panel); color: var(--e-text); border-color: var(--e-line); }
  .bug-x, .bug-cat, .bug-btn, .bug-sm-btn { background: var(--e-soft); color: var(--e-text); border-color: var(--e-line); }
  .bug-cat.on { background: var(--e-accent); color: var(--e-accent-ink); border-color: transparent; }
  .bug-shot-wrap, .bug-meta, .wn-bug { background: var(--e-bg); border-color: var(--e-line); color: var(--e-muted); }
  .bug-shot-bar, .bug-fld { color: var(--e-text); }
  .bug-fld textarea, .bug-fld input[type="email"] { background: var(--e-bg); color: var(--e-text); border-color: var(--e-line); }
  .bug-fld textarea:focus, .bug-fld input[type="email"]:focus { background: var(--e-panel); }

  .win-start { background: var(--e-bg); color: var(--e-muted); }
  .win-menu, .dock-more-menu, .dock-custom, .look-panel, .group-menu, .snap-menu, .bm-menu {
    background: color-mix(in srgb, var(--e-panel) 94%, transparent);
    color: var(--e-text);
    border-color: var(--e-line);
  }
}




