
    :root {
      --primary: #56a3a6;
      --primary-hover: #42888b;
      --secondary: #66d7d1;
      --accent: #70c1b3;
      --bg: #041512;
      --card-bg: #082823;
      --border: #0e3d36;
      --text: #ffffff;
      --text-muted: #a7f3d0;
      --radar-color: rgba(102, 215, 209, 0.55);
      --hotspot-color: #66d7d1;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      user-select: none;
      -webkit-user-select: none;
      -webkit-tap-highlight-color: transparent;
    }
    html {
      width: 100%;
      height: 100%;
      height: -webkit-fill-available;
    }
    body, html {
      width: 100%;
      height: 100%;
      overflow: hidden;
      background-color: var(--bg);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      color: var(--text);
      position: fixed;
      inset: 0;
      overscroll-behavior: none;
      -webkit-text-size-adjust: 100%;
    }
    #viewer-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 1;
      cursor: grab;
      touch-action: none;
      -webkit-user-drag: none;
      -webkit-touch-callout: none;
    }
    #viewer-container canvas {
      display: block;
      width: 100% !important;
      height: 100% !important;
      touch-action: none;
    }
    #viewer-container:active {
      cursor: grabbing;
    }
    #ui-layer {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: 10;
      pointer-events: none;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
    }
    .clickable {
      pointer-events: auto;
    }
    /* Top Bar */
    .top-bar {
      padding: 14px 18px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: linear-gradient(180deg, rgba(9, 9, 11, 0.92) 0%, rgba(9, 9, 11, 0) 100%);
    }
    .tour-header {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .tour-title {
      font-size: 16px;
      font-weight: 700;
      color: var(--text);
      text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    }
    .current-room-badge {
      font-size: 12px;
      color: var(--accent);
      font-weight: 600;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .top-actions {
      display: flex;
      gap: 8px;
      align-items: center;
    }
    .icon-btn {
      background: var(--card-bg);
      border: 1px solid var(--border);
      color: var(--text);
      padding: 7px 12px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 12px;
      font-weight: 600;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      backdrop-filter: blur(8px);
      transition: all 0.2s;
    }
    .icon-btn:hover {
      background: var(--border);
      border-color: var(--primary);
    }
    .icon-btn.active {
      background: var(--primary);
      border-color: var(--accent);
      color: #ffffff;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    }

    /* Hotspot 2D overlay container in 3D viewport */
    #hotspots-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      pointer-events: none;
      z-index: 20;
    }
    .hotspot-marker {
      position: absolute;
      cursor: pointer;
      pointer-events: auto;
      z-index: 25;
      display: flex;
      flex-direction: column;
      align-items: center;
      transform-origin: center center;
      transition: opacity 0.15s ease;
    }
    .hotspot-marker:hover .hotspot-icon-circle {
      transform: scale(1.15);
      box-shadow: 0 0 25px var(--hotspot-color);
    }
    .hotspot-icon-circle {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--card-bg);
      border: 2px solid var(--hotspot-color);
      box-shadow: 0 0 16px var(--hotspot-color);
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--text);
      font-size: 18px;
      transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .hotspot-icon-circle.info-type {
      border-color: var(--secondary);
      box-shadow: 0 0 14px var(--secondary);
    }
    .hotspot-label {
      margin-top: 6px;
      background: var(--card-bg);
      color: var(--text);
      border: 1px solid var(--border);
      padding: 4px 10px;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 600;
      white-space: nowrap;
      box-shadow: 0 4px 12px rgba(0,0,0,0.5);
      backdrop-filter: blur(4px);
    }

    /* Floating Floor Plan Widget */
    #floor-plan-panel {
      position: absolute;
      top: 70px;
      right: 18px;
      width: 280px;
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 12px;
      box-shadow: 0 16px 36px rgba(0,0,0,0.6);
      backdrop-filter: blur(12px);
      overflow: hidden;
      display: none;
      flex-direction: column;
      z-index: 30;
      transition: transform 0.2s ease, opacity 0.2s ease;
    }
    .fp-header {
      padding: 10px 14px;
      background: rgba(0, 0, 0, 0.4);
      border-bottom: 1px solid var(--border);
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      font-weight: 700;
    }
    .fp-tabs {
      display: flex;
      gap: 4px;
      padding: 6px 10px;
      background: rgba(0, 0, 0, 0.25);
      border-bottom: 1px solid var(--border);
      overflow-x: auto;
    }
    .fp-tab-btn {
      padding: 4px 8px;
      border-radius: 6px;
      font-size: 10px;
      font-weight: 700;
      background: rgba(255, 255, 255, 0.06);
      border: 1px solid transparent;
      color: var(--text-muted);
      cursor: pointer;
      white-space: nowrap;
    }
    .fp-tab-btn.active {
      background: var(--primary);
      color: #ffffff;
      border-color: var(--accent);
    }
    .fp-body {
      position: relative;
      width: 100%;
      aspect-ratio: 4 / 3;
      background: #09090b;
      overflow: hidden;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .fp-image {
      width: 100%;
      height: 100%;
      object-fit: contain;
      pointer-events: none;
    }
    .fp-pin {
      position: absolute;
      transform: translate(-50%, -50%);
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--card-bg);
      border: 2px solid var(--accent);
      cursor: pointer;
      z-index: 5;
      transition: all 0.15s;
    }
    .fp-pin:hover {
      transform: translate(-50%, -50%) scale(1.3);
      background: var(--primary);
      border-color: #ffffff;
    }
    .fp-pin.active {
      background: var(--primary);
      border-color: #ffffff;
      box-shadow: 0 0 12px var(--accent);
      z-index: 10;
    }
    .fp-radar-cone {
      position: absolute;
      top: -24px;
      left: -24px;
      width: 58px;
      height: 58px;
      pointer-events: none;
      background: conic-gradient(from -30deg, transparent 0deg, var(--radar-color) 30deg, transparent 60deg);
      border-radius: 50%;
    }

    /* Bottom Room Carousel */
    .bottom-bar {
      padding: 16px 20px;
      display: flex;
      justify-content: center;
      background: linear-gradient(0deg, rgba(9, 9, 11, 0.95) 0%, rgba(9, 9, 11, 0) 100%);
    }
    .room-carousel {
      display: flex;
      gap: 10px;
      overflow-x: auto;
      max-width: 90vw;
      padding: 6px 4px;
      scrollbar-width: thin;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-x;
    }
    .room-card {
      min-width: 110px;
      width: 110px;
      height: 68px;
      border-radius: 10px;
      position: relative;
      overflow: hidden;
      cursor: pointer;
      border: 2px solid var(--border);
      transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1), border-color 0.2s, box-shadow 0.2s;
      flex: 0 0 auto;
    }
    .room-card:hover {
      transform: translateY(-2px);
      border-color: var(--primary);
    }
    .room-card.active {
      border-color: var(--accent);
      box-shadow: 0 0 16px var(--primary);
      transform: translateY(-3px);
    }
    .room-card img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
    .room-card-title {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      padding: 4px 6px;
      background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, transparent 100%);
      font-size: 10px;
      font-weight: 700;
      color: #ffffff;
      text-align: center;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    /* Modal Dialog */
    .modal-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(8px);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 50;
      padding: 16px;
    }
    .modal-card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 16px;
      padding: 24px;
      max-width: 480px;
      width: 100%;
      box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    }
    .modal-title {
      font-size: 18px;
      font-weight: 700;
      color: var(--text);
      margin-bottom: 8px;
    }
    .modal-desc {
      font-size: 14px;
      color: var(--text-muted);
      line-height: 1.6;
      margin-bottom: 20px;
    }
    .modal-btn {
      width: 100%;
      padding: 10px;
      border-radius: 8px;
      background: var(--primary);
      color: #ffffff;
      font-weight: 700;
      border: none;
      cursor: pointer;
      transition: background 0.2s;
    }
    .modal-btn:hover {
      background: var(--primary-hover);
    }

    /* Transition overlay */
    #fade-overlay {
      position: absolute;
      inset: 0;
      background: var(--bg);
      opacity: 0;
      pointer-events: none;
      z-index: 40;
      transition: opacity 0.3s ease;
    }
    #fade-overlay.fading {
      opacity: 1;
    }

    @media (max-height: 520px), (max-width: 640px) {
      .btn-label {
        display: none;
      }
      .top-bar {
        padding: 8px 10px;
        align-items: flex-start;
      }
      .tour-title {
        font-size: 13px;
      }
      .current-room-badge {
        font-size: 11px;
      }
      .top-actions {
        gap: 6px;
      }
      .icon-btn {
        padding: 6px 8px;
        font-size: 14px;
      }
      .hotspot-icon-circle {
        width: 32px;
        height: 32px;
        font-size: 14px;
      }
      .hotspot-label {
        display: none;
      }
      #floor-plan-panel {
        top: auto;
        right: 8px;
        left: 8px;
        bottom: 62px;
        width: auto;
        max-height: 46%;
      }
      .fp-body {
        aspect-ratio: 16 / 9;
      }
      .bottom-bar {
        padding: 8px 10px;
      }
      .room-carousel {
        max-width: 100%;
        gap: 6px;
      }
      .room-card {
        min-width: 68px;
        width: 68px;
        height: 46px;
        border-radius: 8px;
      }
      .room-card-title {
        font-size: 9px;
        padding: 2px 4px;
      }
    }
  