.dm-road { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; min-width: 0; color: var(--ink); font: 15px/1.5 var(--sans); }
.dm-road *, .dm-road *::before, .dm-road *::after { box-sizing: border-box; }
.dm-road [hidden] { display: none !important; }
.dm-road-heading,.dm-history-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dm-road-heading h2,.dm-history h3 { margin: 0; font: 600 25px/1.25 var(--serif); }
.dm-road-heading p { margin: 0 0 6px; }
.dm-road button { cursor: pointer; min-height: 44px; font: inherit; }
.dm-road-heading button,.dm-history-actions button,.dm-edge>button { padding: 10px 16px; border: 1px solid var(--ink); border-radius: 4px; background: transparent; color: var(--ink); }
.dm-edge>button { background: var(--ink); color: white; }
.dm-road button:disabled { opacity: .55; cursor: default; }
.dm-road :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.dm-chain { display: flex; gap: 24px; list-style: none; padding: 16px 4px 20px; margin: 0; overflow-x: auto; scroll-snap-type: x proximity; }
.dm-chain-item { flex: 0 0 190px; display: flex; flex-direction: column; align-items: stretch; scroll-snap-align: start; }
.dm-chain-node { display: grid; gap: 7px; padding: 8px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper-2); color: var(--ink); text-align: left; }
.dm-chain-node[aria-current] { border-color: var(--ink); outline: 2px solid var(--leaf); outline-offset: 1px; }
.dm-chain-node img { width: 100%; height: 108px; object-fit: contain; }
.dm-chain-node b { font: 600 17px/1.3 var(--serif); overflow-wrap: anywhere; }
.dm-chain-edge { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: transparent; color: var(--ink); font: 600 13px/1.3 var(--sans); }
.dm-chain-pending { flex: 0 0 170px; display: grid; align-content: center; gap: 8px; color: var(--ink-soft); border-left: 1px dashed var(--line-strong); padding-left: 20px; font: 15px/1.4 var(--sans); }
.dm-history { padding: 20px 0; border-top: 1px solid var(--line); }
.dm-history-actions { justify-content: flex-start; margin: 12px 0; }
.dm-history iframe { display: block; width: 100%; height: 560px; max-height: 75svh; border: 1px solid var(--line); border-radius: 8px; }
.dm-edge { display: grid; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.dm-edge h3 { margin: 0; font: 600 23px/1.3 var(--serif); }
.dm-edge textarea,.dm-edge select { width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--ink); background: white; border: 1px solid var(--line-strong); border-radius: 4px; }
.dm-edge textarea { resize: vertical; min-height: 96px; }
.dm-edge fieldset { display: flex; gap: 8px 20px; flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.dm-edge fieldset label { display: flex; align-items: center; gap: 7px; min-height: 44px; font: 14px/1.35 var(--sans); }
.dm-edge input[type=checkbox] { width: 18px; height: 18px; min-height: 18px; margin: 0; }
.dm-edge button { justify-self: start; }
.dm-edge-notes p { margin: 0 0 10px; overflow-wrap: anywhere; }
.dm-next { padding-top: 20px; border-top: 1px solid var(--line); }
.dm-next .dms { background: transparent; }
.dm-next .dms-chain-editor>[data-dms-result] { margin-top: 0; border: 0; }
.dm-next .dms-chain-editor>.dms-prompt { padding-top: 20px; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .dm-chain { gap: 16px; }.dm-history iframe { height: 510px; }.dm-road-heading h2 { font-size: 23px; } }
/* The compact road (the desk's mission sequence draws the rows): only the picker, the pending line, the next-step form and the studio stay. */
.dm-compact { border-top: 0; margin-top: 8px; padding-top: 8px; }
.dm-compact .dm-road-heading > div, .dm-compact .dm-history, .dm-compact .dm-chain-item { display: none; }
.dm-compact .dm-road-heading { justify-content: flex-end; }
.dm-compact .dm-chain { display: block; overflow: visible; padding: 4px 0 8px; }
.dm-compact .dm-chain-pending { flex: none; border-left: 0; padding-left: 0; }
.dm-pick { display: grid; gap: 4px; margin: 8px 0; font: 600 14px/1.3 var(--sans); }
.dm-pick select { min-height: 44px; max-width: 100%; font: 15px/1.3 var(--sans); }
.dm-compact .dm-edge > a { display: inline-block; margin: 4px 0 8px; }
/* The quiet desk shape: no closing line, no empty status, the extras behind More. */
.dm-seq-host .seq-later { display: none; }
.dm-compact [data-dmc-status]:empty { display: none; }
.dm-compact [data-dmc-status] { margin: 4px 0; color: var(--ink-soft); }
.dm-old { margin: 0 0 8px; color: var(--ink-soft); }
.dm-level, .dm-more { border-top: 1px solid var(--line); padding: 4px 0; }
.dm-more { margin-top: 12px; }
.dm-level > summary, .dm-more > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font: 600 14px/1.3 var(--sans); color: var(--ink-soft); }
.dm-level { border-top: 0; }
.dm-compact .dm-edge { padding: 12px 0; border-top: 0; }
.dm-compact .dm-more .dm-next { border-top: 0; padding-top: 8px; }
