@font-face {
    font-family: 'Marcellus';
    src: url('../fonts/marcellus.woff2') format('woff2');
    font-weight: 400; font-style: normal; font-display: swap;
  }
  :root {
    /* palette carried over from the existing Shield theme */
    --navy:       #16243E;
    --navy-deep:  #101C33;
    --brand:      #268DEE;
    --brand-glow: #7CBBFF;
    --cream:      #FFF8F2;
    --ink:        #16243E;
    --ink-soft:   #6C6E76;
    --line-light: #E4DCD2;

    --sky-deep:   #16243E;
    --warm:       #FFC876;
    --text:       #FFFFFF;
    --muted:      #A9B7CE;
    --glass:      rgba(22, 36, 62, .42);
    --glass-hi:   rgba(255, 255, 255, .14);
    --glass-line: rgba(255, 255, 255, .22);
    --serif: 'Marcellus', 'Palatino', 'Georgia', serif;
    --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }
  html { scroll-behavior: smooth; }
  body { overflow-x: hidden; }
  .stage {
    position: relative; width: 100%; height: 100svh; color: var(--text);
    font-family: var(--sans); -webkit-font-smoothing: antialiased;
    min-height: 560px; max-height: 1080px;
    overflow: hidden; background: var(--sky-deep);
  }

  /* ---------- photo mode ---------- */
  .photo-wrap { position: absolute; inset: 0; overflow: hidden; }
  .photo-wrap[hidden] { display: none; }
  .bg-photo {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    /* top-anchored: any strip left visible above the photo is the sky end of the
       frame, not the vertical middle (which would smear the house across it) */
    object-position: 50% 0%;
    filter: blur(30px) saturate(1.1) brightness(.88); transform: scale(1.12);
    transition: filter 2.4s ease;
  }
  .layerimg { opacity: 0; transition: opacity 1.6s linear; }
  .layerimg.on { opacity: 1; }
  .layerimg.room { transition: opacity 1.2s ease; }
  .hs-layer { transition: opacity .8s ease; }
  body.touring .hs-layer, body.scening .hs-layer { opacity: 0; pointer-events: none; }
  .scene-toast {
    position: absolute; z-index: 45; left: 50%; transform: translateX(-50%) translateY(8px);
    bottom: clamp(84px, 12vh, 116px); width: max-content; max-width: calc(100vw - 40px);
    display: flex; align-items: center; justify-content: center; gap: 11px; text-align: center;
    font: 600 15px/1.45 var(--sans); letter-spacing: .04em; color: var(--text);
    padding: 14px 24px; border-radius: 999px; pointer-events: none;
    opacity: 0; transition: opacity .45s ease, transform .45s cubic-bezier(.16,1,.3,1);
  }
  .scene-toast::before {
    content: ''; display: none; width: 9px; height: 9px; flex: none; border-radius: 50%;
    background: var(--brand-glow); box-shadow: 0 0 9px var(--brand-glow);
    animation: pulse 1.15s ease-in-out infinite;
  }
  .scene-toast.running::before { display: block; }
  .toast-txt { display: flex; flex-direction: column; align-items: center; gap: 5px; }
  .toast-title {
    font: 600 10.5px/1.2 var(--sans); letter-spacing: .22em; text-transform: uppercase;
    color: var(--brand-glow);
  }
  .toast-title:empty, .toast-cap:empty { display: none; }
  .toast-cap { font: 600 15px/1.4 var(--sans); letter-spacing: .03em; }
  .scene-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  body.nightmode .bg-photo { filter: blur(26px) saturate(.9) brightness(.26); }  .glow {
    position: absolute; transform: translate(-50%, -50%); border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,188,108,.85), rgba(255,188,108,0));
    opacity: 0; transition: opacity 2.4s ease; mix-blend-mode: screen;
  }
  body.nightmode .glow { opacity: var(--go, .6); }
  .scenes {
    position: absolute; z-index: 30; left: clamp(20px, 4vw, 56px);
    bottom: calc(clamp(20px, 5vh, 44px) + 50px);
    display: flex; gap: 4px; padding: 4px; border-radius: 999px;
  }
  .tourbtn {
    position: absolute; z-index: 30; left: clamp(20px, 4vw, 56px);
    bottom: calc(clamp(20px, 5vh, 44px) + 100px);
    display: flex; align-items: center; gap: 9px; cursor: pointer;
    font: 600 12.5px/1 var(--sans); letter-spacing: .05em; color: var(--text);
    padding: 13px 20px; border-radius: 999px;
    transition: background .25s, border-color .25s;
  }
    .tourbtn:hover {
    background: linear-gradient(168deg, rgba(44,71,114,.62) 0%, rgba(30,51,85,.62) 100%);
    border-color: rgba(232,182,120,.5);
  }
  .tourbtn .dot {
    width: 7px; height: 7px; border-radius: 50%; background: var(--brand-glow);
    box-shadow: 0 0 8px var(--brand-glow); animation: pulse 2.4s ease-in-out infinite;
  }
    body.touring .tourbtn {
    background: linear-gradient(168deg, #2C4772 0%, #1E3355 54%, #16274A 100%);
    border-color: rgba(232,182,120,.6);
  }
  .scenes button {
    font: 600 12px/1 var(--sans); letter-spacing: .04em; cursor: pointer;
    color: var(--muted); background: transparent; border: none;
    padding: 9px 14px; border-radius: 999px; transition: color .2s, background .2s;
  }
  .scenes button.on {
    color: #fff;
    background:
      radial-gradient(140% 210% at 20% 0%, rgba(124,187,255,.22) 0%, rgba(124,187,255,0) 62%),
      linear-gradient(168deg, #2C4772 0%, #1E3355 54%, #16274A 100%);
    box-shadow:
      inset 0 0 0 1px rgba(232,182,120,.5),
      inset 0 1px 0 rgba(255,255,255,.18),
      0 4px 12px -3px rgba(5,11,24,.6);
  }
  .scenes button:not(.on):hover { color: var(--text); }
  .pan { position: absolute; will-change: transform; transform-origin: 0 0; }
  .pan.glide { transition: transform 1.25s cubic-bezier(.16,1,.3,1); }
  .pan.glide-slow { transition: transform 2.9s cubic-bezier(.36,0,.18,1); }
  .room-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 7; }
  .photo-portrait {
    display: block; position: absolute; z-index: 1;
    width: 0; height: 0; max-width: none; max-height: none;
  }
  .photo-portrait.pframe { opacity: 0; transition: opacity 1.6s linear; }
  .photo-portrait.pframe.on { opacity: 1; }
  .stage.com .p-res { display: none !important; }
  .photo-portrait.p-com { display: none; }
  .stage.com .p-com { display: block; }
  .pan {
    z-index: 5;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 240px);
    mask-image: linear-gradient(180deg, transparent 0, #000 240px);
  }
  body.touring-ui .scenes, body.touring-ui .tourbtn { display: none !important; }
  .copy { transition: opacity .5s ease; }
  body.touring-ui .copy { opacity: 0; pointer-events: none; }
  .card-exit {
    display: none; position: absolute; top: 12px; right: 12px;
    font: 700 11px/1 var(--sans); letter-spacing: .04em; color: #fff; cursor: pointer;
    background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.24);
    border-radius: 999px; padding: 8px 13px;
  }
  body.touring-ui .card .card-exit { display: inline-flex; }
  body.touring-ui .card .card-x { display: none; }
  .room-layer img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; transform-origin: 50% 52%;
  }
  .room-layer img.on { animation: roomPush 8.5s ease-out forwards; }
  @keyframes roomPush { from { transform: scale(1.005); } to { transform: scale(1.075); } }
  .room-scrim { opacity: 0; transition: opacity 1.4s ease; }
  body.touring .room-scrim { opacity: 1; }
  .zoomed .kb-wrap { animation-play-state: paused; }
  .kb-wrap { position: absolute; inset: 0; animation: kb 44s ease-in-out infinite; transform-origin: 50% 70%; }
  @keyframes kb { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.02); } }
  .photo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .scrim { position: absolute; inset: 0; pointer-events: none; z-index: 4;
    background:
      linear-gradient(180deg, rgba(22,36,62,.62) 0%, rgba(22,36,62,.30) 22%, rgba(22,36,62,0) 42%);
  }

  /* ---------- glass hotspots ---------- */
  .hs-layer { position: absolute; inset: 0; z-index: 5; }
  .stage button { font-family: var(--sans); }
  .ghs {
    position: absolute; transform: translate(-50%, -50%);
    display: flex; align-items: center; gap: 10px;
    background: none; border: none; padding: 0; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .ghs.flip { flex-direction: row-reverse; }
  .ghs-ico {
    position: relative; width: 46px; height: 46px; flex: none;
    border-radius: 50%; display: grid; place-items: center;
    background: var(--glass-hi);
    backdrop-filter: blur(12px) saturate(1.6);
    -webkit-backdrop-filter: blur(12px) saturate(1.6);
    border: 1px solid var(--glass-line);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 10px 28px rgba(4,8,18,.45);
    transition: background .25s, border-color .25s, transform .25s cubic-bezier(.16,1,.3,1);
  }
  .ghs-ico::before {
    content: ''; position: absolute; inset: -7px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.55);
    animation: halo 2.8s cubic-bezier(.16,1,.3,1) infinite;
    animation-delay: var(--d, 0s);
  }
  @keyframes halo {
    0%   { transform: scale(.72); opacity: .9; }
    70%  { transform: scale(1.45); opacity: 0; }
    100% { transform: scale(1.45); opacity: 0; }
  }
  .ghs-ico svg { width: 21px; height: 21px; stroke: #fff; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
    filter: drop-shadow(0 1px 4px rgba(4,8,18,.5)); }
  .ghs:hover .ghs-ico, .ghs.active .ghs-ico {
    background: rgba(17, 115, 212, .55); border-color: rgba(255,255,255,.75); transform: scale(1.08);
  }
  .ghs:focus-visible .ghs-ico { border-color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 0 0 3px rgba(90,171,247,.6); outline: none; }
  .ghs:focus { outline: none; }
  .ghs-tag {
    font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase;
    color: var(--text); white-space: nowrap; padding: 9px 13px; border-radius: 999px;
    background: var(--glass); backdrop-filter: blur(12px) saturate(1.5);
    -webkit-backdrop-filter: blur(12px) saturate(1.5);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
    opacity: 0; transform: translateX(-6px);
    transition: opacity .3s cubic-bezier(.16,1,.3,1), transform .3s cubic-bezier(.16,1,.3,1);
    pointer-events: none;
  }
  .ghs.flip .ghs-tag { transform: translateX(6px); }
  .ghs:hover .ghs-tag, .ghs.active .ghs-tag, .ghs:focus-visible .ghs-tag { opacity: 1; transform: translateX(0); }  #c3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }  .wordmark { font-family: var(--serif); font-size: 19px; letter-spacing: .06em; text-shadow: 0 1px 18px rgba(7,13,31,.9); }
  .wordmark small { display: block; font-family: var(--sans); font-size: 10px; letter-spacing: .34em; color: #C4D2E8; margin-top: 2px; }
  .glassy {
    background: var(--glass); border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(14px) saturate(1.5); -webkit-backdrop-filter: blur(14px) saturate(1.5);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
  }
  /* ---------- headline copy ---------- */
  .copy {
    position: absolute; z-index: 20;
    left: 50%; transform: translateX(-50%);
    top: clamp(64px, 8vh, 96px);
    width: min(780px, calc(100vw - 40px));
    text-align: center;
  }
  .eyebrow {
    font: 600 11px/1.4 var(--sans); letter-spacing: .32em; text-transform: uppercase;
    color: var(--brand-glow); margin: 0 0 18px; text-shadow: 0 1px 14px rgba(7,13,31,.9);
  }
  h1 {
    font-family: var(--serif); font-weight: 400;
    font-size: clamp(30px, 4.6vw, 54px); line-height: 1.08;
    margin: 0 0 14px; text-wrap: balance;
    text-shadow: 0 2px 34px rgba(7,13,31,.95), 0 1px 6px rgba(7,13,31,.6);
  }
  .sub {
    font-size: clamp(15px, 1.3vw, 17px); line-height: 1.6; color: #CBD7EA;
    max-width: 52ch; margin: 0 auto 20px; text-shadow: 0 1px 16px rgba(7,13,31,.95);
  }
  .cta-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
  .btn {
    font: 600 14px/1 var(--sans); letter-spacing: .03em; cursor: pointer;
    padding: 15px 26px; border-radius: 999px; text-decoration: none;
    transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .25s, background .25s, border-color .25s;
  }
  .btn:active { transform: scale(.97); }  .btn-ghost { color: var(--text); border-radius: 999px; }
  .btn-ghost:hover { border-color: var(--brand-glow); }  .chip {
    font: 600 10px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase;
    color: #D6E1F2; padding: 8px 13px; border-radius: 999px;
  }
  .hint {
    margin-top: 14px; font-size: 12.5px; color: #C4D2E8; letter-spacing: .02em;
    display: flex; align-items: center; gap: 8px; justify-content: center; text-shadow: 0 1px 12px rgba(7,13,31,.95);
  }
  .hint .dot {
    width: 9px; height: 9px; border-radius: 50%; background: var(--brand-glow);
    box-shadow: 0 0 10px var(--brand-glow); animation: pulse 2.4s ease-in-out infinite;
  }
  @keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: 1; } }

  .aud { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; margin-top: 8px; }
  .aud button {
    font: 600 13px/1 var(--sans); letter-spacing: .05em; cursor: pointer;
    color: #C4D2E8; background: transparent; border: none;
    padding: 11px 22px; border-radius: 999px; transition: color .2s, background .2s;
  }
  .aud button.on {
    color: #fff;
    background:
      radial-gradient(140% 210% at 20% 0%, rgba(124,187,255,.22) 0%, rgba(124,187,255,0) 62%),
      linear-gradient(168deg, #2C4772 0%, #1E3355 54%, #16274A 100%);
    box-shadow:
      inset 0 0 0 1px rgba(232,182,120,.5),
      inset 0 1px 0 rgba(255,255,255,.18),
      0 4px 12px -3px rgba(5,11,24,.6);
  }
  .aud button:not(.on):hover { color: #fff; }  .seg button.on { color: #fff; background: var(--brand); }
  .seg button:not(.on):hover { color: var(--text); }


  /* ---------- illustrated-mode hotspots + ambience ---------- */
  .scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .scene[hidden] { display: none; }
  .hs { cursor: pointer; }
  .hs .ring {
    fill: none; stroke: var(--brand-glow); stroke-width: 1.6; opacity: .9;
    transform-box: fill-box; transform-origin: center;
    animation: ringPulse 2.6s cubic-bezier(.16,1,.3,1) infinite;
  }
  .hs .core { fill: rgba(10,17,34,.85); stroke: var(--brand-glow); stroke-width: 1.6; transition: fill .25s, stroke .25s; }
  .hs .glyph { stroke: var(--brand-glow); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s; }
  .hs:hover .core, .hs.active .core { fill: var(--brand); stroke: #fff; }
  .hs:hover .glyph, .hs.active .glyph { stroke: #fff; }
  .hs:focus { outline: none; }
  .hs:focus-visible .core { stroke: #fff; stroke-width: 2.6; }
  .hs.active .ring { animation-duration: 1.4s; }
  @keyframes ringPulse {
    0% { transform: scale(.6); opacity: .95; } 70% { transform: scale(1.5); opacity: 0; } 100% { transform: scale(1.5); opacity: 0; }
  }
  .tw { animation: twinkle 4s ease-in-out infinite; }
  @keyframes twinkle { 0%,100% { opacity: .25; } 50% { opacity: .95; } }  @keyframes tv {
    0% { opacity: .75; } 12% { opacity: .9; } 24% { opacity: .7; } 38% { opacity: .95; }
    55% { opacity: .8; } 70% { opacity: .92; } 84% { opacity: .72; } 100% { opacity: .85; }
  }  @keyframes windim { 0%,100% { opacity: .95; } 42% { opacity: .95; } 50% { opacity: .55; } 58% { opacity: .95; } }  @keyframes fly {
    0%,100% { transform: translate(0,0); opacity: 0; }
    10% { opacity: .9; }
    50% { transform: translate(26px,-34px); opacity: .35; }
    80% { opacity: .8; }
    90% { transform: translate(-12px,-10px); }
  }

  /* ---------- detail card ---------- */
  .card {
    position: absolute; z-index: 40;
    left: clamp(20px, 5vw, 72px); bottom: clamp(20px, 6vh, 56px);
    width: min(370px, calc(100vw - 40px));
    background: rgba(14, 22, 42, .58);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 20px; padding: 22px 22px 18px;
    backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 24px 70px rgba(4,8,18,.65);
    opacity: 0; transform: translateY(14px); pointer-events: none;
    transition: opacity .35s cubic-bezier(.16,1,.3,1), transform .35s cubic-bezier(.16,1,.3,1);
  }
  .card.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
  .card-ico {
    width: 42px; height: 42px; flex: none; border-radius: 13px;
    display: grid; place-items: center;
    background: rgba(17,115,212,.22); border: 1px solid rgba(90,171,247,.45);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
  }
  .card-ico svg { width: 21px; height: 21px; stroke: var(--brand-glow); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
  .card h3 { font-family: var(--serif); font-weight: 400; font-size: 20px; margin: 0; letter-spacing: .01em; }
  .card p { margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #B9C6DC; }
  .card-foot { display: flex; align-items: center; justify-content: space-between; }
  .card-link { font: 600 13px/1 var(--sans); color: var(--brand-glow); text-decoration: none; letter-spacing: .03em; }
  .card-link:hover { text-decoration: underline; }
  .card-nav { display: flex; gap: 6px; }
  .card-nav button, .card-x {
    cursor: pointer; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.16);
    color: #C4D2E8; border-radius: 10px; width: 32px; height: 32px;
    display: grid; place-items: center; font-size: 15px; line-height: 1;
    transition: color .2s, border-color .2s, background .2s;
  }
  .card-nav button:hover, .card-x:hover { color: #fff; border-color: var(--brand-glow); background: rgba(17,115,212,.25); }
  .card-x { position: absolute; top: 12px; right: 12px; border: none; background: transparent; width: 28px; height: 28px; }
  .counter { font-size: 11px; letter-spacing: .2em; color: var(--muted); align-self: center; margin-right: 6px; font-variant-numeric: tabular-nums; }

  /* ---------- centered detail card ---------- */
  .card-backdrop {
    position: absolute; inset: 0; z-index: 38; pointer-events: none;
    background: rgba(5, 9, 20, .58);
    backdrop-filter: blur(7px) saturate(.9); -webkit-backdrop-filter: blur(7px) saturate(.9);
    opacity: 0; transition: opacity .5s ease;
  }
  .card-backdrop.on { opacity: 1; pointer-events: auto; }
  .card-img {
    display: none; width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
    border-radius: 14px; margin-bottom: 18px; background: rgba(255,255,255,.05);
  }
  .card.center {
    left: 50%; top: 50%; right: auto; bottom: auto;
    width: min(430px, calc(100vw - 32px));
    max-height: min(86vh, 780px); overflow-y: auto;
    padding: 24px 24px 20px; border-radius: 24px;
    transform: translate(calc(-50% + var(--ox, 0px)), calc(-50% + var(--oy, 0px))) scale(.55);
    transition: opacity .45s ease, transform .55s cubic-bezier(.16,1,.3,1);
  }
  .card.center.show { transform: translate(-50%, -50%) scale(1); }
  .card.center .card-img { display: block; }
  .card.center h3 { font-size: 27px; line-height: 1.2; }
  .card.center .card-top { gap: 14px; margin-bottom: 14px; }
  .card.center p { font-size: 15px; line-height: 1.7; margin-bottom: 22px; }
  .card.center .card-foot { flex-direction: column-reverse; align-items: stretch; gap: 14px; }
  .card.center .card-link {
    display: block; text-align: center; padding: 15px 0; border-radius: 999px;
    color: #fff; background: linear-gradient(180deg, #1E84E8, #0F66BD);
    border: 1px solid rgba(255,255,255,.28);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 24px rgba(17,115,212,.4);
  }
  .card.center .card-link:hover { text-decoration: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 32px rgba(17,115,212,.6); }
  .card.center .card-nav { justify-content: center; }


  /* ---------- service rail + story tour (mobile) ---------- */
  .rail { display: none; }
  .story { display: none; }

  /* ---------- mobile ---------- */
  @media (max-width: 760px) {
    /* Phones were downloading every hidden tour frame and scene layer via
       lazy-load (opacity:0 still fetches; display:none does not). The tour's
       start-up swap sets loading=eager, so frames fetch on demand instead. */
    .stage .layerimg:not(.on):not(.awake), .photo-portrait.pframe:not(.on):not(.awake) { display: none; }

    /* the hero stops being a full screen and becomes a document */
    .stage {
      height: 100svh; min-height: 620px; max-height: none;
      display: block; padding-bottom: 0; overflow: hidden;
    }    .wordmark { font-size: 15px; }
    .wordmark small { letter-spacing: .2em; font-size: 9px; }
    .copy {
      position: absolute; z-index: 20; left: 50%; transform: translateX(-50%);
      top: clamp(84px, 12svh, 130px); width: calc(100vw - 36px); text-align: center;
    }
    h1 { font-size: clamp(26px, 7.6vw, 34px); margin: 0 0 12px; }
    .aud { margin-top: 0; }
    .aud button { padding: 10px 18px; font-size: 12.5px; }

    /* the whole photograph, never cropped — every badge stays in frame */
    .photo-wrap { position: absolute; inset: 0; overflow: hidden; }
    #bgPhoto { display: none; }
    /* landscape frames off on phones — the pan box stays as badge/zoom geometry */
    .pan { z-index: 6; background: transparent; -webkit-mask-image: none; mask-image: none; }
    .pan .photo { display: none !important; }
    .scrim { background: linear-gradient(180deg, rgba(7,13,31,.25) 0%, rgba(7,13,31,0) 30%); }

    .scenes { position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 30; white-space: nowrap; }
    .scenes button { padding: 10px 15px; font-size: 12.5px; }
    .tourbtn { position: absolute; left: 50%; transform: translateX(-50%); bottom: 78px; z-index: 30; padding: 12px 20px; font-size: 13px; }

    /* badges: compact but tappable */
    .ghs-ico { width: 27px; height: 27px; }
    .ghs-ico svg { width: 13px; height: 13px; }
    .ghs-ico::before { inset: -4px; }
    .ghs-tag { display: none; }

    .scene-toast {
      bottom: 150px; left: 50%; transform: translateX(-50%);
      max-width: 92vw; font-size: 12px; padding: 8px 14px; gap: 8px; z-index: 30;
    }
    .toast-title { font-size: 9px; letter-spacing: .16em; }
    .toast-cap { font-size: 12.5px; }

    /* swipeable services — the reliable way to browse on a phone */
    .rail {
      background: var(--navy); margin: 0; padding: 64px 16px 14px;
      display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
      -webkit-overflow-scrolling: touch; scrollbar-width: none;
    }
    .rail::-webkit-scrollbar { display: none; }
    .rail-card {
      flex: 0 0 68%; scroll-snap-align: center; cursor: pointer;
      background: rgba(14,22,42,.55); border: 1px solid rgba(255,255,255,.16);
      border-radius: 16px; overflow: hidden; padding: 0; text-align: left;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.14);
      transition: border-color .25s, background .25s;
    }
    .rail-card.on { border-color: var(--brand-glow); background: rgba(17,115,212,.22); }
    .rail-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: rgba(255,255,255,.05); }
    .rail-card .rc-body { display: flex; align-items: center; gap: 9px; padding: 11px 13px 13px; }
    .rail-card .rc-ico { width: 26px; height: 26px; flex: none; display: grid; place-items: center;
      border-radius: 8px; background: rgba(17,115,212,.22); border: 1px solid rgba(90,171,247,.4); }
    .rail-card .rc-ico svg { width: 15px; height: 15px; stroke: var(--brand-glow); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
    .rail-card h4 { margin: 0; font: 600 12.5px/1.3 var(--sans); letter-spacing: .01em; color: var(--text); }

    /* detail card is a sheet pinned to the viewport, not the hero */
    .card {
      position: fixed; left: 16px; right: 16px; top: 50%; bottom: auto; width: auto;
      box-sizing: border-box; transform: translateY(calc(-50% + 16px));
      border-radius: 20px; z-index: 260;
      padding: 20px 20px max(20px, calc(14px + env(safe-area-inset-bottom)));
      max-height: 78vh; overflow-y: auto;
    }
    .card.show, .card.center.show { transform: translateY(-50%); }
    .card.center { left: 16px; right: 16px; top: 50%; width: auto; }
    .card-backdrop { position: fixed; z-index: 255; }
    .card.center h3 { font-size: 21px; }
    .card-img { border-radius: 12px; }

    /* full-screen story tour */
    body.storytour { overflow: hidden; }
    body.storytour .site-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 84; background: linear-gradient(180deg, rgba(7,13,31,.72), rgba(7,13,31,0)); }
    body.storytour .nav-overlay-menu { z-index: 96; }
    .story-info { display: none; }
    body.storytour .story-info {
      display: block; position: fixed; z-index: 83;
      left: 16px; right: 16px; bottom: max(20px, env(safe-area-inset-bottom));
      padding: 16px 18px 14px; border-radius: 18px;
      background: rgba(10, 17, 34, .62);
      -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
      border: 1px solid rgba(255,255,255,.14);
    }
    .si-exit {
      position: absolute; top: 10px; right: 12px; z-index: 2;
      font: 700 11px/1 var(--sans); letter-spacing: .04em; color: #fff; cursor: pointer;
      background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
      border-radius: 999px; padding: 8px 13px;
    }
    .si-count { font: 700 10px/1 var(--sans); letter-spacing: .22em; text-transform: uppercase; color: var(--brand-glow); padding-right: 86px; display: inline-block; }
    .si-title { font: 800 19px/1.2 var(--sans); color: #fff; margin: 7px 0 5px; }
    .si-cap { font: 500 13.5px/1.5 var(--sans); color: #D6E1F2; margin: 0 0 9px; }
    .si-link { font: 700 13px/1 var(--sans); color: var(--brand-glow); text-decoration: none; }
    body.storytour .scene-toast { display: none !important; }
    body.storytour .room-layer {
      position: fixed; inset: 0; z-index: 80; display: block;
    }
    body.storytour .room-layer { background: #070D1F; }
    body.storytour .room-layer img { object-fit: cover; }
    .story-bg { display: none; }
    body.storytour .story-bg {
      display: block; position: absolute; inset: -48px;
      background-size: cover; background-position: center;
      filter: blur(46px) brightness(.7); transform: scale(1.08);
    }
    body.storytour .scene-toast {
      position: fixed; z-index: 83; bottom: max(26px, env(safe-area-inset-bottom));
    }
    .story { display: none; }
    body.storytour .story { display: block; position: fixed; inset: 0; z-index: 82; }
    body.storytour .card, body.storytour .card-backdrop { display: none; }
    .story-bars {
      position: absolute; top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px;
      display: flex; gap: 4px; z-index: 84;
    }
    .story-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.28); overflow: hidden; }
    .story-bar span { display: block; height: 100%; width: 0; background: #fff; transition: width .3s linear; }
    .story-bar.done span { width: 100%; }
    .story-zone { position: absolute; top: 0; bottom: 0; border: none; background: transparent; cursor: pointer; }
    .story-zone.prev { left: 0; width: 32%; }
    .story-zone.next { left: 32%; right: 0; }
    .notes { padding: 44px 18px 30px; }
  }
  @media (prefers-reduced-motion: reduce) {
    .tw, .hint .dot, .kb-wrap, .ghs-ico::before, .tourbtn .dot, .scene-toast::before{ animation: none; }
    .room-layer img.on { animation: none; transform: none; }
    .hs .ring { animation: none; opacity: .5; transform: scale(1.1); }
    .card { transition: opacity .2s; transform: none; }
    html { scroll-behavior: auto; }
  }

/* ---------- badge placement tool (?badges=1 only) ---------- */
.bx {
  position: fixed; right: 14px; bottom: 14px; z-index: 9999; width: 310px;
  background: rgba(10, 14, 22, .93); backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px;
  padding: 12px; color: #fff; font: 500 12px/1.45 var(--sans);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
}
.bx-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.bx-head strong { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: #8FB4E8; }
.bx-head button {
  margin-left: auto; appearance: none; border: 0; cursor: pointer;
  background: #2E6BC5; color: #fff; font: 600 11.5px/1 var(--sans);
  padding: 8px 13px; border-radius: 999px;
}
.bx-head button:hover { background: #23539C; }
.bx textarea {
  width: 100%; height: 190px; resize: vertical; box-sizing: border-box;
  background: rgba(0, 0, 0, .45); color: #E7EDF5;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 8px;
  padding: 9px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.bx-hint { margin: 8px 0 0; font-size: 11.5px; color: #91A0B4; }
/* badges become handles: no card, no hover lift, and a clear grab cursor */
body.badge-edit .ghs { cursor: grab; touch-action: none; }
body.badge-edit .ghs.dragging { cursor: grabbing; outline: 2px solid #2E6BC5; outline-offset: 3px; }
body.badge-edit .ghs-tag { pointer-events: none; }
/* dead zones the phone crop will swallow — shown only in the placement tool */
.bx-safe { position: absolute; inset: 0; pointer-events: none; z-index: 6; display: none; }
.bx-safe i {
  position: absolute; top: 0; bottom: 0; display: block;
  background: repeating-linear-gradient(45deg, rgba(200,60,50,.30) 0 8px, rgba(200,60,50,.14) 8px 16px);
  border-inline: 1px solid rgba(255,110,90,.85);
}
.bx-safe-l { left: 0; }
.bx-safe-r { right: 0; }
