/* ==========================================================================
   OpenVids landing — outro mini demo ([data-dm], built by openvids-landing-demo.js).
   A scoped miniature of the Edit workspace (openvids-editor.html). Rules are ported 1:1 from openvids.css,
   openvids-editor*.css and openvids-chat.css with dm- prefixes; the app's dark tokens are declared on the
   demo root so nothing leaks into (or in from) the landing. Accent: selection + focus rings only.
   .dm-x = chrome the demo does not implement: rendered, inert (no pointer, no focus, no hover).
   ========================================================================== */

/* ---- heading line above the window (landing tokens) ---- */
.dm-wrap { min-width: 0; }
.dm-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; margin-bottom: 14px; }
.dm-h { margin: 0 auto 0 0; font: 600 11px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-2); }
.dm-hint { margin: 0; font: 500 11px/1 var(--font-mono); color: var(--muted); white-space: nowrap; }
.dm-reset {
  height: 28px; margin: -8px 0; padding: 0 2px; border: 0; background: none; cursor: pointer;
  font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2);
  text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px; transition: color .2s, text-decoration-color .2s;
}
.dm-reset:hover:not(:disabled) { color: var(--fg); text-decoration-color: var(--fg-2); }
.dm-reset:disabled { color: color-mix(in oklab, var(--muted) 60%, var(--bg)); text-decoration-color: transparent; cursor: default; }
@media (pointer: coarse) { .dm-hint { display: none; } .dm-reset { height: 44px; margin: -14px 0; } }

/* ==========================================================================
   Window + app tokens (openvids.css :root dark)
   ========================================================================== */
.dm {
  --desktop: oklch(9% 0.003 260);
  --bg-0: oklch(15.5% 0.004 260);   --bg-1: oklch(18.5% 0.005 260);
  --surface-1: oklch(21.5% 0.005 260); --surface-2: oklch(25.5% 0.006 260); --surface-3: oklch(30% 0.007 260);
  --border-subtle: oklch(24% 0.005 260); --border: oklch(31% 0.006 260); --border-strong: oklch(42% 0.008 260);
  --fg: oklch(94% 0.004 260); --fg-2: oklch(79% 0.005 260); --fg-3: oklch(65% 0.006 260); --fg-disabled: oklch(47% 0.006 260);
  --accent: oklch(74% 0.155 55); --accent-ink: oklch(17% 0.03 55);
  --accent-soft: color-mix(in oklab, var(--accent) 13%, var(--bg-0));
  --accent-line: color-mix(in oklab, var(--accent) 38%, transparent);
  --success: oklch(75% 0.15 155);
  --r-xs: 3px; --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-window: 10px;
  --font-ui: var(--font-body);
  --edge-hi: oklch(100% 0 0 / 0.09); --grid-line: oklch(100% 0 0 / 0.045); --mix-hi: oklch(100% 0 0);
  --tip-bg: oklch(11% 0.004 260);
  --on-media: oklch(96% 0.004 260); --on-media-2: oklch(82% 0.005 260); --on-media-bg: oklch(11% 0.004 260 / 0.85);
  --stage: oklch(11.5% 0.003 260); --lane-audio: oklch(14% 0.004 260); --clip-ink: oklch(96% 0.005 260); --c-badge: oklch(0% 0 0 / 0.35);
  --shadow-raise: 0 1px 0 oklch(0% 0 0 / 0.35), 0 6px 18px oklch(0% 0 0 / 0.28);
  --shadow-tip: 0 6px 16px oklch(0% 0 0 / 0.45);

  container: dm / inline-size;
  position: relative; display: grid; grid-template-rows: 52px auto 26px; grid-template-columns: minmax(0, 1fr); min-width: 0;
  background: var(--bg-0); border-radius: var(--r-window); overflow: hidden; box-shadow: var(--shadow);
  font: 400 12px/16px var(--font-ui); color: var(--fg); text-align: left; -webkit-font-smoothing: antialiased;
}
.dm::after { content: ""; position: absolute; inset: 0; z-index: 60; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--edge-hi); pointer-events: none; }
.dm button, .dm textarea { margin: 0; font: inherit; color: inherit; }
.dm button { cursor: default; }
.dm .ic { width: var(--s, 16px); height: var(--s, 16px); flex: none; }
.dm :focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dm [hidden] { display: none !important; }
.dm-x { pointer-events: none; cursor: default; }
.dm .k-video  { --ch: var(--k-video-h);  --cb: var(--k-video-b);  --cl: var(--k-video-l); }
.dm .k-image  { --ch: var(--k-image-h);  --cb: var(--k-image-b);  --cl: var(--k-image-l); }
.dm .k-audio  { --ch: var(--k-audio-h);  --cb: var(--k-audio-b);  --cl: var(--k-audio-l); }
.dm .k-motion { --ch: var(--k-motion-h); --cb: var(--k-motion-b); --cl: var(--k-motion-l); }
.dm-mono-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---- shared controls (.icon-btn .tool-btn .btn .seg .tab) ---- */
.dm-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; padding: 0;
  border: 1px solid transparent; border-radius: var(--r-md); background: transparent; color: var(--fg-2);
}
.dm-icon-btn .ic { --s: 14px; }
.dm-icon-btn.sm { width: 24px; height: 24px; border-radius: var(--r-sm); }
.dm-icon-btn.xs { width: 20px; height: 20px; border-radius: var(--r-sm); }
.dm-icon-btn.xs .ic { --s: 12px; }
.dm-icon-btn.on { background: var(--surface-3); color: var(--fg); }
button.dm-icon-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--fg); }
button.dm-icon-btn:active:not(:disabled) { background: var(--surface-3); }
.dm-icon-btn:disabled { color: var(--fg-disabled); }
.dm-tool-btn {
  display: inline-flex; align-items: center; gap: 4px; flex: none; height: 24px; padding: 0 6px 0 8px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--fg-2); font-size: 12px; white-space: nowrap;
}
.dm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; height: 28px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-1); color: var(--fg);
  font-size: 12px; font-weight: 500; white-space: nowrap;
}
.dm-btn .ic { --s: 14px; }
button.dm-btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border-strong); }
button.dm-btn:active:not(:disabled) { background: var(--surface-3); }
.dm-btn:disabled { background: transparent; border-color: var(--border-subtle); color: var(--fg-disabled); }
.dm-btn-sm { height: 24px; padding: 0 8px; border-radius: var(--r-sm); }
.dm-btn-sm .ic { --s: 12px; }
.dm-btn-ghost { background: transparent; border-color: transparent; color: var(--fg-2); }
button.dm-btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: transparent; color: var(--fg); }
.dm-link {
  padding: 0; border: 0; border-radius: var(--r-xs); background: none; color: var(--fg-2); font-size: 11px;
  text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px;
}
.dm-link:hover { color: var(--fg); text-decoration-color: var(--fg-2); }
.dm-seg { display: inline-flex; flex: none; padding: 2px; gap: 2px; background: var(--bg-0); border: 1px solid var(--border); border-radius: var(--r-md); }
.dm-seg > * {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 22px; padding: 0;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--fg-3);
}
.dm-seg .ic { --s: 14px; }
.dm-seg.sm > * { height: 18px; }
.dm-seg.sm .ic { --s: 12px; }
.dm-seg.text > * { width: auto; min-width: 0; padding: 0 12px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.dm-seg.sm.text > * { padding: 0 8px; font-size: 11px; }
.dm-seg > button:hover { background: var(--surface-2); color: var(--fg); }
.dm-seg > .on, .dm-seg > [aria-pressed="true"] { background: var(--surface-3); color: var(--fg); box-shadow: inset 0 0 0 1px var(--border-strong); }
.dm-tb-sep { flex: none; width: 1px; height: 16px; margin: 0 4px; background: var(--border); }
.dm-dot { display: inline-block; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); }
.dm-dot.ok { background: var(--success); }
.dm-dot.run { background: var(--fg-2); animation: dm-blink 1.4s ease-in-out infinite; }
.dm-spinner { display: inline-block; flex: none; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--border-strong); border-top-color: var(--fg); animation: dm-spin .8s linear infinite; }
.dm-kbd { display: inline-flex; align-items: center; height: 16px; padding: 0 4px; border: 1px solid var(--border); border-radius: var(--r-xs); color: var(--fg-3); font: 500 10.5px/1 var(--font-ui); letter-spacing: .02em; }

/* tooltips ([data-tip] shorthand from openvids.css) */
.dm [data-tip] { position: relative; }
.dm [data-tip]::after {
  content: attr(data-tip) "  " attr(data-kbd); position: absolute; top: calc(100% + 6px); left: 50%; z-index: 40; transform: translateX(-50%);
  padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--tip-bg); box-shadow: var(--shadow-tip);
  color: var(--fg); font: 400 11px/14px var(--font-ui); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .1s;
}
.dm [data-tip][data-tip-align="end"]::after { left: auto; right: 0; transform: none; }
.dm [data-tip][data-tip-align="start"]::after { left: 0; transform: none; }
.dm-vbar [data-tip]::after { top: auto; bottom: calc(100% + 6px); }
@media (hover: hover) { .dm [data-tip]:hover::after, .dm [data-tip]:focus-visible::after { opacity: 1; transition-delay: .5s; } }

/* ==========================================================================
   Titlebar (.titlebar, .tl traffic lights, .ws-nav, .tb-tools)
   ========================================================================== */
.dm-titlebar {
  position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0 12px 0 20px;
  background: var(--bg-1); border-bottom: 1px solid var(--border-subtle); user-select: none;
}
.dm-tl-group { display: flex; flex: none; gap: 8px; margin-right: 12px; }
.dm-tl { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 .5px oklch(0% 0 0 / .3); }
.dm-tl.close { background: oklch(68% 0.19 27); } .dm-tl.min { background: oklch(82% 0.16 85); } .dm-tl.max { background: oklch(72% 0.18 145); }
.dm-project-title { min-width: 0; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.dm-save-state { display: inline-flex; flex: none; align-items: center; gap: 5px; font-size: 11px; color: var(--fg-3); white-space: nowrap; }
.dm-ws-nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.dm-ws-nav > * { padding: 0 16px; }
.dm-tb-spacer { flex: 1; min-width: 0; }
.dm-tb-tools { display: flex; flex: none; align-items: center; gap: 8px; }

/* ==========================================================================
   Workspace grid + panel system (.ws .top .dock .panel .panel-head .tabs)
   ========================================================================== */
.dm-ws { --wl: 248px; --wr: 336px; display: grid; grid-template-rows: 392px auto; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; padding: 6px; background: var(--desktop); }
.dm-row { display: grid; grid-template-columns: var(--wl) minmax(0, 1fr) var(--wr); grid-template-areas: "l v r"; gap: 6px; min-width: 0; min-height: 0; }
.dm.no-l .dm-row { grid-template-columns: minmax(0, 1fr) var(--wr); grid-template-areas: "v r"; }
.dm.no-r .dm-row { grid-template-columns: var(--wl) minmax(0, 1fr); grid-template-areas: "l v"; }
.dm.no-l.no-r .dm-row { grid-template-columns: minmax(0, 1fr); grid-template-areas: "v"; }
.dm.no-l .dm-dock-l, .dm.no-r .dm-dock-r { display: none; }
.dm-dock { display: flex; min-width: 0; min-height: 0; overflow: hidden; }
.dm-dock-l { grid-area: l; } .dm-viewer { grid-area: v; } .dm-dock-r { grid-area: r; }
.dm-panel {
  position: relative; flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden;
  background: var(--bg-0); border: 1px solid var(--border-subtle); border-radius: var(--r-md);
}
.dm-panel-head {
  flex: none; display: flex; align-items: center; gap: 4px; min-width: 0; height: 32px; padding: 0 4px 0 6px;
  background: var(--bg-1); border-bottom: 1px solid var(--border-subtle); user-select: none;
}
.dm-panel-head:has(.dm-grip) { padding-left: 2px; }
.dm-grip { width: 16px; height: 24px; border: 0; border-radius: var(--r-xs); color: var(--fg-disabled); }
.dm-grip .ic { --s: 12px; }
.dm-tabs { display: flex; align-items: center; gap: 2px; min-width: 0; }
.dm-tab {
  position: relative; display: inline-flex; align-items: center; flex: none; height: 24px; padding: 0 8px;
  border: 0; border-radius: var(--r-sm); background: transparent; color: var(--fg-3); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.dm-tab.on, .dm-tab[aria-selected="true"] { color: var(--fg); }
button.dm-tab:hover { background: var(--surface-1); color: var(--fg); }
.dm-tab:focus-visible { outline-offset: -1px; }
.dm-tab-dot { display: none; position: absolute; top: 3px; right: 1px; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-2); box-shadow: 0 0 0 2px var(--bg-1); pointer-events: none; }
.dm-tab[data-flag] .dm-tab-dot { display: block; }
.dm-panel.is-active { border-color: var(--border-strong); }
.dm-panel.is-active :is(.dm-tab.on, .dm-tab[aria-selected="true"])::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: -4px; height: 2px; border-radius: 1px 1px 0 0; background: var(--accent); pointer-events: none;
}
.dm-ph-actions { display: flex; align-items: center; gap: 2px; min-width: 0; margin-left: auto; }
.dm-ph-meta { min-width: 0; padding-right: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--fg-3); }
.dm-pane { flex: 1; display: flex; flex-direction: column; min-height: 0; }

/* ==========================================================================
   Media panel (.m-scope .media-tools .filters .a-grid .asset .thumb, audio rows)
   ========================================================================== */
.dm-seg.dm-m-scope { display: flex; margin: 8px 8px 0; }
.dm-m-scope > * { flex: 1; }
.dm-media-tools { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 8px 6px; }
.dm-field {
  flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; height: 28px; padding: 0 8px; overflow: hidden;
  background: var(--bg-0); border: 1px solid var(--border); border-radius: var(--r-md); color: var(--fg-3); font-size: 12px; white-space: nowrap;
}
.dm-seg.dm-filters { flex: none; display: flex; margin: 0 8px 4px; }
.dm-seg.sm.text.dm-filters > * { flex: 1 1 auto; min-width: 0; padding: 0 3px; }
.dm-assets { flex: 1; min-height: 0; padding-bottom: 8px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.dm-sect { display: flex; align-items: baseline; gap: 6px; padding: 10px 12px 4px; font-size: 11px; line-height: 14px; font-weight: 600; color: var(--fg-2); }
.dm-count { font-weight: 400; color: var(--fg-3); font-variant-numeric: tabular-nums; }
.dm-a-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px 4px; padding: 0 8px; }
.dm-a-list { display: grid; gap: 1px; padding: 0 8px; }
.dm-asset {
  display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 3px 3px 4px;
  border: 1px solid transparent; border-radius: var(--r-md); outline: none; user-select: none;
}
.dm-asset:hover { background: var(--surface-1); border-color: var(--border-subtle); }
.dm-asset.is-selected, .dm-asset.is-selected:hover { background: var(--accent-soft); border-color: var(--accent-line); }
.dm-asset:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.dm-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-xs); background: oklch(4% 0.003 260); }
.dm-thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 0.08); pointer-events: none; }
.dm-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.dm-thumb.k-motion { background: repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 12px), var(--k-motion-b); }
.dm-thumb-title { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 600 15px/1 var(--font-ui); letter-spacing: -.02em; color: var(--on-media); }
.dm-a-type { position: absolute; left: 3px; bottom: 3px; display: flex; align-items: center; justify-content: center; width: 16px; height: 14px; border-radius: var(--r-xs); background: var(--on-media-bg); color: var(--on-media-2); }
.dm-thumb-dur { position: absolute; right: 3px; bottom: 3px; padding: 0 4px; border-radius: var(--r-xs); background: var(--on-media-bg); color: var(--on-media); font: 500 10px/13px var(--font-ui); font-variant-numeric: tabular-nums; }
.dm-thumb-check { position: absolute; left: 4px; top: 4px; display: none; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.dm-asset.is-selected .dm-thumb-check { display: inline-flex; }
.dm-used-mark { position: absolute; right: 5px; top: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--on-media); box-shadow: 0 0 0 1.5px var(--on-media-bg); }
.dm-a-name { padding: 0 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; line-height: 14px; color: var(--fg-2); }
.dm-asset.is-selected .dm-a-name, .dm-asset:hover .dm-a-name { color: var(--fg); }
.dm-asset.row { flex-direction: row; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 2px; }
.dm-asset.row .dm-thumb { flex: none; width: 44px; background: var(--lane-audio); }
.dm-asset.row .dm-a-name { flex: 1; min-width: 0; font-size: 12.5px; }
.dm-thumb svg { position: absolute; left: 0; top: 2px; width: 100%; height: calc(100% - 4px); }
.dm-thumb svg path { fill: none; stroke: var(--wave); stroke-width: 1; opacity: .9; vector-effect: non-scaling-stroke; }
.dm-a-used { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--fg-3); }
.dm-a-meta { flex: none; color: var(--fg-3); font-size: 11px; font-variant-numeric: tabular-nums; }

/* ==========================================================================
   Viewer (.stage .frame .title-in .vbar .tc-wrap .transport)
   ========================================================================== */
.dm-stage { flex: 1; display: flex; min-height: 0; padding: 14px; overflow: hidden; background: var(--stage); container-type: size; }
.dm-frame {
  position: relative; flex: none; margin: auto; aspect-ratio: 16 / 9; width: min(100cqw, 100cqh * 16 / 9); overflow: hidden;
  background: oklch(4% 0.003 260); box-shadow: 0 0 0 1px var(--edge-hi), var(--shadow-raise); container-type: inline-size; user-select: none;
}
.dm-imgs { position: absolute; inset: 0; transition: filter .6s var(--ease-out); }
.dm-imgs img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: contain; opacity: 0; transform-origin: 50% 50%; }
.dm-imgs img.on { opacity: 1; }
.dm.is-warm .dm-imgs { filter: sepia(.28) saturate(1.25) hue-rotate(-10deg) contrast(1.05); }
.dm-title-in {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0 8%; text-align: center;
  color: oklch(98% 0.004 260); text-shadow: 0 .2cqw 2cqw oklch(0% 0 0 / .55); visibility: hidden; pointer-events: none;
}
.dm-title-in.on { visibility: visible; }
.dm-title-in b { font-size: 6.2cqw; line-height: 1.05; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.dm-tw { display: inline-block; opacity: 0; }
.dm-vbar {
  flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-width: 0; height: 40px; padding: 0 6px 0 12px;
  background: var(--bg-1); border-top: 1px solid var(--border-subtle);
}
.dm-tc-wrap {
  justify-self: start; display: flex; align-items: baseline; gap: 8px; max-width: 100%; height: 28px; margin-left: -6px; padding: 0 6px;
  overflow: hidden; border: 0; border-radius: var(--r-sm); background: transparent; line-height: 28px; white-space: nowrap;
}
.dm-tc-wrap:hover { background: var(--surface-1); }
.dm-tc-wrap:hover .dm-tc-total { color: var(--fg-2); }
.dm-tc { font: 500 14px/28px var(--font-mono); letter-spacing: .02em; color: var(--fg); font-variant-numeric: tabular-nums; }
.dm-tc-total { font: 11px/28px var(--font-mono); color: var(--fg-3); font-variant-numeric: tabular-nums; }
.dm-transport { display: flex; align-items: center; gap: 2px; }
.dm-btn.dm-play { width: 38px; margin: 0 2px; padding: 0; background: var(--surface-2); border-color: var(--border-strong); }
button.dm-btn.dm-play:hover { background: var(--surface-3); }
.dm-play .ic:last-child, .dm.is-playing .dm-play .ic:first-child { display: none; }
.dm.is-playing .dm-play .ic:last-child { display: block; }
.dm-v-tools { display: flex; align-items: center; justify-content: flex-end; gap: 2px; min-width: 0; }

/* ==========================================================================
   Chat (openvids-chat.css: context row, feed, messages, activity, turn footer, composer)
   ========================================================================== */
.dm-chat-context { flex: none; display: flex; align-items: center; gap: 6px; min-width: 0; height: 28px; padding: 0 12px 0 6px; border-bottom: 1px solid var(--border-subtle); }
.dm-chat-title { flex: 0 1 auto; display: inline-flex; align-items: center; min-width: 0; height: 20px; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 500; }
.dm-chat-status { flex: none; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--fg-3); font-size: 11px; white-space: nowrap; }
.dm-chat-body { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.dm-chat-body:focus { outline: none; }
.dm-chat-feed { display: flex; flex-direction: column; gap: 14px; padding: 12px 12px 16px; }
.dm-chat-feed > * { min-width: 0; }
.dm-chat-empty { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: 16px 12px 10px; }
.dm-chat-hint { margin: 0; max-width: 36ch; color: var(--fg-3); font-size: 12px; line-height: 17px; text-wrap: pretty; }
.dm-sugs { display: grid; gap: 1px; margin: 0 -6px; }
.dm-chat-suggestion {
  display: flex; align-items: flex-start; gap: 8px; width: 100%; min-height: 28px; padding: 6px;
  border: 1px solid transparent; border-radius: var(--r-md); background: transparent; color: var(--fg-2); font-size: 12px; line-height: 16px; text-align: left;
}
.dm-chat-suggestion .ic { margin-top: 2px; color: var(--fg-3); }
.dm-chat-suggestion:hover:not(:disabled) { background: var(--surface-1); border-color: var(--border-subtle); color: var(--fg); }
.dm-chat-suggestion:hover:not(:disabled) .ic { color: var(--fg-2); }
.dm-chat-suggestion:disabled { color: var(--fg-disabled); }
.dm-chat-suggestion:disabled .ic { color: var(--fg-disabled); }
/* docked next to the composer: context-chip anatomy (.ov-chat-ctx) */
.dm-chat-next { flex: none; padding: 6px 8px; }
.dm-sugs.is-row { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.dm-sugs.is-row .dm-chat-suggestion {
  width: auto; align-items: center; gap: 5px; min-height: 0; height: 24px; padding: 0 8px 0 6px;
  border-color: var(--border); border-radius: var(--r-sm); background: var(--surface-1); font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.dm-sugs.is-row .dm-chat-suggestion .ic { margin-top: 0; }
.dm-sugs.is-row .dm-chat-suggestion:hover:not(:disabled) { border-color: var(--border-strong); }
.dm-chat-done { margin: 0; padding: 0 4px; color: var(--fg-3); font-size: 11px; line-height: 15px; }

.dm-msg { display: grid; gap: 4px; min-width: 0; opacity: 0; transform: translate3d(0, 6px, 0); transition: opacity .3s, transform .45s var(--ease-out); }
.dm-msg.on { opacity: 1; transform: none; }
.dm-msg-head { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11px; line-height: 16px; }
.dm-agent-msg .dm-msg-head { gap: 7px; }
.dm-msg-author { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); font-weight: 600; }
.dm-msg-time { flex: none; margin-left: auto; color: var(--fg-3); font: 10.5px/14px var(--font-mono); }
.dm-msg-text { min-width: 0; color: var(--fg); font-size: 12.5px; line-height: 18px; overflow-wrap: anywhere; text-wrap: pretty; animation: dm-rise .3s var(--ease-out) both; }
.dm-user-msg { padding: 6px 8px 7px; border-radius: var(--r-md); background: var(--surface-1); }
.dm-mono {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px;
  border: 1px solid var(--border); border-radius: var(--r-xs); background: var(--surface-2); color: var(--fg-2);
  font: 600 10px/1 var(--font-mono); letter-spacing: 0; text-transform: uppercase; user-select: none;
}
.dm-think { display: inline-flex; align-items: center; gap: 6px; height: 20px; color: var(--fg-3); font-size: 11px; font-weight: 500; }
.dm-activity-list { display: grid; gap: 1px; margin: 0 -6px; padding: 0; list-style: none; }
.dm-activity-row {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) auto auto; align-items: center; column-gap: 8px; min-height: 28px; padding: 5px 6px;
  color: var(--fg-2); font-size: 12px; line-height: 16px; animation: dm-rise .3s var(--ease-out) both;
}
.dm-activity-text { min-width: 0; overflow-wrap: anywhere; }
.dm-activity-text b { color: var(--fg); font-weight: 500; }
.dm-activity-glyph { display: inline-flex; align-items: center; justify-content: center; width: 14px; color: var(--fg-3); }
.dm-activity-time { min-width: 30px; text-align: right; color: var(--fg-3); font: 10.5px/14px var(--font-mono); font-variant-numeric: tabular-nums; }
.dm-activity-row[data-state="done"] { color: var(--fg-3); }
.dm-activity-row[data-state="done"] b { color: var(--fg-2); }
.dm-activity-row[data-state="done"] .dm-activity-glyph { color: var(--success); }
.dm-turn-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; min-height: 24px; }
.dm-turn-foot:empty { display: none; }
.dm-revert { margin-left: -8px; }
.dm-revert .ic { color: var(--fg-3); }
.dm-revert:hover .ic { color: var(--fg-2); }
.dm-turn-meta { color: var(--fg-3); font-size: 11px; line-height: 16px; font-variant-numeric: tabular-nums; }
.dm-reverted { display: inline-flex; align-items: center; gap: 4px; color: var(--fg-2); font-size: 11px; font-weight: 500; }
.dm-reverted .ic { color: var(--fg-3); }

.dm-chat-composer {
  flex: none; position: relative; display: flex; flex-direction: column; margin: 0 8px 8px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-1); transition: border-color .12s;
}
.dm-chat-composer:hover { border-color: var(--border-strong); }
.dm-chat-composer:has(.dm-chat-textarea:focus-visible) { border-color: var(--border-strong); outline: 2px solid var(--accent); outline-offset: 1px; }
.dm-chat-textarea {
  display: block; width: 100%; min-height: 34px; max-height: 80px; padding: 8px 10px 4px; border: 0; outline: 0; resize: none; overflow-y: auto;
  background: transparent; color: var(--fg); font: 400 12.5px/18px var(--font-ui); field-sizing: content;
}
.dm-chat-textarea::placeholder { color: var(--fg-3); opacity: 1; }
.dm .dm-chat-textarea:focus-visible { outline: 0; }
.dm-chat-controls { display: flex; align-items: center; gap: 2px; min-width: 0; padding: 2px 4px 4px; }
.dm-chat-spacer { flex: 1 1 0; min-width: 0; }
.dm-chat-chip { flex: 0 1 auto; min-width: 0; font-size: 11px; font-weight: 500; }
.dm-chat-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dm-chat-chip ~ .dm-chat-chip { flex: none; }
.dm-chat-chip .ic { color: var(--fg-3); }
.dm-btn.dm-chat-send { min-width: 24px; padding: 0 5px; font-size: 11px; font-weight: 600; }

/* ---- Inspector (.insp-head .type-ic .sec .kv) ---- */
.dm-insp { display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.dm-insp > * { flex: none; }
.dm-insp-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); }
.dm-type-ic { flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--cl); border-radius: var(--r-sm); background: var(--ch); color: var(--clip-ink); }
.dm-type-ic .ic { --s: 14px; }
.dm-i-txt { flex: 1; min-width: 0; }
.dm-i-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; letter-spacing: -.005em; }
.dm-i-sub { margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font: 10.5px/14px var(--font-mono); }
.dm-sec { border-bottom: 1px solid var(--border-subtle); }
.dm-sec-h { display: flex; align-items: center; gap: 4px; width: 100%; height: 30px; padding: 0 10px 0 8px; border: 0; background: transparent; color: var(--fg); font: 600 12px/16px var(--font-ui); text-align: left; }
.dm-sec-h .ic { color: var(--fg-3); transition: transform .12s; }
.dm-sec-h[aria-expanded="false"] .ic { transform: rotate(-90deg); }
.dm-sec-h:hover { background: var(--surface-1); }
.dm-sec-h:focus-visible { outline-offset: -2px; }
.dm-sec-b { display: grid; gap: 6px; padding: 2px 12px 12px; }
.dm-kv { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px 8px; margin: 0; font-size: 12px; }
.dm-kv dt { color: var(--fg-3); }
.dm-kv dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); font-variant-numeric: tabular-nums; }
.dm-kv dd.mono { color: var(--fg-2); font: 10.5px/16px var(--font-mono); }
.dm-insp-hint { margin: 0; padding: 12px; color: var(--fg-3); font-size: 12px; line-height: 17px; }

/* ==========================================================================
   Timeline (.tl-scroll .ruler .corner .trk .trk-head .lane .clip .c-head .c-body .trim .playline .beat-row)
   ========================================================================== */
.dm-seq { color: var(--fg); font-weight: 500; }
.dm-seq .ic { color: var(--fg-3); }
.dm-tl-tools { display: flex; align-items: center; gap: 4px; min-width: 0; }
.dm-tl-tools .dm-seg { margin-left: 2px; }
.dm-rng { position: relative; flex: none; width: 84px; height: 16px; margin: 0 2px; }
.dm-rng::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; margin-top: -1.5px; border-radius: 2px; background: linear-gradient(to right, var(--fg-3) 50%, var(--surface-3) 50%); }
.dm-rng i { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--fg); border: 1px solid oklch(0% 0 0 / .45); }
.dm-tl-scroll { position: relative; height: 196px; overflow: hidden; background: var(--bg-0); }
.dm-tl-inner { --hw: 224px; --pr: 16px; position: relative; min-height: 100%; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
.dm-ruler-row, .dm-beat-row { position: relative; z-index: 9; display: flex; height: 24px; }
.dm-corner {
  flex: none; display: flex; align-items: center; justify-content: flex-end; width: var(--hw); height: 24px; padding-right: 6px;
  background: var(--bg-1); border-right: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle);
}
.dm-ruler { position: relative; flex: 1; min-width: 0; height: 24px; overflow: hidden; background: var(--bg-1); border-bottom: 1px solid var(--border-subtle); touch-action: none; }
.dm-ruler:focus-visible { outline-offset: -2px; }
.dm-rin, .dm-bin { position: absolute; top: 0; bottom: 0; left: 0; right: var(--pr); pointer-events: none; }
.dm-rin i { position: absolute; bottom: 0; width: 1px; height: 4px; background: var(--border-strong); }
.dm-rin i.maj { height: 9px; background: var(--fg-3); }
.dm-rl { position: absolute; top: 3px; padding-left: 4px; color: var(--fg-3); font: 10px/12px var(--font-mono); }
.dm-beat-row { height: 14px; }
.dm-corner.dm-beat-corner { justify-content: space-between; gap: 6px; height: 14px; padding: 0 8px 0 24px; color: var(--fg-3); font-size: 10px; }
.dm-beat-strip { position: relative; flex: 1; min-width: 0; height: 14px; overflow: hidden; background: var(--bg-1); border-bottom: 1px solid var(--border-subtle); }
.dm-bt { position: absolute; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: var(--wave); opacity: .55; transform: translate(-50%, -50%); }
.dm-bt.down { width: 6px; height: 6px; opacity: .95; }

.dm-trk { position: relative; display: flex; height: var(--th); --bh: calc(var(--th) - 20px); }
.dm-trk[data-trk="mot"] { --th: 28px; } .dm-trk[data-trk="v1"] { --th: 46px; } .dm-trk[data-trk="a1"] { --th: 40px; } .dm-trk[data-trk="a2"] { --th: 30px; }
.dm-trk-head {
  position: relative; z-index: 8; flex: none; display: flex; align-items: center; gap: 3px; width: var(--hw); min-width: 0; padding: 0 6px 0 4px;
  background: var(--bg-1); border-right: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); user-select: none;
}
.dm-th-caret { width: 16px; }
.dm-th-caret .ic { --s: 10px; }
.dm-tn { flex: none; width: 22px; color: var(--fg-2); font: 600 10.5px var(--font-mono); }
.dm-tlbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-3); font-size: 11px; }
.dm-pill {
  flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; margin-right: 2px; padding: 0 5px;
  border-radius: 999px; background: var(--bg-1); box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--fg-2); font: 500 10px/1 var(--font-ui); font-variant-numeric: tabular-nums;
}
.dm-tbtn { font: 600 10px/1 var(--font-ui); }
.dm-lane { position: relative; flex: 1; min-width: 0; border-bottom: 1px solid var(--border-subtle); touch-action: none; }
.dm-trk.is-audio .dm-lane { background-color: var(--lane-audio); }
.dm-lin { position: absolute; top: 0; bottom: 0; left: 0; right: var(--pr); background-image: linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: var(--gw, 10%) 100%; }
.dm-lane.pulse::after { content: ""; position: absolute; inset: 0; z-index: 4; background: color-mix(in oklab, var(--fg) 10%, transparent); pointer-events: none; animation: dm-pulse .9s var(--ease-out) forwards; }

.dm-clip {
  position: absolute; top: 2px; bottom: 2px; display: flex; flex-direction: column; min-width: 2px; overflow: hidden;
  border: 1px solid var(--cl); border-radius: var(--r-xs); background: var(--cb); outline: none; user-select: none;
  transition: left .6s var(--ease-out), width .6s var(--ease-out), border-color .12s;
}
.dm-clip:hover { border-color: color-mix(in oklab, var(--cl) 70%, var(--mix-hi)); }
.dm-clip:focus-visible { z-index: 3; outline: 2px solid var(--accent); outline-offset: 1px; }
.dm-clip.is-in { animation: dm-drop .6s var(--ease-spring) both; }
.dm-clip.is-out { pointer-events: none; animation: dm-out .3s var(--ease-out) forwards; }
.dm-c-head {
  flex: none; display: flex; align-items: center; gap: 4px; height: 14px; padding: 0 5px; overflow: hidden; white-space: nowrap;
  background: var(--ch); color: var(--clip-ink); font: 500 10.5px/14px var(--font-ui);
}
.dm-c-head .ic { opacity: .85; }
.dm-c-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dm-c-badge { display: none; margin-left: auto; padding: 0 3px; border-radius: var(--r-xs); background: var(--c-badge); font-size: 10px; line-height: 12px; }
.dm.is-warm .dm-c-badge { display: inline-block; animation: dm-rise .3s var(--ease-out) both; }
.dm-c-body { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.dm-c-body svg { position: absolute; left: 0; top: 0; display: block; width: 100%; height: 100%; }
.dm-c-body path { fill: none; stroke: var(--wave); stroke-width: 1.2; opacity: .9; vector-effect: non-scaling-stroke; }
.dm-clip.k-motion .dm-c-body { background: repeating-linear-gradient(90deg, var(--grid-line) 0 1px, transparent 1px 12px); }
/* video/image strip: stills tiled at the body height, alternate tiles darkened (clipInner in openvids-editor.js) */
.dm-clip[data-m] .dm-c-body {
  --tw: calc(var(--bh) * var(--ar));
  background-image: repeating-linear-gradient(90deg, transparent 0 var(--tw), oklch(0% 0 0 / .2) var(--tw) calc(var(--tw) * 2)), var(--img);
  background-size: auto, auto 100%; background-repeat: repeat, repeat-x; transition: filter .6s var(--ease-out);
}
.dm-clip[data-m="sintel"] { --img: url(assets/media/sintel.jpg); --ar: 2.353; }
.dm-clip[data-m="bunny"]  { --img: url(assets/media/big-buck-bunny.jpg); --ar: 1.778; }
.dm-clip[data-m="tears"]  { --img: url(assets/media/tears-of-steel.jpg); --ar: 2.403; }
.dm-clip[data-m="earth"]  { --img: url(assets/media/blue-marble.jpg); --ar: 0.998; }
.dm.is-warm .dm-clip[data-m] .dm-c-body { filter: sepia(.28) saturate(1.25) hue-rotate(-10deg) contrast(1.05); }
.dm-clip.is-sel { z-index: 2; border-color: transparent; outline: 2px solid var(--accent); outline-offset: -2px; }
.dm-clip.is-sel .dm-c-head { background: color-mix(in oklab, var(--ch) 84%, var(--mix-hi)); font-weight: 600; }
.dm-clip.is-sel:focus-visible { outline-offset: -2px; box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--fg); }
.dm-trim { position: absolute; top: 0; bottom: 0; z-index: 3; width: 7px; opacity: 0; pointer-events: none; }
.dm-trim.l { left: 0; } .dm-trim.r { right: 0; }
.dm-trim::after { content: ""; position: absolute; top: 30%; bottom: 30%; left: 2px; width: 2px; border-radius: 1px; background: color-mix(in oklab, var(--clip-ink) 75%, transparent); }
.dm-clip:hover .dm-trim { opacity: 1; background: color-mix(in oklab, var(--clip-ink) 12%, transparent); }
.dm-clip.is-sel .dm-trim { opacity: 1; background: var(--accent); }
.dm-clip.is-sel .dm-trim::after { background: var(--accent-ink); }

/* playline: 1px --fg hairline + the ruler's pentagon head (.playline / .ph-head) */
.dm-phw { position: absolute; top: 0; bottom: 0; left: var(--hw); right: var(--pr); z-index: 10; pointer-events: none; }
.dm-ph { position: absolute; inset: 0; transform: translate3d(0, 0, 0); will-change: transform; }
.dm-ph::before { content: ""; position: absolute; top: 0; bottom: 0; left: -.5px; width: 1px; background: var(--fg); box-shadow: 0 0 0 .5px oklch(0% 0 0 / .5); }
.dm-ph::after { content: ""; position: absolute; top: 0; left: -6.5px; width: 13px; height: 16px; background: var(--fg); clip-path: polygon(0 0, 100% 0, 100% 58%, 50% 100%, 0 58%); }

/* ---- status bar ---- */
.dm-statusbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 0 20px; overflow: hidden;
  background: var(--bg-1); border-top: 1px solid var(--border-subtle); color: var(--fg-3); font-size: 11px; white-space: nowrap;
}
.dm-sb-left { display: flex; align-items: center; gap: 6px; min-width: 0; overflow: hidden; }
.dm-sb-left span { overflow: hidden; text-overflow: ellipsis; }
.dm-sb-right { display: flex; flex: none; align-items: center; gap: 16px; }
.dm-hint-k { display: inline-flex; align-items: center; gap: 5px; }

@keyframes dm-spin { to { transform: rotate(360deg); } }
@keyframes dm-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes dm-rise { from { opacity: 0; transform: translate3d(0, 4px, 0); } }
@keyframes dm-drop { from { opacity: 0; transform: translate3d(0, -8px, 0) scale(.92); } }
@keyframes dm-out { to { opacity: 0; transform: translate3d(0, 4px, 0) scale(.9); } }
@keyframes dm-pulse { from { opacity: 1; } to { opacity: 0; } }

/* ==========================================================================
   Container sizes — wide: Media | Viewer | Chat; medium (< 1000): Media off by default, slimmer docks;
   narrow (< 700): Viewer, then Chat/Inspector, then Timeline; track heads shrink to label + name.
   ========================================================================== */
@container dm (max-width: 999px) {
  .dm-ws { --wl: 208px; --wr: 296px; }
  .dm-back span, .dm-winmenu, .dm-tb-sep-w, .dm-settings, .dm-tb-sep-s { display: none; }
  .dm-viewer .dm-ph-meta, .dm-tl-tools, .dm-chip-agents, .dm-tc-total { display: none; }
  .dm-tl-inner { --hw: 156px; }
  .dm-th-caret, .dm-tbtn { display: none; }
  .dm-sb-left { display: none; }
}
@container dm (max-width: 859px) {
  .dm-ws-nav, .dm-save-state { display: none; }
}
@container dm (max-width: 699px) {
  .dm-titlebar { gap: 6px; padding: 0 8px 0 14px; }
  .dm-tl-group { margin-right: 4px; }
  .dm-back, .dm-panels, .dm-tb-sep-p { display: none; }
  .dm-ws { grid-template-rows: auto auto; }
  .dm-row { display: flex; flex-direction: column; }
  .dm.no-l .dm-dock-l, .dm-dock-l { display: none; }
  .dm.no-r .dm-dock-r, .dm-dock-r { display: flex; flex: none; height: 340px; }
  .dm-viewer { flex: none; }
  .dm-viewer .dm-ph-actions { display: none; }
  .dm-stage { flex: none; padding: 10px; container-type: inline-size; }
  .dm-frame { width: 100%; }
  .dm-vbar { grid-template-columns: minmax(0, 1fr) auto; }
  .dm-v-tools, .dm-tc-total, .dm-tp-sep, .dm-loop { display: none; }
  .dm-chat-chip:not(:nth-child(3)), .dm-clip-att { display: none; }
  .dm-timeline .dm-ph-actions, .dm-seq { display: none; }
  .dm-tl-inner { --hw: 84px; --pr: 8px; }
  .dm-pill, .dm-corner > .dm-icon-btn { display: none; }
  .dm-corner.dm-beat-corner { padding: 0 6px; }
  .dm-beat-corner span:last-child { display: none; }
  .dm-sb-right .dm-hint-k, .dm-sb-snap { display: none; }
  .dm-statusbar { justify-content: flex-end; padding: 0 12px; }
}

/* ---- touch: 44 px targets for everything interactive ---- */
@media (pointer: coarse) {
  .dm-ws { grid-template-rows: auto auto; }
  .dm-row { height: 440px; }
  .dm-tb-tools .dm-icon-btn, .dm-transport .dm-icon-btn { width: 44px; height: 44px; }
  .dm-panels > button { width: 44px; height: 40px; }
  .dm-btn.dm-play { width: 52px; height: 44px; }
  .dm-vbar { height: 52px; }
  .dm-tc-wrap { height: 44px; }
  .dm-panel-head:has(button.dm-tab) { height: 48px; }
  button.dm-tab { height: 44px; }
  .dm-chat-suggestion, .dm-sugs.is-row .dm-chat-suggestion { min-height: 44px; }
  .dm-btn.dm-chat-send { min-width: 44px; height: 44px; }
  .dm-revert, .dm-turn-undo { min-height: 44px; }
  .dm-sec-h { height: 44px; }
  .dm-asset.row { height: 44px; }
  .dm-tl-scroll { height: auto; min-height: 196px; }
  .dm-ruler-row, .dm-ruler, .dm-ruler-row .dm-corner { height: 32px; }
  .dm-trk[data-trk="mot"], .dm-trk[data-trk="a1"], .dm-trk[data-trk="a2"] { --th: 44px; }
  .dm-trk[data-trk="v1"] { --th: 52px; }
}
@container dm (max-width: 699px) {
  @media (pointer: coarse) { .dm-row { height: auto; } }
}

/* ---- reduced motion: states apply instantly ---- */
@media (prefers-reduced-motion: reduce) {
  .dm *, .dm *::before, .dm *::after { transition: none !important; animation: none !important; }
  .dm-msg { opacity: 1; transform: none; }
}
