.plan-tour{width:min(1320px,96vw);max-width:96vw;max-height:94vh;padding:0;border:1px solid #d6dfeb;border-radius:16px;background:#fff;color:#253650;font-family:Arial,sans-serif}.plan-tour::backdrop{background:#10203bd9}.plan-tour[open]{display:flex;flex-direction:column;overflow:hidden}.pt-head{display:flex;justify-content:space-between;align-items:center;padding:12px 20px;border-bottom:1px solid #dbe3ef;gap:12px}.pt-head h2{font-size:20px;margin:0}.plan-tour button{cursor:pointer;border:1px solid #c9d5e5;border-radius:7px;padding:8px 12px;background:#fff;color:#243c5e;font:inherit}.pt-head button{font-size:24px}.pt-intro,.pt-note{margin:10px 20px;font-size:13px;line-height:1.5}.pt-note{padding:9px;background:#fff4d6;border-radius:7px}.pt-work{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,.9fr);gap:18px;padding:10px 20px 20px;min-height:0;overflow:auto}.pt-plan{min-width:0;text-align:center}.pt-stage{display:inline-block;position:relative;vertical-align:top;max-width:100%;line-height:0}.pt-stage>img{display:block;max-width:100%;max-height:62vh;width:auto;height:auto;margin:auto}.plan-tour .pt-pin{position:absolute;transform:translate(-50%,-50%);border:2px solid white;border-radius:50%;background:#173f73;color:white;width:34px;height:34px;padding:0;line-height:30px;box-shadow:0 2px 8px #0007;font-size:14px;font-weight:bold}.pt-pin[aria-pressed=true]{background:#bd8629;outline:3px solid #e5ba64}.pt-room-menu{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:12px}.pt-room-menu button{font-size:13px}.pt-room-menu button[aria-pressed=true]{background:#173f73;color:#fff}.pt-room{min-width:0;overflow:auto;max-height:72vh}.pt-room h3{margin:8px 0 14px}.pt-room p{font-size:13px;line-height:1.5}.pt-room-image{display:block;width:100%;max-height:56vh;object-fit:contain;border-radius:10px;background:#10203b}.pt-controls{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;padding:12px}.pt-editor .pt-stage{cursor:crosshair}.pt-room label{display:flex;flex-direction:column;gap:6px;font-size:13px;margin:10px 0}.pt-room input{box-sizing:border-box;width:100%;padding:9px;border:1px solid #c9d5e5;border-radius:6px;font:inherit}.pt-coordinates{display:grid;grid-template-columns:1fr 1fr;gap:10px}.pt-picks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.pt-room .pt-pick{margin:0;position:relative;border:2px solid #e0e7f0;border-radius:7px;padding:5px}.pt-pick:has(input:checked){border-color:#234f84;background:#eaf1fb}.pt-pick input{width:18px;height:18px;position:absolute;top:8px;left:8px}.pt-pick img{width:100%;height:85px;object-fit:contain}.pt-editor>.pt-controls{border-top:1px solid #dbe3ef}.pt-editor>.pt-controls button:last-child{background:#173f73;color:#fff}.plan-tour-trigger{padding:9px 14px;border:1px solid #b7c8dc;border-radius:8px;background:#173f73;color:#fff;cursor:pointer;margin:8px}.pt-launchers{display:flex;flex-wrap:wrap;gap:5px}@media(max-width:750px){.pt-work{grid-template-columns:1fr;padding:10px}.pt-stage>img{max-height:48vh}.pt-room{max-height:none;overflow:visible}.pt-room-image{max-height:42vh}.pt-head{padding:10px}.pt-head h2{font-size:17px}.pt-picks{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Editor: keep the plan, room name and filters visible; scroll images only. */
.plan-tour .pt-pin{width:34px;height:34px;line-height:30px;border:0;background:transparent;box-shadow:none;isolation:isolate;text-shadow:0 1px 2px #10203b;font-size:12px;outline:none}
.plan-tour .pt-pin::before{content:'';position:absolute;inset:5px;border:1.5px solid #fff;border-radius:50%;background:#173f738a;box-shadow:0 1px 3px #10203b80;z-index:-1}
.plan-tour .pt-pin[aria-pressed=true]::before{background:#a47727ad;box-shadow:0 0 0 1px #f0cf83}
.plan-tour .pt-pin:focus-visible{outline:2px solid #173f73;outline-offset:2px}
.pt-stage[data-pins-hidden=true] .pt-pin{visibility:hidden;pointer-events:none}
.pt-pin-visibility{display:block;margin:0 auto 8px;font-size:12px!important;padding:5px 9px!important}
.pt-direct .pt-plan{grid-template-rows:auto minmax(0,1fr) auto auto!important}
.pt-plan-tools{display:flex;justify-content:center;flex-wrap:wrap;gap:5px;margin-top:7px}
.plan-tour .pt-plan-tools button{font-size:11px;padding:5px 7px}
.plan-tour button:disabled{opacity:.45;cursor:default}
.pt-direct .pt-work{height:min(650px,calc(100dvh - 185px));min-height:0;overflow:hidden;align-items:stretch;padding:8px 16px;gap:16px;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr)}
.pt-direct .pt-plan{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;overflow:hidden;max-height:none}
.pt-direct .pt-edit-status{margin:0 0 8px;font-size:12px;line-height:1.4;color:#526981}
.pt-plan-frame{display:flex;align-items:center;justify-content:center;min-height:0;overflow:hidden}
.pt-direct .pt-stage{cursor:crosshair}
.pt-direct .pt-stage>img{max-height:min(520px,calc(100dvh - 285px));max-width:100%;width:auto;height:auto}
.pt-direct .pt-room-menu{max-height:72px;overflow:auto;margin-top:8px;gap:4px}
.pt-direct .pt-room-menu button{padding:5px 8px;font-size:12px}
.pt-direct .pt-room{display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;max-height:none;overflow:hidden;padding:0}
.pt-room-fixed{padding:0 0 8px;background:#fff}
.pt-room-identity{display:flex;align-items:center;gap:9px}
.pt-number-badge{display:grid;place-items:center;flex:0 0 36px;height:36px;border-radius:50%;background:#bd8629;color:#fff;font-weight:bold;font-size:20px}
.pt-direct .pt-name-input{font-size:16px;font-weight:bold;min-width:0;width:100%;height:39px;border:2px solid #456b9c;padding:7px 10px}
.pt-inline-actions{display:flex;gap:10px;justify-content:flex-end;margin:4px 0}
.pt-direct .pt-inline-actions button{padding:3px 6px;font-size:12px;background:transparent}
.pt-source-filters{display:grid;grid-template-columns:1.3fr 1fr;gap:8px}
.pt-source-filters select{width:100%;min-width:0;padding:7px;border:1px solid #c9d5e5;border-radius:6px;background:#f3f6fa;color:#253650;font-size:13px}
.pt-direct .pt-assignment-status{margin:5px 0 0;padding:5px 8px;border-radius:5px;background:#eaf1fb;font-weight:bold;font-size:12px}
.pt-direct .pt-picks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:9px;overflow-y:auto;min-height:0;padding:0 5px 8px 0;margin:0}
.pt-direct .pt-pick{padding:5px;min-width:0;border:2px solid #dbe3ef;border-radius:7px;position:relative}
.pt-direct .pt-pick.pt-selected{border-color:#234f84;background:#eaf1fb}
.pt-direct .pt-pick>img{display:block;width:100%;height:140px;object-fit:contain;cursor:pointer}
.pt-direct .pt-direct-choice{display:flex;flex-direction:row;align-items:center;gap:5px;margin:0;padding:5px 0;cursor:pointer;line-height:1.3;font-size:12px;font-weight:bold}
.pt-direct .pt-direct-choice input{position:static;width:20px;height:20px;flex:0 0 20px;margin:0;padding:0}
.pt-direct .pt-pick small{display:block;color:#61748d;font-size:10px;line-height:1.3;overflow-wrap:anywhere}
.pt-direct .pt-zoom{position:absolute;top:9px;right:9px;padding:4px 7px;font-size:11px;background:#fffE}
.pt-direct>.pt-controls{padding:8px;flex-shrink:0}
.pt-photo-preview{width:min(1000px,96vw)}
.pt-photo-preview .pt-room-image{min-height:0;flex:1;max-height:72vh;object-fit:contain;background:#edf2f7;width:100%;padding:10px;box-sizing:border-box}
.pt-photo-preview>.pt-controls,.pt-photo-preview>.pt-head{flex-shrink:0}
@media(max-width:750px){.pt-direct .pt-work{grid-template-columns:1fr;height:calc(100dvh - 185px);grid-template-rows:minmax(140px,.7fr) minmax(220px,1fr);overflow:auto}.pt-direct .pt-stage>img{max-height:24dvh}.pt-direct .pt-room-menu{max-height:40px}.pt-direct .pt-pick>img{height:105px}.pt-direct .pt-name-input{font-size:14px}.pt-direct .pt-edit-status{display:none}}
.pt-direct .pt-room{grid-template-rows:auto auto auto auto minmax(0,1fr)}
.pt-selected-zone{min-width:0;padding:0 0 7px;border-bottom:1px solid #dbe3ef;margin-bottom:7px}
.pt-direct .pt-assignment-status{margin:0 0 5px;padding:5px 8px}
.pt-selected-picks{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:6px;max-height:176px;overflow-y:auto;padding:0 4px 4px 0;min-height:25px}
.pt-selected-picks>.pt-pick{background:#eaf1fb;border-color:#234f84}
.pt-selected-picks>.pt-pick.pt-active-room{border-color:#bd8629;box-shadow:0 0 0 2px #f0cf83}
.pt-direct .pt-selected-picks>.pt-pick>img{height:52px}
.pt-selected-picks .pt-selected-room-btn,.pt-selected-picks .pt-selected-remove{display:block;width:100%;min-width:0;margin:3px 0 0;padding:3px 4px;font-size:10px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pt-selected-picks .pt-selected-room-btn{background:#fff;font-weight:bold;text-align:left}
.pt-selected-picks .pt-selected-remove{border-color:#d5a8a8;color:#8d2d2d;background:#fff8f8}
.pt-direct .pt-selected-picks .pt-zoom{top:5px;right:5px;font-size:9px;padding:2px 4px}
.pt-selected-picks>p{font-size:12px;color:#61748d;margin:3px 0}
.plan-tour.pt-direct{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;box-sizing:border-box}
.pt-direct .pt-head{padding:7px 14px;flex-shrink:0}
.pt-direct .pt-head h2{font-size:17px}
.pt-direct .pt-intro{margin:5px 14px;font-size:12px;flex-shrink:0}
.pt-direct .pt-work{height:auto;flex:1;grid-template-columns:minmax(240px,.7fr) minmax(0,1.5fr);padding:4px 14px;gap:14px}
.pt-direct .pt-stage>img{max-height:calc(100dvh - 205px)}
.pt-direct .pt-inline-actions select{padding:3px 6px;font-size:12px;border:1px solid #c9d5e5;border-radius:5px}
.pt-direct .pt-selected-picks{display:flex;flex-wrap:nowrap;max-height:116px;overflow-x:auto;overflow-y:hidden}
.pt-direct .pt-selected-picks>.pt-pick{flex:0 0 92px}
.pt-direct .pt-picks{grid-template-columns:repeat(auto-fill,minmax(135px,1fr));align-content:start}
.pt-direct .pt-picks>.pt-pick>img{height:105px}
.pt-direct .pt-pin{cursor:grab}
.pt-direct .pt-pin:active{cursor:grabbing}
.pt-context{position:absolute;left:0;top:0;bottom:0;width:174px;box-sizing:border-box;padding:18px 12px;display:flex;flex-direction:column;gap:14px;background:#f2f5fa;border-right:1px solid #d8e1ed;overflow:auto;text-align:left}
.pt-context small{font-size:11px;line-height:1.5;color:#65768d}
.pt-context strong{font-size:13px;line-height:1.5}
.pt-context-location{font-size:12px;color:#8a692c;line-height:1.5}
.pt-context nav{display:grid;gap:5px}
.plan-tour .pt-context button{padding:9px 7px;font-size:12px;text-align:left;background:transparent;border:0}
.plan-tour .pt-context button[aria-current=page]{background:#dfe8f4;color:#173f73;font-weight:bold;border-left:3px solid #b28b43}
@media(min-width:751px){.plan-tour.pt-direct{padding-left:174px}.pt-direct .pt-work{grid-template-columns:minmax(220px,.65fr) minmax(0,1.5fr)}}
@media(max-width:750px){.pt-context{position:static;width:100%;padding:6px 12px;flex-direction:row;align-items:center;flex-shrink:0}.pt-context nav,.pt-context small,.pt-context-location{display:none}.pt-context strong{font-size:11px}.pt-context button{margin-left:auto}}
@media(max-width:750px){.pt-direct .pt-work{grid-template-columns:1fr;overflow:auto;grid-template-rows:minmax(160px,.6fr) minmax(400px,1fr)}.pt-direct .pt-stage>img{max-height:25dvh}}
.pt-direct .pt-picks{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.pt-direct .pt-picks>.pt-pick>img{height:80px}
.pt-direct .pt-picks .pt-direct-choice{padding:3px 0;font-size:11px}
.pt-direct .pt-picks .pt-pick small{font-size:9px;max-height:24px;overflow:hidden}
.pt-direct .pt-available-title{margin:6px 0;font-size:12px;font-weight:bold}
@media(min-width:751px){.pt-direct .pt-picks{grid-template-columns:repeat(auto-fill,minmax(135px,1fr))}.pt-direct .pt-picks>.pt-pick>img{height:105px}}
@media(max-width:750px){.pt-direct .pt-picks{grid-template-columns:repeat(3,minmax(0,1fr))}.pt-direct .pt-picks>.pt-pick>img{height:80px}.pt-direct .pt-selected-picks>.pt-pick>img{height:46px}.pt-direct .pt-work{grid-template-rows:minmax(160px,.6fr) minmax(400px,1fr)}}
/* Customer viewer: keep the plan and its room photo visible together. */
.pt-view-note{margin:0 20px 7px;font-size:11px;flex-shrink:0}.pt-view-note summary{cursor:pointer;color:#6b778a}.pt-view-note .pt-note{margin:6px 0}
@media all{
 dialog.plan-tour.pt-viewer{position:fixed;inset:0;margin:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border:0;border-radius:0;box-sizing:border-box;background:#fff;color:#18283d}
 .pt-viewer>.pt-head{flex:0 0 auto;min-height:47px;box-sizing:border-box;padding:8px 12px;gap:9px}
 .pt-viewer .pt-head h2{font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
 .pt-viewer .pt-head button{flex:0 0 36px;width:36px;height:36px;padding:0;border-radius:10px;background:#edf1f6;font-size:24px}
 .pt-viewer>.pt-intro{flex:0 0 auto;font-size:11px;line-height:1.35;margin:6px 12px}
 .pt-viewer>.pt-view-note{margin:0 12px 6px;font-size:10px;max-height:85px;overflow:auto}
 .pt-viewer .pt-work{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:8px;overflow:hidden;padding:0 10px calc(8px + env(safe-area-inset-bottom));height:auto}
 .pt-viewer .pt-plan{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;overflow:hidden;background:#f4f6f9;border:1px solid #dfe5ed;border-radius:12px;padding:5px}
 .pt-viewer .pt-pin-visibility{margin:0 auto 3px;padding:3px 7px!important;font-size:10px!important}
 .pt-viewer .pt-stage{align-self:center;justify-self:center;max-width:100%;max-height:100%;width:max-content}
 .pt-viewer .pt-stage>img{max-height:calc(42dvh - 92px);max-width:100%;width:auto;height:auto;object-fit:contain}
 .pt-viewer .pt-room-menu{display:flex;flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;margin:4px 0 0;gap:5px;padding:2px 0;min-width:0}
 .pt-viewer .pt-room-menu button{flex:0 0 auto;white-space:nowrap;padding:6px 9px;font-size:11px;min-height:30px;border-radius:8px}
 .pt-viewer .pt-room{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;max-height:none;overflow:hidden;background:#fff;border:1px solid #dfe5ed;border-radius:12px;padding:7px}
 .pt-viewer .pt-room h3{margin:0 0 6px;font-size:14px;line-height:1.3;color:#18283d}
 .pt-viewer .pt-room-image{width:100%;height:100%;min-height:0;max-height:none;object-fit:contain;border-radius:8px;background:#eef1f5}
 .pt-viewer .pt-controls{flex-wrap:nowrap;gap:8px;padding:6px 0 0;font-size:11px}
 .pt-viewer .pt-controls button{min-height:32px;padding:5px 12px;font-size:12px;border-radius:8px}
}
/* V128: fit the plan to its actual available viewport, with manual zoom. */
@media all{
 .pt-viewer.pt-autofit>.pt-intro{display:none}
 .pt-viewer.pt-autofit>.pt-head{flex-wrap:wrap;padding:7px 10px;gap:5px 8px}
 .pt-viewer.pt-autofit .pt-head h2{flex:1;font-size:12px}
 .pt-viewer.pt-autofit .pt-head .pt-view-visibility{flex:0 0 auto;width:auto;height:auto;min-height:24px;margin:0;padding:3px 6px!important;font-size:9px!important;order:3}
 .pt-viewer.pt-autofit>.pt-view-note{margin:0 10px 5px;font-size:9px}
 .pt-viewer.pt-autofit .pt-work{grid-template-rows:minmax(0,1.55fr) minmax(0,1fr);gap:6px;padding:0 6px calc(6px + env(safe-area-inset-bottom))}
 .pt-viewer.pt-autofit.pt-plan-expanded .pt-work{grid-template-rows:minmax(0,3fr) minmax(0,1fr)}
 .pt-viewer.pt-autofit .pt-plan{padding:4px;grid-template-rows:auto minmax(0,1fr) auto}
 .pt-view-tools{display:flex;align-items:center;justify-content:space-between;gap:4px;padding-bottom:4px}
 .pt-viewer .pt-view-tools button{padding:4px 7px;min-height:29px;font-size:10px;border-radius:7px;white-space:nowrap}
 .pt-viewer .pt-view-tools button:last-child{background:#18283d;color:#fff;border-color:#18283d}
 .pt-plan-viewport{min-width:0;min-height:0;width:100%;height:100%;overflow:auto;overscroll-behavior:contain;position:relative;background:#edf1f5;border-radius:7px}
 .pt-viewer.pt-autofit .pt-stage{display:block;position:relative;margin:0 auto;max-width:none;max-height:none;min-width:0;line-height:0}
 .pt-viewer.pt-autofit .pt-stage>img{width:100%;height:100%;max-width:none;max-height:none;margin:0;object-fit:fill}
 .pt-viewer.pt-autofit .pt-room-menu{margin-top:3px;gap:4px}
 .pt-viewer.pt-autofit .pt-room-menu button{font-size:10px;padding:5px 7px;min-height:28px}
 .pt-viewer.pt-autofit .pt-room{padding:5px}
 .pt-viewer.pt-autofit .pt-room h3{font-size:12px;margin-bottom:4px}
 .pt-viewer.pt-autofit .pt-controls{padding-top:4px}
 .pt-viewer.pt-autofit .pt-controls button{min-height:28px;font-size:11px;padding:4px 10px}
}

/* V129: larger plan by default and a dedicated full plan mode. */
@media all{.pt-viewer.pt-autofit .pt-work{grid-template-rows:minmax(0,2.4fr) minmax(0,1fr);gap:4px;padding-left:3px;padding-right:3px}.pt-viewer.pt-autofit .pt-plan{padding:3px;border-radius:9px}.pt-viewer.pt-autofit.pt-plan-expanded .pt-work{grid-template-rows:minmax(0,1fr)}.pt-viewer.pt-autofit.pt-plan-expanded .pt-room{display:none}.pt-viewer.pt-autofit .pt-head{padding:5px 8px;min-height:40px}.pt-viewer.pt-autofit .pt-head h2{font-size:11px}.pt-viewer.pt-autofit .pt-head button:not(.pt-view-visibility){width:32px;height:32px;flex-basis:32px}.pt-viewer.pt-autofit .pt-view-tools{gap:4px;padding-bottom:3px}.pt-viewer.pt-autofit .pt-view-tools button{min-height:27px;padding:3px 6px;font-size:10px}.pt-viewer.pt-autofit .pt-room-image[role="button"]{cursor:zoom-in}.pt-customer-photo{position:fixed;inset:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;border:0}.pt-customer-photo .pt-head{flex-shrink:0;padding:8px 12px}.pt-customer-photo .pt-head h2{font-size:15px}.pt-customer-photo .pt-room-image{flex:1;min-height:0;max-height:none;width:100%;object-fit:contain;padding:0;background:#0d1c30;border-radius:0}}

@media(min-width:761px){.pt-viewer.pt-autofit .pt-work{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);padding:12px 20px 20px;gap:20px}.pt-viewer.pt-autofit.pt-plan-expanded .pt-work{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}.pt-viewer.pt-autofit .pt-head{padding:12px 20px;min-height:62px}.pt-viewer.pt-autofit .pt-head h2{font-size:20px}.pt-viewer.pt-autofit .pt-view-tools button,.pt-viewer.pt-autofit .pt-room-menu button{font-size:13px;padding:9px 13px;min-height:38px}.pt-viewer.pt-autofit .pt-room h3{font-size:20px}.pt-viewer.pt-autofit .pt-controls button{font-size:14px;min-height:38px}.pt-viewer.pt-autofit .pt-head .pt-view-visibility{font-size:12px!important;padding:7px 11px!important}.pt-viewer.pt-autofit>.pt-view-note{font-size:12px;margin:0 20px 8px}}

/* V154: give the selected room the same space as its plan. */
@media(max-width:760px){.pt-viewer.pt-autofit .pt-work{grid-template-rows:minmax(0,1fr) minmax(0,1fr)}.pt-viewer.pt-autofit.pt-plan-expanded .pt-work{grid-template-rows:minmax(0,1fr)}.pt-viewer.pt-autofit .pt-room{padding:4px}.pt-viewer.pt-autofit .pt-room-image{max-width:none;width:100%;height:100%}.pt-viewer.pt-autofit .pt-controls button{min-height:36px}.pt-viewer.pt-autofit .pt-head button:not(.pt-view-visibility){width:40px;height:40px;flex-basis:40px}}

/* V155: plan first; scroll the tour instead of shrinking either image. */
@media(max-width:760px){
.pt-viewer.pt-autofit .pt-work{display:flex;flex-direction:column;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;gap:10px;padding:0 6px calc(12px + env(safe-area-inset-bottom))}
.pt-viewer.pt-autofit .pt-plan{flex:0 0 max(430px,72dvh);box-sizing:border-box;min-height:0}
.pt-viewer.pt-autofit .pt-room{flex:0 0 max(290px,48dvh);box-sizing:border-box;grid-template-rows:auto minmax(0,1fr) auto;min-height:0;overflow:hidden}
.pt-viewer.pt-autofit .pt-room-image{object-fit:contain;min-height:0}
.pt-viewer.pt-autofit .pt-controls{position:static;background:#fff;min-height:40px;padding:4px 0;box-sizing:border-box}
.pt-viewer.pt-autofit.pt-plan-expanded .pt-work{overflow:hidden}
.pt-viewer.pt-autofit.pt-plan-expanded .pt-plan{flex:1;min-height:0}
.pt-viewer.pt-autofit.pt-plan-expanded .pt-room{display:none}
}

/* MK's embedded tour keeps navigation above both images. */
.pt-viewer.pt-autofit.pt-mk-compact>.pt-head{min-height:0;padding:3px 8px}
.pt-viewer.pt-autofit.pt-mk-compact>.pt-head button{width:28px;height:28px;flex-basis:28px}
.pt-viewer.pt-autofit.pt-mk-compact>.pt-view-note{order:3;margin:2px 8px;font-size:10px}
.pt-mk-tour-tools{display:flex;flex-wrap:wrap;align-items:center;gap:3px 8px;padding:0 6px 4px;min-width:0}
.pt-viewer.pt-mk-compact .pt-mk-tour-tools .pt-view-tools{justify-content:flex-start;overflow:auto;padding:0}
.pt-viewer.pt-mk-compact .pt-mk-tour-tools .pt-view-visibility{margin:0}
.pt-viewer.pt-mk-compact .pt-room-tools .pt-controls{padding:0;min-height:0}
.pt-viewer.pt-mk-compact .pt-mk-tour-tools .pt-room-menu{margin:0;padding:0}
.pt-viewer.pt-autofit.pt-mk-compact .pt-work{padding:0 4px 4px;gap:5px}
.pt-viewer.pt-autofit.pt-mk-compact .pt-plan{grid-template-rows:minmax(0,1fr)}
.pt-viewer.pt-autofit.pt-mk-compact .pt-room{grid-template-rows:auto minmax(0,1fr)}
.pt-mk-compact.pt-plan-expanded .pt-room-tools{display:none}

/* The embedded MK viewer gives the plan and room photo priority. */
.pt-viewer.pt-autofit.pt-mk-compact > .pt-head { flex-wrap:nowrap; gap:5px; padding:2px 5px }
.pt-viewer.pt-autofit.pt-mk-compact > .pt-head h2 {
 flex:0 1 190px; min-width:80px; display:block; overflow:hidden;
 white-space:nowrap; text-overflow:ellipsis; font-size:12px;
}
.pt-mk-compact > .pt-head .pt-mk-tour-tools { flex:1; gap:2px 5px; padding:0 }
.pt-mk-compact .pt-mk-tour-tools :is(.pt-view-tools,.pt-controls) { gap:3px }
.pt-viewer.pt-autofit.pt-mk-compact .pt-mk-tour-tools :is(.pt-view-tools,.pt-controls) button,
.pt-viewer.pt-autofit.pt-mk-compact > .pt-room-menu button {
 font-size:11px; width:auto; height:auto; flex-basis:auto; min-height:26px; padding:3px 6px; border-radius:5px;
}
.pt-viewer.pt-autofit.pt-mk-compact .pt-mk-tour-tools .pt-view-visibility { width:auto;height:auto;flex-basis:auto }
.pt-viewer.pt-autofit.pt-mk-compact > .pt-room-menu { margin:2px 5px 3px; padding:0; flex-shrink:0 }
.pt-viewer.pt-autofit.pt-mk-compact .pt-room h3 { font-size:13px; margin:0 0 3px }
@media (min-width:620px) and (max-width:760px) {
 .pt-viewer.pt-autofit.pt-mk-compact .pt-work {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:minmax(0,1fr); overflow:hidden;
 }
 .pt-viewer.pt-autofit.pt-mk-compact.pt-plan-expanded .pt-work { grid-template-columns:minmax(0,1fr) }
}
@media (max-width:619px) {
 .pt-viewer.pt-autofit.pt-mk-compact > .pt-head { flex-wrap:wrap }
 .pt-viewer.pt-autofit.pt-mk-compact > .pt-head h2 { flex:1 }
 .pt-mk-compact > .pt-head .pt-mk-tour-tools { order:1; flex:1 0 100% }
}
