.studio-tour-heading:has(.studio-tour-logo) {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    column-gap: 12px;
    align-items: center;
}
.studio-tour-logo {
    grid-row: span 2;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: contain;
}
.studio-tour-heading:has(.studio-tour-logo) .studio-tour-active { margin: 0 0 4px; }
.studio-tour-floor-toggle { font-size: 11px !important; }
.studio-tour-float {
    position: absolute;
    z-index: 7;
    top: 95px;
    right: 24px;
    width: min(340px, calc(100% - 48px));
    max-height: calc(100% - 245px);
    overflow: auto;
    overscroll-behavior: contain;
    border-radius: 9px;
    padding: 15px;
    background: #fafafa;
    color: #151515;
    box-shadow: 0 10px 35px #0005;
}
.studio-tour-float header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    overflow-wrap: anywhere;
}
.studio-tour-float button {
    background: #fff;
    color: #171717;
    border: 1px solid #aaa;
    border-radius: 4px;
    min-height: 36px;
    padding: 6px 10px;
}
.studio-tour-float button:focus-visible { outline: 2px solid #555; outline-offset: 2px; }
.studio-tour-float button[aria-pressed=true] { background: #171717; color: #fff; }
.studio-tour-detail {
    width: min(290px, calc(100% - 48px));
    background: #171717;
    color: #fff;
}
.studio-tour-detail img { width: 100%; max-height: 190px; object-fit: contain; }
.studio-tour-detail p { margin: 8px 0 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.studio-detail-marker button {
    width: 36px;
    height: 36px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #161616eb;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 2px 8px #0008;
}
.tour-floor-tabs, .tour-floor-legend, .tour-review-controls, .tour-type-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}
.tour-floor-legend { margin: 8px 0 0; }
.tour-floor-tabs button, .tour-floor-legend button { font-size: 12px; overflow-wrap: anywhere; max-width: 100%; }
.tour-plan-map { position: relative; width: fit-content; max-width: 100%; margin: 12px auto; }
.tour-plan-map img { display: block; width: auto; height: auto; max-width: 100%; }
.studio-tour-plan .tour-plan-map img { max-height: 360px; }
.tour-map-pin {
    position: absolute;
    left: clamp(16px, var(--pin-x), calc(100% - 16px));
    top: clamp(16px, var(--pin-y), calc(100% - 16px));
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    min-height: 32px !important;
    padding: 0 !important;
    border: 2px solid #171717 !important;
    border-radius: 50% !important;
    background: #fff;
    color: #171717;
    font: 700 12px Manrope, Arial, sans-serif !important;
    box-shadow: 0 1px 8px #0004;
}
[data-pin-map] { cursor: crosshair; }
[data-pin-map] .tour-map-pin { pointer-events: none; }
.tour-map-pin.is-pending { background: #171717; color: #fff; }
.tour-editor [hidden] { display: none !important; }
.tour-editor-steps {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 8px;
    margin: 18px 0;
}
.tour-editor-steps a, .tour-editor-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #d1d1d1;
    border-radius: 5px;
    overflow-wrap: anywhere;
}
.tour-editor-steps a span {
    display: grid;
    place-items: center;
    background: #e6e6e6;
    color: #171717;
    border-radius: 50%;
    min-width: 24px;
    min-height: 24px;
    font-size: 12px;
}
.tour-editor-steps a[aria-current], .tour-editor a[aria-current=page], .tour-review-controls button[aria-pressed=true] {
    background: #171717;
    color: #fff;
}
.tour-editor-row { margin: 6px 0; }
.tour-editor-room-tabs { display: flex; gap: 8px; overflow: auto; margin-bottom: 12px; }
.tour-editor-room-tabs a { flex: 0 0 auto; max-width: 230px; }
.tour-editor-room-tabs img, .tour-detail-thumb { object-fit: cover; border-radius: 3px; }
.tour-detail-thumb { width: 110px; height: 75px; margin-top: 8px; }
.tour-hotspot-editor, .tour-plan-editor {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 20px;
}
.tour-hotspot-form { border: 1px solid #d1d1d1; padding: 12px; border-radius: 5px; }
.tour-editor details { margin: 8px 0 14px; }
.tour-editor summary { cursor: pointer; font-size: .9rem; }
.tour-editor input, .tour-editor textarea, .tour-editor select { max-width: 100%; }
.tour-editor .tour-remove-image input { width: auto; }
[data-tour-review] { margin-inline: auto; container-type: inline-size; }
[data-tour-review].is-phone { max-width: 390px; }
@media(max-width: 1050px) {
    .tour-hotspot-editor, .tour-plan-editor { grid-template-columns: minmax(0,1fr); }
}
@media(max-width: 700px) {
    .tour-editor-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width: 700px) {
    .studio-tour-float { top: auto; bottom: 12px; right: 12px; width: calc(100% - 24px); max-height: 57%; }
    .studio-tour-plan .tour-plan-map img { max-height: 230px; }
}
@container (max-width: 450px) {
    .studio-tour:not(.is-fullscreen) .studio-tour-top { flex-direction: column; padding: 16px; gap: 10px; }
    .studio-tour:not(.is-fullscreen) .studio-tour-controls { align-self: flex-end; gap: 2px; }
    .studio-tour:not(.is-fullscreen) .studio-tour-controls button { min-width: 34px; padding: 6px; }
    .studio-tour:not(.is-fullscreen) .studio-tour-fullscreen span, .studio-tour:not(.is-fullscreen) .studio-tour-hint { display: none; }
    .studio-tour:not(.is-fullscreen) .studio-tour-float { top: auto; bottom: 12px; right: 12px; width: calc(100% - 24px); max-height: 57%; }
}
@media(max-height: 500px) and (orientation: landscape) {
    .studio-tour.is-fullscreen .studio-tour-float { top: 70px; bottom: auto; max-height: calc(100% - 155px); }
}
@media(max-width: 380px) {
    .studio-tour .studio-tour-controls { gap: 2px; }
    .studio-tour .studio-tour-controls button { min-width: 34px; padding-inline: 5px; }
}
/* Four clear, equally sized editor steps; independent of the main admin skin. */
.tour-editor .tour-editor-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch;gap:8px;padding:8px;margin:24px 0;background:#fff;border:1px solid #dedbd4;border-radius:14px;overflow:visible}
.tour-editor .tour-editor-steps>a{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-width:0;min-height:62px;padding:12px 16px;margin:0;border:1px solid transparent;border-radius:9px;background:transparent;color:#62635d;text-decoration:none;font-size:13px;font-weight:600;line-height:1.4;transition:background .15s,color .15s}
.tour-editor .tour-editor-steps>a .tour-step-number{display:inline-flex;align-items:center;justify-content:center;flex:0 0 30px;width:30px;height:30px;margin:0;border:1px solid #dcd9d1;border-radius:50%;background:#f4f3ef;color:#62635d;font-size:12px;font-weight:600;line-height:1}
.tour-editor .tour-editor-steps>a .tour-step-label{display:block;min-width:0;width:auto;height:auto;margin:0;border:0;border-radius:0;background:transparent;color:inherit;font-size:inherit;line-height:1.4;overflow-wrap:anywhere}
.tour-editor .tour-editor-steps>a:hover{background:#f0efea;color:#20211e}
.tour-editor .tour-editor-steps>a[aria-current=step]{background:#252622;color:#fff;border-color:#252622;box-shadow:0 2px 5px #0000000d}
.tour-editor .tour-editor-steps>a[aria-current=step] .tour-step-number{background:#fff;color:#252622;border-color:#fff}
.tour-editor .tour-editor-steps>a:focus-visible{outline:2px solid #74766c;outline-offset:3px}
@media(max-width:700px){.tour-editor .tour-editor-steps{grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;padding:6px;margin:20px 0}.tour-editor .tour-editor-steps>a{min-height:60px;padding:10px;gap:9px;font-size:12px}.tour-editor .tour-editor-steps>a .tour-step-number{flex-basis:27px;width:27px;height:27px}}
