/* Lyrics scroll only inside the panel, with room to center first/last lines. */
.ly-display { --lyrics-view-height: 320px; height: var(--lyrics-view-height); box-sizing: border-box; text-align: center; }
.ly-display.ly-embed { --lyrics-view-height: 160px; }
.ly-display:has(.ly-line)::before, .ly-display:has(.ly-line)::after { content: ''; display: block; height: calc(var(--lyrics-view-height) / 2 - 30px); }
.ly-line { text-align: center; }
.camo-theme-field { padding: 8px 12px; }
.camo-ui-root {
 --skin-bg1: var(--panel, #12122a); --skin-bg2: var(--panel-2, #181830);
 --skin-card-br: var(--accent-a, #5566aa); --skin-accent: var(--accent-a, #667eea);
 --skin-text: var(--text, #eaeaea); --skin-h2: var(--text, #fff7dc);
 --skin-inp-bg: #111710; --skin-sel-bg: #151b14; --skin-ly-bg: #090e09;
 --skin-muted: #bdc7b8; --skin-ly-muted: #b5c1ad;
}
.camo-ui-root .camo-label-text { white-space: normal; }
.camo-ui-root label .camo-label-text { margin: 2px; }
.camo-ui-root [data-camo-stack] { color: #fff7dc; }

/* Suppress cached legacy pseudo-element texture layers. */
.camo-ui-root .btn::before,
.camo-ui-root .tab::before,
.camo-ui-root label.btn-file::before {
  content: none !important;
  display: none !important;
  background-image: none !important;
}
/* All tabs stay visible on phone/narrow side panels. */
.tabs { flex-wrap: wrap !important; overflow: visible !important; width: 100%; box-sizing: border-box; }
.tabs .tab { flex: 1 1 90px !important; min-width: 0 !important; max-width: 100%; border-radius: 8px; }
#camoThemeSelect, #camoThemeSelect option, #camoThemeSelect optgroup {
  color: #fff !important; background: #101510 !important; background-image: none !important; color-scheme: dark;
}
#camoThemeSelect { max-width: 100%; }
#xf-mode, #xf-preset, #xf-beats, #xf-style,
#xf-mode option, #xf-preset option, #xf-beats option, #xf-style option {
 color: #fff; background: #101510; color-scheme: dark; max-width: 100%; padding: 7px; border-radius: 6px;
}
/* File picking stays available beside the tabs on every app tab. */
.top-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.top-actions .tabs, .top-actions .file-add-row { display: contents !important; }
.top-actions .tab, .top-actions label.btn-file { flex: 1 1 90px !important; min-width: 0; box-sizing: border-box; }
.panel-switches { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.panel-switch { display: inline-flex; align-items: center; gap: 5px; padding: 7px; background: #101510; color: #fff; border: 1px solid #66785b; border-radius: 8px; cursor: pointer; }
.panel-switch input { appearance: none; width: 34px; height: 20px; background: #414741; border-radius: 20px; position: relative; cursor: pointer; flex-shrink: 0; }
.panel-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; background: #fff; border-radius: 50%; }
.panel-switch input:checked { background: #4a884a; }
.panel-switch input:checked::after { left: 17px; }
.panel-switch input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
#queue-panel[hidden], #now-lyrics-panel[hidden], #crossfade-panel[hidden], #jingle-panel[hidden] { display: none !important; }
.popup-panel-storage { display: none !important; }
.panel-popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.panel-popup-actions .btn { flex: 1 1 110px; }
#feature-popup { width: min(960px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-sizing: border-box; overflow: auto; padding: 16px; border: 1px solid #bba774; border-radius: 12px; background: #101510; color: #fff; }
#feature-popup::backdrop { background: rgba(0,0,0,.72); }
.popup-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: -16px; padding: 8px 0; background: #101510; z-index: 5; }
#feature-popup-body .panel { display: block !important; }
#feature-popup-body .card:not([hidden]) { width: 100%; box-sizing: border-box; }
#feature-popup-body .grid-play { display: block; }
.top-actions > .btn, .top-actions > .tab, .top-actions > label.btn-file { flex: 1 1 90px !important; min-width: 0; }
.camo-theme-field { flex-direction: row !important; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.camo-theme-field label { flex-shrink: 0; }
.camo-theme-field #camoThemeSelect { min-width: 0; flex: 1 1 auto; max-width: 300px; }
#live-play-controls > .row-inline[hidden] { display: none !important; }
#live-play-controls #now-lyrics-panel { margin: 10px 0; }
