/* SetDock — White (black and white, the default) and colour themes: the colours are the variables just below.
   Built to be read on a dim stage at arm's length: high contrast text, one warm accent,
   big tap targets, and as little chrome as possible around the song. */

:root, [data-theme="white"] {
  /* White (the default): black and white only. Buttons, chords and section names too; chords stand out
     by weight. Other themes below change only the colours. */
  --bg: #ffffff;
  --panel: #f5f5f4;
  --panel-end: #efefee;
  --raise: #ececeb;
  --track: #e8e8e7;
  --panel2: #ffffff;
  --seg-on: #ffffff;
  --input: #ffffff;
  --line: rgba(0, 0, 0, .09);
  --line2: rgba(0, 0, 0, .16);
  --line3: rgba(0, 0, 0, .3);
  --tint: rgba(0, 0, 0, .04);
  --tint2: rgba(0, 0, 0, .065);
  --text: #16161a;
  --lyric: #1b1b1f;
  --muted: #595963;
  --faint: #85858f;
  --topbar: color-mix(in srgb, var(--bg) 93%, transparent);
  --banner: color-mix(in srgb, var(--panel2) 98%, transparent);
  --shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 10px 26px -16px rgba(0, 0, 0, .28);
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .35);
  --seg-on-shadow: 0 1px 2px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .05);
  --backdrop: rgba(20, 20, 24, .38);
  --r: 14px;
  --r-sm: 10px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --tap: 44px;
  color-scheme: light;
  --accent: #141414;
  --accent-hi: #3a3a3a;
  --accent-ink: #ffffff;
  --accent-text: #141414;
  --accent-text-hi: #000000;
  --accent-soft: rgba(0, 0, 0, .07);
  --notice-ink: #2a2a2a;
  --chord: #111111;
  --section: #111111;
  --ok: #111111;
  --bad: #111111;
}
[data-theme="black"] {
  /* Black: white on black only, the most contrast (and kindest to OLED phones on a dark stage) */
  --bg: #000000;
  --panel: #0b0b0b;
  --panel-end: #080808;
  --panel2: #161616;
  --raise: #222222;
  --seg-on: #262626;
  --track: #000000;
  --input: #0b0b0b;
  --text: #ffffff;
  --lyric: #ffffff;
  --muted: #bdbdc3;
  --faint: #8a8a92;
  --line: rgba(255, 255, 255, .1);
  --line2: rgba(255, 255, 255, .17);
  --line3: rgba(255, 255, 255, .28);
  --tint: rgba(255, 255, 255, .05);
  --tint2: rgba(255, 255, 255, .08);
  --topbar: color-mix(in srgb, var(--bg) 93%, transparent);
  --banner: color-mix(in srgb, var(--panel2) 97%, transparent);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -12px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .9);
  --seg-on-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 6px rgba(0, 0, 0, .4);
  --backdrop: rgba(0, 0, 0, .7);
  color-scheme: dark;
  --accent: #ffffff;
  --accent-hi: #ffffff;
  --accent-ink: #000000;
  --accent-text: #ffffff;
  --accent-text-hi: #ffffff;
  --accent-soft: rgba(255, 255, 255, .13);
  --notice-ink: #e6e6e6;
  --chord: #ffffff;
  --section: #ffffff;
  --ok: #ffffff;
  --bad: #ffffff;
}
[data-theme="sage"] {
  /* Sage: soft green */
  --bg: #fbfcf9; --panel: #f0f4ec; --panel-end: #e9efe4; --raise: #e9efe4; --track: #e3eadd;
  --accent: #a9c59b; --accent-hi: #c8dcbe; --accent-ink: #1d2b17; --accent-text: #3d5a33; --accent-text-hi: #3c5832;
  --accent-soft: color-mix(in srgb, #a9c59b 38%, transparent); --notice-ink: #3c5832;
  --chord: #3c6a46; --section: #56763f; --ok: #2b7a4b; --bad: #c4352a;
}
[data-theme="lavender"] {
  /* Lavender */
  --bg: #fcfbfe; --panel: #f3f0fb; --panel-end: #ece8f7; --raise: #ece8f7; --track: #e7e2f4;
  --accent: #c4b5ec; --accent-hi: #ddd3f7; --accent-ink: #23173e; --accent-text: #563f96; --accent-text-hi: #563f96;
  --accent-soft: color-mix(in srgb, #c4b5ec 38%, transparent); --notice-ink: #563f96;
  --chord: #5944a6; --section: #7559b8; --ok: #2b7a4b; --bad: #c4352a;
}
[data-theme="blush"] {
  /* Blush: soft pink */
  --bg: #fffbfb; --panel: #fbf0f1; --panel-end: #f6e7e9; --raise: #f6e7e9; --track: #f3e0e3;
  --accent: #f2b9c3; --accent-hi: #f8d4da; --accent-ink: #3d1820; --accent-text: #8a3445; --accent-text-hi: #8c3447;
  --accent-soft: color-mix(in srgb, #f2b9c3 38%, transparent); --notice-ink: #8c3447;
  --chord: #ad3953; --section: #b5536a; --ok: #2b7a4b; --bad: #c4352a;
}
[data-theme="sky"] {
  /* Sky: soft blue */
  --bg: #fafcff; --panel: #eef4fb; --panel-end: #e6eef9; --raise: #e6eef9; --track: #e0e9f5;
  --accent: #aacdf0; --accent-hi: #cbe1f8; --accent-ink: #11273e; --accent-text: #24557f; --accent-text-hi: #255786;
  --accent-soft: color-mix(in srgb, #aacdf0 38%, transparent); --notice-ink: #255786;
  --chord: #1f5e9d; --section: #3a71ab; --ok: #2b7a4b; --bad: #c4352a;
}
[data-theme="peach"] {
  /* Peach */
  --bg: #fffcf9; --panel: #fcf2ea; --panel-end: #f8eadf; --raise: #f8eadf; --track: #f5e3d5;
  --accent: #f6c6a2; --accent-hi: #fbdcc4; --accent-ink: #3d2210; --accent-text: #874519; --accent-text-hi: #8f4d1f;
  --accent-soft: color-mix(in srgb, #f6c6a2 38%, transparent); --notice-ink: #8f4d1f;
  --chord: #a2511c; --section: #9a5524; --ok: #2b7a4b; --bad: #c4352a;
}
[data-theme="butter"] {
  /* Butter: soft yellow */
  --bg: #fffef8; --panel: #faf7e5; --panel-end: #f5f0d6; --raise: #f5f0d6; --track: #f1eacb;
  --accent: #f1df8f; --accent-hi: #f7ebb9; --accent-ink: #33290a; --accent-text: #685300; --accent-text-hi: #6e5700;
  --accent-soft: color-mix(in srgb, #f1df8f 38%, transparent); --notice-ink: #6e5700;
  --chord: #7a6100; --section: #8c7000; --ok: #2b7a4b; --bad: #c4352a;
}
[data-theme="gold"] {
  /* Gold: the classic look on white (gold buttons, blue chords) */
  --bg: #ffffff; --panel: #f6f6f3; --panel-end: #f1f1ed; --raise: #efefeb; --track: #e8e8e4;
  --accent: #f2b84b; --accent-hi: #ffd27a; --accent-ink: #1d1404; --accent-text: #7a4c00; --accent-text-hi: #643e00;
  --accent-soft: rgba(242, 184, 75, .2); --notice-ink: #6b4500;
  --chord: #0b5cad; --section: #9a5800; --ok: #15804d; --bad: #c4352a;
}
[data-theme="stage"] {
  /* Stage: the classic dark look (gold and light-blue chords on near-black) */
  --bg: #0b0b0d; --panel: #141417; --panel-end: #121215; --panel2: #1c1c21; --raise: #24242a; --seg-on: #24242a;
  --track: #0f0f12; --input: #0f0f12;
  --text: #f4f4f5; --lyric: #ececee; --muted: #a0a0a8; --faint: #6e6e77;
  --line: rgba(255, 255, 255, .1);
  --line2: rgba(255, 255, 255, .17);
  --line3: rgba(255, 255, 255, .28);
  --tint: rgba(255, 255, 255, .05);
  --tint2: rgba(255, 255, 255, .08);
  --topbar: color-mix(in srgb, var(--bg) 93%, transparent);
  --banner: color-mix(in srgb, var(--panel2) 97%, transparent);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -12px rgba(0, 0, 0, .7);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .9);
  --seg-on-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 6px rgba(0, 0, 0, .4);
  --backdrop: rgba(0, 0, 0, .7);
  color-scheme: dark;
  --accent: #f2b84b; --accent-hi: #ffd27a; --accent-ink: #1d1404; --accent-text: #f2b84b; --accent-text-hi: #ffd27a;
  --accent-soft: rgba(242, 184, 75, .12); --notice-ink: #f3dca4;
  --chord: #8fd0ff; --section: #f2b84b; --ok: #4cc893; --bad: #f2695c;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
#app { min-height: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.15; letter-spacing: -.02em; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small, p.small { font-size: .85rem; }
.center { text-align: center; }
a { color: var(--accent-text); text-decoration: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* icons */
.ico { display: inline-flex; width: 1.15em; height: 1.15em; flex: none; }
.ico svg { width: 100%; height: 100%; }

/* ---------- buttons ---------- */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: var(--tap); padding: 0 1.05em; border-radius: var(--r-sm);
  border: 1px solid var(--line2); background: var(--panel2); color: var(--text);
  font: inherit; font-weight: 600; letter-spacing: -.005em; line-height: 1; white-space: nowrap;
  cursor: pointer; touch-action: manipulation; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, transform .08s, opacity .15s; }
.btn:hover:not(:disabled) { background: var(--raise); border-color: var(--line3); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn:disabled { opacity: .3; cursor: default; }
.btn.primary { background: linear-gradient(180deg, var(--accent-hi), var(--accent) 60%); border-color: transparent; color: var(--accent-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .35) inset, 0 6px 18px -8px color-mix(in srgb, var(--accent) 55%, transparent); }
.btn.primary:hover:not(:disabled) { background: linear-gradient(180deg, var(--accent-hi), var(--accent-hi)); }
.btn.soft { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); }
.btn.soft:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 20%, transparent); border-color: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--panel2); color: var(--text); border-color: transparent; }
.btn.danger:hover:not(:disabled), .btn.ghost.danger:hover:not(:disabled) { color: var(--bad); }
.btn.danger.outline { border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); background: transparent; }
.btn.danger.outline:hover { background: color-mix(in srgb, var(--bad) 10%, transparent); }
.btn.big { min-height: 58px; font-size: 1.15rem; border-radius: var(--r); flex: 1; }
.btn.small { min-height: 36px; padding: 0 .8em; font-size: .875rem; border-radius: 9px; }
.btn.icon { min-width: var(--tap); padding: 0; }
.btn.small.icon, .songlist .btn.icon { min-width: 36px; min-height: 36px; }
.btn.icon.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.left { margin-right: auto; }
.linkish { appearance: none; background: none; border: 0; color: inherit; font: inherit; text-align: left; cursor: pointer;
  padding: .3em 0; display: flex; align-items: center; gap: .55em; min-width: 0; }
.linkish.small { font-size: .85rem; color: var(--accent-text); padding: .2em 0; }
.linkish.inline { display: inline; color: var(--accent-text); padding: 0; font-weight: 600; }
.linkish.inline:hover { text-decoration: underline; }

/* ---------- inputs ---------- */
input, textarea, select { width: 100%; background: var(--input); color: var(--text); border: 1px solid var(--line2);
  border-radius: var(--r-sm); padding: .7em .85em; font: inherit; transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { font-family: var(--mono); font-size: .88rem; line-height: 1.5; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=search] { -webkit-appearance: none; }
input[type=checkbox] { accent-color: var(--accent); width: 1.15em; height: 1.15em; }
label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .9em; color: var(--text); }
label input, label textarea { margin-top: .35em; font-weight: 400; }
.check { display: flex; align-items: center; gap: .6em; font-weight: 500; margin: .7em 0 0; line-height: 1.35; }
.check input { width: 1.15em; margin: 0; flex: none; }
.inline-input { width: auto; flex: 1; min-width: 9em; padding: .4em .6em; }
.check .inline-input { margin: 0; }
.fileinput { padding: .6em; background: var(--panel2); }
.formmsg { color: var(--bad); margin: .4em 0 0; font-size: .92rem; }
.formmsg.ok { color: var(--ok); }

/* ---------- layout bits ---------- */
.row { display: flex; gap: .5em; align-items: center; }
.row.end { justify-content: flex-end; }
.row.spread { justify-content: space-between; flex-wrap: wrap; }
.row.wrap { flex-wrap: wrap; }
.row2 { display: flex; gap: .75em; }
.grow { flex: 1; min-width: 0; }
.keyfield { width: 7em; }
.segs { display: inline-flex; background: var(--track); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg { appearance: none; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: .92rem;
  min-height: 34px; padding: 0 .95em; border-radius: 9px; cursor: pointer; transition: background-color .15s, color .15s; }
.seg:hover { color: var(--text); }
.seg.on { background: var(--seg-on); color: var(--text); box-shadow: var(--seg-on-shadow); }

.card { background: linear-gradient(180deg, var(--panel), var(--panel-end)); border: 1px solid var(--line); border-radius: 18px;
  padding: 1.2rem 1.25rem; margin: 1rem 0; box-shadow: var(--shadow); }
.card h2 { font-size: 1.12rem; }
.card > p:last-child { margin-bottom: 0; }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: .5em; margin-bottom: .8em; flex-wrap: wrap; }
.cardhead h2 { margin: 0; }
.notice { background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); color: var(--notice-ink);
  border-radius: 12px; padding: .75em .95em; font-size: .9rem; }
.tag { font-size: .7rem; font-weight: 600; color: var(--muted); background: var(--tint); border-radius: 6px;
  padding: .15em .5em; white-space: nowrap; letter-spacing: .01em; }
.tag.inset { color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, transparent); }

/* ---------- home ---------- */
.home { max-width: 540px; margin: 0 auto; padding: max(2.5rem, env(safe-area-inset-top)) 1.25rem 3rem; }
.brand { display: flex; align-items: center; gap: .6em; margin-bottom: .6rem; }
.brand h1 { font-size: 2.1rem; margin: 0; letter-spacing: -.035em; }
.logo { display: inline-flex; width: 40px; height: 40px; filter: drop-shadow(0 6px 16px color-mix(in srgb, var(--accent) 35%, transparent)); }
.logo svg { width: 100%; height: 100%; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 30em; margin-bottom: 1.4rem; }
.home h1 { font-size: 2.1rem; }
.home .back { display: inline-flex; align-items: center; gap: .25em; margin-bottom: 1.2rem; font-weight: 600; }
.code-input { font-size: 1.35rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; font-family: var(--mono); }
.code-input::placeholder { letter-spacing: .12em; font-size: 1.1rem; }
.card.join .row .btn { min-height: 52px; padding: 0 1.5em; }
.card.join .code-input { min-height: 52px; }
.bandlist { list-style: none; margin: 0 -.5rem; padding: 0; }
.bandrow { display: flex; align-items: center; gap: .85em; padding: .7em .5rem; border-radius: 12px; color: var(--text); transition: background-color .15s; }
.bandrow:hover { background: var(--tint); }
.bandrow .ico { color: var(--faint); }
.bandrow b { display: block; font-size: 1.02rem; }
.sub { display: block; color: var(--muted); font-size: .8rem; margin-top: .1em; }
.avatar { width: 40px; height: 40px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); font-weight: 800; font-size: 1.1rem; }
.signedin { margin: 1em 0 0; }

/* ---------- screens with a header ---------- */
.screen { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }
.top { display: flex; align-items: center; gap: .55em; padding: .45em .7em; padding-top: max(.45em, env(safe-area-inset-top));
  padding-left: max(.7em, env(safe-area-inset-left)); padding-right: max(.7em, env(safe-area-inset-right));
  background: var(--topbar); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line); flex-wrap: wrap; position: relative; z-index: 2; }
.top > .btn.icon { margin-left: -.3em; }
.top .room { font-size: 1rem; font-weight: 600; flex: 1; min-width: 0; display: flex; align-items: baseline; gap: .5em;
  white-space: nowrap; overflow: hidden; }
.top .bandname { color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.code { font-family: var(--mono); letter-spacing: .12em; color: var(--accent-text); font-weight: 700; }
.code.dim { color: var(--faint); font-size: .8rem; font-weight: 600; }
.top .share { gap: .4em; }
.top .tabs { order: 10; flex-basis: 100%; display: flex; margin: .15em 0 .1em; }
.top .tabs .seg { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: .4em; font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: .3em .65em; border-radius: 999px; background: var(--tint); color: var(--muted); white-space: nowrap; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.ok { color: var(--ok); } .pill.ok .dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); animation: pulse 2.4s infinite; }
.pill.bad { color: var(--bad); } .pill.demo { color: var(--accent-text); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px transparent; } }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pane.edit { overflow: auto; padding: .25rem 1rem calc(2rem + env(safe-area-inset-bottom)); max-width: 780px; width: 100%; margin: 0 auto; -webkit-overflow-scrolling: touch; }

/* ---------- the song on stage ---------- */
.display { --fs: 1; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; align-items: center; gap: .5em; padding: .45em .7em; border-bottom: 1px solid var(--line); flex-wrap: wrap;
  padding-left: max(.7em, env(safe-area-inset-left)); padding-right: max(.7em, env(safe-area-inset-right)); }
.group { display: flex; align-items: center; gap: 2px; background: var(--track); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.group .btn.icon { min-width: 34px; min-height: 34px; border-radius: 9px; }
.toolbar .seg { padding: 0 .75em; }
.aa { font-weight: 700; font-size: 1.05rem; }
.aa.small-a { font-size: .78rem; }
.scrollctl { margin-left: auto; }
.btn.icon.play { color: var(--text); background: var(--raise); border-color: transparent; }
.btn.icon.play.on { background: var(--accent); color: var(--accent-ink); }
.speed { color: var(--muted); font-size: .8rem; font-weight: 700; min-width: 1.4em; text-align: center; font-variant-numeric: tabular-nums; }
.stage { flex: 1; min-height: 0; overflow-y: auto; padding: 1.3rem 1.15rem; -webkit-overflow-scrolling: touch;
  padding-left: max(1.15rem, env(safe-area-inset-left)); padding-right: max(1.15rem, env(safe-area-inset-right)); }
.song { max-width: 900px; margin: 0 auto; font-size: calc(1rem * var(--fs)); animation: rise .25s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.song header { display: flex; align-items: center; gap: .55em .8em; flex-wrap: wrap; margin-bottom: .9em; }
.song .title { font-size: 2.3em; margin: 0; letter-spacing: -.035em; line-height: 1.05; }
.keybadge { display: inline-flex; align-items: baseline; gap: .35em; background: var(--accent); color: var(--accent-ink);
  font-weight: 800; border-radius: 9px; padding: .18em .6em; font-size: 1.15em; line-height: 1.3; }
.keybadge .k { font-size: .62em; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.keybadge.small { font-size: .72rem; padding: .1em .45em; border-radius: 6px; margin-left: .1em; vertical-align: middle; flex: none; }
pre { margin: 0 0 1.2em; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); }
pre.chords { font-size: 1.45em; line-height: 1.55; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: .75em .95em; }
pre.lyrics { font-size: 1.15em; line-height: 1.6; color: var(--lyric); }
.full pre.chords { font-size: 1.12em; }
.ln.chord { color: var(--chord); font-weight: 700; }
.ln .lbl { color: var(--muted); font-weight: 600; }
.ln.section { display: block; color: var(--section); font-weight: 700; font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  font-size: .78em; letter-spacing: .1em; text-transform: uppercase; margin-top: .4em; }
.endpad { height: 60vh; }
.empty { color: var(--muted); text-align: center; padding: 4rem 1rem; font-size: 1.05rem; display: grid; justify-items: center; gap: 1rem; }
.empty p { margin: 0; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid var(--line2); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.nextbar { display: flex; align-items: center; gap: .8em; padding: .7em 1em; border-top: 1px solid var(--line); background: var(--panel); min-height: 52px;
  padding-left: max(1em, env(safe-area-inset-left)); padding-right: max(1em, env(safe-area-inset-right)); }
.follower .nextbar { padding-bottom: max(.7em, env(safe-area-inset-bottom)); }
.upnext { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6em; font-size: 1.08rem; }
.eyebrow { font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); flex: none; }
.nexttitle { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nextbar .pos { color: var(--faint); font-size: .85rem; font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }

/* leader's controls under the song */
.controls { display: flex; gap: .55em; padding: .6em .8em; padding-bottom: max(.6em, env(safe-area-inset-bottom)); background: var(--panel);
  padding-left: max(.8em, env(safe-area-inset-left)); padding-right: max(.8em, env(safe-area-inset-right)); }
.controls .setbtn { flex: 0 0 58px; color: var(--muted); }
.jump { list-style: none; margin: 0 -.4rem; padding: 0; overflow: auto; max-height: min(65vh, 560px); }
.jumprow { appearance: none; width: 100%; display: flex; align-items: center; gap: .8em; padding: .7em .55rem; border: 0; border-radius: 11px;
  background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.jumprow:hover { background: var(--tint); }
.jumprow.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 700; }
.jumprow .num { color: var(--faint); min-width: 1.6em; font-variant-numeric: tabular-nums; }

/* ---------- song lists ---------- */
.songlist { list-style: none; margin: 0; padding: 0; }
.songlist li { display: flex; align-items: center; gap: .3em; padding: .3em 0; border-top: 1px solid var(--line); min-height: 50px; }
.songlist li:first-child { border-top: 0; }
.songlist .linkish { padding: .45em 0; }
.ttl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.songlist .num { color: var(--faint); min-width: 1.7em; font-size: .88rem; font-variant-numeric: tabular-nums; display: inline-flex; }
.songlist li.current { background: linear-gradient(90deg, var(--accent-soft), transparent 80%); border-radius: 10px; border-top-color: transparent; margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; }
.songlist li.current + li { border-top-color: transparent; }
.songlist li.current .linkish { color: var(--accent-text); font-weight: 600; }
.songlist li.current .num { color: var(--accent-text); }
.songlist li.current .num .ico { width: .8em; height: .8em; }
.emptynote { margin: .2em 0 0; }
.search { margin-bottom: .6em; }
.library .btn.small { min-height: 34px; }

/* ---------- dialogs ---------- */
dialog.editor { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 20px;
  width: min(760px, 94vw); max-height: 92vh; padding: 1.35rem 1.35rem 1.1rem; box-shadow: var(--shadow-lg);
  animation: pop .18s ease-out; }
dialog.editor.narrow { width: min(420px, 94vw); }
dialog.editor h2 { font-size: 1.3rem; margin-bottom: .7em; }
dialog.editor .cardhead h2 { margin: 0; }
dialog.editor form > .row.end { margin-top: 1.1rem; position: sticky; bottom: -1.1rem; background: var(--panel); padding: .7rem 0 .2rem; }
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
dialog h3 { margin: 1.2em 0 .5em; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
dialog h3:first-of-type { margin-top: .2em; }
.importlist { max-height: 42vh; overflow: auto; margin-bottom: .6em; }
.importlist .check { margin: 0; }
details summary { cursor: pointer; }
.qr { background: #fff; border-radius: 16px; padding: 10px; width: min(280px, 70vw); margin: .4rem auto 1rem; aspect-ratio: 1; display: grid; place-items: center; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr p { color: #555; }

/* ---------- sign-in ---------- */
.signinwrap { display: flex; flex-direction: column; gap: .8em; }
.btn.google { background: #fff; color: #1f1f1f; border-color: var(--line2); min-height: 48px; }
.btn.google:hover:not(:disabled) { background: #f1f1f1; border-color: #f1f1f1; }
.btn.google .g { display: inline-flex; width: 20px; height: 20px; }
.btn.google .g svg { width: 100%; height: 100%; }
.or { display: flex; align-items: center; gap: .8em; color: var(--faint); font-size: .8rem; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.signin { display: flex; flex-direction: column; gap: .6em; }
.signin .btn.primary { min-height: 48px; }

/* ---------- band tab ---------- */
.sharecard { text-align: center; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), linear-gradient(180deg, var(--panel), var(--panel-end)); }
.sharecard .row { justify-content: center; }
.bigcode { font-family: var(--mono); font-size: clamp(2.4rem, 12vw, 3.4rem); font-weight: 800; letter-spacing: .22em; color: var(--accent-text);
  margin: .2em 0 .45em; padding-left: .22em; text-shadow: 0 0 30px color-mix(in srgb, var(--accent) 25%, transparent); }
.bandname { color: var(--accent-text); }
.invite { margin-top: 1em; display: flex; flex-direction: column; gap: .6em; padding: .9em; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); }
.invite p { margin: 0; font-size: .9rem; }
.invite input { font-size: .8rem; font-family: var(--mono); }

/* ---------- phones ---------- */
@media (max-width: 560px) {
  .song .title { font-size: 1.85em; }
  .top .share > span:not(.ico) { display: none; }
  .top .code.dim { display: none; } /* the code is on the Band tab; room for the band name */
  .top .share { min-width: 36px; padding: 0; }
  .btn.big > span:not(.ico):not(.cuelbl) { display: none; }
  .btn.big .ico { width: 1.4em; height: 1.4em; }
  .btn.big { min-height: 56px; }
  .controls .setbtn { flex: 0 0 64px; }
  .card { padding: 1.05rem 1rem; border-radius: 16px; }
  .pane.edit { padding-left: .75rem; padding-right: .75rem; }
  dialog.editor { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 22px 22px 0 0;
    border-bottom: 0; padding-bottom: max(1.1rem, env(safe-area-inset-bottom)); animation: slideup .22s ease-out; }
  dialog.editor.narrow { width: 100vw; }
  .row2 { flex-direction: column; gap: 0; }
  .keyfield { width: 100%; }
}
@keyframes slideup { from { transform: translateY(40px); opacity: .4; } }
@media (min-width: 900px) {
  .top .tabs { order: 0; flex-basis: auto; margin: 0 0 0 auto; }
  .top .tabs .seg { flex: none; min-width: 6.5em; }
  .top .room { flex: 0 1 auto; margin-right: .3em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (min-width: 960px) {
  /* keep the bars lined up with the song column on wide screens */
  .controls, .nextbar { padding-left: calc((100% - 900px) / 2); padding-right: calc((100% - 900px) / 2); }
  .controls .btn.big { flex: 0 1 260px; }
  .controls .btn.big.setbtn { flex: 0 0 64px; }
  .controls { justify-content: space-between; }
}

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50;
  max-width: min(92vw, 460px); padding: .75em 1.1em; border-radius: 14px; background: var(--raise); border: 1px solid var(--line2);
  color: var(--text); font-size: .92rem; font-weight: 500; box-shadow: var(--shadow-lg); animation: rise .2s ease-out;
  transition: opacity .4s; }
.toast.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.toast.out { opacity: 0; }

/* ---------- help ---------- */
.helpbtn { color: var(--muted); }
.brand .helpbtn { margin-right: -.4em; }
.guide { padding: 0; margin: .7rem 0; }
.guide summary { list-style: none; display: flex; align-items: center; gap: .6em; padding: 1rem 1.15rem; font-weight: 700; font-size: 1.02rem; cursor: pointer; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary .ico { color: var(--faint); transition: transform .2s; }
.guide[open] summary .ico { transform: rotate(90deg); color: var(--accent-text); }
.guide[open] summary { color: var(--accent-text); }
.guidebody { padding: 0 1.15rem 1.1rem; }
.steps { margin: 0 0 .9em; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: .15em 0 .75em 2.3em; line-height: 1.45; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: .1em; width: 1.6em; height: 1.6em; border-radius: 50%;
  display: grid; place-items: center; font-size: .78rem; font-weight: 800; background: var(--accent-soft); color: var(--accent-text); }
.tips { margin: 0; padding: .75em .9em .75em 2em; border-radius: 12px; background: var(--tint); border: 1px solid var(--line);
  color: var(--muted); font-size: .9rem; }
.tips li { margin: .2em 0; }
.help .lede { margin-bottom: .6rem; }

/* ---------- drag to reorder ---------- */
.sortscroll { overflow: auto; max-height: 62vh; margin: 0 -.4rem; padding: 0 .4rem; overscroll-behavior: contain; }
.importscroll { max-height: 38vh; }
dialog.tall { height: 92dvh; }
dialog.tall form { display: flex; flex-direction: column; height: 100%; }
dialog.tall .sortscroll:only-of-type { flex: 1; max-height: none; }
.sortlist { list-style: none; margin: 0; padding: 0; counter-reset: pos; }
.sortlist li { counter-increment: pos; display: flex; align-items: center; gap: .55em; min-height: 52px; padding: .25em .2em .25em .55em;
  margin: 0 0 6px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); user-select: none; -webkit-user-select: none;
  transition: box-shadow .15s, background-color .15s; }
.sortlist li .num::before { content: counter(pos); }
.sortlist li .num { color: var(--faint); min-width: 1.6em; font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.sortlist .check { margin: 0; min-width: 0; }
.grip { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; color: var(--faint);
  cursor: grab; touch-action: none; border-radius: 10px; }
.grip:hover { color: var(--text); background: var(--tint); }
.sortlist.sorting { cursor: grabbing; }
.sortlist.locked .grip { display: none; }
.ordertext { min-height: 7em; }
.orderstatus p { margin: .5em 0 .2em; font-size: .9rem; font-weight: 600; }
.orderstatus .good { color: var(--ok); }
.orderstatus .warn { color: var(--accent-text); }
.sortlist.importlist { max-height: none; overflow: visible; margin: 0; }
dialog.tall { overflow: hidden; }
dialog.tall form { min-height: 0; }
dialog.tall .sortscroll { flex: 1; max-height: none; min-height: 0; }

/* ---------- saved sets bar ---------- */
.savedbar { padding-top: .9rem; padding-bottom: .9rem; }
.savedbar .cardhead { margin-bottom: .6em; }
.setpick { flex: 1; min-width: 0; min-height: 40px; padding: 0 2.2em 0 .8em; border-radius: 10px; font-weight: 600; font-size: .95rem;
  -webkit-appearance: none; appearance: none; cursor: pointer; text-overflow: ellipsis;
  background: var(--input) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a0a8' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .7em center / 1.1em; }
.savedbar .btn.small.primary { min-height: 40px; padding: 0 1.1em; }
@media (max-width: 560px) {
  .savedbar .row { flex-wrap: wrap; }
  .savedbar .setpick { flex-basis: 100%; }
  .savedbar .btn.small.primary { flex: 1; }
}

/* ---------- cue, callouts, peek ---------- */
.stagewrap { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.banner { touch-action: none; cursor: grab; position: absolute; left: 50%; bottom: .8rem; /* low down, so the chords of the song that's on stay readable */ transform: translateX(-50%); z-index: 5; width: min(92%, 560px);
  display: flex; align-items: center; justify-content: center; gap: .6em; flex-wrap: wrap; text-align: center;
  padding: .9em 1.2em; border-radius: 18px; box-shadow: var(--shadow-lg); user-select: none; -webkit-user-select: none; }
.banner.show { animation: bannerin .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes bannerin { from { opacity: 0; transform: translate(-50%, 18px) scale(.96); } }
.banner.cue { background: var(--banner); border: 2px solid var(--accent); font-size: 1.2rem; padding: .7em 1em; }
.banner.cue .eyebrow { color: var(--accent-text); width: 100%; }
.banner.cue b { font-size: 1.15em; }
.banner.callout { background: linear-gradient(180deg, var(--accent-hi), var(--accent)); color: var(--accent-ink); font-size: clamp(1.5rem, 7vw, 2.4rem);
  letter-spacing: -.02em; line-height: 1.15; padding: .7em 1em; }
.banner.callout b { font-weight: 800; }
.peekbar { display: flex; align-items: center; gap: .6em; padding: .5em .8em .5em 1em; background: var(--accent-soft); color: var(--accent-text);
  font-size: .88rem; font-weight: 600; border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
button.nextbar { appearance: none; width: 100%; border: 0; border-top: 1px solid var(--line); color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.nextbar:disabled { cursor: default; }
.peekhint { display: inline-flex; color: var(--faint); margin-left: .2em; }
.peekhint .ico { width: 1em; height: 1em; }
.nextbar.peeking { background: var(--accent-soft); }
.nextbar.cued { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 20%, transparent), var(--panel)); }
.nextbar.cued .upnext .eyebrow { color: var(--accent-text); animation: blink 1.6s ease-in-out infinite; }
.nextbar.cued .nexttitle { color: var(--accent-text); }
@keyframes blink { 50% { opacity: .35; } }
.cuebar { display: flex; align-items: center; gap: .45em; padding: .5em .8em 0; background: var(--panel);
  padding-left: max(.8em, env(safe-area-inset-left)); padding-right: max(.8em, env(safe-area-inset-right)); }
.cuebar .cuebtn { justify-content: flex-start; min-width: 0; }
.cuebar .ttl { min-width: 0; }
.cuedchip { display: inline-flex; align-items: center; gap: .45em; min-width: 0; color: var(--accent-text); font-weight: 700; font-size: .92rem; padding: 0 .3em; }
.calloutgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5em; margin: .4em 0 .9em; }
.calloutgrid .btn { white-space: normal; line-height: 1.2; min-height: 50px; }
.jump li { display: flex; align-items: center; gap: .3em; }
.jump li .jumprow { flex: 1; min-width: 0; }
.jumprow.static { cursor: default; }
.jumprow.static:hover { background: none; }
.jumpsearch { margin: .8em 0 .3em; }
@media (min-width: 960px) { .cuebar { padding-left: calc((100% - 900px) / 2); padding-right: calc((100% - 900px) / 2); } }


/* ---------- big cue button, dismissable banners, preview ---------- */
.controls { display: grid; grid-template-columns: 72px 1fr 1fr; gap: .55em; }
.controls .btn.big { flex: none; min-width: 0; }
.cuebig { gap: .6em; justify-content: center; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent-text); }
.cuebig:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 20%, transparent); border-color: var(--accent); }
.cuebig .ico { width: 1.35em; height: 1.35em; }
.cuelbl { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.15; }
.cuelbl b { font-size: 1.02rem; }
.cuelbl small { font-size: .74rem; font-weight: 600; opacity: .8; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cuebig.on { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text-hi); border: 2px solid var(--accent); animation: cuering 1.8s ease-out infinite; }
@keyframes cuering { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.cuebar .cuedchip .btn { margin-left: auto; }
.bannerbtns { display: flex; gap: .5em; width: 100%; justify-content: center; margin-top: .35em; }
.bannerbtns .btn { min-height: 44px; font-size: .95rem; padding: 0 1.1em; }
.swipehint { width: 100%; font-size: .68rem; font-weight: 600; letter-spacing: .04em; opacity: .55; margin-top: .2em; }
.banner.callout .swipehint { font-size: .7rem; }
.peekhint { display: inline-flex; align-items: center; gap: .3em; margin-left: auto; padding: .3em .7em; border-radius: 999px;
  background: var(--tint2); color: var(--muted); font-size: .78rem; font-weight: 700; flex: none; }
.peekhint .ico { width: 1.05em; height: 1.05em; }
.nextbar.cued .peekhint { background: var(--accent); color: var(--accent-ink); }
.nextbar.peeking .peekhint { background: var(--text); color: var(--bg); }
@media (min-width: 960px) { .controls { grid-template-columns: 200px 1fr 1fr; } }
@media (max-width: 380px) { .controls { grid-template-columns: 60px 1fr 1fr; } .cuelbl small { display: none; } }
.cuebig { padding: 0 .55em; gap: .45em; }
.cuelbl b { white-space: nowrap; }
.cuebig .ico { width: 1.25em; height: 1.25em; }
/* the Previous button is narrow below desktop width: arrow only there */
@media (max-width: 959px) { .prevbtn > span:not(.ico) { display: none; } }
.cuethen { display: flex; align-items: center; gap: .3em; min-width: 0; justify-content: center; font-size: .82rem; color: var(--muted); font-weight: 600; }
.cuethen .btn { flex: none; }
@media (max-width: 560px) {
  /* while a song is cued, Set list and Callout shrink to icons to make room for "Then: …" */
}

/* ---------- offline ---------- */
.offline { display: flex; align-items: flex-start; gap: .55em; padding: .6em .9em; font-size: .85rem; line-height: 1.35;
  background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--notice-ink); border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.offline .ico { color: var(--accent-text); margin-top: .1em; }

/* ---------- Up next bar: big Set list button + Up next / Preview ---------- */
.nextbar { gap: .55em; padding: .5em .7em; align-items: stretch; }
.setpos { appearance: none; flex: none; display: flex; align-items: center; gap: .6em; min-height: 54px; padding: 0 1em 0 .85em;
  border-radius: 14px; background: var(--raise); border: 1px solid var(--line2); color: var(--text); font: inherit; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .08s; }
.setpos:hover:not(:disabled) { border-color: var(--accent); }
.setpos:active:not(:disabled) { transform: scale(.97); }
.setpos .ico { width: 1.45em; height: 1.45em; color: var(--accent-text); }
.setposnum { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.setposnum .n { font-size: 1.05rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.setposnum .n b { color: var(--text); font-size: 1.2rem; font-weight: 800; }
.setposnum .eyebrow { font-size: .62rem; margin-top: .15em; }
button.upnext { appearance: none; flex: 1; min-width: 0; display: flex; align-items: center; gap: .6em; padding: 0 .4em 0 .7em;
  background: none; border: 1px solid transparent; border-radius: 14px; color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.upnext:hover:not(:disabled) { background: var(--tint); border-color: var(--line); }
button.upnext:disabled { cursor: default; }
.upnexttext { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.upnexttext .nexttitle { font-size: 1.05rem; display: flex; align-items: center; gap: .4em; }
.upnexttext .nexttitle .keybadge { flex: none; }
.peekhint { margin-left: 0; }
.cuebar .hint { color: var(--faint); font-size: .76rem; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 380px) { .setpos { padding: 0 .7em 0 .6em; } .peekhint > span:not(.ico) { display: none; } }
.upnexttext .nexttitle .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 960px) { .nextbar { padding-left: calc((100% - 900px) / 2); padding-right: calc((100% - 900px) / 2); } }

/* ---------- song numbers ---------- */
.numchip { flex: none; font-size: .78em; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--muted);
  background: var(--tint2); border-radius: 6px; padding: .08em .4em; letter-spacing: .01em; }
.numchip.extra { font-weight: 700; text-transform: uppercase; font-size: .62em; letter-spacing: .06em; padding: .2em .45em; }
.nextbar.cued .numchip { background: var(--accent); color: var(--accent-ink); }
.thenline { font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .1em; }
.thenline b { color: var(--text); font-variant-numeric: tabular-nums; }
.banner.cue .numchip { font-size: .8em; background: var(--accent); color: var(--accent-ink); }

@media (max-width: 560px) {
  /* phones: the next song's title matters more than the word "Preview" */
  .peekhint { padding: .45em .55em; }
  .peekhint > span:not(.ico) { display: none; }
  .cuethen { justify-content: flex-end; }
}

/* ---------- Up next bar: more breathing room ---------- */
.nextbar { gap: 1em; padding-top: .75em; padding-bottom: .75em; min-height: 76px; }
.setpos { min-height: 58px; padding: 0 1.1em 0 .95em; gap: .7em; }
button.upnext { padding: .15em .5em .15em .2em; gap: .9em; }
.upnexttext { gap: .22em; line-height: 1.25; }
.upnexttext .eyebrow { line-height: 1; }
.upnexttext .nexttitle { font-size: 1.1rem; gap: .5em; }
.thenline { margin-top: 0; }
.peekhint { align-self: center; }
.cuebar { padding-top: .6em; }
/* Cancel cue: outlined so it reads as a button */
.btn.outline { background: transparent; border-color: var(--line2); color: var(--muted); }
.btn.outline:hover:not(:disabled) { border-color: var(--bad); color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); }
@media (max-width: 560px) {
  .nextbar { gap: .7em; padding-top: .65em; padding-bottom: .65em; }
  .setpos { padding: 0 .85em 0 .75em; }
}
.cuethen { justify-content: flex-end; }

/* ---------- Up next: two songs ahead, side by side ---------- */
.slots { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0; }
.slot { min-width: 0; display: flex; flex-direction: column; gap: .25em; line-height: 1.2; }
.slot.first { flex: 1.4 1 0; }
.slot.then { flex: 1 1 0; padding-left: .9em; margin-left: .9em; border-left: 1px solid var(--line2); }
.slot .eyebrow { line-height: 1; }
.slot .nexttitle { display: flex; align-items: center; gap: .45em; min-width: 0; font-size: 1.08rem; }
.slot.then .nexttitle { font-size: .95rem; color: var(--muted); }
.slot .nexttitle .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot.then .numchip { background: var(--tint2); color: var(--muted); }
.nextbar.cued .slot.then .eyebrow { color: var(--muted); animation: none; }
.nextbar.cued .slot.then .nexttitle { color: var(--text); }
.cuedrow { display: flex; align-items: center; gap: .7em; padding: .7em .85em; margin: 0 0 .8em; border-radius: 14px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent-text); }
.cuedrow .grow { display: flex; flex-direction: column; gap: .2em; min-width: 0; }
.cuedrow b { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
  .slot.then { padding-left: .6em; margin-left: .6em; }
  .slot .nexttitle { font-size: 1rem; }
  .slot.then .nexttitle { font-size: .88rem; }
  .slot .nexttitle .keybadge { display: none; } /* key is on the song itself; room for the title */
}
@media (max-width: 560px) {
  /* phones: give the two song titles the room; tapping the Up next area still previews */
  .nextbar .peekhint { display: none; }
  .setpos { padding: 0 .7em 0 .6em; gap: .45em; }
  .setposnum .eyebrow { font-size: .56rem; }
  button.upnext { padding-left: 0; padding-right: 0; }
  .slot.first { flex: 1.25 1 0; }
}
/* Cancel cue: gold like the Cue button */
.cuedrow .cancelcue { flex: none; min-height: 40px; padding: 0 1em; border-width: 1px; }

/* ---------- saved to this phone ---------- */
.btn.star { color: var(--faint); }
.btn.star.on { color: var(--accent-text); }
.btn.star.on svg path { fill: currentColor; }
.song header .songstar { margin-left: auto; min-width: 44px; min-height: 44px; }
.song header .songstar .ico { width: 1.4em; height: 1.4em; }
.savesetbtn { width: 100%; margin: .1em 0 .8em; min-height: 48px; }
.avatar .ico { width: 1.2em; height: 1.2em; }
.avatar.star { background: var(--tint); }
.controls.mine { grid-template-columns: 1fr 1fr; }
.mine .top .code.dim { display: inline; }
.btn.icon.star.on { background: transparent; border-color: transparent; color: var(--accent-text); }
.top .room.minehead { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.2; }
.top .room.minehead .sub { margin: 0; font-weight: 500; }

/* Cue buttons in the Set list: clearly buttons, in the Cue gold */
.jump .cuebtn { flex: none; min-height: 40px; padding: 0 .95em; gap: .4em; font-weight: 700;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); color: var(--accent-text); }
.jump .cuebtn:hover:not(:disabled) { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: var(--accent); color: var(--accent-text-hi); }
.jump .cuebtn .ico { width: 1.05em; height: 1.05em; }

/* ---------- tonight's set's name ---------- */
.top .room.twoline { flex-direction: column; align-items: flex-start; gap: .05em; line-height: 1.2; }
.top .room .labline { display: flex; align-items: baseline; gap: .5em; min-width: 0; max-width: 100%; overflow: hidden; }
.top .room .setline { display: flex; align-items: center; gap: .35em; min-width: 0; max-width: 100%; font-size: .78rem; font-weight: 600; color: var(--accent-text); }
.top .room .setline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .room .setline .ico { width: 1em; height: 1em; flex: none; opacity: .85; }
.settitle { display: flex; flex-direction: column; gap: .1em; min-width: 0; }
.setnamebtn { padding: 0; gap: .35em; font-size: .9rem; font-weight: 600; color: var(--accent-text); max-width: 100%; }
.setnamebtn .muted { font-weight: 500; }
.setnamebtn .ico { width: .95em; height: .95em; opacity: .7; }
/* the set name looks the same in the header, the Set list sheets and the Songs tab */
.setline { display: flex; align-items: center; gap: .35em; min-width: 0; max-width: 100%; font-size: .82rem; font-weight: 600; color: var(--accent-text); }
.setline span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.setline .ico { width: 1em; height: 1em; flex: none; opacity: .85; }
.top .room .setline { font-size: .78rem; }
.sheettitle { display: flex; flex-direction: column; gap: .2em; min-width: 0; flex: 1; }
.sheettitle h2 { margin: 0; }
.setnamebtn .setline { font-size: .85rem; }

/* ---------- notifications bell ---------- */
.bellbtn { color: var(--muted); }
.bellbtn.on { color: var(--accent-text); background: transparent; border-color: transparent; }
.bellbtn.on svg path { fill: currentColor; }

/* ---------- "Get alerts" card under the header ---------- */
.pushbar { display: flex; align-items: center; gap: .55em; padding: .55em .8em; font-size: .86rem; line-height: 1.3;
  background: color-mix(in srgb, var(--accent) 10%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); color: var(--notice-ink); }
.pushbar > .ico { color: var(--accent-text); flex: none; }
.pushbar .btn { flex: none; min-height: 34px; }
.notifyhelp { margin: .8em 0 .2em; }
.notifyhelp summary { color: var(--accent-text); font-weight: 600; }
dialog .btn.soft { margin-bottom: .2em; }

/* ---------- no accidental zoom on phones ---------- */
/* A quick double tap (e.g. hitting Next twice) mustn't zoom the page. `manipulation` turns off
   double-tap zoom but keeps scrolling and two-finger pinch zoom. Drag handles and banners keep their
   own `touch-action: none` (more specific rules win). */
* { touch-action: manipulation; }
/* iPhone zooms into any text box with text under 16px when you tap it: keep them at 16px there */
@supports (-webkit-touch-callout: none) {
  input, textarea, select { font-size: max(16px, 1em); }
}
.diag { list-style: none; margin: .5em 0 .7em; padding: 0; font-size: .82rem; }
.diag li { display: flex; justify-content: space-between; gap: .8em; padding: .35em 0; border-top: 1px solid var(--line); }
.diag li:first-child { border-top: 0; }
.diagk { color: var(--muted); }
.diagv { text-align: right; font-weight: 600; word-break: break-word; }
.diagv.good { color: var(--ok); } .diagv.bad { color: var(--bad); }

/* ---------- phones: Up next and Then as two full-width rows ---------- */
.btn.icon.bellbtn.on { background: transparent; border-color: transparent; color: var(--accent-text); }
@media (max-width: 560px) {
  .nextbar { gap: .6em; }
  .setpos { padding: 0 .65em 0 .55em; gap: .4em; min-height: 62px; }
  .setposnum .n b { font-size: 1.1rem; }
  .slots { flex-direction: column; align-items: stretch; justify-content: center; gap: .35em; }
  .slot, .slot.first, .slot.then { flex: none; flex-direction: row; align-items: center; gap: .5em; }
  .slot.then { border-left: 0; margin-left: 0; padding-left: 0; }
  .slot .eyebrow { flex: none; width: 5.6em; font-size: .6rem; line-height: 1.15; }
  .slot .nexttitle { font-size: .98rem; gap: .4em; }
  .slot.first .nexttitle { font-weight: 700; }
  .slot.then .nexttitle { font-size: .92rem; }
  .slot .nexttitle .keybadge { display: inline-flex; }
}

/* ---------- phones: more room for the song titles ---------- */
@media (max-width: 560px) {
  /* Set list button: just the number, with "SET LIST" underneath (no icon) */
  .setpos { padding: 0 .7em; gap: 0; min-width: 0; }
  .setpos > .ico { display: none; }
  .setposnum { align-items: center; }
  /* labels sit right next to their song */
  .slot .eyebrow { width: auto; white-space: nowrap; }
  .slot, .slot.first, .slot.then { gap: .4em; }
}

/* ---------- phones: compact Set list button (icon + small numbers) and slim labels ---------- */
@media (max-width: 560px) {
  .setpos { padding: 0 .55em; gap: .35em; }
  .setpos > .ico { display: inline-flex; width: 1.05em; height: 1.05em; }
  .setposnum { align-items: flex-start; }
  .setposnum .n { font-size: .78rem; }
  .setposnum .n b { font-size: .95rem; }
  .setposnum .eyebrow { font-size: .5rem; letter-spacing: .06em; margin-top: .1em; }
  .slot .eyebrow { font-size: .52rem; letter-spacing: .04em; }
  .slot, .slot.first, .slot.then { gap: .3em; }
  .slot .numchip { padding: .05em .3em; }
}

/* ---------- accessibility fonts (Display → Font) ---------- */
[data-typeface="dyslexic"] { --mono: 'OpenDyslexic Mono', ui-monospace, Menlo, monospace; }
[data-typeface="dyslexic"] body { font-family: 'OpenDyslexic', -apple-system, sans-serif; }
[data-typeface="atkinson"] { --mono: 'Atkinson Hyperlegible Mono', ui-monospace, Menlo, monospace; }
[data-typeface="atkinson"] body { font-family: 'Atkinson Hyperlegible', -apple-system, sans-serif; }
[data-typeface="dyslexic"] .ln.section, [data-typeface="atkinson"] .ln.section { font-family: inherit; }
/* the previews in the Display panel always show their own font */
.tfchoice[data-tf="dyslexic"] b, .tfchoice[data-tf="dyslexic"] .muted { font-family: 'OpenDyslexic', sans-serif; }
.tfchoice[data-tf="dyslexic"] code { font-family: 'OpenDyslexic Mono', monospace; }
.tfchoice[data-tf="atkinson"] b, .tfchoice[data-tf="atkinson"] .muted { font-family: 'Atkinson Hyperlegible', sans-serif; }
.tfchoice[data-tf="atkinson"] code { font-family: 'Atkinson Hyperlegible Mono', monospace; }
.tfchoice[data-tf="standard"] b, .tfchoice[data-tf="standard"] .muted { font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif; }
.tfchoice[data-tf="standard"] code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.btn.icon.aa { display: inline-flex; align-items: baseline; gap: 0; padding: 0 .55em; min-width: 40px; font-weight: 700; }
.aa-big { font-size: 1.15rem; line-height: 1; }
.aa-small { font-size: .82rem; line-height: 1; }
.sizerow { justify-content: center; gap: .8em; margin: .3em 0 .6em; }
.sizerow .btn { min-width: 70px; gap: .25em; }
.sizepct { min-width: 4em; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.tfchoices { display: flex; flex-direction: column; gap: .5em; margin-bottom: .7em; }
.tfchoice { appearance: none; text-align: left; display: flex; flex-direction: column; gap: .25em; padding: .8em .95em; border-radius: 14px;
  background: var(--panel2); border: 1.5px solid var(--line2); color: var(--text); cursor: pointer; font: inherit; }
.tfchoice b { font-size: 1.08rem; }
.tfchoice code { color: var(--chord); font-weight: 700; font-size: .95rem; }
.tfchoice.on { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- floating Preview button in the bandmates' Set list ---------- */
.floatrow { position: sticky; bottom: max(.6rem, env(safe-area-inset-bottom)); display: flex; justify-content: flex-end; pointer-events: none; margin-top: .4rem; }
.floatbtn { pointer-events: auto; border-radius: 999px; padding: 0 1.2em; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line2); }

/* ---------- phones: Cued next / Then numbers line up ---------- */
@media (max-width: 560px) {
  .slots { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: .35em; row-gap: .3em; align-items: center; }
  .slot, .slot.first, .slot.then { display: contents; }
  .slot .eyebrow { width: auto; }
}

/* ---------- keys, transposing and chord styles ---------- */
button.keybadge { border: 0; font-family: inherit; cursor: pointer; }
.keynote { margin: -.5em 0 .9em; color: var(--muted); font-size: .82rem; }
.choicesegs { display: flex; width: 100%; }
.choicesegs .seg { flex: 1; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15em; padding: .35em .4em; }
.choicesegs .seg code { font-family: var(--mono); font-size: .78rem; font-weight: 400; color: var(--muted); white-space: pre; }
.choicesegs .seg.on code { color: var(--accent-text); }
.keygrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35em; }
.keypick { appearance: none; min-height: 42px; border-radius: 10px; border: 1px solid var(--line2); background: var(--input); color: var(--text);
  font: inherit; font-weight: 700; cursor: pointer; }
.keypick.orig { text-decoration: underline; text-underline-offset: .25em; text-decoration-color: var(--accent); }
.keypick.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); text-decoration-color: var(--accent-ink); }
.keyhint { margin: -.3em 0 .2em; display: flex; flex-wrap: wrap; align-items: center; gap: .3em .5em; }
.keyhint:empty { display: none; }

/* ---------- upcoming gigs ---------- */
.todaybar { display: flex; align-items: center; gap: .6em; margin: 0 0 .6rem; padding: .55em .5em .55em .8em; border-radius: 14px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--accent-text); }
.todaybar[hidden] { display: none; }
.todaybar .grow { min-width: 0; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todaybar .eyebrow { display: block; color: var(--accent-text); }
.upcoming { margin: .2rem 0 .8rem; }
.upcoming h3 { margin-top: .4rem; }
.gigdate { flex: none; min-width: 5.6em; font-weight: 700; color: var(--accent-text); font-size: .85rem; }

/* ---------- theme picker ---------- */
.themegroups { display: flex; flex-direction: column; gap: .55em; margin-bottom: .6em; }
.themegroup .eyebrow { display: block; margin: 0 0 .3em; }
.themechoices { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45em; }
.themechoice { appearance: none; display: flex; flex-direction: column; align-items: center; gap: .3em; padding: .5em .25em .45em;
  border-radius: 12px; border: 1.5px solid var(--line2); background: var(--panel2); color: var(--text); font: inherit;
  font-size: .78rem; font-weight: 600; cursor: pointer; line-height: 1.15; text-align: center; }
.themechoice.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.swatch { position: relative; width: 100%; max-width: 52px; height: 30px; border-radius: 8px; border: 1px solid rgba(128, 128, 128, .35);
  display: flex; align-items: center; justify-content: center; gap: .35em; overflow: hidden; }
.swchord { font-family: var(--mono); font-weight: 800; font-size: .85rem; }
.swdot { width: 12px; height: 12px; border-radius: 4px; }
.swatch.auto { background: linear-gradient(135deg, #fff 50%, #000 50%); }

/* ---------- slimmer bars: more room for the song (about 12% less height for each) ---------- */
.top { padding-top: max(.3em, env(safe-area-inset-top)); padding-bottom: .3em; row-gap: .25em; }
.top .tabs { margin: .05em 0 0; }
.top .tabs .seg { min-height: 30px; }
.nextbar { min-height: 0; padding-top: .5em; padding-bottom: .5em; }
.setpos { min-height: 50px; }
.controls { padding-top: .5em; padding-bottom: max(.5em, env(safe-area-inset-bottom)); }
.btn.big { min-height: 50px; }
.cuebar { padding-top: .45em; }
.cuebar .btn.small { min-height: 32px; }
@media (max-width: 560px) {
  .nextbar { padding-top: .45em; padding-bottom: .45em; }
  .setpos { min-height: 54px; }
  .btn.big { min-height: 50px; }
}
/* Callout hidden (Display panel, leader): the Up next bar sits right on the big buttons */
.leader.nocallout .cuebar { display: none; }
.leader.nocallout .controls { padding-top: 0; }
.leader.nocallout .nextbar { padding-bottom: .5em; }
.optionbox { align-items: flex-start; margin: .3em 0 .7em; }
.optionbox input { margin-top: .2em; }
.optionbox > span { display: flex; flex-direction: column; gap: .1em; }

/* ---------- drag to reorder in the Live set list and the Songs tab ---------- */
.dragrows li { position: relative; }
.dragrows .grip { width: 40px; height: 40px; margin-left: .1em; }
.dragrows.sorting { cursor: grabbing; user-select: none; -webkit-user-select: none; }

/* ---------- zoom ---------- */
/* the song scrolls up and down; two-finger pinch is handled by the app (zooms the song, never the page) */
.stage { touch-action: pan-y; }
.zoombtn { gap: .2em; padding: 0 .5em; min-width: 40px; }
.zoombtn .ico { width: 1.15em; height: 1.15em; }
.zoompct { font-size: .72rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.zoombtn.on { background: var(--seg-on); color: var(--text); box-shadow: var(--seg-on-shadow); }
.zoompop { position: absolute; top: .6rem; right: max(.7rem, env(safe-area-inset-right)); z-index: 6; display: flex; align-items: center; gap: .35em;
  padding: .4em; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: var(--shadow-lg); animation: rise .15s ease-out; }
.zoompop .btn.small { min-height: 40px; }
.zoompop .btn.small.icon { min-width: 40px; }
.zoomval { min-width: 5.2em; font-variant-numeric: tabular-nums; }
.fitbtn.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
@media (max-width: 560px) { .zoompct { display: none; } .zoombtn { min-width: 36px; padding: 0 .4em; } }
.sheetcallout { margin: 0 0 .8em; }
.stagewrap .peekbar:not([hidden]) ~ .zoompop { top: 3.4rem; } /* below "Back to now" while previewing */

/* ---------- search in the Set list sheets ---------- */
.setsearch { margin: 0; }
.jumpsearch { margin: .2em 0 .6em; }
.nomatch { margin: .2em 0 .6em; }
.jump li[hidden] { display: none !important; }
.dragrows.locked .grip { visibility: hidden; } /* no dragging while the list is filtered */

/* ---------- instructions: home card and the Help page's quick start ---------- */
.guidecard { display: flex; align-items: center; gap: .85em; padding: .9rem 1.1rem; color: var(--text); }
.guidecard b { display: block; font-size: 1.02rem; }
.guidecard > .ico { color: var(--faint); }
.guidecard:hover { border-color: var(--accent); }
.quickstart h3 { margin: .6em 0 .5em; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-text); }
.quickstart .steps { margin-bottom: .4em; }
.qsgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.4rem; }
@media (max-width: 560px) { .qsgrid { grid-template-columns: 1fr; } }

/* ---------- Up next: tap the Cued/Next or Then song to preview it; tap it again to go back ---------- */
.upnext { flex: 1; min-width: 0; display: flex; align-items: center; }
.upnext .lastsong { padding: 0 .5em; }
.slots { flex: 1; min-width: 0; }
.slot { appearance: none; background: none; border: 1px solid transparent; border-radius: 11px; color: inherit; font: inherit;
  text-align: left; cursor: pointer; padding: .3em .55em; margin: 0; min-width: 0; -webkit-touch-callout: none;
  transition: background-color .15s, border-color .15s; }
.slot:hover:not(:disabled) { background: var(--tint); }
.slot:disabled { cursor: default; }
.slot.on { background: var(--accent-soft); border-color: var(--line2); }
.slot.on .eyebrow { color: var(--accent-text); }
.slot.then { margin-left: .4em; }
@media (max-width: 560px) {
  .slots { display: flex; flex-direction: column; align-items: stretch; gap: .1em; }
  .slot, .slot.first, .slot.then { display: flex; flex-direction: row; align-items: center; gap: .35em; width: 100%;
    padding: .2em .45em; margin: 0; border: 1px solid transparent; }
  .slot.on, .slot.then.on { border-color: var(--line2); }
  .slot .eyebrow { flex: none; width: 2.9em; }
}

/* ---------- drag to reorder: hold a row and it lifts out (iPhone style) ---------- */
.dragrows li, .sortlist li { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
li.lifted { position: relative; z-index: 6; background: var(--seg-on); border-radius: 12px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .35), 0 0 0 1px var(--line2); }
[data-dark="1"] li.lifted { box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .9), 0 0 0 1px var(--line3); } /* Black, Stage and dark Custom */
.sorting { cursor: grabbing; }
.dragrows .grip { opacity: .55; }

/* ---------- logo and loading animation ---------- */
.logo { filter: drop-shadow(0 6px 16px rgba(242, 184, 75, .35)); } /* the logo stays gold in every theme */
.loader { display: inline-flex; width: 40px; height: 40px; filter: drop-shadow(0 6px 14px rgba(242, 184, 75, .35)); }
.loader svg { width: 100%; height: 100%; overflow: visible; }
.loader path { stroke-dasharray: 1 1.05; stroke-dashoffset: 1.02; animation: logodraw 1.8s cubic-bezier(.6, 0, .2, 1) infinite; }
.loader .l2 { animation-delay: .12s; }
.loader .l3 { animation-delay: .24s; }
.loader .dot { transform-box: fill-box; transform-origin: center; transform: scale(0); animation: logodot 1.8s cubic-bezier(.3, 1.6, .5, 1) infinite; }
@keyframes logodraw { 0% { stroke-dashoffset: 1.02; } 28%, 72% { stroke-dashoffset: 0; } 92%, 100% { stroke-dashoffset: -1.03; } }
@keyframes logodot { 0%, 30% { transform: scale(0); } 42%, 74% { transform: scale(1); } 86%, 100% { transform: scale(0); } }
.loader.big { width: 76px; height: 76px; }
.splash { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem;
  background: var(--bg); animation: splashin .35s ease-out; }
.splashname { font-weight: 800; font-size: 1.35rem; letter-spacing: -.03em; color: var(--text); opacity: .9; }
@keyframes splashin { from { opacity: 0; transform: scale(.96); } }
.empty .loader { width: 44px; height: 44px; }
.loadingrow { display: flex; align-items: center; gap: .7em; padding: .6em 0; }
.loadingrow .loader { width: 26px; height: 26px; filter: none; }
@media (prefers-reduced-motion: reduce) {
  .loader path { stroke-dashoffset: 0; } .loader .dot { transform: none; }
}

/* the lifted card keeps its look while it settles into place */
li.settling { position: relative; z-index: 6; background: var(--seg-on); border-radius: 12px; }
/* "End of set" isn't tappable but shouldn't look greyed out */
.slot:disabled { color: inherit; opacity: 1; }
/* Older browsers without color-mix (iOS before 16.2): solid stand-ins so bars and tints don't vanish */
@supports not (color: color-mix(in srgb, red, red)) {
  :root, [data-theme] { --topbar: var(--bg); --banner: var(--panel2); }
  [data-theme="sage"] { --accent-soft: rgba(169, 197, 155, .38); }
  [data-theme="lavender"] { --accent-soft: rgba(196, 181, 236, .38); }
  [data-theme="blush"] { --accent-soft: rgba(242, 185, 195, .38); }
  [data-theme="sky"] { --accent-soft: rgba(170, 205, 240, .38); }
  [data-theme="peach"] { --accent-soft: rgba(246, 198, 162, .38); }
  [data-theme="butter"] { --accent-soft: rgba(241, 223, 143, .38); }
  .cuebig, .cuedrow, .todaybar, .peekbar { border-color: var(--line2); }
}

/* ---------- Custom theme: background, buttons, text and chords picked separately ---------- */
.customeditor { display: flex; flex-direction: column; gap: .7em; margin-top: .3em; padding: .8em; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); }
.cpreview { display: flex; flex-direction: column; gap: .15em; padding: .7em .85em; border-radius: 12px; border: 1px solid rgba(128, 128, 128, .3);
  font-family: var(--mono); }
.cpchords { font-weight: 800; white-space: pre; }
.cpwords { font-size: .95rem; }
.cpbtn { align-self: flex-end; font-family: inherit; font-weight: 700; font-size: .85rem; padding: .35em .9em; border-radius: 9px; margin-top: .35em; }
.crow .eyebrow { display: block; margin-bottom: .35em; }
.chips { display: flex; flex-wrap: wrap; gap: .4em; }
.chip { appearance: none; padding: 2px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer; line-height: 0; }
.chip.on { border-color: var(--text); }
.chip:disabled { cursor: not-allowed; opacity: .28; }
.toast { z-index: 60; } /* also shown inside an open sheet */
.cface { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(128, 128, 128, .4);
  font-weight: 800; font-size: .78rem; line-height: 1; font-family: var(--mono); }

/* Privacy, terms, and your account and data */
.footlinks { text-align: center; margin-top: 1.6rem; }
.footlinks a { color: var(--muted); }
.signinwrap .agree { margin: .2em 0 0; line-height: 1.45; }
.legal .card h2 { margin-bottom: .5em; }
.legal .card p { line-height: 1.55; }
.legal .tips { margin: .4em 0 .8em; }
.deletelist { margin: .6rem 0 .8rem; }
.deletelist li { display: block; padding: .55rem 0; border-top: 1px solid var(--line); }
.deletelist li:first-child { border-top: 0; }
.deletelist select { margin-top: .4rem; }
dialog.editor input + input { margin-top: .6rem; }
/* 8-character gig codes (new bands) need a little less space between letters to fit on a phone */
.bigcode.long { font-size: clamp(2rem, 10vw, 3rem); letter-spacing: .12em; }

/* The invisible first button in a dialog: Enter in a text box presses it (it does what the main button does) */
.defaultbtn { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; border: 0; opacity: 0; overflow: hidden; pointer-events: none; }
