body {
    font-family: 'Google Sans', Roboto, sans-serif;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* App-like feel */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* App-styled tour hotspot arrows */
#panorama-container .pnlm-scene,
#panorama-container .app-tour-scene-hotspot,
#tour-panorama-container .app-tour-scene-hotspot {
    width: 52px;
    height: 52px;
    background: rgba(255, 218, 213, 0.85) !important;
    border: 3px solid #854b45;
    border-radius: 999px;
    box-shadow: 0 14px 28px rgba(62, 47, 45, 0.28), 0 4px 10px rgba(62, 47, 45, 0.18);
    transition: background-color 120ms ease, box-shadow 120ms ease;
}

#panorama-container .pnlm-scene::before,
#panorama-container .app-tour-scene-hotspot::before,
#tour-panorama-container .app-tour-scene-hotspot::before {
    content: "";
    position: absolute;
    inset: 11px;
    background: #854b45;
    clip-path: polygon(50% 24%, 78% 58%, 68% 68%, 50% 48%, 32% 68%, 22% 58%);
}

#panorama-container .pnlm-scene:hover,
#panorama-container .pnlm-scene:focus-visible,
#panorama-container .app-tour-scene-hotspot:hover,
#panorama-container .app-tour-scene-hotspot:focus-visible,
#tour-panorama-container .app-tour-scene-hotspot:hover,
#tour-panorama-container .app-tour-scene-hotspot:focus-visible {
    background: #ffdad5 !important;
    box-shadow: 0 18px 34px rgba(62, 47, 45, 0.32), 0 5px 12px rgba(62, 47, 45, 0.2);
}

#panorama-container .pnlm-scene span,
#panorama-container .app-tour-scene-hotspot span,
#tour-panorama-container .app-tour-scene-hotspot span {
    min-width: max-content;
    max-width: 180px;
    margin-top: -76px !important;
    padding: 8px 12px !important;
    background: rgba(255, 248, 247, 0.94) !important;
    color: #3e2f2d !important;
    border: 1px solid rgba(255, 218, 213, 0.95);
    border-radius: 16px !important;
    box-shadow: 0 10px 24px rgba(62, 47, 45, 0.18);
    font-family: 'Google Sans', Roboto, sans-serif;
    font-size: 14px !important;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: normal;
}

/* Utility to toggle views */
.view-hidden {
    display: none !important;
}

/* Capture Flow Orientation */
@media (orientation: portrait) {
    .portrait-overlay {
        display: flex !important;
    }

    .landscape-content {
        display: none !important;
    }
}

@media (orientation: landscape) {
    .portrait-overlay {
        display: none !important;
    }

    .landscape-content {
        display: flex !important;
    }
}

/* Capture Animation Overrides */
.anim-step-0 .user-mover {
    animation: oppositeCornerWalk 8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.anim-step-0 .fov-cone {
    animation: flash 4s infinite;
}

.anim-step-0 .ret-1 {
    animation: oppositeStep1 8s infinite;
}

.anim-step-0 .ret-3 {
    animation: oppositeStep2 8s infinite;
}

.anim-step-0 .ret-2,
.anim-step-0 .ret-4 {
    opacity: 0;
}

.anim-step-1 .user-mover {
    transform: translate(550px, 550px) rotate(-45deg);
}

.anim-step-1 .fov-cone {
    animation: flashStep 2s infinite;
}

.anim-step-1 .ret-1 {
    opacity: 1;
}

.anim-step-1 .ret-2,
.anim-step-1 .ret-3,
.anim-step-1 .ret-4 {
    opacity: 0;
}

.anim-step-2 .user-mover {
    animation: roomStep2MoveToOppositeCorner 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.anim-step-2 .fov-cone {
    animation: delayedRoomStep2Flash 4.8s infinite;
    opacity: 0.2;
    fill: url(#fovGrad);
}

.anim-step-2 .ret-1,
.anim-step-2 .ret-2,
.anim-step-2 .ret-4 {
    opacity: 0;
}

.anim-step-2 .ret-3 {
    opacity: 1;
}

.anim-step-3 .user-mover {
    animation: loopMove3 4s infinite;
}

.anim-step-3 .fov-cone {
    animation: loopFlash 4s infinite;
    opacity: 0.2;
    fill: url(#fovGrad);
}

.anim-step-3 .ret-1,
.anim-step-3 .ret-2,
.anim-step-3 .ret-4 {
    opacity: 0;
}

.anim-step-3 .ret-3 {
    opacity: 1;
}

.anim-step-4 .user-mover {
    animation: loopMove4 4s infinite;
}

.anim-step-4 .fov-cone {
    animation: loopFlash 4s infinite;
    opacity: 0.2;
    fill: url(#fovGrad);
}

.anim-step-4 .ret-1,
.anim-step-4 .ret-2,
.anim-step-4 .ret-3 {
    opacity: 0;
}

.anim-step-4 .ret-4 {
    opacity: 1;
}

@keyframes loopMove2 {

    0%,
    10% {
        transform: translate(550px, 550px) rotate(-45deg);
        opacity: 0;
    }

    15% {
        transform: translate(550px, 550px) rotate(-45deg);
        opacity: 1;
    }

    45% {
        transform: translate(250px, 550px) rotate(45deg);
        opacity: 1;
    }

    90% {
        transform: translate(250px, 550px) rotate(45deg);
        opacity: 1;
    }

    95%,
    100% {
        transform: translate(250px, 550px) rotate(45deg);
        opacity: 0;
    }
}

@keyframes roomStep2MoveToOppositeCorner {

    0%,
    10% {
        transform: translate(550px, 550px) rotate(-45deg);
        opacity: 0;
    }

    18% {
        transform: translate(550px, 550px) rotate(-45deg);
        opacity: 1;
    }

    52% {
        transform: translate(250px, 250px) rotate(135deg);
        opacity: 1;
    }

    92% {
        transform: translate(250px, 250px) rotate(135deg);
        opacity: 1;
    }

    100% {
        transform: translate(250px, 250px) rotate(135deg);
        opacity: 0;
    }
}

@keyframes delayedRoomStep2Flash {

    0%,
    56% {
        opacity: 0.14;
        fill: url(#fovGrad);
    }

    64% {
        opacity: 0.35;
        fill: url(#fovGrad);
    }

    70% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }

    78% {
        opacity: 0.35;
        fill: url(#fovGrad);
    }

    86%,
    100% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }
}

@keyframes loopMove3 {

    0%,
    10% {
        transform: translate(250px, 550px) rotate(45deg);
        opacity: 0;
    }

    15% {
        transform: translate(250px, 550px) rotate(45deg);
        opacity: 1;
    }

    45% {
        transform: translate(250px, 250px) rotate(135deg);
        opacity: 1;
    }

    90% {
        transform: translate(250px, 250px) rotate(135deg);
        opacity: 1;
    }

    95%,
    100% {
        transform: translate(250px, 250px) rotate(135deg);
        opacity: 0;
    }
}

@keyframes loopMove4 {

    0%,
    10% {
        transform: translate(250px, 250px) rotate(135deg);
        opacity: 0;
    }

    15% {
        transform: translate(250px, 250px) rotate(135deg);
        opacity: 1;
    }

    45% {
        transform: translate(550px, 250px) rotate(225deg);
        opacity: 1;
    }

    90% {
        transform: translate(550px, 250px) rotate(225deg);
        opacity: 1;
    }

    95%,
    100% {
        transform: translate(550px, 250px) rotate(225deg);
        opacity: 0;
    }
}

/* Outdoor Capture Animation Overrides */
.anim-out-step-0 .outdoor-user-mover { animation: outdoorWalkAndTurn 8s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.anim-out-step-0 .fov-cone { animation: outFlash 4s infinite; }
.anim-out-step-0 .ret-1 { animation: oppositeStep1 8s infinite; }
.anim-out-step-0 .ret-3 { animation: oppositeStep2 8s infinite; }
.anim-out-step-0 .ret-2, .anim-out-step-0 .ret-4 { opacity: 0; }

.anim-out-step-1 .outdoor-user-mover { transform: translate(400px, 520px) rotate(0deg); }
.anim-out-step-1 .fov-cone { animation: outFlashStep 2s infinite; }
.anim-out-step-1 .ret-1 { opacity: 1; }
.anim-out-step-1 .ret-2, .anim-out-step-1 .ret-3, .anim-out-step-1 .ret-4 { opacity: 0; }

.anim-out-step-2 .outdoor-user-mover { animation: outdoorStep2MoveAndTurn 4.8s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.anim-out-step-2 .fov-cone { animation: delayedOutdoorStep2Flash 4.8s infinite; opacity: 0.2; fill: url(#outFovGrad); }
.anim-out-step-2 .ret-1, .anim-out-step-2 .ret-2, .anim-out-step-2 .ret-4 { opacity: 0; }
.anim-out-step-2 .ret-3 { opacity: 1; }

.anim-out-step-3 .outdoor-user-mover { animation: outLoopMove3 4s infinite; }
.anim-out-step-3 .fov-cone { animation: outLoopFlash 4s infinite; opacity: 0.2; fill: url(#outFovGrad); }
.anim-out-step-3 .ret-1, .anim-out-step-3 .ret-2, .anim-out-step-3 .ret-4 { opacity: 0; }
.anim-out-step-3 .ret-3 { opacity: 1; }

.anim-out-step-4 .outdoor-user-mover { animation: outLoopMove4 4s infinite; }
.anim-out-step-4 .fov-cone { animation: outLoopFlash 4s infinite; opacity: 0.2; fill: url(#outFovGrad); }
.anim-out-step-4 .ret-1, .anim-out-step-4 .ret-2, .anim-out-step-4 .ret-3 { opacity: 0; }
.anim-out-step-4 .ret-4 { opacity: 1; }

@keyframes spinCapture {
  0%, 15%   { transform: translate(400px, 400px) rotate(0deg); }
  25%, 40%  { transform: translate(400px, 400px) rotate(90deg);  }
  50%, 65%  { transform: translate(400px, 400px) rotate(180deg); }
  75%, 90%  { transform: translate(400px, 400px) rotate(270deg); }
  100%      { transform: translate(400px, 400px) rotate(360deg); }
}

@keyframes outdoorWalkAndTurn {
  0%, 30%   { transform: translate(400px, 520px) rotate(0deg); }
  45%, 55%  { transform: translate(400px, 280px) rotate(0deg); }
  65%, 90%  { transform: translate(400px, 280px) rotate(180deg); }
  100%      { transform: translate(400px, 520px) rotate(0deg); }
}

@keyframes outdoorStep2MoveAndTurn {
  0%, 10%   { transform: translate(400px, 520px) rotate(0deg); opacity: 0; }
  18%       { transform: translate(400px, 520px) rotate(0deg); opacity: 1; }
  48%       { transform: translate(400px, 280px) rotate(0deg); opacity: 1; }
  68%, 92%  { transform: translate(400px, 280px) rotate(180deg); opacity: 1; }
  100%      { transform: translate(400px, 280px) rotate(180deg); opacity: 0; }
}

@keyframes delayedOutdoorStep2Flash {
    0%, 68% { opacity: 0.14; fill: url(#outFovGrad); }
    74% { opacity: 0.35; fill: url(#outFovGrad); }
    80% { opacity: 0.2; fill: url(#outFovGrad); }
    88% { opacity: 0.35; fill: url(#outFovGrad); }
    94%, 100% { opacity: 0.2; fill: url(#outFovGrad); }
}

@keyframes outLoopMove2 {
    0%, 10% { transform: translate(400px, 400px) rotate(0deg); opacity: 0; }
    15% { transform: translate(400px, 400px) rotate(0deg); opacity: 1; }
    45% { transform: translate(400px, 400px) rotate(90deg); opacity: 1; }
    90% { transform: translate(400px, 400px) rotate(90deg); opacity: 1; }
    95%, 100% { transform: translate(400px, 400px) rotate(90deg); opacity: 0; }
}
@keyframes outLoopMove3 {
    0%, 10% { transform: translate(400px, 400px) rotate(90deg); opacity: 0; }
    15% { transform: translate(400px, 400px) rotate(90deg); opacity: 1; }
    45% { transform: translate(400px, 400px) rotate(180deg); opacity: 1; }
    90% { transform: translate(400px, 400px) rotate(180deg); opacity: 1; }
    95%, 100% { transform: translate(400px, 400px) rotate(180deg); opacity: 0; }
}
@keyframes outLoopMove4 {
    0%, 10% { transform: translate(400px, 400px) rotate(180deg); opacity: 0; }
    15% { transform: translate(400px, 400px) rotate(180deg); opacity: 1; }
    45% { transform: translate(400px, 400px) rotate(270deg); opacity: 1; }
    90% { transform: translate(400px, 400px) rotate(270deg); opacity: 1; }
    95%, 100% { transform: translate(400px, 400px) rotate(270deg); opacity: 0; }
}

@keyframes outLoopFlash {
    0%, 55% { opacity: 0.2; fill: url(#outFovGrad); }
    60% { opacity: 0.35; fill: url(#outFovGrad); }
    65% { opacity: 0.2; fill: url(#outFovGrad); }
    70% { opacity: 0.35; fill: url(#outFovGrad); }
    75%, 100% { opacity: 0.2; fill: url(#outFovGrad); }
}

@keyframes outFlashStep {
    0%, 20% { opacity: 0.2; fill: url(#outFovGrad); }
    30% { opacity: 0.35; fill: url(#outFovGrad); }
    40% { opacity: 0.2; fill: url(#outFovGrad); }
    50% { opacity: 0.35; fill: url(#outFovGrad); }
    60%, 100% { opacity: 0.2; fill: url(#outFovGrad); }
}

@keyframes outFlash {
    0%, 20% { opacity: 0.2; fill: url(#outFovGrad); }
    22% { opacity: 0.9; fill: #FFFFFF; }
    26% { opacity: 0.2; fill: url(#outFovGrad); }
    32% { opacity: 0.9; fill: #FFFFFF; }
    36%, 100% { opacity: 0.2; fill: url(#outFovGrad); }
}

@keyframes loopFlash {

    0%,
    55% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }

    60% {
        opacity: 0.9;
        fill: #FFFFFF;
    }

    65% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }

    70% {
        opacity: 0.9;
        fill: #FFFFFF;
    }

    75%,
    100% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }
}

@keyframes flashStep {

    0%,
    20% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }

    30% {
        opacity: 0.9;
        fill: #FFFFFF;
    }

    40% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }

    50% {
        opacity: 0.9;
        fill: #FFFFFF;
    }

    60%,
    100% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }
}

@keyframes perimeterWalk {

    0%,
    15% {
        transform: translate(550px, 550px) rotate(-45deg);
    }

    25%,
    40% {
        transform: translate(250px, 550px) rotate(45deg);
    }

    50%,
    65% {
        transform: translate(250px, 250px) rotate(135deg);
    }

    75%,
    90% {
        transform: translate(550px, 250px) rotate(225deg);
    }

    100% {
        transform: translate(550px, 550px) rotate(315deg);
    }
}

@keyframes oppositeCornerWalk {

    0%,
    35% {
        transform: translate(550px, 550px) rotate(-45deg);
    }

    50%,
    85% {
        transform: translate(250px, 250px) rotate(135deg);
    }

    100% {
        transform: translate(550px, 550px) rotate(315deg);
    }
}

@keyframes oppositeStep1 {

    0%,
    35% {
        opacity: 1;
    }

    45%,
    90% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes oppositeStep2 {

    0%,
    45% {
        opacity: 0;
    }

    50%,
    85% {
        opacity: 1;
    }

    95%,
    100% {
        opacity: 0;
    }
}

@keyframes flash {

    0%,
    20% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }

    22% {
        opacity: 0.9;
        fill: #FFFFFF;
    }

    26% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }

    32% {
        opacity: 0.9;
        fill: #FFFFFF;
    }

    36%,
    100% {
        opacity: 0.2;
        fill: url(#fovGrad);
    }
}

@keyframes step1 {

    0%,
    15% {
        opacity: 1;
    }

    20%,
    95% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes step2 {

    0%,
    20% {
        opacity: 0;
    }

    25%,
    40% {
        opacity: 1;
    }

    45%,
    100% {
        opacity: 0;
    }
}

@keyframes step3 {

    0%,
    45% {
        opacity: 0;
    }

    50%,
    65% {
        opacity: 1;
    }

    70%,
    100% {
        opacity: 0;
    }
}

@keyframes step4 {

    0%,
    70% {
        opacity: 0;
    }

    75%,
    90% {
        opacity: 1;
    }

    95%,
    100% {
        opacity: 0;
    }
}

.app-generation-overlay {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    background: rgba(255, 248, 247, 0.9);
    box-shadow: 0 14px 32px rgba(62, 47, 45, 0.18);
    backdrop-filter: blur(18px);
    pointer-events: none;
}

.app-generation-error {
    background: rgba(255, 251, 255, 0.94);
    border-color: rgba(255, 218, 213, 0.95);
}

.app-generation-loader {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    color: #854b45;
    background: #ffdad5;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    animation: generationContainerPulse 1.8s ease-in-out infinite;
}

.app-generation-loader::before {
    content: "";
    position: absolute;
    inset: -55%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(133, 75, 69, 0.08) 80deg, rgba(133, 75, 69, 0.42) 130deg, transparent 180deg);
    animation: generationSweep 1.15s linear infinite;
}

.app-generation-loader span {
    position: relative;
    z-index: 1;
    font-size: 28px;
    font-variation-settings: 'FILL' 1, 'wght' 500;
}

.app-detail-generation-status {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: left;
    background: rgba(255, 248, 247, 0.82);
    backdrop-filter: blur(16px);
}

.app-detail-generation-error {
    background: rgba(255, 251, 255, 0.88);
}

@keyframes generationSweep {
    to {
        transform: rotate(360deg);
    }
}

@keyframes generationContainerPulse {
    0%,
    100% {
        border-radius: 18px;
        transform: scale(1);
    }

    50% {
        border-radius: 26px;
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-generation-loader,
    .app-generation-loader::before {
        animation: none;
    }
}
