.st-site-plan {
    overflow: hidden;
    background: #eaf0e8;
    border-radius: inherit;
    font-variant-numeric: tabular-nums;
}

.st-site-plan[data-interactive-plan] [data-plan-device] { cursor:pointer; touch-action:manipulation; }
.st-site-plan [role="button"]:focus-visible { outline:none; }
.st-site-plan[data-interactive-plan] [data-plan-device]:is(:hover,:focus-visible,.plan-triggered) .plan-key-shape {
    stroke:#a33e14; stroke-width:3; fill:#fff2df;
}
.st-site-plan :is([data-plan-effect$="View"]).plan-triggered {
    fill:#55a6ba; fill-opacity:.72; stroke:#1e606f; stroke-width:3;
}
.st-site-plan :is(.plan-trace,.plan-ring,.plan-verification).plan-triggered { opacity:1; }
.st-site-plan[data-access-open="door"] .plan-door-leaf:not(.plan-door-secondary),
.st-site-plan[data-access-open="second"] .plan-door-secondary { transform:rotate(var(--leaf-angle,-82deg)); }

.plan-interaction-note {
    margin:0; padding:.55rem .85rem; align-self:end; width:100%; box-sizing:border-box;
    color:#244843; background:#f4f7f1; border-top:1px solid #cfdbd2; font-size:.92rem; line-height:1.4;
}
.plan-feedback {
    display:flex; align-items:center; justify-content:space-between; gap:.45rem;
    align-self:end; padding:.3rem .65rem; min-width:0; box-sizing:border-box;
    color:#244843; background:#f4f7f1; border-top:1px solid #cfdbd2;
}
.plan-feedback .plan-interaction-note {
    align-self:center; flex:1; min-width:0; padding:.25rem 0; background:none; border:0;
}
[data-plan-sound-toggle] {
    display:inline-flex; align-items:center; justify-content:center; gap:.35rem; flex:none;
    min-height:44px; min-width:44px; padding:.4rem .6rem;
    border:1px solid #94ada3; border-radius:.55rem; color:#20534a; background:white;
    font:inherit; font-size:.875rem; font-weight:600; line-height:1.2;
    cursor:pointer; touch-action:manipulation;
}
[data-plan-sound-toggle]::before {
    content:""; display:block; width:1.15rem; height:1.15rem; background:currentColor;
    mask:center/contain no-repeat var(--sound-symbol);
    --sound-symbol:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zM16 8a6 6 0 0 1 0 8m3-11a10 10 0 0 1 0 14'/%3E%3C/svg%3E");
}
[data-plan-sound-toggle][aria-pressed="false"]::before {
    --sound-symbol:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3zM16 9l6 6m0-6l-6 6'/%3E%3C/svg%3E");
}
[data-plan-sound-toggle]:focus-visible {outline:3px solid #a33e14;outline-offset:2px;}
.plan-device-buttons[hidden] { display:none; }
.plan-device-buttons {
    display:flex;
    flex-wrap:wrap;
    gap:.45rem;
    padding:.6rem .85rem;
    background:#f4f7f1;
}
.plan-device-buttons button {
    min-width:44px;
    min-height:44px;
    max-width:100%;
    padding:.45rem .8rem;
    border:1px solid #829f95;
    border-radius:.55rem;
    background:white;
    color:#204a43;
    font:inherit;
    line-height:1.25;
    white-space:normal;
    cursor:pointer;
    touch-action:manipulation;
}
.plan-device-buttons button:focus-visible { outline:3px solid #a33e14; outline-offset:2px; }
@media (prefers-reduced-motion:no-preference) {
    .st-site-plan :is(.plan-door-leaf,.plan-arm-tripod) { transition: transform .32s ease; }
    .st-site-plan .plan-ring.plan-triggered {
        transform-box:fill-box; transform-origin:center; animation:plan-monitor-ring .55s ease-out .35s 2;
    }
    .st-site-plan .plan-verification.plan-triggered {
        transform-box:fill-box; transform-origin:center; animation:plan-face-check .32s ease-out;
    }
    .st-site-plan [data-plan-device].plan-triggered .plan-key-shape {
        transform-box:fill-box; transform-origin:center; animation:plan-key-press .28s ease-out;
    }
    .st-site-plan .plan-trace.plan-triggered { stroke-dasharray:1; animation:plan-route-arrival .8s ease-out; }
    .st-site-plan :is([data-plan-effect$="View"]).plan-triggered { animation:plan-camera-reveal .45s ease-out; }
}
@keyframes plan-monitor-ring { 0% { transform:scale(.85); } 80% { transform:scale(1.36); opacity:.3; } }
@keyframes plan-face-check { from { opacity:0; transform:scale(.7); } }
@keyframes plan-key-press { 40% { transform:scale(.94); } }
@keyframes plan-route-arrival { from { stroke-dashoffset:1; } to { stroke-dashoffset:0; } }
@keyframes plan-camera-reveal { from { fill-opacity:.32; } to { fill-opacity:.72; } }


/* On touch screens the three native controls sit on the entrance and flat.
   The SVG still supplies the static drawing and scalable pointer targets. */
@media (max-width:760px), (pointer:coarse) {
    :is(#plan-map, #intercom-site-plan):has(> .plan-entrance-touch) {display:grid;grid-template-columns:minmax(0,1fr);}
    :is(#plan-map, #intercom-site-plan):has(> .plan-entrance-touch) > svg,
    .plan-entrance-touch {grid-area:1/1;align-self:center;}
    .plan-entrance-touch {position:relative;display:block;width:100%;aspect-ratio:548/340;background:transparent;pointer-events:none;padding:0;z-index:1;}
    .plan-entrance-touch button {position:absolute;display:grid;place-items:center;border-radius:50%;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:2px solid #14695f;background:white;color:#14695f;font-size:0;line-height:0;pointer-events:auto;}
    .plan-entrance-touch [data-plan-button="entry"] {right:calc(60% + 1px);top:55.6%;transform:translateY(-50%);}
    .plan-entrance-touch [data-plan-button="guestCall"] {left:calc(40% + 1px);top:55.6%;transform:translateY(-50%);}
    .plan-entrance-touch [data-plan-button="guestUnlock"] {left:44.2%;top:13.8%;transform:translate(-50%,-50%);}
    .plan-entrance-touch[data-last-action="entry"] [data-plan-button="entry"],
    .plan-entrance-touch[data-last-action="guestUnlock"] [data-plan-button="guestUnlock"] {background:#14695f;color:#fff;}
    .plan-entrance-touch[data-last-action="guestCall"] [data-plan-button="guestCall"],
    .plan-entrance-touch[data-ringing] [data-plan-button="guestUnlock"] {background:#fff0dc;border-color:#9d411c;color:#8c3513;}
    .plan-entrance-touch button::before {content:"";width:24px;height:24px;background-color:currentColor;mask:var(--touch-icon) center/contain no-repeat;}
    .plan-entrance-touch [data-plan-button="entry"] {--touch-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round'%3E%3Cpath d='M-8-4v-4h4m8 0h4v4m0 8v4H4m-8 0h-4V4'/%3E%3Ccircle cy='-2' r='2.3'/%3E%3Cpath d='M-4 5q4-5 8 0'/%3E%3C/svg%3E");}
    .plan-entrance-touch [data-plan-button="guestCall"] {--touch-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M-7 4q2-2 2-5a5 5 0 0 1 10 0q0 4 2 5zM-2 7q2 3 4 0M0-7v-1'/%3E%3C/svg%3E");}
    .plan-entrance-touch [data-plan-button="guestUnlock"] {--touch-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-10 -10 20 20' fill='none' stroke='black' stroke-width='1.7'%3E%3Crect x='-8' y='-6' width='16' height='11' rx='1.5'/%3E%3Cpath d='M0 5v3m-4 0h8'/%3E%3C/svg%3E");}
    :is(#plan-map, #intercom-site-plan):has(> .plan-entrance-touch) > svg [data-plan-device] {visibility:hidden;}
}

@media (prefers-reduced-motion:no-preference) {
    .plan-entrance-touch[data-last-action="entry"] [data-plan-button="entry"]::before,
    .plan-entrance-touch[data-last-action="guestCall"] [data-plan-button="guestCall"]::before,
    .plan-entrance-touch[data-last-action="guestUnlock"] [data-plan-button="guestUnlock"]::before {animation:plan-key-press .28s ease-out;}
    .plan-entrance-touch[data-ringing] [data-plan-button="guestUnlock"] {animation:plan-touch-ring .75s ease-out 2;}
}
@keyframes plan-touch-ring {from {box-shadow:0 0 0 0 #a2481d88;} to {box-shadow:0 0 0 7px #a2481d00;}}

/* Keep the courtyard in place while its selected layer changes. */
.residential-coverage path, .residential-alert, .residential-plate-scan { opacity:0; }
.residential-coverage path.plan-triggered { opacity:.87; }
.residential-alert.plan-triggered { opacity:1; }
.residential-arm { transform-origin:422px 209px; transform-box:view-box; }
[data-parking-phase="scan"] .residential-car,
[data-parking-phase="opening"] .residential-car { transform:translateY(-21px); }
[data-parking-phase="scan"] .residential-plate-scan { opacity:1; }
[data-parking-phase="scan"] .residential-plate { fill:#ffdc80; }
[data-parking-phase="opening"] .residential-arm,
[data-parking-phase="passing"] .residential-arm { transform:scaleX(.09); }
[data-parking-phase="passing"] .residential-signal { stroke:#8dd3ae; }
[data-parking-phase="passing"] .residential-car { transform:translateY(-172px); }
[data-parking-phase="closing"] .residential-car { transform:translateY(-207px); }
@media (prefers-reduced-motion:no-preference) {
    .residential-coverage path, .residential-alert, .residential-plate-scan { transition:opacity .18s ease; }
    .residential-arm { transition:transform .5s ease-in-out; }
    [data-parking-phase="scan"] .residential-car,
    [data-parking-phase="opening"] .residential-car { transition:transform .4s ease-out; }
    [data-parking-phase="passing"] .residential-car { transition:transform 1.17s ease-in; }
    [data-parking-phase="closing"] .residential-car { transition:transform .5s ease-out; }
}
.st-site-plan[data-unified-residential] + .plan-device-buttons button[aria-pressed="true"] {
    color:#fff; border-color:#245a64; background:#245a64;
}
.st-site-plan[data-unified-residential] + [data-last-action="fireSmoke"] [data-plan-button="fireSmoke"],
.st-site-plan[data-unified-residential] + [data-last-action="fireLeak"] [data-plan-button="fireLeak"] {
    color:#fff; border-color:#275545; background:#275545;
}
@media (max-width: 38rem) {
    .residential-pin-label { display:none; }
    .residential-pin-icon { display:inline; }
    [data-plan-device="plateRead"] .residential-pin-icon { transform:translateY(8px); }
    [data-plan-device="vehicle"] .residential-pin-icon { transform:translateY(-8px); }
    [data-plan-device="fireLeak"] .residential-pin-icon { transform:translate(12px,9px); }
}
