/*
 * Maquete 3D (guide-scene): canvas and the projected labels layer created by scene/scene.js.
 * The stage container itself (size, radius, background, overlays) is styled by guide.css.
 * Label colours are token-based and darkened with color-mix so white text keeps AA contrast in both themes.
 */
.hb-scene-canvas {
    display: block;
    width: 100%;
    height: 100%;
    touch-action: pan-y;
    cursor: grab;
    -webkit-tap-highlight-color: transparent;
}
.hb-scene-canvas:active { cursor: grabbing; }
.hb-scene-canvas:focus { outline: none; }
.hb-scene-canvas:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--hb-primary); border-radius: inherit; }
.hb-scene--full .hb-scene-canvas { touch-action: none; }
.hb-scene--look .hb-scene-canvas { cursor: move; }

.hb-scene-labels {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    contain: strict;
    z-index: 1;
}

.hb-label {
    --hb-label-bg: color-mix(in srgb, var(--hb-night) 82%, transparent);
    --hb-label-fg: #fff;
    position: absolute;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 230px;
    margin: 0;
    padding: 3px 9px 4px;
    border: 0;
    border-radius: var(--hb-radius-pill);
    background: var(--hb-label-bg);
    color: var(--hb-label-fg);
    font: 600 12px/1.25 var(--hb-font-body);
    letter-spacing: .005em;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 4px 14px rgba(0, 0, 0, .14);
    will-change: transform;
    user-select: none;
}
.hb-label__text,
.hb-label__sub { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hb-label__sub { font-size: 11px; font-weight: 500; opacity: .9; }

.hb-label--pin::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    width: 2px;
    height: 10px;
    margin-left: -1px;
    background: var(--hb-label-bg);
}
.hb-label--pin::before {
    content: "";
    position: absolute;
    left: 50%;
    top: calc(100% + 8px);
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: var(--hb-label-bg);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .8);
}

.hb-label--tower { --hb-label-bg: color-mix(in srgb, var(--hb-night) 86%, transparent); font-weight: 700; letter-spacing: .02em; }
.hb-label--home { --hb-label-bg: color-mix(in srgb, var(--hb-home) 80%, #000); font-size: 13px; font-weight: 700; padding: 4px 11px 5px; z-index: 3; }
.hb-label--spot,
.hb-label--parking { --hb-label-bg: color-mix(in srgb, var(--hb-park) 82%, #000); z-index: 2; }
.hb-label--dest { --hb-label-bg: color-mix(in srgb, var(--hb-primary) 88%, #000); width: max-content; max-width: min(280px, 78vw); padding: 5px 12px 6px; border-radius: var(--hb-radius); white-space: normal; z-index: 2; }
.hb-label--dest .hb-label__text,
.hb-label--dest .hb-label__sub { white-space: normal; overflow: visible; }
.hb-label--dest .hb-label__text { font-size: 13px; font-weight: 700; }
.hb-label--wind { --hb-label-bg: color-mix(in srgb, var(--hb-breeze) 72%, #000); }
.hb-label--gate { --hb-label-bg: color-mix(in srgb, var(--hb-primary) 82%, #000); }
.hb-label--neighbor { --hb-label-bg: color-mix(in srgb, var(--hb-night) 62%, transparent); font-weight: 500; }

.hb-label--amenity,
.hb-label--poi,
.hb-label--landmark {
    --hb-label-bg: var(--hb-surface);
    --hb-label-fg: var(--hb-ink);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 6px;
    border: 1px solid var(--hb-line);
}
.hb-label--amenity .hb-label__text::before,
.hb-label--poi .hb-label__text::before,
.hb-label--landmark .hb-label__text::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--hb-label-dot, var(--hb-muted));
    vertical-align: 0;
}
.hb-label--amenity .hb-label__sub,
.hb-label--poi .hb-label__sub,
.hb-label--landmark .hb-label__sub { color: var(--hb-muted); opacity: 1; }
.hb-label--landmark { font-weight: 700; }

.hb-label--interactive { pointer-events: auto; cursor: pointer; }
.hb-label--interactive:hover { box-shadow: 0 0 0 2px var(--hb-primary), 0 4px 14px rgba(0, 0, 0, .18); }

@media (max-width: 640px) {
    .hb-label { font-size: 11px; max-width: 170px; padding: 3px 8px; }
    .hb-label__sub { font-size: 10px; }
    .hb-label--home { font-size: 12px; }
    .hb-label--dest .hb-label__text { font-size: 12px; }
}
