/* REBOT vezérlő v2 — Mozgások (lista + szerkesztő + motor beállítás). View-specific styles; owned by the view developer.
   Section rules are scoped to [data-view="moves"]; sheets (rendered in #sheet-host) use .sheet-mv-* / .mv-* classes.
   Layout: UI §11.2 + final-spec §5 #1, #4–#7. Tokens only. */

/* ================================================================ layout */

[data-view="moves"] .mv { display: grid; gap: var(--sp-6); align-items: start; }
[data-view="moves"] .mv-list-pane,
[data-view="moves"] .mv-editor-pane { min-width: 0; }

/* Phone / tablet / landscape phone: list and editor are separate routes. */
@media (max-width: 1023px) {
  [data-view="moves"] .mv[data-route="editor"] .mv-list-pane { display: none; }
  [data-view="moves"] .mv[data-route="list"] .mv-editor-pane { display: none; }
}
/* Tablet portrait: phone flow, content max 720 px (UI §11.2). */
@media (min-width: 640px) and (max-width: 1023px) and (min-height: 521px) {
  [data-view="moves"] .mv-list-pane,
  [data-view="moves"] .mv-editor-pane { width: 100%; max-width: 720px; margin-inline: auto; }
}
/* Desktop: 320 px list card + editor. */
@media (min-width: 1024px) {
  [data-view="moves"] .mv { grid-template-columns: 320px minmax(0, 1fr); }
  [data-view="moves"] .mv.is-empty { grid-template-columns: minmax(0, 1fr); }
  [data-view="moves"] .mv.is-empty .mv-editor-pane { display: none; }
  [data-view="moves"] .mv-list-pane {
    position: sticky; top: calc(var(--topbar-h) + var(--sp-8));
    max-height: calc(100dvh - var(--topbar-h) - var(--sp-8) * 2 - var(--np-h));
    overflow: auto; overscroll-behavior: contain;
    padding: var(--sp-5) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-lg);
    background: var(--surface); box-shadow: var(--sh-1);
  }
  [data-view="moves"] .mv.is-empty .mv-list-pane { position: static; max-height: none; width: 100%; max-width: 720px; margin-inline: auto; }
  [data-view="moves"] .mv-list-head .view-title { font-size: var(--fs-xl); }
  /* „Mozgások” + „Új mozgás” stay at the top of the scrolling list card. */
  [data-view="moves"] .mv:not(.is-empty) .mv-list-head {
    position: sticky; z-index: 2; top: calc(-1 * var(--sp-5)); margin: calc(-1 * var(--sp-5)) calc(-1 * var(--sp-3)) var(--sp-3);
    padding: var(--sp-5) var(--sp-3) var(--sp-2); background: var(--surface); box-shadow: 0 1px 0 var(--line);
  }
  [data-view="moves"] .mv-list-head .btn { width: 100%; }
  /* compact rows inside the 320 px card */
  [data-view="moves"] .mv:not(.is-empty) .mv-list-pane { padding-inline: var(--sp-3); }
  [data-view="moves"] .mv-row { gap: 2px; padding-right: 4px; }
  [data-view="moves"] .mv-row .list-item-main { gap: 10px; padding-left: 10px; padding-right: 4px; }
  [data-view="moves"] .mv-row .avatar { width: 40px; height: 40px; border-radius: 12px; font-size: var(--fs-lg); }
  [data-view="moves"] .mv-row .play-btn { width: 44px; height: 44px; margin-inline: 0; }
  [data-view="moves"] .mv-row .icon-btn { width: 44px; }
}

/* ================================================================== list */

[data-view="moves"] .mv-list-head .btn { margin-bottom: var(--lip); }
[data-view="moves"] .mv-list { grid-template-columns: minmax(0, 1fr); }
[data-view="moves"] .mv-row { min-height: 76px; }
[data-view="moves"] .mv-row .list-item-main { padding-block: var(--sp-2); }
[data-view="moves"] .mv-row .avatar { color: var(--brand-ink); font-size: 1.375rem; }
[data-view="moves"] .mv-row[aria-current="true"] .avatar,
[data-view="moves"] .mv-row.is-selected .avatar { color: var(--on-brand); }
[data-view="moves"] .avatar.is-emoji { font-size: 1.625rem; font-weight: var(--fw-body); }
[data-view="moves"] .mv-row.is-running { border-color: var(--go); }
[data-view="moves"] .mv-row .play-btn { margin-inline: var(--sp-1); }

[data-view="moves"] .mv-used { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
[data-view="moves"] .mv-used-chip {
  display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; min-height: 24px; padding: 0 8px;
  border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-2);
  font-size: var(--fs-xs); font-weight: var(--fw-label); line-height: 1.25;
}
[data-view="moves"] .mv-used-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-block: 2px; }
[data-view="moves"] .mv-used-chip .icon { width: 14px; height: 14px; }
[data-view="moves"] .mv-row[aria-current="true"] .mv-used-chip,
[data-view="moves"] .mv-row.is-selected .mv-used-chip { background: var(--surface); }

[data-view="moves"] .mv-row-run { display: flex; align-items: center; gap: var(--sp-2); margin-top: 6px; color: var(--go-ink); font-size: var(--fs-sm); font-weight: var(--fw-button); }
[data-view="moves"] .mv-row-meter { flex: 1; height: 6px; min-width: 40px; max-width: 160px; border-radius: var(--r-pill); background: var(--go-tint); overflow: hidden; }
[data-view="moves"] .mv-row-meter > i { display: block; height: 100%; width: calc(var(--v, 0) * 100%); background: var(--go); border-radius: inherit; transition: width var(--dur-2) linear; }

[data-view="moves"] .mv-empty { padding-top: var(--sp-4); }
/* Phones/tablets: the empty state sits in a card like on Irányítás (UI §8.16); desktop already wraps the pane. */
@media (max-width: 1023px) {
  [data-view="moves"] .mv-empty {
    padding: var(--sp-6) var(--sp-4); border: 1px solid var(--line); border-radius: var(--r-lg);
    background: var(--surface); box-shadow: var(--sh-1);
  }
}

/* ========================================================= editor header */

[data-view="moves"] .mv-ed-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-3); }
[data-view="moves"] .mv-back { margin-left: -10px; }
@media (min-width: 1024px) { [data-view="moves"] .mv-back { display: none; } }
[data-view="moves"] .mv-title-wrap { display: flex; align-items: center; gap: var(--sp-1); flex: 1 1 12rem; min-width: 0; }
[data-view="moves"] .mv-title {
  min-width: 0; font-size: var(--fs-2xl); font-weight: var(--fw-title); line-height: 1.25;
  overflow-wrap: anywhere; text-wrap: wrap; outline: none; padding-block: 2px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
[data-view="moves"] .mv-title-text { cursor: text; }
[data-view="moves"] .mv-title-input { flex: 1; min-width: 0; font-size: var(--fs-xl); font-weight: var(--fw-title); }
[data-view="moves"] .mv-ed-actions { display: flex; align-items: center; gap: var(--sp-2); }
[data-view="moves"] .mv-ed-actions .btn { padding-inline: var(--sp-4); }
[data-view="moves"] .mv.is-bar .mv-ed-actions { display: none; }
@media (max-width: 1023px) { [data-view="moves"] .mv-more { margin-right: -8px; } }

/* =============================================================== timeline */

[data-view="moves"] .mv-strip-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); }
[data-view="moves"] .mv-strip-label { font-size: var(--fs-md); font-weight: var(--fw-button); color: var(--ink-2); }
[data-view="moves"] .mv-ed-meta { font-size: var(--fs-sm); font-weight: var(--fw-label); color: var(--ink-3); white-space: nowrap; }

[data-view="moves"] .mv-strip {
  display: flex; align-items: stretch; gap: var(--sp-2);
  margin: 0 calc(var(--sp-1) * -1); padding: var(--sp-2) var(--sp-1) var(--sp-3);
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin;
}
[data-view="moves"] .mv-chips { display: flex; gap: var(--sp-2); }
[data-view="moves"] .mv-chip {
  position: relative; flex: none; width: var(--w, 112px); height: 96px;
  display: grid; grid-template-rows: auto 1fr auto; justify-items: start; align-items: center; gap: 2px;
  padding: var(--sp-2) 10px; border: var(--bw) solid var(--line); border-radius: var(--r-md);
  background: var(--surface); color: var(--ink); cursor: pointer; overflow: hidden;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  transition: border-color var(--dur-2), background var(--dur-2), box-shadow var(--dur-2), width var(--dur-2) var(--ease-out);
}
[data-view="moves"] .mv-chip:hover { border-color: var(--line-2); }
[data-view="moves"] .mv-chip:focus-visible { outline-offset: 1px; }
[data-view="moves"] .mv-chip > span:not(.mv-chip-sweep) { position: relative; z-index: 1; }
[data-view="moves"] .mv-chip-num { font-size: var(--fs-md); font-weight: var(--fw-display); line-height: 1.2; }
[data-view="moves"] .mv-chip-fp { display: block; width: 100%; max-width: 70px; line-height: 0; }
[data-view="moves"] .mv-chip-fp svg { display: block; width: 100%; height: auto; }
[data-view="moves"] .mv-chip-dur { font-size: var(--fs-xs); font-weight: var(--fw-label); color: var(--ink-3); white-space: nowrap; line-height: 1.25; }
[data-view="moves"] .mv-chip[aria-selected="true"] {
  border-color: var(--brand); background: var(--brand-tint);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}
[data-view="moves"] .mv-chip[aria-selected="true"] .mv-chip-dur { color: var(--brand-ink); }
/* live (Élő próba) dot */
[data-view="moves"] .mv-chip.is-live::after {
  content: ""; position: absolute; z-index: 2; top: 9px; right: 9px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--go); animation: mv-pulse 1.4s var(--ease-out) infinite;
}
/* playhead (UI §10): go border + sweep over the step's duration */
[data-view="moves"] .mv-chip.is-playing { border-color: var(--go); box-shadow: 0 0 0 3px color-mix(in srgb, var(--go) 25%, transparent); }
[data-view="moves"] .mv-chip-sweep {
  position: absolute; z-index: 0; left: 0; top: 0; bottom: 0; width: 0;
  background: color-mix(in srgb, var(--go) 20%, transparent); pointer-events: none;
}
[data-view="moves"] .mv-chip.is-playing .mv-chip-sweep { animation: mv-sweep var(--step-ms, 1000ms) linear var(--step-delay, 0ms) forwards; }
[data-view="moves"] .mv-chip.is-new { animation: mv-chip-in 200ms var(--ease-out); }
@keyframes mv-sweep { from { width: 0; } to { width: 100%; } }
@keyframes mv-chip-in { from { transform: scale(.9); opacity: .4; } }
@keyframes mv-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--go) 55%, transparent); }
  100% { box-shadow: 0 0 0 9px transparent; }
}

[data-view="moves"] .mv-add {
  flex: none; display: grid; place-content: center; justify-items: center; gap: 2px; width: 72px; height: 96px; padding: 0;
  border: var(--bw) dashed var(--line-strong); border-radius: var(--r-md); background: transparent; color: var(--ink-2);
  font-size: var(--fs-sm); font-weight: var(--fw-button); cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-2), border-color var(--dur-2), color var(--dur-2);
}
[data-view="moves"] .mv-add .icon { width: 26px; height: 26px; }
[data-view="moves"] .mv-add:hover { background: var(--surface); border-color: var(--brand); color: var(--brand-ink); }

/* ============================================================ Élő próba row */

[data-view="moves"] .mv-live {
  min-height: 64px; margin: var(--sp-1) 0 var(--sp-4); padding: var(--sp-2) var(--sp-3) var(--sp-2) var(--sp-3);
  border: var(--bw) solid var(--line); border-radius: var(--r-md); background: var(--surface);
  transition: background var(--dur-2), border-color var(--dur-2);
}
[data-view="moves"] .mv-live .switch-text { flex: 1; }
[data-view="moves"] .mv-live-icon {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--surface-2); color: var(--ink-2);
}
[data-view="moves"] .mv-live-icon .icon { width: 22px; height: 22px; }
[data-view="moves"] .mv-live:hover { border-color: var(--line-2); }
[data-view="moves"] .mv-live.is-on { border-color: var(--go); background: var(--go-tint); }
[data-view="moves"] .mv-live.is-on .mv-live-icon { background: var(--go); color: var(--on-go); }
[data-view="moves"] .mv-live.is-on .switch-sub { color: var(--go-ink); }
[data-view="moves"] .mv-live.is-disabled { cursor: not-allowed; }
[data-view="moves"] .mv-live.is-disabled .switch-label { color: var(--ink-2); }
[data-view="moves"] .mv-live.is-disabled input { opacity: .45; cursor: not-allowed; }

/* ============================================================== step card */

[data-view="moves"] .mv-step { padding: 0; transition: border-color var(--dur-2); }
[data-view="moves"] .mv-step.is-live { border: var(--bw) solid var(--go); }
[data-view="moves"] .mv-live-strip {
  display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-5);
  border-radius: calc(var(--r-lg) - 2px) calc(var(--r-lg) - 2px) 0 0;
  background: var(--go-tint); color: var(--go-ink); font-size: var(--fs-sm); font-weight: var(--fw-button);
}
[data-view="moves"] .mv-pulse { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--go); animation: mv-pulse 1.4s var(--ease-out) infinite; }

[data-view="moves"] .mv-step-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-3); padding: var(--sp-4) var(--sp-5) 0; }
[data-view="moves"] .mv-step-title { font-size: var(--fs-xl); font-weight: var(--fw-title); margin-right: auto; }
[data-view="moves"] .mv-step-tools { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
[data-view="moves"] .mv-tool { padding: 0 var(--sp-3); gap: 6px; }
[data-view="moves"] .mv-tool .icon { width: 20px; height: 20px; }
[data-view="moves"] .mv-tool-move { min-width: 44px; padding: 0 var(--sp-3); }
[data-view="moves"] .mv-tools-gap { display: none; }
[data-view="moves"] .mv-step-body { display: grid; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5) var(--sp-5); }

/* Phones: „3. lépés” on its own row, toolbar [Másolás][◀][▶] … [Törlés] below (final-spec §5 #5). */
@media (max-width: 639px) {
  [data-view="moves"] .mv-step-head { flex-direction: column; align-items: stretch; padding: var(--sp-4) var(--sp-3) 0; }
  [data-view="moves"] .mv-step-tools { gap: 6px; }
  [data-view="moves"] .mv-tools-gap { display: block; flex: 1; }
  [data-view="moves"] .mv-tool { padding: 0 10px; }
  [data-view="moves"] .mv-tool-move { width: 44px; padding: 0; }
  [data-view="moves"] .mv-tool-label { display: none; }
  [data-view="moves"] .mv-step-body { padding: var(--sp-3) var(--sp-3) var(--sp-3); }
  [data-view="moves"] .mv-live-strip { padding-inline: var(--sp-3); }
}

/* ============================================================= motor tile */

[data-view="moves"] .mv-motors { display: grid; gap: var(--sp-3); }
@media (min-width: 640px) { [data-view="moves"] .mv-motors { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
[data-view="moves"] .mv-motor { container-type: inline-size; padding: var(--sp-3); }
/* Phone: R1 [badge][name][−][value][+] · R2 [dial 64][slider] · R3 3 quick chips (final-spec §5 #1). */
[data-view="moves"] .mv-m-grid {
  display: grid; grid-template-columns: 64px minmax(0, 1fr);
  grid-template-areas: "head head" "dial slider" "quick quick" "hint hint";
  align-items: center; gap: var(--sp-1) var(--sp-2);
}
[data-view="moves"] .mv-m-head { grid-area: head; display: flex; align-items: center; gap: var(--sp-2); min-width: 0; min-height: 44px; }
[data-view="moves"] .mv-m-name { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; font-weight: var(--fw-button); line-height: 1.25; }
/* Up to two lines before the ellipsis: narrow 2×2 tiles (≈1024 px desktops) must not cut „Bal kerék”. */
[data-view="moves"] .mv-m-name-text {
  min-width: 0; overflow: hidden; overflow-wrap: break-word; padding-block: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
[data-view="moves"] .mv-m-kind { width: 18px; height: 18px; color: var(--c); }
@container (max-width: 299px) { [data-view="moves"] .mv-m-kind { display: none; } }
[data-view="moves"] .mv-m-head .stepper { flex: none; }
[data-view="moves"] .mv-m-dial { grid-area: dial; display: grid; place-items: center; height: 44px; }
[data-view="moves"] .mv-m-dial .mv-dial { width: 64px; height: auto; display: block; overflow: visible; }
[data-view="moves"] .mv-m-dial.is-mirrored .mv-dial { transform: scaleX(-1); }
[data-view="moves"] .mv-m-slider { grid-area: slider; min-width: 0; }
[data-view="moves"] .mv-m-quick { grid-area: quick; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 2px; }
[data-view="moves"] .mv-m-quick .chip { min-height: 44px; padding: 0 6px; gap: 2px; }
[data-view="moves"] .mv-m-quick .chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; padding-block: 2px; }
[data-view="moves"] .mv-m-quick .chip .icon { width: 14px; height: 14px; }
[data-view="moves"] .mv-m-grid .mv-hint { grid-area: hint; }
[data-view="moves"] .mv-hint { margin-top: 2px; }
/* Wide tile (desktop 2×2): 96 px dial on the left. It spans the slider + quick-set rows so the
   motor name keeps the full first row (names like „Jobb kerék” must not be clipped). */
@container (min-width: 340px) {
  [data-view="moves"] .mv-m-grid {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-areas: "head head" "dial slider" "dial quick" "hint hint";
    column-gap: var(--sp-3);
  }
  [data-view="moves"] .mv-m-dial { height: auto; align-self: center; }
  [data-view="moves"] .mv-m-dial .mv-dial { width: 96px; }
}

/* dial strokes (UI §12.3) */
[data-view="moves"] .mv-dial-groove { fill: none; stroke: var(--surface); stroke-width: 12; stroke-linecap: round; }
[data-view="moves"] .mv-dial-tick { stroke: var(--line-strong); stroke-width: 3; stroke-linecap: round; }
[data-view="moves"] .mv-dial-arc { fill: none; stroke: var(--c); stroke-width: 10; stroke-linecap: round; }
[data-view="moves"] .mv-dial-needle { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
[data-view="moves"] .mv-dial-hub { fill: var(--ink); }

/* ================================================================ lamps */

[data-view="moves"] .mv-row2 { display: grid; gap: var(--sp-3); }
@media (min-width: 1024px) { [data-view="moves"] .mv-row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); } }
[data-view="moves"] .mv-leds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
[data-view="moves"] .mv-led {
  display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 72px; padding: var(--sp-3) 10px;
  border: var(--bw) solid var(--line-2); border-radius: var(--r-md); background: var(--surface); color: var(--ink);
  text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: background var(--dur-2), border-color var(--dur-2), box-shadow var(--dur-2);
}
[data-view="moves"] .mv-led:hover { border-color: var(--line-strong); }
[data-view="moves"] .mv-bulb {
  display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface-2); color: var(--ink-3); transition: background var(--dur-2), color var(--dur-2);
}
[data-view="moves"] .mv-bulb .icon { width: 24px; height: 24px; }
[data-view="moves"] .mv-bulb-on { display: none; }
[data-view="moves"] .mv-led-text { display: grid; gap: 4px; min-width: 0; }
[data-view="moves"] .mv-led-name { font-weight: var(--fw-title); line-height: 1.2; white-space: nowrap; }
[data-view="moves"] .mv-led-meta { display: flex; align-items: center; gap: 6px; }
[data-view="moves"] .mv-led-meta .badge { height: 22px; min-width: 0; padding: 0 5px; font-size: 11px; }
[data-view="moves"] .mv-led-state { font-size: var(--fs-sm); font-weight: var(--fw-display); color: var(--ink-3); }
[data-view="moves"] .mv-led[aria-pressed="true"] {
  background: var(--led); border-color: var(--led-ring); color: var(--on-led);
  box-shadow: 0 0 0 3px var(--led-glow), 0 0 22px var(--led-glow);
}
[data-view="moves"] .mv-led[aria-pressed="true"] .mv-bulb { background: var(--surface); color: var(--led-ring); }
[data-view="moves"] .mv-led[aria-pressed="true"] .mv-bulb-on { display: block; }
[data-view="moves"] .mv-led[aria-pressed="true"] .mv-bulb-off { display: none; }
[data-view="moves"] .mv-led[aria-pressed="true"] .mv-led-state { color: var(--on-led); }
[data-view="moves"] .mv-led[aria-pressed="true"] .badge { background: var(--on-led); color: var(--led); }

/* ============================================================== duration */

/* R1 [⏱ Meddig tartson?] … [value] · R2 [−][slider][+] · R3 presets (final-spec §5 #4) */
[data-view="moves"] .mv-dur { display: grid; gap: var(--sp-2); align-content: start; }
[data-view="moves"] .mv-dur-head { display: flex; align-items: center; gap: var(--sp-2); min-height: 44px; }
[data-view="moves"] .mv-dur-title { display: flex; align-items: center; gap: var(--sp-2); flex: 1; min-width: 0; font-weight: var(--fw-button); }
[data-view="moves"] .mv-dur-title .icon { width: 22px; height: 22px; color: var(--brand-ink); }
[data-view="moves"] .mv-dur-value { display: flex; align-items: center; gap: 6px; flex: none; }
[data-view="moves"] .mv-dur-unit { font-weight: var(--fw-button); color: var(--ink-2); }
[data-view="moves"] .mv-dur-ctrl { display: flex; align-items: center; gap: var(--sp-2); }
[data-view="moves"] .mv-dur-ctrl .range-wrap { flex: 1; min-width: 0; }
[data-view="moves"] .mv-dur-presets { display: flex; gap: 6px; }
[data-view="moves"] .mv-dur-presets .chip { flex: 1 1 auto; padding: 0 8px; min-height: 44px; }

/* ===================================================== no steps / place card */

[data-view="moves"] .mv-nosteps { display: grid; justify-items: center; gap: var(--sp-3); padding: var(--sp-8) var(--sp-4); text-align: center; }
[data-view="moves"] .mv-nosteps[hidden] { display: none; }
[data-view="moves"] .mv-nosteps-text { font-size: var(--fs-lg); font-weight: var(--fw-title); color: var(--ink-2); }
[data-view="moves"] .mv-place { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-4); margin-top: var(--sp-4); }
[data-view="moves"] .mv-place[hidden] { display: none; }
[data-view="moves"] .mv-place-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: var(--brand-tint); color: var(--brand-ink); }
[data-view="moves"] .mv-place-icon .icon { width: 26px; height: 26px; }
[data-view="moves"] .mv-place-text { flex: 1 1 12rem; min-width: 0; font-weight: var(--fw-button); line-height: 1.35; }
[data-view="moves"] .mv-place .btn { margin-bottom: var(--lip); }
@media (max-width: 479px) { [data-view="moves"] .mv-place .btn { width: 100%; } }

/* ========================================================== phone play bar */

/* Sticky above the bottom nav; becomes the now-playing bar while something runs (final-spec §5 #7). */
[data-view="moves"] .mv-playbar {
  position: fixed; z-index: 25; left: 0; right: 0; bottom: calc(var(--bottomnav-h) + var(--safe-b));
  padding: var(--sp-2) max(var(--pad-x), env(safe-area-inset-right)) var(--sp-1) max(var(--pad-x), env(safe-area-inset-left));
  border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background var(--dur-2), border-color var(--dur-2);
}
[data-view="moves"] .mv-playbar[data-tone="go"] { background: var(--go-tint); border-top-color: var(--go); }
[data-view="moves"] .mv-playbar[data-tone="brand"] { background: var(--brand-tint); border-top-color: var(--brand); }
[data-view="moves"] .mv-playbar[data-tone="warn"] { background: var(--warn-tint); border-top-color: var(--warn-ink); }
[data-view="moves"] .mv-pb-inner { display: grid; gap: 6px; max-width: 720px; margin: 0 auto; }
[data-view="moves"] .mv-pb-status {
  display: flex; align-items: center; gap: var(--sp-2); min-width: 0; min-height: 24px;
  font-size: var(--fs-sm); font-weight: var(--fw-button); line-height: 1.3;
}
[data-view="moves"] .mv-playbar[data-tone="go"] .mv-pb-status { color: var(--go-ink); }
[data-view="moves"] .mv-playbar[data-tone="brand"] .mv-pb-status { color: var(--brand-ink); }
[data-view="moves"] .mv-playbar[data-tone="warn"] .mv-pb-status { color: var(--warn-ink); }
[data-view="moves"] .mv-pb-icon { display: grid; place-items: center; flex: none; width: 22px; }
[data-view="moves"] .mv-pb-icon .icon { width: 20px; height: 20px; }
[data-view="moves"] .mv-pb-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-block: 2px; }
[data-view="moves"] .mv-pb-row { display: flex; gap: var(--sp-3); }
[data-view="moves"] .mv-pb-row .mv-play { flex: 1 1 auto; }
[data-view="moves"] .mv-pb-row .mv-loop { flex: none; padding-inline: var(--sp-4); }
[data-view="moves"] .mv-pb-progress {
  position: absolute; left: 0; top: -1px; height: 3px; width: calc(var(--p, 0) * 100%);
  background: var(--go); transition: width var(--dur-2) linear;
}

/* ======================================================= reduced motion */

@media (prefers-reduced-motion: reduce) {
  [data-view="moves"] .mv-chip.is-playing .mv-chip-sweep,
  [data-view="moves"] .mv-chip.is-live::after,
  [data-view="moves"] .mv-pulse,
  [data-view="moves"] .mv-chip.is-new { animation: none; }
  [data-view="moves"] .mv-chip.is-live::after { box-shadow: 0 0 0 3px color-mix(in srgb, var(--go) 30%, transparent); }
}

/* ================================================================ sheets */

/* „Új mozgás” (M10b) */
.sheet-mv-new .mv-name-chips { gap: var(--sp-2); }

/* „Melyik gombra kerüljön?” */
.sheet-mv-pick .mv-pick-move {
  display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2);
  font-weight: var(--fw-button); color: var(--ink-2);
}
.sheet-mv-pick .mv-pick-move > span { min-width: 0; overflow-wrap: anywhere; }
.sheet-mv-pick .mv-pick-move .icon { color: var(--brand); }
.sheet-mv-pick .mv-pick-item { min-height: 60px; }
.sheet-mv-pick .mv-pick-item.is-current { background: var(--brand-tint); }
.sheet-mv-pick .mv-pick-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; }
.sheet-mv-pick .mv-pick-arrow {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: var(--bw) solid var(--line-2); background: var(--surface); color: var(--ink-2);
}
.sheet-mv-pick .mv-pick-arrow .icon { width: 22px; height: 22px; }
.sheet-mv-pick .mv-pick-face {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  font-size: var(--fs-lg); font-weight: var(--fw-display);
}
.sheet-mv-pick .mv-pick-face[data-c="btn1"] { background: var(--btn1); color: var(--on-btn1); }
.sheet-mv-pick .mv-pick-face[data-c="btn2"] { background: var(--btn2); color: var(--on-btn2); }
.sheet-mv-pick .mv-pick-face[data-c="btn3"] { background: var(--btn3); color: var(--on-btn3); }
.sheet-mv-pick .mv-pick-item.is-empty .menu-sub { font-style: normal; color: var(--ink-3); }
.sheet-mv-pick .mv-pick-check { margin-left: auto; flex: none; color: var(--brand-ink); }
.sheet-mv-pick .mv-pick-check .icon { width: 22px; height: 22px; }

/* „Robot beállítása” */
.sheet-mv-ms .mv-ms { display: grid; }
.sheet-mv-ms .mv-ms > .sheet-text { margin-bottom: var(--sp-4); }
.sheet-mv-ms .mv-ms-motor { display: grid; gap: var(--sp-3); }
.sheet-mv-ms .mv-ms > .mv-ms-motor:nth-child(2) { border-top: 0; padding-top: 0; }
.sheet-mv-ms .mv-ms-head { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-lg); font-weight: var(--fw-title); }
.sheet-mv-ms .mv-ms-kind > label { flex-direction: column; gap: 0; min-height: 52px; padding: 4px 6px; }
.sheet-mv-ms .mv-ms-kind small { font-size: var(--fs-xs); font-weight: var(--fw-label); color: var(--ink-3); line-height: 1.2; }
.sheet-mv-ms .mv-ms-wheel { display: grid; gap: var(--sp-2); }
.sheet-mv-ms .mv-ms-wheel[hidden] { display: none; }
.sheet-mv-ms .mv-ms-tests { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.sheet-mv-ms .mv-ms-tests .btn { margin-bottom: var(--lip); }
.sheet-mv-ms .btn-block { margin-bottom: var(--lip); }
