/* ═══════════════════════════════════════════════════
   Gellden Soundboard – Frontend Player
   Alle farver er CSS-variabler sat fra WordPress-admin.
   Standardværdier her er kun fallbacks.
═══════════════════════════════════════════════════ */

/* Fallback variable defaults (overrides come from player.php inline style) */
.gsb-player {
  --gsb-bg:       #1a1714;
  --gsb-surface:  #252018;
  --gsb-border:   #3d3020;
  --gsb-text:     #f0ece0;
  --gsb-muted:    #b8a888;
  --gsb-accent:   #e8b84a;
  --gsb-radius:   8px;
  --gsb-radius-sm:5px;
  --scene-color:  #e8b84a;

  /* Hardcoded fallbacks for browsers without color-mix() (Chrome < 111, Firefox < 113) */
  --gsb-accent-dim:   #9a7a20;
  --gsb-accent-faint: rgba(232, 184, 74, 0.18);
  --gsb-surface2:     #1e1b12;
}

/* Override with color-mix() for browsers that support it (Chrome 111+, Firefox 113+, Edge 111+) */
@supports (color: color-mix(in srgb, red 50%, blue)) {
  .gsb-player {
    --gsb-accent-dim:   color-mix(in srgb, var(--gsb-accent) 60%, #000);
    --gsb-accent-faint: color-mix(in srgb, var(--gsb-accent) 18%, transparent);
    --gsb-surface2:     color-mix(in srgb, var(--gsb-surface) 80%, var(--gsb-bg));
  }
}

/* ── Reset ── */
.gsb-player *, .gsb-player *::before, .gsb-player *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}

.gsb-player {
  position: relative;
  /* Font inherited from Breakdance/site theme */
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: var(--gsb-text);
  background: var(--gsb-bg);
  border: 2px solid var(--gsb-border);
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
}

/* ── Background layer ── */
.gsb-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.gsb-bg-overlay {
  position: absolute; inset: 0; z-index: 2;
  /* Strong at top (header/controls), medium in middle, strong at bottom (content) */
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,0.75) 0%,
      rgba(0,0,0,0.55) 25%,
      rgba(0,0,0,0.35) 55%,
      rgba(0,0,0,0.80) 100%
    );
}
.gsb-bg-video, .gsb-bg-image {
  position: absolute; inset: 0; width: 100%; height: 100% !important;
  object-fit: cover; z-index: 1; transition: opacity .6s;
}

/* ── Header ── */
.gsb-header {
  position: relative; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.gsb-logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--gsb-accent);
  display: flex; align-items: center; gap: 10px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.gsb-logo-icon { width: 24px; height: 24px; stroke: var(--gsb-accent); flex-shrink: 0; }
.gsb-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.gsb-icon-btn {
  background: var(--gsb-surface);
  border: 2px solid var(--gsb-border);
  color: var(--gsb-muted);
  width: 44px; height: 44px;
  border-radius: var(--gsb-radius-sm);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gsb-icon-btn:active { transform: scale(0.94); }
.gsb-icon-btn svg { width: 20px; height: 20px; }
.gsb-icon-btn iconify-icon { font-size: 20px; display: inline-flex; align-items: center; justify-content: center; }
.gsb-icon-btn:hover,
.gsb-icon-btn:focus-visible { border-color: var(--gsb-accent); color: var(--gsb-accent); background: var(--gsb-accent-faint); outline: none; }

/* ── Scene strip ── */
.gsb-scene-strip {
  position: relative; z-index: 10;
  display: flex; gap: 8px;
  padding: 14px 20px;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gsb-border) transparent;
  cursor: grab;
  user-select: none;
}
.gsb-scene-strip::-webkit-scrollbar { height: 4px; }
.gsb-scene-strip::-webkit-scrollbar-thumb { background: var(--gsb-border); border-radius: 2px; }
.gsb-strip-dragging { cursor: grabbing !important; }

.gsb-scene-btn {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: var(--gsb-surface);
  border: 2px solid var(--gsb-border);
  color: var(--gsb-muted);
  padding: 12px 16px;
  border-radius: var(--gsb-radius);
  cursor: pointer; transition: all .15s;
  min-width: 82px;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gsb-scene-btn:active { transform: scale(0.96); }
.gsb-scene-btn:hover, .gsb-scene-btn:focus-visible {
  background: var(--gsb-surface2); border-color: var(--gsb-muted);
  color: var(--gsb-text); outline: none;
}
.gsb-scene-btn.active {
  background: var(--gsb-surface2);
  border-color: var(--sc, var(--gsb-accent));
  color: var(--sc, var(--gsb-accent));
  box-shadow: 0 0 0 1px var(--sc, var(--gsb-accent));
}
.gsb-scene-btn-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.gsb-scene-btn-icon svg { width: 32px; height: 32px; }
/* Scene name: 14px min for readability, comfortable weight */
.gsb-scene-btn-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  line-height: 1.3;
}

/* ── Now playing ── */
.gsb-now-playing {
  position: relative; z-index: 10;
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px 16px;
}
.gsb-scene-icon-xl {
  width: 64px; height: 64px; flex-shrink: 0;
  background: var(--gsb-surface);
  border: 2px solid var(--gsb-border);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--scene-color, var(--gsb-accent));
  transition: color .3s, border-color .3s;
}
.gsb-scene-icon-xl svg { width: 36px; height: 36px; stroke: var(--scene-color, var(--gsb-accent)); transition: stroke .3s; }
.gsb-np-info { flex: 1; min-width: 0; }

/* Title – large and clearly readable */
.gsb-np-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--gsb-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.gsb-np-scene {
  font-size: 14px;
  font-weight: 500;
  color: var(--gsb-muted);
  margin-top: 4px;
}
.gsb-np-badge {
  font-size: 13px; font-weight: 600;
  color: var(--gsb-accent);
  background: var(--gsb-accent-faint);
  border: 2px solid var(--gsb-accent-dim);
  padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}

/* ── Transport ── */
.gsb-transport {
  position: relative; z-index: 10;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 24px 14px;
  flex-wrap: wrap;
}
.gsb-ctrl-btn {
  background: var(--gsb-surface);
  border: 2px solid var(--gsb-border);
  color: var(--gsb-muted);
  width: 48px; height: 48px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s; flex-shrink: 0; font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gsb-ctrl-btn:active { transform: scale(0.94); }
.gsb-ctrl-btn svg { width: 22px; height: 22px; }
.gsb-ctrl-btn:hover, .gsb-ctrl-btn:focus-visible {
  background: var(--gsb-surface2); border-color: var(--gsb-muted); color: var(--gsb-text); outline: none;
}

/* Prominent play button */
.gsb-play-btn {
  width: 60px; height: 60px;
  background: var(--gsb-accent); border-color: var(--gsb-accent); color: #000;
}
.gsb-play-btn svg { width: 26px; height: 26px; }
.gsb-play-btn:hover, .gsb-play-btn:focus-visible {
  filter: brightness(1.15); color: #000;
}

.gsb-toggle-btn.active {
  background: var(--gsb-accent-faint); border-color: var(--gsb-accent); color: var(--gsb-accent);
}

/* Volume */
.gsb-vol-group {
  display: flex; align-items: center; gap: 8px; margin-left: 8px;
  position: relative;
  z-index: 11;
  flex: 1 1 190px;      /* four channels wrap gracefully instead of squeezing */
  min-width: 150px;
}
.gsb-vol-group .gsb-slider { flex: 1; min-width: 60px; }
.gsb-vol-label-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--gsb-muted);
  white-space: nowrap;
  letter-spacing: 0;
}
/* Classic line-with-knob slider */
.gsb-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  width: 100px;
  background: var(--gsb-surface2);
  border: 1px solid var(--gsb-border);
  border-radius: 3px;
  cursor: pointer;
  outline: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 11;
  /* Ensure the input itself catches all pointer events */
  pointer-events: auto;
  touch-action: none;
}
.gsb-slider::-webkit-slider-runnable-track {
  height: 6px;
  background: transparent;
  border: none;
}
.gsb-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--gsb-accent);
  border: 2px solid var(--gsb-bg);
  cursor: pointer;
  box-shadow: 0 0 6px rgba(232,184,74,0.5);
  margin-top: -7px;  /* centers thumb vertically on track */
}
.gsb-slider::-moz-range-track {
  height: 6px;
  background: transparent;
  border: none;
}
.gsb-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gsb-bg);
  border-radius: 50%;
  background: var(--gsb-accent);
  cursor: pointer;
}
.gsb-slider:focus-visible { outline: 2px solid var(--gsb-accent); outline-offset: 3px; }
.gsb-vol-output {
  font-size: 13px; font-weight: 600; color: var(--gsb-muted);
  min-width: 36px; font-variant-numeric: tabular-nums;
  cursor: pointer;
  user-select: none;
  padding: 4px 6px;
  border-radius: 4px;
  transition: background .15s;
}
.gsb-vol-output:hover { background: var(--gsb-surface); color: var(--gsb-text); }

/* ── Embed ── */
.gsb-embed-wrap {
  position: relative; z-index: 10;
  margin: 12px 20px;
  border: 2px solid var(--gsb-border); border-radius: var(--gsb-radius); overflow: hidden;
}
.gsb-embed-wrap iframe { display: block; width: 100%; height: 260px; border: none; }

/* ── Content columns ── */
.gsb-content {
  position: relative; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
}
.gsb-col { padding: 18px 20px; }
.gsb-col:last-child { }

/* Voices column spans all 3 columns at the bottom */
.gsb-col-voices-full {
  grid-column: 1 / -1;
}

/* Column heading – clean and clear */
.gsb-col-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gsb-accent);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gsb-border);
  line-height: 1.3;
}

/* ── Playlist ── */
.gsb-playlist { display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.gsb-song-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px; border-radius: var(--gsb-radius-sm);
  border: 1px solid transparent; cursor: pointer; transition: background .15s, border-color .15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}
.gsb-song-row:hover { background: var(--gsb-surface); }
.gsb-song-row:active { background: var(--gsb-surface2); transform: scale(0.99); }
.gsb-song-row.active {
  background: var(--gsb-accent-faint);
  border-color: var(--gsb-accent-dim);
  border-left: 3px solid var(--gsb-accent);
  padding-left: 7px;
}
.gsb-song-row.now-playing {
  background: var(--gsb-accent-faint);
  border-color: var(--gsb-accent);
  box-shadow: 0 0 12px rgba(232,184,74,0.3);
}

/* State icon (replaces src icon during playback) */
.gsb-song-state-icon {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--gsb-muted);
}
.gsb-song-row.now-playing .gsb-song-state-icon { color: var(--gsb-accent); }
.gsb-song-state-icon svg { width: 16px; height: 16px; }

/* Equalizer bars animation */
.gsb-equalizer {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 16px;
}
.gsb-equalizer span {
  display: block;
  width: 3px;
  background: var(--gsb-accent);
  border-radius: 1px;
  animation: gsb-eq 1s ease-in-out infinite;
}
.gsb-equalizer span:nth-child(1) { animation-delay: 0s;    height: 8px;  }
.gsb-equalizer span:nth-child(2) { animation-delay: 0.2s;  height: 14px; }
.gsb-equalizer span:nth-child(3) { animation-delay: 0.4s;  height: 10px; }
@keyframes gsb-eq {
  0%, 100% { transform: scaleY(0.4); }
  50%      { transform: scaleY(1); }
}
/* Readable song number */
.gsb-song-num   { font-size: 13px; font-weight: 600; color: var(--gsb-muted); min-width: 20px; text-align: right; flex-shrink: 0; }
/* Song title – 15px readable */
.gsb-song-title { flex: 1; font-size: 15px; font-weight: 500; color: var(--gsb-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.005em; }
.gsb-song-row.now-playing .gsb-song-title { color: var(--gsb-accent); font-weight: 600; }

/* Visual play indicator at row end */
.gsb-song-play {
  color: var(--gsb-muted);
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity .15s, color .15s;
}
.gsb-song-row:hover .gsb-song-play { opacity: 1; }
.gsb-song-row.now-playing .gsb-song-play,
.gsb-song-row.active .gsb-song-play { opacity: 1; color: var(--gsb-accent); }
.gsb-song-play svg { width: 18px; height: 18px; }

/* ── Ambient ── */
.gsb-ambient-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--gsb-border) transparent;
  -webkit-overflow-scrolling: touch;
}
.gsb-ambient-list::-webkit-scrollbar { width: 6px; }
.gsb-ambient-list::-webkit-scrollbar-track { background: transparent; }
.gsb-ambient-list::-webkit-scrollbar-thumb { background: var(--gsb-border); border-radius: 3px; }
.gsb-ambient-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px;
  background: var(--gsb-surface); border: 1px solid var(--gsb-border); border-radius: var(--gsb-radius-sm);
  transition: all .15s;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 48px;
}
.gsb-ambient-row:hover  { border-color: var(--gsb-muted); }
.gsb-ambient-row:active { transform: scale(0.99); }
.gsb-ambient-row.active {
  background: var(--gsb-accent-faint);
  border-color: var(--gsb-accent);
  box-shadow: 0 0 10px rgba(232,184,74,0.25);
}
.gsb-ambient-dot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--gsb-muted); transition: all .2s;
}
.gsb-ambient-dot.on {
  background: var(--gsb-accent); border-color: var(--gsb-accent);
  animation: gsb-pulse 2s ease-in-out infinite;
}
@keyframes gsb-pulse {
  0%,100% { box-shadow: 0 0 4px var(--gsb-accent); }
  50%      { box-shadow: 0 0 14px var(--gsb-accent); }
}
.gsb-ambient-title {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px; font-weight: 500;
  color: var(--gsb-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.gsb-ambient-row.active .gsb-ambient-title { color: var(--gsb-accent); font-weight: 600; }
.gsb-ambient-toggle {
  font-size: 12px; font-weight: 700; letter-spacing: .05em;
  background: var(--gsb-surface2); border: 2px solid var(--gsb-border); color: var(--gsb-muted);
  padding: 6px 14px; border-radius: 20px; transition: all .15s;
  min-width: 54px; text-align: center; font-family: inherit;
  pointer-events: none;
}
.gsb-ambient-toggle.on  { background: var(--gsb-accent); border-color: var(--gsb-accent); color: #000; }

/* ── SFX ── */
.gsb-sfx-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; }
.gsb-sfx-btn {
  position: relative;
  background: var(--gsb-surface); border: 2px solid var(--gsb-border); color: var(--gsb-muted);
  padding: 14px 10px; border-radius: var(--gsb-radius-sm);
  cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: all .15s; font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 56px;
  overflow: hidden;
}
.gsb-sfx-btn:hover, .gsb-sfx-btn:focus-visible { background: var(--gsb-surface2); border-color: var(--gsb-muted); color: var(--gsb-text); outline: none; }
.gsb-sfx-btn:active { transform: scale(0.95); }
.gsb-sfx-btn.flash {
  background: var(--gsb-accent-faint);
  border-color: var(--gsb-accent);
  color: var(--gsb-accent);
}
.gsb-sfx-btn.playing {
  background: var(--gsb-accent-faint);
  border-color: var(--gsb-accent);
  color: var(--gsb-accent);
  box-shadow: 0 0 12px rgba(232,184,74,0.3);
}
.gsb-sfx-btn-icon  { font-size: 1.5rem; line-height: 1; }
.gsb-sfx-btn-label {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
  color: var(--gsb-text);
  letter-spacing: 0;
}
.gsb-sfx-btn.playing .gsb-sfx-btn-label { color: var(--gsb-accent); }

/* Pulse ring on play */
.gsb-sfx-pulse {
  position: absolute;
  inset: 0;
  border-radius: var(--gsb-radius-sm);
  border: 2px solid var(--gsb-accent);
  opacity: 0;
  pointer-events: none;
}
.gsb-sfx-btn.flash .gsb-sfx-pulse {
  animation: gsb-sfx-pulse-anim 0.4s ease-out;
}
@keyframes gsb-sfx-pulse-anim {
  0%   { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.15); }
}

/* Column count badges */
.gsb-col-count {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gsb-accent);
  background: var(--gsb-accent-faint);
  border: 1px solid var(--gsb-accent-dim);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}
.gsb-col-count.active {
  animation: gsb-count-pulse 2s ease-in-out infinite;
}
@keyframes gsb-count-pulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* Column title now flex for count badge */
.gsb-col-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gsb-col-title > span:first-child { flex-shrink: 0; }

/* ── Empty state ── */
.gsb-empty {
  font-size: .9rem; color: var(--gsb-muted);
  text-align: center; padding: 18px 8px; line-height: 1.6;
  border: 1px dashed var(--gsb-border); border-radius: var(--gsb-radius-sm);
}

/* ── Drama blackout ── */
.gsb-blackout { position: absolute; inset: 0; background: #000; opacity: 0; z-index: 50; pointer-events: none; transition: opacity 3s ease; }
.gsb-blackout.active { opacity: 1; }

/* ── Fullscreen ── */
.gsb-player.gsb-is-fullscreen {
  position: fixed !important; inset: 0 !important; z-index: 99999 !important;
  border-radius: 0 !important; width: 100vw !important; height: 100vh !important; overflow-y: auto;
}

/* ── Focus ring – visible for all interactive elements ── */
.gsb-player :focus-visible { outline: 3px solid var(--gsb-accent); outline-offset: 2px; }

/* Custom uploaded icon (img) inside scene buttons */
.gsb-custom-icon {
  width: 100%;
  height: 100%;
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
  display: block;
}
.gsb-scene-icon-xl .gsb-custom-icon {
  max-width: 40px;
  max-height: 40px;
}

/* ── Responsive breakpoints (Breakdance-aligned) ── */
/* Tablet landscape ─ 1024px and below */
@media (max-width: 1024px) {
  .gsb-header        { padding: 16px 20px; }
  .gsb-now-playing   { padding: 18px 20px 14px; gap: 14px; }
  .gsb-transport     { padding: 12px 20px; }
  .gsb-col           { padding: 16px 18px; }
  .gsb-vol-group     { gap: 6px; }
  .gsb-slider        { width: 80px; }
}

/* Tablet portrait ─ 767px and below: stack columns */
@media (max-width: 767px) {
  .gsb-content { grid-template-columns: 1fr; }
  .gsb-col {
    border-right: none;
    border-bottom: 2px solid var(--gsb-border);
  }
  .gsb-col:last-child { border-bottom: none; }

  .gsb-vol-group { flex: 1 1 100%; margin-left: 0; }
  .gsb-slider    { flex: 1; width: auto; min-width: 100px; }
  .gsb-transport { gap: 8px; row-gap: 10px; }
  .gsb-np-title  { font-size: 16px; }
  .gsb-np-scene  { font-size: 13px; }
}

/* Phone ─ 479px and below: compact mode */
@media (max-width: 479px) {
  .gsb-header        { padding: 14px 14px; }
  .gsb-logo          { font-size: 1rem; }
  .gsb-now-playing   { padding: 14px 14px 12px; gap: 12px; }
  .gsb-scene-icon-xl { width: 52px; height: 52px; }
  .gsb-scene-icon-xl svg { width: 28px; height: 28px; }
  .gsb-transport     { padding: 10px 14px; }
  .gsb-scene-strip   { padding: 10px 12px; gap: 6px; }
  .gsb-scene-btn     { min-width: 70px; padding: 10px 10px; }
  .gsb-scene-btn-icon svg { width: 28px; height: 28px; }
  .gsb-col           { padding: 14px 14px; }
  .gsb-sfx-grid      { grid-template-columns: repeat(3, 1fr); }
  .gsb-ctrl-btn      { width: 44px; height: 44px; }
  .gsb-play-btn      { width: 54px; height: 54px; }
}

/* ═══════════════════════════════════════════════
   NEW FEATURES – v1.2
═══════════════════════════════════════════════ */

/* ── Search ── */
.gsb-search-wrap {
  position: relative;
  margin-bottom: 10px;
}
.gsb-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--gsb-muted);
  pointer-events: none;
}
.gsb-search-input {
  width: 100%;
  background: var(--gsb-surface);
  border: 1px solid var(--gsb-border);
  color: var(--gsb-text);
  padding: 8px 10px 8px 32px;
  border-radius: var(--gsb-radius-sm);
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.gsb-search-input:focus {
  border-color: var(--gsb-accent);
}
.gsb-search-input::placeholder { color: var(--gsb-muted); opacity: 0.7; }

/* ── Column hint ── */
.gsb-col-hint {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--gsb-muted);
  margin-left: 6px;
  font-style: italic;
}

/* ── Progress bar ── */
.gsb-progress-row {
  position: relative; z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px 14px;
}
.gsb-progress-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--gsb-muted);
  font-variant-numeric: tabular-nums;
  min-width: 38px;
}
.gsb-progress {
  flex: 1;
  height: 6px;
  background: var(--gsb-surface2);
  border: 1px solid var(--gsb-border);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}
.gsb-progress-bar {
  height: 100%;
  background: var(--gsb-accent);
  border-radius: 3px;
  width: 0;
  transition: width 0.1s linear;
}
.gsb-progress-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: var(--gsb-accent);
  border: 2px solid var(--gsb-bg);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 6px rgba(232,184,74,0.5);
}
.gsb-progress:focus-visible { outline: 2px solid var(--gsb-accent); outline-offset: 2px; }

/* ── Random button flash ── */
.gsb-flash {
  animation: gsb-flash-anim 0.4s;
}
@keyframes gsb-flash-anim {
  0%   { transform: rotate(0deg);   background: var(--gsb-accent-faint); }
  50%  { transform: rotate(180deg); background: var(--gsb-accent); }
  100% { transform: rotate(360deg); }
}

/* ── Modals ── */
.gsb-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 100000;
  align-items: center;
  justify-content: center;
}
.gsb-modal-box {
  background: var(--gsb-bg);
  border: 2px solid var(--gsb-accent);
  border-radius: 10px;
  width: 540px;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  font-family: inherit;
  color: var(--gsb-text);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.gsb-modal-narrow { width: 360px; }
.gsb-modal-head {
  padding: 16px 20px;
  border-bottom: 2px solid var(--gsb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.gsb-modal-head h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gsb-accent);
  margin: 0;
}
.gsb-modal-x {
  background: none;
  border: none;
  color: var(--gsb-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: inherit;
}
.gsb-modal-x:hover { color: var(--gsb-text); background: var(--gsb-surface); }
.gsb-modal-body { padding: 18px 20px; overflow-y: auto; flex: 1; font-size: 14px; line-height: 1.5; }
.gsb-modal-foot {
  padding: 12px 20px;
  border-top: 2px solid var(--gsb-border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* Modal buttons */
.gsb-btn {
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  border: 2px solid transparent;
}
.gsb-btn-primary   { background: var(--gsb-accent); color: #000; border-color: var(--gsb-accent); }
.gsb-btn-primary:hover { filter: brightness(1.15); }
.gsb-btn-secondary { background: var(--gsb-surface); color: var(--gsb-text); border-color: var(--gsb-border); }
.gsb-btn-secondary:hover { border-color: var(--gsb-muted); }

/* ── Note modal ── */
.gsb-modal-help    { color: var(--gsb-muted); margin-bottom: 12px; font-size: 13px; }
.gsb-field-label   { display: block; font-size: 13px; font-weight: 600; color: var(--gsb-muted); margin: 10px 0 5px; }
.gsb-input, .gsb-textarea {
  width: 100%;
  background: var(--gsb-surface);
  border: 2px solid var(--gsb-border);
  color: var(--gsb-text);
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}
.gsb-textarea { resize: vertical; min-height: 100px; }
.gsb-input:focus, .gsb-textarea:focus { border-color: var(--gsb-accent); }
.gsb-note-counter  { font-size: 12px; color: var(--gsb-muted); text-align: right; margin-top: 4px; }
.gsb-note-status   { font-size: 13px; margin-top: 8px; min-height: 18px; }
.gsb-note-status.success { color: #4ade80; }
.gsb-note-status.error   { color: #f87171; }

/* ── QR modal ── */
.gsb-qr-img       { margin: 16px auto; padding: 12px; background: #fff; display: inline-block; border-radius: 8px; }
.gsb-qr-img img   { display: block; }
.gsb-qr-url       { font-size: 12px; color: var(--gsb-muted); word-break: break-all; margin-top: 12px; font-family: monospace; }

/* ── Hotkey table ── */
.gsb-hotkey-table { width: 100%; border-collapse: collapse; }
.gsb-hotkey-table td {
  padding: 8px 4px;
  font-size: 14px;
  border-bottom: 1px solid var(--gsb-border);
}
.gsb-hotkey-table td:first-child { width: 140px; }
.gsb-hotkey-table kbd {
  display: inline-block;
  padding: 3px 8px;
  background: var(--gsb-surface);
  border: 1px solid var(--gsb-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--gsb-text);
  margin-right: 4px;
}

/* ── Mobile modal adjustments ── */
@media (max-width: 479px) {
  .gsb-modal-box { width: 95vw; max-height: 88vh; }
  .gsb-modal-head h3 { font-size: 15px; }
  .gsb-progress-row { padding: 0 14px 12px; gap: 8px; }
  .gsb-progress-time { font-size: 11px; min-width: 32px; }
}

/* ── Scene "playing" indicator (when scene has currently-playing song) ── */
.gsb-scene-btn.playing {
  position: relative;
}
.gsb-scene-btn.playing::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gsb-accent);
  box-shadow: 0 0 8px var(--gsb-accent);
  animation: gsb-pulse 2s ease-in-out infinite;
}

/* "Spiller fra" hint in now-playing area */
.gsb-np-playing-from {
  font-size: 12px;
  color: var(--gsb-accent);
  font-style: italic;
  margin-left: 4px;
}

/* ── Iconify icons sizing ── */
.gsb-scene-btn-icon iconify-icon {
  font-size: 32px;
  width: 32px;
  height: 32px;
  color: var(--sc, var(--gsb-accent));
  display: block;
}
.gsb-scene-icon-xl iconify-icon {
  font-size: 40px;
  width: 40px;
  height: 40px;
  color: var(--scene-color, var(--gsb-accent));
  display: block;
}

/* Mobile sizing */
@media (max-width: 479px) {
  .gsb-scene-btn-icon iconify-icon {
    font-size: 28px;
    width: 28px;
    height: 28px;
  }
}

/* ─── Info popup ─── */
.gsb-info-row {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.5;
}
.gsb-info-row strong {
  color: var(--gsb-muted);
  font-weight: 600;
  margin-right: 8px;
}
.gsb-info-loading {
  color: var(--gsb-muted);
  font-style: italic;
}
.gsb-info-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.gsb-info-btn {
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  background: var(--gsb-accent);
  color: #000;
  border: none;
}
.gsb-info-btn:hover { filter: brightness(1.15); }

/* ─── Iconify icons in transport buttons ─── */
.gsb-ctrl-btn iconify-icon {
  font-size: 22px;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
}
.gsb-play-btn iconify-icon {
  font-size: 26px;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.gsb-song-play iconify-icon {
  font-size: 16px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ─── Header mobile wrap ─── */
@media (max-width: 600px) {
  .gsb-header {
    padding: 14px 16px;
    gap: 10px;
  }
  .gsb-header-actions {
    width: 100%;
    justify-content: center;
    gap: 6px;
  }
  .gsb-icon-btn {
    width: 40px;
    height: 40px;
  }
  .gsb-icon-btn iconify-icon {
    font-size: 18px;
  }
}

/* On very small screens, allow header icons to wrap to 2 rows nicely */
@media (max-width: 380px) {
  .gsb-header-actions {
    flex-wrap: wrap;
  }
  .gsb-icon-btn {
    width: 38px;
    height: 38px;
  }
}

/* Visual nudge: FA play triangle leans right - center it optically */
.gsb-play-btn .gsb-icon-play {
  transform: translateX(1px);
}

/* Ensure transport buttons use proper flex centering */
.gsb-ctrl-btn,
.gsb-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ═════════════════════════════════════════════════
   BACKGROUND CROSSFADE LAYERS
═════════════════════════════════════════════════ */
.gsb-bg-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.gsb-bg-layer.visible { opacity: 1; }

/* Video overlay — sits on top of both bg layers, under the gradient overlay */
.gsb-bg-overlay-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  pointer-events: none;
  mix-blend-mode: screen;  /* makes black transparent — perfect for particle/rain .webm */
}

.gsb-bg-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;  /* above overlay video */
  background: linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}

/* ═════════════════════════════════════════════════
   WAKE LOCK BUTTON
═════════════════════════════════════════════════ */
#gsb-wakelock-btn.active {
  background: var(--gsb-accent-faint);
  border-color: var(--gsb-accent);
  color: var(--gsb-accent);
  box-shadow: 0 0 12px rgba(232,184,74,0.35);
}
#gsb-wakelock-btn.active iconify-icon {
  animation: gsb-glow 2.5s ease-in-out infinite;
}
@keyframes gsb-glow {
  0%, 100% { filter: drop-shadow(0 0 2px var(--gsb-accent)); }
  50%      { filter: drop-shadow(0 0 8px var(--gsb-accent)); }
}

/* ═════════════════════════════════════════════════
   INITIATIVE TRACKER
═════════════════════════════════════════════════ */
.gsb-init-modal-box {
  width: 720px;
  max-width: 95vw;
}

.gsb-init-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 2px solid var(--gsb-border);
  flex-wrap: wrap;
  background: var(--gsb-surface);
}
.gsb-init-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--gsb-surface2);
  border: 2px solid var(--gsb-border);
  color: var(--gsb-text);
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gsb-init-btn:hover { border-color: var(--gsb-accent); color: var(--gsb-accent); }
.gsb-init-btn iconify-icon { font-size: 14px; width: 14px; height: 14px; }
.gsb-init-btn-primary  { background: var(--gsb-accent); color: #000; border-color: var(--gsb-accent); }
.gsb-init-btn-primary:hover { filter: brightness(1.15); color: #000; }
.gsb-init-btn-danger:hover { border-color: #d44040; color: #d44040; }

.gsb-init-round {
  margin-left: auto;
  padding: 6px 14px;
  background: var(--gsb-accent-faint);
  border: 2px solid var(--gsb-accent-dim);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gsb-accent);
  white-space: nowrap;
}

.gsb-init-list {
  max-height: 60vh;
  overflow-y: auto;
  padding: 12px 16px;
}
.gsb-init-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--gsb-muted);
  font-style: italic;
}

.gsb-init-row {
  display: grid;
  grid-template-columns: auto 60px 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--gsb-surface2);
  border: 2px solid var(--gsb-border);
  border-radius: 8px;
  margin-bottom: 6px;
  transition: all .15s;
  position: relative;
}
.gsb-init-row.current {
  background: var(--gsb-accent-faint);
  border-color: var(--gsb-accent);
  box-shadow: 0 0 12px rgba(232,184,74,0.3);
}
.gsb-init-row.current::before {
  content: '►';
  position: absolute;
  left: -16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gsb-accent);
  font-size: 16px;
  animation: gsb-arrow-bounce 1s ease-in-out infinite;
}
@keyframes gsb-arrow-bounce {
  0%, 100% { transform: translate(0, -50%); }
  50%      { transform: translate(4px, -50%); }
}
.gsb-init-row.dead {
  opacity: 0.45;
}
.gsb-init-row.dead::after {
  content: '💀';
  position: absolute;
  right: 70px;
  font-size: 20px;
  pointer-events: none;
}
.gsb-init-row.gsb-flash-damage {
  animation: gsb-flash-red 0.4s;
}
.gsb-init-row.gsb-flash-heal {
  animation: gsb-flash-green 0.4s;
}
@keyframes gsb-flash-red {
  0%, 100% { background: var(--gsb-surface2); }
  50%      { background: #d4404033; }
}
@keyframes gsb-flash-green {
  0%, 100% { background: var(--gsb-surface2); }
  50%      { background: #4a9e6033; }
}
.gsb-init-row-ghost { opacity: 0.4; }

.gsb-init-drag {
  background: none;
  border: none;
  color: var(--gsb-muted);
  font-size: 16px;
  cursor: grab;
  padding: 4px 6px;
  font-family: inherit;
}
.gsb-init-drag:active { cursor: grabbing; }

.gsb-init-init-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--gsb-surface);
  border: 2px solid var(--gsb-border);
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
}
.gsb-init-row.current .gsb-init-init-box {
  background: var(--gsb-accent);
  border-color: var(--gsb-accent);
  color: #000;
}
.gsb-init-init-value {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.gsb-init-init-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gsb-muted);
  margin-top: 2px;
}
.gsb-init-row.current .gsb-init-init-label { color: rgba(0,0,0,0.6); }

.gsb-init-name-wrap { min-width: 0; }
.gsb-init-name {
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  color: var(--gsb-text);
  font-size: 15px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 4px;
  font-family: inherit;
}
.gsb-init-name:focus,
.gsb-init-name:hover {
  border-color: var(--gsb-border);
  background: var(--gsb-surface);
  outline: none;
}

.gsb-init-hp-bar {
  height: 6px;
  background: var(--gsb-border);
  border-radius: 3px;
  margin-top: 4px;
  overflow: hidden;
}
.gsb-init-hp-fill {
  height: 100%;
  width: 100%;
  background: #4a9e60;
  border-radius: 3px;
  transition: width .25s, background .25s;
}

.gsb-init-hp-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gsb-init-hp-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--gsb-border);
  background: var(--gsb-surface);
  color: var(--gsb-text);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gsb-init-hp-btn:active { transform: scale(0.92); }
.gsb-init-hp-minus:hover { border-color: #d44040; color: #d44040; }
.gsb-init-hp-plus:hover  { border-color: #4a9e60; color: #4a9e60; }

.gsb-init-hp-display {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gsb-text);
}
.gsb-init-hp-current,
.gsb-init-hp-max {
  width: 42px;
  text-align: center;
  background: var(--gsb-surface);
  border: 1px solid var(--gsb-border);
  color: var(--gsb-text);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
}
.gsb-init-hp-display span { color: var(--gsb-muted); }

.gsb-init-remove {
  background: none;
  border: none;
  color: var(--gsb-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gsb-init-remove:hover { color: #d44040; background: var(--gsb-surface); }
.gsb-init-remove iconify-icon { font-size: 16px; width: 16px; height: 16px; }

/* Mobile responsive tracker */
@media (max-width: 600px) {
  .gsb-init-row {
    grid-template-columns: auto 48px 1fr;
    grid-template-areas:
      "drag init name"
      "drag hp hp"
      "remove remove remove";
    gap: 8px;
  }
  .gsb-init-drag { grid-area: drag; }
  .gsb-init-init-box { grid-area: init; }
  .gsb-init-name-wrap { grid-area: name; }
  .gsb-init-hp-controls { grid-area: hp; justify-content: center; }
  .gsb-init-remove {
    grid-area: remove;
    width: 100%;
    text-align: center;
    padding: 4px;
    background: var(--gsb-surface);
    border-radius: 4px;
  }
  .gsb-init-remove::after { content: ' Fjern'; font-size: 12px; }
  .gsb-init-row.current::before { display: none; }
  .gsb-init-row.dead::after { right: 10px; }
  .gsb-init-toolbar { padding: 10px 14px; gap: 6px; }
  .gsb-init-btn { font-size: 12px; padding: 6px 10px; }
  .gsb-init-round { margin-left: 0; width: 100%; text-align: center; order: 99; }
}

/* ═════════════════════════════════════════════════
   VOICE CUES (frontend)
═════════════════════════════════════════════════ */
.gsb-voice-filter {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  padding: 3px;
  background: var(--gsb-surface);
  border: 1px solid var(--gsb-border);
  border-radius: 6px;
}
.gsb-voice-filter-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--gsb-muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  font-family: inherit;
  transition: all .15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gsb-voice-filter-btn:hover { color: var(--gsb-text); }
.gsb-voice-filter-btn.active {
  background: var(--gsb-accent);
  color: #000;
}

.gsb-voices-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  max-height: 380px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.gsb-voice-card {
  position: relative;
  background: var(--gsb-surface);
  border: 2px solid var(--gsb-border);
  border-radius: 8px;
  padding: 12px 14px;
  transition: all .15s;
  touch-action: manipulation;
}
.gsb-voice-card:hover {
  border-color: var(--gsb-muted);
}
.gsb-voice-card.playing {
  border-color: var(--gsb-accent);
  background: var(--gsb-accent-faint);
  box-shadow: 0 0 12px rgba(232,184,74,0.3);
}
.gsb-voice-card.playing::before {
  content: '';
  position: absolute;
  left: -2px; top: -2px; bottom: -2px;
  width: 4px;
  background: var(--gsb-accent);
  border-radius: 8px 0 0 8px;
  animation: gsb-voice-pulse 1.5s ease-in-out infinite;
}
@keyframes gsb-voice-pulse {
  0%, 100% { opacity: 0.5; }
  50%      { opacity: 1; }
}

.gsb-voice-card-header { margin-bottom: 6px; }
.gsb-voice-card-character {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gsb-accent);
  margin-bottom: 2px;
}
.gsb-voice-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gsb-text);
  margin: 0;
  letter-spacing: -0.005em;
}
.gsb-voice-card-desc {
  font-size: 13px;
  color: var(--gsb-muted);
  line-height: 1.45;
  margin: 0 0 10px;
  font-style: italic;
  /* Limit to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gsb-voice-card-actions {
  display: flex;
  justify-content: flex-end;
}
.gsb-voice-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--gsb-accent);
  color: #000;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  min-height: 36px;
}
.gsb-voice-play-btn:hover { filter: brightness(1.1); transform: scale(1.02); }
.gsb-voice-play-btn:active { transform: scale(0.96); }
.gsb-voice-play-btn iconify-icon {
  font-size: 14px;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gsb-voice-card.playing .gsb-voice-play-btn {
  background: #d44040;
  color: #fff;
}

/* ── "Læser højt"-banner øverst ── */
.gsb-voice-banner {
  position: relative;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  background: linear-gradient(135deg, var(--gsb-accent-faint), var(--gsb-surface));
  border-bottom: 2px solid var(--gsb-accent);
  opacity: 0;
  transition: opacity .4s ease;
}
.gsb-voice-banner.visible { opacity: 1; }

.gsb-voice-banner > iconify-icon {
  font-size: 28px;
  width: 28px;
  height: 28px;
  color: var(--gsb-accent);
  flex-shrink: 0;
  animation: gsb-mic-pulse 1.5s ease-in-out infinite;
}
@keyframes gsb-mic-pulse {
  0%, 100% { transform: scale(1);   filter: drop-shadow(0 0 0 var(--gsb-accent)); }
  50%      { transform: scale(1.1); filter: drop-shadow(0 0 8px var(--gsb-accent)); }
}

.gsb-voice-banner-info {
  flex: 1;
  min-width: 0;
}
.gsb-voice-banner-character {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gsb-accent);
  margin-bottom: 2px;
}
.gsb-voice-banner-character:empty { display: none; }
.gsb-voice-banner-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gsb-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gsb-voice-banner-progress {
  height: 4px;
  margin-top: 6px;
  background: var(--gsb-border);
  border-radius: 2px;
  overflow: hidden;
}
.gsb-voice-banner-fill {
  height: 100%;
  background: var(--gsb-accent);
  width: 0;
  transition: width 0.1s linear;
}

.gsb-voice-banner-stop {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gsb-accent);
  border: none;
  color: #000;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: inherit;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.gsb-voice-banner-stop:hover { filter: brightness(1.1); }
.gsb-voice-banner-stop:active { transform: scale(0.94); }
.gsb-voice-banner-stop iconify-icon { font-size: 16px; width: 16px; height: 16px; }

/* Mobile banner adjustments */
@media (max-width: 600px) {
  .gsb-voice-banner { padding: 10px 14px; gap: 10px; }
  .gsb-voice-banner > iconify-icon { font-size: 22px; width: 22px; height: 22px; }
  .gsb-voice-banner-title { font-size: 14px; }
}

/* ═════════════════════════════════════════════════
   RICH TOOLTIPS
═════════════════════════════════════════════════ */
.gsb-tooltip {
  position: absolute;
  z-index: 200;
  background: rgba(10, 8, 6, 0.97);
  color: var(--gsb-text);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--gsb-border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
  display: none;
  max-width: 260px;
  /* No translateX here — position is set fully by JS */
}
.gsb-tooltip-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gsb-accent);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
}
.gsb-tooltip-desc {
  font-size: 12px;
  color: var(--gsb-muted);
  line-height: 1.5;
  margin-top: 5px;
  white-space: normal;
}
.gsb-tooltip kbd {
  display: inline-block;
  padding: 1px 6px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 3px;
  font-family: ui-monospace, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--gsb-text);
}

/* Ensure the tooltip stays inside the player via JS - no overflow clipping needed */
/* #gsb-player overflow is intentionally visible for fixed children */

/* ── Hide tooltips on touch devices ── */
@media (hover: none) {
  .gsb-tooltip { display: none !important; }
}

/* Wake lock: mobile/touch devices only */
.gsb-mobile-only { display: none; }
@media (hover: none), (pointer: coarse) {
  .gsb-mobile-only { display: inline-flex; }
}

/* Focus trigger: hidden by default, shown only in fullscreen */
.gsb-focus-trigger { display: none; }
.gsb-is-fullscreen .gsb-focus-trigger { display: inline-flex; }

/* More menu: hidden on desktop, shown on touch */
.gsb-more-btn { display: none; }
@media (hover: none), (max-width: 600px) {
  .gsb-more-btn { display: inline-flex; }
}

/* ═════════════════════════════════════════════════
   MOBILE BOTTOM SHEET
═════════════════════════════════════════════════ */
.gsb-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 999999;
  /* Inherit CSS variables from gsb-player even when moved to body */
  --gsb-bg:      #1a1714;
  --gsb-surface: #252018;
  --gsb-border:  #3d3020;
  --gsb-text:    #f0ece0;
  --gsb-muted:   #b8a888;
  --gsb-accent:  #e8b84a;
  --gsb-accent-faint: rgba(232,184,74,0.12);
  background: var(--gsb-bg);
  border-top: 2px solid var(--gsb-border);
  border-radius: 16px 16px 0 0;
  padding: 0 0 env(safe-area-inset-bottom, 16px);
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.22,.68,0,1.2);
  max-height: 80vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.gsb-bottom-sheet.open {
  transform: translateY(0);
}

.gsb-bottom-sheet-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 999998;
  opacity: 0;
  transition: opacity .25s;
}
.gsb-bottom-sheet-bg.open {
  display: block;
  opacity: 1;
}

.gsb-bottom-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--gsb-border);
  border-radius: 2px;
  margin: 12px auto 16px;
}

.gsb-bottom-sheet-list {
  padding: 0 8px 16px;
}

.gsb-sheet-item {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 14px 16px;
  background: transparent;
  border: none;
  border-radius: 10px;
  color: var(--gsb-text);
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: background .12s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.gsb-sheet-item:hover,
.gsb-sheet-item:active {
  background: var(--gsb-surface);
}
.gsb-sheet-item.active {
  color: var(--gsb-accent);
}

.gsb-sheet-item-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gsb-surface);
  border: 1px solid var(--gsb-border);
  border-radius: 10px;
  flex-shrink: 0;
  font-size: 18px;
}
.gsb-sheet-item.active .gsb-sheet-item-icon {
  background: var(--gsb-accent-faint);
  border-color: var(--gsb-accent);
  color: var(--gsb-accent);
}
.gsb-sheet-item-icon iconify-icon {
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gsb-sheet-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gsb-sheet-item-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--gsb-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gsb-sheet-item.active .gsb-sheet-item-label { color: var(--gsb-accent); }
.gsb-sheet-item-desc {
  font-size: 13px;
  color: var(--gsb-muted);
  line-height: 1.4;
  white-space: normal;
}

.gsb-sheet-shortcut {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  background: var(--gsb-surface);
  border: 1px solid var(--gsb-border);
  border-radius: 4px;
  color: var(--gsb-muted);
  flex-shrink: 0;
}

.gsb-sheet-active-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gsb-accent);
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--gsb-accent);
}

/* ═════════════════════════════════════════════════
   FOKUS-MODE (meditation/atmosphere mode)
   Only available in fullscreen (.gsb-is-fullscreen)
═════════════════════════════════════════════════ */
.gsb-player.gsb-focus-mode .gsb-scene-strip,
.gsb-player.gsb-focus-mode .gsb-now-playing,
.gsb-player.gsb-focus-mode .gsb-progress-row,
.gsb-player.gsb-focus-mode .gsb-transport,
.gsb-player.gsb-focus-mode .gsb-embed-wrap,
.gsb-player.gsb-focus-mode .gsb-content,
.gsb-player.gsb-focus-mode .gsb-voice-banner,
.gsb-player.gsb-focus-mode .gsb-logo {
  display: none !important;
}

/* Keep only header actions (with exit button), transparent */
.gsb-player.gsb-focus-mode .gsb-header {
  position: absolute;
  top: 0; right: 0;
  background: transparent;
  border-bottom: none;
  z-index: 20;
  justify-content: flex-end;
  /* Fade out after 2s, reappear on hover */
  opacity: 0;
  transition: opacity .4s ease;
}
.gsb-player.gsb-focus-mode:hover .gsb-header,
.gsb-player.gsb-focus-mode .gsb-header:focus-within {
  opacity: 1;
}

/* 16:9 background in focus mode — show full image without crop */
.gsb-player.gsb-focus-mode .gsb-bg {
  background: #000;
}
.gsb-player.gsb-focus-mode .gsb-bg-layer .gsb-bg-image,
.gsb-player.gsb-focus-mode .gsb-bg-layer .gsb-bg-video {
  object-fit: contain;
  background: #000;
}
/* Keep overlay video covering full frame even in focus mode */
.gsb-player.gsb-focus-mode .gsb-bg-overlay-video {
  object-fit: contain;
}
/* Gradient overlay less aggressive in focus mode */
.gsb-player.gsb-focus-mode .gsb-bg-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.4) 0%,
    rgba(0,0,0,0.0) 20%,
    rgba(0,0,0,0.0) 80%,
    rgba(0,0,0,0.4) 100%
  );
}

/* Make player fill fullscreen properly */
.gsb-player.gsb-is-fullscreen.gsb-focus-mode {
  min-height: 100vh;
  border-radius: 0;
}

/* Focus mode exit hint */
.gsb-player.gsb-focus-mode::after {
  content: 'Hover for kontroller  ·  Esc for at afslutte';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  animation: gsb-focus-hint 5s ease-in-out 0.5s forwards;
}
@keyframes gsb-focus-hint {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; }
}

/* ═════════════════════════════════════════════════
   PUSH-TO-TALK indicator
═════════════════════════════════════════════════ */
.gsb-ptt-indicator {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 2px solid var(--gsb-border);
  border-radius: 24px;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gsb-text);
  font-size: 14px;
  min-width: 200px;
  max-width: 500px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: gsb-ptt-fadein 0.2s ease-out;
}
@keyframes gsb-ptt-fadein {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.gsb-ptt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #777;
  flex-shrink: 0;
}
.gsb-ptt-indicator.listening {
  border-color: #e84a4a;
}
.gsb-ptt-indicator.listening .gsb-ptt-dot {
  background: #e84a4a;
  box-shadow: 0 0 8px rgba(232, 74, 74, 0.6);
  animation: gsb-ptt-pulse 1s ease-in-out infinite;
}
@keyframes gsb-ptt-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.3); }
}

.gsb-ptt-indicator.hint {
  border-color: #4ae888;
}
.gsb-ptt-indicator.hint .gsb-ptt-dot {
  background: #4ae888;
  box-shadow: 0 0 8px rgba(74, 232, 136, 0.4);
}

.gsb-ptt-text {
  font-weight: 600;
  white-space: nowrap;
}
.gsb-ptt-heard {
  font-style: italic;
  color: var(--gsb-muted);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}
.gsb-ptt-heard:empty { display: none; }

/* Voice button active state */
#gsb-voice-btn.active {
  background: rgba(232, 74, 74, 0.15);
  border-color: #e84a4a;
  color: #e84a4a;
}
#gsb-voice-btn.active iconify-icon {
  animation: gsb-mic-pulse 2s ease-in-out infinite;
}
@keyframes gsb-mic-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

@media (max-width: 600px) {
  .gsb-ptt-indicator {
    top: 70px;
    min-width: auto;
    max-width: 90%;
    padding: 8px 14px;
    font-size: 13px;
  }
}

/* ═════════════════════════════════════════════════
   TIME OF DAY tint
═════════════════════════════════════════════════ */
.gsb-tod-tint {
  position: absolute;
  inset: 0;
  z-index: 4;              /* above bg + overlay video, under gradient */
  pointer-events: none;
  mix-blend-mode: soft-light;
  opacity: 0;
  transition: background 2.5s linear, opacity 2.5s linear;
}

/* ═════════════════════════════════════════════════
   ADAPTIVE MUSIC LAYERS
═════════════════════════════════════════════════ */
.gsb-intensity-row {
  position: relative;
  z-index: 10;
  padding: 10px 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gsb-intensity-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gsb-muted);
}
.gsb-intensity-head iconify-icon { font-size: 14px; }
.gsb-intensity-value {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--gsb-accent);
}
.gsb-intensity-slider { width: 100%; }
.gsb-intensity-layers {
  display: flex;
  gap: 6px;
}
.gsb-layer-pip {
  flex: 1;
  text-align: center;
  font-size: 11px;
  padding: 4px 6px;
  border-radius: 4px;
  border: 1px solid var(--gsb-border);
  color: var(--gsb-muted);
  background: rgba(0,0,0,0.25);
  transition: all .4s ease;
}
.gsb-layer-pip.on {
  color: #000;
  background: var(--gsb-accent);
  border-color: var(--gsb-accent);
  font-weight: 600;
}
.gsb-layer-pip.missing { opacity: .35; text-decoration: line-through; }

/* ═════════════════════════════════════════════════
   FLOATING PANELS (voice modulator, time of day)
═════════════════════════════════════════════════ */
.gsb-panel {
  position: absolute;
  top: 72px;
  right: 20px;
  z-index: 120;
  width: 340px;
  max-width: calc(100% - 32px);
  flex-direction: column;
  background: rgba(12, 10, 8, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid var(--gsb-border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.55);
  color: var(--gsb-text);
  overflow: hidden;
  animation: gsb-panel-in .18s ease-out;
}
@keyframes gsb-panel-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.gsb-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gsb-border);
}
.gsb-panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.gsb-panel-x {
  background: none; border: none; cursor: pointer;
  color: var(--gsb-muted); font-size: 16px; line-height: 1;
  padding: 4px 6px; border-radius: 4px;
}
.gsb-panel-x:hover { color: var(--gsb-text); background: rgba(255,255,255,0.08); }
.gsb-panel-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.gsb-panel-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--gsb-muted);
  background: rgba(232,74,74,0.10);
  border-left: 3px solid #e84a4a;
  padding: 8px 10px;
  border-radius: 4px;
}

/* ── Voice modulator ── */
.gsb-vm-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.gsb-vm-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  font-size: 10px;
  font-family: inherit;
  color: var(--gsb-muted);
  background: var(--gsb-surface);
  border: 2px solid var(--gsb-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.gsb-vm-preset span { font-size: 18px; line-height: 1; }
.gsb-vm-preset:hover { border-color: var(--gsb-accent); color: var(--gsb-text); }
.gsb-vm-preset.active {
  border-color: var(--gsb-accent);
  color: var(--gsb-accent);
  background: rgba(232,184,74,0.12);
  font-weight: 700;
}
.gsb-vm-controls { display: flex; flex-direction: column; gap: 10px; }
.gsb-vm-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 14px;
  font-family: inherit; font-size: 13px; font-weight: 700;
  color: var(--gsb-text);
  background: var(--gsb-surface);
  border: 2px solid var(--gsb-border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.gsb-vm-toggle:hover { border-color: var(--gsb-accent); }
.gsb-vm-toggle.active {
  background: rgba(232,74,74,0.16);
  border-color: #e84a4a;
  color: #e84a4a;
}
.gsb-vm-vol { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--gsb-muted); }
.gsb-vm-status {
  font-size: 12px;
  color: var(--gsb-muted);
  text-align: center;
  padding-top: 2px;
}

/* ── Time of day ── */
.gsb-tod-display { display: flex; align-items: center; gap: 12px; }
.gsb-tod-display iconify-icon { font-size: 32px; color: var(--gsb-accent); }
.gsb-tod-clock {
  font-size: 26px; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.gsb-tod-phase { font-size: 12px; color: var(--gsb-muted); margin-top: 2px; }
.gsb-tod-slider { width: 100%; }
.gsb-tod-marks {
  display: flex; justify-content: space-between;
  font-size: 10px; color: var(--gsb-muted);
  font-variant-numeric: tabular-nums;
  margin-top: -6px;
}
.gsb-tod-quick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.gsb-tod-quick button {
  padding: 7px 8px;
  font-family: inherit; font-size: 12px;
  color: var(--gsb-text);
  background: var(--gsb-surface);
  border: 2px solid var(--gsb-border);
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s;
}
.gsb-tod-quick button:hover { border-color: var(--gsb-accent); color: var(--gsb-accent); }
.gsb-tod-auto {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--gsb-muted);
}

/* Active state for the header buttons that own a panel */
#gsb-voicemod-btn.active, #gsb-tod-btn.active {
  border-color: var(--gsb-accent);
  color: var(--gsb-accent);
}

@media (max-width: 600px) {
  .gsb-panel { right: 8px; left: 8px; width: auto; top: 64px; }
  .gsb-vm-presets { grid-template-columns: repeat(4, 1fr); }
}

/* Four independent channels: keep the transport readable on small screens */
@media (max-width: 900px) {
  .gsb-vol-group { flex: 1 1 45%; }
}
@media (max-width: 600px) {
  .gsb-vol-group { flex: 1 1 100%; margin-left: 0; }
}
