:root { --navy:#002b60; --ink:#122942; --muted:#596674; --line:#d9dfe5; --paper:#fff; --green:#2f9e62; --sold:#cfc6b3; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #eef1f0; color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
.m3d { display: flex; flex-direction: column; height: 100%; min-height: 100dvh; }
.is-embed .m3d { min-height: 0; }
.m3d-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px max(16px, env(safe-area-inset-left)); background: var(--navy); color: #fff; }
.is-embed .m3d-header { display: none; }
.m3d-back { color: #fff; text-decoration: none; font-size: 14px; font-weight: 500; opacity: .9; }
.m3d-back:hover { opacity: 1; text-decoration: underline; }
.m3d-title { display: flex; align-items: baseline; gap: 10px; font-size: 15px; }
.m3d-title span { opacity: .7; font-size: 13px; }
.m3d-stage { position: relative; flex: 1; min-height: 360px; overflow: hidden; touch-action: none; overscroll-behavior: contain; }
.is-embed .m3d-stage { touch-action: pan-y; }
.is-embed .m3d-stage.is-active { touch-action: none; }
.is-embed .m3d-stage:not(.is-active) .m3d-toolbar, .is-embed .m3d-stage:not(.is-active) .m3d-info { pointer-events: none; }
.m3d-exit { position: static; transform: none; min-height: 44px; z-index: 4; border: 0; border-radius: 999px; padding: 9px 16px; background: var(--navy); color: #fff; font: inherit; font-size: 13px; font-weight: 600; box-shadow: 0 8px 22px rgba(0,27,60,.3); cursor: pointer; }
.m3d-exit[hidden] { display: none; }
.m3d-stage canvas { display: block; width: 100%; height: 100%; outline: none; }
.m3d-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; text-align: center; font-size: 15px; color: var(--muted); background: #eef1f0; z-index: 5; }
.m3d-loading[hidden] { display: none; }

.m3d-toolbar { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; z-index: 3; pointer-events: none; }
.m3d-toolbar > * { pointer-events: auto; }
.m3d-group { display: inline-flex; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 999px; padding: 3px; box-shadow: 0 4px 14px rgba(7,27,43,.10); }
.m3d-group button, .m3d-icon, .m3d-check { font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); background: transparent; border: 0; border-radius: 999px; padding: 7px 12px; cursor: pointer; white-space: nowrap; }
.m3d-group button:hover { background: #eef2f6; }
.m3d-group button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.m3d-check { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.94); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(7,27,43,.10); }
.m3d-check input { accent-color: var(--navy); margin: 0; }
.m3d-icon { margin-left: auto; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; font-size: 18px; background: rgba(255,255,255,.94); border: 1px solid var(--line); box-shadow: 0 4px 14px rgba(7,27,43,.10); }
.m3d-group button:focus-visible, .m3d-exit:focus-visible, .m3d-info-close:focus-visible, .m3d-zoom button:focus-visible, .m3d-icon:focus-visible, .m3d-btn:focus-visible, .m3d-activate:focus-visible { outline: 3px solid #45c07f; outline-offset: 2px; }

.m3d-legend { position: absolute; left: 12px; bottom: 44px; display: flex; gap: 14px; padding: 8px 14px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 999px; font-size: 13px; z-index: 3; box-shadow: 0 4px 14px rgba(7,27,43,.10); }
.m3d-legend span { display: inline-flex; align-items: center; gap: 6px; }
.m3d-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.m3d-legend .is-available { background: var(--green); }
.m3d-legend .is-sold { background: var(--sold); }

.m3d-compass { position: absolute; right: 12px; bottom: 44px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.94); border: 1px solid var(--line); display: grid; place-items: center; z-index: 3; box-shadow: 0 4px 14px rgba(7,27,43,.10); }
.m3d-compass > div { width: 30px; height: 30px; position: relative; display: grid; place-items: start center; }
.m3d-compass > div::before { content: ""; position: absolute; left: 50%; top: 9px; transform: translateX(-50%); border: 6px solid transparent; border-bottom: 14px solid #c0392b; border-top: 0; }
.m3d-compass span { font-size: 9px; font-weight: 700; line-height: 1; color: var(--navy); }

.m3d-info { position: absolute; right: 12px; top: 64px; width: min(300px, calc(100% - 24px)); background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 16px 14px; box-shadow: 0 14px 40px rgba(7,27,43,.18); z-index: 4; }
.m3d-info[hidden] { display: none; }
.m3d-info h2 { margin: 2px 0 4px; font-size: 24px; font-weight: 500; letter-spacing: -.5px; color: var(--navy); }
.m3d-info-meta { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.m3d-info-status { display: inline-block; margin: 0; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eef1f4; color: var(--muted); }
.m3d-info-status[data-status="available"] { background: #e3f4ea; color: #1d7a48; }
.m3d-info-status[data-status="sold"] { background: #f1ede5; color: #7b705c; }
.m3d-info-close { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: #f1f3f5; color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.m3d-info-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.m3d-btn { display: inline-flex; align-items: center; justify-content: center; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--navy); color: var(--navy); font-size: 13px; font-weight: 600; text-decoration: none; }
.m3d-btn.primary { background: #176b3b; border-color: #176b3b; color: #fff; }
.m3d-btn[hidden] { display: none; }

.m3d-note { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 7px 14px; font-size: 11px; line-height: 1.35; color: #4b5866; background: rgba(255,255,255,.82); z-index: 2; }

.m3d-activate { position: absolute; inset: 0; z-index: 5; touch-action: pan-y; display: grid; place-content: center; gap: 6px; border: 0; background: linear-gradient(180deg, rgba(0,43,96,.08), rgba(0,43,96,.28)); color: #fff; font: inherit; cursor: pointer; text-align: center; }
.m3d-activate span { background: var(--navy); padding: 13px 22px; border-radius: 999px; font-size: 15px; font-weight: 600; box-shadow: 0 10px 28px rgba(0,27,60,.35); }
.m3d-activate small { font-size: 12px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.m3d-activate[hidden] { display: none; }

@media (max-width: 640px) {
  .m3d-toolbar { top: 8px; left: 8px; right: 8px; gap: 6px; }
  .m3d-group button, .m3d-check { font-size: 12px; padding: 6px 9px; }
  .m3d-info { top: auto; bottom: 88px; right: 8px; left: 8px; width: auto; }
  .m3d-legend { left: 8px; bottom: 54px; font-size: 12px; padding: 6px 11px; }
  .m3d-compass { right: 8px; bottom: 54px; }
  .m3d-note { font-size: 10px; padding: 6px 10px; }
  .m3d-info { bottom: 100px; }
  .m3d-exit { bottom: 96px; }
}

.m3d-tour { font-weight: 600 !important; color: #1d7a48 !important; }
.m3d-tour[aria-pressed="true"] { background: #1d7a48 !important; color: #fff !important; }
.m3d-zoom { position: absolute; right: 12px; bottom: 98px; display: flex; flex-direction: column; z-index: 3; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 14px rgba(7,27,43,.10); }
.m3d-zoom button { width: 42px; height: 40px; border: 0; background: transparent; font: inherit; font-size: 20px; color: var(--ink); cursor: pointer; }
.m3d-zoom button + button { border-top: 1px solid var(--line); }
.m3d-zoom button:hover { background: #eef2f6; }
@media (max-width: 640px) { .m3d-zoom { display: none; } }
.m3d-legend{flex-wrap:wrap;max-width:calc(100% - 74px);border-radius:8px}
.m3d-group{max-width:100%;flex-wrap:wrap;border-radius:8px}
.m3d-group button{min-height:40px;letter-spacing:0}
.m3d-info h2{letter-spacing:0}
.m3d-note #m3d-catalog-status{display:block}
@media(max-width:640px){.m3d-title span{display:none}.m3d-title strong{font-size:13px}.m3d-back{font-size:12px}.m3d-legend,.m3d-compass{bottom:74px}.m3d-exit{bottom:124px}.m3d-info{bottom:168px}}

#m3d-count-extra[hidden]{display:none}
.m3d-toolbar button{min-height:44px}
.m3d-group button,.m3d-exit,.m3d-btn{transition:background-color .18s ease,color .18s ease,box-shadow .18s ease}
.m3d-info{animation:m3d-panel-in .22s ease-out both}
@keyframes m3d-panel-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.m3d-info{animation:none}.m3d-toolbar button,.m3d-exit,.m3d-btn{transition:none}}
