.pht360,.pht360-admin{--pht360-accent:#9d2532;box-sizing:border-box;font-family:inherit}
.pht360 *,.pht360-admin *{box-sizing:border-box}
.pht360{max-width:100%;margin:1.5rem 0;background:#182126;color:#fff;border-radius:12px;overflow:hidden}
.pht360-view{height:var(--pht360-height,560px);min-height:220px;width:100%;position:relative;color:#222}
.pht360-toolbar{display:flex;gap:8px;flex-wrap:wrap;padding:12px}
.pht360 .pht360-button,.pht360-admin .pht360-button{font:inherit;font-size:14px;line-height:1.4;background:#fff;color:#222;border:1px solid #bac4c9;border-radius:6px;padding:8px 12px;cursor:pointer;box-shadow:none;text-shadow:none;text-transform:none;height:auto}
.pht360 .pht360-button[aria-pressed=true],.pht360 .pht360-button[aria-current=true],.pht360-admin .pht360-button[aria-pressed=true]{background:var(--pht360-accent);color:#fff;border-color:var(--pht360-accent)}
.pht360 button:focus-visible,.pht360 a:focus-visible,.pht360-view:focus-visible,.pht360-admin button:focus-visible{outline:3px solid #edbc48;outline-offset:3px}
.pht360-status{padding:0 12px 12px!important;margin:0!important;font-size:14px;color:inherit}
.pht360-scenes{display:flex;align-items:stretch;gap:10px;padding:0 12px 12px;overflow-x:auto}
.pht360-scenes .pht360-button{flex:0 0 136px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;align-self:stretch;min-width:0;padding:4px;white-space:normal;overflow-wrap:anywhere}
.pht360-scenes img{display:block;width:100%;height:64px;flex:0 0 64px;margin:0;object-fit:cover;border-radius:3px}
.pht360-scenes span{display:block;padding:5px}
.pht360-hotspot{width:42px;height:42px}
.pht360 .pht360-marker{display:grid;place-items:center;width:42px;height:42px;border:2px solid white;border-radius:50%;background:var(--pht360-accent);color:#fff;box-shadow:0 2px 10px #0007;font:700 22px/1 sans-serif;text-decoration:none;cursor:pointer;padding:0;text-shadow:none}
.pht360-dialog{max-width:min(680px,92vw);max-height:85vh;width:680px;padding:20px;border:0;border-radius:12px;background:white;color:#222;overflow:auto}
.pht360-dialog::backdrop{background:#000a}
.pht360-dialog h3{color:#222;font-size:24px;margin:20px 0 12px}
.pht360-dialog img,.pht360-dialog video{display:block;max-width:100%;max-height:60vh;margin:12px auto}
.pht360-dialog audio{width:100%}
.pht360-body{white-space:pre-wrap;overflow-wrap:anywhere}
.pht360:fullscreen{width:100%!important;height:100%;border-radius:0;margin:0;display:flex;flex-direction:column}
.pht360:fullscreen .pht360-view{flex:1;min-height:0;height:auto}
.pht360:fullscreen .pht360-scenes{flex-shrink:0}
.pht360-admin{color:#1d2327}
.pht360-admin .pht360-admin-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0}
.pht360-admin-grid{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:16px}
.pht360-admin-view{height:420px;background:#182126;border-radius:8px;overflow:hidden;position:relative;color:white}
.pht360-admin-view>p{padding:20px}
.pht360-admin label{display:block;font-weight:600;margin:10px 0}
.pht360-admin label input:not([type=checkbox]),.pht360-admin label select,.pht360-admin label textarea{display:block;width:100%;margin-top:5px;font-weight:400}
.pht360-admin textarea{min-height:100px}
.pht360-admin-settings{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:0 16px;padding:12px;background:#f0f3f4;border-radius:8px;margin-top:16px}
.pht360-admin-point{display:flex;gap:6px;align-items:center;border-bottom:1px solid #ddd;padding:8px 0}
.pht360-admin-point>button:first-child{flex:1;text-align:left}
.pht360-admin-message{min-height:1.5em;padding:8px 0;font-weight:600}
.pht360-editor-marker{display:grid;place-items:center;border:2px solid white;background:#9d2532;color:white;width:30px;height:30px;border-radius:50%;font:600 14px sans-serif;cursor:pointer}
.pht360-admin .pht360-selected{outline:3px solid #edbc48}
@media(max-width:1000px){.pht360-admin-grid{grid-template-columns:1fr}.pht360-admin-view{height:350px}}
@media(max-width:600px){.pht360-toolbar{gap:6px}.pht360-toolbar .pht360-button{font-size:12px;padding:9px}.pht360-scenes .pht360-button{flex-basis:112px}}
/* Version 1.1: color contrast, collapsible controls and mobile fullscreen. */
.pht360{position:relative;background:var(--pht360-background,#182126);color:var(--pht360-background-text,#fff)}
.pht360 .pht360-button{background:var(--pht360-button,#fff);color:var(--pht360-button-text,#000);border-color:var(--pht360-border,#bac4c9)}
.pht360 .pht360-button[aria-pressed=true],.pht360 .pht360-button[aria-current=true],.pht360-admin .pht360-button[aria-pressed=true]{color:var(--pht360-accent-text,#fff)}
.pht360 .pht360-marker,.pht360-editor-marker{background:var(--pht360-accent,#9d2532);color:var(--pht360-accent-text,#fff);border-color:var(--pht360-border,#bac4c9)}
.pht360-dialog{background:var(--pht360-dialog,#fff);color:var(--pht360-dialog-text,#000)}
.pht360-dialog h3{color:inherit}
.pht360 .pht360-toggle,.pht360 .pht360-exit-fullscreen{position:absolute;top:10px;right:10px;z-index:5;display:grid;place-items:center;width:36px;height:36px;padding:0;border:1px solid var(--pht360-border,#bac4c9);border-radius:6px;background:var(--pht360-button,#fff);color:var(--pht360-button-text,#000);font:20px/1 sans-serif;cursor:pointer;box-shadow:0 1px 6px #0004;text-shadow:none}
.pht360 .pht360-exit-fullscreen{right:54px}
.pht360 [hidden]{display:none!important}
.pht360-panel{flex-shrink:0;max-height:45%;overflow:auto}
.pht360-tooltip{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);width:max-content;max-width:180px;padding:6px 9px;border-radius:5px;background:var(--pht360-background,#182126);color:var(--pht360-background-text,#fff);font:14px/1.4 sans-serif;white-space:normal;overflow-wrap:anywhere;pointer-events:none;visibility:hidden}
.pht360-hotspot:hover .pht360-tooltip,.pht360-hotspot:focus-within .pht360-tooltip{visibility:visible}
.pht360-hotspot:hover,.pht360-hotspot:focus-within{z-index:3}
.pht360-expanded{width:100%!important;max-width:none!important;height:100%!important;margin:0!important;border-radius:0;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}
.pht360-expanded .pht360-view{flex:1;min-height:0;height:auto}
.pht360-fullscreen-shell{position:fixed;inset:0;width:100vw;max-width:none;height:100vh;height:100dvh;max-height:none;margin:0;padding:0;border:0;overflow:hidden;background:#182126}
.pht360-fullscreen-shell::backdrop{background:#000}
.pht360-bulk-zoom{padding:12px;margin-top:16px;border:1px solid #bac4c9;border-radius:8px}
.pht360-bulk-zoom input{max-width:200px}

/* 1.1.1: quiet, bottom-right controls anchored to the panorama. */
.pht360-stage{position:relative;height:var(--pht360-height,560px);min-height:220px;width:100%}
.pht360 .pht360-stage .pht360-view{position:absolute;inset:0;height:100%;min-height:0}
.pht360-expanded .pht360-stage{flex:1;min-height:0;height:auto}
.pht360 .pht360-toggle,.pht360 .pht360-exit-fullscreen{top:auto;bottom:12px;right:12px;width:36px;height:36px;border:0;border-radius:50%;box-shadow:none;background:var(--pht360-button,#fff);opacity:.82;transition:opacity .15s}
.pht360 .pht360-exit-fullscreen{right:56px;font-weight:300}
.pht360 .pht360-toggle:hover,.pht360 .pht360-toggle:focus-visible,.pht360 .pht360-exit-fullscreen:hover,.pht360 .pht360-exit-fullscreen:focus-visible{opacity:1}
.pht360-chevron{display:block;width:8px;height:8px;border-top:1.5px solid currentColor;border-right:1.5px solid currentColor;transform:translateY(-2px) rotate(135deg);pointer-events:none}
.pht360-toggle[aria-expanded=true] .pht360-chevron{transform:translateY(2px) rotate(-45deg)}
@media(pointer:coarse){.pht360 .pht360-toggle,.pht360 .pht360-exit-fullscreen{width:44px;height:44px}.pht360 .pht360-exit-fullscreen{right:64px}}
@media(prefers-reduced-motion:reduce){.pht360 .pht360-toggle,.pht360 .pht360-exit-fullscreen{transition:none}}

/* Audit: independent keyboard route, reliable focus and opaque controls. */
.pht360-sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
.pht360 .pht360-toggle,.pht360 .pht360-exit-fullscreen{opacity:1}
.pht360 :is(button,a,summary,[tabindex]):focus-visible,.pht360-admin :is(button,input,select,textarea,[tabindex]):focus-visible{outline:3px solid #fff;outline-offset:2px;box-shadow:0 0 0 5px #000!important}
.pht360 .pht360-pause{position:absolute;bottom:12px;left:12px;z-index:5;width:44px;height:44px;border-radius:50%;background:var(--pht360-button,#fff);color:var(--pht360-button-text,#000);border:1px solid currentColor;cursor:pointer;display:grid;place-items:center;padding:0;margin:0;min-width:44px;min-height:44px;line-height:1;box-shadow:none;text-shadow:none;appearance:none}
.pht360-alternative{padding:12px;flex-shrink:0}
.pht360-expanded .pht360-alternative{max-height:35%;overflow:auto}
.pht360-alternative summary{cursor:pointer;padding:8px;min-height:44px}
.pht360-alternative h3{color:inherit;font-size:1.15em}
.pht360-alternative .pht360-button{display:inline-block;margin:4px;white-space:normal;text-decoration:underline}
.pht360 .pht360-button{min-height:44px}
.pht360-tooltip{pointer-events:auto}
@media(forced-colors:active){.pht360 :is(button,a,summary,[tabindex]):focus-visible{outline:3px solid Highlight}.pht360 .pht360-marker{border:2px solid ButtonText}}

.pht360-hide-tooltip .pht360-tooltip{visibility:hidden!important}

.pht360-tooltip::after{content:"";position:absolute;top:100%;left:0;width:100%;height:8px}

.pht360-arrow-icon{display:block;width:24px;height:24px;flex-shrink:0;pointer-events:none}
.pht360-editor-marker .pht360-arrow-icon{width:20px;height:20px}

.pht360-pause-icon{display:block;width:10px;height:14px;border-left:2px solid currentColor;border-right:2px solid currentColor;pointer-events:none}

.pht360-paused .pht360-pause-icon{width:0;height:0;border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:11px solid currentColor;border-right:0;transform:translateX(1px)}
