/* Sit In. The empty spot on a lit stage: a warm dark room, one gold light on
   the place where you will stand. Mobile first (390 px), then the projector. */

:root {
  /* Near-black with warmth, raised surfaces a shade lighter, off-white text. */
  --bg: #0c0a09;
  --bg2: #171311;
  --bg3: #221c18;
  --ink: #f3ede2;          /* 16.9:1 on --bg */
  --dim: #b9ae9f;          /*  9.1:1 on --bg, 7.7:1 on --bg3 */
  --faint: #8a8073;        /*  5.1:1 on --bg: secondary text, never on --bg3 */
  /* One hero accent, tungsten gold, only for "now": the current word and chord, the lit part, the primary button. */
  --gold: #f2b33d;         /* 10.6:1 on --bg; --on-gold on it 10.0:1 */
  --gold-soft: rgba(242, 179, 61, 0.14);
  --on-gold: #1a1206;
  /* Ember for recording, listening and warnings. Teal only for confirmations. */
  --ember: #e2552b;        /*  5.2:1 on --bg; --on-gold on it 4.9:1 */
  --ember-text: #f07a52;   /*  7.2:1 on --bg */
  --teal: #4cc7ad;         /*  9.5:1 on --bg */
  /* Older names, kept so every layer draws in the new palette. */
  --rose: var(--ember);
  --orange: var(--ember-text);
  --violet: #cdbfa8;
  --card: rgba(255, 238, 214, 0.045);
  --card2: rgba(255, 238, 214, 0.085);
  --border: rgba(255, 232, 200, 0.13);
  --border2: rgba(255, 232, 200, 0.28);
  --glass: rgba(21, 17, 14, 0.9);
  --radius: 12px;
  --font: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Bebas Neue', 'Oswald', 'Arial Narrow', Impact, sans-serif;
  /* The lyric face: the heavy sans, mixed case. Bebas Neue was tried for the line and reads slower on long
     lines (all capitals); it also has no lowercase, so chords (Cm, Eb) are never set in it. */
  --lyric-font: var(--font);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }
/* The heading face has capitals only. Set capitals in CSS as well, so that when the web fonts do not load
   (offline, blocked) headings still read as headings in the fallback face, not as mixed-case body text. */
.sk-go, .si-tape, .si-home, .si-tag, .si-q, .si-num, .sk-row-title, .sk-setup-title, .sk-title, .sk-gap-label, .si-start-title,
.sk-viz-card h2, .sk-banner, .sk-sheet h2, .sk-add-title, .si-more-head h2, .si-picker-q, .si-help-h span { text-transform: uppercase; }
.si-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sk-glyph { display: block; flex: none; }

/* ------------------------------------------------------------ the light */

/* A soft cone from a lamp above onto a small pool on the floor. --swell (0 to 1) is how bright:
   it rises while a song loads. Where it falls depends on the screen (body[data-view]). */
.si-spot {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  --swell: 1; --spot-x: 50%; --floor: 16vh; --cone-w: min(1100px, 130vw);
  background:
    radial-gradient(120% 70% at 50% 120%, rgba(44, 30, 18, 0.7), transparent 60%),
    radial-gradient(80% 60% at 50% -10%, rgba(52, 38, 22, 0.45), transparent 70%),
    var(--bg);
}
body { --swell: 1; }
.si-cone {
  position: absolute; left: var(--spot-x); top: -4vh; width: var(--cone-w); height: calc(100% - var(--floor) + 4vh);
  translate: -50% 0;
  background: linear-gradient(180deg, rgba(255, 222, 160, 0.2), rgba(242, 179, 61, 0.075) 55%, rgba(242, 179, 61, 0.03));
  clip-path: polygon(46% 0, 54% 0, 78% 100%, 22% 100%);
  filter: blur(22px);
  opacity: calc(0.35 + 0.65 * var(--swell));
  transition: opacity 0.9s var(--ease);
}
.si-pool {
  position: absolute; left: var(--spot-x); bottom: var(--floor); width: calc(var(--cone-w) * 0.62); height: calc(var(--cone-w) * 0.13);
  translate: -50% 50%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 140, 0.34), rgba(242, 179, 61, 0.12) 55%, transparent);
  opacity: calc(0.3 + 0.7 * var(--swell));
  transform: scale(calc(0.82 + 0.18 * var(--swell)));
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
body[data-view="catalog"] .si-spot, body[data-view="add"] .si-spot { --spot-x: 76%; --floor: 6vh; --cone-w: min(900px, 120vw); }
body[data-view="catalog"] .si-cone, body[data-view="add"] .si-cone { opacity: 0.45; }
body[data-view="stage"] .si-spot { --floor: 14vh; }
body[data-view="stage"] .si-cone { opacity: calc(0.12 + 0.63 * var(--swell)); }
@media (max-width: 899px) {
  body[data-view="catalog"] .si-spot { --spot-x: 50%; }
}

/* ------------------------------------------------------------ shared controls */

.sk-btn, .sk-pill, .sk-icon, .sk-tap, .sk-tab {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.sk-btn:hover, .sk-pill:hover, .sk-icon:hover, .sk-tap:hover { border-color: var(--border2); background: var(--card2); }
.sk-btn:focus-visible, .sk-pill:focus-visible, .sk-icon:focus-visible, .sk-row:focus-visible, .sk-go:focus-visible,
.sk-play:focus-visible, .sk-tap:focus-visible, .sk-ms:focus-visible, .sk-mark:focus-visible, .si-part:focus-visible,
.si-chip:focus-visible, .si-pick:focus-visible, .sk-search:focus-visible, .sk-select:focus-visible, .sk-chip:focus-visible,
.sk-lock:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sk-btn.ghost { background: transparent; }
.sk-btn.primary { background: var(--gold); color: var(--on-gold); border-color: var(--gold); font-weight: 700; }
.sk-btn.wide { width: 100%; }
.sk-btn.on, .sk-pill.on { background: var(--gold); color: var(--on-gold); border-color: var(--gold); font-weight: 700; }
.sk-pill.check.on { background: rgba(76, 199, 173, 0.1); color: var(--teal); border-color: var(--teal); font-weight: 500; }
.sk-pill.check.on::before { content: '✓'; }
.sk-pill:disabled, .sk-btn:disabled { opacity: 0.4; cursor: default; }
.sk-icon { width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 1.05rem; color: var(--dim); }
.sk-icon:hover { color: var(--ink); }
.sk-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sk-label { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.sk-go {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  border: 0; border-radius: 999px; padding: 14px 28px; min-height: 56px;
  background: var(--gold); color: var(--on-gold);
  font: 400 1.65rem/1 var(--display); letter-spacing: 0.08em; cursor: pointer;
  box-shadow: 0 0 0 1px rgba(255, 220, 150, 0.4) inset, 0 10px 40px -8px rgba(242, 179, 61, 0.55);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.sk-go::before { content: ''; width: 0; height: 0; border-left: 13px solid currentColor; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-top: -2px; }
.sk-go:hover { box-shadow: 0 0 0 1px rgba(255, 220, 150, 0.6) inset, 0 12px 50px -6px rgba(242, 179, 61, 0.75); }
.sk-error { color: var(--ember-text); }
.sk-empty { color: var(--dim); padding: 12px 4px; margin: 0; }
.sk-sub { color: var(--dim); margin: 4px 0 18px; }

/* The gaffer tape: a thin strip, a little askew. Used in three places only: the set list's
   headings, the Playing chip on the list, and the part chip on the stage. */
.si-tape {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px 4px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(232, 224, 208, 0.94), rgba(214, 205, 188, 0.94));
  color: #201a14;
  font: 400 1.1rem/1 var(--display); letter-spacing: 0.1em;
  rotate: -1.2deg;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 6px 14px -8px rgba(0, 0, 0, 0.8);
  /* torn ends */
  clip-path: polygon(0 8%, 3% 0, 97% 4%, 100% 0, 99% 50%, 100% 100%, 96% 94%, 2% 100%, 0 92%, 1% 50%);
}

/* ------------------------------------------------------------ the landing */

.si-landing {
  position: relative; z-index: 1; min-height: 100svh;
  display: grid; grid-template-rows: auto auto auto auto; justify-items: center; align-content: start;
  padding: max(10px, env(safe-area-inset-top)) 16px 40px; gap: 0;
  text-align: center;
}
/* The landing is always the lit stage, never the photos. */
body[data-view="landing"] #viz { display: none; }
.vizbg body[data-view="landing"] .sk-bg, body[data-view="landing"] .sk-bg { display: block !important; }
body[data-view="landing"] .si-spot { --floor: calc(100svh - 470px); --cone-w: min(820px, 150vw); }
.si-land-top { width: 100%; max-width: 1180px; display: flex; justify-content: space-between; align-items: center; }
.si-home { color: var(--dim); text-decoration: none; font: 400 1.1rem/1 var(--display); letter-spacing: 0.14em; padding: 12px 0; }
.si-home:hover { color: var(--ink); }
.si-hero { max-width: 640px; display: grid; justify-items: center; }
.si-mark { margin: 6px 0 0; line-height: 0; }
.si-mark svg { height: clamp(64px, 17vw, 132px); width: auto; filter: drop-shadow(0 6px 30px rgba(0, 0, 0, 0.6)); }
.si-tag { margin: 14px 0 0; font: 400 clamp(1.6rem, 6.4vw, 2.5rem)/1.05 var(--display); letter-spacing: 0.05em; color: var(--ink); }
.si-lede { margin: 10px 0 0; color: var(--ink); font-size: clamp(1rem, 3.9vw, 1.14rem); line-height: 1.45; max-width: 34em; }
.si-lede + .si-lede { color: var(--dim); margin-top: 6px; }
.si-ask { width: 100%; max-width: 980px; margin-top: 22px; display: grid; justify-items: center; gap: 12px; }
.si-q { margin: 0; font: 400 clamp(1.5rem, 6vw, 2.1rem)/1 var(--display); letter-spacing: 0.08em; }
.si-parts { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.si-part {
  display: grid; justify-items: center; align-content: center; gap: 8px;
  min-height: 98px; padding: 12px 6px; border-radius: 14px; cursor: pointer;
  border: 1px solid var(--border2); background: rgba(23, 19, 17, 0.72);
  color: var(--ink); font-weight: 700; font-size: 0.98rem; line-height: 1.15;
  backdrop-filter: blur(4px);
  transition: border-color 0.25s, background 0.25s, color 0.25s, box-shadow 0.35s var(--ease), translate 0.35s var(--ease);
}
.si-part svg { color: var(--dim); transition: color 0.25s; }
.si-part:hover, .si-part:focus-visible { border-color: var(--gold); background: rgba(52, 38, 16, 0.8); box-shadow: 0 0 34px -6px rgba(242, 179, 61, 0.45); translate: 0 -2px; }
.si-part:hover svg, .si-part:focus-visible svg, .si-part[aria-pressed="true"] svg { color: var(--gold); }
.si-part[aria-pressed="true"] { border-color: var(--gold); }
.si-part.band span { max-width: 8.5em; }
.si-how { margin: 2px 0 0; color: var(--dim); font-size: 0.98rem; }
.si-skip { color: var(--dim); font-size: 0.95rem; }
.si-lines { width: 100%; max-width: 1180px; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--border); }
.si-lines ul, .si-help-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; text-align: left; }
.si-line { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--dim); font-size: 0.95rem; line-height: 1.4; }
.si-line b { color: var(--ink); font-weight: 700; }
.si-line-ico { color: var(--dim); padding-top: 1px; }
.si-line-ico svg { width: 24px; height: 24px; }
@media (min-width: 700px) {
  .si-parts { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
  .si-part { min-height: 112px; font-size: 1.02rem; }
  .si-lines ul { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
  .si-line { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .si-landing { padding-bottom: 56px; }
  /* The landing is always the lit stage, never the photos. */
body[data-view="landing"] #viz { display: none; }
.vizbg body[data-view="landing"] .sk-bg, body[data-view="landing"] .sk-bg { display: block !important; }
body[data-view="landing"] .si-spot { --floor: calc(100svh - 560px); }
}
@media (min-width: 700px) and (min-height: 760px) {
  .si-hero { margin-top: 1vh; }
  .si-ask { margin-top: 30px; }
}

/* ------------------------------------------------------------ the song list: a set list */

.sk-catalog { padding: 12px 16px 64px; max-width: 1280px; margin: 0 auto; position: relative; z-index: 1; }
.sk-cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sk-brand { color: var(--ink); line-height: 0; padding: 6px 0; display: inline-block; }
.sk-brand svg { height: 34px; width: auto; }
.sk-head-btns { display: flex; gap: 6px; align-items: center; }
.sk-head-btns .viz-toggle .lbl { display: none; }
.sk-head-btns #add-btn { width: 44px; height: 44px; padding: 0; border-radius: 50%; }
.sk-head-btns #add-btn .lbl { display: none; }
.si-playing-row { margin: 10px 0 14px; }
.si-chip {
  border: 0; cursor: pointer; min-height: 40px;
}
.si-chip .k { opacity: 0.7; }
.si-chip b { font-weight: 400; }
.si-chip .ch { font: 600 0.78rem/1 var(--font); letter-spacing: 0.02em; text-transform: none; opacity: 0.72; text-decoration: underline; text-underline-offset: 3px; margin-left: 2px; }
.si-chip svg { width: 20px; height: 20px; }
.sk-cat-body { display: grid; gap: 18px; }
.si-searchbar { display: flex; gap: 8px; align-items: stretch; }
.si-search-wrap { position: relative; flex: 1 1 auto; min-width: 0; display: block; }
.si-search-ico { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--faint); pointer-events: none; }
.sk-search {
  width: 100%; padding: 12px 16px 12px 44px; border-radius: 999px; min-height: 50px; font-size: 1.02rem;
  border: 1px solid var(--border2); background: rgba(23, 19, 17, 0.85);
}
.sk-search::placeholder { color: var(--faint); }
.si-filter-btn { min-height: 50px; padding: 8px 16px; color: var(--dim); }
.si-filter-btn.on { color: var(--gold); border-color: rgba(242, 179, 61, 0.55); background: transparent; font-weight: 700; }
.sk-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; }
.sk-filters .sk-select { min-height: 44px; flex: 1 1 140px; max-width: 240px; }
.sk-count-label { color: var(--faint); font-size: 0.88rem; margin: 12px 4px 4px; }
.sk-rows { display: grid; gap: 26px; }
.si-set { display: grid; gap: 4px; }
.si-set-h { justify-self: start; margin: 0 0 8px 2px; font-size: 1.15rem; }
.si-set:nth-child(2n) .si-set-h { rotate: 0.9deg; }
.si-set-rows { display: grid; }
.sk-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; grid-template-areas: "num main facts" "num parts status";
  gap: 6px 12px; align-items: center; text-align: left; width: 100%;
  background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0;
  padding: 14px 6px 14px 4px; cursor: pointer; color: var(--ink);
  transition: background 0.25s;
}
.sk-row:hover { background: linear-gradient(90deg, rgba(242, 179, 61, 0.07), transparent 70%); }
.sk-row.sel { background: linear-gradient(90deg, rgba(242, 179, 61, 0.16), rgba(242, 179, 61, 0.02) 80%); box-shadow: inset 3px 0 0 var(--gold); }
.si-num { grid-area: num; font: 400 1.25rem/1 var(--display); color: var(--faint); letter-spacing: 0.04em; align-self: start; padding-top: 3px; }
.sk-row.sel .si-num { color: var(--gold); }
.sk-row-main { grid-area: main; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.sk-row-title { font: 400 1.6rem/1 var(--display); letter-spacing: 0.04em; overflow-wrap: anywhere; }
.sk-row-artist { color: var(--dim); font-size: 0.92rem; }
.sk-row-facts { grid-area: facts; color: var(--faint); font-size: 0.86rem; font-variant-numeric: tabular-nums; white-space: nowrap; justify-self: end; }
.si-row-parts { grid-area: parts; display: flex; gap: 6px; align-items: center; }
.si-g { color: rgba(185, 174, 159, 0.22); display: inline-flex; }
.si-g.can { color: var(--dim); }
.si-g.mine { color: var(--gold); }
.si-status { grid-area: status; color: var(--ember-text); font-size: 0.82rem; justify-self: end; text-align: right; }
.si-status:empty { display: none; }
.sk-row.quiet .sk-row-title { color: var(--dim); }
.sk-row.quiet .si-status { color: var(--faint); font-style: italic; }

/* The song you picked: what will happen, and Play. */
.sk-setup {
  position: relative;
  background: rgba(23, 19, 17, 0.94); border: 1px solid var(--border2); border-radius: 18px;
  padding: 20px 20px 22px; display: grid; gap: 12px; align-content: start; scroll-margin-top: 12px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
.si-setup-close { position: absolute; right: 10px; top: 10px; }
.sk-setup-title { margin: 0; padding-right: 44px; font: 400 2.4rem/0.95 var(--display); letter-spacing: 0.03em; }
.sk-setup-meta { margin: -4px 0 0; color: var(--dim); font-size: 0.92rem; }
.si-setup-parts { display: flex; gap: 10px; padding: 4px 0; }
.si-says { margin: 0; font-size: 1.05rem; line-height: 1.4; color: var(--ink); }
.sk-setup-hint { margin: 0; color: var(--dim); }
.sk-setup-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); color: var(--dim); font-size: 0.9rem; }
.sk-setup-loop { margin: 0; font-size: 1.05rem; }
.sk-setup-loop b { color: var(--ink); font-weight: 700; }
.sk-setup-loop span { color: var(--dim); font-size: 0.9rem; }
.sk-setup .sk-go { margin-top: 4px; }

@media (max-width: 899px) {
  /* A sheet from the bottom over the list. */
  .sk-setup {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; border-radius: 22px 22px 0 0;
    padding: 20px 16px max(18px, env(safe-area-inset-bottom)); max-height: 80vh; overflow-y: auto;
    animation: si-rise 0.45s var(--ease) both;
  }
  body.si-picked .sk-catalog { padding-bottom: 340px; }
}
@media (min-width: 700px) {
  .sk-row { grid-template-columns: 44px minmax(0, 1fr) 156px 118px 132px; grid-template-areas: "num main parts facts status"; gap: 16px; padding: 16px 10px 16px 6px; }
  .sk-row-facts { justify-self: start; }
  .sk-row-title { font-size: 1.85rem; }
  .si-num { font-size: 1.5rem; padding-top: 0; align-self: center; }
  .sk-head-btns .viz-toggle .lbl { display: inline; }
  .sk-head-btns #add-btn { width: auto; padding: 8px 16px 8px 12px; border-radius: 999px; }
  .sk-head-btns #add-btn .lbl { display: inline; }
}
@media (min-width: 900px) {
  .sk-catalog { padding: 18px 40px 80px; }
  .sk-brand svg { height: 40px; }
  .sk-cat-body { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 36px; }
  .sk-setup { position: sticky; top: 24px; animation: si-fade 0.4s var(--ease) both; }
  .si-setup-close { display: none; }
}
@keyframes si-rise { from { translate: 0 30px; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes si-fade { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }

/* ------------------------------------------------------------ stage */

.sk-stage {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  padding: max(10px, env(safe-area-inset-top)) 12px max(10px, env(safe-area-inset-bottom));
  gap: 8px;
}
.sk-stage > * { flex: 0 0 auto; }
.sk-stage > .sk-layers { flex: 1 1 auto; }
.sk-top { display: flex; align-items: center; gap: 10px; transition: opacity 0.5s var(--ease); position: relative; z-index: 6; }
.sk-title-wrap { flex: 1 1 auto; min-width: 0; }
.sk-title { margin: 0; font: 400 1.6rem/1 var(--display); letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.sk-chip { border: 1px solid var(--border); background: rgba(12, 10, 9, 0.5); border-radius: 999px; padding: 2px 10px; font-size: 0.82rem; color: var(--dim); }
.sk-chip.key { color: var(--ink); }
.sk-chip.section { color: var(--gold); border-color: rgba(242, 179, 61, 0.45); }
.sk-top-btns { display: flex; gap: 8px; align-items: center; flex: none; }
#stage-part { font-size: 1.05rem; padding: 6px 12px 5px; }
#stage-part svg { width: 18px; height: 18px; }
.sk-notice { background: rgba(226, 85, 43, 0.1); border: 1px solid rgba(226, 85, 43, 0.35); color: #f6c7b4; border-radius: 12px; padding: 8px 12px; font-size: 0.92rem; }
.sk-notice a { color: var(--gold); }

.sk-layers {
  position: relative; min-height: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4vh;
  overflow: hidden;
}

/* lyrics */
.sk-lyrics {
  --lyric-size: 36px;
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: calc(var(--lyric-size) * 0.35);
  text-align: center;
  font-family: var(--lyric-font);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}
.sk-line { cursor: pointer; max-width: 100%; }
.sk-line.empty { visibility: hidden; }
.sk-lyrics.none { display: none; }
.sk-line.prev, .sk-line.next { font-size: calc(var(--lyric-size) * 0.55); line-height: 1.25; font-weight: 700; }
.sk-line.prev { color: var(--faint); }
.sk-line.next { color: var(--dim); }
.sk-line.prev .ch, .sk-line.next .ch { font-size: 0.55em; opacity: 0.72; } /* 5.3:1 for gold on --bg; at 0.6 it was 4.35 */
.sk-cur { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; }
.sk-line.cur { font-size: var(--lyric-size); line-height: 1.1; padding-top: 0.5em; color: var(--ink); }
.sk-lyrics:not(.wrap) .sk-line.cur { white-space: nowrap; }
.sk-line .w { position: relative; display: inline-block; }
.sk-line.cur .w.sung { color: var(--gold); }
.sk-line.cur .w.now {
  background: linear-gradient(90deg, var(--gold) calc(var(--p, 0) * 100%), var(--ink) 0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 16px rgba(242, 179, 61, 0.4));
}
.sk-line .ch {
  position: absolute; left: 0; bottom: 100%;
  font-size: 0.42em; line-height: 1; font-weight: 800; letter-spacing: 0; color: var(--gold);
  -webkit-background-clip: border-box; background: none; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  white-space: nowrap;
}
.sk-line.cur .w:not(.now):not(.sung) .ch { color: var(--dim); }
.sk-line.cur .w.now .ch { color: var(--gold); -webkit-text-fill-color: var(--gold); }
.sk-lyrics.wrap .sk-line.cur .w.has-ch { margin-top: 0.45em; }
.sk-lyrics.in-gap .sk-line.cur { display: none; }
.sk-gap { display: none; width: min(560px, 80%); text-align: center; padding: 0.6em 0; }
.sk-lyrics.in-gap .sk-gap { display: block; }
.sk-gap-label { font: 400 calc(var(--lyric-size) * 0.5)/1.1 var(--display); letter-spacing: 0.08em; color: var(--dim); margin-bottom: 12px; }
.sk-gap-bar { height: 6px; border-radius: 3px; background: var(--card2); overflow: hidden; }
.sk-gap-bar span { display: block; height: 100%; background: var(--gold); transform-origin: left; }
.sk-dots { display: flex; gap: 10px; height: 14px; visibility: hidden; margin-bottom: 6px; }
.sk-dots.on { visibility: visible; }
.sk-dots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--gold); }
.sk-dots i.lit { background: var(--gold); }
/* Lines rise into place, slowly; nothing bounces. */
.sk-lyrics.rise .sk-cur, .sk-lyrics.rise .sk-line.next { animation: sk-rise 260ms var(--ease); }
@keyframes sk-rise { from { transform: translateY(0.5em); opacity: 0.35; } to { transform: none; opacity: 1; } }

/* chord strip */
.sk-strip { display: flex; gap: 8px; width: min(100%, 760px); }
.sk-cell {
  flex: 1 1 0; min-width: 0; position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 10px; background: rgba(23, 19, 17, 0.7);
  height: 52px; display: grid; place-items: center; font-weight: 800; font-size: 1.25rem; color: var(--dim);
}
.sk-cell.empty { opacity: 0.25; }
.sk-cell.was { background: rgba(242, 179, 61, 0.08); border-color: rgba(242, 179, 61, 0.35); color: rgba(242, 179, 61, 0.75); }
.sk-cell.now { border: 2px solid var(--ink); color: var(--ink); }
.sk-cell .fill {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--gold); color: var(--on-gold);
  clip-path: inset(0 calc(100% - var(--p, 0) * 100%) 0 0);
}
.sk-cell:not(.now) .fill { display: none; }

/* The stage before a song: the empty spot, lit, and one button on it. Nothing else. */
.sk-stage.waiting .sk-layers, .sk-stage.waiting .sk-dock, .sk-stage.waiting .sk-notice { opacity: 0; pointer-events: none; }
.sk-stage.waiting .sk-title-wrap { visibility: hidden; }
.sk-stage .sk-layers, .sk-stage .sk-dock { transition: opacity 0.6s var(--ease); }
.sk-start {
  position: absolute; inset: 0; z-index: 5;
  display: grid; place-items: end center; padding: 24px 16px calc(14vh - 28px);
}
.si-start-card { display: grid; justify-items: center; gap: 12px; width: min(440px, 100%); text-align: center; animation: si-fade 0.6s var(--ease) both; }
.si-start-title { margin: 0; font: 400 clamp(2.6rem, 11vw, 5.4rem)/0.92 var(--display); letter-spacing: 0.03em; text-shadow: 0 6px 40px rgba(0, 0, 0, 0.7); }
.si-start-says { margin: 0 0 6px; color: var(--ink); font-size: 1.05rem; line-height: 1.4; max-width: 26em; }
.sk-start .sk-go { width: min(300px, 80vw); }
.sk-start:not(.editing) .sk-go { margin-bottom: 4px; }
/* While timing, loading the audio must not cover the editor: lyrics can be typed first. */
.sk-stage.editing .sk-start { position: static; background: none; padding: 0; place-items: center; }
.sk-stage.editing .si-start-card { gap: 6px; }
.sk-stage.editing .sk-start .sk-go { min-height: 44px; padding: 10px 20px; font-size: 1.2rem; }
.sk-stage.editing .si-start-title, .sk-stage.editing .si-start-says { display: none; }
.sk-start-msg { margin: 0; text-align: center; color: var(--dim); max-width: 340px; }
.sk-start-msg:empty { display: none; }
.sk-load { display: grid; gap: 8px; width: min(320px, 80vw); }
.sk-load-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; font-size: 0.82rem; color: var(--dim); text-align: left; }
.sk-load-row i { display: block; height: 3px; border-radius: 2px; background: var(--card2); overflow: hidden; }
.sk-load-row b { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.25s; }

/* dock: previous, play, next, the seek bar with section names, More */
.sk-dock {
  position: relative; z-index: 3;
  background: var(--glass); border: 1px solid var(--border); border-radius: 18px;
  padding: 8px 10px; backdrop-filter: blur(14px);
  display: grid; gap: 8px;
  transition: opacity 0.5s var(--ease);
}
.sk-stage.idle .sk-dock, .sk-stage.idle .sk-top { opacity: 0; pointer-events: none; }
.sk-stage.idle { cursor: none; }
.sk-stage.tv .sk-dock, .sk-stage.tv .sk-top-btns, .sk-stage.tv #close-btn { display: none; }
.sk-transport { display: grid; grid-template-columns: auto auto auto 1fr auto; grid-template-areas: "seek seek seek seek seek" "prev play next . more"; gap: 6px 8px; align-items: center; }
.sk-transport > .sk-icon:nth-child(1) { grid-area: prev; }
.sk-play { grid-area: play; }
.sk-transport > .sk-icon:nth-child(3) { grid-area: next; }
.sk-seek { grid-area: seek; }
.sk-transport > .sk-time { display: none; }
.sk-transport .more { grid-area: more; }
.sk-play {
  width: 60px; height: 48px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--gold); position: relative;
  box-shadow: 0 6px 24px -8px rgba(242, 179, 61, 0.7);
}
.sk-play::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-35%, -50%); border-left: 15px solid var(--on-gold); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.sk-play.playing::before { transform: translate(-50%, -50%); width: 14px; height: 17px; border: 0; border-left: 5px solid var(--on-gold); border-right: 5px solid var(--on-gold); box-sizing: border-box; }
.sk-btn.more { padding: 8px 14px 8px 10px; color: var(--ink); }
.sk-btn.more.on { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 700; }
.sk-seek { position: relative; padding-top: 4px; }
.sk-seek.has-marks { padding-top: 22px; }
.sk-marks { position: absolute; left: 0; right: 0; top: 0; height: 20px; }
.sk-mark {
  position: absolute; top: 0; transform: translateX(0);
  border: 0; background: none; padding: 0 4px 0 0; cursor: pointer; min-height: 0;
  font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); white-space: nowrap;
  border-left: 1px solid rgba(255, 232, 200, 0.22); padding-left: 4px; height: 20px;
}
.sk-mark:hover { color: var(--ink); }
.sk-mark.now { color: var(--gold); font-weight: 800; border-left-color: var(--gold); }
.sk-seek input[type=range] { width: 100%; margin: 0; accent-color: var(--gold); height: 24px; }
.sk-time { font-variant-numeric: tabular-nums; color: var(--dim); font-size: 0.86rem; }

/* What used to be the Mix and Show sheets: now groups in More. */
.sk-panel { display: grid; gap: 10px; }
.sk-show { align-items: center; }
.sk-role-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sk-role-row > .sk-label { display: none; }
.si-role svg { width: 18px; height: 18px; }
.sk-stems { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sk-mix.single .sk-stems { display: none; }
.sk-tile { border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; background: var(--card); display: grid; gap: 4px; }
.sk-tile.silent { opacity: 0.55; }
.sk-tile.dropped { border-color: var(--ember); }
.sk-tile.dropped .sk-tile-name { color: var(--ember-text); }
.sk-tile-state { font-size: 0.72rem; color: var(--ember-text); min-height: 1em; line-height: 1; }
.sk-tile-head { display: flex; align-items: center; gap: 6px; }
.sk-tile-name { flex: 1; font-weight: 700; font-size: 0.92rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-ms { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); cursor: pointer; font-size: 0.78rem; font-weight: 800; color: var(--dim); }
.sk-ms.on { background: var(--ember); border-color: var(--ember); color: var(--on-gold); }
.sk-tile input[type=range] { width: 100%; accent-color: var(--gold); margin: 0; }

@media (max-width: 699px) {
  .sk-lyrics { gap: 10px; }
  .sk-strip { width: 100%; }
  .sk-cell { height: 46px; font-size: 1.1rem; }
  .sk-top { gap: 6px; }
  .sk-title { font-size: 1.35rem; }
  #stage-part { padding: 5px 9px 4px; font-size: 0.95rem; }
  .sk-top-btns { gap: 4px; }
  .sk-top-btns .si-help-btn { width: 38px; height: 38px; }
  #close-btn { width: 38px; height: 38px; }
  .sk-chip.section, .sk-stage.live .sk-chip.key { display: none; }
}

@media (min-width: 700px) {
  .sk-stage { padding: 18px 26px; gap: 10px; }
  .sk-title { font-size: 2.1rem; }
  .sk-transport { grid-template-columns: auto auto auto auto minmax(0, 1fr) auto auto; grid-template-areas: none; gap: 10px; }
  .sk-transport > * { grid-area: auto !important; }
  .sk-transport > .sk-time { display: inline; }
  .sk-dock { padding: 8px 12px; max-width: 1180px; width: 100%; align-self: center; }
  .sk-cell { height: 60px; font-size: 1.5rem; }
}

/* ------------------------------------------------------------ editor */

.sk-cue { text-align: center; font-weight: 700; display: grid; gap: 10px; padding: 0 8px; }
.sk-cue .lab { font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.sk-cue .one { font-size: clamp(24px, 4.2vw, 56px); line-height: 1.15; }
.sk-cue .two { font-size: clamp(16px, 2.2vw, 30px); color: var(--dim); }

.sk-stage.editing .sk-layers { min-height: 120px; }
.sk-stage.editing .sk-dock { display: none; }
.sk-dock:empty { display: none; } /* no song on stage (it did not load): no empty bar */
.sk-editor {
  background: var(--glass); border: 1px solid var(--border); border-radius: 18px; padding: 10px;
  display: grid; gap: 8px; max-height: 66vh; overflow: hidden;
  /* bar, waveform lane, fix row, tabs, pane (scrolls), help */
  grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
}
.sk-ed-bar { display: grid; gap: 8px; }
.sk-ed-taps, .sk-ed-play, .sk-ed-files { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sk-tap { border-radius: 10px; }
.sk-tap.main { background: var(--gold); color: #1a1404; border-color: var(--gold); font-weight: 800; min-width: 130px; }
.sk-select { min-height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg2); padding: 6px 8px; }
.sk-ed-status { color: var(--dim); font-size: 0.92rem; flex: 1 1 220px; }
.sk-ed-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.sk-tab { border-radius: 10px; min-height: 36px; padding: 6px 12px; }
.sk-tab.on { background: var(--card2); border-color: var(--ink); }
.sk-ed-pane { overflow-y: auto; min-height: 0; }
.sk-ed-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sk-ed-line { display: grid; grid-template-columns: 26px 84px 84px minmax(0, 1fr); gap: 6px; align-items: center; padding: 2px 4px; border-radius: 8px; }
.sk-ed-pane .sk-ed-line:has(.sk-text-in) { grid-template-columns: 84px minmax(0, 1fr) auto auto; }
.sk-ed-line.cursor { background: rgba(242, 179, 61, 0.12); outline: 1px solid rgba(242, 179, 61, 0.5); }
.sk-ed-line.now .sk-ed-text { color: var(--gold); }
.sk-ed-n { color: var(--dim); font-size: 0.8rem; text-align: right; }
.sk-ed-text { text-align: left; background: none; border: 0; padding: 6px 4px; cursor: pointer; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-time-in, .sk-text-in { min-height: 34px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg2); padding: 4px 6px; font-variant-numeric: tabular-nums; width: 100%; }
.sk-time-in.bad { border-color: var(--rose); }
.sk-textarea { width: 100%; border-radius: 10px; border: 1px solid var(--border); background: var(--bg2); padding: 10px; font-family: ui-monospace, Menlo, monospace; font-size: 0.9rem; margin-bottom: 8px; }
.sk-ed-note, .sk-ed-help { color: var(--dim); font-size: 0.86rem; margin: 0 0 8px; }
.sk-ed-help { margin: 0; }
@media (max-width: 699px) {
  .sk-ed-help { display: none; }
  .sk-ed-line { grid-template-columns: 20px 72px 72px minmax(0, 1fr); }
  .sk-ed-files .sk-btn, .sk-ed-play .sk-btn { padding: 6px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .sk-lyrics.rise .sk-cur, .sk-lyrics.rise .sk-line.next { animation: none; }
  .sk-dock, .sk-top, .sk-load-row b { transition: none; }
}

/* ------------------------------------------------------------ visuals (viz/vj-core.js behind the page, js/layers/viz.js) */

/* Behind everything: the WebGL canvas or the calm photos, then the scrim, then the title card.
   The stage and the catalog sit above (z-index 1). */
.sk-viz { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--bg); overflow: hidden; }
.sk-viz-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sk-catalog { position: relative; z-index: 1; }
.sk-stage { z-index: 1; }
.vizbg .sk-bg { display: none; }

/* The calm looks: one photo filling the height over a blurred copy of itself, cross-fading;
   Soft drifts its colour slowly, Plain does not. */
.sk-viz-soft { position: absolute; inset: 0; display: none; }
.sk-viz.calm .sk-viz-soft { display: block; }
.sk-viz-pane { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.sk-viz-pane.on { opacity: 1; }
.sk-viz-pane .fill { position: absolute; inset: -8%; background: center / cover no-repeat; filter: blur(38px) saturate(1.4) brightness(0.55); }
.sk-viz-pane .pic { position: absolute; inset: 0; background: center / contain no-repeat; }
.sk-viz.calm:not(.plain) .sk-viz-soft { animation: sk-sway 16s ease-in-out infinite alternate; }
@keyframes sk-sway { from { filter: hue-rotate(-14deg) saturate(1.2); } to { filter: hue-rotate(14deg) saturate(1.2); } }

/* The scrim: darker at the edges, and darker in the middle when the picture there is bright
   (measured once a second) or the photos are untouched (calm looks). */
.sk-scrim { position: absolute; inset: 0; background: radial-gradient(ellipse 110% 90% at 50% 45%, rgba(8, 6, 5, 0.55), rgba(8, 6, 5, 0.82)); }
.sk-scrim::after {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s;
  background: radial-gradient(ellipse 110% 90% at 50% 45%, rgba(8, 6, 5, 0.34), rgba(8, 6, 5, 0) 100%);
}
.sk-scrim.dim::after, .sk-viz.calm .sk-scrim::after { opacity: 1; }

/* The end of a song: the picture fades down, the title comes up, the lyrics go. */
.sk-viz-card { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; opacity: 0; transition: opacity 1.4s ease; }
.sk-viz-card.on { opacity: 1; }
.sk-viz-card h2 { margin: 0; font: 400 clamp(44px, 10vw, 140px)/0.95 var(--display); letter-spacing: 0.03em; line-height: 1; color: var(--gold); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.7); }
.sk-viz-card p { margin: 0.5em 0 0; font-size: clamp(16px, 2.4vw, 32px); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); }
.sk-ended .sk-stage:not(.editing) .sk-layers { opacity: 0; transition: opacity 1.2s; }

/* A one-time line saying why the visuals are calm (reduced motion, no WebGL, software drawing). */
.sk-viz-note {
  position: fixed; z-index: 40; left: 50%; top: 12px; translate: -50% 0; max-width: min(560px, calc(100vw - 32px));
  padding: 10px 14px; border-radius: 12px; background: var(--glass); border: 1px solid var(--border); font-size: 0.9rem; color: var(--ink);
  pointer-events: none; /* a passing note: taps go through to whatever is under it */
}
/* It never sits on the stage's controls: under the top bar on a phone, and out of the way while More is open. */
@media (max-width: 899px) { .sk-viz-note { top: calc(env(safe-area-inset-top, 0px) + 96px); } }
body:has(.sk-stage.more-open) .sk-viz-note { display: none; }

.viz-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px 6px 8px;
  border-radius: 999px; border: 1px solid var(--border); background: rgba(0, 0, 0, 0.3); color: var(--ink);
  cursor: pointer; white-space: nowrap;
}
.viz-toggle:hover { border-color: rgba(255, 255, 255, 0.3); }
.viz-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.viz-toggle .dot { width: 30px; height: 18px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); position: relative; flex: none; transition: background 0.2s; }
.viz-toggle .dot::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); transition: transform 0.2s; }
.viz-toggle[aria-pressed="true"] { border-color: rgba(76, 199, 173, 0.6); background: rgba(76, 199, 173, 0.08); }
.viz-toggle[aria-pressed="true"] .dot { background: var(--teal); }
.viz-toggle[aria-pressed="true"] .dot::after { transform: translateX(12px); background: var(--bg); }
.viz-toggle b { font-weight: 700; color: var(--dim); }
.viz-toggle[aria-pressed="true"] b { color: var(--teal); }
@media (max-width: 699px) {
  .sk-top-btns .viz-toggle .lbl { display: none; }
  .sk-top-btns .viz-toggle { padding: 6px 8px; }
}

/* Lyrics over moving pictures: a 2 px dark edge on every glyph and a shadow, as well as the scrim. */
.vizbg .sk-lyrics { text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 2px 12px rgba(0, 0, 0, 0.8); }
.vizbg .sk-line { -webkit-text-stroke: 2px rgba(6, 4, 3, 0.85); paint-order: stroke fill; }
.vizbg .sk-line .ch { -webkit-text-stroke: 1px rgba(6, 4, 3, 0.85); }
.vizbg .sk-line.prev { color: var(--dim); }
.vizbg .sk-line.next { color: rgba(244, 237, 224, 0.8); }
/* The word being sung is filled through background-clip, where a stroke would paint over the fill:
   its dark edge is a tight shadow instead. */
.vizbg .sk-line.cur .w.now { -webkit-text-stroke: 0; filter: drop-shadow(0 0 1px rgba(6, 4, 3, 0.95)) drop-shadow(0 0 2px rgba(6, 4, 3, 0.9)) drop-shadow(0 0 14px rgba(242, 179, 61, 0.3)); }
.vizbg .sk-cell { background: rgba(14, 11, 9, 0.8); }
.vizbg .sk-cell.was { background: rgba(48, 36, 12, 0.84); }
.vizbg .sk-chip { background: rgba(0, 0, 0, 0.5); }
@media (max-width: 699px) {
  /* Phone header: title, visuals switch, close. Timing starts from the catalog. */
  .sk-title-wrap { flex: 1 1 auto; min-width: 0; }
  .sk-top-btns { flex: none; }
  .sk-stage:not(.editing) #edit-link, #fs-btn { display: none; }
}
.vizbg .sk-row, .vizbg .sk-search { background: rgba(14, 11, 9, 0.82); }
.vizbg .sk-row:hover { background: rgba(30, 23, 14, 0.88); }
.vizbg .sk-row.sel { background: rgba(48, 36, 14, 0.9); }
.vizbg .sk-setup { background: rgba(23, 19, 17, 0.96); }
.vizbg .si-set-rows { border-radius: 12px; overflow: hidden; }

/* The Visuals sheet: looks as swatches, trippiness, flashing. */
.sk-vizsheet { max-width: 640px; }
.sk-vizsheet-head { display: flex; gap: 8px; align-items: center; }
.sk-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.sk-look {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: center; gap: 4px 8px; text-align: left;
  min-height: 44px; padding: 6px 8px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); cursor: pointer;
}
.sk-look .sw { width: 26px; height: 26px; border-radius: 8px; grid-row: span 2; background: var(--card2); }
.sk-look.auto .sw { background: conic-gradient(var(--ember), var(--gold), var(--teal), #7a6cd8, var(--ember)); }
.sk-look b { font-size: 0.9rem; line-height: 1.15; overflow-wrap: anywhere; }
.sk-look small { font-size: 0.72rem; color: var(--rose); }
.sk-look.on { border-color: var(--gold); background: var(--gold-soft); }
.sk-look:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sk-trip-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.sk-trip-val { font-variant-numeric: tabular-nums; min-width: 9ch; }

@media (prefers-reduced-motion: reduce) {
  .sk-viz.calm:not(.plain) .sk-viz-soft { animation: none; }
  .sk-viz-pane, .sk-viz-card, .sk-scrim::after, .sk-ended .sk-stage .sk-layers { transition: none; }
}

/* Count-in: the beat number, large, over the lyrics. */
.sk-count {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); z-index: 4;
  font: 400 clamp(96px, 22vw, 260px)/1 var(--display); color: var(--gold);
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 4px 30px rgba(0, 0, 0, 0.7); pointer-events: none;
}
@media (min-width: 700px) {
  body[data-view="stage"] .sk-notice { align-self: flex-start; }
}

/* ------------------------------------------------------------ the vocal lane and the song's shape */

.sk-lyrics { position: relative; --lane-h: calc(var(--lyric-size) * 0.5); }
.sk-line.cur { position: relative; }
.sk-line.cur.has-lane { margin-bottom: calc(var(--lane-h) + 4px); }
.sk-lane { position: absolute; left: 0; top: calc(100% + 2px); overflow: visible; pointer-events: none; }
.sk-lane .env { fill: rgba(244, 237, 224, 0.16); }
.sk-lane .rib { fill: none; stroke: rgba(244, 237, 224, 0.4); stroke-width: 2.5; }
.sk-lane .bar { stroke: rgba(244, 237, 224, 0.75); stroke-linecap: round; stroke-width: var(--bar-w, 5px); }
.sk-lane .sung .env { fill: rgba(242, 179, 61, 0.34); }
.sk-lane .sung .rib { stroke: rgba(242, 179, 61, 0.8); }
.sk-lane .sung .bar { stroke: var(--gold); }

/* Words ride a little with the melody; the word being sung pops as it starts. */
.sk-line.cur .w { translate: 0 calc(var(--lift, 0) * -0.08em); transition: translate 0.25s ease; }
.sk-line.cur .w.now { animation: sk-pop 220ms ease-out; }
@keyframes sk-pop { from { scale: 1.1; } to { scale: 1; } }

/* The line breathes on the beat, most on the downbeat. */
.sk-cur { scale: calc(1 + var(--pulse, 0) * 0.014); }

/* Big sections (a chorus, or the loudest parts of the song): larger, bolder, glowing. */
.sk-lyrics.big .sk-line.cur { font-size: calc(var(--lyric-size) * 1.08); font-weight: 800; }
.sk-lyrics.big .sk-line.cur .w.sung { text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 0 22px rgba(242, 179, 61, 0.5); }
.sk-lyrics.big .sk-line.cur .w.now { filter: drop-shadow(0 0 18px rgba(242, 179, 61, 0.55)); }
.vizbg .sk-lyrics.big .sk-line.cur .w.now { filter: drop-shadow(0 0 1px rgba(6, 4, 3, 0.95)) drop-shadow(0 0 2px rgba(6, 4, 3, 0.9)) drop-shadow(0 0 18px rgba(242, 179, 61, 0.55)); }

/* A section's name shows briefly as it starts. */
.sk-banner {
  position: absolute; left: 50%; bottom: calc(100% + var(--lyric-size) * 0.2); translate: -50% 0; opacity: 0; pointer-events: none;
  font: 400 max(16px, calc(var(--lyric-size) * 0.34))/1 var(--display); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); text-shadow: 0 0 2px rgba(0, 0, 0, 0.9), 0 2px 10px rgba(0, 0, 0, 0.7); white-space: nowrap;
}
.sk-banner.show { animation: sk-banner 1.9s ease both; }
@keyframes sk-banner { 0% { opacity: 0; translate: -50% 8px; } 15% { opacity: 1; translate: -50% 0; } 75% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .sk-line.cur .w { transition: none; }
  .sk-line.cur .w.now { animation: none; }
  .sk-banner.show { animation: sk-banner-still 1.9s step-end both; }
  @keyframes sk-banner-still { 0% { opacity: 1; translate: -50% 0; } 100% { opacity: 0; } }
}

/* ------------------------------------------------------------ settings and sheets */


.sk-modal {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: end center; grid-template-columns: minmax(0, 1fr);
  background: rgba(6, 4, 3, 0.6); backdrop-filter: blur(3px); padding: 0;
}
.sk-sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 20px 20px 0 0;
  padding: 16px 16px max(20px, env(safe-area-inset-bottom)); display: grid; gap: 14px;
}
@media (min-width: 700px) {
  .sk-modal { place-items: center; padding: 24px; }
  .sk-sheet { border-radius: 20px; padding: 22px 24px; }
}
.sk-sheet-head { display: flex; justify-content: space-between; align-items: center; }
.sk-sheet > *, .sk-field > * { min-width: 0; max-width: 100%; }
.sk-sheet select { max-width: 100%; text-overflow: ellipsis; }
.sk-sheet h2 { margin: 0; font: 400 1.9rem/1 var(--display); letter-spacing: 0.05em; }
.sk-sheet h3 { margin: 6px 0 0; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--dim); }
.sk-field { display: grid; gap: 6px; }
.sk-field-label { font-weight: 700; }
.sk-field-help { color: var(--dim); font-size: 0.86rem; margin: 0; }
.sk-input { min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); padding: 8px 12px; width: 100%; }
.sk-range { width: 100%; accent-color: var(--gold); }
.sk-debug { margin: 0; font-size: 0.9rem; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ the whole band (Live Band mode): the stage */

.sk-chip.mode { border-color: rgba(226, 85, 43, 0.5); color: var(--ember-text); }
.sk-chip.mode::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; vertical-align: 1px; opacity: 0.6; }
.sk-chip.mode.on { background: var(--ember); border-color: transparent; color: var(--on-gold); font-weight: 700; }
.sk-chip.mode.on::before { opacity: 1; animation: si-breathe 2.4s ease-in-out infinite; }
.sk-chip.mode.warn { border-color: var(--ember); color: var(--ember-text); }
.sk-chip.loop { border-color: var(--border2); color: var(--ink); }
@keyframes si-breathe { 50% { opacity: 0.35; } }

.sk-stage.live .sk-layers { justify-content: flex-start; gap: 2vh; }
.sk-stage.live .sk-lyrics { margin: auto 0; }

/* The band's chord row: was, now, next, then */
.sk-band { width: 100%; display: grid; gap: 8px; flex: none; }
.sk-band-row { display: grid; grid-template-columns: 1fr 1.35fr 1fr 1fr; gap: 8px; }
.sk-bcell {
  position: relative; min-width: 0; border-radius: 12px; border: 1px solid var(--border);
  background: rgba(23, 19, 17, 0.78); padding: 8px 10px 10px; display: grid; align-content: start; gap: 2px;
}
.sk-bcell .lab { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-bcell .name { font-weight: 800; font-size: clamp(26px, 7.5vw, 92px); line-height: 1.02; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-bcell.was .name { color: var(--faint); }
.sk-bcell.then .name, .sk-bcell.next .name { color: var(--ink); }
.sk-bcell.then { opacity: 0.8; }
.sk-bcell.now { border: 2px solid var(--gold); background: rgba(58, 42, 14, 0.7); box-shadow: 0 0 40px -12px rgba(242, 179, 61, 0.5); }
.sk-bcell.now .lab, .sk-bcell.now .name { color: var(--gold); }
.sk-bcell.empty .name { opacity: 0.25; }
.sk-bcell .beats { display: flex; gap: 6px; margin-top: 4px; }
.sk-bcell .beats i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid rgba(242, 179, 61, 0.6); }
.sk-bcell .beats i.on { background: var(--gold); border-color: var(--gold); }
.sk-band-loop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.sk-band-loop .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sk-band-loop .chips b { font-weight: 800; padding: 2px 10px; border-radius: 8px; border: 1px solid var(--border); background: rgba(0, 0, 0, 0.3); }
.sk-band-loop .chips b.on { border-color: var(--gold); color: var(--gold); }
.sk-band-loop .sk-pill { min-height: 32px; padding: 4px 10px; font-size: 0.85rem; }
.vizbg .sk-bcell { background: rgba(14, 11, 9, 0.84); }
.vizbg .sk-bcell.now { background: rgba(52, 38, 12, 0.88); }
@media (min-width: 700px) {
  .sk-bcell { padding: 10px 16px 14px; border-radius: 16px; }
  .sk-bcell .lab { font-size: 0.78rem; }
  .sk-bcell .name { font-size: clamp(40px, 6vw, 112px); }
}

/* Lyrics with the band: the line as a whole is now; heard words turn gold; a fourth line. */
.sk-lyrics.live .sk-line.cur { color: var(--ink); }
.sk-lyrics.live .sk-line.cur .w { transition: color 0.25s ease; }
.sk-line.next2 { font-size: calc(var(--lyric-size) * 0.42); line-height: 1.25; color: var(--faint); font-weight: 700; }
.sk-lyrics.wrap .sk-line.next2 { display: none; }

/* ------------------------------------------------------------ the whole band: the dock */

.sk-dock.live { display: grid; gap: 8px; }
.sk-lrow { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.sk-lgroup { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sk-lgroup > .sk-label { flex: none; }
.sk-lbody { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; min-width: 0; }
.sk-lgroup.hearing { flex: 1 1 200px; }
.sk-lgroup.hearing > .sk-label { display: none; }
.sk-lgroup.lock > .sk-label { display: none; }
.sk-lgroup.jump { flex: 1 1 100%; }
.sk-lgroup.jump .sk-lbody { min-width: 0; flex: 1 1 auto; }
.sk-meter { display: flex; align-items: flex-end; gap: 3px; height: 26px; flex: none; }
.sk-meter i { width: 4px; height: 100%; border-radius: 2px; background: var(--ember); transform-origin: bottom; transform: scaleY(0.08); }
.sk-heard { color: var(--dim); font-style: italic; font-size: 0.9rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sk-heard:empty::before { content: 'nothing heard yet'; opacity: 0.7; }
.sk-heard::before, .sk-heard::after { content: none; }
.sk-lock { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); white-space: nowrap; font-weight: 700; font-size: 0.92rem; }
.sk-lock::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.sk-lock.off, .sk-lock.listening { color: var(--dim); }
.sk-lock.strong { color: var(--teal); border-color: rgba(76, 199, 173, 0.6); background: rgba(76, 199, 173, 0.08); }
.sk-lock.weak { color: var(--ink); border-color: var(--border2); }
.sk-lock.lost { color: var(--on-gold); border-color: var(--ember); background: var(--ember); }
.sk-lock.held { color: var(--ink); border-color: var(--ink); }
.sk-secs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; min-width: 0; }
.sk-secs .sk-pill { flex: none; }
.sk-lgroup.nudge .sk-btn { min-width: 0; padding: 8px 12px; }
.sk-btn.listen { min-width: 180px; font-weight: 700; }
.sk-btn.listen svg { width: 20px; height: 20px; }
.sk-btn.listen.on { background: rgba(226, 85, 43, 0.14); color: var(--ember-text); border-color: var(--ember); }
.sk-chip.tempo { font-variant-numeric: tabular-nums; min-height: 40px; display: inline-flex; align-items: center; }
.sk-chip.tempo.live { border-color: rgba(76, 199, 173, 0.6); color: var(--teal); }
.sk-keyname { min-width: 64px; text-align: center; font-weight: 700; }
.sk-lgroup.key .sk-btn { width: 44px; padding: 0; font-weight: 800; }
.sk-mic { display: grid; gap: 6px; min-width: 0; }
.sk-mic .sk-select { max-width: 100%; }
.sk-lnotice { font-size: 0.86rem; color: var(--dim); }
.sk-lnotice.error { color: #f6c7b4; }
.sk-dock.live .more { margin-left: auto; }

@media (max-width: 699px) {
  .sk-dock.live { gap: 8px; }
  .sk-lrow { gap: 8px; }
  .sk-lrow.one { flex-wrap: nowrap; }
  .sk-dock.live .sk-btn.more { width: 44px; padding: 0; flex: none; font-size: 0; gap: 0; }
  .sk-dock.live .sk-btn.more svg { width: 22px; height: 22px; }
  .sk-lock { font-size: 0.8rem; padding: 6px 10px; }
  .sk-lgroup > .sk-label { display: none; }
  .sk-lgroup.hearing { display: none; }
  .sk-btn.listen { flex: 1 1 auto; min-width: 0; }
  .sk-lrow.three { display: grid; grid-template-columns: minmax(0, 1fr); }
  .sk-lgroup.nudge .sk-lbody { flex-wrap: nowrap; }
  .sk-lgroup.nudge .sk-btn { flex: 1 1 0; padding: 8px 6px; }
  .sk-lgroup.tempo .sk-chip.tempo { display: none; }
  .sk-lrow.three { grid-template-columns: minmax(0, 1fr) auto; }
  .sk-lgroup.jump { grid-column: 1 / -1; }
}
@media (min-width: 700px) {
  .sk-lrow.three { flex-wrap: nowrap; }
  .sk-lgroup.jump { flex: 1 1 auto; }
  .sk-lgroup.nudge, .sk-lgroup.tempo { flex: none; }
}
@media (min-width: 700px) and (max-width: 1099px) {
  .sk-lrow.three { flex-wrap: wrap; }
  .sk-lgroup.jump { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-lyrics.live .sk-line.cur .w { transition: none; }
  .sk-chip.mode.on::before { animation: none; }
}
/* The host must be one tap from a fix, so an idle dock dims but stays usable. */
.sk-stage.live.idle .sk-dock { opacity: 0.35; pointer-events: auto; }
.sk-stage.live.idle { cursor: auto; }
.sk-stage.live.idle .sk-dock:hover, .sk-stage.live.idle .sk-dock:focus-within { opacity: 1; }

/* ------------------------------------------------------------ add a song (#/add) */

.sk-add { padding: 20px 16px 48px; max-width: 1280px; margin: 0 auto; position: relative; z-index: 1; display: grid; gap: 18px; }
.sk-add-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sk-add-title { margin: 0; font: 400 2.6rem/1 var(--display); letter-spacing: 0.04em; }
.sk-add-body { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.sk-add-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 18px; display: grid; gap: 12px; align-content: start; min-width: 0;
  grid-template-columns: minmax(0, 1fr);
}
.sk-add-card > * { min-width: 0; max-width: 100%; }
.sk-visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.sk-drop {
  display: grid; place-items: center; gap: 6px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border); border-radius: 14px; padding: 28px 12px; min-height: 120px;
}
.sk-drop b { font-size: 1.15rem; word-break: break-word; }
.sk-drop span { color: var(--dim); font-size: 0.92rem; }
.sk-drop.over, .sk-drop:focus-within { border-color: var(--gold); background: var(--gold-soft); }
.sk-drop.has { border-style: solid; border-color: var(--teal); }
.sk-add-row { display: flex; gap: 8px; }
.sk-add-row .sk-input { flex: 1; min-width: 0; }
.sk-input { width: 100%; min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg2); padding: 8px 12px; }
.sk-add-more summary { cursor: pointer; color: var(--dim); padding: 4px 0; }
.sk-add-more[open] { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.sk-add-more > *, .sk-add-more input[type="file"] { min-width: 0; max-width: 100%; }
.sk-add-where { display: grid; gap: 8px; }
.sk-choice {
  display: grid; gap: 2px; text-align: left; padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--border); background: var(--card); color: var(--ink); white-space: normal;
}
.sk-choice span { color: var(--dim); font-size: 0.9rem; }
.sk-choice.on { border: 2px solid var(--gold); background: rgba(242, 179, 61, 0.06); }
.sk-add-cmd { white-space: pre-wrap; word-break: break-all; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-size: 0.8rem; margin: 0; }
.sk-linkbtn { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; cursor: pointer; font-size: inherit; }
.sk-steps { list-style: none; margin: 0; padding: 0; display: grid; }
.sk-step {
  display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: 'icon text when' 'icon bar bar';
  gap: 4px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.sk-step-icon { grid-area: icon; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--faint); justify-self: center; }
.sk-step-text { grid-area: text; display: grid; min-width: 0; }
.sk-step-text span { color: var(--dim); font-size: 0.88rem; overflow-wrap: anywhere; }
.sk-step-bar { grid-area: bar; height: 4px; border-radius: 2px; background: var(--card2); overflow: hidden; display: block; }
.sk-step-bar b { display: block; height: 100%; width: 0; background: var(--teal); transition: width 0.3s; }
.sk-step-when { grid-area: when; color: var(--dim); font-size: 0.88rem; }
.sk-step.done .sk-step-icon { border: 0; width: auto; height: auto; }
.sk-step.done .sk-step-icon::before { content: '✓'; color: var(--teal); font-weight: 800; }
.sk-step.running .sk-step-icon { border-color: var(--gold); background: var(--gold); }
.sk-step.running .sk-step-bar b { background: var(--gold); }
.sk-step.running .sk-step-when { color: var(--gold); }
.sk-step.skipped { opacity: 0.6; }
.sk-check { border: 1px solid var(--border); border-radius: 14px; padding: 14px; display: grid; gap: 10px; }
.sk-check p { margin: 0; }
.sk-check-notes { margin: 0; padding-left: 18px; color: #f6c7b4; }
.sk-chip.warn { color: var(--gold); border-color: var(--gold); }
.sk-badge.local { color: var(--orange); }
.sk-mine-row { cursor: default; }
@media (min-width: 900px) {
  .sk-add { padding: 32px 40px 64px; }
  .sk-add-title { font-size: 3.2rem; }
  .sk-add-body { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr); align-items: start; }
  .sk-step { grid-template-columns: 22px minmax(0, 1fr) minmax(120px, 0.6fr) 70px; grid-template-areas: 'icon text bar when'; }
  .sk-mine-row { grid-template-columns: minmax(0, 1.4fr) auto auto; align-items: center; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { .sk-step-bar b { transition: none; } }

/* ------------------------------------------------------------ timing editor, milestone 3 */

.sk-ed-lane { position: relative; }
.sk-wave { position: relative; }
.sk-wave canvas { display: block; width: 100%; height: 110px; border-radius: 10px; border: 1px solid var(--border); touch-action: none; }
.sk-wave canvas:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sk-wave-zoom { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 4px; }
.sk-wave-zoom .sk-ms { width: auto; height: 26px; padding: 2px 8px; font-size: 0.75rem; white-space: nowrap; background: var(--bg2); }
.sk-wave-zoom .sk-ms.on { background: var(--bg2); border-color: var(--gold); color: var(--gold); }
@media (max-width: 699px) {
  .sk-wave canvas { height: 92px; }
  /* On a phone the editor scrolls as a whole rather than squeezing its list. */
  .sk-editor { max-height: 72vh; overflow-y: auto; display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; }
  .sk-editor > * { flex: none; }
  .sk-ed-pane { overflow: visible; min-height: auto; }
}
.sk-ed-fix { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.sk-ed-sel { color: var(--dim); font-size: 0.9rem; min-width: 0; flex: 1 1 100%; }
.sk-ed-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sk-ed-words { display: grid; gap: 10px; }
.sk-pill.unsure { border-color: var(--orange); color: #f6c7b4; }
.sk-ed-line.unsure .sk-text-in { border-color: var(--orange); }
.sk-ed-line.backing .sk-ed-text, .sk-ed-line.spoken .sk-ed-text { font-style: italic; color: var(--dim); }
.sk-text-in.bad { border-color: var(--rose); }
.sk-cue .one .next { color: var(--gold); text-decoration: underline; }
.sk-cue .one .done { color: var(--dim); }
.sk-lyrics .backing, .sk-lyrics .spoken { font-style: italic; opacity: 0.75; }
.sk-range { width: 100%; }
@media (min-width: 900px) { .sk-ed-sel { flex: 0 1 auto; } }

/* ------------------------------------------------------------ parts (milestone 5) */

/* With Parts on the lyrics are two small lines (current and next) and the part has the middle. */
.sk-layers.parts-on { justify-content: flex-start; gap: 10px; overflow-y: auto; }
.sk-layers.parts-on .sk-line.prev, .sk-layers.parts-on .sk-line.next2 { display: none; }
.sk-layers.parts-on .sk-lyrics { gap: calc(var(--lyric-size) * 0.2); flex: none; }
/* The chords are on the words and in the notation; the strip comes back large in Chords only. */
.sk-layers.parts-on:not([data-parts="chords"]) .sk-strip { display: none; }
.sk-layers[data-parts="chords"] .sk-strip { width: min(100%, 980px); }
.sk-layers[data-parts="chords"] .sk-cell { height: clamp(64px, 14vh, 120px); font-size: clamp(1.2rem, min(5vh, 6.5vw), 3rem); }
.sk-layers[data-parts="chords"] .sk-band .sk-bcell .name { font-size: clamp(2rem, 7vh, 4rem); }

.sk-parts { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; flex: none; }
.sk-parts > *, .sk-parts-lower > * { min-width: 0; }
.sk-parts[hidden] { display: none; }
.sk-parts-strip notation-sync {
  --ns-bg: rgba(16, 13, 11, 0.86); --ns-ink: var(--ink); --ns-accent: var(--gold); --ns-muted: var(--dim);
  --ns-line: rgba(255, 255, 255, 0.14);
  display: block;
}
.sk-parts[data-view="highway"] .sk-parts-strip, .sk-parts[data-view="chords"] .sk-parts-strip { display: none; }
.sk-parts-highway { display: none; height: clamp(220px, 40vh, 460px); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; background: rgba(16, 13, 11, 0.86); }
.sk-parts[data-view="highway"] .sk-parts-highway { display: block; }
.sk-parts-highway canvas, .sk-parts-fret canvas { display: block; width: 100%; height: 100%; }
.sk-parts-lower { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sk-parts-fret { border: 1px solid var(--border); border-radius: 16px; background: rgba(16, 13, 11, 0.86); padding: 6px 8px 4px; }
.sk-parts-fret canvas { height: 120px; }
.sk-parts[data-view="highway"] .sk-parts-fret, .sk-parts[data-view="chords"] .sk-parts-fret { display: none; }
.sk-parts-cap { font-size: 0.75rem; color: var(--dim); padding: 2px 4px; }
.sk-parts-panel { border: 1px solid var(--border); border-radius: 16px; background: rgba(16, 13, 11, 0.86); padding: 10px 12px; display: grid; gap: 8px; align-content: start; }
.sk-parts-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sk-parts-row .sk-pill { min-height: 32px; padding: 4px 10px; font-size: 0.88rem; }
.sk-parts-row .sk-pill:disabled { opacity: 0.45; cursor: default; }
.sk-parts-row .sk-select { min-height: 34px; }
.sk-parts-none { color: var(--dim); font-size: 0.9rem; }
.sk-parts-msg { margin: 0; color: var(--dim); font-size: 0.9rem; text-align: center; }
.sk-parts-more { display: none; justify-self: end; }

/* Phones: notation and fretboard stacked; the part controls are a sheet behind the Part button. */
@media (max-width: 699px) {
  .sk-parts-fret canvas { height: 92px; }
  .sk-parts-more { display: inline-flex; min-height: 36px; padding: 6px 12px; }
  .sk-parts-panel { display: none; }
  .sk-parts.panel-open .sk-parts-panel {
    display: grid; position: fixed; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); z-index: 8;
    max-height: 60vh; overflow-y: auto; background: var(--glass); backdrop-filter: blur(14px); box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.5);
  }
  .sk-parts-highway { height: 34vh; }
}
@media (min-width: 900px) {
  .sk-parts-lower { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); align-items: stretch; }
  .sk-parts[data-view="highway"] .sk-parts-lower, .sk-parts[data-view="chords"] .sk-parts-lower { grid-template-columns: minmax(0, 1fr); }
}

/* Key and speed, under Mix */
.sk-key-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sk-key-row .sk-pill { min-height: 32px; padding: 4px 10px; font-size: 0.9rem; }
.sk-key-step { min-width: 36px; font-weight: 800; }
.sk-key-val { min-width: 7ch; font-variant-numeric: tabular-nums; font-weight: 700; }
.sk-key-row.preparing .sk-key-val { color: var(--gold); }
.sk-key-note { margin: 0; font-size: 0.82rem; color: var(--dim); }
.sk-chip.key.preparing { border-style: dashed; }
@media (min-width: 700px) and (max-height: 899px) {
  .sk-parts-fret canvas { height: 92px; }
  .sk-parts-cap { display: none; }
  .sk-parts-panel { padding: 8px 10px; gap: 6px; }
  .sk-parts-row .sk-pill { min-height: 28px; padding: 2px 9px; font-size: 0.84rem; }
  .sk-parts-row .sk-select { min-height: 30px; padding: 2px 6px; }
  .sk-layers.parts-on .sk-dots { display: none; }
}
.sk-layers.parts-on .sk-line.next { font-size: calc(var(--lyric-size) * 0.72); }
/* Live Band mode with a notation view: the band row stays, smaller, so the part fits. */
.sk-layers.parts-on:not([data-parts="chords"]) .sk-bcell { padding: 4px 10px 6px; }
.sk-layers.parts-on:not([data-parts="chords"]) .sk-bcell .name { font-size: clamp(22px, 5vh, 48px); }
.sk-layers.parts-on:not([data-parts="chords"]) .sk-bcell .beats { margin-top: 2px; }

/* ------------------------------------------------------------ More: everything else, in groups */

.si-more {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; max-height: 78vh; overflow-y: auto;
  background: rgba(20, 16, 13, 0.97); border: 1px solid var(--border2); border-bottom: 0; border-radius: 22px 22px 0 0;
  padding: 6px 16px max(18px, env(safe-area-inset-bottom));
  box-shadow: 0 -24px 60px -20px rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  animation: si-rise 0.4s var(--ease) both;
}
.si-more-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 8px 0; background: rgba(20, 16, 13, 0.97); }
.si-more-head h2 { margin: 0; font: 400 1.7rem/1 var(--display); letter-spacing: 0.06em; }
.si-more-body { display: grid; }
.si-group { display: grid; gap: 8px; padding: 14px 0; border-top: 1px solid var(--border); }
.si-group > .sk-label { color: var(--ink); }
.si-group-line { margin: -4px 0 2px; color: var(--dim); font-size: 0.88rem; line-height: 1.35; }
.si-group-body { display: grid; gap: 10px; }
.si-group .sk-pill { min-height: 38px; padding: 6px 12px; font-size: 0.92rem; }
@media (min-width: 900px) {
  .si-more {
    left: auto; top: 14px; right: 14px; bottom: 14px; width: 380px; max-height: none;
    border: 1px solid var(--border2); border-radius: 20px; padding: 4px 20px 18px;
    animation: si-slide 0.4s var(--ease) both;
  }
  .sk-stage.more-open .sk-layers, .sk-stage.more-open .sk-dock, .sk-stage.more-open .sk-top, .sk-stage.more-open .sk-notice { margin-right: 396px; }
  .sk-stage.more-open .sk-dock { width: auto; align-self: stretch; }
}
@keyframes si-slide { from { translate: 24px 0; opacity: 0; } to { translate: 0 0; opacity: 1; } }

/* ------------------------------------------------------------ the part picker */

.si-picker {
  position: fixed; z-index: 60; width: min(300px, calc(100vw - 16px));
  background: rgba(23, 19, 17, 0.98); border: 1px solid var(--border2); border-radius: 16px; padding: 10px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.9);
  animation: si-fade 0.25s var(--ease) both;
}
.si-picker-q { margin: 2px 6px 8px; font: 400 1.25rem/1 var(--display); letter-spacing: 0.08em; color: var(--dim); }
.si-pick {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%;
  min-height: 44px; padding: 8px 10px; border-radius: 10px; border: 1px solid transparent; background: none; cursor: pointer; text-align: left; color: var(--ink);
}
.si-pick svg { color: var(--dim); }
.si-pick:hover { background: var(--card2); }
.si-pick.on { border-color: rgba(242, 179, 61, 0.6); background: rgba(242, 179, 61, 0.08); }
.si-pick.on svg { color: var(--gold); }
.si-pick .l { font-weight: 700; }
.si-pick .n { font-size: 0.78rem; color: var(--ember-text); }

/* ------------------------------------------------------------ tooltips */

.si-tip {
  position: fixed; left: 0; top: 0; z-index: 90; max-width: min(280px, calc(100vw - 16px));
  padding: 8px 12px; border-radius: 10px; pointer-events: none;
  background: var(--ink); color: var(--bg); font-size: 0.86rem; line-height: 1.35; font-weight: 500;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.8);
  opacity: 0; transition: opacity 0.18s ease;
}
.si-tip.on { opacity: 1; }
.si-tip::after {
  content: ''; position: absolute; left: var(--arrow, 50%); width: 10px; height: 10px; background: var(--ink); translate: -50% 0; rotate: 45deg;
}
.si-tip[data-side="above"]::after { bottom: -4px; }
.si-tip[data-side="below"]::after { top: -4px; }

/* ------------------------------------------------------------ coach marks */

.si-coach {
  position: fixed; left: 0; top: 0; z-index: 70; width: min(290px, calc(100vw - 16px));
  padding: 14px 14px 10px; border-radius: 14px;
  background: var(--gold); color: var(--on-gold);
  box-shadow: 0 18px 50px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 225, 160, 0.5) inset;
  opacity: 0; transition: opacity 0.35s var(--ease);
}
.si-coach.on { opacity: 1; }
.si-coach::after { content: ''; position: absolute; left: var(--arrow, 50%); width: 12px; height: 12px; background: var(--gold); translate: -50% 0; rotate: 45deg; }
.si-coach[data-side="above"]::after { bottom: -5px; }
.si-coach[data-side="below"]::after { top: -5px; }
.si-coach-text { margin: 0 0 10px; font-weight: 700; font-size: 0.98rem; line-height: 1.35; }
.si-coach-btns { display: flex; align-items: center; gap: 6px; }
.si-coach-n { font-size: 0.78rem; opacity: 0.75; margin-right: auto; }
.si-coach button { border: 0; border-radius: 999px; padding: 6px 12px; min-height: 34px; cursor: pointer; font-weight: 700; font-size: 0.88rem; }
.si-coach-skip { background: transparent; color: var(--on-gold); text-decoration: underline; text-underline-offset: 3px; }
.si-coach-next { background: var(--on-gold); color: var(--gold); }
.si-coach button:focus-visible { outline: 2px solid var(--on-gold); outline-offset: 2px; }
.si-coached { outline: 2px solid rgba(242, 179, 61, 0.7) !important; outline-offset: 5px; }
.sk-line.si-coached, .sk-secs.si-coached { border-radius: 12px; }

/* ------------------------------------------------------------ help */

.si-help-modal { place-items: center; padding: 12px; }
.si-help { max-width: 1060px; border-radius: 20px; max-height: calc(100vh - 24px); gap: 10px; }
.si-help-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0; }
.si-help-h svg { color: var(--ink); }
.si-help-h span { font: 400 1.25rem/1 var(--display); letter-spacing: 0.06em; color: var(--dim); }
.si-help-grid { display: grid; gap: 18px; }
.si-help-grid section { display: grid; gap: 8px; align-content: start; }
.si-help-grid p { margin: 0; color: var(--dim); font-size: 0.92rem; line-height: 1.45; }
.si-help-lines { gap: 10px; }
.si-help-lines .si-line { font-size: 0.9rem; }
.si-help-how { color: var(--ink) !important; font-weight: 700; }
.si-help-small { font-size: 0.82rem !important; }
.si-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; margin-bottom: 6px; }
.si-key { display: flex; gap: 8px; align-items: baseline; font-size: 0.86rem; color: var(--dim); min-width: 0; }
.si-key kbd { flex: none; min-width: 44px; text-align: center; font: 700 0.76rem/1 var(--font); color: var(--ink); padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border2); background: var(--card); }
@media (min-width: 900px) {
  .si-help { padding: 22px 26px; }
  .si-help-grid { grid-template-columns: 1.15fr 1fr 0.85fr; gap: 28px; }
}

/* ------------------------------------------------------------ motion */

@media (prefers-reduced-motion: reduce) {
  .si-cone, .si-pool { transition: none; }
  .si-part, .sk-go, .sk-row, .si-tip, .si-coach { transition: none; }
  .si-part:hover, .si-part:focus-visible { translate: none; }
  .sk-setup, .si-more, .si-picker, .si-start-card { animation: none !important; }
  .sk-lyrics.rise .sk-cur, .sk-lyrics.rise .sk-line.next { animation: none; }
}

/* ------------------------------------------------------------ scoring (js/layers/score.js, js/ui/score-panel.js)
   Only in the page while a singer is scored. Teal is a note sung on pitch (a confirmation), half teal close;
   gold only for now: the playhead, the note under it, the running score. Ember for the Scoring chip (listening). */

.sk-layers.score-on { justify-content: flex-start; padding-top: 6px; }
.si-score {
  width: min(100%, 1180px); flex: none; display: grid; gap: 6px 14px; align-items: start;
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "lane run" "legend legend" "note note";
}
.si-score[hidden] { display: none; }
.si-score-lane {
  grid-area: lane; position: relative; height: clamp(104px, 24vh, 230px);
  background: rgba(23, 19, 17, 0.72); border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
}
.si-score-lane canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.si-score-legend { grid-area: legend; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 0.8rem; color: var(--dim); padding: 0 4px; }
.si-score-legend .k { display: inline-flex; align-items: center; gap: 6px; }
.si-score-legend i { width: 18px; height: 8px; border-radius: 4px; display: inline-block; }
.si-score-legend .hit i { background: var(--teal); }
.si-score-legend .close i { background: rgba(76, 199, 173, 0.38); box-shadow: 0 0 0 1.5px var(--teal) inset; }
.si-score-legend .come i { background: rgba(255, 232, 200, 0.26); }
.si-score-legend .any { margin-left: auto; color: var(--faint); }
.si-score-note { grid-area: note; margin: 0; padding: 6px 12px; border-radius: 10px; font-size: 0.9rem; color: #f6c7b4; background: rgba(226, 85, 43, 0.1); border: 1px solid rgba(226, 85, 43, 0.35); }
.si-score.live { grid-template-areas: "note run"; }
.sk-layers.parts-on .si-score-lane, .sk-layers.parts-on .si-score-legend { display: none; }
.sk-layers.parts-on .si-score { grid-template-areas: "note run"; }

.si-score-run {
  grid-area: run; text-align: right; min-width: 128px;
  display: grid; justify-items: end; line-height: 1; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}
.si-score-run .lbl { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim); font-weight: 700; }
.si-score-run b { font: 400 clamp(2.2rem, 5vw, 4rem)/0.95 var(--display); letter-spacing: 0.02em; color: var(--gold); font-variant-numeric: tabular-nums; }
.si-score-run .sub { font-size: 0.82rem; color: var(--dim); margin-top: 4px; white-space: nowrap; }

.sk-chip.si-score-chip { color: var(--ink); border-color: rgba(226, 85, 43, 0.55); display: inline-flex; align-items: center; gap: 6px; }
.sk-chip.si-score-chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ember); opacity: 0.55; }
.sk-chip.si-score-chip.on::before { opacity: 1; box-shadow: 0 0 8px var(--ember); }
.sk-chip.si-score-chip.warn { color: var(--ember-text); }
.sk-chip.si-score-chip[hidden] { display: none; }

.si-score-card {
  position: absolute; z-index: 8; left: 12px; right: 12px; bottom: max(84px, calc(env(safe-area-inset-bottom) + 84px));
  margin: 0 auto; width: auto; max-width: 620px; max-height: calc(100% - 120px); overflow-y: auto;
  background: #171311; border: 1px solid rgba(242, 179, 61, 0.55); border-radius: 18px; /* opaque: the words under it must not show through */
  padding: 16px 18px; display: grid; gap: 12px; box-shadow: 0 24px 80px -20px rgba(0, 0, 0, 0.9);
}
.si-score-card.rise { animation: si-rise 0.5s var(--ease) both; }
.si-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.si-card-top .sk-label { margin: 0 0 4px; }
.si-card-top h2 { margin: 0; font: 700 1.25rem/1.2 var(--font); overflow-wrap: anywhere; }
.si-grade { margin: 0; font: 400 3.4rem/0.85 var(--display); color: var(--gold); letter-spacing: 0.02em; flex: none; }
.si-grade.pct { font-size: 3rem; display: grid; justify-items: end; }
.si-grade.pct .sk-label { font: 700 0.68rem/1 var(--font); letter-spacing: 0.2em; margin-bottom: 4px; }
.si-score.live .si-score-run b { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.si-card-nums { margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.si-card-nums .n { display: grid; gap: 2px; }
.si-card-nums dd { margin: 0; order: -1; font: 800 1.35rem/1.1 var(--font); font-variant-numeric: tabular-nums; }
.si-card-nums dt { font-size: 0.82rem; color: var(--dim); }
.si-card-nums .total dd { color: var(--gold); }
.si-card-tips { margin: 0; padding-left: 18px; color: var(--dim); font-size: 0.92rem; display: grid; gap: 4px; }
.si-card-tips[hidden] { display: none; }
.si-card-tips .part { color: var(--faint); }
.si-card-tonight ol, .si-score-tonight ol { margin: 4px 0 0; padding-left: 22px; display: grid; gap: 3px; font-size: 0.9rem; }
.si-card-tonight li, .si-score-tonight li { color: var(--dim); }
.si-card-tonight li > *, .si-score-tonight li > * { display: inline; }
.si-card-tonight li b, .si-score-tonight li b { color: var(--ink); margin-left: 8px; font-variant-numeric: tabular-nums; }
.si-card-tonight li.me, .si-card-tonight li.me b { color: var(--gold); }
.si-card-tonight h3 { margin: 0; }
.si-card-btns { display: flex; gap: 8px; justify-content: flex-end; }
@media (min-width: 900px) {
  .si-score-card { left: auto; right: 24px; margin: 0; width: min(560px, 46vw); }
  .sk-stage.more-open .si-score-card { right: 420px; }
}

/* The choice: in More and on the card before the song */
.si-score-ctl { display: grid; gap: 8px; }
.si-score-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.si-score-row .si-singer { flex: 1 1 160px; width: auto; min-width: 0; }
.si-score-row .si-singer[hidden] { display: none; }
.si-score-why { margin: 0; color: var(--ember-text); font-size: 0.9rem; line-height: 1.35; }
.si-score-why[hidden], .si-close-mic[hidden] { display: none; }
.si-close-mic { justify-self: start; }
.si-score-mic { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.si-score-small { color: var(--dim); font-size: 0.86rem; flex: 1 1 100%; }
.si-score-tonight h4 { margin: 6px 0 0; }
.si-start-score { width: min(360px, 100%); }
.si-start-score .si-score-row { justify-content: center; }
.si-start-score .si-score-why { text-align: center; }
.si-start-score .si-close-mic { justify-self: center; }
.si-start-score[hidden] { display: none; }

/* The delay check */
.si-cal-say { margin: 0; color: var(--dim); line-height: 1.4; }
.si-cal-dots { display: flex; gap: 10px; justify-content: center; padding: 6px 0; }
.si-cal-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--gold); transition: background 0.08s; }
.si-cal-dots i.on { background: var(--gold); }
.si-cal-out { margin: 0; text-align: center; font-weight: 700; min-height: 1.4em; }
.si-cal .sk-pills { justify-content: center; }
.si-cal .sk-go { width: auto; padding-inline: 28px; }

.si-help-score { margin: 8px 0 0; color: var(--dim); font-size: 0.9rem; line-height: 1.4; }
.si-help-score b { color: var(--ink); }

@media (max-width: 699px) {
  .si-score { grid-template-areas: "lane lane" "legend run" "note note"; gap: 4px 10px; }
  .si-score.live, .sk-layers.parts-on .si-score { grid-template-areas: "note run"; }
  .si-score-run { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
  .si-score-run b { font-size: 1.7rem; }
  .si-score-run .sub { display: none; }
  .si-score-lane { height: clamp(96px, 17vh, 150px); border-radius: 12px; }
  .si-score-legend { font-size: 0.74rem; gap: 4px 10px; }
  .si-score-legend .come { display: none; }
  .si-score-card { padding: 14px; }
  .si-grade { font-size: 2.8rem; }
  .si-card-nums { gap: 8px 16px; }
  .si-card-nums dd { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .si-score-card.rise { animation: none; }
  .si-cal-dots i { transition: none; }
}
