.panorama-widget { width:100%; min-width:0; margin:28px auto 40px; color:#1a1a1a; }
.panorama-widget *, .panorama-widget *::before, .panorama-widget *::after { box-sizing:border-box; }
.panorama-widget [hidden] { display:none !important; }
.pano-scene-list { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:22px; }
.pano-scene-list button { min-height:44px; padding:10px 14px; border:1px solid #d3d3d3; border-radius:7px; background:#fff; color:#555; font:inherit; font-size:13px; cursor:pointer; }
.pano-scene-list button[aria-pressed="true"] { background:#1b1b1b; color:#fff; border-color:#1b1b1b; }
.pano-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 0 14px; text-align:left; }
.pano-heading h2 { font-size:20px; font-weight:600; line-height:1.5; margin:0; }
.pano-count { white-space:nowrap; color:#777; font-size:13px; }
.panorama-container { width:100%; height:clamp(340px, 49vw, 620px); position:relative; background:#202020; border-radius:16px; overflow:hidden; isolation:isolate; }
.pano-canvas, .pano-preview { position:absolute; inset:0; width:100%; height:100%; }
.pano-preview { object-fit:cover; }
.pano-canvas { touch-action:none; }
.pano-overlay { position:absolute; inset:0; z-index:3; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:16px; padding:24px; background:rgba(0,0,0,.36); color:#fff; text-align:center; }
.pano-start { min-height:52px; padding:14px 24px; border:1px solid rgba(255,255,255,.75); background:rgba(0,0,0,.78); color:#fff; font:inherit; font-size:18px; border-radius:28px; cursor:pointer; }
.pano-start:disabled { opacity:.65; cursor:wait; }
.pano-message { font-size:14px; line-height:1.6; max-width:440px; }
.pano-toolbar { position:absolute; z-index:4; bottom:max(16px,env(safe-area-inset-bottom)); right:max(16px,env(safe-area-inset-right)); left:16px; display:flex; justify-content:flex-end; gap:8px; pointer-events:none; }
.pano-btn { pointer-events:auto; min-width:44px; height:44px; flex-shrink:0; padding:0 10px; border:1px solid rgba(255,255,255,.5); border-radius:8px; background:rgba(0,0,0,.8); color:#fff; font-family:Arial,sans-serif; font-size:25px; line-height:1; cursor:pointer; }
.pano-btn[aria-pressed="true"] { background:#fff; color:#111; }
.pano-close { font-family:inherit; font-size:13px; }
.pano-hint { position:absolute; top:max(16px,env(safe-area-inset-top)); left:16px; right:16px; z-index:3; margin:0; padding:10px; border-radius:8px; background:rgba(0,0,0,.62); color:#fff; font-size:13px; text-align:center; pointer-events:none; }
.pano-navigation { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:14px; }
.pano-navigation button { min-height:44px; border:1px solid #ddd; background:#fff; color:#333; padding:10px 14px; border-radius:7px; font:inherit; font-size:13px; cursor:pointer; }
.pano-navigation p { font-size:11px; letter-spacing:2px; color:#888; }
.panorama-widget button:focus-visible, .pano-canvas:focus-visible { outline:3px solid #f7b74c; outline-offset:-3px; }
.panorama-container:fullscreen { width:100vw; height:100vh; height:100dvh; border-radius:0; }
.panorama-container:-webkit-full-screen { width:100vw; height:100vh; border-radius:0; }
/* ---------------------------------------------------------------------------
   Phones
   Scene names run to three or four words in most languages, so a row of named
   buttons either overflows or shreds into stacked blocks. The heading already
   names the scene being shown, so the list collapses to a dot pager sitting
   between the two arrows, and the whole widget reads as one carousel.
   --------------------------------------------------------------------------- */
@media (max-width:767px) {
    .panorama-widget {
        margin:20px 0 32px;
        display:grid;
        grid-template-columns:44px 1fr 44px;
        grid-template-areas:"head head head" "stage stage stage" "prev dots next";
        align-items:center;
        gap:12px 10px;
    }
    .pano-heading { grid-area:head; flex-wrap:wrap; gap:4px 12px; margin:0; }
    .pano-heading h2 { font-size:16px; line-height:1.45; }
    .panorama-container { grid-area:stage; height:clamp(280px, 54svh, 420px); border-radius:12px; }

    .pano-scene-list { grid-area:dots; display:flex; flex-wrap:wrap; justify-content:center; gap:9px; margin:0; }
    .pano-scene-list button {
        position:relative; width:9px; height:9px; min-height:0; flex:0 0 auto;
        padding:0; border:0; border-radius:50%; background:#cfcfcf;
        font-size:0; line-height:0; overflow:hidden; transition:width .2s, background .2s;
    }
    /* The dot stays small; the touch target does not. */
    .pano-scene-list button::after { content:""; position:absolute; inset:-18px -7px; }
    .pano-scene-list button[aria-pressed="true"] { width:24px; border-radius:5px; background:#1b1b1b; }

    .pano-navigation { display:contents; }
    .pano-navigation p { display:none; }
    .pano-navigation .pano-prev { grid-area:prev; }
    .pano-navigation .pano-next { grid-area:next; }
    .pano-navigation button {
        position:relative; width:44px; height:44px; padding:0;
        border-radius:50%; font-size:0; line-height:0; overflow:hidden;
    }
    .pano-navigation button::before {
        position:absolute; inset:0; display:grid; place-items:center;
        font-family:Arial, sans-serif; font-size:26px; line-height:1; color:#333;
    }
    .pano-prev::before { content:"\2039"; }
    .pano-next::before { content:"\203A"; }

    .pano-toolbar { left:8px; right:8px; bottom:12px; gap:5px; }
    .pano-hint { font-size:12px; left:8px; right:8px; }
    .pano-start { font-size:16px; min-height:48px; padding:12px 20px; }
    .pano-message { font-size:13px; }
}
@media (max-width:767px) and (prefers-reduced-motion:reduce) {
    .pano-scene-list button { transition:none; }
}
