.rbvf-room-viewer { --rbvf-room-ink:#242321; --rbvf-room-line:#e6e3de; font:inherit; color:var(--rbvf-room-ink); }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-topbar > strong,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-size,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-heading,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-flyout-heading,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-photo-source-hint,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-summary,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-personal-calibration > p,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-status,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-ar-panel { direction:rtl; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-photo-source-hint,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-personal-calibration > p { text-align:right; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-measure-row,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-frame-roles { direction:rtl; }
.rbvf-room-viewer.rbvf-hebrew-ui .rbvf-room-entry-actions { direction:rtl; }
.rbvf-room-viewer * { box-sizing:border-box; }
.rbvf-room-entry-actions { display:flex; align-items:center; gap:8px; }
.rbvf-room-entry { min-height:38px; padding:8px 13px; border:1px solid #bcb6ab !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; cursor:pointer; font:inherit; }
.rbvf-room-entry:hover { border-color:#817765 !important; background:#f7f6f3 !important; }
.rbvf-room-entry:disabled { opacity:.5; cursor:not-allowed; }
.rbvf-room-viewer.rbvf-room-links-connected > .rbvf-room-entry-actions { display:none !important; }
/* Stack ArtPlacer's existing room links; leave its clickable markup intact. */
artplacer.rbvf-primary-room-link,artplacer.rbvf-secondary-room-link { display:block !important; width:fit-content !important; margin:0 !important; padding:0 !important; }
artplacer.rbvf-secondary-room-link { margin-top:-8px !important; }
artplacer.rbvf-primary-room-link .artplacer-button,artplacer.rbvf-secondary-room-link .artplacer-button { display:block !important; width:fit-content !important; margin:0 !important; padding:0 !important; border:0 !important; border-left:0 !important; background:transparent !important; box-shadow:none !important; text-indent:0 !important; text-decoration:none !important; line-height:1.25 !important; }
artplacer.rbvf-primary-room-link .artplacer-button { font-size:1em !important; font-weight:700 !important; }
artplacer.rbvf-hebrew-ui .artplacer-button { font-size:1.15em !important; }
/* ArtPlacer outputs these as flex items; turn the product links into two clean rows. */
nav.rg-viewing-links { display:block !important; grid-template-columns:1fr !important; flex-direction:column !important; margin:-6px 0 -12px !important; padding:0 !important; }
nav.rg-viewing-links > *,nav.rg-viewing-links > artplacer[type="1"],nav.rg-viewing-links > artplacer[type="2"] { display:block !important; width:100% !important; max-width:100% !important; flex:none !important; grid-column:1 / -1 !important; margin:0 !important; padding:0 !important; border:0 !important; }
nav.rg-viewing-links artplacer[type="1"] { display:block !important; width:100% !important; max-width:100% !important; flex:none !important; margin:0 !important; padding:0 !important; border:0 !important; }
nav.rg-viewing-links artplacer[type="2"] { display:block !important; width:100% !important; max-width:100% !important; flex:none !important; margin:-8px 0 0 !important; padding:0 !important; border:0 !important; }
nav.rg-viewing-links artplacer[type="3"] { display:none !important; }
nav.rg-viewing-links .artplacer-button { display:block !important; width:fit-content !important; margin:0 !important; padding:0 !important; border:0 !important; border-left:0 !important; background:transparent !important; box-shadow:none !important; text-indent:0 !important; text-decoration:none !important; line-height:1.25 !important; }
nav.rg-viewing-links artplacer[type="1"] .artplacer-button { font-size:1em !important; font-weight:700 !important; }
nav.rg-viewing-links .artplacer-button:hover { text-decoration:underline !important; }
.rbvf-room-modal[hidden] { display:none !important; }
.rbvf-room-viewer [hidden] { display:none !important; }
.rbvf-room-modal { position:fixed; inset:0; z-index:999999; display:grid; place-items:center; padding:18px; }
.rbvf-room-shade { position:absolute; inset:0; background:rgba(0,0,0,.82); }
.rbvf-room-dialog { position:relative; display:grid; grid-template-rows:44px minmax(0,1fr) 0; width:min(1120px,100%); height:min(900px,calc(100vh - 36px)); background:#fff; box-shadow:0 8px 30px rgba(0,0,0,.35); overflow:hidden; }
.rbvf-room-source-choice { position:absolute; inset:44px 0 0; z-index:20; display:grid; place-items:center; padding:20px; background:rgba(30,29,27,.48); }
.rbvf-room-source-choice-card { position:relative; width:min(430px,100%); padding:30px 24px 24px; background:#fff; box-shadow:0 8px 30px rgba(0,0,0,.22); text-align:center; }
.rbvf-room-source-choice-card h2 { margin:0 0 20px; font:inherit; font-size:1.1rem; font-weight:600; }
.rbvf-room-source-choice-card > div { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; }
.rbvf-room-source-choice-card button { min-height:42px; padding:9px 14px; border:1px solid #bcb6ab !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; cursor:pointer; font:inherit; }
.rbvf-room-source-choice-card button:hover { border-color:#817765 !important; background:#f7f6f3 !important; }
.rbvf-room-source-choice-card .rbvf-room-source-choice-close { position:absolute; top:5px; right:7px; min-height:30px; padding:2px 8px; border:0 !important; font-size:1.3rem; }
.rbvf-room-source-camera { display:none; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-source-choice-card { direction:rtl; }
.rbvf-room-topbar { display:flex; align-items:center; justify-content:space-between; padding:0 14px; border-bottom:1px solid var(--rbvf-room-line); font-size:.9rem; }
.rbvf-room-topbar > div { display:flex; align-items:center; gap:10px; }
.rbvf-room-topbar button { appearance:none; display:grid; place-items:center; width:32px; height:32px; border:0 !important; border-radius:0 !important; padding:0 !important; background:transparent !important; color:#111 !important; box-shadow:none !important; cursor:pointer; font-size:1.4rem; line-height:1; }
.rbvf-room-topbar .rbvf-room-share { width:34px; height:34px; border:1px solid #d8d5d0 !important; border-radius:50% !important; background:#fff !important; font-size:1rem; }
.rbvf-room-topbar .rbvf-room-share:hover { background:#f4f2ee !important; border-color:#9b958b !important; }
.rbvf-room-share svg { display:block; width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.rbvf-room-topbar .rbvf-room-ar-trigger { width:auto; padding:0 8px !important; font-size:.75rem; font-weight:700; letter-spacing:.04em; }
.rbvf-room-content { display:grid; grid-template-columns:minmax(0,3fr) minmax(250px,2fr); min-height:0; }
.rbvf-room-stage { position:relative; display:flex; min-width:0; flex-direction:column; align-items:center; justify-content:center; background:#f4f3f0; overflow:hidden; }
.rbvf-room-canvas { position:relative; z-index:0; display:block; max-width:100%; max-height:calc(100% - 88px); object-fit:contain; cursor:grab; touch-action:none; transform-origin:center center; transition:transform .12s ease-out; }
.rbvf-room-zoom-controls { position:absolute; z-index:2; top:10px; right:10px; display:flex; align-items:center; gap:4px; padding:4px; background:rgba(255,255,255,.9); box-shadow:0 1px 5px rgba(0,0,0,.12); }
.rbvf-room-zoom-controls button { display:grid; width:30px; height:30px; place-items:center; border:0 !important; padding:0 !important; background:transparent !important; color:#242321 !important; box-shadow:none !important; cursor:pointer; font:inherit; font-size:1.05rem; line-height:1; }
.rbvf-room-zoom-controls button:hover { background:#efede9 !important; }
.rbvf-room-zoom-controls .rbvf-room-zoom-reset { width:36px; font-size:.66rem; }
.rbvf-room-drag-hint { position:relative; z-index:1; width:100%; margin:0; padding:4px 8px; color:#706a60; background:#f4f3f0; font-size:.66rem !important; line-height:1.25 !important; font-weight:400 !important; text-align:center; }
.rbvf-room-drag-hint[hidden] { display:none !important; }
.rbvf-room-size { position:relative; z-index:1; display:flex; min-height:34px; flex-wrap:wrap; align-items:center; justify-content:center; gap:5px 18px; width:100%; padding:4px 8px; background:#f4f3f0; border:0; font-size:.86rem !important; line-height:1.25; color:#66615a; }
.rbvf-room-size strong { color:#242321; font-size:1rem !important; font-weight:600; }
.rbvf-room-sidepanel { min-width:0; padding:14px 12px; border-left:1px solid var(--rbvf-room-line); overflow:auto; }
.rbvf-room-sidepanel h3 { margin:2px 0 9px; font-size:.92rem !important; font-weight:500; font-family:inherit; }
.rbvf-room-sidepanel h3:not(:first-child) { margin-top:16px; }
.rbvf-room-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:36px; margin:0 0 6px; }
.rbvf-room-heading h3 { margin:0; font-size:.9rem !important; font-weight:500; line-height:1.2 !important; }
.rbvf-room-own-photo { margin:0 0 12px; padding:9px 10px; background:#f6f5f2; border:1px solid #e8e5df; }
.rbvf-room-own-photo h4 { margin:0 0 8px; color:#292723; font-size:1rem; font-weight:600; line-height:1.3; }
.rbvf-room-category-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:0 0 9px; }
.rbvf-room-category-tab { min-width:0; min-height:34px; padding:6px 7px; border:1px solid #d7d2c9 !important; border-radius:0; background:#fff !important; color:#292723 !important; box-shadow:none !important; cursor:pointer; font:inherit; font-size:.76rem; line-height:1.2; text-align:center; }
.rbvf-room-category-tab:hover { border-color:#817765 !important; background:#f7f6f3 !important; }
.rbvf-room-category-tab[aria-selected="true"] { border-color:#817765 !important; background:#eeece7 !important; font-weight:600; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-own-photo { direction:rtl; text-align:right; }
.rbvf-room-choice-grid,.rbvf-room-frame-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.rbvf-room-category-heading { grid-column:1 / -1; margin:10px 0 0; padding:0 2px 4px; border-bottom:1px solid #e8e5df; color:#625c52; font-size:.76rem; font-weight:600; line-height:1.2; text-align:start; }
.rbvf-room-category-heading:first-child { margin-top:2px; }
.rbvf-room-frame-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px 8px; }
.rbvf-room-option { appearance:none; display:flex; min-width:0; flex-direction:column; align-items:stretch; gap:6px; padding:7px; border:1px solid #e8e5df !important; border-radius:2px; background:#fff !important; color:#292723 !important; box-shadow:none !important; cursor:pointer; text-align:center; font:inherit; }
.rbvf-room-option:hover { border-color:#c9c2b5 !important; background:#faf9f7 !important; }
.rbvf-room-option.rbvf-is-selected { border-color:#817765 !important; background:#fff !important; box-shadow:inset 0 0 0 1px #817765 !important; }
.rbvf-room-option img { display:block; width:100%; height:64px; object-fit:contain; background:#f3f2ef; }
.rbvf-room-choice-grid .rbvf-room-option img { height:82px; object-fit:cover; }
.rbvf-room-frame-grid .rbvf-room-option { align-items:center; gap:3px; padding:3px 3px 4px; border:0 !important; border-bottom:2px solid transparent !important; border-radius:0; background:transparent !important; }
.rbvf-room-frame-grid .rbvf-room-option:hover { border:0 !important; border-bottom:2px solid #c9c2b5 !important; background:transparent !important; }
.rbvf-room-frame-grid .rbvf-room-option.rbvf-is-selected { border:0 !important; border-bottom:2px solid #817765 !important; background:transparent !important; box-shadow:none !important; }
.rbvf-room-molding-sample { display:block; width:100%; height:52px; overflow:hidden; background:transparent; }
.rbvf-room-molding-sample img { display:block; width:100% !important; max-width:100% !important; height:100% !important; margin:0 !important; object-fit:contain !important; object-position:center !important; background:transparent !important; mix-blend-mode:multiply; }
.rbvf-room-frame-grid .rbvf-room-option > span:not(.rbvf-room-molding-sample) { font-size:.66rem; line-height:1.2; text-transform:none; overflow-wrap:anywhere; }
.rbvf-room-frame-grid .rbvf-room-option small { font-size:.65rem; }
.rbvf-room-frame-grid .rbvf-no-frame-option { min-height:24px; justify-content:center; }
.rbvf-room-no-frame-label { display:inline-block; padding:2px 0; color:#716b60; font-size:.7rem; text-decoration:underline; text-underline-offset:2px; }
.rbvf-room-frame-grid .rbvf-room-none { display:block; min-height:0; padding:3px 0; background:transparent; border:0; color:#716b60; font-size:.7rem; }
.rbvf-room-option > span:not(.rbvf-room-corner-preview):not(.rbvf-room-molding-sample) { font-size:.72rem; line-height:1.25; text-transform:none; overflow-wrap:anywhere; }
.rbvf-room-option small { color:#777; font-size:.69rem; line-height:1.25; }
.rbvf-room-upload-trigger { flex:0 0 auto; width:max-content; min-width:0; min-height:36px; margin:0; padding:6px 10px; border:1px solid #c9c4bb !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; cursor:pointer; font-family:inherit !important; font-size:.9rem !important; font-weight:500 !important; line-height:1.2 !important; white-space:nowrap; }
.rbvf-room-upload-trigger:hover { border-color:#817765 !important; background:#f7f6f3 !important; }
.rbvf-room-upload-actions { display:flex; align-items:center; gap:8px; }
.rbvf-room-photo-source-hint { display:none; margin:0 0 8px; color:#6b665c; font-size:.73rem; line-height:1.35; }
.rbvf-room-camera-trigger,.rbvf-room-gallery-trigger { display:none; flex:0 0 auto; min-height:36px; margin:0; padding:6px 12px; border:1px solid #c9c4bb !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; cursor:pointer; font-family:inherit !important; font-size:.9rem !important; font-weight:500 !important; line-height:1.2 !important; }
.rbvf-room-camera-trigger:hover,.rbvf-room-gallery-trigger:hover { border-color:#817765 !important; background:#f7f6f3 !important; }
@media (max-width: 767px) {
  .rbvf-room-camera-trigger,.rbvf-room-gallery-trigger { display:inline-flex; align-items:center; justify-content:center; }
  .rbvf-room-photo-source-hint { display:block; }
  .rbvf-room-heading { gap:10px; }
  .rbvf-room-upload-actions { flex:0 1 auto; }
  .rbvf-room-upload-trigger { flex:1 1 auto; }
}
@media (pointer:coarse) {
  .rbvf-room-source-camera { display:inline-flex; align-items:center; justify-content:center; }
}
.rbvf-room-personal-calibration { position:relative; z-index:3; pointer-events:auto; margin:8px 0 10px; padding:7px; background:#f6f4f0; font-size:.82rem !important; }
.rbvf-room-measure-row { display:grid; grid-template-columns:92px 88px 56px auto auto; align-items:center; justify-content:center; gap:6px; width:fit-content; max-width:100%; margin:0 auto; }
.rbvf-room-personal-calibration label { display:block; min-width:0; }
.rbvf-room-personal-calibration input,.rbvf-room-personal-calibration select { width:100%; min-width:0; min-height:38px; padding:6px 8px; border:1px solid #c9c4bb; border-radius:0; background:#fff; color:#292723; font:inherit; font-size:.82rem !important; }
.rbvf-room-personal-calibration p { margin:4px 0 0; color:#69645d; font-size:.58rem !important; line-height:1.25 !important; font-weight:400 !important; }
.rbvf-room-none { display:grid; min-height:92px; place-items:center; background:#f7f6f3; border:1px solid #e8e5df; color:#716b60; font-size:.8rem; }
.rbvf-room-inner-heading[hidden],.rbvf-room-tab-panel[hidden] { display:none !important; }
.rbvf-room-summary { display:none !important; }
.rbvf-room-bottom { position:relative; z-index:1; display:flex; flex:0 0 38px; align-items:stretch; justify-content:center; gap:24px; width:100%; min-height:38px; background:#f4f3f0; }
.rbvf-room-frame-roles { display:flex; gap:8px; margin:0 0 12px; border-bottom:1px solid var(--rbvf-room-line); }
.rbvf-room-frame-role { appearance:none; border:0 !important; border-bottom:2px solid transparent !important; padding:7px 3px 6px !important; background:transparent !important; color:#777 !important; box-shadow:none !important; cursor:pointer; font:inherit; font-size:.76rem; }
.rbvf-room-frame-role.is-active { color:#242321 !important; border-bottom-color:#242321 !important; }
.rbvf-room-tab { appearance:none; display:grid; min-width:58px; align-content:center; justify-items:center; gap:1px; border:0 !important; border-bottom:2px solid transparent !important; padding:2px 8px !important; background:transparent !important; color:#333 !important; box-shadow:none !important; cursor:pointer; font:inherit; font-size:.62rem !important; line-height:1.1 !important; text-transform:uppercase; }
.rbvf-room-tab span { font-size:.82rem !important; line-height:1; }
.rbvf-room-tab.is-active { color:#111 !important; border-bottom-color:#292723 !important; }
.rbvf-room-status { position:absolute; left:0; right:0; bottom:0; margin:0; padding:0 12px; background:#fff; color:#a52832; font-size:.75rem; text-align:center; }
.rbvf-room-ar-panel[hidden] { display:none !important; }
.rbvf-room-content.is-ar-active .rbvf-room-stage,.rbvf-room-content.is-ar-active .rbvf-room-sidepanel { display:none; }
.rbvf-room-ar-panel { grid-column:1/-1; display:flex; min-width:0; min-height:0; flex-direction:column; gap:10px; padding:14px; background:#f4f3f0; }
.rbvf-room-ar-back,.rbvf-room-ar-frames { align-self:flex-start; border:0 !important; padding:7px 0 !important; background:transparent !important; color:#292723 !important; box-shadow:none !important; cursor:pointer; font:inherit; }
.rbvf-room-ar-rooms { align-self:flex-start; border:1px solid #c9c4bb; padding:8px 11px; background:#fff; color:#292723; cursor:pointer; font:inherit; font-size:.82rem; }
.rbvf-room-qr-handoff[hidden] { display:none !important; }
.rbvf-room-qr-handoff { display:flex; flex:0 0 auto; align-items:center; justify-content:center; gap:16px; max-width:520px; margin:0 auto; padding:10px 14px; border:1px solid #e4e1dc; background:#fff; }
.rbvf-room-qr-code { display:grid; width:156px; min-width:156px; height:156px; place-items:center; color:#716b60; font-size:.75rem; text-align:center; }
.rbvf-room-qr-code img,.rbvf-room-qr-code canvas { display:block; max-width:100%; height:auto !important; padding:6px; background:#fff; }
.rbvf-room-qr-copy { display:grid; gap:7px; max-width:250px; font-size:.8rem; line-height:1.4; }
.rbvf-room-qr-copy strong { font-size:.95rem; }
.rbvf-room-copy-phone-link { justify-self:start; border:0; padding:7px 0; background:transparent; color:#625a4d; cursor:pointer; font:inherit; font-weight:600; text-decoration:underline; }
.rbvf-room-ar-status { margin:0; color:#625d55; font-size:.84rem; text-align:center; }
.rbvf-room-ar-model-host { position:relative; flex:1; min-height:0; overflow:hidden; background:#ece9e3; }
.rbvf-room-ar-model-host model-viewer { display:block; width:100%; height:100%; min-height:250px; background:transparent; --poster-color:transparent; }
.rbvf-room-ar-button { position:absolute; z-index:2; left:50%; bottom:18px; transform:translateX(-50%); border:0; border-radius:3px; padding:12px 18px; background:#292723; color:#fff; cursor:pointer; font:inherit; box-shadow:0 2px 8px rgba(0,0,0,.2); }
.rbvf-room-ar-model-host model-viewer #rbvf-room-ar-prompt { display:none; position:absolute; z-index:2; left:50%; bottom:76px; transform:translateX(-50%); width:min(92%,420px); padding:10px 14px; border-radius:3px; background:rgba(255,255,255,.92); color:#292723; font-family:inherit; font-size:14px; font-weight:500; line-height:1.4; text-align:center; box-shadow:0 2px 10px rgba(0,0,0,.15); }
.rbvf-room-ar-model-host model-viewer[ar-status="session-started"] #rbvf-room-ar-prompt,.rbvf-room-ar-model-host model-viewer[ar-status="object-placed"] #rbvf-room-ar-prompt { display:block; }
.rbvf-room-ar-model-host model-viewer::part(default-ar-button) { display:none; }
.rbvf-room-download:disabled { opacity:.5; cursor:not-allowed; }
body.rbvf-room-open { overflow:hidden; }
body.rbvf-room-open .rbvf-room-modal.is-fullscreen { padding:0; }
body.rbvf-room-open .rbvf-room-modal.is-fullscreen .rbvf-room-dialog { width:100vw; height:100vh; height:100dvh; max-width:none; }
body.rbvf-ar-handoff .rbvf-room-modal { padding:0; }
body.rbvf-ar-handoff .rbvf-room-shade { background:rgba(0,0,0,.94); }
body.rbvf-ar-handoff .rbvf-room-dialog { width:100vw; height:100vh; height:100dvh; max-width:none; grid-template-rows:42px minmax(0,1fr) 0; }
body.rbvf-ar-handoff .rbvf-room-topbar { justify-content:flex-end; }
body.rbvf-ar-handoff .rbvf-room-topbar > strong,body.rbvf-ar-handoff .rbvf-room-fullscreen,body.rbvf-ar-handoff .rbvf-room-ar-trigger,body.rbvf-ar-handoff .rbvf-room-download,body.rbvf-ar-handoff .rbvf-room-share { display:none !important; }
body.rbvf-ar-handoff .rbvf-room-zoom-controls { display:none !important; }
body.rbvf-ar-handoff .rbvf-room-ar-panel { padding:0 8px 8px; gap:6px; }
body.rbvf-ar-handoff .rbvf-room-ar-back,body.rbvf-ar-handoff .rbvf-room-ar-frames,body.rbvf-ar-handoff .rbvf-room-ar-rooms,body.rbvf-ar-handoff .rbvf-room-qr-handoff { display:none !important; }
body.rbvf-ar-handoff .rbvf-room-ar-status { flex:0 0 auto; min-height:30px; padding:4px 8px; font-size:.76rem; line-height:1.3; }
body.rbvf-ar-handoff .rbvf-room-ar-model-host { flex:1 1 auto; min-height:0; }
body.rbvf-ar-handoff .rbvf-room-ar-model-host model-viewer { min-height:0; }
body.rbvf-ar-handoff .rbvf-room-shade { background:#ece9e3; }
body.rbvf-ar-handoff .rbvf-room-status { display:none !important; }
body.rbvf-ar-qr-only .rbvf-room-status { display:none !important; }
body.rbvf-ar-qr-only .rbvf-room-modal { padding:12px; }
body.rbvf-ar-qr-only .rbvf-room-shade { background:rgba(0,0,0,.82); }
body.rbvf-ar-qr-only .rbvf-room-dialog { width:min(430px,calc(100vw - 24px)); height:auto; max-height:calc(100vh - 24px); grid-template-rows:42px auto 0; }
body.rbvf-ar-qr-only .rbvf-room-topbar { justify-content:flex-end; }
body.rbvf-ar-qr-only .rbvf-room-topbar > strong,body.rbvf-ar-qr-only .rbvf-room-fullscreen,body.rbvf-ar-qr-only .rbvf-room-ar-trigger,body.rbvf-ar-qr-only .rbvf-room-download,body.rbvf-ar-qr-only .rbvf-room-share { display:none !important; }
body.rbvf-ar-qr-only .rbvf-room-content { display:block; min-height:0; }
body.rbvf-ar-qr-only .rbvf-room-stage,body.rbvf-ar-qr-only .rbvf-room-sidepanel { display:none !important; }
body.rbvf-ar-qr-only .rbvf-room-ar-panel { display:flex; gap:0; padding:0; background:#fff; }
body.rbvf-ar-qr-only .rbvf-room-ar-back,body.rbvf-ar-qr-only .rbvf-room-ar-frames,body.rbvf-ar-qr-only .rbvf-room-ar-rooms,body.rbvf-ar-qr-only .rbvf-room-ar-status,body.rbvf-ar-qr-only .rbvf-room-ar-model-host { display:none !important; }
body.rbvf-ar-qr-only .rbvf-room-qr-handoff { display:flex !important; flex-direction:column; gap:12px; max-width:none; margin:0; padding:22px 18px 24px; border:0; text-align:center; }
body.rbvf-ar-qr-only .rbvf-room-qr-code { width:232px; min-width:232px; height:232px; }
body.rbvf-ar-qr-only .rbvf-room-qr-code canvas,body.rbvf-ar-qr-only .rbvf-room-qr-code img { width:220px !important; height:220px !important; }
body.rbvf-ar-qr-only .rbvf-room-qr-copy { justify-items:center; gap:8px; max-width:100%; font-size:.9rem; }
body.rbvf-ar-qr-only .rbvf-room-qr-copy strong { font-size:1.1rem; }
body.rbvf-ar-qr-only .rbvf-room-copy-phone-link { display:none; }
@media(max-width:700px) {
  .rbvf-room-modal { padding:0; }
  .rbvf-room-dialog { width:100%; height:100vh; height:100dvh; grid-template-rows:42px minmax(0,1fr) 0; }
  .rbvf-room-content { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(280px,64dvh) minmax(0,1fr); overflow:hidden; }
  .rbvf-room-stage { min-height:0; }
  .rbvf-room-canvas { max-width:100%; max-height:calc(100% - 92px); }
  .rbvf-room-sidepanel { min-height:0; padding:10px 12px 18px; border-top:1px solid var(--rbvf-room-line); border-left:0; }
  .rbvf-room-heading { min-height:38px; flex-wrap:wrap; gap:6px 10px; margin:0 0 8px; }
  .rbvf-room-heading h3 { flex:1 1 auto; font-size:1rem !important; white-space:nowrap; }
  .rbvf-room-photo-source-hint { font-size:.68rem; }
  .rbvf-room-own-photo { margin-bottom:10px; padding:8px; }
  .rbvf-room-own-photo h4 { font-size:.98rem; }
  .rbvf-room-category-tabs { grid-template-columns:repeat(3,minmax(0,1fr)); gap:5px; margin-bottom:8px; }
  .rbvf-room-category-tab { min-height:36px; padding:6px 4px; font-size:.74rem; }
  .rbvf-room-upload-actions { flex:0 0 auto; gap:6px; }
  .rbvf-room-upload-trigger,.rbvf-room-camera-trigger,.rbvf-room-gallery-trigger { flex:0 0 auto; min-height:34px; padding:5px 8px; font-size:.8rem !important; white-space:nowrap; }
  .rbvf-room-choice-grid,.rbvf-room-frame-grid { gap:6px; }
  .rbvf-room-frame-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rbvf-room-option { padding:5px; }
  .rbvf-room-option img { height:56px; }
  .rbvf-room-choice-grid .rbvf-room-option img { height:76px; }
  .rbvf-room-molding-sample { height:44px; }
  .rbvf-room-frame-grid .rbvf-no-frame-option { min-height:22px; }
  .rbvf-room-frame-grid .rbvf-room-none { min-height:0; }
  .rbvf-room-size { min-height:32px; font-size:.75rem !important; gap:4px 8px; }
  .rbvf-room-size strong { font-size:.86rem !important; }
  .rbvf-room-status { bottom:0; font-size:.68rem; }
  .rbvf-room-ar-panel { padding:8px; }
  body:not(.rbvf-ar-qr-only) .rbvf-room-qr-handoff { display:none; }
  .rbvf-room-ar-model-host model-viewer { min-height:200px; }
}
@media(max-width:380px) {
  .rbvf-room-sidepanel { padding-right:8px; padding-left:8px; }
  .rbvf-room-upload-actions { gap:4px; }
  .rbvf-room-upload-trigger,.rbvf-room-camera-trigger,.rbvf-room-gallery-trigger { padding-right:6px; padding-left:6px; font-size:.74rem !important; }
  .rbvf-room-option > span:not(.rbvf-room-corner-preview),.rbvf-room-option small { font-size:.65rem; }
}
@media (orientation:landscape) and (max-height:600px) and (max-width:1000px) {
  .rbvf-room-modal { padding:0; }
  .rbvf-room-dialog { width:100%; height:100vh; height:100dvh; }
  .rbvf-room-content { grid-template-columns:minmax(0,1.45fr) minmax(240px,1fr); grid-template-rows:minmax(0,1fr); }
  .rbvf-room-stage { justify-content:flex-start; overflow-y:auto; overscroll-behavior:contain; }
  .rbvf-room-canvas { max-height:none; flex:0 0 auto; }
  .rbvf-room-sidepanel { overflow-y:auto; overscroll-behavior:contain; }
}

/* Room and frame choices open as closable flyouts so the artwork stays visible. */
.rbvf-room-content { position:relative; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); overflow:hidden; }
.rbvf-room-stage { grid-column:1/-1; min-height:0; }
.rbvf-room-sidepanel[hidden],.rbvf-room-panel-shade[hidden] { display:none !important; }
.rbvf-room-panel-shade { position:absolute; z-index:4; inset:0; background:rgba(25,23,20,.28); }
.rbvf-room-sidepanel { position:absolute; z-index:5; top:0; right:0; bottom:0; width:min(440px,44%); min-height:0; padding:12px; border:0; background:#fff; box-shadow:-5px 0 22px rgba(0,0,0,.15); overflow:auto; overscroll-behavior:contain; }
.rbvf-room-flyout-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:36px; margin:0 0 8px; border-bottom:1px solid var(--rbvf-room-line); }
.rbvf-room-flyout-heading h3 { margin:0; font-size:1rem !important; font-weight:600; }
.rbvf-room-panel-close { flex:0 0 34px; width:34px; height:34px; padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; color:#111 !important; box-shadow:none !important; font-size:1.6rem; line-height:1; cursor:pointer; }
.rbvf-room-confirm-wall { min-height:38px; margin:0; padding:6px 14px; border:1px solid #292723 !important; background:#292723 !important; color:#fff !important; box-shadow:none !important; font:inherit; font-size:.82rem; font-weight:600; cursor:pointer; white-space:nowrap; }
.rbvf-room-change-photo,.rbvf-room-edit-measurement { min-height:38px; margin:0; padding:6px 10px; border:1px solid #817765 !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; font:inherit; font-size:.78rem; cursor:pointer; white-space:nowrap; }
.rbvf-room-measurement-actions { display:flex; flex:0 0 auto; align-items:center; justify-content:center; gap:8px; margin:4px 0 6px; }
.rbvf-room-stage > .rbvf-room-personal-calibration { flex:0 0 auto; width:fit-content; max-width:calc(100% - 16px); margin:4px 8px 6px; }
.rbvf-room-edit-measurement { flex:0 0 auto; margin:3px 8px 6px; padding:6px 10px; border:1px solid #817765 !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; font:inherit; font-size:.78rem; cursor:pointer; white-space:nowrap; }
.rbvf-room-entry:disabled { opacity:.5; cursor:not-allowed; }
.rbvf-room-ar-trigger { display:none !important; }
body.rbvf-room-open .rbvf-room-dialog { width:min(1440px,100%); height:min(1000px,calc(100vh - 24px)); }
@media(max-width:700px) {
  .rbvf-room-dialog { width:100%; height:100vh; height:100dvh; }
  .rbvf-room-content { grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); }
  .rbvf-room-stage { grid-column:1; width:100%; height:100%; min-height:0; justify-content:center; }
  .rbvf-room-canvas { max-width:100%; max-height:calc(100% - 112px); }
  .rbvf-room-sidepanel { top:auto; right:0; bottom:0; left:0; width:100%; max-height:86%; padding:10px 12px calc(68px + env(safe-area-inset-bottom)); border-radius:12px 12px 0 0; box-shadow:0 -5px 24px rgba(0,0,0,.18); }
  .rbvf-room-choice-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rbvf-room-upload-actions { flex:0 1 auto; }
  .rbvf-room-upload-trigger,.rbvf-room-camera-trigger { white-space:nowrap; }
  .rbvf-room-panel-shade { background:rgba(25,23,20,.32); }
  .rbvf-room-size { padding-bottom:2px; }
  .rbvf-room-bottom { position:fixed !important; z-index:1000000 !important; display:flex !important; left:0; right:0; bottom:0; width:100%; height:54px; min-height:54px; padding-bottom:env(safe-area-inset-bottom); background:#fff; box-shadow:0 -2px 10px rgba(0,0,0,.1); }
  .rbvf-room-stage { padding-bottom:60px; }
  .rbvf-room-canvas { max-height:calc(100% - 150px); }
  .rbvf-room-content.is-correcting-photo .rbvf-room-stage,
  .rbvf-room-content.has-room-measurement .rbvf-room-stage { justify-content:flex-start; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; padding:12px 0 calc(14px + env(safe-area-inset-bottom)); }
  .rbvf-room-content.is-correcting-photo .rbvf-room-canvas,
  .rbvf-room-content.has-room-measurement .rbvf-room-canvas { flex:0 0 auto; }
  .rbvf-room-personal-calibration { margin-top:6px; }
  .rbvf-room-stage > .rbvf-room-personal-calibration { width:calc(100% - 16px); }
  .rbvf-room-personal-calibration p { font-size:.68rem !important; }
  .rbvf-room-measure-row { grid-template-columns:80px 72px 48px auto auto; gap:4px; }
  .rbvf-room-confirm-wall { padding-right:9px; padding-left:9px; font-size:.72rem; }
  .rbvf-room-change-photo { padding-right:7px; padding-left:7px; font-size:.68rem; }
}

.rbvf-room-content.has-room-measurement .rbvf-room-stage > .rbvf-room-personal-calibration { padding:6px 8px; }
.rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration p { font-size:.64rem !important; }

/* Hebrew glyphs need a little more room at the compact English control sizes. */
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-topbar { font-size:1rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-drag-hint { font-size:.82rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-size { font-size:.96rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-sidepanel h3,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-heading h3,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-flyout-heading h3 { font-size:1rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-frame-grid .rbvf-room-option > span:not(.rbvf-room-molding-sample),
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-frame-grid .rbvf-room-option small,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-option > span:not(.rbvf-room-corner-preview):not(.rbvf-room-molding-sample),
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-option small,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-no-frame-label,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-none { font-size:.82rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-photo-source-hint { font-size:.86rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-upload-trigger,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-camera-trigger,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-gallery-trigger,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-confirm-wall,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-change-photo,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-edit-measurement { font-size:.9rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-personal-calibration { font-size:.92rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-personal-calibration input,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-personal-calibration select { font-size:.92rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-personal-calibration > p { font-size:.78rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-frame-role { font-size:.88rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-tab { font-size:.78rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-status { font-size:.88rem !important; }
@media(max-width:380px) {
  .rbvf-room-sidepanel { padding-right:9px; padding-left:9px; }
  .rbvf-room-upload-trigger,.rbvf-room-camera-trigger { padding-right:6px; padding-left:6px; font-size:.72rem !important; }
  .rbvf-room-measure-row { grid-template-columns:70px 62px 44px auto auto; gap:3px; }
  .rbvf-room-confirm-wall { padding-right:8px; padding-left:8px; font-size:.7rem; }
  .rbvf-room-change-photo { padding-right:6px; padding-left:6px; font-size:.64rem; }
}


/* Make the personal-room heading and measurement controls easier to read,
   especially on phones, while keeping the controls on one compact row. */
.rbvf-room-dialog .rbvf-room-measure-row select,
.rbvf-room-dialog .rbvf-room-measure-row input { font-size:1rem !important; }
.rbvf-room-dialog .rbvf-room-measure-row { grid-template-columns:92px 88px 64px auto auto; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-own-photo h4,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-category-tab { font-size:1.15rem !important; font-weight:700 !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-measure-row select,
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-measure-row input { font-size:1.05rem !important; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-unit-label select { direction:rtl; unicode-bidi:isolate; }
@media(max-width:700px) {
  .rbvf-room-dialog .rbvf-room-measure-row { grid-template-columns:80px 72px 58px auto auto; }
}
@media(max-width:380px) {
  .rbvf-room-dialog .rbvf-room-measure-row { grid-template-columns:72px 62px 56px auto auto; }
}

.rbvf-room-step-heading { margin:3px auto 7px !important; text-align:center; font-size:.9rem !important; font-weight:700 !important; }
.rbvf-room-photo-step,.rbvf-room-measurement-step { margin:7px auto 10px; }
.rbvf-room-measurement-step[hidden] { display:none !important; }
.rbvf-room-correction-modes { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px; margin:5px auto; font-size:.78rem; }
.rbvf-room-correction-modes > span { font-weight:600; }
.rbvf-room-correction-modes button { min-height:36px; padding:5px 12px; border:1px solid #817765 !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; font:inherit; cursor:pointer; touch-action:manipulation; }
.rbvf-room-correction-modes button[aria-pressed="true"] { background:#292723 !important; color:#fff !important; }
.rbvf-room-correction-modes small { flex-basis:100%; text-align:center; font-size:.72rem; }
.rbvf-room-crop-tools[hidden],.rbvf-room-crop-editor[hidden] { display:none !important; }
.rbvf-room-crop-tools { max-width:620px; margin:8px auto; text-align:center; }
.rbvf-room-crop-open,.rbvf-room-crop-actions button,.rbvf-room-download-source { min-height:34px; padding:5px 12px; border:1px solid #817765 !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; font:inherit; font-size:.78rem; font-weight:600; cursor:pointer; }
.rbvf-room-crop-editor { margin:8px auto; padding:9px 12px; border:1px solid #d7d2c9; background:#fff; }
.rbvf-room-crop-editor p,.rbvf-room-chatgpt-edit p { margin:4px auto 8px; font-size:.78rem; line-height:1.4; }
.rbvf-room-crop-sliders { display:grid; grid-template-columns:repeat(4,minmax(80px,1fr)); gap:8px; }
.rbvf-room-crop-sliders label { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:5px; font-size:.75rem; }
.rbvf-room-crop-sliders input { width:100%; min-width:0; }
.rbvf-room-crop-actions { display:flex; justify-content:center; gap:8px; margin-top:7px; }
.rbvf-room-chatgpt-edit { margin:8px auto 2px; color:#5c574e; }
.rbvf-room-chatgpt-edit a { margin-inline-start:8px; font-size:.78rem; }
.rbvf-room-proportion-toggle { display:flex !important; align-items:center; justify-content:center; gap:6px; margin:2px auto 5px; font-size:.78rem !important; }
.rbvf-room-proportion-toggle input { width:16px !important; min-height:16px !important; margin:0; }
.rbvf-room-dual-measure[hidden],.rbvf-room-single-measure[hidden],.rbvf-room-axis-label[hidden] { display:none !important; }
.rbvf-room-measure-row { grid-template-columns:78px 78px 78px 54px auto auto; }
.rbvf-room-perspective-actions { position:relative; z-index:4; display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:6px; margin:5px auto 0; pointer-events:auto; }
.rbvf-room-perspective-actions button { position:relative; z-index:4; min-height:34px; padding:5px 10px; border:1px solid #817765 !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; font:inherit; font-size:.76rem; cursor:pointer; pointer-events:auto; touch-action:manipulation; white-space:nowrap; }
.rbvf-room-perspective-actions button:disabled { opacity:.6; cursor:wait; }
.rbvf-room-wall-corner-hint { text-align:center; }
.rbvf-room-content.is-correcting-photo .rbvf-room-zoom-controls,
.rbvf-room-content.has-room-measurement .rbvf-room-zoom-controls { display:none !important; }
@media(max-width:700px) {
  .rbvf-room-correction-modes { gap:5px; font-size:.8rem; }
  .rbvf-room-correction-modes button { min-height:44px; min-width:112px; }
  .rbvf-room-correction-modes small { font-size:.76rem; }
  .rbvf-room-crop-sliders { grid-template-columns:repeat(2,minmax(100px,1fr)); }
  .rbvf-room-crop-tools { padding:0 7px; }
  .rbvf-room-measure-row { grid-template-columns:60px 58px 58px 44px auto auto; gap:3px; }
  .rbvf-room-perspective-actions { gap:4px; }
  .rbvf-room-perspective-actions button { min-height:32px; padding:4px 7px; font-size:.68rem; }
}
@media(max-width:380px) {
  .rbvf-room-measure-row { grid-template-columns:54px 52px 52px 40px auto auto; gap:2px; }
}

/* On desktop, keep photo-editing controls together in a clear side panel. */
@media(min-width:701px) {
  .rbvf-room-content.has-room-measurement .rbvf-room-stage,
  .rbvf-room-content.is-correcting-photo .rbvf-room-stage {
    align-items:flex-start;
    padding-left:16px;
  }
  .rbvf-room-content.has-room-measurement .rbvf-room-canvas,
  .rbvf-room-content.is-correcting-photo .rbvf-room-canvas { margin-right:auto; }
  .rbvf-room-content.has-room-measurement .rbvf-room-stage > .rbvf-room-personal-calibration,
  .rbvf-room-content.is-correcting-photo .rbvf-room-stage > .rbvf-room-personal-calibration {
    position:absolute;
    z-index:3;
    top:12px;
    right:12px;
    bottom:14px;
    width:clamp(300px,29%,360px);
    max-width:none;
    margin:0;
    padding:16px;
    border:1px solid #dedad2;
    background:#fff;
    box-shadow:0 2px 10px rgba(0,0,0,.08);
    overflow-y:auto;
    overscroll-behavior:contain;
    font-size:.9rem !important;
  }
  .rbvf-room-content.has-room-measurement .rbvf-room-zoom-controls { display:none !important; }
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration .rbvf-room-step-heading,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration .rbvf-room-step-heading {
    margin:2px 0 12px;
    font-size:1rem !important;
  }
  .rbvf-room-content.has-room-measurement .rbvf-room-correction-modes,
  .rbvf-room-content.is-correcting-photo .rbvf-room-correction-modes {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin:8px 0 12px;
    font-size:.9rem;
  }
  .rbvf-room-content.has-room-measurement .rbvf-room-correction-modes > span,
  .rbvf-room-content.has-room-measurement .rbvf-room-correction-modes small,
  .rbvf-room-content.is-correcting-photo .rbvf-room-correction-modes > span,
  .rbvf-room-content.is-correcting-photo .rbvf-room-correction-modes small { grid-column:1/-1; }
  .rbvf-room-content.has-room-measurement .rbvf-room-correction-modes button,
  .rbvf-room-content.is-correcting-photo .rbvf-room-correction-modes button { min-height:42px; }
  .rbvf-room-content.has-room-measurement .rbvf-room-perspective-actions,
  .rbvf-room-content.is-correcting-photo .rbvf-room-perspective-actions {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin:8px 0 12px;
  }
  .rbvf-room-content.has-room-measurement .rbvf-room-perspective-actions button,
  .rbvf-room-content.is-correcting-photo .rbvf-room-perspective-actions button { min-height:42px; white-space:normal; }
  .rbvf-room-perspective-actions button[hidden] { display:none !important; }
  .rbvf-room-content.has-room-measurement .rbvf-room-wall-corner-hint,
  .rbvf-room-content.is-correcting-photo .rbvf-room-wall-corner-hint { margin:8px 0 12px; font-size:.82rem; line-height:1.4; }
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration p,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration p { font-size:.76rem !important; line-height:1.4 !important; }
  .rbvf-room-content.has-room-measurement .rbvf-room-crop-tools,
  .rbvf-room-content.is-correcting-photo .rbvf-room-crop-tools { max-width:none; margin:10px 0; }
  .rbvf-room-measure-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 54px 58px; gap:5px; width:100%; }
  .rbvf-room-measure-row .rbvf-room-change-photo { grid-column:1/-1; width:100%; max-width:none; white-space:normal; }
}

@media(max-width:700px) {
  .rbvf-room-perspective-actions { display:flex; flex-wrap:nowrap; justify-content:stretch; gap:5px; width:100%; }
  .rbvf-room-perspective-actions button { flex:1 1 0; min-width:0; min-height:40px; padding:5px 4px !important; font-size:.8rem !important; line-height:1.15; white-space:nowrap; }
  .rbvf-room-measure-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 58px 62px; gap:5px; width:100%; }
  .rbvf-room-measure-row .rbvf-room-change-photo { grid-column:1/-1; width:100%; max-width:none; white-space:normal; }
}
@media(max-width:520px) {
  .rbvf-room-perspective-actions { display:flex; flex-wrap:nowrap; gap:3px; }
  .rbvf-room-perspective-actions button { padding:4px 2px !important; font-size:.7rem !important; letter-spacing:-.02em; }
}
@media(max-width:340px) {
  .rbvf-room-perspective-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* Keep the main viewer actions together and give Rooms / Frames equal weight. */
.rbvf-room-control-row { position:relative; z-index:2; display:flex; flex:0 0 auto; align-items:center; justify-content:center; flex-wrap:wrap; gap:8px; width:100%; padding:4px 8px 8px; }
.rbvf-room-control-row .rbvf-room-measurement-actions { flex:0 1 auto; flex-wrap:wrap; justify-content:center; gap:8px; margin:0; }
.rbvf-room-control-row .rbvf-room-bottom { position:relative; z-index:auto; display:flex; flex:0 1 auto; align-items:center; justify-content:center; gap:26px; width:auto; min-height:0; background:transparent; }
.rbvf-room-control-row .rbvf-room-tab { appearance:none; display:inline-flex; min-width:148px; min-height:54px; align-items:center; justify-content:center; gap:10px; border:0 !important; border-bottom:0 !important; padding:8px 14px !important; background:transparent !important; color:#292723 !important; box-shadow:none !important; font-size:.92rem !important; font-weight:500; line-height:1.2 !important; text-transform:none; }
.rbvf-room-control-row .rbvf-room-tab span { font-size:1.3rem !important; }
.rbvf-room-control-row .rbvf-room-tab:hover { background:rgba(41,39,35,.06) !important; }
.rbvf-room-control-row .rbvf-room-tab.is-active { color:#111 !important; text-decoration:underline; text-underline-offset:5px; }
.rbvf-room-unit-label select { width:100%; min-width:0; padding-right:4px !important; padding-left:4px !important; font-size:.82rem !important; }
.rbvf-room-measure-row .rbvf-room-confirm-wall { min-width:48px; padding-right:4px; padding-left:4px; }

@media(min-width:701px) {
  .rbvf-room-dialog .rbvf-room-measure-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 56px 48px !important; gap:4px !important; width:100% !important; justify-content:stretch !important; }
}
@media(max-width:700px) {
  .rbvf-room-control-row { flex-direction:column; gap:6px; padding:4px 8px 62px; }
  .rbvf-room-control-row .rbvf-room-measurement-actions { width:100%; flex-wrap:nowrap; }
  .rbvf-room-control-row .rbvf-room-measurement-actions > button { flex:1 1 0; min-width:0; min-height:44px; padding:6px 4px !important; font-size:.74rem !important; line-height:1.15; white-space:normal; }
  .rbvf-room-control-row .rbvf-room-bottom { position:fixed !important; z-index:1000000 !important; display:flex !important; left:0; right:0; bottom:0; width:100%; height:54px; min-height:54px; padding:4px 8px calc(4px + env(safe-area-inset-bottom)); gap:8px; background:#fff; box-shadow:0 -2px 10px rgba(0,0,0,.1); }
  .rbvf-room-control-row .rbvf-room-tab { flex:1 1 0; min-width:0; min-height:46px; padding:7px 12px !important; font-size:.92rem !important; }
  .rbvf-room-control-row .rbvf-room-tab span { font-size:1.2rem !important; }
  .rbvf-room-dialog .rbvf-room-measure-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 56px 48px !important; gap:4px !important; width:100% !important; justify-content:stretch !important; }
}
.rbvf-room-dialog .rbvf-room-unit-label { width:56px !important; min-width:56px !important; }
.rbvf-room-dialog .rbvf-room-unit-label select { display:block; width:56px !important; min-width:56px !important; max-width:56px !important; box-sizing:border-box; padding-right:3px !important; padding-left:3px !important; font-size:.78rem !important; }

/* Automatic room-photo correction choices shown immediately after an upload. */
.rbvf-room-photo-choices[hidden] { display:none !important; }
.rbvf-room-photo-choices { position:absolute; z-index:8; inset:0; display:grid; place-items:center; padding:18px; background:rgba(25,23,20,.48); }
.rbvf-room-photo-choices-card { width:min(620px,100%); max-height:100%; overflow:auto; padding:16px; background:#fff; box-shadow:0 8px 30px rgba(0,0,0,.24); }
.rbvf-room-photo-choices-card > header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 14px; }
.rbvf-room-photo-choices-card h3 { margin:0; color:#292723; font:inherit; font-size:1rem; font-weight:600; }
.rbvf-room-photo-choice-close { width:34px; height:34px; border:0 !important; background:transparent !important; color:#292723 !important; box-shadow:none !important; cursor:pointer; font:inherit; font-size:1.5rem; line-height:1; }
.rbvf-room-photo-choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.rbvf-room-photo-choice { min-width:0; padding:6px; border:1px solid #d7d2c9 !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; cursor:pointer; font:inherit; text-align:center; }
.rbvf-room-photo-choice:hover { border-color:#817765 !important; }
.rbvf-room-photo-choice.rbvf-is-selected { border-color:#817765 !important; box-shadow:inset 0 0 0 2px #817765 !important; }
.rbvf-room-photo-choice img { display:block; width:100%; aspect-ratio:4/3; object-fit:contain; background:#f3f1ec; }
.rbvf-room-photo-choice span { display:block; padding:7px 3px 3px; font-size:.82rem; line-height:1.25; }
.rbvf-room-photo-choice-confirm { display:block; min-height:40px; margin:14px 0 0 auto; padding:8px 18px; border:1px solid #292723 !important; background:#292723 !important; color:#fff !important; box-shadow:none !important; cursor:pointer; font:inherit; font-weight:600; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-photo-choices-card { direction:rtl; text-align:right; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-photo-choice span { font-size:.95rem; }
.rbvf-room-dialog.rbvf-hebrew-ui .rbvf-room-photo-choice-confirm { margin-right:0; margin-left:auto; }
@media(max-width:520px) {
  .rbvf-room-photo-choices { padding:10px; }
  .rbvf-room-photo-choices-card { padding:12px; }
  .rbvf-room-photo-choice-grid { gap:7px; }
  .rbvf-room-photo-choice { padding:4px; }
  .rbvf-room-photo-choice span { font-size:.72rem; }
}

/* Center the room and labels in the usable preview area beside the desktop editor. */
@media(min-width:701px) {
  .rbvf-room-content.has-room-measurement .rbvf-room-stage,
  .rbvf-room-content.is-correcting-photo .rbvf-room-stage { align-items:center; padding-left:0; padding-right:0; }
  .rbvf-room-content.has-room-measurement .rbvf-room-canvas,
  .rbvf-room-content.is-correcting-photo .rbvf-room-canvas,
  .rbvf-room-content.has-room-measurement .rbvf-room-size,
  .rbvf-room-content.is-correcting-photo .rbvf-room-size {
    margin-left:0 !important;
    margin-right:var(--rbvf-room-photo-offset,0px) !important;
  }
  .rbvf-room-content.has-room-measurement .rbvf-room-size,
  .rbvf-room-content.is-correcting-photo .rbvf-room-size { width:min(100%,var(--rbvf-room-canvas-width,100%)); align-self:center; }
  .rbvf-room-content.has-room-measurement .rbvf-room-stage > .rbvf-room-personal-calibration,
  .rbvf-room-content.is-correcting-photo .rbvf-room-stage > .rbvf-room-personal-calibration {
    width:clamp(340px,35%,420px); padding:20px; font-size:1rem !important;
  }
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration p,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration p { font-size:.95rem !important; line-height:1.45 !important; }
  .rbvf-room-content.has-room-measurement .rbvf-room-step-heading,
  .rbvf-room-content.is-correcting-photo .rbvf-room-step-heading { font-size:1.12rem !important; }
}

/* Keep axis, dimensions, unit, and OK together as one centered row. */
.rbvf-room-dialog .rbvf-room-measure-row { display:flex !important; flex-wrap:wrap; align-items:center; justify-content:center !important; gap:6px !important; width:100% !important; }
.rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-axis-label,
.rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-single-measure,
.rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-dual-measure { flex:1 1 0; min-width:0; width:auto; }
.rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-unit-label { flex:0 0 64px; width:64px !important; min-width:64px !important; }
.rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-confirm-wall { flex:0 0 58px; min-width:58px; white-space:nowrap; }
.rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-change-photo { flex:1 0 100%; width:100%; max-width:none; white-space:normal; }
.rbvf-room-dialog .rbvf-room-measure-row input,
.rbvf-room-dialog .rbvf-room-measure-row select { width:100% !important; min-width:0 !important; max-width:none !important; }
.rbvf-room-dialog .rbvf-room-measurement-heading-row { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; margin:2px 0 10px; }
.rbvf-room-dialog .rbvf-room-measurement-heading-row .rbvf-room-step-heading { flex:1 1 auto; margin:0 !important; text-align:start; }
.rbvf-room-dialog .rbvf-room-measurement-heading-row .rbvf-room-proportion-toggle { flex:0 0 auto; margin:0 !important; white-space:nowrap; }
.rbvf-room-dialog .rbvf-room-chatgpt-edit p { margin:4px 0 8px; font-size:.82rem; line-height:1.4; }
.rbvf-room-dialog .rbvf-room-chatgpt-edit a { display:inline; margin:0 0 0 4px; font-size:inherit; white-space:nowrap; }
.rbvf-room-dialog .rbvf-room-tab svg { display:block; flex:0 0 30px; width:30px; height:30px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.rbvf-room-control-row .rbvf-room-tab { min-width:166px; min-height:60px; gap:12px; font-size:1rem !important; }
.rbvf-room-control-row .rbvf-room-bottom { gap:18px; }
.rbvf-room-control-row .rbvf-room-measurement-actions,
.rbvf-room-control-row .rbvf-room-bottom { transform:translateX(calc(var(--rbvf-room-photo-offset,0px) / -2)); }
@media(max-width:700px) {
  .rbvf-room-control-row .rbvf-room-measurement-actions,
  .rbvf-room-control-row .rbvf-room-bottom { transform:none; }
  .rbvf-room-control-row .rbvf-room-tab { min-height:50px; font-size:1rem !important; }
  .rbvf-room-dialog .rbvf-room-tab svg { flex-basis:32px; width:32px; height:32px; }
  .rbvf-room-dialog .rbvf-room-measurement-heading-row { justify-content:center; gap:10px; }
  .rbvf-room-dialog .rbvf-room-measurement-heading-row .rbvf-room-step-heading { flex:0 1 auto; text-align:center; }
  .rbvf-room-content.is-correcting-photo .rbvf-room-stage,
  .rbvf-room-content.has-room-measurement .rbvf-room-stage { padding-right:0; }
  .rbvf-room-content.has-room-measurement .rbvf-room-size,
  .rbvf-room-content.is-correcting-photo .rbvf-room-size { width:100%; margin:0 !important; }
  .rbvf-room-dialog .rbvf-room-measure-row { flex-wrap:nowrap; gap:5px !important; }
  .rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-unit-label { flex-basis:58px; width:58px !important; min-width:58px !important; }
  .rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-confirm-wall { flex-basis:58px; min-width:58px; }
  .rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-change-photo { flex:1 0 100%; }
  .rbvf-room-dialog .rbvf-room-chatgpt-edit p { font-size:.78rem; }
}

/* The measurement fields share a row; Change photo wraps beneath it on phones. */
@media(max-width:700px) {
  .rbvf-room-dialog .rbvf-room-measure-row { flex-wrap:wrap !important; }
  .rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-axis-label,
  .rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-single-measure,
  .rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-dual-measure { flex:1 1 0; min-width:0; }
  .rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-change-photo { flex:1 0 100%; }
}

/* Keep the panel guidance as the sole instruction; remove the duplicate footer strip. */
.rbvf-room-status:empty { display:none !important; }
@media(min-width:701px) {
  .rbvf-room-content .rbvf-room-stage.rbvf-has-photo-controls > .rbvf-room-drag-hint { display:none !important; }
  .rbvf-room-dialog .rbvf-room-measurement-help { margin:4px 0 12px; font-size:1rem !important; font-weight:400 !important; line-height:1.45 !important; }
}

/* Give the bottom Rooms / Frames pair a tighter footprint. */
.rbvf-room-control-row .rbvf-room-bottom { gap:8px; }

/* Keep photo replacement choices beside their label wherever Change photo appears. */
.rbvf-room-inline-photo-change { display:none; flex:0 1 auto; align-items:center; justify-content:center; flex-wrap:nowrap; gap:6px; min-width:0; }
.rbvf-room-inline-photo-title { flex:0 0 auto; margin-right:3px; color:#292723; font-size:.92rem; font-weight:400; white-space:nowrap; }
.rbvf-room-inline-photo-change button { flex:0 1 auto; min-width:0; min-height:38px; margin:0; padding:6px 10px; border:1px solid #817765 !important; background:#fff !important; color:#292723 !important; box-shadow:none !important; font:inherit; font-size:.86rem; line-height:1.15; cursor:pointer; white-space:nowrap; }
.rbvf-room-inline-photo-change button:hover { background:#f7f6f3 !important; }
.rbvf-room-dialog .rbvf-room-measure-row > .rbvf-room-inline-photo-change { flex:1 0 100%; width:100%; }
.rbvf-room-measurement-actions > .rbvf-room-inline-photo-change { flex:0 1 auto; }
@media(min-width:701px) {
  .rbvf-room-control-row .rbvf-room-bottom { gap:4px; }
  .rbvf-room-control-row .rbvf-room-tab { min-width:126px; }
}
@media(max-width:700px) {
  .rbvf-room-dialog .rbvf-room-change-photo { display:none !important; }
  .rbvf-room-inline-photo-change { display:flex; }
  .rbvf-room-inline-photo-change { gap:4px; }
  .rbvf-room-inline-photo-title { margin-right:1px; font-size:.76rem; }
  .rbvf-room-inline-photo-change button { min-height:40px; padding:5px 7px; font-size:.72rem !important; }
  .rbvf-room-measurement-actions > .rbvf-room-inline-photo-change { flex:1 1 100%; width:100%; }
}
@media(max-width:360px) {
  .rbvf-room-inline-photo-change { gap:3px; }
  .rbvf-room-inline-photo-title { font-size:.7rem; }
  .rbvf-room-inline-photo-change button { padding-right:5px; padding-left:5px; font-size:.66rem !important; }
}
@media(min-width:701px) {
  .rbvf-room-control-row .rbvf-room-bottom { gap:0 !important; }
  .rbvf-room-control-row .rbvf-room-tab { min-width:104px; min-height:52px; gap:6px; padding:6px 4px !important; }
}

/* Four correction controls fit together on one mobile row. */
@media(max-width:700px) {
  .rbvf-room-content.is-correcting-photo .rbvf-room-photo-step {
    display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:center; gap:6px 4px;
  }
  .rbvf-room-content.is-correcting-photo .rbvf-room-photo-step > .rbvf-room-step-heading,
  .rbvf-room-content.is-correcting-photo .rbvf-room-wall-corner-hint { grid-column:1/-1; }
  .rbvf-room-content.is-correcting-photo .rbvf-room-correction-modes,
  .rbvf-room-content.is-correcting-photo .rbvf-room-perspective-actions { display:contents !important; }
  .rbvf-room-content.is-correcting-photo .rbvf-room-correction-modes > span,
  .rbvf-room-content.is-correcting-photo .rbvf-room-correction-mode-help { display:none !important; }
  .rbvf-room-content.is-correcting-photo .rbvf-room-correction-modes button,
  .rbvf-room-content.is-correcting-photo .rbvf-room-perspective-actions button {
    grid-column:auto; width:100%; min-width:0; min-height:42px; padding:4px 2px !important;
    font-size:.68rem !important; line-height:1.05; white-space:nowrap;
  }
  .rbvf-room-content.is-correcting-photo .rbvf-room-wall-corner-hint { margin:6px 0 0; font-size:.82rem !important; line-height:1.35; }
}

/* The measurement hint belongs with the editor controls, not under the photo. */
@media(min-width:701px) {
  .rbvf-room-content .rbvf-room-stage.rbvf-has-photo-controls > .rbvf-room-drag-hint {
    position:absolute; z-index:6; top:auto; right:12px; bottom:14px; left:auto;
    width:var(--rbvf-room-photo-panel-width,420px); max-width:calc(100% - 24px);
    margin:0; padding:8px 20px; background:#fff; color:#69645d;
    font-size:1rem !important; line-height:1.45 !important; text-align:left;
    pointer-events:none;
  }
  .rbvf-room-content.has-room-measurement .rbvf-room-drag-hint,
  .rbvf-room-content.is-correcting-photo .rbvf-room-drag-hint {
    position:absolute; z-index:4; right:12px; bottom:14px; left:auto;
    width:clamp(340px,35%,420px); margin:0; padding:8px 20px;
    background:transparent; color:#69645d; font-size:1rem !important;
    line-height:1.45 !important; text-align:left; pointer-events:none;
  }
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration { padding-bottom:64px; color:#292723; }
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration p,
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration label,
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration span,
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration small,
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration h4,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration p,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration label,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration span,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration small,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration h4 {
    font-size:1rem !important; font-weight:400 !important; line-height:1.45 !important;
  }
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration input,
  .rbvf-room-content.has-room-measurement .rbvf-room-personal-calibration select,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration input,
  .rbvf-room-content.is-correcting-photo .rbvf-room-personal-calibration select { font-size:1rem !important; }
}

/* Tutorial help: independent overlay preserves the live preview state. */
.rbvf-room-tutorial-help { margin:5px 12px 14px; text-align:center; font-size:13px; line-height:1.5; }
.rbvf-room-tutorial-help a { color:#5b5147; text-decoration:underline; text-underline-offset:3px; }
.rbvf-room-sidepanel .rbvf-room-tutorial-help { margin:20px 0 8px; text-align:start; }
.rbvf-room-tutorial:not([open]) { display:none; }
.rbvf-room-tutorial[open] { display:block; position:fixed; inset:0; margin:auto; box-sizing:border-box; width:min(960px,calc(100vw - 32px)); max-width:960px; max-height:calc(100dvh - 32px); padding:20px; border:0; border-radius:10px; color:#292723; background:#fff; box-shadow:0 18px 70px rgba(0,0,0,.4); overflow:auto; }
.rbvf-room-tutorial::backdrop { background:rgba(20,18,16,.78); }
.rbvf-room-tutorial header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.rbvf-room-tutorial h2 { margin:0; font-size:22px; line-height:1.3; }
.rbvf-room-tutorial p { margin:12px 0; font-size:14px; line-height:1.5; }
.rbvf-room-tutorial .rbvf-room-tutorial-close { display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; width:44px; height:44px; padding:0; border:1px solid #ddd; border-radius:50%; background:#fff; color:#292723; font-size:28px; line-height:1; box-shadow:none; }
.rbvf-room-tutorial video { display:block; width:100%; height:auto; aspect-ratio:16/9; max-height:calc(100dvh - 200px); background:#111; }
.rbvf-room-tutorial a { color:#8e3028; text-decoration:underline; }
.rbvf-room-tutorial-close:focus-visible,.rbvf-room-tutorial-help a:focus-visible { outline:2px solid #8e3028; outline-offset:3px; }
@media(max-width:700px) { .rbvf-room-stage>.rbvf-room-tutorial-help { margin:4px 12px 68px; font-size:12px; } .rbvf-room-tutorial[open] { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); padding:12px; } .rbvf-room-tutorial h2 { font-size:18px; } }
