:root {
  --notspelare-blue:       #2c5282;
  --notspelare-blue-dark:  #1e3a5f;
  --notspelare-blue-light: #ebf0f8;
  --notspelare-bg:         #f7f8fa;
  --notspelare-border:     #dde1e8;
  --notspelare-radius:     10px;
  --notspelare-text:       #2d3748;
  --notspelare-muted:      #718096;
}

.notspelare {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;      /* förankrad bas: alla em-storlekar blir temaoberoende */
  line-height: 1.5;
  background: var(--notspelare-bg);
  border: 1px solid var(--notspelare-border);
  border-radius: var(--notspelare-radius);
  padding: 18px;
  max-width: 620px;
  margin: 24px 0;
  color: var(--notspelare-text);
}

/* Header */
.notspelare__header { margin-bottom: 10px; }

/* Spellista */
.notspelare-playlist-wrap { margin-top: 6px; }

.notspelare-playlist-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 18px 1fr 18px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--notspelare-border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.95em;
  font-weight: normal;
  color: var(--notspelare-text);
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
}
.notspelare-playlist-toggle::before { content: ''; }
.notspelare-playlist-toggle::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--notspelare-muted);
  justify-self: end;
  transition: transform 0.15s;
}
.notspelare-playlist-toggle.is-open::after { transform: rotate(180deg); }
.notspelare-playlist-toggle:hover {
  background: var(--notspelare-blue-light);
  border-color: var(--notspelare-blue);
}
.notspelare-playlist-toggle.is-open {
  border-radius: 6px 6px 0 0;
  border-bottom-color: transparent;
}
.notspelare-playlist-current { text-align: center; }

.notspelare-playlist {
  border: 1px solid var(--notspelare-border);
  border-top: none;
  border-radius: 0 0 6px 6px;
  background: #fff;
  max-height: 180px;
  overflow-y: auto;
}

.notspelare-playlist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  font-size: 0.88em;
  color: var(--notspelare-text);
  cursor: pointer;
  user-select: none;
}
.notspelare-playlist-row:hover { background: var(--notspelare-blue-light); }

.notspelare-playlist-label {
  flex: 1;
  cursor: pointer;
}
.notspelare-playlist-label:hover { text-decoration: underline; }

/* Transport */
.notspelare__transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  position: relative;
}

.notspelare-transport__side {
  width: 40px;
  display: flex;
  align-items: center;
}
.notspelare-transport__side--left  { justify-content: flex-end; }
.notspelare-transport__side--right { justify-content: flex-start; }

.notspelare-btn--play,
.notspelare-btn--prev,
.notspelare-btn--next,
.notspelare-btn--loop {
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notspelare-btn--play {
  padding: 10px 16px;
}

.notspelare-btn--loop {
  opacity: 0.35;
}
.notspelare-btn--loop.is-active {
  opacity: 1;
  color: var(--notspelare-blue);
  border-color: var(--notspelare-blue);
  background: var(--notspelare-blue-light);
}

/* Track */
.notspelare-progress-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.notspelare-track {
  flex: 1;
  position: relative;
  height: 4px;
  background: var(--notspelare-border);
  border-radius: 2px;
  cursor: pointer;
  margin: 12px 0;
}

.notspelare-track__fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: var(--notspelare-blue);
  border-radius: 2px;
  pointer-events: none;
}

.notspelare-track__loop-zone {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(44, 82, 130, 0.25);
  pointer-events: none;
  display: none;
}

.notspelare-track__handle {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--notspelare-blue);
  cursor: grab;
  z-index: 2;
}
.notspelare-track__handle:active { cursor: grabbing; }

.notspelare-track__handle--loop-start,
.notspelare-track__handle--loop-end {
  background: #fff;
  border: 2px solid var(--notspelare-blue);
}

.notspelare-time-start,
.notspelare-time-end {
  font-size: 0.8em;
  color: var(--notspelare-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 36px;
  padding: 0 4px;
}
.notspelare-time-end { text-align: right; }

/* Knappar */
.notspelare-btn {
  padding: 7px 14px;
  border: 1px solid var(--notspelare-border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 0.88em;
  font-weight: 600;
  color: var(--notspelare-text);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.notspelare-btn:hover    { background: var(--notspelare-blue-light); border-color: var(--notspelare-blue); }
.notspelare-btn:disabled { opacity: 0.35; cursor: default; }

.notspelare-btn--play {
  background: var(--notspelare-blue);
  color: #fff;
  border-color: var(--notspelare-blue);
}
.notspelare-btn--play:hover { background: var(--notspelare-blue-dark); border-color: var(--notspelare-blue-dark); }

/* Volym-rader */
.notspelare__voices { margin-top: 4px; }

.notspelare-voice-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
.notspelare-voice-row--all { margin-bottom: 5px; }

.notspelare-voice-label {
  flex-shrink: 0;
  font-size: 0.88em;
  color: var(--notspelare-text);
  white-space: nowrap;
  display: flex;
  align-items: center;
}

.notspelare-voice-label span {
  min-width: 36px;
  display: inline-block;
}

.notspelare-vol-icon {
  opacity: 0.4;
  flex-shrink: 0;
  margin-left: 5px;
  margin-right: -7px;
}

.notspelare-vol {
  flex: 1;
  cursor: pointer;
  accent-color: var(--notspelare-blue);
}

/* Tempo som egen rad under volymerna */
.notspelare-tempo-row { margin-top: 16px; }
.notspelare-tempo-label { width: 58px; }   /* spänner över etikett + ikon-kolumnen så slidern linjerar */
.notspelare-tempo-row .notspelare-tempo-val {
  font-size: 0.8em;
  opacity: 0.7;
  white-space: nowrap;
  margin-right: 10px;         /* högerkant i linje med volymsliderns slut ovanför */
}

/* Footer */
.notspelare__footer {
  margin-top: 16px;
  min-height: 22px;          /* reservera plats så kugghjulet får luft uppåt även utan statustext */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.notspelare-btn--download {
  background: var(--notspelare-blue);
  color: #fff;
  border-color: var(--notspelare-blue);
  font-size: 0.75em;
  padding: 5px 10px;
  font-weight: normal;
}
.notspelare-btn--download:hover { background: var(--notspelare-blue-dark); border-color: var(--notspelare-blue-dark); }

.notspelare-download-status { font-size: 0.83em; color: var(--notspelare-muted); }
.notspelare-loading { font-size: 0.88em; color: var(--notspelare-muted); font-style: italic; }
.notspelare-error   { color: #c53030; font-size: 0.88em; }

.notspelare-ios-tip {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  background: #fffbeb;
  border: 1px solid #f6e05e;
  border-radius: 6px;
  font-size: 0.8em;
  color: #744210;
  line-height: 1.5;
}

/* ─── Kugghjul (inställningar) – nere till höger ───────────── */
.notspelare { position: relative; }
.notspelare-gear-wrap { position: absolute; bottom: 10px; right: 12px; z-index: 15; }
.notspelare-gear {
  background: none; border: 0; cursor: pointer; padding: 4px;
  color: var(--notspelare-muted); line-height: 0;
}
.notspelare-gear:hover { color: var(--notspelare-text); }
.notspelare-gear-menu {
  position: absolute; right: 0; bottom: 100%; margin-bottom: 6px; z-index: 25;
  background: #fff; border: 1px solid #ddd; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15); min-width: 210px; overflow: hidden;
}
.notspelare-gear-item {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 11px 14px; font-size: 0.9rem; color: var(--notspelare-text); cursor: pointer;
}
.notspelare-gear-item:hover { background: #f0f4ff; }

/* ─── Grundinställnings-skärm (tar den höjd den behöver) ──── */
.notspelare.is-setup > :not(.notspelare-setup) { display: none !important; }   /* dölj spelaren bakom */
.notspelare-setup { background: var(--notspelare-bg); border-radius: inherit; }
.notspelare-setup__title { font-size: 1.25rem; margin: 0 0 4px; color: var(--notspelare-text); }
.notspelare-setup__hint { font-size: 0.85rem; color: var(--notspelare-muted); margin: 0 0 14px; }
.notspelare-setup__voices {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px;
}
.notspelare-setup__vb {
  padding: 11px 0; border: 1px solid #ccd6f0; border-radius: 8px;
  background: #f6f9ff; color: var(--notspelare-text); font-weight: bold; font-size: 0.95rem; cursor: pointer;
}
.notspelare-setup__vb.is-selected { background: var(--notspelare-blue); border-color: var(--notspelare-blue); color: #fff; }
.notspelare-setup__sliders { margin-bottom: 16px; }
.notspelare-setup__save {
  display: block; width: 100%; padding: 13px; border: 0; border-radius: 10px;
  background: var(--notspelare-blue); color: #fff; font-size: 1rem; cursor: pointer;
}
.notspelare-setup__save:hover { background: var(--notspelare-blue-dark); }
/* ─── Noter (rullande notremsa) ─────────────────────────────── */
.notspelare-noter { margin: 10px 0 4px; }
.notspelare-noter__toggle {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--notspelare-border);
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.95em;
  color: var(--notspelare-text);
  transition: background 0.15s, border-color 0.15s;
  box-sizing: border-box;
}
.notspelare-noter__toggle:hover { background: var(--notspelare-blue-light); border-color: var(--notspelare-blue); }
.notspelare-noter__toggle-label { font-weight: 600; justify-self: start; }
.notspelare-noter__bar { color: var(--notspelare-muted); font-variant-numeric: tabular-nums; font-size: 0.9em; justify-self: end; }
.notspelare-noter__chev {
  width: 0; height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--notspelare-muted);
  transition: transform 0.15s;
}
.notspelare-noter.is-open .notspelare-noter__chev { transform: rotate(180deg); }

.notspelare-noter__panel { display: none; margin-top: 8px; }
.notspelare-noter.is-open .notspelare-noter__panel { display: block; }

.notspelare-noter__stage {
  position: relative;
  height: 190px;
  background: #fff;
  border: 1px solid var(--notspelare-border);
  border-radius: 6px;
  overflow: hidden;
}
@media (min-width: 480px) { .notspelare-noter__stage { height: 230px; } }
.notspelare-noter__band { position: absolute; top: 0; left: 0; height: 100%; will-change: transform; }
.notspelare-noter__img { display: block; width: auto; user-select: none; -webkit-user-drag: none; }
.notspelare-noter__lanes { position: absolute; inset: 0; pointer-events: none; }
.notspelare-noter__lane {
  position: absolute;
  left: 5px;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 700;
  color: var(--notspelare-blue);
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--notspelare-blue);
  border-radius: 10px;
  padding: 1px 6px;
  line-height: 1.3;
}
.notspelare-noter__playhead {
  position: absolute;
  top: 2%; bottom: 2%;
  left: 30%;
  border-left: 2px solid var(--notspelare-blue);
  opacity: 0.75;
  pointer-events: none;
}
.notspelare-noter__playhead::before {
  content: '';
  position: absolute;
  /* triangeln (10px bred) centreras över 2px-strecket: mitt = 1px → left = 1-5 */
  top: -1px; left: -4px;
  border: 5px solid transparent;
  border-top-color: var(--notspelare-blue);
}
.notspelare-noter__status {
  position: absolute; inset: 0;
  /* texten läggs i nedre delen så den inte krockar med center-kontrollerna
     (fast avstånd: under knapparna, ovanför botten-listen) */
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 52px;
  color: var(--notspelare-muted);
  font-size: 0.9em;
  background: #fff;
  text-align: center;
}
.notspelare-noter__status-sub { font-size: 0.85em; opacity: 0.75; margin-top: 2px; }
.notspelare-noter__foot { display: flex; justify-content: flex-end; margin-top: 6px; }
.notspelare-noter__mode {
  background: #fff;
  border: 1px solid var(--notspelare-border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85em;
  color: var(--notspelare-text);
  cursor: pointer;
}
.notspelare-noter__mode:hover { background: var(--notspelare-blue-light); border-color: var(--notspelare-blue); }

.notspelare-noter__foot { align-items: center; gap: 8px; }
.notspelare-noter__sync { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; }
.notspelare-noter__sync-btn {
  background: #fff;
  border: 1px solid var(--notspelare-border);
  border-radius: 6px;
  width: 28px; height: 26px;
  font-size: 1em;
  line-height: 1;
  color: var(--notspelare-text);
  cursor: pointer;
}
.notspelare-noter__sync-btn:hover { background: var(--notspelare-blue-light); border-color: var(--notspelare-blue); }
.notspelare-noter__sync-val { color: var(--notspelare-muted); font-size: 0.8em; min-width: 74px; text-align: center; font-variant-numeric: tabular-nums; }

.notspelare-noter__diag { color: var(--notspelare-muted); font-size: 0.72em; margin-top: 5px; font-variant-numeric: tabular-nums; }

.notspelare-noter__kal {
  background: #fff;
  border: 1px solid var(--notspelare-border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85em;
  color: var(--notspelare-text);
  cursor: pointer;
  margin-right: 6px;
}
.notspelare-noter__kal:hover { background: var(--notspelare-blue-light); border-color: var(--notspelare-blue); }
.notspelare-noter__kalyta {
  margin-top: 8px;
  background: #000;
  border-radius: 8px;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}
.notspelare-noter__kaltext { color: #fff; font-size: 1em; text-align: center; padding: 12px; }

/* ─── Noter: kontrolloverlay + helskärm ─────────────────────── */
.notspelare-noter__fsbtn {
  background: #fff;
  border: 1px solid var(--notspelare-border);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 0.95em;
  color: var(--notspelare-text);
  cursor: pointer;
  margin-right: 6px;
}
.notspelare-noter__fsbtn:hover { background: var(--notspelare-blue-light); border-color: var(--notspelare-blue); }
.notspelare-noter__shell { position: relative; }
.notspelare-noter__shell .notspelare-noter__stage { touch-action: pan-y; }
.notspelare-noter__shell.is-fs {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #14181f;
  display: flex;
  flex-direction: column;
}
.notspelare-noter__shell.is-fs .notspelare-noter__stage {
  flex: 1;
  height: auto !important;
  border: 0;
  border-radius: 0;
  touch-action: none;
}
.notspelare-noter__ov {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 3;
}
.notspelare-noter__ov.is-visible { opacity: 1; pointer-events: auto; }
.notspelare-noter__ov-top {
  top: 0;
  gap: 6px;
  padding: 5px 10px;
  background: rgba(78, 90, 106, 0.55);
}
.notspelare-noter__ov-top .notspelare-noter__pill,
.notspelare-noter__ov-top .notspelare-noter__songbtn { background: none; padding: 6px 8px; }
.notspelare-noter__ov-bot {
  bottom: 0;
  gap: 10px;
  padding: 5px 12px;
  padding-bottom: max(5px, env(safe-area-inset-bottom));
  background: rgba(78, 90, 106, 0.55);
}
.notspelare-noter__pill {
  background: rgba(10, 14, 20, 0.72);
  border: 0;
  border-radius: 18px;
  color: #fff;
  padding: 7px 13px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 0.85em;
}
.notspelare-noter__pill-b { cursor: pointer; padding: 7px 11px; }
.notspelare-noter__pill-b svg { display: block; }
.notspelare-noter__ov-spacer { flex: 1; }
.notspelare-noter__songbtn {
  background: rgba(10, 14, 20, 0.72);
  border: 0; border-radius: 18px; color: #fff;
  font-weight: 600; font-size: 0.95em; cursor: pointer;
  padding: 7px 14px; text-align: left;
  max-width: 70%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.notspelare-noter__songmenu {
  position: absolute;
  top: 44px; left: 10px;
  z-index: 4;
  background: rgba(10, 14, 20, 0.95);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  max-height: 60%;
  overflow: auto;
}
.notspelare-noter__songitem {
  background: none; border: 0; color: #dfe7f0;
  text-align: left; padding: 9px 12px; font-size: 0.95em;
  border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
}
.notspelare-noter__songchk {
  width: 16px; height: 16px; flex: none; margin: 0;
  accent-color: var(--kn-accent); cursor: pointer;
}
.notspelare-noter__songitem:hover { background: rgba(255,255,255,0.08); }
.notspelare-noter__songitem.is-current { color: #fff; font-weight: 700; }
.notspelare-noter__ov-mode {
  background: rgba(10, 14, 20, 0.72); border: 0; color: #fff;
  border-radius: 18px; padding: 7px 13px; font-size: 0.85em; cursor: pointer;
}
.notspelare-noter__ov-b {
  background: none; border: 0; color: #fff;
  font-size: 1.35em; cursor: pointer; padding: 2px 6px; line-height: 1;
}
.notspelare-noter__ov-play { font-size: 1.7em; }
.notspelare-noter__ov-time { color: #9fb3c8; font-size: 0.85em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.notspelare-noter__ov-track {
  position: relative;
  flex: 1;
  height: 26px;
  cursor: pointer;
  touch-action: none;
}
.notspelare-noter__ov-track::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  height: 3px;
  background: rgba(255, 255, 255, 0.28);
  border-radius: 2px;
}
.notspelare-noter__ov-fill {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  height: 3px;
  background: var(--notspelare-blue);
  border-radius: 2px;
  pointer-events: none;
}
.notspelare-noter__mixer {
  position: absolute;
  right: 10px;
  top: 54px;
  z-index: 4;
  background: rgba(10, 14, 20, 0.95);
  border-radius: 10px;
  padding: 10px 8px 6px;
  display: flex;
  gap: 2px;
  max-width: calc(100% - 16px);
  overflow-x: auto;
}
.notspelare-noter__mixcol {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 27px;
  flex: none;
}
/* "Alla" = baslinjen: skilj av från stämmorna (som huvudmixern) */
.notspelare-noter__mixcol--all { margin-right: 5px; border-right: 1px solid rgba(255, 255, 255, 0.14); padding-right: 5px; width: 33px; }
/* Tempo: skiljs av från stämmorna på samma sätt (spegling av Alla-avgränsaren) */
.notspelare-noter__mixcol--tempo { margin-left: 5px; border-left: 1px solid rgba(255, 255, 255, 0.14); padding-left: 5px; width: 34px; }
/* Extra-spår (orgel/piano/piccolo …): fristående, avskilda från SATB — bara
   FÖRSTA extra-kolumnen får avgränsaren så gruppen läses som en enhet. */
.notspelare-noter__mixcol--extra1 { margin-left: 5px; border-left: 1px solid rgba(255, 255, 255, 0.14); padding-left: 5px; }
.notspelare-noter__mixcol--extra .notspelare-noter__mixlabel { color: #9fb3c8; }
.notspelare-noter__mixval { color: #9fb3c8; font-size: 0.68em; font-variant-numeric: tabular-nums; height: 12px; line-height: 12px; }
/* Volymerna har ingen siffra → dölj värde-raden och låt reglaget ta hela höjden
   (samma utrymme som tempots "100%" upptar). Tempo behåller siffran + kortare stapel;
   etiketterna hamnar i linje (125 = 12 värde + gap + 108 stapel). */
.notspelare-noter__mixcol:not(.notspelare-noter__mixcol--tempo) .notspelare-noter__mixval { display: none; }
.notspelare-noter__mixslot { height: 125px; width: 22px; position: relative; }
.notspelare-noter__mixcol--tempo .notspelare-noter__mixslot { height: 108px; }
/* Reglagen följer seek-listens formspråk: tunn ljus list, accent-fyllnad (ritas
   i JS via bakgrunds-gradient), och ett runt handtag med vit ring. */
.notspelare-noter__mixslot input {
  -webkit-appearance: none;
  appearance: none;
  position: absolute;
  top: 50%; left: 50%;
  width: 125px; height: 3px;
  /* Reglagen är roterade: webbläsaren ser en horisontell slider och släpper
     igenom vertikala drag som sidscroll — stäng av all touch-gest-hantering. */
  touch-action: none;
  transform: translate(-50%, -50%) rotate(-90deg);
  margin: 0;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}
.notspelare-noter__mixcol--tempo .notspelare-noter__mixslot input { width: 108px; }
.notspelare-noter__mixslot input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--kn-accent); box-shadow: 0 0 0 2px #fff; border: 0; cursor: pointer;
}
.notspelare-noter__mixslot input::-moz-range-thumb {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--kn-accent); box-shadow: 0 0 0 2px #fff; border: 0; cursor: pointer;
}
.notspelare-noter__mixslot input::-moz-range-track { height: 3px; background: transparent; }
.notspelare-noter__mixlabel { color: #fff; font-size: 0.72em; font-weight: 400; }

.notspelare-noter__ov-center {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 34px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 3;
}
.notspelare-noter__ov-center.is-visible { opacity: 1; }
.notspelare-noter__ov-center.is-visible .notspelare-noter__ov-c { pointer-events: auto; }
.notspelare-noter__ov-c {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 0;
  background: rgba(78, 90, 106, 0.6);
  color: #fff;
  font-size: 1.35em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.notspelare-noter__ov-c.notspelare-noter__ov-play {
  width: 68px; height: 68px;
  font-size: 1.9em;
}
.notspelare-noter__hopp {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(10, 14, 20, 0.7);
  color: #fff;
  border-radius: 20px;
  padding: 8px 14px;
  font: 600 14px -apple-system, sans-serif;
  pointer-events: none;
}

.notspelare-noter__loopbtn.is-on { color: #7fd0ff; }
.notspelare-noter__looplayer { position: absolute; inset: 0; pointer-events: none; }
.notspelare-noter__looprect {
  position: absolute;
  top: 0; bottom: 0;
  background: rgba(43, 108, 176, 0.14);
  border-left: 2px solid rgba(43, 108, 176, 0.55);
  border-right: 2px solid rgba(43, 108, 176, 0.55);
}
.notspelare-noter__looplabel {
  position: absolute;
  top: 4px; left: 6px;
  font: 600 11px -apple-system, sans-serif;
  color: var(--notspelare-blue);
  background: rgba(255,255,255,0.85);
  border-radius: 8px;
  padding: 1px 7px;
  white-space: nowrap;
}
.notspelare-noter__loophandle {
  position: absolute;
  bottom: 6px;
  transform: translateX(-50%);
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--notspelare-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 700 15px -apple-system, sans-serif;
  pointer-events: auto;
  cursor: ew-resize;
  touch-action: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

.notspelare-noter__ov-b svg { display: block; }
.notspelare-noter__ov-c svg { width: 30px; height: 30px; display: block; }
.notspelare-noter__ov-c.notspelare-noter__ov-play svg { width: 40px; height: 40px; }
.notspelare-noter__ov-ph {
  position: absolute;
  top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--notspelare-blue);
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 0 0 2px #fff;
}
.notspelare-noter__ov-lh {
  position: absolute;
  top: 50%;
  width: 16px; height: 16px;
  box-sizing: border-box;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--notspelare-blue);
  transform: translate(-50%, -50%);
  cursor: ew-resize;
  touch-action: none;
  z-index: 1;
}
.notspelare-noter__loopbtn.is-on svg { color: #7fd0ff; }

.notspelare-noter__settings {
  position: absolute;
  right: 10px;
  top: 54px;
  z-index: 4;
  background: rgba(10, 14, 20, 0.95);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(320px, calc(100% - 20px));
}
.notspelare-noter__settings .notspelare-noter__sync { margin-right: 0; }
.notspelare-noter__settings .notspelare-noter__sync-val { color: #cfd8e3; }
.notspelare-noter__settings .notspelare-noter__kal { align-self: flex-start; }
.notspelare-noter__settings .notspelare-noter__diag { color: #9fb3c8; margin-top: 0; }

/* ─── Noter: enhetligt färgtema (skrivs sist - vinner kaskaden) ──
   En kulörfamilj: skiffergrå för all krom, popovers = samma ton men
   tätare, EN accentblå för fyllnad/handtag/aktiva lägen. */
.notspelare-noter__shell {
  --kn-bar: rgba(62, 73, 88, 0.62);
  --kn-pop: rgba(47, 56, 68, 0.96);
  --kn-line: rgba(255, 255, 255, 0.92);
  --kn-text: #f2f5f8;
  --kn-dim: #b9c5d1;
  --kn-accent: #5b9bd9;
  --kn-accent-strong: #9cc9f2;
}
.notspelare-noter__ov-top,
.notspelare-noter__ov-bot { background: var(--kn-bar); color: var(--kn-text); }
.notspelare-noter__ov-c { background: var(--kn-bar); }
.notspelare-noter__hopp,
.notspelare-noter__songmenu,
.notspelare-noter__mixer,
.notspelare-noter__settings {
  background: var(--kn-pop);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  color: var(--kn-text);
}
.notspelare-noter__songitem { color: var(--kn-text); }
.notspelare-noter__songitem:hover { background: rgba(255, 255, 255, 0.10); }
.notspelare-noter__songitem.is-current { color: var(--kn-accent-strong); }
.notspelare-noter__ov-time { color: var(--kn-text); }
.notspelare-noter__ov-track::before { background: var(--kn-line); }
.notspelare-noter__ov-fill { background: var(--kn-accent); }
.notspelare-noter__ov-ph { background: var(--kn-accent); box-shadow: 0 0 0 2px #fff; }
.notspelare-noter__ov-lh { border-color: var(--kn-accent); }
.notspelare-noter__loopbtn.is-on,
.notspelare-noter__loopbtn.is-on svg { color: var(--kn-accent-strong); }
.notspelare-noter__looprect {
  background: rgba(91, 155, 217, 0.08);
  border-color: rgba(91, 155, 217, 0.32);
}
.notspelare-noter__looplabel { background: var(--kn-pop); color: var(--kn-text); }
.notspelare-noter__mixval { color: var(--kn-dim); }
.notspelare-noter__mixlabel { color: var(--kn-text); }
/* utfällda paneler (mixer, inställningar, låtmeny): samma något ljusare ton */
.notspelare-noter__mixer,
.notspelare-noter__settings,
.notspelare-noter__songmenu { background: rgba(68, 80, 97, 0.94); }
.notspelare-noter__settings input[type="range"] { accent-color: var(--kn-accent); }
/* settings-panelen: mörk-tema för kontrollerna som flyttade in från footen */
.notspelare-noter__settings .notspelare-noter__kal,
.notspelare-noter__settings .notspelare-noter__sync-btn {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--kn-text);
}
.notspelare-noter__settings .notspelare-noter__kal:hover,
.notspelare-noter__settings .notspelare-noter__sync-btn:hover { background: rgba(255, 255, 255, 0.18); }
.notspelare-noter__settings .notspelare-noter__sync-val { color: var(--kn-text); }
.notspelare-noter__settings .notspelare-noter__diag { color: var(--kn-dim); }

/* Volymikonen: i huvudmixern är den dämpad (opacity 0.4), men som pill-ikon i
   overlayn ska den lysa lika starkt som gear/loop/helskärm och bära temafärgen. */
.notspelare-noter__ov .notspelare-vol-icon,
.notspelare-noter__mixbtn .notspelare-vol-icon { color: var(--kn-text); opacity: 1; margin: 0; display: block; }
.notspelare-noter__mixbtn.is-on,
.notspelare-noter__mixbtn.is-on .notspelare-vol-icon { color: var(--kn-accent-strong); }
.notspelare-noter__setbtn.is-on { color: var(--kn-accent-strong); }

/* Notspelarens kontroller är pekytor - ingen fokusram (varken webbläsarens
   eller temats): topbar-pills, center-knappar, reglage, menyer, setup. */
.notspelare-noter button:focus,
.notspelare-noter button:focus-visible,
.notspelare-noter input[type="range"]:focus,
.notspelare-noter input[type="range"]:focus-visible,
.notspelare-noter input[type="checkbox"]:focus,
.notspelare-noter input[type="checkbox"]:focus-visible {
  outline: none;
  box-shadow: none;
}

/* ─── Pansar mot temats formulärstyling ─────────────────────────────────────
   WP-teman stylar ofta input[type=range] globalt (width: 100%, appearance,
   outline) med samma specificitet som våra regler — på sajten blev mixerns
   reglage 22 px korta (100 % av slotens bredd) med temats fokusrutor.
   Reglagens geometri är layoutbärande (roterade i fasta slots) och får
   ALDRIG röras av temat. */
.notspelare-noter__mixslot input[type="range"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  width: 125px !important;
  height: 3px !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}
.notspelare-noter__mixcol--tempo .notspelare-noter__mixslot input[type="range"] {
  width: 108px !important;
}

/* ─── Bare-läge: notspelaren är hela UI:t. Gamla kontrollerna göms men
   DOM:en finns kvar som motor (api:et styr dem programmatiskt). ─── */
.notspelare--bare > .notspelare__header,
.notspelare--bare > .notspelare__transport,
.notspelare--bare > .notspelare-progress-wrap,
.notspelare--bare > .notspelare__voices,
.notspelare--bare > .notspelare-tempo-row,
.notspelare--bare > .notspelare__footer,
.notspelare--bare > .notspelare-setup { display: none !important; }
/* säkring: skulle gamla is-setup ändå slå på får den inte gömma notvyn */
.notspelare--bare.is-setup > .notspelare-noter { display: block !important; }
/* notvyn är alltid utfälld i bare-läge → Noter-expandern behövs inte */
.notspelare--bare .notspelare-noter__toggle { display: none !important; }
/* Konsekventa hörn: hela den strukturella kedjan (yttre ramen + scenen) är
   rak — overlay-listerna är fyrkantiga, så rundade scen-hörn såg olika ut
   beroende på om kontrollerna var synliga. Flytande paneler behåller radie. */
.notspelare--bare { border-radius: 0; }
.notspelare--bare .notspelare-noter__stage { border-radius: 0; }

/* statusmeddelanden ("Laddar…", "Exporterar…", fel) speglade in i notvyn */
.notspelare-noter__flash {
  position: absolute;
  top: 50px; left: 50%; transform: translateX(-50%);
  z-index: 6;
  background: var(--kn-pop); color: var(--kn-text);
  border-radius: 999px; padding: 5px 14px;
  font-size: 0.85em; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

/* ─── Grundinställning (modal) ─────────────────────────────── */
.notspelare-noter__setbase {
  appearance: none; width: 100%; text-align: left;
  background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--kn-text); border-radius: 8px; padding: 8px 10px; font-size: 0.9em; cursor: pointer;
}
.notspelare-noter__setbase:hover { background: rgba(255, 255, 255, 0.18); }
.notspelare-noter__setup {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow: auto;
  background: rgba(8, 12, 18, 0.62);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.notspelare-noter__setup-card {
  background: var(--kn-pop); color: var(--kn-text);
  border: 1px solid rgba(255, 255, 255, 0.10); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  padding: 18px; max-width: min(440px, 100%); width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.notspelare-noter__setup-title { margin: 0; font-size: 1.1em; font-weight: 700; }
.notspelare-noter__setup-hint { margin: 0; font-size: 0.85em; color: var(--kn-dim); text-align: center; }
.notspelare-noter__setup-voices {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; max-width: 300px;
}
.notspelare-noter__setup-vb {
  appearance: none; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06); color: var(--kn-text);
  border-radius: 10px; padding: 10px 0; font-size: 0.95em; font-weight: 600; cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.notspelare-noter__setup-vb:hover { background: rgba(255, 255, 255, 0.12); }
.notspelare-noter__setup-vb.is-selected { background: var(--kn-accent); border-color: transparent; color: #06243b; }
.notspelare-noter__setup-mix { display: flex; gap: 2px; justify-content: center; max-width: 100%; overflow-x: auto; padding-top: 4px; }
.notspelare-noter__setup-actions { display: flex; gap: 10px; width: 100%; justify-content: flex-end; margin-top: 4px; }
.notspelare-noter__setup-save, .notspelare-noter__setup-cancel {
  appearance: none; border-radius: 9px; padding: 9px 16px; font-size: 0.95em; font-weight: 600; cursor: pointer; border: 1px solid transparent;
}
.notspelare-noter__setup-save { background: var(--kn-accent); color: #06243b; }
.notspelare-noter__setup-cancel { background: transparent; border-color: rgba(255, 255, 255, 0.22); color: var(--kn-text); }
