: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);
}

* { 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 16px;
  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; }
}
