/* roomflow-inline-edit-wip.css — companion of roomflow-inline-edit-wip.js
   (2026-09-29). Loaded after roomflow-panel-wip.css; only WIP routes render
   <body data-nav-wip>. Visual language matches roomflow-panel-wip.css / the
   .dt-rs-tool / .dt-rs-key keys already there: black #111827 primary key,
   neutral greys, 8-16px radius. Blue #2563eb is reserved for the page's own
   Generate key, so this field's send key is black, not blue. */
body[data-nav-wip] .dt-rf-bar {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: min(640px, calc(100% - 32px));
    max-width: calc(100% - 32px);
}
body[data-nav-wip] .dt-rf-bar[hidden] {
    display: none !important;
}
/* [WIP 2026-09-29 follow-up] "there must be a canvas display while editing":
   ported from SnapRender's .wr-lists.result padding-bottom reservation
   (snaprender-panel-wip.css ~1692-1695/2506-2508). While the field shows
   (roomflow-inline-edit-wip.js's syncSpace), the result area reserves exactly
   the field's own measured height (--dt-rf-bar-h, set by syncSpace) so the
   picture/compare frame fit ABOVE it instead of being covered - the existing
   fitCompare()/fitSliders() in roomflow-panel-wip.js re-run on this class
   change (its own body MutationObserver) and do the actual re-fit. */
body.dt-rf-bar-on[data-nav-wip] .wr-lists.result {
    padding-bottom: var(--dt-rf-bar-h, 100px) !important;
    box-sizing: border-box !important;
}
body[data-nav-wip] .dt-rf-chips[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-chips {
    display: flex;
    flex-wrap: wrap;
    max-width: calc(100% - 6px);
    gap: 6px;
    align-self: flex-start;
    margin-left: 6px;
}
body[data-nav-wip] .dt-rf-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    color: #374151;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .12);
    white-space: nowrap;
}
body[data-nav-wip] .dt-rf-chip svg { flex: 0 0 auto; }
body[data-nav-wip] .dt-rf-chip small { font-size: 11px; color: #9ca3af; }
body[data-nav-wip] .dt-rf-chip:hover { background: #ffffff; color: #111827; }
body[data-nav-wip] .dt-rf-chip:disabled { opacity: .5; cursor: not-allowed; }
body[data-nav-wip] .dt-rf-chip.is-on { background: #111827; color: #ffffff; }
body[data-nav-wip] .dt-rf-chip.is-on small { color: rgba(255, 255, 255, .6); }
body[data-nav-wip] .dt-rf-chip.has-marks:not(.is-on) { box-shadow: 0 0 0 1.5px #111827 inset, 0 4px 14px rgba(15, 23, 42, .12); }
body[data-nav-wip] .dt-rf-bar.is-busy .dt-rf-chips { opacity: .5; pointer-events: none; }

body[data-nav-wip] .dt-rf-editbox {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 0 6px 0 16px;
    border: 1px solid #d4d8de;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
    box-sizing: border-box;
}
body[data-nav-wip] .dt-rf-inwrap { flex: 1 1 auto; min-width: 0; display: flex; }
body[data-nav-wip] .dt-rf-prompt {
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    border: 0;
    outline: none;
    background: transparent;
    color: #111827;
    font-size: 14px;
}
body[data-nav-wip] .dt-rf-prompt::placeholder { color: #b3b9c3; }
body[data-nav-wip] .dt-rf-prompt:read-only { cursor: default; }
body[data-nav-wip] .dt-rf-send {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-send:hover { background: #1f2937; }
body[data-nav-wip] .dt-rf-send:disabled { opacity: .5; cursor: not-allowed; }
body[data-nav-wip] .dt-rf-cost { font-size: 12px; font-weight: 500; opacity: .8; }
body[data-nav-wip] .dt-rf-close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body[data-nav-wip] .dt-rf-close:hover { background: #f3f4f6; color: #111827; }
body[data-nav-wip] .dt-rf-bar.is-busy .dt-rf-editbox { opacity: .65; }
body[data-nav-wip] .dt-rf-prompt:disabled { cursor: not-allowed; }

/* the Edit tool in the result tab row lights up while the field is open
   (dt-rs-tool has no is-on rule of its own; the key already has one, see
   roomflow-panel-wip.css) */
body[data-nav-wip] .wr-title .dt-rs-tool.is-on {
    background: #111827;
    color: #ffffff;
}
body[data-nav-wip] .wr-title .dt-rs-tool.is-on:hover {
    background: #1f2937;
    box-shadow: none;
}

/* Compare "before edit" pill (ported look from SnapRender's dt-cp-src) */
body[data-nav-wip] .dt-rf-cp-src {
    position: absolute;
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .55);
    backdrop-filter: blur(4px);
    z-index: 5;
}
body[data-nav-wip] .dt-rf-cp-src button {
    border: 0;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, .8);
    background: transparent;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-cp-src button.is-on {
    background: #ffffff;
    color: #111827;
}

body.dark-mode[data-nav-wip] .dt-rf-editbox {
    background: #1f1f22;
    border-color: #3a3a3f;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
/* dark-theme.css paints every input (bg + border, !important); the field is the bar */
body.dark-mode[data-nav-wip] .dt-rf-prompt { color: #f5f5f6 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
body.dark-mode[data-nav-wip] .dt-rf-prompt::placeholder { color: #5a5a63; }
body.dark-mode[data-nav-wip] .dt-rf-send { background: #e5e7eb; color: #111827; }
body.dark-mode[data-nav-wip] .dt-rf-send:hover { background: #ffffff; }
body.dark-mode[data-nav-wip] .dt-rf-close { color: #a1a1aa; }
body.dark-mode[data-nav-wip] .dt-rf-close:hover { background: #2a2a2e; color: #f5f5f6; }
body.dark-mode[data-nav-wip] .dt-rf-chip { background: rgba(31, 31, 34, .96); color: #d4d4d8; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
body.dark-mode[data-nav-wip] .dt-rf-chip:hover { background: #2a2a2e; color: #f5f5f6; }
body.dark-mode[data-nav-wip] .dt-rf-chip.is-on { background: #e5e7eb; color: #111827; }
body.dark-mode[data-nav-wip] .dt-rf-chip.is-on small { color: rgba(17, 24, 39, .6); }
body.dark-mode[data-nav-wip] .dt-rf-chip small { color: #71717a; }
body.dark-mode[data-nav-wip] .dt-rf-chip.has-marks:not(.is-on) { box-shadow: 0 0 0 1.5px #e5e7eb inset, 0 4px 14px rgba(0, 0, 0, .4); }
body.dark-mode[data-nav-wip] .wr-title .dt-rs-tool.is-on { background: #e5e7eb; color: #111827; }
body.dark-mode[data-nav-wip] .wr-title .dt-rs-tool.is-on:hover { background: #ffffff; }

@media (max-width: 768px) {
    body[data-nav-wip] .dt-rf-bar { bottom: 10px; width: calc(100% - 20px); }
    body[data-nav-wip] .dt-rf-editbox { height: 44px; }
}

/* ── [WIP 2026-09-29 follow-up] Video mode ─────────────────────────────────
   Ported from snaprender-panel-wip.js's Video mode (6q) and video-in-canvas
   display (6v). Classes renamed dt-rf-* to match this file's own prefix. */

/* end (last) frame slot, same size/shape as SnapRender's .dt-rv-vidend
   (snaprender-panel-wip.css:3742) - video mode only */
body[data-nav-wip] .dt-rf-vidend {
    position: relative;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin-left: -8px;
    border-radius: 9px;
    overflow: hidden;
    background: #f3f4f6;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, .08);
}
body[data-nav-wip] .dt-rf-vidend[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-vidend-add {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-vidend-add:hover { color: #111827; background: #e5e7eb; }
body[data-nav-wip] .dt-rf-vidend img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}
body[data-nav-wip] .dt-rf-vidend-x {
    position: absolute;
    top: 1px;
    right: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 24, 39, .65);
    color: #ffffff;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-vidend-x:hover { background: rgba(0, 0, 0, .8); }
body.dark-mode[data-nav-wip] .dt-rf-vidend { background: #1f1f22; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
body.dark-mode[data-nav-wip] .dt-rf-vidend-add { color: #71717a; }
body.dark-mode[data-nav-wip] .dt-rf-vidend-add:hover { color: #f5f5f6; background: #2a2a2e; }
/* [WIP 2026-09-29] empty slot = a round dashed "add" key (the rounded square
   read as a broken thumbnail); once a frame is picked it keeps the 9px tile */
body[data-nav-wip] .dt-rf-vidend:not(.has-img) {
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    border: 1.5px dashed #c4c8cf;
    box-sizing: border-box;
    transition: border-color .15s ease, background-color .15s ease;
}
body[data-nav-wip] .dt-rf-vidend:not(.has-img) .dt-rf-vidend-add {
    border-radius: 50%;
    font-size: 0;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") no-repeat center / 14px;
}
body[data-nav-wip] .dt-rf-vidend:not(.has-img):hover {
    border-color: #111827;
    background: #f3f4f6;
}
body[data-nav-wip] .dt-rf-vidend:not(.has-img):hover .dt-rf-vidend-add {
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E");
}
body.dark-mode[data-nav-wip] .dt-rf-vidend:not(.has-img) { background: transparent; box-shadow: none; border-color: #4b4b52; }
body.dark-mode[data-nav-wip] .dt-rf-vidend:not(.has-img):hover { border-color: #f5f5f6; background: #2a2a2e; }
body.dark-mode[data-nav-wip] .dt-rf-vidend:not(.has-img) .dt-rf-vidend-add {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E");
}
body.dark-mode[data-nav-wip] .dt-rf-vidend:not(.has-img):hover .dt-rf-vidend-add {
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f6' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E");
}

/* [WIP 2026-09-30] end-frame picker popover, ported from SnapRender's
   .dt-vd-end-pop (snaprender-panel-wip.js's own CSS, ~3796-3863) - same look,
   renamed to the dt-rf-vidend-pop-* namespace so it never collides with this
   file's own .dt-rf-vidend slot classes. */
body[data-nav-wip] .dt-rf-vidend-pop {
    position: absolute;
    z-index: 16;
    top: 56px;
    width: min(260px, calc(100% - 24px));
    max-height: 280px;
    overflow-y: auto;
    padding: 10px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .18), 0 0 0 1px rgba(15, 23, 42, .06);
}
body[data-nav-wip] .dt-rf-vidend-pop[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-vidend-pop-head {
    margin-bottom: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #6b7280;
}
body[data-nav-wip] .dt-rf-vidend-pop-upload {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 32px;
    margin-bottom: 8px;
    padding: 0 10px;
    border: 1px dashed #d4d8de;
    border-radius: 8px;
    background: transparent;
    color: #374151;
    font-size: 12.5px;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-vidend-pop-upload:hover { background: #f3f4f6; }
body[data-nav-wip] .dt-rf-vidend-pop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}
body[data-nav-wip] .dt-rf-vidend-pop-item {
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #f3f4f6;
}
body[data-nav-wip] .dt-rf-vidend-pop-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
body[data-nav-wip] .dt-rf-vidend-pop-empty {
    padding: 10px 2px;
    font-size: 12.5px;
    color: #9ca3af;
    text-align: center;
}
body.dark-mode[data-nav-wip] .dt-rf-vidend-pop {
    background: #1f1f22;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08);
}
body.dark-mode[data-nav-wip] .dt-rf-vidend-pop-head { color: #a1a1aa; }
body.dark-mode[data-nav-wip] .dt-rf-vidend-pop-upload { border-color: #3a3a3f; color: #d4d4d8; }
body.dark-mode[data-nav-wip] .dt-rf-vidend-pop-upload:hover { background: #2a2a2e; }
body.dark-mode[data-nav-wip] .dt-rf-vidend-pop-item { background: #2a2a2e; }
body.dark-mode[data-nav-wip] .dt-rf-vidend-pop-empty { color: #71717a; }
@media (max-width: 640px) {
    body[data-nav-wip] .dt-rf-vidend-pop { width: min(220px, calc(100% - 16px)); }
}

/* [WIP 2026-09-30] reference-image chips - items 4/5 of "batch 2", ported
   from SnapRender's .dt-rv-refs/.dt-rv-ref/.dt-rv-ref-x (snaprender-panel-wip.css
   ~3063-3107, ~3166), renamed to the dt-rf-refs* namespace. */
body[data-nav-wip] .dt-rf-refs {
    display: flex;
    gap: 4px;
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
}
body[data-nav-wip] .dt-rf-refs[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-ref {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 30px;
    padding: 0 4px 0 3px;
    border-radius: 999px;
    background: #eff4ff;
    color: #1d4ed8;
    font-size: 12px;
    white-space: nowrap;
    flex: 0 0 auto;
}
body[data-nav-wip] .dt-rf-ref img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
}
body[data-nav-wip] .dt-rf-ref-x {
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body[data-nav-wip] .dt-rf-ref-x:hover { background: rgba(37, 99, 235, .12); }
body.dark-mode[data-nav-wip] .dt-rf-ref { background: rgba(37, 99, 235, .18); color: #bfdbfe; }

/* [WIP 2026-09-30] item 5's grid selection row above the field, ported from
   SnapRender's own .dt-rv-selrow/.dt-rv-sel/.dt-rv-sel-x
   (snaprender-panel-wip.css ~3258-3326), renamed to the dt-rf-sel* namespace. */
body[data-nav-wip] .dt-rf-selrow {
    display: flex;
    gap: 8px;
    flex: 0 0 100%;
    padding: 2px 0 2px;
}
body[data-nav-wip] .dt-rf-selrow[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-bar.has-sel .dt-rf-editbox {
    flex-wrap: wrap;
    height: auto;
    min-height: 48px;
    row-gap: 6px;
    padding: 10px 6px 6px 12px;
    border-radius: 20px;
}
body[data-nav-wip] .dt-rf-sel {
    position: relative;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 12px;
    overflow: hidden;
    background: #f3f4f6;
}
body[data-nav-wip] .dt-rf-sel img { display: block; width: 100%; height: 100%; object-fit: cover; }
body[data-nav-wip] .dt-rf-sel em {
    position: absolute;
    left: 4px;
    bottom: 4px;
    padding: 0 5px;
    border-radius: 5px;
    background: rgba(17, 24, 39, .72);
    color: #ffffff;
    font-size: 10px;
    font-style: normal;
    line-height: 16px;
}
body[data-nav-wip] .dt-rf-sel-x {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 24, 39, .72);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
body.dark-mode[data-nav-wip] .dt-rf-sel { background: #2a2a2e; }

/* resolution / duration pill selects inside the field */
body[data-nav-wip] .dt-rf-vidopts {
    display: inline-flex;
    gap: 4px;
    flex: 0 0 auto;
    margin-left: 6px;
}
body[data-nav-wip] .dt-rf-vidopts[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-vsel {
    height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12.5px;
    cursor: pointer;
    outline: none;
}
body[data-nav-wip] .dt-rf-vsel:hover { background: #e5e7eb; }
body.dark-mode[data-nav-wip] .dt-rf-vsel { background: #2a2a2e; color: #d4d4d8; }
body.dark-mode[data-nav-wip] .dt-rf-vsel:hover { background: #34343a; }

/* the selects above as a pill key + a menu that opens upward (vselDropup) */
body[data-nav-wip] .dt-rf-dd {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}
body[data-nav-wip] .dt-rf-dd-key {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 9px 0 12px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #374151;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, color .15s;
}
body[data-nav-wip] .dt-rf-dd-key svg {
    width: 12px;
    height: 12px;
    color: #9ca3af;
    transition: transform .18s ease;
}
body[data-nav-wip] .dt-rf-dd-key:hover,
body[data-nav-wip] .dt-rf-dd.is-open .dt-rf-dd-key { background: #e5e7eb; color: #111827; }
body[data-nav-wip] .dt-rf-dd.is-open .dt-rf-dd-key svg { transform: rotate(180deg); }
body[data-nav-wip] .dt-rf-dd-key:focus-visible { outline: 2px solid #9ca3af; outline-offset: 1px; }
body[data-nav-wip] .dt-rf-dd-menu {
    position: absolute;
    z-index: 40;
    bottom: calc(100% + 10px);
    left: 50%;
    min-width: max(100%, 136px);
    padding: 5px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .06);
    transform: translateX(-50%);
    animation: dtRfDdUp .14s ease-out;
}
@keyframes dtRfDdUp {
    from { opacity: 0; transform: translate(-50%, 4px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
body[data-nav-wip] .dt-rf-dd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 34px;
    padding: 0 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #374151;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-dd-item:hover,
body[data-nav-wip] .dt-rf-dd-item:focus-visible { background: #f3f4f6; outline: none; }
body[data-nav-wip] .dt-rf-dd-item.is-on { color: #111827; font-weight: 600; }
body[data-nav-wip] .dt-rf-dd-txt { flex: 1 1 auto; }
body[data-nav-wip] .dt-rf-dd-cost {
    color: #9ca3af;
    font-size: 11.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
body[data-nav-wip] .dt-rf-dd-cost::before { content: '-'; }
body[data-nav-wip] .dt-rf-dd-check {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    color: #111827;
    visibility: hidden;
}
body[data-nav-wip] .dt-rf-dd-item.is-on .dt-rf-dd-check { visibility: visible; }
body.dark-mode[data-nav-wip] .dt-rf-dd-key { background: #2a2a2e; color: #d4d4d8; }
body.dark-mode[data-nav-wip] .dt-rf-dd-key svg { color: #71717a; }
body.dark-mode[data-nav-wip] .dt-rf-dd-key:hover,
body.dark-mode[data-nav-wip] .dt-rf-dd.is-open .dt-rf-dd-key { background: #34343a; color: #f5f5f6; }
body.dark-mode[data-nav-wip] .dt-rf-dd-menu {
    border-color: #2e2e33;
    background: #1f1f22;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .02);
}
body.dark-mode[data-nav-wip] .dt-rf-dd-item { color: #d4d4d8; }
body.dark-mode[data-nav-wip] .dt-rf-dd-item:hover,
body.dark-mode[data-nav-wip] .dt-rf-dd-item:focus-visible { background: #2a2a2e; }
body.dark-mode[data-nav-wip] .dt-rf-dd-item.is-on { color: #f5f5f6; }
body.dark-mode[data-nav-wip] .dt-rf-dd-cost { color: #71717a; }
body.dark-mode[data-nav-wip] .dt-rf-dd-check { color: #f5f5f6; }

/* RoomFlow adaptation: at narrow viewports the end-frame slot steps aside
   (same breakpoint as SnapRender's own dt-rv-vidend rule,
   snaprender-panel-wip.css:4717) */
@media (max-width: 1200px) {
    body[data-nav-wip] .dt-rf-bar.is-video .dt-rf-vidend { display: none !important; }
}

/* the finished video in the canvas - ported from snaprender-panel-wip.css's
   video.dt-vid rule (~4298), wrapped in RoomFlow's own
   ".video-result-container" (see roomflow-tool-shared-wip.js
   RF_showVideoResult) so the page's existing isVideoResultActive() /
   updateFloatingButtonsVisibility() keep hiding the legacy floating row. */
body[data-nav-wip] .wr-lists.result .video-result-container.dt-rf-vidwrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
    background: transparent;
}
body[data-nav-wip] .wr-lists.result video.dt-vid {
    display: block;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
    border-radius: 14px;
    background: #000;
    outline: none;
}

/* the dedicated Download key for a video on show, next to #fullscreenBtn -
   independent of the RS_ITEMS toolbar (roomflow-panel-wip.js), which hides
   itself while a video plays. Same visual language as .dt-rs-key
   (roomflow-panel-wip.css). */
body[data-nav-wip] .dt-rf-vid-dl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 4px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #374151;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-vid-dl[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-vid-dl:hover { background: #f3f4f6; color: #111827; }
body.dark-mode[data-nav-wip] .dt-rf-vid-dl { color: #d4d4d8; }
body.dark-mode[data-nav-wip] .dt-rf-vid-dl:hover { background: #2a2a2e; color: #f5f5f6; }

/* the end-frame slot's parts toggle with [hidden]; their display rules above
   would otherwise win and show the remove badge on an empty slot */
body[data-nav-wip] .dt-rf-vidend [hidden] {
    display: none !important;
}

/* ── [WIP 2026-09-29 follow-up] zoom / pan (shared dt-canvas-zoom.js/.css) ──
   The module's own .dt-cz control/behaviour CSS ships in dt-canvas-zoom.css
   (loaded alongside it); this file only clips the picture while zoomed past
   fit, matching SnapRender's .wr-lists-box overflow:hidden
   (snaprender-panel-wip.css:787) without widening it to this box's normal
   (unzoomed) state, which elsewhere relies on overflow-y:auto (a multi-room
   grid answer can be taller than the box) - dt-canvas-zoom.js itself toggles
   "dt-cz-on" on its host once scale exceeds fit. */
body[data-nav-wip] .wam-result .wr-lists-box.dt-cz-on {
    overflow: hidden;
}

/* ── [WIP 2026-09-29 follow-up] Comment (Codex-style pinned comments,
   nano_banana_2 lane), ported from SnapRender's own dt-cm-* rules
   (snaprender-panel-wip.css ~4978-5193). Classes renamed dt-rf-cm-* to match
   this file's own prefix; visual language otherwise unchanged. ── */
body[data-nav-wip] .dt-rf-cm-layer {
    position: absolute;
    z-index: 13;
    /* comment bubble with a "+", hotspot at its pointed corner (where the pin lands) */
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M3 21V12a9 9 0 1 1 9 9z' fill='%23111827' stroke='white' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M12 8.5v7M8.5 12h7' stroke='white' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 3 21, crosshair;
    touch-action: none;
}
body[data-nav-wip] .dt-rf-cm-layer[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-cm-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
body[data-nav-wip] .dt-rf-cm-pin:hover { background: #1d4ed8; }
body[data-nav-wip] .dt-rf-cm-pin.is-active {
    background: #1d4ed8;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .28), 0 1px 4px rgba(0, 0, 0, .35);
}
body[data-nav-wip] .dt-rf-cm-bubble {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: min(320px, calc(100% - 12px));
    padding: 5px 6px 5px 12px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .22), 0 0 0 1px rgba(16, 24, 40, .06);
    cursor: default;
}
body[data-nav-wip] .dt-rf-cm-input {
    flex: 1 1 auto;
    min-width: 140px;
    width: 140px;
    height: 26px;
    border: 0;
    background: transparent;
    color: #111827;
    font-size: 13px;
    outline: none;
}
body[data-nav-wip] .dt-rf-cm-input::placeholder { color: #9ca3af; }
body[data-nav-wip] .dt-rf-cm-send,
body[data-nav-wip] .dt-rf-cm-del {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-cm-send {
    background: #111827;
    color: #ffffff;
}
body[data-nav-wip] .dt-rf-cm-send:hover { background: #000000; }
body[data-nav-wip] .dt-rf-cm-del {
    background: transparent;
    color: #9ca3af;
    font-size: 16px;
    line-height: 1;
}
body[data-nav-wip] .dt-rf-cm-del:hover { background: #f3f4f6; color: #111827; }
body.dark-mode[data-nav-wip] .dt-rf-cm-bubble {
    background: #1f1f22;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
}
body.dark-mode[data-nav-wip] .dt-rf-cm-input { color: #f5f5f6; }
body.dark-mode[data-nav-wip] .dt-rf-cm-input::placeholder { color: #71717a; }
body.dark-mode[data-nav-wip] .dt-rf-cm-send { background: #e5e7eb; color: #111827; }
body.dark-mode[data-nav-wip] .dt-rf-cm-send:hover { background: #f3f4f6; }
body.dark-mode[data-nav-wip] .dt-rf-cm-del { color: #71717a; }
body.dark-mode[data-nav-wip] .dt-rf-cm-del:hover { background: #2a2a2e; color: #f5f5f6; }
body.dark-mode[data-nav-wip] .dt-rf-cm-pin { border-color: #1f1f22; }
/* the chip row is a line of its own, above the input row, inside the same
   pill - not squeezed between the input and the send key. .dt-rf-cm-bar is a
   DIRECT child of .dt-rf-editbox (not nested under .dt-rf-inwrap): order:-1
   plus flex:1 0 100% makes it the pill's first flex line when the pill itself
   wraps (.is-comment.has-comments below), so the input/send/close row is
   pushed to the next line unchanged. With zero comments .dt-rf-cm-bar stays
   display:none and the pill looks exactly as it did before Comment existed. */
body[data-nav-wip] .dt-rf-bar.is-comment.has-comments .dt-rf-editbox {
    flex-wrap: wrap;
    height: auto;
    min-height: 48px;
    row-gap: 6px;
    padding: 8px 6px 6px 12px;
    border-radius: 20px;
    align-items: center;
}
body[data-nav-wip] .dt-rf-cm-bar {
    display: none;
    order: -1;
    flex: 1 0 100%;
    width: 100%;
    align-items: center;
    gap: 6px;
}
body[data-nav-wip] .dt-rf-bar.is-comment.has-comments .dt-rf-cm-bar { display: flex; }
body[data-nav-wip] .dt-rf-cm-chips {
    display: flex;
    flex: 1 1 0;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 6px;
    min-width: 0;
    max-height: 60px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1px;
}
body[data-nav-wip] .dt-rf-cm-chip {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    max-width: 260px;
    height: 24px;
    padding: 0 4px 0 6px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #111827;
    font-size: 12px;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-cm-chip b {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #2563eb;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    font-style: normal;
}
body[data-nav-wip] .dt-rf-cm-chip-txt {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body[data-nav-wip] .dt-rf-cm-chip-x {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9ca3af;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-cm-chip-x:hover { background: #e5e7eb; color: #111827; }
body[data-nav-wip] .dt-rf-cm-clear {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-cm-clear[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-cm-clear:hover { background: #f3f4f6; color: #111827; }
@media (max-width: 640px) {
    body[data-nav-wip] .dt-rf-cm-chip { max-width: 170px; }
}
body.dark-mode[data-nav-wip] .dt-rf-cm-chip { background: #2a2a2e; color: #f5f5f6; }
body.dark-mode[data-nav-wip] .dt-rf-cm-chip b { background: #60a5fa; color: #111827; }
body.dark-mode[data-nav-wip] .dt-rf-cm-chip-x { color: #a1a1aa; }
body.dark-mode[data-nav-wip] .dt-rf-cm-chip-x:hover { background: #34343a; color: #f5f5f6; }
body.dark-mode[data-nav-wip] .dt-rf-cm-clear { color: #a1a1aa; }
body.dark-mode[data-nav-wip] .dt-rf-cm-clear:hover { background: #2a2a2e; color: #f5f5f6; }
/* Remove: same mask editor layout as SnapRender. */
@media (min-width: 769px) {
    body.dt-rf-rail-on:not(.dt-rf-rail-open):not(.dt-rf-as-open)[data-nav-wip] .dt-rf-bar { left: calc(50% - 36px); }
}
body[data-nav-wip] .dt-rf-bar.is-remove .dt-rf-editbox { flex-wrap: wrap; height: auto; min-height: 48px; padding: 6px 10px; border-radius: 24px; }
body[data-nav-wip] .dt-rf-bar.is-remove .dt-rf-inwrap { flex: 1 1 280px; }
body[data-nav-wip] .dt-rf-rm-layer {
    position: absolute;
    z-index: 13;
    pointer-events: auto;
    /* area mode: ring + centre dot (same glyph as Markup's shapes) */
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7' fill='none' stroke='white' stroke-width='3.5'/%3E%3Ccircle cx='12' cy='12' r='7' fill='none' stroke='%23111827' stroke-width='1.5'/%3E%3Ccircle cx='12' cy='12' r='2.2' fill='%23111827' stroke='white' stroke-width='1.2'/%3E%3C/svg%3E") 12 12, crosshair;
    touch-action: none;
}
/* brush mode: the size ring (.dt-rf-rm-cursor) is the cursor */
body[data-nav-wip] .dt-rf-rm-layer.is-brush { cursor: none; }
body[data-nav-wip] .dt-rf-rm-layer[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-rm-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}
body[data-nav-wip] .dt-rf-rm-cursor {
    position: absolute;
    border: 1.5px solid #2563eb;
    background: rgba(37, 99, 235, .12);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
}
body[data-nav-wip] .dt-rf-rm-bar {
    display: none;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
body[data-nav-wip] .dt-rf-bar.is-remove .dt-rf-rm-bar {
    display: flex;
}
body[data-nav-wip] .dt-rf-bar.is-remove .dt-rf-prompt,
body[data-nav-wip] .dt-rf-bar.is-remove .dt-rf-vopts,
body[data-nav-wip] .dt-rf-bar.is-remove .dt-rf-refs {
    display: none !important;
}
body[data-nav-wip] .dt-rf-rm-modes {
    flex: 0 0 auto;
    display: flex;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: #f3f4f6;
}
body[data-nav-wip] .dt-rf-rm-mode {
    flex: 0 0 auto;
    height: 26px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6b7280;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-rm-mode.is-on {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .08);
}
body[data-nav-wip] .dt-rf-rm-size-input {
    flex: 0 0 100px;
    width: 100px;
}
body[data-nav-wip] .dt-rf-rm-size-input[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-rm-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
}
body[data-nav-wip] .dt-rf-rm-icon:hover {
    background: #f3f4f6;
    color: #111827;
}
body[data-nav-wip] .dt-rf-rm-hint {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    color: #9ca3af;
}
@media (max-width: 1100px) {
    body[data-nav-wip] .dt-rf-rm-hint { display: none; }
    body[data-nav-wip] .dt-rf-rm-size-input { display: none !important; }
}
@media (max-width: 640px) {
    body[data-nav-wip] .dt-rf-rm-modes { padding: 1px; }
    body[data-nav-wip] .dt-rf-rm-mode { padding: 0 7px; }
}
body.dark-mode[data-nav-wip] .dt-rf-rm-cursor { border-color: #60a5fa; background: rgba(96, 165, 250, .16); }
body.dark-mode[data-nav-wip] .dt-rf-rm-modes { background: #161618; }
body.dark-mode[data-nav-wip] .dt-rf-rm-mode { color: #9ca3af; }
body.dark-mode[data-nav-wip] .dt-rf-rm-mode.is-on { background: #34343a; color: #f5f5f6; box-shadow: none; }
body.dark-mode[data-nav-wip] .dt-rf-rm-icon { color: #a1a1aa; }
body.dark-mode[data-nav-wip] .dt-rf-rm-icon:hover { background: #2a2a2e; color: #f5f5f6; }
body.dark-mode[data-nav-wip] .dt-rf-rm-hint { color: #71717a; }

/* Area completion stays explicit and reachable, including narrow toolbars. */
body[data-nav-wip] .dt-rf-rm-close {
    flex: 0 0 auto; padding: 5px 9px; border: 1px solid #bfdbfe; border-radius: 7px;
    background: #eff6ff; color: #1d4ed8; font: inherit; font-size: 12px; cursor: pointer;
}
body[data-nav-wip] .dt-rf-rm-close[hidden] { display: none !important; }
body[data-nav-wip] .dt-rf-rm-close:disabled { opacity: .45; cursor: default; }
body[data-nav-wip] .dt-rf-rm-close:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
body[data-nav-wip] .dt-rf-rm-bar { flex-wrap: wrap; overflow: visible; }
/* Hint changes must not move the image while the pointer targets the start. */
body[data-nav-wip] .dt-rf-rm-hint { flex-basis: 0; }
body.dark-mode[data-nav-wip] .dt-rf-rm-close { background: #1e3a5f; border-color: #3b82f6; color: #bfdbfe; }
