:root {
  --bg: #090909;
  --panel: #121212;
  --panel-2: #171717;
  --panel-3: #202020;
  --text: #f5f5f5;
  --muted: #949494;
  --line: #2d2d2d;
  --accent: #ffd13f;
  --danger: #ff6565;
  --radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: Arial, "Helvetica Neue", sans-serif; }
body { min-height: 100vh; background: radial-gradient(circle at 75% -10%, rgba(255, 209, 63, .10), transparent 28%), var(--bg); }
button, input, select { font: inherit; }
button { border: 0; color: var(--text); cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .38; cursor: not-allowed; }
h1, h2, p { margin: 0; }

.app-shell { min-height: 100vh; padding-top: var(--safe-top); padding-bottom: var(--safe-bottom); }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  min-height: 62px; padding: 10px max(16px, var(--safe-right)) 10px max(16px, var(--safe-left));
  border-bottom: 1px solid var(--line);
  background: rgba(9, 9, 9, .94); backdrop-filter: blur(16px);
}
.brand-line { display: flex; align-items: center; gap: 8px; direction: ltr; }
.brand { font-size: clamp(25px, 4vw, 34px); font-weight: 900; letter-spacing: .6px; direction: ltr; }
.brand span, .eyebrow { color: var(--accent); }
.version-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 31px; height: 20px; padding: 0 7px; border-radius: 999px; background: var(--accent); color: #17120a; font-size: 10px; font-weight: 900; }

.primary-btn, .secondary-btn, .danger-btn { min-height: 40px; padding: 0 15px; border-radius: 12px; font-weight: 800; }
.primary-btn { background: var(--accent); color: #16120a; }
.secondary-btn { background: var(--panel-3); border: 1px solid #3b3b3b; }
.danger-btn { background: rgba(255, 101, 101, .10); color: #ff8888; border: 1px solid rgba(255, 101, 101, .34); }
.compact-add { min-height: 42px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--panel-3); font-weight: 900; }

.workspace { display: grid; grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); direction: ltr; min-height: calc(100vh - 63px - var(--safe-top)); }
.playlist-panel, .main-panel { direction: rtl; }
.playlist-panel { padding: 14px 12px; border-right: 1px solid var(--line); background: rgba(14, 14, 14, .88); }
.panel-title-row, .compact-heading, .selected-strip, .dialog-header, .dialog-actions, .time-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.playlist-heading { display: flex; align-items: baseline; gap: 9px; }
.playlist-heading h2 { font-size: 21px; }
.playlist-heading span { color: var(--muted); font-size: 12px; }
.playlist { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.playlist-empty { padding: 24px 12px; text-align: center; color: var(--muted); border: 1px dashed #373737; border-radius: 14px; line-height: 1.55; font-size: 13px; }
.song-row {
  position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr) 30px; gap: 9px; align-items: center;
  min-height: 61px; padding: 8px 9px; border: 1px solid transparent; border-radius: 14px;
  background: #161616; text-align: right;
}
.song-row:hover { background: #1b1b1b; }
.song-row.selected { border-color: rgba(255, 209, 63, .85); background: rgba(255, 209, 63, .07); }
.song-bpm { color: var(--accent); font-size: 24px; font-weight: 900; text-align: center; direction: ltr; line-height: 1; }
.song-bpm small { display: block; margin-top: 4px; font-size: 8px; letter-spacing: 1px; color: var(--muted); }
.song-name { font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-ts { color: var(--muted); margin-top: 3px; direction: ltr; display: inline-block; font-size: 12px; }
.song-audio-indicator { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #232323; color: var(--accent); font-size: 12px; }

.main-panel { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); grid-template-areas: "selected selected" "metro player"; gap: 12px; align-content: start; padding: 14px; }
.selected-strip { grid-area: selected; min-height: 62px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 15px; background: rgba(19, 19, 19, .82); }
.selected-copy { min-width: 0; display: grid; grid-template-columns: auto minmax(0, auto) 1fr; align-items: center; gap: 10px; }
.selected-copy .eyebrow { margin: 0; }
.selected-copy strong { max-width: 36vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.song-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.edit-btn { min-height: 36px; padding: 0 13px; }

.compact-card { background: linear-gradient(180deg, #171717, #111); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 14px 38px rgba(0, 0, 0, .22); padding: 16px; }
.metronome-card { grid-area: metro; }
.player-card { grid-area: player; }
.compact-heading h2 { font-size: 21px; }
.eyebrow { display: block; margin-bottom: 3px; font-size: 10px; font-weight: 900; letter-spacing: 1.4px; }
.beat-lights { display: flex; gap: 6px; direction: ltr; flex-wrap: wrap; justify-content: flex-end; max-width: 130px; }
.beat-light { width: 9px; height: 9px; border-radius: 50%; background: #343434; transition: transform 80ms ease, background 80ms ease; }
.beat-light.active { background: var(--accent); transform: scale(1.45); }
.beat-light.downbeat.active { background: #fff; }

.tempo-layout { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 12px; margin: 18px 0 14px; direction: ltr; }
.round-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--panel-3); border: 1px solid #3b3b3b; font-size: 29px; line-height: 1; }
.tempo-display { text-align: center; }
.tempo-display input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--accent); font-size: clamp(62px, 8vw, 92px); line-height: .84; font-weight: 900; text-align: center; appearance: textfield; }
.tempo-display input::-webkit-inner-spin-button { appearance: none; }
.tempo-display span { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; font-weight: 900; letter-spacing: 3px; }

.settings-bar { display: grid; grid-template-columns: .8fr 1.05fr 1.15fr; gap: 8px; padding: 9px; border: 1px solid rgba(255, 209, 63, .34); border-radius: 14px; background: rgba(255, 209, 63, .035); }
.compact-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: #cecece; font-size: 11px; font-weight: 700; }
.compact-field select { width: 100%; min-width: 0; }
select, .song-dialog input { min-height: 39px; padding: 0 10px; border: 1px solid #3b3b3b; border-radius: 10px; background: var(--panel-3); color: var(--text); outline: none; }
.accent-toggle-row { position: relative; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; min-height: 39px; margin-top: 15px; padding: 0 9px; border: 1px solid #3b3b3b; border-radius: 10px; background: var(--panel-3); cursor: pointer; }
.accent-label { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.accent-label strong { font-size: 11px; white-space: nowrap; }
.accent-label small { color: var(--accent); font-size: 9px; font-weight: 700; }
.accent-toggle-row.accent-off small { color: var(--muted); }
.switch-input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; flex: 0 0 auto; width: 38px; height: 22px; border-radius: 999px; background: #494949; transition: 160ms ease; }
.switch-ui::after { content: ""; position: absolute; top: 3px; right: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: 160ms ease; }
.switch-input:checked + .switch-ui { background: var(--accent); }
.switch-input:checked + .switch-ui::after { transform: translateX(-16px); background: #17120a; }

.metronome-action-row { display: grid; grid-template-columns: .7fr 1fr 1.2fr; gap: 8px; margin-top: 12px; }
.metronome-action-row .secondary-btn { min-height: 46px; padding: 0 10px; }
.metronome-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 46px; border-radius: 12px; background: var(--accent); color: #16120a; font-size: 16px; font-weight: 900; }
.metronome-toggle.running { background: #f4f4f4; }

.status-pill { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 9px; border-radius: 999px; background: var(--panel-3); color: var(--muted); font-size: 11px; direction: ltr; }
.status-pill.ready { color: var(--accent); }
.transport { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 28px 0 22px; direction: ltr; }
.transport-btn { width: 48px; height: 48px; border-radius: 50%; background: var(--panel-3); border: 1px solid #3b3b3b; font-size: 13px; font-weight: 900; }
.audio-main-btn { width: 70px; height: 70px; border-radius: 50%; background: var(--accent); color: #16120a; font-size: 27px; padding-left: 5px; }
.audio-main-btn.playing { padding-left: 0; }
.progress-section { direction: ltr; }
.progress-slider { width: 100%; height: 30px; appearance: none; background: transparent; cursor: pointer; }
.progress-slider::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient(to right, var(--accent) 0%, var(--accent) var(--progress, 0%), #454545 var(--progress, 0%), #454545 100%); }
.progress-slider::-webkit-slider-thumb { appearance: none; width: 21px; height: 21px; margin-top: -8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 209, 63, .13); }
.progress-slider::-moz-range-track { height: 6px; border-radius: 999px; background: #454545; }
.progress-slider::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
.progress-slider::-moz-range-thumb { width: 21px; height: 21px; border: 0; border-radius: 50%; background: var(--accent); }
.time-row { margin-top: -2px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; direction: ltr; }

.song-dialog { width: min(540px, calc(100vw - 24px)); border: 1px solid #3d3d3d; border-radius: 18px; padding: 0; background: #151515; color: var(--text); }
.song-dialog::backdrop { background: rgba(0, 0, 0, .74); backdrop-filter: blur(5px); }
.song-dialog form { padding: 20px; }
.song-dialog label { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; color: #cfcfcf; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dialog-checkbox-row { min-height: 39px; padding: 0 10px; border: 1px solid #3b3b3b; border-radius: 10px; background: var(--panel-3); flex-direction: row !important; align-items: center; justify-content: space-between; }
.dialog-checkbox-row input { width: 20px; height: 20px; accent-color: var(--accent); }
.file-summary { margin-top: 16px; padding: 11px; border-radius: 10px; background: #202020; color: var(--muted); overflow-wrap: anywhere; font-size: 13px; }
.dialog-actions { margin-top: 20px; }
.dialog-actions-spacer { flex: 1; }
.toast { position: fixed; left: 50%; bottom: calc(22px + var(--safe-bottom)); transform: translate(-50%, 25px); z-index: 50; padding: 11px 16px; border-radius: 999px; background: #f4f4f4; color: #161616; font-weight: 800; opacity: 0; pointer-events: none; transition: 180ms ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 960px) {
  .workspace { grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); }
  .main-panel { grid-template-columns: 1fr; grid-template-areas: "selected" "metro" "player"; }
  .selected-copy strong { max-width: 28vw; }
}

@media (max-width: 720px) {
  .topbar { min-height: 58px; padding: 8px 12px; }
  .brand { font-size: 25px; }
  .compact-add { min-height: 38px; padding: 0 12px; }
  .workspace { display: block; min-height: auto; }
  .playlist-panel { padding: 11px 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .playlist { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 74vw); overflow-x: auto; overflow-y: hidden; gap: 7px; padding-bottom: 3px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .playlist::-webkit-scrollbar { display: none; }
  .song-row { min-height: 58px; scroll-snap-align: start; }
  .main-panel { padding: 10px; gap: 9px; }
  .selected-strip { min-height: 54px; padding: 8px 10px; }
  .selected-copy { grid-template-columns: 1fr; gap: 2px; }
  .selected-copy .eyebrow { display: none; }
  .selected-copy strong { max-width: 57vw; font-size: 16px; }
  .song-meta { font-size: 11px; }
  .edit-btn { min-height: 34px; }
  .compact-card { padding: 13px; border-radius: 16px; }
  .compact-heading h2 { font-size: 19px; }
  .tempo-layout { grid-template-columns: 44px 1fr 44px; margin: 12px 0 11px; }
  .round-btn { width: 44px; height: 44px; font-size: 26px; }
  .tempo-display input { font-size: 68px; }
  .tempo-display span { margin-top: 4px; font-size: 10px; }
  .settings-bar { grid-template-columns: 1fr 1.25fr; }
  .accent-toggle-row { grid-column: 1 / -1; margin-top: 0; min-height: 38px; }
  .accent-label { flex-direction: row; align-items: baseline; gap: 7px; }
  .metronome-action-row { grid-template-columns: .7fr 1fr 1.15fr; }
  .metronome-action-row .secondary-btn, .metronome-toggle { min-height: 44px; font-size: 14px; }
  .transport { margin: 18px 0 14px; }
  .transport-btn { width: 44px; height: 44px; }
  .audio-main-btn { width: 64px; height: 64px; }
  .player-heading .status-pill { max-width: 44%; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 390px) {
  .settings-bar { grid-template-columns: 1fr 1fr; }
  .metronome-action-row { grid-template-columns: .68fr .96fr 1.05fr; gap: 6px; }
  .metronome-action-row button { padding-inline: 7px; }
}

/* V6 additions */
h3 { margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-action { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 7px; max-width: 220px; min-width: 120px; text-align: right; }
.top-action-label { color: var(--muted); font-size: 10px; }
.top-action strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.icon-text-btn { min-height: 40px; padding: 0 12px; border-radius: 12px; background: var(--panel-3); border: 1px solid #3b3b3b; font-weight: 800; }
.icon-text-btn.active { color: #17120a; background: var(--accent); border-color: var(--accent); }
.band-mini-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 2px 13px; border-bottom: 1px solid var(--line); }
.band-mini-header h2 { margin: 0; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 20px; }
.panel-title-row { margin-top: 12px; }
.playlist-heading h3 { font-size: 17px; }
.drag-hint { color: var(--muted); font-size: 10px; }
.song-row { grid-template-columns: 25px 62px minmax(0, 1fr) 30px; }
.drag-handle { display: grid; place-items: center; width: 24px; height: 36px; border-radius: 8px; color: #6d6d6d; font-size: 17px; cursor: grab; user-select: none; touch-action: none; }
.drag-handle:active { cursor: grabbing; color: var(--accent); }
.song-row.dragging { opacity: .55; border-color: var(--accent); }
.song-row.drag-over { box-shadow: inset 0 2px 0 var(--accent); }
.selected-strip { grid-template-columns: auto minmax(0, 1fr) auto; }
.selected-actions { display: flex; align-items: center; gap: 8px; }
.nav-song-btn { width: 38px; height: 38px; border-radius: 50%; background: var(--panel-3); border: 1px solid #3b3b3b; font-size: 25px; line-height: 1; }
.volume-row { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.volume-row label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.volume-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.player-volume { margin-top: 12px; }
.bands-dialog-content { padding: 20px; }
.bands-list { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; max-height: min(48vh, 430px); overflow: auto; }
.band-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 9px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-2); }
.band-row.current { border-color: var(--accent); background: rgba(255, 209, 63, .06); }
.band-select-btn { min-width: 0; padding: 2px 4px; background: transparent; text-align: right; }
.band-select-btn strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.band-select-btn small { display: block; margin-top: 3px; color: var(--muted); }
.mini-action-btn { width: 35px; height: 35px; border-radius: 10px; background: var(--panel-3); border: 1px solid #3b3b3b; }
.mini-action-btn.danger { color: #ff8c8c; }
.add-band-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 14px; }
.add-band-form input { min-height: 42px; padding: 0 12px; border: 1px solid #3b3b3b; border-radius: 11px; background: var(--panel-3); color: var(--text); outline: none; }
.backup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.backup-note { display: block; margin-top: 8px; color: var(--muted); line-height: 1.45; }

body.stage-mode .playlist-panel,
body.stage-mode .topbar .top-action,
body.stage-mode .topbar #wakeLockBtn,
body.stage-mode .topbar #addSongBtn,
body.stage-mode .selected-strip .edit-btn { display: none; }
body.stage-mode .workspace { display: block; }
body.stage-mode .main-panel { max-width: 1180px; margin: 0 auto; grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr); grid-template-areas: "selected selected" "metro player"; }
body.stage-mode #stageModeBtn { background: var(--accent); color: #17120a; }
body.stage-mode .selected-copy strong { max-width: none; font-size: clamp(25px, 4vw, 46px); }
body.stage-mode .selected-strip { min-height: 86px; }
body.stage-mode .selected-copy { grid-template-columns: auto minmax(0, auto) 1fr; }

@media (max-width: 1050px) {
  .icon-text-btn span { display: none; }
  .icon-text-btn { width: 42px; padding: 0; }
  .top-action { max-width: 175px; }
}

@media (max-width: 720px) {
  .topbar { align-items: center; }
  .topbar-actions { gap: 5px; }
  .top-action { min-width: 0; width: 42px; height: 38px; padding: 0; display: grid; place-items: center; }
  .top-action-label { display: none; }
  .top-action strong { font-size: 0; }
  .top-action strong::before { content: "♫"; font-size: 17px; }
  .icon-text-btn { width: 38px; min-height: 38px; }
  .topbar #wakeLockBtn { display: none; }
  .compact-add { font-size: 0; width: 38px; padding: 0; }
  .compact-add::before { content: "+"; font-size: 22px; }
  .band-mini-header h2 { max-width: 72vw; }
  .drag-hint { display: none; }
  .song-row { grid-template-columns: 22px 56px minmax(0, 1fr) 28px; }
  .selected-strip { grid-template-columns: auto minmax(0, 1fr) auto; }
  .selected-actions .edit-btn { display: none; }
  .nav-song-btn { width: 34px; height: 34px; }
  .volume-row label { grid-template-columns: 1fr; gap: 5px; }
  .backup-actions { grid-template-columns: 1fr; }
  body.stage-mode .main-panel { grid-template-columns: 1fr; grid-template-areas: "selected" "metro" "player"; }
  body.stage-mode .selected-copy { grid-template-columns: 1fr; }
  body.stage-mode .selected-copy strong { max-width: 52vw; font-size: 22px; }
}
.selected-strip { display: grid; }

/* V7: vertical numbered playlist and no duplicate selected-song strip */
.main-panel {
  grid-template-areas: "metro player";
}
.selected-strip {
  display: none;
}

.song-row {
  direction: ltr;
  grid-template-columns: 24px 34px 30px 62px minmax(0, 1fr) 34px;
  grid-template-areas: "drag edit audio bpm info number";
  width: 100%;
}
.drag-handle { grid-area: drag; }
.song-edit-btn {
  grid-area: edit;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #222;
  border: 1px solid #383838;
  color: #bdbdbd;
  font-size: 14px;
}
.song-edit-btn:hover,
.song-edit-btn:focus-visible {
  color: var(--accent);
  border-color: rgba(255, 209, 63, .65);
  outline: none;
}
.song-audio-indicator { grid-area: audio; }
.song-bpm { grid-area: bpm; }
.song-info {
  grid-area: info;
  min-width: 0;
  direction: rtl;
  text-align: right;
}
.song-number {
  grid-area: number;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: #232323;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.song-row.selected .song-number {
  background: var(--accent);
  color: #17120a;
}

body.stage-mode .selected-strip {
  display: grid;
}
body.stage-mode .main-panel {
  grid-template-areas: "selected selected" "metro player";
}

@media (max-width: 960px) {
  .main-panel { grid-template-areas: "metro" "player"; }
  body.stage-mode .main-panel { grid-template-areas: "selected" "metro" "player"; }
}

@media (max-width: 720px) {
  .playlist {
    display: flex;
    flex-direction: column;
    overflow: visible;
    gap: 7px;
    padding-bottom: 0;
    scroll-snap-type: none;
  }
  .song-row {
    grid-template-columns: 22px 32px 28px 56px minmax(0, 1fr) 31px;
    grid-template-areas: "drag edit audio bpm info number";
    min-height: 58px;
    scroll-snap-align: none;
  }
  .song-edit-btn { width: 30px; height: 30px; }
  .song-number { width: 29px; height: 29px; }
}

@media (max-width: 390px) {
  .song-row {
    grid-template-columns: 20px 30px 26px 52px minmax(0, 1fr) 28px;
    gap: 6px;
    padding-inline: 7px;
  }
  .song-audio-indicator { width: 26px; height: 26px; }
  .song-bpm { font-size: 21px; }
  .song-edit-btn { width: 28px; height: 28px; }
  .song-number { width: 27px; height: 27px; font-size: 12px; }
}


/* V8: volume is controlled by the device, so the in-app volume sliders are hidden. */
.volume-row { display: none !important; }


/* V10: cleaner minimal section headers without large Hebrew titles. */
.compact-heading .eyebrow { margin-bottom: 0; }
.compact-heading > div:first-child { display: flex; align-items: center; min-height: 12px; }


/* V12: replace an uploaded song file from the edit dialog. */
.audio-file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; gap: 8px; margin-top: 16px; }
.audio-file-row .file-summary { margin-top: 0; }
.replace-audio-btn { min-height: 42px; white-space: nowrap; }
@media (max-width: 430px) {
  .audio-file-row { grid-template-columns: 1fr; }
}


/* V13 cloud sync */
.sync-top-btn.synced { color: #17120a; background: var(--accent); border-color: var(--accent); }
.sync-top-btn.syncing { color: var(--accent); }
.sync-dialog-content { padding: 20px; }
.sync-dialog label { display: flex; flex-direction: column; gap: 7px; margin-top: 15px; color: #cfcfcf; font-weight: 700; }
.sync-dialog input { min-height: 42px; padding: 0 11px; border: 1px solid #3b3b3b; border-radius: 10px; background: var(--panel-3); color: var(--text); outline: none; direction: ltr; text-align: left; }
.sync-state-card { display: flex; align-items: center; gap: 11px; margin-top: 17px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel-2); }
.sync-state-card div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sync-state-card small { color: var(--muted); line-height: 1.4; }
.sync-state-dot { flex: 0 0 auto; width: 11px; height: 11px; border-radius: 50%; background: #666; box-shadow: 0 0 0 4px rgba(255,255,255,.04); }
.sync-state-dot.connected { background: #55d98a; }
.sync-state-dot.syncing { background: var(--accent); animation: syncPulse 1s infinite alternate; }
.sync-state-dot.error { background: var(--danger); }
@keyframes syncPulse { to { transform: scale(1.35); opacity: .65; } }
.sync-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sync-primary-actions, .sync-connected-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.sync-connected-actions { padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 720px) {
  .sync-form-grid, .sync-primary-actions, .sync-connected-actions { grid-template-columns: 1fr; }
  .sync-top-btn span { display: none; }
}

/* V14: R2 song libraries by band */
.library-song-label { display: flex; flex-direction: column; gap: 7px; margin-top: 16px; color: #cfcfcf; font-weight: 700; }
.library-select-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.library-select-row select { width: 100%; min-height: 42px; }
.library-select-row .secondary-btn { min-height: 42px; white-space: nowrap; }
.library-status-text { color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.4; }
.band-row { grid-template-columns: minmax(0, 1fr) minmax(94px, 120px) auto auto; }
.band-source-select { min-height: 35px; width: 100%; padding-inline: 7px; font-size: 11px; }
.add-band-form { grid-template-columns: minmax(0, 1fr) minmax(125px, .75fr) auto; }
.add-band-form select { min-height: 42px; }
.song-audio-indicator.ready { color: var(--accent); }
.song-audio-indicator.missing { color: var(--danger); border: 1px solid rgba(255,101,101,.35); }
@media (max-width: 560px) {
  .library-select-row, .add-band-form { grid-template-columns: 1fr; }
  .band-row { grid-template-columns: minmax(0, 1fr) 105px auto auto; gap: 6px; }
  .band-source-select { font-size: 10px; }
}


/* V22: fixed split-screen layout with Playlist, Song Reminder, and Metronome visible together. */
.playlist-drawer-btn,
.close-playlist-btn,
.playlist-overlay { display: none; }
.playlist-header-actions,
.player-heading-actions { display: flex; align-items: center; gap: 7px; }
.player-edit-btn {
  display: grid; place-items: center;
  width: 34px; height: 34px; flex: 0 0 auto;
  border-radius: 10px; background: var(--panel-3);
  border: 1px solid #3b3b3b; color: #c8c8c8; font-weight: 900;
}
.player-edit-btn:not(:disabled):hover,
.player-edit-btn:not(:disabled):focus-visible { color: var(--accent); border-color: rgba(255,209,63,.62); outline: none; }
.sync-top-btn { position: relative; }
.sync-quick-dot {
  position: absolute; top: 5px; left: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #686868; box-shadow: 0 0 0 2px #111;
}
.sync-quick-dot.connected { background: #55d98a; }
.sync-quick-dot.syncing { background: var(--accent); animation: syncPulse .8s infinite alternate; }
.sync-quick-dot.error { background: var(--danger); }

@media (min-width: 561px) and (max-width: 900px) {
  html, body { overflow-x: hidden; }
  .topbar {
    min-height: 56px;
    padding: 7px max(10px, var(--safe-right)) 7px max(88px, calc(var(--safe-left) + 88px));
    gap: 8px;
  }
  .brand { font-size: 23px; }
  .version-badge { min-width: 28px; height: 19px; padding-inline: 6px; }
  .topbar-actions { gap: 6px; flex-wrap: nowrap; }
  .topbar #playlistDrawerBtn,
  .topbar #bandsBtn,
  .topbar #stageModeBtn,
  .topbar #wakeLockBtn { display: none; }
  .icon-text-btn { width: 38px; min-height: 38px; padding: 0; }
  .icon-text-btn span { display: none; }
  .compact-add { width: 38px; min-height: 38px; padding: 0; font-size: 0; }
  .compact-add::before { content: "+"; font-size: 22px; }

  .workspace {
    display: grid;
    grid-template-columns: clamp(210px, 35vw, 245px) minmax(0, 1fr);
    min-height: calc(100dvh - 56px - var(--safe-top));
    direction: ltr;
  }
  .playlist-panel {
    position: static;
    display: block;
    height: calc(100dvh - 56px - var(--safe-top) - var(--safe-bottom));
    padding: 10px 8px 16px;
    overflow-y: auto;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: none;
    transform: none;
  }
  .close-playlist-btn { display: none; }
  .playlist-overlay { display: none !important; }
  .band-mini-header { padding-bottom: 9px; }
  .band-mini-header h2 { max-width: 145px; font-size: 16px; }
  .panel-title-row { margin-top: 8px; }
  .playlist-heading h3 { font-size: 15px; }
  .playlist-heading span { font-size: 10px; }
  .playlist { display: flex; flex-direction: column; overflow: visible; gap: 6px; margin-top: 8px; }
  .song-row {
    grid-template-columns: 18px 28px minmax(0, 1fr) 46px 26px;
    grid-template-areas: "drag edit info bpm number";
    gap: 5px;
    min-height: 54px;
    padding: 6px;
  }
  .song-audio-indicator { display: none; }
  .drag-handle { width: 18px; height: 30px; font-size: 14px; }
  .song-edit-btn { width: 28px; height: 28px; font-size: 12px; }
  .song-name { font-size: 12px; }
  .song-ts { font-size: 10px; margin-top: 2px; }
  .song-bpm { font-size: 19px; }
  .song-bpm small { font-size: 7px; margin-top: 3px; }
  .song-number { width: 25px; height: 25px; font-size: 11px; }

  .main-panel {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "player" "metro";
    gap: 8px;
    padding: 8px;
    align-items: start;
    align-content: start;
    direction: rtl;
  }
  .compact-card { padding: 10px; border-radius: 14px; box-shadow: 0 8px 22px rgba(0,0,0,.18); }
  .compact-heading { min-height: 22px; }
  .eyebrow { font-size: 8px; letter-spacing: 1px; }
  .beat-lights { gap: 4px; max-width: 82px; }
  .beat-light { width: 7px; height: 7px; }

  .player-card { min-height: 184px; }
  .player-heading-actions { min-width: 0; }
  .player-edit-btn { width: 28px; height: 28px; border-radius: 8px; }
  .status-pill { max-width: min(180px, 44vw); padding: 4px 7px; font-size: 9px; }
  .transport { gap: 10px; margin: 12px 0 9px; }
  .transport-btn { width: 38px; height: 38px; font-size: 11px; }
  .audio-main-btn { width: 56px; height: 56px; font-size: 22px; }
  .progress-slider { height: 25px; }
  .time-row { font-size: 10px; }

  .metronome-card { min-height: 294px; }
  .tempo-layout { grid-template-columns: 38px minmax(0,1fr) 38px; gap: 7px; margin: 8px 0; }
  .round-btn { width: 38px; height: 38px; font-size: 23px; }
  .tempo-display input { font-size: clamp(54px, 10vw, 76px); }
  .tempo-display span { margin-top: 3px; font-size: 8px; letter-spacing: 2px; }

  .settings-bar { grid-template-columns: 1fr 1fr; gap: 5px; padding: 6px; }
  .compact-field { gap: 2px; font-size: 9px; }
  select { min-height: 32px; padding-inline: 7px; font-size: 11px; }
  .accent-toggle-row { grid-column: 1 / -1; margin-top: 0; min-height: 32px; padding-inline: 7px; }
  .accent-label { flex-direction: row; align-items: baseline; gap: 5px; }
  .accent-label strong { font-size: 10px; }
  .accent-label small { font-size: 8px; }
  .switch-ui { width: 34px; height: 20px; }
  .switch-ui::after { width: 14px; height: 14px; }
  .switch-input:checked + .switch-ui::after { transform: translateX(-14px); }

  .metronome-action-row { grid-template-columns: .7fr 1fr 1.1fr; gap: 5px; margin-top: 7px; }
  .metronome-action-row .secondary-btn,
  .metronome-toggle { min-height: 38px; padding-inline: 6px; font-size: 11px; border-radius: 9px; }
}

@media (min-width: 561px) and (max-width: 680px) {
  .topbar { padding-left: max(82px, calc(var(--safe-left) + 82px)); }
  .workspace { grid-template-columns: 205px minmax(0,1fr); }
  .main-panel { gap: 7px; padding: 7px; }
  .compact-card { padding: 9px; }
  .song-row {
    grid-template-columns: 16px 26px minmax(0,1fr) 42px 24px;
    gap: 4px;
  }
  .song-name { font-size: 11px; }
  .song-bpm { font-size: 17px; }
  .tempo-display input { font-size: 54px; }
  .status-pill { max-width: 125px; }
  .metronome-action-row button { font-size: 10px; }
}


/* V22: compact desktop and split view with readable playlist and stacked controls */
@media (min-width: 561px) {
  .playlist-drawer-btn { display: none !important; }
  .playlist-overlay { display: none !important; opacity: 0 !important; pointer-events: none !important; }
  .close-playlist-btn { display: none !important; }
  .workspace {
    display: grid !important;
    grid-template-columns: minmax(250px, 340px) minmax(360px, 560px) !important;
    justify-content: start;
    align-items: start;
    min-height: calc(100vh - 63px - var(--safe-top));
  }
  .playlist-panel {
    position: relative !important;
    transform: none !important;
    inset: auto !important;
    width: auto !important;
    padding: 12px 10px 14px !important;
    border-right: 1px solid var(--line) !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
    background: rgba(14, 14, 14, .88) !important;
    overflow-y: auto;
    max-height: calc(100vh - 63px - var(--safe-top));
  }
  .main-panel {
    width: 100%;
    max-width: 560px;
    grid-template-columns: 1fr !important;
    grid-template-areas: "selected" "metro" "player" !important;
    gap: 10px !important;
    padding: 12px !important;
    align-content: start;
  }
  .selected-strip {
    min-height: 56px;
    padding: 9px 12px;
  }
  .selected-copy strong {
    max-width: none !important;
    font-size: 17px;
  }
  .song-meta { font-size: 12px; }
  .song-row {
    grid-template-columns: 54px minmax(0, 1fr) 28px;
    gap: 8px;
    min-height: 58px;
    padding: 8px 8px;
  }
  .song-bpm { font-size: 18px; }
  .song-name { font-size: 14px; }
  .compact-card {
    padding: 13px;
    border-radius: 16px;
  }
  .tempo-layout { margin: 12px 0 10px; }
  .tempo-display input {
    font-size: clamp(56px, 6vw, 82px);
  }
  .settings-bar {
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 8px;
  }
  .accent-toggle-row {
    grid-column: 1 / -1;
    margin-top: 0;
    min-height: 37px;
  }
  .metronome-action-row .secondary-btn,
  .metronome-toggle {
    min-height: 42px;
  }
  .transport {
    margin: 18px 0 14px;
    gap: 14px;
  }
  .audio-main-btn { width: 64px; height: 64px; font-size: 24px; }
  .transport-btn { width: 44px; height: 44px; }
  .player-card .volume-row,
  .metronome-card .volume-row { margin-top: 8px; }
}

@media (min-width: 561px) and (max-width: 900px) {
  .topbar {
    padding-left: max(74px, calc(var(--safe-left) + 74px));
  }
  .topbar-actions {
    gap: 6px;
    flex-wrap: nowrap;
  }
  .workspace {
    grid-template-columns: minmax(210px, 255px) minmax(320px, 430px) !important;
  }
  .main-panel {
    max-width: 430px;
    gap: 8px !important;
    padding: 8px !important;
  }
  .selected-strip { min-height: 52px; padding: 8px 10px; }
  .selected-copy { grid-template-columns: 1fr; gap: 2px; }
  .selected-copy .eyebrow { display: none; }
  .selected-copy strong { font-size: 15px; }
  .song-meta { font-size: 11px; }
  .compact-card { padding: 11px; }
  .tempo-display input { font-size: clamp(52px, 10vw, 72px); }
  .round-btn { width: 42px; height: 42px; font-size: 25px; }
  .tempo-layout { grid-template-columns: 42px 1fr 42px; gap: 8px; }
  .song-row { min-height: 54px; }
  .song-bpm { font-size: 17px; }
  .song-name { font-size: 13px; }
}


/* V22: wider playlist, tighter metronome/player */
@media (min-width: 561px) {
  .workspace {
    grid-template-columns: minmax(320px, 430px) minmax(320px, 470px) !important;
    gap: 0;
  }
  .playlist-panel {
    padding: 10px 10px 12px !important;
  }
  .panel-title-row { gap: 8px; }
  .playlist-heading h2 { font-size: 18px; }
  .song-row {
    grid-template-columns: 42px minmax(0, 1fr) 22px !important;
    gap: 6px !important;
    min-height: 52px !important;
    padding: 7px 7px !important;
    border-radius: 12px;
  }
  .song-bpm {
    font-size: 16px !important;
  }
  .song-bpm small {
    font-size: 7px;
    margin-top: 2px;
  }
  .song-name {
    font-size: 14px !important;
    white-space: normal;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.15;
    max-height: 2.3em;
  }
  .song-ts {
    margin-top: 2px;
    font-size: 11px;
  }
  .song-audio-indicator {
    width: 22px;
    height: 22px;
    font-size: 10px;
  }
  .main-panel {
    max-width: 470px !important;
    gap: 8px !important;
    padding: 10px !important;
  }
  .selected-strip {
    min-height: 50px;
    padding: 8px 10px;
  }
  .selected-copy strong {
    font-size: 15px !important;
  }
  .song-meta {
    font-size: 11px;
  }
  .edit-btn,
  .nav-song-btn {
    min-height: 32px;
  }
  .compact-card {
    padding: 10px !important;
    border-radius: 14px !important;
  }
  .eyebrow {
    font-size: 9px;
    margin-bottom: 2px;
  }
  .tempo-layout {
    grid-template-columns: 38px 1fr 38px !important;
    gap: 7px !important;
    margin: 8px 0 7px !important;
  }
  .round-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 22px !important;
  }
  .tempo-display input {
    font-size: clamp(46px, 5vw, 66px) !important;
  }
  .tempo-display span {
    margin-top: 2px;
    font-size: 10px;
    letter-spacing: 2px;
  }
  .settings-bar {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    padding: 6px !important;
  }
  select, .song-dialog input {
    min-height: 34px;
    padding: 0 8px;
    font-size: 13px;
  }
  .compact-field {
    font-size: 10px;
  }
  .accent-toggle-row {
    min-height: 34px !important;
    padding: 0 8px;
  }
  .accent-label strong { font-size: 10px; }
  .accent-label small { font-size: 8px; }
  .switch-ui {
    width: 34px;
    height: 20px;
  }
  .switch-ui::after {
    width: 14px;
    height: 14px;
  }
  .switch-input:checked + .switch-ui::after { transform: translateX(-14px); }
  .volume-row label span {
    font-size: 10px;
  }
  .volume-row input[type='range'] {
    height: 18px;
  }
  .metronome-action-row {
    grid-template-columns: .9fr 1fr 1fr !important;
    gap: 6px !important;
    margin-top: 8px !important;
  }
  .metronome-action-row .secondary-btn,
  .metronome-toggle {
    min-height: 36px !important;
    font-size: 13px !important;
    border-radius: 10px;
  }
  .player-heading-actions { gap: 8px; }
  .status-pill {
    padding: 4px 7px;
    font-size: 10px;
  }
  .player-edit-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .transport {
    gap: 10px !important;
    margin: 12px 0 9px !important;
  }
  .transport-btn {
    width: 38px !important;
    height: 38px !important;
    font-size: 12px;
  }
  .audio-main-btn {
    width: 54px !important;
    height: 54px !important;
    font-size: 20px !important;
  }
  .progress-slider {
    height: 22px;
  }
  .time-row {
    font-size: 11px;
  }
}

@media (min-width: 561px) and (max-width: 900px) {
  .workspace {
    grid-template-columns: minmax(270px, 320px) minmax(280px, 360px) !important;
  }
  .main-panel {
    max-width: 360px !important;
    padding: 8px !important;
  }
  .song-row {
    grid-template-columns: 40px minmax(0, 1fr) 20px !important;
    min-height: 50px !important;
  }
  .song-name {
    font-size: 13px !important;
  }
  .tempo-display input {
    font-size: clamp(42px, 8vw, 58px) !important;
  }
  .compact-card {
    padding: 9px !important;
  }
}

@media (min-width: 901px) {
  .workspace {
    grid-template-columns: minmax(340px, 440px) minmax(340px, 480px) !important;
  }
}


/* V22: current song title above BPM */
.metronome-song-name {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(14px, 1.7vw, 20px);
  line-height: 1.15;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 561px) {
  .metronome-song-name {
    max-width: 100%;
    margin-bottom: 6px;
  }
}
@media (max-width: 560px) {
  .metronome-song-name {
    font-size: 14px;
    margin-bottom: 6px;
  }
}


/* V22: fill the full app width, widen the playlist, and remove the empty right margin. */
@media (min-width: 561px) {
  html, body, .app-shell {
    width: 100%;
    max-width: none;
    overflow-x: hidden;
  }

  .workspace {
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: minmax(0, 1fr) clamp(320px, 38vw, 430px) !important;
    justify-content: stretch !important;
    align-items: start;
  }

  .playlist-panel {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
  }

  .main-panel {
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    grid-template-columns: 1fr !important;
    grid-template-areas: "selected" "metro" "player" !important;
  }

  .metronome-card,
  .player-card,
  .selected-strip {
    width: 100%;
    max-width: none;
  }

  .song-row {
    direction: ltr;
    grid-template-columns: 20px 30px 24px 48px minmax(0, 1fr) 30px !important;
    grid-template-areas: "drag edit audio bpm info number" !important;
    gap: 7px !important;
  }

  .song-info {
    min-width: 0;
    direction: rtl;
    text-align: right;
  }

  .song-name {
    font-size: 14px !important;
    line-height: 1.2;
    white-space: normal !important;
    overflow: hidden;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.4em;
    text-overflow: ellipsis;
  }

  .song-ts {
    font-size: 11px !important;
  }

  .compact-card {
    width: 100%;
  }
}

@media (min-width: 561px) and (max-width: 900px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) clamp(285px, 43vw, 350px) !important;
  }

  .main-panel {
    padding: 7px !important;
    gap: 7px !important;
  }

  .playlist-panel {
    padding: 9px 8px 11px !important;
  }

  .song-row {
    grid-template-columns: 18px 28px 22px 44px minmax(0, 1fr) 28px !important;
    gap: 6px !important;
    min-height: 50px !important;
    padding: 6px 7px !important;
  }

  .song-name {
    font-size: 13px !important;
  }

  .song-bpm {
    font-size: 16px !important;
  }

  .song-edit-btn {
    width: 28px;
    height: 28px;
  }

  .song-audio-indicator {
    width: 22px;
    height: 22px;
  }

  .song-number {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }

  .compact-card {
    padding: 8px !important;
  }

  .tempo-layout {
    margin: 6px 0 6px !important;
  }

  .tempo-display input {
    font-size: clamp(42px, 8vw, 56px) !important;
  }

  .metronome-song-name {
    font-size: 13px !important;
    margin-bottom: 4px !important;
  }

  .settings-bar {
    gap: 5px !important;
    padding: 5px !important;
  }

  .metronome-action-row {
    margin-top: 6px !important;
  }

  .metronome-action-row .secondary-btn,
  .metronome-toggle {
    min-height: 34px !important;
    font-size: 12px !important;
  }

  .transport {
    margin: 9px 0 7px !important;
  }

  .audio-main-btn {
    width: 50px !important;
    height: 50px !important;
  }

  .transport-btn {
    width: 36px !important;
    height: 36px !important;
  }
}

@media (min-width: 901px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) clamp(360px, 34vw, 460px) !important;
  }

  .playlist-panel {
    padding-inline: 12px !important;
  }

  .song-row {
    grid-template-columns: 22px 32px 26px 50px minmax(0, 1fr) 32px !important;
  }

  .song-name {
    font-size: 15px !important;
  }
}


/* V22: readiness, offline status and download-all tools */
.readiness-top-btn { position: relative; }
.readiness-dialog-content { padding: 20px; }
.readiness-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
}
.readiness-score { display: flex; align-items: baseline; gap: 9px; }
.readiness-score strong { color: var(--accent); font-size: 28px; line-height: 1; }
.readiness-score span { color: var(--muted); font-size: 12px; }
.readiness-overall { color: #ffb2b2; font-size: 12px; font-weight: 900; }
.readiness-overall.ready { color: #55d98a; }
.readiness-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.readiness-item {
  min-width: 0;
  padding: 11px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #181818;
  text-align: center;
}
.readiness-item span { display: block; color: var(--muted); font-size: 10px; }
.readiness-item strong { display: block; margin-top: 5px; color: var(--text); font-size: 15px; }
.readiness-issues { display: grid; gap: 7px; margin-top: 12px; }
.readiness-issue,
.readiness-ok { padding: 9px 11px; border-radius: 10px; font-size: 12px; }
.readiness-issue { background: rgba(255,101,101,.08); border: 1px solid rgba(255,101,101,.22); color: #ffc1c1; }
.readiness-ok { background: rgba(85,217,138,.08); border: 1px solid rgba(85,217,138,.22); color: #8beab0; }
.readiness-actions { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-top: 15px; }
.song-audio-indicator.ready { background: rgba(85,217,138,.12); color: #55d98a; border: 1px solid rgba(85,217,138,.25); }
.song-audio-indicator.pending { background: rgba(255,209,63,.08); color: var(--accent); border: 1px solid rgba(255,209,63,.22); }
.song-audio-indicator.missing { background: rgba(255,101,101,.08); }
@media (max-width: 720px) {
  .readiness-grid { grid-template-columns: 1fr 1fr; }
  .readiness-actions { grid-template-columns: 1fr; }
  .readiness-summary { grid-template-columns: 1fr; }
}
@media (max-width: 1050px) {
  .readiness-top-btn span { display: none; }
}
