/* Solhaus media viewers, kit 1 (S10, 15 Nov 2026). Every rule is scoped under .shm-*; the page sets the size of each
   [data-shm] container (default: full width, 16:9, 320 px minimum). Override the custom properties on .shm-frame to theme it. */
.shm-frame {
  --shm-accent: #2c6e6a; --shm-accent-ink: #ffffff; --shm-ink: #1b242b; --shm-ink-soft: #55636d; --shm-glass: rgba(250, 252, 253, 0.8);
  --shm-glass-strong: rgba(250, 252, 253, 0.94); --shm-line: rgba(27, 36, 43, 0.14); --shm-dark: #141412; --shm-dark-ink: #f4f0e6;
  --shm-dark-mute: rgba(244, 240, 230, 0.72); --shm-dark-panel: rgba(20, 20, 18, 0.78); --shm-dark-line: rgba(255, 255, 255, 0.22); --shm-gold: #d9b26f;
  --shm-sky: #c4d6e4; --shm-radius: 14px;
  --shm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  position: relative; display: flex; flex-direction: column; width: 100%; aspect-ratio: 16 / 9; min-height: 320px; max-height: 88vh;
  border-radius: var(--shm-radius); overflow: hidden; background: var(--shm-sky); color: var(--shm-ink); font: 14px/1.4 var(--shm-font); isolation: isolate;
}
.shm-frame *, .shm-frame *::before, .shm-frame *::after { box-sizing: border-box; }
.shm-frame [hidden] { display: none !important; }
.shm-frame button, .shm-frame select { font: inherit; }
.shm-frame :focus-visible { outline: 2px solid var(--shm-accent); outline-offset: 2px; }

/* card before opening */
.shm-launch { position: relative; flex: 1; display: grid; place-items: end start; background: linear-gradient(160deg, #9fbfdb, #e4edf3); }
.shm-poster { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.shm-launch-cap { position: relative; margin: 16px; padding: 12px 14px 12px 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--shm-glass); border: 1px solid var(--shm-line); border-radius: 12px; -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.shm-launch-title { font-size: 16px; font-weight: 600; }
.shm-open-btn { border: 0; border-radius: 10px; padding: 10px 16px; background: var(--shm-accent); color: var(--shm-accent-ink); font-weight: 600; cursor: pointer; }

/* open: bar + stage */
.shm-bar { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 14px; background: var(--shm-glass-strong); border-bottom: 1px solid var(--shm-line); flex: none; min-width: 0; }
.shm-bar-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.shm-sp { flex: 1; }
.shm-switch { display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(27, 36, 43, 0.06); flex: none; }
.shm-switch-btn { border: 0; border-radius: 8px; padding: 7px 11px; background: transparent; color: var(--shm-ink); font-weight: 500; cursor: pointer; white-space: nowrap; }
.shm-switch-btn[aria-pressed="true"] { background: var(--shm-accent); color: var(--shm-accent-ink); }
.shm-icon-btn { width: 36px; height: 36px; border: 1px solid var(--shm-line); border-radius: 9px; background: transparent; color: var(--shm-ink); cursor: pointer; font-size: 18px; line-height: 1; flex: none; }
.shm-icon-btn:hover { background: rgba(27, 36, 43, 0.06); }
.shm-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.shm-root { position: absolute; inset: 0; overflow: hidden; }
.shm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.shm-grab { cursor: grab; } .shm-grab:active, .shm-dragging { cursor: grabbing; }

/* full screen, and the window-covering fallback (iPhone) */
.shm-frame:fullscreen { aspect-ratio: auto; max-height: none; min-height: 0; width: 100%; height: 100%; border-radius: 0; }
.shm-frame.shm-max { position: fixed; inset: 0; z-index: 2147483000; aspect-ratio: auto; max-height: none; min-height: 0; width: auto; height: auto; border-radius: 0;
  padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
html.shm-noscroll, html.shm-noscroll body { overflow: hidden; }

/* loading */
.shm-loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; pointer-events: none; }
.shm-loading-card { background: var(--shm-glass-strong); border: 1px solid var(--shm-line); border-radius: 14px; padding: 16px 18px; width: min(300px, calc(100% - 32px)); color: var(--shm-ink); }
.shm-loading-text { margin: 0 0 12px; font-size: 13px; color: var(--shm-ink-soft); }
.shm-failed .shm-loading-text { margin: 0; color: #9b2b1e; }
.shm-track { height: 6px; border-radius: 3px; background: rgba(27, 36, 43, 0.12); overflow: hidden; }
.shm-fill { height: 100%; width: 0; background: var(--shm-accent); transition: width 0.2s; }

/* view buttons, gauge, credit, labels (site model and splat) */
.shm-views { position: absolute; left: 10px; right: 10px; bottom: 18px; z-index: 3; padding: 5px; background: var(--shm-glass); border: 1px solid var(--shm-line); border-radius: 12px;
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); }
.shm-views-top { top: 10px; bottom: auto; right: auto; max-width: calc(100% - 20px); }
.shm-views-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; }
.shm-chip { border: 1px solid transparent; border-radius: 9px; padding: 8px 10px; background: transparent; color: var(--shm-ink); white-space: nowrap; cursor: pointer; font-weight: 500; font-size: 13px; }
.shm-chip:hover { background: rgba(27, 36, 43, 0.06); }
.shm-chip[aria-pressed="true"] { background: var(--shm-accent); color: var(--shm-accent-ink); }
.shm-gauge { position: absolute; right: 10px; bottom: 76px; z-index: 3; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--shm-glass); border: 1px solid var(--shm-line); border-radius: 12px; }
.shm-north { width: 30px; height: 30px; flex: none; } .shm-needle-n { fill: #1b242b; } .shm-needle-s { fill: #9aa6ae; }
.shm-scale { display: grid; gap: 3px; font-size: 11px; color: var(--shm-ink-soft); font-variant-numeric: tabular-nums; }
.shm-scale-bar { height: 5px; width: 80px; border: 1.5px solid var(--shm-ink); border-top: none; }
.shm-credit { position: absolute; right: 10px; bottom: 2px; z-index: 3; font-size: 10px; line-height: 14px; color: var(--shm-ink-soft);
  text-shadow: 0 0 3px rgba(255, 255, 255, 0.95), 0 0 1px rgba(255, 255, 255, 0.95); }
.shm-credit a { color: inherit; }
.shm-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.shm-lbl { position: absolute; transform: translate(-50%, -100%); font-weight: 600; font-size: 12px; line-height: 1.2; color: var(--shm-accent-ink); background: var(--shm-accent); border-radius: 7px; padding: 5px 8px; white-space: nowrap; }
.shm-lbl::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 1px; height: 6px; background: var(--shm-ink); opacity: 0.5; }
.shm-lbl-street { background: transparent; color: var(--shm-ink); font-weight: 500; font-style: italic; text-shadow: 0 0 4px #fff, 0 0 2px #fff; padding: 0; }
.shm-lbl-street::after { display: none; }
.shm-splat { background: linear-gradient(180deg, #9fbfdb, #e4edf3 70%); }
.shm-site { background: var(--shm-sky); }

/* 360 tour: one dark look on purpose (the controls sit on photographs) */
.shm-tour { background: var(--shm-dark); color: var(--shm-dark-ink); -webkit-user-select: none; user-select: none; outline: none; }
.shm-tour button, .shm-tour select { color: var(--shm-dark-ink); background: var(--shm-dark-panel); border: 1px solid var(--shm-dark-line); border-radius: 8px; padding: 6px 10px; min-height: 34px; cursor: pointer; }
.shm-tour button:hover { border-color: var(--shm-gold); }
.shm-tour-top { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 8px; pointer-events: none; z-index: 3; }
.shm-tour-top > * { pointer-events: auto; } .shm-select { max-width: 60%; }
.shm-spots { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.shm-tour .shm-spot { position: absolute; left: 0; top: 0; pointer-events: auto; white-space: nowrap; padding: 6px 12px; min-height: 0; border-radius: 999px; background: rgba(20, 20, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.6); font-weight: 600; font-size: 13px; line-height: 1.25; will-change: transform; }
.shm-spot small { display: block; font-weight: 500; font-size: 11px; color: var(--shm-dark-mute); text-align: center; }
.shm-tour .shm-spot:hover, .shm-tour .shm-spot.shm-hot { background: var(--shm-gold); color: #1b1b19; border-color: var(--shm-gold); }
.shm-spot:hover small, .shm-spot.shm-hot small { color: #1b1b19; }
.shm-edge { position: absolute; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; pointer-events: none; max-width: 44%; z-index: 3; }
.shm-edge-l { left: 10px; align-items: flex-start; } .shm-edge-r { right: 10px; align-items: flex-end; }
.shm-tour .shm-edge button { pointer-events: auto; border-radius: 999px; padding: 5px 10px; min-height: 0; font-size: 12.5px; font-weight: 600; background: rgba(20, 20, 18, 0.62); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shm-msg { position: absolute; left: 50%; top: 54px; transform: translateX(-50%); z-index: 4; background: var(--shm-dark-panel); border: 1px solid var(--shm-dark-line); border-radius: 999px; padding: 6px 14px; font-size: 13px; pointer-events: none; max-width: 86%; text-align: center; }
.shm-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 4; background: rgba(20, 20, 18, 0.72); border: 1px solid var(--shm-dark-line); border-radius: 999px; padding: 9px 18px; font-size: 14px; pointer-events: none; transition: opacity 0.6s; text-align: center; max-width: 80%; }
.shm-hint.shm-off { opacity: 0; }
.shm-tour-bot { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 26px 10px 10px; background: linear-gradient(transparent, rgba(20, 20, 18, 0.82) 58%); pointer-events: none; display: flex; flex-direction: column; gap: 6px; }
.shm-tour-bar { display: flex; align-items: center; gap: 10px; } .shm-tour-bar > * { pointer-events: auto; }
.shm-where { min-width: 0; display: flex; flex-direction: column; pointer-events: none; }
.shm-room-name { font-size: 17px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shm-room-sub { font-size: 12px; color: var(--shm-dark-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.shm-q { font-size: 11px; letter-spacing: 0.06em; padding: 3px 7px; border: 1px solid var(--shm-dark-line); border-radius: 999px; color: var(--shm-dark-mute); pointer-events: none; white-space: nowrap; }
.shm-q.shm-hd { color: var(--shm-gold); border-color: var(--shm-gold); }
.shm-tour .shm-step { width: 38px; padding: 0; font-size: 20px; line-height: 1; }
.shm-note { margin: 0; font-size: 11px; color: var(--shm-dark-mute); pointer-events: none; }
.shm-map { position: absolute; right: 10px; bottom: 76px; z-index: 3; width: 172px; background: var(--shm-dark-panel); border: 1px solid var(--shm-dark-line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.shm-map.shm-map-small { width: 132px; padding: 6px; }
.shm-map-head { display: flex; gap: 4px; align-items: center; } .shm-lvs { display: flex; gap: 3px; }
.shm-tour .shm-lvb, .shm-tour .shm-x { min-height: 26px; padding: 2px 7px; font-size: 12px; font-weight: 600; border-radius: 6px; }
.shm-tour .shm-lvb.shm-on { border-color: var(--shm-gold); color: var(--shm-gold); }
.shm-plan { width: 100%; height: auto; max-height: 40vh; display: block; }
.shm-pfl { fill: rgba(255, 255, 255, 0.07); } .shm-pw { fill: var(--shm-dark-ink); } .shm-pln { stroke: var(--shm-dark-ink); stroke-width: 0.05; }
.shm-pg { fill: #8fc7e8; } .shm-pgd { fill: #8fc7e8; opacity: 0.7; } .shm-pd { fill: var(--shm-gold); opacity: 0.75; }
.shm-pf { fill: rgba(255, 255, 255, 0.05); stroke: rgba(255, 255, 255, 0.3); stroke-width: 0.025; } .shm-pl { fill: none; stroke: rgba(255, 255, 255, 0.26); stroke-width: 0.025; }
.shm-ps { fill: rgba(255, 255, 255, 0.04); stroke: rgba(255, 255, 255, 0.34); stroke-width: 0.025; } .shm-pt { stroke: rgba(255, 255, 255, 0.3); stroke-width: 0.025; }
.shm-dot { fill: var(--shm-dark); stroke: var(--shm-dark-ink); stroke-width: 0.06; cursor: pointer; } .shm-hit { fill: transparent; cursor: pointer; }
.shm-pt-room:hover .shm-dot { fill: var(--shm-gold); stroke: var(--shm-gold); }
.shm-cone { fill: var(--shm-gold); opacity: 0.38; } .shm-me { fill: var(--shm-gold); stroke: var(--shm-dark); stroke-width: 0.06; }
.shm-pn { fill: var(--shm-dark-mute); font: 600 0.42px var(--shm-font); }

.shm-wheel-tip { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; pointer-events: none; padding: 8px 14px; border-radius: 999px;
  background: rgba(20, 20, 18, 0.74); color: #fff; font-size: 13px; white-space: nowrap; }

/* films */
.shm-video { background: #000; display: flex; }
.shm-film { width: 100%; height: 100%; object-fit: contain; background: #000; }

@media (max-width: 560px) {
  .shm-frame { aspect-ratio: 3 / 4; }
  .shm-bar-title { display: none; }
  .shm-gauge { bottom: 74px; padding: 6px 8px; } .shm-north { width: 24px; height: 24px; }
  .shm-map { width: 128px; bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) { .shm-fill, .shm-hint { transition: none; } }
