/* The 2026-11 look refresh — the editor's small windows. Every rule starts with body.rf (see refresh-base.css). */

/* The small pop-ups «העורך» opens from its tools bar and its track heads
   (popovers.js + editor.js), dressed like «בחר מעבר» (refresh-editor.css,
   .tx-popover) — the approved one:
     - a white card, 14px corners, the pop-ups' hairline + soft shadow;
     - a tool's panel opens with its header: a 32px grey square with the tool's
       own icon (the one on its button in the bar), the tool's name 14px, and
       what it works on under it, small and grey (the clip / the track);
     - section names small and grey, a hairline running after them;
     - a choice of words (כיסוי/התאמה/מתיחה, בלי/דעיכה/ריוורב, 1/2/4/8/16):
       a grey capsule, the chosen one white with a hairline;
     - a choice of pictures or of two-line options (the looks, the beat
       modes): grey tiles, the chosen one white with a 1.5px teal ring;
     - a check-box row: one grey row; the files to pick: grey rows;
     - buttons 30px and flat: the main one teal, the others white + hairline;
     - the two short menus (V1's sound, «בדיקות») look like every other menu
       (refresh-menus.css): 32px rows, grey hover, chosen = teal words + ✓.
   Covered: «מהירות» (speed-popover), «גודל» (fit-popover — «התאמה לפריים»),
   «תיקון» (color-popover — «צבע ומראה»), «עמעום» (fade-popover), a sound
   track's head A1–A4 (audio-popover, both the empty «הוסף …» and a full
   track), V1's head (video-track-popover), «בדיקות» (tb-checks-popover) and
   «סדר לביט» (beatsync-popover). Same controls, same order, same behaviour.
   The export's progress card is the activity panel's running row (render
   kind, local-render.js → activity-center.js), dressed in refresh-menus.css.

   Phones and touch screens turn every pop-up into a bottom sheet with
   finger-sized controls (polish.css): only the colours below reach them; the
   sizes, the header and the layout are for a mouse and a wide window. */

body.rf {
  --rf-ep-ic-speed: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 14 4-4'/%3E%3Cpath d='M3.34 19a10 10 0 1 1 17.32 0'/%3E%3C/svg%3E");
  --rf-ep-ic-fit: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M14 15H9v-5'/%3E%3Cpath d='M16 3h5v5'/%3E%3Cpath d='M21 3 9 15'/%3E%3C/svg%3E");
  --rf-ep-ic-color: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72'/%3E%3Cpath d='m14 7 3 3'/%3E%3Cpath d='M5 6v4'/%3E%3Cpath d='M19 14v4'/%3E%3Cpath d='M10 2v2'/%3E%3Cpath d='M7 8H3'/%3E%3Cpath d='M21 16h-4'/%3E%3Cpath d='M11 3H9'/%3E%3C/svg%3E");
  --rf-ep-ic-fade: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='9' r='7'/%3E%3Ccircle cx='15' cy='15' r='7'/%3E%3C/svg%3E");
  --rf-ep-ic-audio: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 10v3'/%3E%3Cpath d='M6 6v11'/%3E%3Cpath d='M10 3v18'/%3E%3Cpath d='M14 8v7'/%3E%3Cpath d='M18 5v13'/%3E%3Cpath d='M22 10v3'/%3E%3C/svg%3E");
  --rf-ep-ic-beat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 13a2 2 0 0 0 2-2V7a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0V4a2 2 0 0 1 4 0v13a2 2 0 0 0 4 0v-4a2 2 0 0 1 2-2'/%3E%3C/svg%3E");
  /* the ✓ of the chosen row (refresh-menus.css defines it; same glyph here if it is not loaded) */
  --rf-ep-check: var(--rf-pop-check, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"));
}

/* which icon each header wears */
body.rf .popover.speed-popover {
  --rf-ep-ic: var(--rf-ep-ic-speed);
}
body.rf .popover.fit-popover {
  --rf-ep-ic: var(--rf-ep-ic-fit);
}
body.rf .popover.color-popover {
  --rf-ep-ic: var(--rf-ep-ic-color);
}
body.rf .popover.fade-popover {
  --rf-ep-ic: var(--rf-ep-ic-fade);
}
body.rf .popover.audio-popover {
  --rf-ep-ic: var(--rf-ep-ic-audio);
}
body.rf .popover.beatsync-popover {
  --rf-ep-ic: var(--rf-ep-ic-beat);
}

/* ═════════════ the pop-up itself ═════════════ */
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover, .video-track-popover, .tb-checks-popover) {
  border: 0;
  border-radius: 14px;
  background: var(--rf-card);
  box-shadow: var(--rf-pop-shadow, var(--shadow-lg));
  color: var(--text);
}
/* the two short menus: the corners of every other menu */
body.rf .popover:is(.video-track-popover, .tb-checks-popover) {
  border-radius: 12px;
}

/* ═════════════ words: names, section names, notes ═════════════ */
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover) :is(.popover-title, .popover-label) {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-3);
}
/* a hairline runs after a section name, like «בסיס ——» in «בחר מעבר» */
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover) :is(.popover-title, .popover-label)::after {
  content: "";
  flex: 1;
  min-width: 12px;
  height: 1px;
  background: var(--rf-line);
}
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover) .popover-subtle {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-3);
}
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover) .popover-clip-name {
  border-bottom-color: var(--rf-line);
}
body.rf .popover .popover-section + .popover-section {
  border-top-color: var(--rf-line);
}
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover) .popover-divider {
  background: var(--rf-line);
}
/* the read-out under «מהירות» («משך: 4.3 ש׳ · מהירות 1.50×»): numbers that do not jump */
body.rf .popover.speed-popover .popover-subtle,
body.rf .popover .slider-row .value {
  font-variant-numeric: tabular-nums;
}
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover) .slider-row > label {
  color: var(--text-2);
}
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover) .slider-row .value {
  color: var(--text-3);
}
body.rf .popover.speed-popover .speed-slider-ends {
  letter-spacing: normal;
  color: var(--text-3);
}

/* ═════════════ a choice of words: a grey capsule, the chosen one white ═════════════ */
body.rf .popover :is(.fit-grid, .audio-fx-row, .beatsync-chip-grid) {
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--rf-grey);
}
body.rf .popover :is(.fit-chip, .audio-fx-chip, .beatsync-chip) {
  border: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: var(--text-2);
}
body.rf .popover :is(.fit-chip, .audio-fx-chip, .beatsync-chip):hover:not(.is-selected) {
  border: 0;
  background: color-mix(in srgb, var(--rf-card) 55%, transparent);
  color: var(--text);
}
body.rf .popover :is(.fit-chip, .audio-fx-chip, .beatsync-chip).is-selected {
  border: 0;
  background: var(--rf-card);
  box-shadow: var(--rf-raise);
  color: var(--text);
}

/* ═════════════ a check-box row: one grey row ═════════════ */
body.rf .popover :is(.fit-blur-row, .speed-motion-fix) {
  border: 0;
  border-radius: 10px;
  background: var(--rf-grey);
  color: var(--text-2);
}
body.rf .popover .speed-motion-fix:hover,
body.rf .popover .fit-blur-row:not(.is-disabled):hover {
  border: 0;
  background: var(--rf-grey-2);
}
body.rf .popover :is(.fit-blur-row, .speed-motion-fix) input {
  accent-color: var(--accent);
}
body.rf .popover .speed-motion-fix-title {
  color: var(--text);
}
body.rf .popover .speed-motion-fix-hint {
  color: var(--text-3);
}

/* ═════════════ buttons: flat; the quiet ones white with a hairline ═════════════ */
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover) .btn {
  box-shadow: none;
}
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover) :is(.btn-ghost, .btn-secondary) {
  border: 0;
  background: var(--rf-card);
  box-shadow: var(--rf-raise);
  color: var(--text-2);
}
body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover) :is(.btn-ghost, .btn-secondary):hover:not(:disabled) {
  border: 0;
  background: var(--rf-grey);
  box-shadow: var(--rf-raise);
  color: var(--text);
}
/* «הסר ערוץ נוסף» keeps its red words; it turns soft red under the mouse */
body.rf .popover.audio-popover > .popover-divider + .btn-ghost:hover:not(:disabled) {
  background: var(--rf-danger-soft);
}
body.rf .popover .popover-actions {
  border-top-color: var(--rf-line);
}

/* «תיקון אוטומטי»: the main action, the site's own teal — no orange, no glow */
body.rf .popover.color-popover .auto-correct-btn {
  border: 0;
  background-color: var(--accent);
  background-image: var(--rf-primary-grad, none);
  box-shadow: none;
  color: var(--text-on-accent);
}
body.rf .popover.color-popover .auto-correct-btn:hover:not(:disabled) {
  background-color: var(--accent-hover);
  background-image: var(--rf-primary-grad-hover, none);
  box-shadow: none;
  transform: none;
  filter: none;
}

/* ═════════════ «צבע ומראה»: the picture and the looks ═════════════ */
body.rf .popover.color-popover .source-monitor {
  border-radius: 10px;
}
/* each look: a grey tile, its colours in a small picture inside, the name
   under it — the chosen one white with a teal ring (the tiles of «בחר מעבר») */
body.rf .popover.color-popover .look-chip {
  aspect-ratio: 1.55;
  border: 0;
  border-radius: 10px;
  background-color: var(--rf-grey);
  /* the look's colours (editor.css, per data-look) move into ::before */
  background-size: 0 0;
  background-repeat: no-repeat;
  box-shadow: none;
  transition: background-color 0.12s var(--ease-out);
}
body.rf .popover.color-popover .look-chip::before {
  content: "";
  position: absolute;
  inset: 4px 4px 22px 4px;
  border-radius: 7px;
  background-image: inherit;
  background-size: cover;
  pointer-events: none;
}
body.rf .popover.color-popover .look-chip:hover {
  transform: none;
  border: 0;
  background-color: var(--rf-grey-2);
}
body.rf .popover.color-popover .look-chip.is-selected {
  background-color: var(--rf-card);
  box-shadow: 0 0 0 1.5px var(--accent);
}
body.rf .popover.color-popover .look-chip .look-name {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 0 4px;
  background: transparent;
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: normal;
  white-space: nowrap;
}
body.rf .popover.color-popover .look-chip.is-selected .look-name {
  color: var(--text);
  font-weight: 700;
}

/* ═════════════ a sound track's head (A1–A4) ═════════════ */
body.rf .popover.audio-popover .audio-pop-name {
  border: 0;
  border-radius: 9px;
  background: var(--rf-grey);
  color: var(--text);
}
/* «מהקבצים בפרויקט»: grey rows */
body.rf .popover.audio-popover .audio-pick-list {
  gap: 2px;
}
body.rf .popover.audio-popover .audio-pick-item {
  border: 0;
  border-radius: 9px;
  background: var(--rf-grey);
  color: var(--text);
}
body.rf .popover.audio-popover .audio-pick-item > .ui-icon {
  color: var(--text-3);
}
body.rf .popover.audio-popover .audio-pick-item:hover {
  border: 0;
  background: var(--rf-grey-2);
}
body.rf .popover.audio-popover .audio-pick-item:hover > .ui-icon {
  color: var(--accent);
}
/* «העלה קובץ חדש»: a dashed white frame, like an empty place on «קבצים» */
body.rf .popover.audio-popover .audio-upload-zone {
  border: 1.5px dashed var(--rf-line-2);
  border-radius: 12px;
  background: var(--rf-card);
  color: var(--text-2);
}
body.rf .popover.audio-popover .audio-upload-zone:hover {
  border-color: var(--accent);
  background: var(--rf-card);
  color: var(--accent);
}
body.rf .popover.audio-popover .audio-upload-hint {
  color: var(--text-3);
}

/* ═════════════ the two short menus: V1's sound, «בדיקות» ═════════════ */
body.rf .popover:is(.video-track-popover, .tb-checks-popover) > .popover-title {
  margin: 0;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text-3);
}
/* V1: two rows; the one that is on = teal words + a ✓ at the end */
body.rf .popover.video-track-popover .video-track-mute-option {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--text);
}
body.rf .popover.video-track-popover .video-track-mute-option > .ui-icon {
  color: var(--text-3);
}
body.rf .popover.video-track-popover .video-track-mute-option:hover {
  border: 0;
  background: var(--rf-grey);
}
body.rf .popover.video-track-popover .video-track-mute-option.is-selected {
  border: 0;
  background: transparent;
  color: var(--accent);
}
body.rf .popover.video-track-popover .video-track-mute-option.is-selected > .ui-icon {
  color: var(--accent);
}
body.rf .popover.video-track-popover .video-track-mute-option.is-selected:hover {
  background: var(--rf-grey);
}
body.rf .popover.video-track-popover .video-track-mute-option.is-selected::after {
  content: "";
  position: absolute;
  inset-inline-end: 10px;
  top: 50%;
  width: 11px;
  height: 11px;
  margin-top: -5.5px;
  background-color: var(--accent);
  -webkit-mask: var(--rf-ep-check) center / contain no-repeat;
  mask: var(--rf-ep-check) center / contain no-repeat;
  pointer-events: none;
}
/* «בדיקות»: each tool's icon in a small grey circle, like on the bar it opens from */
body.rf .popover.tb-checks-popover .tb-checks-item {
  color: var(--text);
}
body.rf .popover.tb-checks-popover .tb-checks-item-icon {
  border-radius: 50%;
  background: var(--rf-grey);
  color: var(--text-2);
}
body.rf .popover.tb-checks-popover .tb-checks-item:hover:not(:disabled) {
  background: var(--rf-grey);
}
body.rf .popover.tb-checks-popover .tb-checks-item:hover:not(:disabled) .tb-checks-item-icon {
  background: var(--rf-card);
  color: var(--accent);
}
body.rf .popover.tb-checks-popover .tb-checks-item:active:not(:disabled) {
  transform: none;
}

/* ═════════════ «סדר לביט» ═════════════ */
body.rf .popover.beatsync-popover .beatsync-tool-head {
  border-bottom: 0;
}
body.rf .popover.beatsync-popover .beatsync-tool-title {
  color: var(--text);
}
/* «BPM 120»: a small grey capsule */
body.rf .popover.beatsync-popover .beatsync-status {
  border: 0;
  background: var(--rf-grey);
  color: var(--text-2);
}
/* ↺ (back to the lengths before): a quiet grey square */
body.rf .popover.beatsync-popover .beatsync-reset-btn {
  border: 0;
  background: var(--rf-grey);
  color: var(--text-3);
}
body.rf .popover.beatsync-popover .beatsync-reset-btn:hover:not(:disabled) {
  border: 0;
  background: var(--rf-grey-2);
  color: var(--accent);
}
/* the two ways (יישר לביט / אורך אחיד): grey tiles, the chosen one white + a teal ring */
body.rf .popover.beatsync-popover .beatsync-mode {
  border: 0;
  background: var(--rf-grey);
  box-shadow: none;
  color: var(--text-2);
}
body.rf .popover.beatsync-popover .beatsync-mode:hover:not(.is-selected) {
  border: 0;
  background: var(--rf-grey-2);
  color: var(--text);
}
body.rf .popover.beatsync-popover .beatsync-mode.is-selected {
  border: 0;
  background: var(--rf-card);
  box-shadow: 0 0 0 1.5px var(--accent);
  color: var(--text);
}
body.rf .popover.beatsync-popover .beatsync-mode-hint,
body.rf .popover.beatsync-popover .beatsync-mode.is-selected .beatsync-mode-hint {
  color: var(--text-3);
}
/* «ידני … ביטים»: a white field with a hairline (its number arrows are the
   browser's own, white); the teal ring while typing */
body.rf .popover.beatsync-popover .beatsync-manual {
  border: 1px solid var(--rf-line-2);
  background: var(--rf-card);
}
body.rf .popover.beatsync-popover .beatsync-manual:focus-within {
  border-color: var(--accent);
  background: var(--rf-card);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
body.rf .popover.beatsync-popover .beatsync-manual-label {
  color: var(--text-2);
}
body.rf .popover.beatsync-popover .export-note {
  color: var(--text-3);
}
body.rf .popover.beatsync-popover .beatsync-footer {
  border-top-color: var(--rf-line);
  background: var(--rf-card);
}

/* ═════════════ sizes and the header — a mouse and a wide window ═════════════ */
@media (hover: hover) and (min-width: 769px) {
  body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover) {
    --rf-ep-gap: 8px;
    padding: 12px;
    gap: var(--rf-ep-gap);
  }
  /* the tallest one keeps its old 6px rhythm, so it is no taller than before */
  body.rf .popover.color-popover {
    --rf-ep-gap: 6px;
  }

  /* ── the header: [icon] the tool's name / what it works on ──
     «מהירות», «גודל» and «צבע ומראה» name their tool inside their section,
     under the clip's name: the section steps aside (display: contents) so
     the two lines can swap — the tool on top, the clip under it, as in
     «בחר מעבר / בין הקטעים». The DOM is unchanged. */
  body.rf .popover:is(.speed-popover, .fit-popover, .color-popover) > .popover-section:has(> .popover-title:first-child) {
    display: contents;
  }
  body.rf .popover:is(.speed-popover, .fit-popover, .color-popover) > .popover-section > .popover-title:first-child,
  body.rf .popover:is(.fade-popover, .audio-popover) > .popover-title:first-child {
    order: -2;
    position: relative;
    display: block;
    min-height: 0;
    margin: 0;
    padding-block: 1px 0;
    padding-inline-start: 42px;
    font-size: 14px;
    font-weight: 700;
    line-height: 17px;
    color: var(--text);
  }
  /* the grey square */
  body.rf .popover:is(.speed-popover, .fit-popover, .color-popover) > .popover-section > .popover-title:first-child::before,
  body.rf .popover:is(.fade-popover, .audio-popover) > .popover-title:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-start: 0;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--rf-grey);
  }
  /* the tool's icon in it (the same glyph as its button on the bar) */
  body.rf .popover:is(.speed-popover, .fit-popover, .color-popover) > .popover-section > .popover-title:first-child::after,
  body.rf .popover:is(.fade-popover, .audio-popover) > .popover-title:first-child::after {
    content: "";
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    flex: none;
    width: 16px;
    height: 16px;
    min-width: 0;
    background: var(--text-2);
    -webkit-mask: var(--rf-ep-ic) center / contain no-repeat;
    mask: var(--rf-ep-ic) center / contain no-repeat;
  }
  /* a header with no second line («הוסף A1 · מוזיקה»): the name sits in the
     middle of the square */
  body.rf .popover.audio-popover > .popover-title:first-child:not(:has(+ .audio-pop-name)) {
    padding-top: 7.5px;
    min-height: 32px;
    box-sizing: border-box;
  }
  /* the second line: the clip, the track's file, or what the fade does */
  body.rf .popover:is(.speed-popover, .fit-popover, .color-popover) > .popover-clip-name,
  body.rf .popover.fade-popover > .popover-title:first-child + .popover-subtle,
  body.rf .popover.audio-popover > .popover-title:first-child + .audio-pop-name {
    order: -1;
    min-height: 15px;
    margin: calc(1px - var(--rf-ep-gap, 8px)) 0 4px;
    padding: 0;
    padding-inline-start: 42px;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--text-3);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 15px;
    letter-spacing: normal;
    text-align: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* the fade's line is a sentence: it may take two lines */
  body.rf .popover.fade-popover > .popover-title:first-child + .popover-subtle {
    white-space: normal;
  }

  /* ── section names, notes, hairlines ── */
  body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover) :is(.popover-title, .popover-label) {
    min-height: 16px;
    margin-block: 2px 0;
    line-height: 1.3;
  }
  /* a hairline before a section name is one line too many: the name has its own */
  body.rf .popover:is(.color-popover, .audio-popover) > .popover-divider:has(+ .popover-label),
  body.rf .popover.color-popover .popover-divider:has(+ .popover-label) {
    display: none;
  }
  body.rf .popover:is(.color-popover, .audio-popover) .popover-label {
    margin-top: 6px;
  }
  body.rf .popover:is(.color-popover, .audio-popover, .fade-popover) .popover-divider {
    margin: 2px 0;
  }
  body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover) .popover-subtle {
    margin: 0;
  }
  body.rf .popover.color-popover .popover-subtle:not([style]) {
    margin-top: 2px;
  }

  /* ── sliders: the transition's row — the name, the line, the number ── */
  body.rf .popover:is(.fit-popover, .color-popover, .fade-popover, .audio-popover) .slider-row {
    grid-template-columns: 76px 1fr 40px;
    gap: 8px;
    min-height: 20px;
  }
  body.rf .popover:is(.fit-popover, .color-popover, .fade-popover, .audio-popover) .slider-row > label {
    overflow: hidden;
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  body.rf .popover:is(.fit-popover, .color-popover, .fade-popover, .audio-popover) .slider-row .value {
    font-size: 11px;
  }
  body.rf .popover.speed-popover .speed-slider {
    gap: 3px;
    margin-top: 2px;
  }
  body.rf .popover.speed-popover .speed-slider-ends {
    font-size: 10.5px;
    font-weight: 600;
  }
  body.rf .popover.speed-popover .popover-subtle {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-2);
  }

  /* ── a choice of words: the capsule's options ── */
  body.rf .popover :is(.fit-chip, .audio-fx-chip, .beatsync-chip) {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
  }

  /* ── the check-box rows ── */
  body.rf .popover.fit-popover .fit-blur-row {
    margin-top: 0;
    padding: 8px 10px;
    font-size: 12px;
  }
  body.rf .popover.speed-popover .speed-motion-fix {
    margin-top: 2px;
    padding: 8px 10px;
  }
  body.rf .popover.speed-popover .speed-motion-fix-title {
    font-size: 12px;
    font-weight: 600;
  }
  body.rf .popover.speed-popover .speed-motion-fix-hint {
    font-size: 10.5px;
  }

  /* ── buttons: 30px, the main one 32px ── */
  body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover) .btn {
    min-height: 30px;
    padding: 5px 12px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
  }
  body.rf .popover:is(.speed-popover, .fit-popover, .color-popover, .fade-popover, .audio-popover, .beatsync-popover) .btn-primary {
    min-height: 32px;
    font-size: 12.5px;
  }
  body.rf .popover .popover-actions {
    margin-top: 2px;
    padding-top: 10px;
  }

  /* ── «צבע ומראה» ── */
  body.rf .popover.color-popover .look-grid {
    gap: 6px;
  }

  /* ── a sound track's head ── */
  body.rf .popover.audio-popover .audio-pick-item {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 12.5px;
  }
  body.rf .popover.audio-popover .audio-upload-zone-compact {
    padding: 12px;
  }
  body.rf .popover.audio-popover .audio-upload-text {
    font-size: 12.5px;
  }
  body.rf .popover.audio-popover .audio-upload-hint {
    font-size: 10.5px;
  }

  /* ── the two short menus ── */
  body.rf .popover.video-track-popover {
    padding: 5px;
    gap: 1px;
  }
  body.rf .popover:is(.video-track-popover, .tb-checks-popover) > .popover-title {
    padding: 7px 10px 4px;
    font-size: 11px;
    font-weight: 700;
  }
  body.rf .popover.video-track-popover .video-track-mute-option {
    min-height: 32px;
    padding: 0 10px;
    padding-inline-end: 28px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 500;
  }
  body.rf .popover.video-track-popover .video-track-mute-option.is-selected {
    font-weight: 600;
  }
  body.rf .popover.tb-checks-popover {
    gap: 1px;
  }
  body.rf .popover.tb-checks-popover .tb-checks-item {
    gap: 8px;
    min-height: 32px;
    padding: 4px 6px;
    border-radius: 8px;
  }
  body.rf .popover.tb-checks-popover .tb-checks-item-icon {
    width: 23px;
    height: 23px;
  }
  body.rf .popover.tb-checks-popover .tb-checks-item-label {
    font-size: 12.5px;
    font-weight: 500;
  }

  /* ── «סדר לביט» ── */
  body.rf .popover.beatsync-popover {
    gap: 10px;
  }
  /* the header: the grey square (::before), the icon in it (on the title),
     the name, «BPM 120», ↺ */
  body.rf .popover.beatsync-popover .beatsync-tool-head {
    position: relative;
    gap: 8px;
    padding-bottom: 0;
  }
  body.rf .popover.beatsync-popover .beatsync-tool-head::before {
    content: "";
    flex: none;
    width: 32px;
    height: 32px;
    margin-inline-end: 2px;
    border-radius: 9px;
    background: var(--rf-grey);
  }
  body.rf .popover.beatsync-popover .beatsync-tool-title::before {
    content: "";
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    width: 16px;
    height: 16px;
    background: var(--text-2);
    -webkit-mask: var(--rf-ep-ic) center / contain no-repeat;
    mask: var(--rf-ep-ic) center / contain no-repeat;
  }
  body.rf .popover.beatsync-popover .beatsync-tool-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: normal;
  }
  body.rf .popover.beatsync-popover .beatsync-status {
    padding: 3px 8px;
    font-size: 10.5px;
  }
  body.rf .popover.beatsync-popover .beatsync-reset-btn {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  body.rf .popover.beatsync-popover .beatsync-modes {
    gap: 6px;
  }
  body.rf .popover.beatsync-popover .beatsync-mode {
    padding: 8px 10px;
    border-radius: 10px;
  }
  body.rf .popover.beatsync-popover .beatsync-mode-label {
    font-size: 12px;
    font-weight: 700;
  }
  body.rf .popover.beatsync-popover .beatsync-mode-hint {
    font-size: 10.5px;
  }
  body.rf .popover.beatsync-popover .beatsync-chip-grid {
    margin-top: -2px;
  }
  body.rf .popover.beatsync-popover .beatsync-manual {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 9px;
  }
  body.rf .popover.beatsync-popover .export-note {
    font-size: 11.5px;
    line-height: 1.45;
  }
  body.rf .popover.beatsync-popover .beatsync-footer {
    padding-top: 10px;
  }
  body.rf .popover.beatsync-popover .beatsync-footer .btn {
    min-height: 32px;
    border-radius: 9px;
  }
}
