
        *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
    
        :root {
          --bg: #0a0c0f;
          --surface: #13161c;
          --surface-alt: #1a1e26;
          --border: rgba(255,255,255,0.08);
          --text: #f4f4f5;
          --text-muted: #9ca3af;
          --accent: #c9a962;
          --accent-glow: rgba(201,169,98,0.35);
          --available: #22c55e;
          --pending: #f59e0b;
          --sold: #ef4444;
          --coming-soon: #8b5cf6;
        }
    
        html, body {
          height: 100%;
          font-family: 'Outfit', sans-serif;
          background: var(--bg);
          color: var(--text);
          overflow: hidden;
        }
    
        /* ─── HEADER ─── */
        header {
          position: fixed;
          top: 0; left: 0; right: 0;
          z-index: 100;
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 1rem 2rem;
          background: linear-gradient(to bottom, rgba(10,12,15,0.95), transparent);
          pointer-events: auto;
        }
        .logo {
          display: flex;
          align-items: center;
        }
        .logo-img {
          height: 50px;
          width: auto;
        }
        .header-actions {
          display: flex;
          gap: 0.75rem;
        }
        .btn {
          display: inline-flex;
          align-items: center;
          gap: 0.5rem;
          padding: 0.6rem 1.2rem;
          border: 1px solid var(--border);
          border-radius: 9999px;
          background: rgba(255,255,255,0.04);
          color: var(--text);
          font-size: 0.85rem;
          font-weight: 500;
          cursor: pointer;
          transition: all 0.25s ease;
          backdrop-filter: blur(8px);
        }
        .btn:hover {
          background: rgba(255,255,255,0.1);
          border-color: var(--accent);
        }
        .btn-accent {
          background: var(--accent);
          color: var(--bg);
          border-color: var(--accent);
        }
        .btn-accent:hover {
          background: #d4b66d;
          border-color: #d4b66d;
        }
    
        /* ─── ZOOM CONTAINER ─── */
        #zoom-container {
          position: fixed;
          inset: 0;
          overflow: hidden;
          cursor: grab;
          z-index:1;
          /* perspective: 1400px; */
        }

        /* #zoom-container .openseadragon-canvas {
            transform: rotateX(3deg) rotateY(-2deg);
            transform-origin: center;
          } */

        #zoom-container.dragging { cursor: grabbing; }
    
        #map-wrapper {
          position: absolute;
          width: 100%;
          height: 100%;
          transform-origin: 0 0;
          will-change: transform;
        }
    
        /* ─── SITE PLAN IMAGES ─── */
        .site-plan-img {
          position: absolute;
          inset: 0;
          width: 100%;
          height: 100%;
          object-fit: cover;
          transition: opacity 0.6s ease;
        }
        #site-plan-winter { opacity: 1; z-index: 1; }
        #site-plan-summer { opacity: 0; z-index: 2; }
        body.summer #site-plan-winter { opacity: 0; }
        body.summer #site-plan-summer { opacity: 1; }
    
        /* ─── HOTSPOT PINS ─── */
        #hotspots {
          position: absolute;
          inset: 0;
          pointer-events: none;
          z-index: 10;
        }
        .pin {
          position: absolute;
          transform: translate(-50%, -50%);
          pointer-events: auto;
          cursor: pointer;
          z-index: 10;
          transition: opacity 0.3s ease, transform 0.3s ease;
        }

        .pin .pin-inner{
            transition:
              transform .25s ease,
              box-shadow .25s ease;
          }
          
          .pin:hover .pin-inner{
            transform: translateY(-3px) scale(1.05);
            box-shadow: 0 8px 16px rgba(0,0,0,.25);
          }
        .pin.hidden {
          opacity: 0;
          transform: translate(-50%, -50%) scale(0.5);
          pointer-events: none;
        }
        .pin-inner {
          position: relative;
          display: flex;
          flex-direction: column;
          align-items: center;
        }
        .pin-pulse {
          position: absolute;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%);
          width: 40px;
          height: 40px;
          border-radius: 50%;
          background: rgba(255,255,255,0.15);
          animation: pulse 2.5s ease-out infinite;
        }
        @keyframes pulse {
          0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
          100% { transform: translate(-50%, -50%) scale(2.5); opacity: 0; }
        }
        .pin-marker{
            width:34px;
            height:34px;
            background:#3a3a3a;
            border-radius:50%;
            display:flex;
            align-items:center;
            justify-content:center;
            position:relative;
          }
          
        .pin:hover .pin-marker {
            background: rgba(10,12,15,0.9);
            border-color: rgba(255,255,255,0.6);
            transform: scale(1.1);
          }
          
          .pin-marker svg{
            stroke:white;
            stroke-width:2;
            fill:none;
          }
          
          .pin-status{
            position:absolute;
            top:-2px;
            right:-2px;
            width:8px;
            height:8px;
            background:#2ecc71;
            border-radius:50%;
            border:2px solid white;
          }
        .pin-label {
          margin-top: 8px;
          padding: 5px 12px;
          background: rgba(10,12,15,0.85);
          border: 1px solid rgba(255,255,255,0.15);
          border-radius: 6px;
          font-size: 0.7rem;
          font-weight: 500;
          white-space: nowrap;
          backdrop-filter: blur(8px);
          transition: all 0.25s ease;
        }
        .pin:hover .pin-label {
          background: rgba(10,12,15,0.95);
          border-color: rgba(255,255,255,0.3);
        }
    /* ─── UNIT PINS (appear on zoom) ─── */

.pin.unit-pin {
    z-index: 8;
    pointer-events: none;
}

/* animate inner pin instead of the wrapper */
.pin.unit-pin .pin-inner {
    opacity: 0;
    transform: scale(.55);
    transition: opacity .35s ease, transform .35s ease;
}

.pin.unit-pin.zoom-visible {
    pointer-events: auto;
}

.pin.unit-pin.zoom-visible .pin-inner {
    opacity: 1;
    transform: scale(1);
    transition-delay: .05s;
}

/* unit styling */
.pin.unit-pin .pin-marker {
    width: 30px;
    height: 30px;
    background: rgba(10,12,15,0.8);
    border: 1.5px solid rgba(255,255,255,0.2);
}

.pin.unit-pin .pin-marker svg {
    width: 14px;
    height: 14px;
}

.pin.unit-pin .pin-pulse {
    width: 28px;
    height: 28px;
}

.pin.unit-pin .pin-label {
    font-size: .6rem;
    padding: 3px 8px;
    margin-top: 5px;
}

.pin.unit-pin .pin-status {
    width: 8px;
    height: 8px;
    top: -1px;
    right: -1px;
}

        /* OpenSeadragon overlay behavior */

        .openseadragon-container .pin{
            pointer-events:auto;
        }

        .pin{
            will-change: transform;
        }

        /* prevent label flicker during zoom */
        .pin-label{
            pointer-events:none;
        }

        /* smoother hover scaling */
        .pin-inner{
            transform-origin:center;
        }

        /* optional nicer glow */
        .pin:hover .pin-marker{
            box-shadow:
                0 0 0 4px rgba(201,169,98,0.15),
                0 6px 18px rgba(0,0,0,0.45);
        }
    
        /* ─── TOOLTIP ─── */
        #tooltip {
            position: fixed;
            z-index: 200;
            width: 280px;
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
          
            opacity: 0;
            pointer-events: auto;
          
            transform: translate(-50%, -110%);
            transition: opacity 0.2s ease, transform 0.2s ease;
          
            box-shadow: 0 20px 40px rgba(0,0,0,0.5);
          }
          
          #tooltip.visible{
            opacity:1;
          }
        .tip-hero {
            width:100%;
            height:140px;
            background-size:cover;
            background-position:center;
            border-radius:8px 8px 0 0;
        }
        .tip-body {
          padding: 12px 14px;
        }
        .tip-name {
          font-family: 'Playfair Display', serif;
          font-size: 1rem;
          font-weight: 500;
          margin-bottom: 2px;
        }
        .tip-price {
          font-size: 0.85rem;
          color: var(--accent);
          font-weight: 600;
          margin-bottom: 8px;
        }
        .tip-stats {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 6px 12px;
          margin-bottom: 10px;
        }
        .tip-stat {
          font-size: 0.75rem;
          color: var(--text-muted);
        }
        .tip-stat strong {
          color: var(--text);
          font-weight: 500;
        }
        .tip-footer {
          display: flex;
          justify-content: space-between;
          align-items: center;
          padding-top: 8px;
          border-top: 1px solid var(--border);
        }
        .tip-edit {
          font-size: 0.7rem;
          color: var(--accent);
          cursor: pointer;
          transition: opacity 0.2s;
        }
        .tip-edit:hover { opacity: 0.7; }
        .tip-hint {
          font-size: 0.65rem;
          color: var(--text-muted);
        }
    
        /* ─── DETAIL PANEL ─── */
        #panel-overlay {
          position: fixed;
          inset: 0;
          background: rgba(0,0,0,0.6);
          opacity: 0;
          pointer-events: none;
          transition: opacity 0.35s ease;
          z-index: 300;
        }
        #panel-overlay.open {
          opacity: 1;
          pointer-events: auto;
        }
        #detail-panel {
          position: fixed;
          top: 0;
          right: 0;
          width: 420px;
          max-width: 100%;
          height: 100%;
          background: var(--surface);
          border-left: 1px solid var(--border);
          transform: translateX(100%);
          transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
          z-index: 350;
          display: flex;
          flex-direction: column;
          overflow: hidden;
        }
        #detail-panel.open { transform: translateX(0); }
        .status-available { background: var(--available); color: #000; }
        .status-pending { background: var(--pending); color: #000; }
        .status-sold { background: var(--sold); color: #fff; }
        .status-coming-soon { background: var(--coming-soon); color: #fff; }
    
        /* ─── PANEL GALLERY ─── */
        .panel-gallery {
          position: relative;
          height: 240px;
          flex-shrink: 0;
          overflow: hidden;
        }
        .panel-gallery-track {
          display: flex;
          height: 100%;
          transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .panel-gallery-slide {
          min-width: 100%;
          height: 100%;
          background-size: cover;
          background-position: center;
        }

        .panel-gallery-slide img{
            width:100%;
            height:100%;
            object-fit:cover;
            display:block;
          }
        .panel-gallery-nav {
          position: absolute;
          top: 50%;
          transform: translateY(-50%);
          width: 36px;
          height: 36px;
          border-radius: 50%;
          background: rgba(0,0,0,0.5);
          border: 1px solid rgba(255,255,255,0.2);
          color: #fff;
          font-size: 1.2rem;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          backdrop-filter: blur(8px);
          transition: all 0.2s ease;
          z-index: 10;
        }
        .panel-gallery-nav:hover {
          background: rgba(0,0,0,0.7);
          border-color: rgba(255,255,255,0.4);
        }
        .panel-gallery-nav.prev { left: 12px; }
        .panel-gallery-nav.next { right: 12px; }
        .panel-gallery-nav:disabled {
          opacity: 0.3;
          cursor: not-allowed;
        }
        .panel-gallery-dots {
          position: absolute;
          bottom: 12px;
          left: 50%;
          transform: translateX(-50%);
          display: flex;
          gap: 8px;
          z-index: 10;
        }
        .panel-gallery-dot {
          width: 8px;
          height: 8px;
          border-radius: 50%;
          background: rgba(255,255,255,0.4);
          border: none;
          cursor: pointer;
          transition: all 0.2s ease;
          padding: 0;
        }
        .panel-gallery-dot.active {
          background: #fff;
          transform: scale(1.2);
        }
        .panel-gallery-dot:hover:not(.active) {
          background: rgba(255,255,255,0.7);
        }
        .panel-gallery-counter {
          position: absolute;
          top: 12px;
          left: 12px;
          padding: 4px 10px;
          background: rgba(0,0,0,0.5);
          border-radius: 12px;
          font-size: 0.7rem;
          color: #fff;
          backdrop-filter: blur(8px);
          z-index: 10;
        }
        .panel-close {
          position: absolute;
          top: 12px;
          right: 12px;
          width: 36px;
          height: 36px;
          border-radius: 50%;
          background: rgba(0,0,0,0.5);
          border: 1px solid var(--border);
          color: var(--text);
          font-size: 1.2rem;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          backdrop-filter: blur(8px);
          transition: background 0.2s;
          z-index: 10;
        }
        .panel-close:hover { background: rgba(0,0,0,0.7); }
        .panel-status {
          position: absolute;
          bottom: 12px;
          left: 12px;
          padding: 6px 14px;
          border-radius: 9999px;
          font-size: 0.75rem;
          font-weight: 600;
          text-transform: uppercase;
          letter-spacing: 0.05em;
          z-index: 10;
        }
        .panel-body {
          flex: 1;
          overflow-y: auto;
          padding: 24px;
        }
        .panel-name {
          font-family: 'Playfair Display', serif;
          font-size: 1.75rem;
          font-weight: 500;
          margin-bottom: 4px;
        }
        .panel-zone {
          font-size: 0.85rem;
          color: var(--text-muted);
          margin-bottom: 16px;
        }
        .panel-price {
          font-size: 1.5rem;
          font-weight: 600;
          color: var(--accent);
          margin-bottom: 24px;
        }
        .panel-section-title {
          font-size: 0.7rem;
          font-weight: 600;
          text-transform: uppercase;
          letter-spacing: 0.1em;
          color: var(--text-muted);
          margin-bottom: 12px;
        }
        .panel-stats {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 16px;
          margin-bottom: 24px;
        }
        .panel-stat {
          padding: 14px;
          background: var(--surface-alt);
          border-radius: 10px;
          border: 1px solid var(--border);
        }
        .panel-stat-value {
          font-size: 1.1rem;
          font-weight: 600;
          margin-bottom: 2px;
        }
        .panel-stat-label {
          font-size: 0.75rem;
          color: var(--text-muted);
        }
        .panel-desc {
          font-size: 0.9rem;
          line-height: 1.7;
          color: var(--text-muted);
          margin-bottom: 24px;
        }
        .panel-cta {
          width: 100%;
          padding: 14px;
          background: var(--accent);
          color: var(--bg);
          border: none;
          border-radius: 10px;
          font-size: 0.95rem;
          font-weight: 600;
          cursor: pointer;
          transition: background 0.2s;
        }
        .panel-cta:hover { background: #d4b66d; }
    
        /* ─── PANEL UNITS LIST ─── */
        .panel-units {
          margin-bottom: 24px;
        }
        .panel-units-list {
          display: flex;
          flex-direction: column;
          gap: 8px;
        }
        .panel-unit-item {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 12px 14px;
          background: var(--surface-alt);
          border: 1px solid var(--border);
          border-radius: 10px;
          cursor: pointer;
          transition: all 0.2s;
        }
        .panel-unit-item:hover {
          border-color: var(--accent);
          background: rgba(201,169,98,0.05);
        }
        .panel-unit-left {
          display: flex;
          align-items: center;
          gap: 10px;
        }
        .panel-unit-status {
          width: 8px;
          height: 8px;
          border-radius: 50%;
        }
        .panel-unit-name {
          font-weight: 500;
          font-size: 0.9rem;
        }
        .panel-unit-details {
          font-size: 0.75rem;
          color: var(--text-muted);
        }
        .panel-unit-right {
          text-align: right;
        }
        .panel-unit-price {
          font-weight: 600;
          color: var(--accent);
          font-size: 0.9rem;
        }
        .panel-unit-badge {
          display: inline-block;
          padding: 2px 8px;
          border-radius: 10px;
          font-size: 0.65rem;
          font-weight: 600;
          text-transform: uppercase;
          margin-top: 4px;
        }
        .panel-unit-badge.available { background: var(--available); color: #000; }
        .panel-unit-badge.pending { background: var(--pending); color: #000; }
        .panel-unit-badge.sold { background: var(--sold); color: #fff; }
        .panel-unit-badge.coming-soon { background: var(--coming-soon); color: #fff; }
    
        /* ─── UNITS SIDEBAR ─── */
        #units-sidebar {
          position: fixed;
          top: 0;
          left: 0;
          width: 340px;
          max-width: 85%;
          height: 100%;
          background: var(--surface);
          border-right: 1px solid var(--border);
          transform: translateX(-100%);
          transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
          z-index: 350;
          display: flex;
          flex-direction: column;
          overflow: hidden;
        }
        #units-sidebar.open { transform: translateX(0); }
        .sidebar-header {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 20px;
          border-bottom: 1px solid var(--border);
          flex-shrink: 0;
        }
        .sidebar-title {
          font-family: 'Playfair Display', serif;
          font-size: 1.1rem;
          font-weight: 500;
        }
        .sidebar-close {
          width: 32px;
          height: 32px;
          border-radius: 50%;
          background: var(--surface-alt);
          border: 1px solid var(--border);
          color: var(--text);
          font-size: 1rem;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: background 0.2s;
        }
        .sidebar-close:hover { background: rgba(255,255,255,0.1); }
        .sidebar-filters {
          display: flex;
          gap: 8px;
          padding: 16px 20px;
          border-bottom: 1px solid var(--border);
          flex-shrink: 0;
          overflow-x: auto;
        }
        .sidebar-filter {
          padding: 6px 14px;
          border: 1px solid var(--border);
          border-radius: 20px;
          background: transparent;
          color: var(--text-muted);
          font-size: 0.75rem;
          font-weight: 500;
          cursor: pointer;
          white-space: nowrap;
          transition: all 0.2s;
        }
        .sidebar-filter:hover {
          border-color: var(--accent);
          color: var(--text);
        }
        .sidebar-filter.active {
          background: var(--accent);
          border-color: var(--accent);
          color: var(--bg);
        }
        .sidebar-stats {
          display: flex;
          gap: 12px;
          padding: 12px 20px;
          background: var(--surface-alt);
          border-bottom: 1px solid var(--border);
          flex-shrink: 0;
        }
        .sidebar-stat {
          display: flex;
          align-items: center;
          gap: 6px;
          font-size: 0.75rem;
          color: var(--text-muted);
        }
        .sidebar-stat-dot {
          width: 8px;
          height: 8px;
          border-radius: 50%;
        }
        .sidebar-stat-count {
          font-weight: 600;
          color: var(--text);
        }
        .sidebar-body {
          flex: 1;
          overflow-y: auto;
          padding: 16px;
        }
        .sidebar-group {
          margin-bottom: 20px;
        }
        .sidebar-group:last-child { margin-bottom: 0; }
        .sidebar-group-header {
          display: flex;
          align-items: center;
          gap: 8px;
          padding: 8px 12px;
          background: var(--surface-alt);
          border-radius: 8px;
          margin-bottom: 10px;
          cursor: pointer;
          transition: background 0.2s;
        }
        .sidebar-group-header:hover { background: rgba(255,255,255,0.08); }
        .sidebar-group-icon {
          width: 8px;
          height: 8px;
          border-radius: 50%;
        }
        .sidebar-group-name {
          flex: 1;
          font-size: 0.85rem;
          font-weight: 500;
        }
        .sidebar-group-count {
          font-size: 0.7rem;
          color: var(--text-muted);
          background: var(--surface);
          padding: 2px 8px;
          border-radius: 10px;
        }
        .sidebar-unit {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 12px 14px;
          background: var(--surface-alt);
          border: 1px solid var(--border);
          border-radius: 10px;
          margin-bottom: 8px;
          cursor: pointer;
          transition: all 0.2s;
        }
        .sidebar-unit:last-child { margin-bottom: 0; }
        .sidebar-unit:hover {
          border-color: var(--accent);
          background: rgba(201,169,98,0.05);
          transform: translateX(4px);
        }
        .sidebar-unit-left {
          display: flex;
          align-items: center;
          gap: 10px;
        }
        .sidebar-unit-status {
          width: 8px;
          height: 8px;
          border-radius: 50%;
          flex-shrink: 0;
        }
        .sidebar-unit-info {
          min-width: 0;
        }
        .sidebar-unit-name {
          font-size: 0.85rem;
          font-weight: 500;
          margin-bottom: 2px;
        }
        .sidebar-unit-details {
          font-size: 0.7rem;
          color: var(--text-muted);
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        .sidebar-unit-right {
          text-align: right;
          flex-shrink: 0;
        }
        .sidebar-unit-price {
          font-size: 0.85rem;
          font-weight: 600;
          color: var(--accent);
        }
        .sidebar-unit-location {
          font-size: 0.65rem;
          color: var(--text-muted);
          display: flex;
          align-items: center;
          gap: 4px;
          justify-content: flex-end;
          margin-top: 2px;
        }
        .sidebar-unit-location svg {
          width: 10px;
          height: 10px;
          stroke: currentColor;
          stroke-width: 2;
          fill: none;
        }
        .sidebar-empty {
          text-align: center;
          padding: 40px 20px;
          color: var(--text-muted);
        }
        .sidebar-empty svg {
          width: 48px;
          height: 48px;
          stroke: var(--border);
          stroke-width: 1.5;
          fill: none;
          margin-bottom: 12px;
        }
        .sidebar-empty-text {
          font-size: 0.9rem;
        }
    
        /* ─── QUICK ACCESS BUTTON ─── */
        #quick-access-btn {
          position: fixed;
          top: 50%;
          left: 0;
          transform: translateY(-50%);
          z-index: 100;
          display: flex;
          align-items: center;
          gap: 8px;
          padding: 12px 16px 12px 12px;
          background: var(--accent);
          color: var(--bg);
          border: none;
          border-radius: 0 12px 12px 0;
          font-size: 0.8rem;
          font-weight: 600;
          cursor: pointer;
          box-shadow: 4px 0 20px rgba(0,0,0,0.3);
          transition: all 0.25s ease;
        }
        #quick-access-btn:hover {
          padding-left: 16px;
          background: #d4b66d;
        }
        #quick-access-btn svg {
          width: 18px;
          height: 18px;
          stroke: currentColor;
          stroke-width: 2;
          fill: none;
        }
        #quick-access-btn .btn-count {
          background: var(--bg);
          color: var(--accent);
          padding: 2px 8px;
          border-radius: 10px;
          font-size: 0.7rem;
        }
        #units-sidebar.open ~ #quick-access-btn {
          transform: translateY(-50%) translateX(340px);
        }
    
        @media (max-width: 680px) {
          #units-sidebar {
            width: 100%;
            max-width: 100%;
          }
          #quick-access-btn {
            top: auto;
            bottom: 160px;
            left: 50%;
            transform: translateX(-50%);
            border-radius: 12px;
            padding: 10px 16px;
          }
          #quick-access-btn:hover {
            padding-left: 16px;
          }
          #units-sidebar.open ~ #quick-access-btn {
            transform: translateX(-50%) translateY(100px);
            opacity: 0;
            pointer-events: none;
          }
        }
    
        /* ─── TOGGLE BUTTONS ─── */
        .toggle-group {
          position: fixed;
          z-index: 100;
          display: flex;
          background: var(--surface);
          border: 1px solid var(--border);
          border-radius: 9999px;
          padding: 4px;
          backdrop-filter: blur(12px);
          box-shadow: 0 8px 32px rgba(0,0,0,0.3);
        }
        #season-toggle {
          bottom: 24px;
          left: 24px;
        }
        #layer-toggle {
          bottom: 24px;
          right: 24px;
        }
        .toggle-btn {
          display: flex;
          align-items: center;
          gap: 6px;
          padding: 8px 16px;
          border: none;
          border-radius: 9999px;
          background: transparent;
          color: var(--text-muted);
          font-size: 0.8rem;
          font-weight: 500;
          cursor: pointer;
          transition: all 0.25s ease;
        }
        .toggle-btn.active {
          background: var(--accent);
          color: var(--bg);
        }
        .toggle-btn svg {
          width: 16px;
          height: 16px;
          stroke: currentColor;
          stroke-width: 2;
          fill: none;
        }
        .toggle-btn.active svg {
          stroke: var(--bg);
        }
    
        /* ─── INVENTORY EDITOR MODAL ─── */
        #editor-overlay {
          position: fixed;
          inset: 0;
          background: rgba(0,0,0,0.7);
          opacity: 0;
          pointer-events: none;
          transition: opacity 0.3s ease;
          z-index: 400;
        }
        #editor-overlay.open {
          opacity: 1;
          pointer-events: auto;
        }
        #editor-modal {
          position: fixed;
          top: 50%;
          left: 50%;
          transform: translate(-50%, -50%) scale(0.95);
          width: 90%;
          max-width: 900px;
          max-height: 85vh;
          background: var(--surface);
          border: 1px solid var(--border);
          border-radius: 16px;
          overflow: hidden;
          opacity: 0;
          pointer-events: none;
          transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
          z-index: 450;
          display: flex;
          flex-direction: column;
        }
        #editor-modal.open {
          opacity: 1;
          pointer-events: auto;
          transform: translate(-50%, -50%) scale(1);
        }
        .editor-header {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 20px 24px;
          border-bottom: 1px solid var(--border);
          flex-shrink: 0;
        }
        .editor-header-left {
          display: flex;
          align-items: center;
          gap: 16px;
        }
        .editor-title {
          font-family: 'Playfair Display', serif;
          font-size: 1.25rem;
          font-weight: 500;
        }
        .editor-add-btn {
          display: flex;
          align-items: center;
          gap: 6px;
          padding: 8px 14px;
          background: var(--accent);
          color: var(--bg);
          border: none;
          border-radius: 8px;
          font-size: 0.8rem;
          font-weight: 600;
          cursor: pointer;
          transition: background 0.2s;
        }
        .editor-add-btn:hover { background: #d4b66d; }
        .editor-add-btn svg {
          width: 14px;
          height: 14px;
          stroke: currentColor;
          stroke-width: 2.5;
          fill: none;
        }
        .editor-close {
          width: 32px;
          height: 32px;
          border-radius: 50%;
          background: var(--surface-alt);
          border: 1px solid var(--border);
          color: var(--text);
          font-size: 1rem;
          cursor: pointer;
          display: flex;
          align-items: center;
          justify-content: center;
          transition: background 0.2s;
        }
        .editor-close:hover { background: rgba(255,255,255,0.1); }
        .editor-body {
          flex: 1;
          overflow-y: auto;
          padding: 24px;
        }
        .editor-category {
          margin-bottom: 28px;
        }
        .editor-category:last-child { margin-bottom: 0; }
        .editor-category-header {
          display: flex;
          align-items: center;
          gap: 10px;
          margin-bottom: 16px;
          padding-bottom: 10px;
          border-bottom: 1px solid var(--border);
        }
        .editor-category-icon {
          width: 32px;
          height: 32px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: var(--surface-alt);
          border-radius: 8px;
        }
        .editor-category-icon svg {
          width: 18px;
          height: 18px;
          stroke: var(--accent);
          stroke-width: 1.5;
          fill: none;
        }
        .editor-category-title {
          font-size: 0.9rem;
          font-weight: 600;
          color: var(--text);
        }
        .editor-category-count {
          font-size: 0.75rem;
          color: var(--text-muted);
          background: var(--surface-alt);
          padding: 2px 8px;
          border-radius: 10px;
        }
        .editor-card {
          background: var(--surface-alt);
          border: 1px solid var(--border);
          border-radius: 12px;
          margin-bottom: 16px;
          overflow: hidden;
          transition: border-color 0.3s, box-shadow 0.3s;
        }
        .editor-card.highlight {
          border-color: var(--accent);
          box-shadow: 0 0 20px var(--accent-glow);
        }
        .editor-card-header {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 14px 18px;
          cursor: pointer;
          transition: background 0.2s;
        }
        .editor-card-header:hover { background: rgba(255,255,255,0.03); }
        .editor-card-title {
          font-weight: 500;
          display: flex;
          align-items: center;
          gap: 10px;
        }
        .editor-card-status {
          width: 8px;
          height: 8px;
          border-radius: 50%;
        }
        .editor-card-actions {
          display: flex;
          align-items: center;
          gap: 8px;
        }
        .editor-card-delete {
          width: 28px;
          height: 28px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: transparent;
          border: 1px solid transparent;
          border-radius: 6px;
          color: var(--text-muted);
          cursor: pointer;
          opacity: 0;
          transition: all 0.2s;
        }
        .editor-card:hover .editor-card-delete { opacity: 1; }
        .editor-card-delete:hover {
          background: rgba(239,68,68,0.1);
          border-color: rgba(239,68,68,0.3);
          color: var(--sold);
        }
        .editor-card-delete svg {
          width: 14px;
          height: 14px;
          stroke: currentColor;
          stroke-width: 2;
          fill: none;
        }
        .editor-card-toggle {
          font-size: 0.8rem;
          color: var(--text-muted);
          transition: transform 0.3s;
        }
        .editor-card.expanded .editor-card-toggle { transform: rotate(180deg); }
        .editor-card-body {
          display: none;
          padding: 0 18px 18px;
        }
        .editor-card.expanded .editor-card-body { display: block; }
        
        /* ─── UNITS SECTION ─── */
        .editor-units {
          margin-top: 16px;
          padding-top: 16px;
          border-top: 1px solid var(--border);
        }
        .editor-units-header {
          display: flex;
          align-items: center;
          justify-content: space-between;
          margin-bottom: 12px;
        }
        .editor-units-title {
          font-size: 0.75rem;
          font-weight: 600;
          text-transform: uppercase;
          letter-spacing: 0.05em;
          color: var(--text-muted);
        }
        .editor-units-add {
          display: flex;
          align-items: center;
          gap: 4px;
          padding: 4px 10px;
          background: transparent;
          border: 1px solid var(--border);
          border-radius: 6px;
          color: var(--text-muted);
          font-size: 0.7rem;
          font-weight: 500;
          cursor: pointer;
          transition: all 0.2s;
        }
        .editor-units-add:hover {
          background: var(--accent);
          border-color: var(--accent);
          color: var(--bg);
        }
        .editor-units-add svg {
          width: 12px;
          height: 12px;
          stroke: currentColor;
          stroke-width: 2.5;
          fill: none;
        }
        .editor-units-list {
          display: flex;
          flex-direction: column;
          gap: 8px;
        }
        .editor-unit {
          background: var(--surface);
          border: 1px solid var(--border);
          border-radius: 8px;
          overflow: hidden;
        }
        .editor-unit.highlight {
          border-color: var(--accent);
          box-shadow: 0 0 12px var(--accent-glow);
        }
        .editor-unit-header {
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 10px 12px;
          cursor: pointer;
          transition: background 0.2s;
        }
        .editor-unit-header:hover { background: rgba(255,255,255,0.02); }
        .editor-unit-info {
          display: flex;
          align-items: center;
          gap: 8px;
        }
        .editor-unit-status {
          width: 6px;
          height: 6px;
          border-radius: 50%;
        }
        .editor-unit-name {
          font-size: 0.8rem;
          font-weight: 500;
        }
        .editor-unit-price {
          font-size: 0.75rem;
          color: var(--accent);
        }
        .editor-unit-actions {
          display: flex;
          align-items: center;
          gap: 6px;
        }
        .editor-unit-delete {
          width: 24px;
          height: 24px;
          display: flex;
          align-items: center;
          justify-content: center;
          background: transparent;
          border: none;
          border-radius: 4px;
          color: var(--text-muted);
          cursor: pointer;
          opacity: 0;
          transition: all 0.2s;
        }
        .editor-unit:hover .editor-unit-delete { opacity: 1; }
        .editor-unit-delete:hover {
          background: rgba(239,68,68,0.1);
          color: var(--sold);
        }
        .editor-unit-delete svg {
          width: 12px;
          height: 12px;
          stroke: currentColor;
          stroke-width: 2;
          fill: none;
        }
        .editor-unit-toggle {
          font-size: 0.65rem;
          color: var(--text-muted);
          transition: transform 0.2s;
        }
        .editor-unit.expanded .editor-unit-toggle { transform: rotate(180deg); }
        .editor-unit-body {
          display: none;
          padding: 0 12px 12px;
        }
        .editor-unit.expanded .editor-unit-body { display: block; }
        .editor-unit-grid {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
          gap: 10px;
        }
        .editor-unit-field {
          display: flex;
          flex-direction: column;
          gap: 4px;
        }
        .editor-unit-field label {
          font-size: 0.65rem;
          font-weight: 600;
          text-transform: uppercase;
          letter-spacing: 0.05em;
          color: var(--text-muted);
        }
        .editor-unit-field input,
        .editor-unit-field select {
          padding: 8px 10px;
          background: var(--surface-alt);
          border: 1px solid var(--border);
          border-radius: 6px;
          color: var(--text);
          font-size: 0.8rem;
          font-family: inherit;
          transition: border-color 0.2s;
        }
        .editor-unit-field input:focus,
        .editor-unit-field select:focus {
          outline: none;
          border-color: var(--accent);
        }
        .editor-no-units {
          padding: 16px;
          text-align: center;
          color: var(--text-muted);
          font-size: 0.8rem;
          background: var(--surface);
          border: 1px dashed var(--border);
          border-radius: 8px;
        }
        
        .editor-grid {
          display: grid;
          grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
          gap: 12px;
        }
        .editor-field {
          display: flex;
          flex-direction: column;
          gap: 6px;
        }
        .editor-field label {
          font-size: 0.7rem;
          font-weight: 600;
          text-transform: uppercase;
          letter-spacing: 0.05em;
          color: var(--text-muted);
        }
        .editor-field input,
        .editor-field select {
          padding: 10px 12px;
          background: var(--surface);
          border: 1px solid var(--border);
          border-radius: 8px;
          color: var(--text);
          font-size: 0.85rem;
          font-family: inherit;
          transition: border-color 0.2s;
        }
        .editor-field input:focus,
        .editor-field select:focus {
          outline: none;
          border-color: var(--accent);
        }
        .editor-footer {
          padding: 16px 24px;
          border-top: 1px solid var(--border);
          display: flex;
          justify-content: flex-end;
          gap: 12px;
          flex-shrink: 0;
        }
    
        /* ─── ADMIN MODE ─── */
        .admin-only {
          display: none !important;
        }
        body.admin-mode .admin-only {
          display: flex !important;
        }
        body.admin-mode .admin-only-block {
          display: block !important;
        }
        body.admin-mode .admin-only-inline {
          display: inline !important;
        }
    
        /* Admin badge */
        #admin-badge {
          position: fixed;
          top: 12px;
          left: 50%;
          transform: translateX(-50%);
          padding: 6px 16px;
          background: rgba(239,68,68,0.15);
          border: 1px solid rgba(239,68,68,0.3);
          border-radius: 9999px;
          font-size: 0.7rem;
          font-weight: 600;
          color: #ef4444;
          text-transform: uppercase;
          letter-spacing: 0.1em;
          z-index: 500;
          display: none;
          align-items: center;
          gap: 8px;
          backdrop-filter: blur(8px);
          cursor: pointer;
          transition: all 0.2s;
        }
        #admin-badge:hover {
          background: rgba(239,68,68,0.25);
        }
        body.admin-mode #admin-badge {
          display: flex;
        }
        #admin-badge svg {
          width: 12px;
          height: 12px;
          stroke: currentColor;
          stroke-width: 2;
          fill: none;
        }
    
        /* Admin login overlay */
        #admin-login {
          position: fixed;
          inset: 0;
          background: rgba(0,0,0,0.8);
          z-index: 600;
          display: none;
          align-items: center;
          justify-content: center;
          backdrop-filter: blur(4px);
        }
        #admin-login.open {
          display: flex;
        }
        .admin-login-box {
          background: var(--surface);
          border: 1px solid var(--border);
          border-radius: 16px;
          padding: 32px;
          width: 340px;
          max-width: 90%;
          text-align: center;
        }
        .admin-login-box h3 {
          font-family: 'Playfair Display', serif;
          font-size: 1.2rem;
          font-weight: 500;
          margin-bottom: 6px;
        }
        .admin-login-box p {
          font-size: 0.8rem;
          color: var(--text-muted);
          margin-bottom: 20px;
        }
        .admin-login-box input {
          width: 100%;
          padding: 12px 16px;
          background: var(--surface-alt);
          border: 1px solid var(--border);
          border-radius: 10px;
          color: var(--text);
          font-size: 0.9rem;
          font-family: inherit;
          text-align: center;
          letter-spacing: 0.15em;
          margin-bottom: 16px;
          transition: border-color 0.2s;
        }
        .admin-login-box input:focus {
          outline: none;
          border-color: var(--accent);
        }
        .admin-login-box input.error {
          border-color: var(--sold);
          animation: loginShake 0.4s ease;
        }
        @keyframes loginShake {
          0%, 100% { transform: translateX(0); }
          20% { transform: translateX(-6px); }
          40% { transform: translateX(6px); }
          60% { transform: translateX(-4px); }
          80% { transform: translateX(4px); }
        }
        .admin-login-actions {
          display: flex;
          gap: 10px;
        }
        .admin-login-actions button {
          flex: 1;
          padding: 10px;
          border-radius: 10px;
          font-size: 0.85rem;
          font-weight: 600;
          cursor: pointer;
          transition: all 0.2s;
          font-family: inherit;
        }
        .admin-login-cancel {
          background: transparent;
          border: 1px solid var(--border);
          color: var(--text-muted);
        }
        .admin-login-cancel:hover {
          background: rgba(255,255,255,0.05);
          color: var(--text);
        }
        .admin-login-submit {
          background: var(--accent);
          border: 1px solid var(--accent);
          color: var(--bg);
        }
        .admin-login-submit:hover {
          background: #d4b66d;
        }
    
        /* ─── ZOOM HINT ─── */
        #zoom-hint {
          position: fixed;
          bottom: 90px;
          left: 50%;
          transform: translateX(-50%);
          padding: 10px 18px;
          background: var(--surface);
          border: 1px solid var(--border);
          border-radius: 9999px;
          font-size: 0.8rem;
          color: var(--text-muted);
          opacity: 0;
          transition: opacity 0.4s ease;
          pointer-events: none;
          z-index: 50;
          backdrop-filter: blur(8px);
        }
        #zoom-hint.visible { opacity: 1; }
    
        /* ─── MOBILE BOTTOM SHEET ─── */
        @media (max-width: 680px) {
          header { padding: 0.75rem 1rem; }
          .logo-img { height: 40px; }
          .header-actions .btn span { display: none; }
          .header-actions .btn { padding: 0.5rem 0.75rem; }
    
          #detail-panel {
            top: auto;
            bottom: 0;
            left: 0;
            right: 0;
            width: 100%;
            height: 75vh;
            border-left: none;
            border-top: 1px solid var(--border);
            border-radius: 20px 20px 0 0;
            transform: translateY(100%);
          }
          #detail-panel.open { transform: translateY(0); }
          .panel-gallery { height: 180px; }
          .panel-drag-handle {
            display: block;
            width: 40px;
            height: 4px;
            background: var(--border);
            border-radius: 2px;
            margin: 10px auto;
          }
    
          #season-toggle,
          #layer-toggle {
            left: 50%;
            transform: translateX(-50%);
          }
          #season-toggle { bottom: 80px; }
          #layer-toggle { bottom: 24px; }
    
          #zoom-hint { bottom: 140px; }
        }



        /* ─── DESKTOP HIDE DRAG HANDLE ─── */
        @media (min-width: 681px) {
          .panel-drag-handle { display: none; }
        }

        #zoom-container{
            position:fixed;
            inset:0;
            z-index:1;
          }
          
          /* Leave OpenSeadragon internals alone */
          .openseadragon-container,
          .openseadragon-canvas{
            z-index:1;
          }

/* UI layers */
header,
#quick-access-btn,
.toggle-group,
#units-sidebar,
#tooltip,
#detail-panel,
#panel-overlay,
#editor-modal,
#editor-overlay,
#admin-badge{
  position:fixed;
  z-index:999999;
}