/*
 * Habitaria — guia 3D por apartamento (resources/views/guide/*).
 * Usa os tokens de tokens.css. Exceção documentada: o palco 3D tem paleta escura fixa
 * (--stage-*), igual nos temas claro e escuro, porque a cena 3D não muda de tema.
 * Mobile first: uma coluna; a partir de 1100 px, palco fixo à esquerda e painel rolando à direita.
 */

.hb-guide {
    /* Paleta fixa das superfícies escuras (palco 3D, foto da varanda, chamada final). */
    --hb-dark-bg: #0f1424;
    --hb-dark-ink: #eef1f8;
    --hb-dark-muted: #aab2c8;
    --hb-dark-glass: rgba(12, 16, 31, .62);
    --hb-dark-glass-strong: rgba(12, 16, 31, .84);
    --hb-dark-line: rgba(238, 241, 248, .14);
    --hb-dark-hover: rgba(238, 241, 248, .1);
    --hb-dark-accent: #f4b13d;
    --hb-dark-accent-hover: #f6c160;
    --hb-dark-accent-ink: #0f1424;
    --hb-dark-breeze: #45c4d1;
    --hb-dark-home: #ff6a70;
    --hb-dark-glow-sky: rgba(110, 140, 220, .22);
    --hb-dark-glow-sun: rgba(244, 177, 61, .22);
    --hb-header-h: 56px;
    --hb-nav-h: 52px;
    --hb-card-pad: 16px;
    --hb-panel-pad: var(--hb-gutter);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ------------------------------------------------------------------ base */

.hb-guide h1, .hb-guide h2, .hb-guide h3 {
    font-family: var(--hb-font-display);
    letter-spacing: -.015em;
    line-height: 1.12;
    margin: 0;
    text-wrap: balance;
}
.hb-guide p { margin: 0; }
.hb-guide a { color: var(--hb-primary); text-underline-offset: 3px; }
.hb-guide button { cursor: pointer; }
.hb-guide button:disabled { cursor: not-allowed; }

.hb-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.hb-ic {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hb-skip {
    position: absolute;
    left: var(--hb-gutter);
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--hb-radius-pill);
    background: var(--hb-ink);
    color: var(--hb-paper);
    font-weight: 600;
    text-decoration: none;
}
.hb-skip:focus { top: 8px; }

.hb-preview {
    display: flex;
    align-items: center;
    gap: var(--hb-space-2);
    padding: 10px var(--hb-gutter);
    background: var(--hb-sun-soft);
    color: var(--hb-ink);
    font-size: var(--hb-text-sm);
    border-bottom: 1px solid var(--hb-line);
}

.hb-eyebrow {
    font-size: var(--hb-text-xs);
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--hb-muted);
}
.hb-muted { color: var(--hb-muted); }
.hb-note {
    display: flex;
    gap: var(--hb-space-2);
    align-items: flex-start;
    color: var(--hb-muted);
    font-size: var(--hb-text-sm);
}
.hb-note .hb-ic { width: 18px; height: 18px; margin-top: 2px; }

/* ------------------------------------------------------------------ buttons, chips, tags */

.hb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--hb-space-2);
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--hb-radius-pill);
    font-weight: 600;
    font-size: var(--hb-text-sm);
    line-height: 1.2;
    text-decoration: none;
    transition: background-color .2s var(--hb-ease), color .2s var(--hb-ease), border-color .2s var(--hb-ease), transform .2s var(--hb-ease);
}
.hb-btn:active:not(:disabled) { transform: scale(.98); }
.hb-btn--primary { background: var(--hb-primary); color: var(--hb-on-primary); }
.hb-guide a.hb-btn--primary { color: var(--hb-on-primary); }
.hb-btn--primary:hover:not(:disabled) { background: var(--hb-primary-strong); }
.hb-btn--primary:disabled { opacity: .5; }
.hb-btn--quiet { background: var(--hb-surface); border-color: var(--hb-line); color: var(--hb-ink); }
.hb-btn--quiet:hover:not(:disabled) { background: var(--hb-soft); }
.hb-btn--sm { min-height: 36px; padding: 0 14px; }
.hb-btn--sm .hb-ic { width: 18px; height: 18px; }

.hb-iconbtn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius-pill);
    background: var(--hb-surface);
    color: var(--hb-ink);
    transition: background-color .2s var(--hb-ease);
}
.hb-iconbtn:hover { background: var(--hb-soft); }

.hb-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius-pill);
    background: var(--hb-surface);
    color: var(--hb-ink);
    font-weight: 600;
    font-size: var(--hb-text-sm);
    white-space: nowrap;
    transition: background-color .2s var(--hb-ease), color .2s var(--hb-ease), border-color .2s var(--hb-ease);
}
.hb-chip:hover { border-color: var(--hb-primary); }
.hb-chip[aria-pressed="true"] { background: var(--hb-primary); border-color: var(--hb-primary); color: var(--hb-on-primary); }
.hb-chip--action { min-height: 36px; padding: 0 12px; color: var(--hb-primary); }
.hb-chip--action .hb-ic { width: 18px; height: 18px; }

.hb-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--hb-radius-pill);
    font-size: var(--hb-text-xs);
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.hb-badge--demo { background: var(--hb-sun-soft); color: var(--hb-ink); border: 1px solid var(--hb-line); }
.hb-badge--example { background: var(--hb-sun-soft); color: var(--hb-ink); }

.hb-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px;
    border-radius: var(--hb-radius-pill);
    background: var(--hb-soft);
    color: var(--hb-muted);
    font-family: var(--hb-font-mono);
    font-size: 11px;
    line-height: 1.6;
}
.hb-tag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hb-breeze);
}

.hb-seg {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}
.hb-seg__btn {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius-pill);
    background: var(--hb-surface);
    color: var(--hb-ink);
    font-size: var(--hb-text-sm);
    font-weight: 600;
}
.hb-seg__btn[aria-pressed="true"] { background: var(--hb-ink); border-color: var(--hb-ink); color: var(--hb-paper); }

.hb-toast {
    position: fixed;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom));
    z-index: 200;
    max-width: calc(100vw - 32px);
    padding: 10px 16px;
    border-radius: var(--hb-radius-pill);
    background: var(--hb-ink);
    color: var(--hb-paper);
    font-size: var(--hb-text-sm);
    font-weight: 600;
    box-shadow: var(--hb-shadow);
    transform: translate(-50%, 16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--hb-ease), transform .25s var(--hb-ease);
    overflow-wrap: anywhere;
}
.hb-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------------------------------------------ loading states */

.hb-skeleton {
    display: block;
    border-radius: var(--hb-radius-sm);
    background: var(--hb-soft);
}
.js .hb-skeleton { animation: hb-pulse 1.4s ease-in-out infinite; }
.no-js .hb-skeleton, .no-js .hb-skeleton-card { display: none; }
.hb-skeleton--chip { display: inline-block; width: 92px; height: 40px; border-radius: var(--hb-radius-pill); }
.hb-skeleton--keyplan { height: 150px; border-radius: var(--hb-radius); }
.hb-skeleton--title { width: 62%; height: 26px; margin-bottom: 14px; }
.hb-skeleton--line { height: 14px; margin-bottom: 10px; }
.hb-skeleton--short { width: 48%; }
.hb-skeleton--chart { height: 180px; }
.hb-skeleton--plan { height: 260px; border-radius: var(--hb-radius); }
.hb-skeleton--card { height: 92px; margin-bottom: 12px; border-radius: var(--hb-radius); }
@keyframes hb-pulse { 50% { opacity: .55; } }

.hb-spinner {
    width: 22px;
    height: 22px;
    flex: none;
    border-radius: 50%;
    border: 2.5px solid currentColor;
    border-right-color: transparent;
    opacity: .8;
    animation: hb-spin .9s linear infinite;
}
@keyframes hb-spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ header */

.hb-top {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: var(--hb-space-3);
    height: var(--hb-header-h);
    padding: 0 var(--hb-gutter);
    padding-left: max(var(--hb-gutter), env(safe-area-inset-left));
    padding-right: max(var(--hb-gutter), env(safe-area-inset-right));
    background: var(--hb-paper);
    background: color-mix(in srgb, var(--hb-paper) 86%, transparent);
    -webkit-backdrop-filter: saturate(1.5) blur(14px);
    backdrop-filter: saturate(1.5) blur(14px);
    border-bottom: 1px solid var(--hb-line);
}
.hb-guide .hb-top__brand {
    display: inline-flex;
    align-items: center;
    flex: none;
    color: var(--hb-ink);
    text-decoration: none;
}
.hb-top__brand svg { height: 26px; width: auto; max-width: 132px; }
@media (max-width: 519px) {
    .hb-top__brand svg { height: 22px; }
}
.hb-wordmark {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--hb-font-display);
    font-weight: 750;
    font-size: 1.15rem;
    letter-spacing: -.02em;
}
.hb-wordmark__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--hb-sun) 0 45%, var(--hb-primary) 46% 100%);
}
.hb-top__title {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    padding-left: var(--hb-space-3);
    border-left: 1px solid var(--hb-line);
    line-height: 1.2;
}
.hb-top__meta { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hb-top .hb-badge { padding: 1px 8px; font-size: 10.5px; }
.hb-top__name {
    font-weight: 700;
    font-size: var(--hb-text-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hb-top__place {
    color: var(--hb-muted);
    font-size: var(--hb-text-xs);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hb-top__share { flex: none; }

@media (max-width: 519px) {
    .hb-top__place { display: none; }
    .hb-top__share { width: 40px; min-height: 40px; padding: 0; }
    .hb-top__share-label {
        position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
        clip: rect(0, 0, 0, 0); white-space: nowrap;
    }
    .hb-wordmark { font-size: 0; gap: 0; }
    .hb-wordmark__dot { width: 18px; height: 18px; }
}

/* ------------------------------------------------------------------ app layout */

.hb-app {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding-bottom: env(safe-area-inset-bottom);
}

.hb-picker, .hb-report, .hb-foot, .hb-sectionnav { padding-left: var(--hb-panel-pad); padding-right: var(--hb-panel-pad); }

@media (min-width: 720px) {
    .hb-guide { --hb-card-pad: 20px; --hb-panel-pad: 24px; }
    .hb-app { max-width: 820px; margin: 0 auto; }
}

@media (min-width: 1100px) {
    .hb-guide { --hb-panel-pad: 28px; }
    .hb-app {
        max-width: none;
        grid-template-columns: minmax(0, 1fr) clamp(440px, 36vw, 580px);
        grid-template-areas:
            "stage picker"
            "stage nav"
            "stage report"
            "stage foot";
        grid-template-rows: auto auto 1fr auto;
        align-items: start;
    }
    .hb-picker { grid-area: picker; }
    .hb-sectionnav { grid-area: nav; }
    .hb-report { grid-area: report; }
    .hb-foot { grid-area: foot; }
    .hb-stage { grid-area: stage; }
}

/* ------------------------------------------------------------------ picker */

.hb-picker {
    padding-top: var(--hb-space-5);
    padding-bottom: var(--hb-space-5);
}
.hb-picker__title {
    margin-top: var(--hb-space-2);
    font-size: clamp(1.9rem, 1.45rem + 2.2vw, 2.6rem);
    font-weight: 760;
    line-height: 1.02;
}
.hb-picker__title em { font-style: normal; color: var(--hb-home); }
.hb-picker__lead {
    margin-top: var(--hb-space-3);
    color: var(--hb-muted);
    font-size: .95rem;
    max-width: 46ch;
}
.hb-picker__controls {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hb-space-4) var(--hb-space-5);
    margin-top: var(--hb-space-5);
}
.hb-field { display: flex; flex-direction: column; gap: var(--hb-space-2); min-width: 0; }
.hb-field--towers { flex: 1 1 220px; }
.hb-field--floor { flex: 0 0 auto; }
.hb-field--plan { margin-top: var(--hb-space-5); }
.hb-field__label {
    font-size: var(--hb-text-xs);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--hb-muted);
}
.hb-field__label small {
    margin-left: 6px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    font-size: var(--hb-text-xs);
}
.hb-chips { display: flex; flex-wrap: wrap; gap: var(--hb-space-2); }

.hb-stepper {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius-pill);
    background: var(--hb-surface);
}
.hb-stepper__btn {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--hb-soft);
    color: var(--hb-ink);
    transition: background-color .2s var(--hb-ease);
}
.hb-stepper__btn:hover:not(:disabled) { background: var(--hb-primary-soft); color: var(--hb-primary); }
.hb-stepper__btn:disabled { opacity: .35; }
.hb-stepper__select {
    min-width: 128px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--hb-radius-sm);
    background: transparent;
    font-weight: 700;
    text-align: center;
    text-align-last: center;
}

.hb-keyplan {
    margin-top: var(--hb-space-1);
    padding: var(--hb-space-2) var(--hb-space-1);
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius);
    background: var(--hb-surface);
}
.hb-keyplan__svg { width: 100%; height: auto; overflow: visible; }
.hb-keyplan__footprint { fill: var(--hb-soft); stroke: var(--hb-line); stroke-width: 1.5; }
.hb-keyplan__cell { cursor: pointer; outline: none; }
.hb-keyplan__cell rect {
    fill: var(--hb-surface);
    stroke: var(--hb-line);
    stroke-width: 1.4;
    transition: fill .2s var(--hb-ease), stroke .2s var(--hb-ease);
}
.hb-keyplan__cell text { fill: var(--hb-ink); font-weight: 650; pointer-events: none; font-variant-numeric: tabular-nums; }
.hb-keyplan__cell.is-sol rect { fill: var(--hb-sun-soft); stroke: var(--hb-sun); }
.hb-keyplan__cell.is-manha rect { fill: var(--hb-leaf-soft); stroke: var(--hb-leaf); }
.hb-keyplan__cell.is-tarde rect { fill: var(--hb-home-soft); stroke: var(--hb-home); }
.hb-keyplan__cell.is-sombra rect { fill: var(--hb-breeze-soft); stroke: var(--hb-breeze); }
.hb-keyplan__cell:hover rect { stroke-width: 2.4; }
.hb-keyplan__cell.is-selected rect { fill: var(--hb-ink); stroke: var(--hb-home); stroke-width: 3; }
.hb-keyplan__cell.is-selected text { fill: var(--hb-paper); }
.hb-keyplan__cell:focus-visible rect { stroke: var(--hb-primary); stroke-width: 3.6; }
.hb-keyplan__cell.is-missing { fill: none; stroke: var(--hb-line); stroke-dasharray: 3 3; }
.hb-keyplan__facades text { fill: var(--hb-muted); font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.hb-keyplan__north circle { fill: var(--hb-surface); stroke: var(--hb-line); }
.hb-keyplan__needle { fill: var(--hb-home); }
.hb-keyplan__n { fill: var(--hb-ink); font-size: 8px; font-weight: 800; }
.hb-keyplan__legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin-top: var(--hb-space-2);
    font-size: var(--hb-text-xs);
    color: var(--hb-muted);
}
.hb-keyplan__legend-title { font-weight: 600; }
.hb-keyplan__legend-item { display: inline-flex; align-items: center; gap: 6px; color: var(--hb-ink); }
.hb-swatch { width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid; }
.hb-swatch--sol { background: var(--hb-sun-soft); border-color: var(--hb-sun); }
.hb-swatch--manha { background: var(--hb-leaf-soft); border-color: var(--hb-leaf); }
.hb-swatch--tarde { background: var(--hb-home-soft); border-color: var(--hb-home); }
.hb-swatch--sombra { background: var(--hb-breeze-soft); border-color: var(--hb-breeze); }

.hb-unit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--hb-space-3);
    margin-top: var(--hb-space-4);
    padding: var(--hb-space-4);
    border-radius: var(--hb-radius);
    background: var(--hb-surface);
    border: 1px solid var(--hb-line);
    box-shadow: var(--hb-shadow-sm);
}
.hb-unit__text { min-width: 0; flex: 1 1 220px; }
.hb-unit__label {
    font-family: var(--hb-font-display);
    font-size: 1.4rem;
    font-weight: 750;
    letter-spacing: -.015em;
    line-height: 1.15;
}
.hb-unit__sub { margin-top: 4px; color: var(--hb-muted); font-size: var(--hb-text-sm); }
.hb-unit__actions { display: flex; align-items: center; gap: var(--hb-space-2); flex-wrap: wrap; }

/* ------------------------------------------------------------------ 3D stage */

.hb-stage {
    --stage-bg: var(--hb-dark-bg);
    --stage-ink: var(--hb-dark-ink);
    --stage-muted: var(--hb-dark-muted);
    --stage-glass: var(--hb-dark-glass);
    --stage-glass-strong: var(--hb-dark-glass-strong);
    --stage-line: var(--hb-dark-line);
    --stage-hover: var(--hb-dark-hover);
    --stage-accent: var(--hb-dark-accent);
    --stage-accent-ink: var(--hb-dark-accent-ink);
    position: relative;
    color: var(--stage-ink);
    background: var(--stage-bg);
    scroll-margin-top: var(--hb-header-h);
}
.hb-stage__view {
    position: relative;
    height: 62vh;
    height: 62svh;
    min-height: 340px;
    max-height: 700px;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% 0%, var(--hb-dark-glow-sky), transparent 60%),
        var(--stage-bg);
    isolation: isolate;
}
.hb-stage__scene { position: absolute; inset: 0; touch-action: pan-y; }
.hb-stage__scene > canvas { width: 100% !important; height: 100% !important; display: block; outline: none; }

.hb-stage__loading {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--hb-space-3);
    padding: var(--hb-space-5);
    text-align: center;
    font-size: var(--hb-text-sm);
    color: var(--stage-muted);
    pointer-events: none;
}
.hb-stage__loading .hb-spinner { width: 30px; height: 30px; color: var(--stage-accent); }
.hb-progress {
    width: min(220px, 60%);
    height: 3px;
    border-radius: 3px;
    background: var(--stage-line);
    overflow: hidden;
}
.hb-progress span {
    display: block;
    width: 8%;
    height: 100%;
    border-radius: inherit;
    background: var(--stage-accent);
    transition: width .3s var(--hb-ease);
}
.no-js .hb-stage__loading { display: none; }

.hb-stage__notice {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 4;
    width: min(420px, calc(100% - 32px));
    padding: var(--hb-space-4) var(--hb-space-5);
    border-radius: var(--hb-radius);
    background: var(--stage-glass-strong);
    border: 1px solid var(--stage-line);
    color: var(--stage-ink);
    font-size: var(--hb-text-sm);
    text-align: center;
    transform: translate(-50%, -50%);
}

.hb-stage__now {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100% - 84px);
    padding: 6px 12px;
    border-radius: var(--hb-radius-pill);
    background: var(--stage-glass);
    border: 1px solid var(--stage-line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
}
.hb-stage__now:empty { display: none; }
.hb-stage__now-item { display: inline-flex; align-items: center; gap: 4px; }
.hb-stage__now-item .hb-ic { width: 15px; height: 15px; color: var(--stage-accent); }
.hb-stage__now-item.is-wind .hb-ic { color: var(--hb-dark-breeze); }
.hb-stage__hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 2;
    padding: 6px 14px;
    border-radius: var(--hb-radius-pill);
    background: var(--stage-glass);
    color: var(--stage-ink);
    font-size: 12px;
    white-space: nowrap;
    transform: translateX(-50%);
    pointer-events: none;
    animation: hb-fade-in .6s var(--hb-ease);
}
@keyframes hb-fade-in { from { opacity: 0; } }

.hb-stage__tools {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.hb-tool {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--stage-line);
    border-radius: 50%;
    background: var(--stage-glass);
    color: var(--stage-ink);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: background-color .2s var(--hb-ease), color .2s var(--hb-ease);
}
.hb-tool:hover { background: var(--stage-glass-strong); }
.hb-tool[aria-pressed="true"] { background: var(--stage-accent); color: var(--stage-accent-ink); border-color: transparent; }
.hb-stage :focus-visible { box-shadow: 0 0 0 3px var(--stage-accent); }

.hb-compass {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--stage-glass);
    border: 1px solid var(--stage-line);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.hb-compass svg { width: 100%; height: 100%; overflow: visible; }
.hb-compass__ring { fill: none; stroke: var(--stage-line); }
.hb-compass__needle { transform-origin: 24px 24px; transition: transform .15s linear; }
.hb-compass__north { fill: var(--hb-dark-home); }
.hb-compass__south { fill: var(--stage-muted); opacity: .7; }
.hb-compass__n { fill: var(--stage-ink); font-size: 7px; font-weight: 800; }

.hb-stage.is-unavailable .hb-stage__view { height: auto; min-height: 220px; }
.hb-stage.is-unavailable .hb-stage__tools,
.hb-stage.is-unavailable .hb-stage__now,
.hb-stage.is-unavailable .hb-modes { display: none; }
.no-js .hb-stage { display: none; }

/* Dock: camera modes + time controls. Phones: below the 3D like a remote control. */
.hb-dock {
    position: relative;
    z-index: 2;
    display: grid;
    gap: var(--hb-space-4);
    padding: var(--hb-space-3) var(--hb-gutter) var(--hb-space-4);
}
.hb-modes {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.hb-mode {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 62px;
    padding: 8px 4px;
    border: 1px solid var(--stage-line);
    border-radius: var(--hb-radius);
    background: var(--stage-hover);
    color: var(--stage-ink);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    transition: background-color .2s var(--hb-ease), color .2s var(--hb-ease), transform .2s var(--hb-ease);
}
.hb-mode .hb-ic { width: 22px; height: 22px; }
.hb-mode:hover { background: var(--stage-glass-strong); }
.hb-mode:active { transform: scale(.97); }
.hb-mode[aria-pressed="true"] { background: var(--stage-accent); border-color: transparent; color: var(--stage-accent-ink); }

.hb-time {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--hb-space-3) var(--hb-space-4);
    align-items: end;
}
.hb-time__field--month { grid-column: 1 / -1; }
.hb-time__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
    font-size: var(--hb-text-xs);
}
.hb-time__head label { color: var(--stage-muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hb-time__head output { font-weight: 700; font-size: var(--hb-text-sm); font-variant-numeric: tabular-nums; }
.hb-time input[type="range"] {
    width: 100%;
    height: 28px;
    margin: 0;
    background: transparent;
    accent-color: var(--stage-accent);
}
.hb-time__ticks {
    display: flex;
    justify-content: space-between;
    padding: 0 6px;
    color: var(--stage-muted);
    font-size: 10px;
    font-weight: 600;
}
.hb-time__ticks--hours span { min-width: 0; }
.hb-time__buttons { display: flex; gap: 8px; padding-bottom: 18px; }
.hb-tool--play { width: 44px; height: 44px; background: var(--stage-accent); color: var(--stage-accent-ink); border-color: transparent; }
.hb-tool--play[aria-pressed="true"] { background: var(--stage-ink); color: var(--stage-accent-ink); }
.hb-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--stage-line);
    border-radius: var(--hb-radius-pill);
    background: transparent;
    color: var(--stage-muted);
    font-size: var(--hb-text-sm);
    font-weight: 600;
}
.hb-toggle[aria-pressed="true"] { background: var(--stage-hover); border-color: var(--hb-dark-breeze); color: var(--stage-ink); }
.hb-toggle[aria-pressed="true"] .hb-ic { color: var(--hb-dark-breeze); }

@media (min-width: 600px) and (max-width: 1099px) {
    .hb-stage { margin: 0 var(--hb-panel-pad); border-radius: var(--hb-radius-lg); overflow: hidden; }
    .hb-modes { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .hb-time { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
    .hb-time__field--month { grid-column: auto; }
}

@media (min-width: 1100px) {
    .hb-stage {
        position: sticky;
        top: var(--hb-header-h);
        height: calc(100vh - var(--hb-header-h));
        height: calc(100dvh - var(--hb-header-h));
        padding: 14px 0 14px 14px;
        background: transparent;
        align-self: start;
    }
    .hb-stage__view { height: 100%; max-height: none; border-radius: var(--hb-radius-lg); }
    .hb-dock {
        position: absolute;
        left: 28px;
        right: 14px;
        bottom: 28px;
        grid-template-columns: minmax(0, 1fr);
        gap: var(--hb-space-3);
        padding: 10px;
        border-radius: 20px;
        background: var(--stage-glass);
        border: 1px solid var(--stage-line);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
    }
    .hb-modes { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; }
    .hb-mode { min-height: 58px; background: transparent; border-color: transparent; }
    .hb-mode:hover { background: var(--stage-hover); }
    .hb-time { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; padding: 0 8px; }
    .hb-time__field--month { grid-column: auto; }
    .hb-stage__tools { top: 16px; right: 16px; }
    .hb-stage__now { top: 16px; left: 16px; }
    .hb-stage__hint { bottom: auto; top: 58px; left: 16px; transform: none; }
}

/* Fullscreen (Fullscreen API or the CSS fallback). */
.hb-stage.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: var(--stage-bg);
}
.hb-stage.is-fullscreen .hb-stage__view { flex: 1; height: auto; min-height: 0; max-height: none; border-radius: 0; }
.hb-stage.is-fullscreen .hb-dock { padding-bottom: max(var(--hb-space-3), env(safe-area-inset-bottom)); }
.hb-stage.is-fullscreen .hb-mode { min-height: 50px; }
.hb-stage.is-fullscreen .hb-time__ticks { display: none; }
.hb-stage.is-fullscreen .hb-time__buttons { padding-bottom: 0; }
@media (max-width: 1099px) {
    /* Phones in fullscreen: one scrollable row of modes and one row of time controls. */
    .hb-stage.is-fullscreen .hb-dock { gap: var(--hb-space-2); padding-top: var(--hb-space-2); }
    .hb-stage.is-fullscreen .hb-modes { display: flex; overflow-x: auto; scrollbar-width: none; }
    .hb-stage.is-fullscreen .hb-mode { flex: 0 0 82px; min-height: 52px; }
    .hb-stage.is-fullscreen .hb-time { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--hb-space-3); }
    .hb-stage.is-fullscreen .hb-time__field--month { grid-column: auto; }
    .hb-stage.is-fullscreen .hb-toggle span { display: none; }
    .hb-stage.is-fullscreen .hb-toggle { width: 44px; padding: 0; justify-content: center; }
}
@media (min-width: 1100px) {
    .hb-stage.is-fullscreen .hb-dock { left: 16px; right: 16px; bottom: 16px; }
}
.hb-pseudo-fullscreen, .hb-pseudo-fullscreen body { overflow: hidden; }

/* ------------------------------------------------------------------ section nav */

.hb-sectionnav {
    position: sticky;
    top: var(--hb-header-h);
    z-index: 40;
    padding-top: 10px;
    padding-bottom: 10px;
    background: var(--hb-paper);
    background: color-mix(in srgb, var(--hb-paper) 90%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hb-line);
}
.hb-sectionnav ul {
    position: relative;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
}
.hb-sectionnav ul::-webkit-scrollbar { display: none; }
.hb-guide .hb-sectionnav a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: var(--hb-radius-pill);
    color: var(--hb-muted);
    font-size: var(--hb-text-sm);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.hb-guide .hb-sectionnav a:hover { color: var(--hb-ink); background: var(--hb-soft); }
.hb-guide .hb-sectionnav a[aria-current="true"] { background: var(--hb-primary-soft); color: var(--hb-primary); }
.no-js .hb-sectionnav { display: none; }

/* ------------------------------------------------------------------ sections and cards */

.hb-section {
    padding-top: var(--hb-space-6);
    scroll-margin-top: calc(var(--hb-header-h) + var(--hb-nav-h) + 8px);
}
.hb-section__head { margin-bottom: var(--hb-space-4); }
.hb-section__title { margin-top: 6px; font-size: var(--hb-text-2xl); font-weight: 740; }
.hb-section__intro { margin-top: var(--hb-space-2); color: var(--hb-muted); font-size: .95rem; }

.hb-card {
    position: relative;
    padding: var(--hb-card-pad);
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius-lg);
    background: var(--hb-surface);
    box-shadow: var(--hb-shadow-sm);
}
.hb-card + .hb-card, .hb-card + .hb-proscons, .hb-proscons .hb-card + .hb-card { margin-top: var(--hb-space-3); }
.hb-card__title {
    display: flex;
    align-items: center;
    gap: var(--hb-space-2);
    font-family: var(--hb-font-display);
    font-size: 1.12rem;
    font-weight: 700;
}
.hb-skeleton-card { display: grid; }
.hb-empty, .hb-empty-note {
    display: flex;
    gap: var(--hb-space-3);
    align-items: flex-start;
    color: var(--hb-muted);
    font-size: var(--hb-text-sm);
}
.hb-empty .hb-ic, .hb-empty-note .hb-ic { margin-top: 1px; color: var(--hb-primary); }
.hb-empty-note { margin-top: var(--hb-space-3); }

/* ------------------------------------------------------------------ summary */

.hb-verdict {
    overflow: hidden;
    background:
        radial-gradient(90% 120% at 100% 0%, var(--hb-breeze-soft), transparent 55%),
        radial-gradient(70% 90% at 0% 100%, var(--hb-sun-soft), transparent 60%),
        var(--hb-surface);
}
.hb-verdict__kicker { color: var(--hb-muted); font-size: var(--hb-text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hb-verdict__title { margin-top: var(--hb-space-2); font-size: clamp(1.45rem, 1.2rem + 1.2vw, 1.9rem); font-weight: 760; }
.hb-verdict__title strong { color: var(--hb-breeze); font-weight: inherit; }
.hb-verdict__text { margin-top: var(--hb-space-3); color: var(--hb-ink); }
.hb-levels { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--hb-space-4) 0 0; padding: 0; list-style: none; }
.hb-level {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 9px;
    border-radius: var(--hb-radius-pill);
    border: 1px solid var(--hb-line);
    background: var(--hb-surface);
    font-size: var(--hb-text-sm);
    font-weight: 600;
}
.hb-level .hb-ic { width: 18px; height: 18px; }
.hb-level--bom .hb-ic { color: var(--hb-good); }
.hb-level--medio .hb-ic { color: var(--hb-mid); }
.hb-level--baixo .hb-ic { color: var(--hb-low); }
.hb-level--bom { border-color: color-mix(in srgb, var(--hb-good) 40%, var(--hb-line)); }
.hb-level--medio { border-color: color-mix(in srgb, var(--hb-mid) 40%, var(--hb-line)); }
.hb-level--baixo { border-color: color-mix(in srgb, var(--hb-low) 40%, var(--hb-line)); }

.hb-facts__list { display: grid; gap: 0; margin: var(--hb-space-3) 0 0; }
.hb-facts__row {
    display: grid;
    grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
    gap: var(--hb-space-3);
    padding: 10px 0;
    border-top: 1px solid var(--hb-line);
}
.hb-facts__row:first-child { border-top: 0; padding-top: 4px; }
.hb-facts__row dt { color: var(--hb-muted); font-size: var(--hb-text-sm); }
.hb-facts__row dd { margin: 0; font-size: .95rem; }
.hb-facts__list--compact .hb-facts__row { padding: 8px 0; }
.hb-facts__list--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--hb-space-4); }
.hb-facts__list--grid .hb-facts__row { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 0; }
.hb-facts__list--grid .hb-facts__row:nth-child(-n + 2) { border-top: 0; padding-top: 4px; }
.hb-facts__list--grid .hb-facts__row dt { font-size: var(--hb-text-xs); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }

.hb-list__items { margin: var(--hb-space-3) 0 0; padding: 0; list-style: none; display: grid; gap: var(--hb-space-3); }
.hb-list__item { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: var(--hb-space-3); align-items: start; }
.hb-list__icon, .hb-list__badge {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
}
.hb-list__icon .hb-ic, .hb-list__badge .hb-ic { width: 16px; height: 16px; stroke-width: 2.2; }
.hb-list--pros .hb-list__icon, .hb-list--pros .hb-list__badge { background: var(--hb-leaf-soft); color: var(--hb-good); }
.hb-list--cons .hb-list__icon, .hb-list--cons .hb-list__badge { background: var(--hb-sun-soft); color: var(--hb-mid); }
.hb-list__body { display: grid; gap: 6px; justify-items: start; font-size: .95rem; }

/* ------------------------------------------------------------------ balcony view */

.hb-pano {
    position: relative;
    border-radius: var(--hb-radius-lg);
    overflow: hidden;
    background: var(--hb-dark-bg);
    color: var(--hb-dark-ink);
}
.hb-pano__track {
    --pano-h: 240px;
    position: relative;
    height: var(--pano-h);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    cursor: grab;
}
.hb-pano__track.is-dragging { cursor: grabbing; user-select: none; }
.hb-pano__frame { position: relative; height: 100%; width: auto; }
.hb-pano__image { width: 100%; height: 100%; display: block; }
.hb-pano__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--hb-space-3);
    height: 100%;
    padding: var(--hb-space-5);
    color: var(--hb-dark-muted);
    text-align: center;
    font-size: var(--hb-text-sm);
}
.hb-pano__placeholder .hb-spinner { color: var(--hb-dark-accent); }
.hb-pano.is-loading .hb-pano__frame { opacity: .55; transition: opacity .3s var(--hb-ease); }
.hb-pano__ticks {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 34px;
    background: linear-gradient(to top, var(--hb-dark-glass-strong), transparent);
    pointer-events: none;
}
.hb-pano__tick {
    position: absolute;
    bottom: 0;
    width: 1px;
    height: 7px;
    background: var(--hb-dark-muted);
}
.hb-pano__tick.is-major { height: 12px; background: var(--hb-dark-ink); }
.hb-pano__tick-label {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--hb-dark-ink);
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}
.hb-pano__labels { position: absolute; inset: 0; pointer-events: none; }
.hb-pano__label {
    position: absolute;
    top: calc(10px + var(--row, 0) * 30px);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hb-pano__label::after {
    content: "";
    width: 1.5px;
    /* Stem from the pill down to the object (y = its height in the photo, 0–1). */
    height: max(6px, calc(var(--y, .42) * var(--pano-h) - 34px - var(--row, 0) * 30px));
    background: var(--hb-dark-muted);
}
.hb-pano__pill {
    padding: 3px 9px;
    border-radius: var(--hb-radius-pill);
    background: var(--hb-dark-glass-strong);
    border: 1px solid var(--hb-dark-line);
    color: var(--hb-dark-ink);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.hb-pano__label.is-landmark .hb-pano__pill { background: var(--hb-dark-accent); color: var(--hb-dark-accent-ink); border-color: transparent; }
.hb-pano__label.is-future .hb-pano__pill { border-style: dashed; background: var(--hb-dark-glass); }
.hb-pano__drag {
    padding: 8px 12px 10px;
    color: var(--hb-dark-muted);
    font-size: var(--hb-text-xs);
    text-align: center;
}
.hb-pano.is-unavailable .hb-pano__track { height: auto; min-height: 120px; cursor: default; }
.hb-pano.is-unavailable .hb-pano__drag { display: none; }
@media (min-width: 1100px) {
    .hb-pano__track { --pano-h: 300px; }
    .hb-pano__drag { display: none; }
}

.hb-view__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--hb-space-3);
    margin-top: var(--hb-space-4);
}
.hb-view__facts { margin-top: var(--hb-space-3); }
.hb-view__subtitle { margin-top: var(--hb-space-4); font-size: 1rem; }
.hb-view .hb-note { margin-top: var(--hb-space-4); }
.hb-landmarks { margin: var(--hb-space-2) 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.hb-landmark {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    column-gap: var(--hb-space-2);
    align-items: center;
}
.hb-landmark .hb-ic { grid-row: span 2; width: 18px; height: 18px; color: var(--hb-muted); }
.hb-landmark.is-visible .hb-ic { color: var(--hb-good); }
.hb-landmark__name { font-weight: 600; }
.hb-landmark__meta { grid-column: 2; color: var(--hb-muted); font-size: var(--hb-text-sm); }

/* ------------------------------------------------------------------ floor plan */

.hb-plan__figure { overflow-x: auto; }
.hb-plan__svg { display: block; max-width: none; height: auto; margin: 0 auto; overflow: visible; }
.hb-plan__room rect { fill: var(--hb-paper); stroke: var(--hb-ink); stroke-width: 2.2; }
.hb-plan__room.is-bedroom rect, .hb-plan__room.is-suite rect { fill: var(--hb-surface); }
.hb-plan__room.is-bath rect, .hb-plan__room.is-service rect { fill: var(--hb-soft); }
.hb-plan__room.is-balcony rect { fill: var(--hb-home-soft); stroke: var(--hb-home); }
.hb-plan__room.is-garden rect { fill: var(--hb-leaf-soft); stroke: var(--hb-leaf); }
.hb-plan__room-name { fill: var(--hb-ink); font-weight: 650; }
.hb-plan__room-area { fill: var(--hb-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.hb-plan__facade { stroke: var(--hb-home); stroke-width: 6; stroke-linecap: round; }
.hb-plan__facade.is-lit { stroke: var(--hb-sun); stroke-width: 8; }
.hb-plan__facade-label { fill: var(--hb-muted); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

.hb-plan__key { display: flex; align-items: center; gap: var(--hb-space-4); margin-top: var(--hb-space-4); }
.hb-dial { width: 104px; height: 104px; flex: none; overflow: visible; }
.hb-dial__ring { fill: var(--hb-paper); stroke: var(--hb-line); stroke-width: 1.5; }
.hb-dial__front { fill: none; stroke: var(--hb-home); stroke-width: 5; stroke-linecap: round; }
.hb-dial__home { fill: var(--hb-surface); stroke: var(--hb-ink); stroke-width: 1.5; }
.hb-dial__tick { stroke: var(--hb-ink); stroke-width: 2; stroke-linecap: round; }
.hb-dial__n { fill: var(--hb-ink); font-size: 12px; font-weight: 800; }
.hb-dial__wind { fill: none; stroke: var(--hb-breeze); stroke-width: 2.6; stroke-linecap: round; }
.hb-dial__arrowhead { fill: var(--hb-breeze); }
.hb-dial__sun { fill: var(--hb-sun); stroke: var(--hb-surface); stroke-width: 2; }
.hb-legend.hb-legend--stack { flex-direction: column; flex-wrap: nowrap; gap: 6px; margin: 0; font-size: var(--hb-text-sm); }

.hb-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: var(--hb-space-3) 0 0;
    padding: 0;
    list-style: none;
    color: var(--hb-muted);
    font-size: var(--hb-text-xs);
}
.hb-legend li { display: inline-flex; align-items: center; gap: 6px; }
.hb-legend__swatch { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.hb-legend__line { width: 16px; height: 3px; border-radius: 2px; flex: none; }
.hb-legend__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.hb-legend__line.is-facade { background: var(--hb-home); height: 4px; }
.hb-legend__line.is-wind { background: var(--hb-breeze); }
.hb-legend__swatch.is-balcony { background: var(--hb-home-soft); border: 1.5px solid var(--hb-home); }
.hb-legend__dot.is-sun { background: var(--hb-sun); }
.hb-legend__dot.is-night { background: var(--hb-muted); }
.hb-legend__swatch.is-sun { background: var(--hb-sun); }
.hb-legend__swatch.is-shade { background: var(--hb-soft); background: color-mix(in srgb, var(--hb-muted) 16%, var(--hb-surface)); }
.hb-legend__swatch.is-night { background: var(--hb-night); background: color-mix(in srgb, var(--hb-night) 62%, var(--hb-surface)); }
.hb-legend__swatch.is-wind-good { background: var(--hb-breeze); }
.hb-legend__swatch.is-wind-moderate { background: var(--hb-breeze-soft); background: color-mix(in srgb, var(--hb-breeze) 62%, var(--hb-surface)); }
.hb-legend__swatch.is-cold { background: var(--hb-breeze-soft); }
.hb-legend__swatch.is-hot { background: var(--hb-sun-soft); }
.hb-legend__line.is-max { background: var(--hb-home); }
.hb-legend__line.is-mean { background: var(--hb-ink); }
.hb-legend__line.is-min { background: var(--hb-water); }

.hb-rooms { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--hb-space-4) 0 0; padding: 0; list-style: none; }
.hb-rooms__item {
    display: inline-flex;
    flex-direction: column;
    padding: 6px 12px;
    border-radius: var(--hb-radius-sm);
    background: var(--hb-soft);
    font-size: var(--hb-text-sm);
    line-height: 1.3;
}
.hb-rooms__item.is-balcony { background: var(--hb-home-soft); }
.hb-rooms__name { font-weight: 600; }
.hb-rooms__meta { color: var(--hb-muted); font-size: var(--hb-text-xs); }
.hb-plan .hb-note { margin-top: var(--hb-space-3); }

/* ------------------------------------------------------------------ charts */

.hb-chart__summary { margin-top: var(--hb-space-2); font-size: .95rem; }
.hb-chart__plot { position: relative; margin-top: var(--hb-space-3); border-radius: var(--hb-radius-sm); }
.hb-chart__svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--hb-font-body); }
.hb-chart__note { margin-top: var(--hb-space-3); color: var(--hb-muted); font-size: var(--hb-text-sm); }
.hb-chart__source { margin-top: var(--hb-space-2); }
.hb-chart__grid { stroke: var(--hb-line); stroke-width: 1; }
.hb-chart__grid.is-base { stroke: var(--hb-muted); stroke-opacity: .5; }
.hb-chart__axis { fill: var(--hb-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.hb-chart__axis.is-current { fill: var(--hb-ink); font-weight: 800; }
.hb-chart__value { fill: var(--hb-ink); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hb-chart__end { font-weight: 600; }
.hb-chart__cursor { fill: none; stroke: var(--hb-ink); stroke-width: 1.5; }
.hb-chart__band { fill: var(--hb-soft); }
.hb-chart__crosshair { stroke: var(--hb-muted); stroke-width: 1; }

.hb-suncal__sun { fill: var(--hb-sun); }
.hb-suncal__shade { fill: var(--hb-soft); fill: color-mix(in srgb, var(--hb-muted) 16%, var(--hb-surface)); }
.hb-suncal__night { fill: var(--hb-night); fill: color-mix(in srgb, var(--hb-night) 62%, var(--hb-surface)); }
.hb-wind__good { fill: var(--hb-breeze); }
.hb-wind__moderate { fill: var(--hb-breeze-soft); fill: color-mix(in srgb, var(--hb-breeze) 62%, var(--hb-surface)); }
.hb-temp__band { fill: var(--hb-soft); opacity: .8; }
.hb-temp__cold { fill: var(--hb-breeze-soft); opacity: .7; }
.hb-temp__hot { fill: var(--hb-sun-soft); opacity: .8; }
.hb-temp__line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hb-temp__line.is-max, .hb-temp__dot.is-max { stroke: var(--hb-home); }
.hb-temp__line.is-mean, .hb-temp__dot.is-mean { stroke: var(--hb-ink); }
.hb-temp__line.is-min, .hb-temp__dot.is-min { stroke: var(--hb-water); }
.hb-temp__dot { fill: var(--hb-surface); stroke-width: 2.5; }
.hb-temp__dot.is-max { fill: var(--hb-home); }
.hb-temp__dot.is-mean { fill: var(--hb-ink); }
.hb-temp__dot.is-min { fill: var(--hb-water); }
.hb-temp__dot { paint-order: stroke; }

.hb-tip {
    position: absolute;
    left: var(--x, 0);
    top: var(--y, 0);
    z-index: 5;
    display: grid;
    gap: 1px;
    min-width: 120px;
    max-width: 240px;
    padding: 8px 11px;
    border-radius: 10px;
    background: var(--hb-ink);
    color: var(--hb-paper);
    font-size: 12.5px;
    line-height: 1.35;
    box-shadow: var(--hb-shadow);
    transform: translate(-50%, calc(-100% - 10px));
    pointer-events: none;
}
.hb-tip.is-right { transform: translate(calc(-100% + 16px), calc(-100% - 10px)); }
.hb-tip.is-left { transform: translate(-16px, calc(-100% - 10px)); }
.hb-tip strong { font-size: 13.5px; }
.hb-chart__plot:focus-visible { box-shadow: var(--hb-focus); }

.hb-tableview { margin-top: var(--hb-space-3); font-size: var(--hb-text-sm); }
.hb-tableview summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hb-primary);
    font-weight: 600;
    cursor: pointer;
}
.hb-tableview__scroll { margin-top: var(--hb-space-2); overflow-x: auto; }
.hb-tableview table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hb-tableview th, .hb-tableview td { padding: 6px 8px; border-bottom: 1px solid var(--hb-line); text-align: right; white-space: nowrap; }
.hb-tableview th:first-child { text-align: left; }
.hb-tableview thead th { color: var(--hb-muted); font-weight: 600; font-size: var(--hb-text-xs); }

/* ------------------------------------------------------------------ common areas */

.hb-amenities__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr));
    gap: var(--hb-space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}
.hb-amenity {
    --tone: var(--hb-sun);
    --tone-soft: var(--hb-sun-soft);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--hb-space-2);
    padding: 14px;
    border: 1px solid var(--hb-line);
    border-radius: var(--hb-radius);
    background: var(--hb-surface);
    box-shadow: var(--hb-shadow-sm);
}
.hb-amenity.is-esporte { --tone: var(--hb-breeze); --tone-soft: var(--hb-breeze-soft); }
.hb-amenity.is-convivencia { --tone: var(--hb-park); --tone-soft: var(--hb-primary-soft); }
.hb-amenity.is-infantil { --tone: var(--hb-home); --tone-soft: var(--hb-home-soft); }
.hb-amenity.is-pet, .hb-amenity.is-verde { --tone: var(--hb-leaf); --tone-soft: var(--hb-leaf-soft); }
.hb-amenity.is-servico, .hb-amenity.is-acesso { --tone: var(--hb-primary); --tone-soft: var(--hb-primary-soft); }
.hb-amenity__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--tone-soft);
    color: var(--tone);
}
.hb-amenity__icon .hb-ic { width: 24px; height: 24px; }
.hb-amenity__body { flex: 1; }
.hb-amenity__name { font-family: var(--hb-font-body); font-size: .95rem; font-weight: 700; letter-spacing: 0; line-height: 1.25; }
.hb-amenity__category { color: var(--hb-muted); font-size: var(--hb-text-xs); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.hb-amenity__text { margin-top: 4px; font-size: var(--hb-text-sm); color: var(--hb-muted); }
.hb-amenity .hb-chip--action { min-height: 34px; padding: 0 10px; font-size: var(--hb-text-xs); }

/* ------------------------------------------------------------------ neighbourhood */

.hb-destination {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: var(--hb-space-3);
    align-items: start;
    background:
        radial-gradient(80% 120% at 100% 0%, var(--hb-primary-soft), transparent 70%),
        var(--hb-surface);
    border-color: color-mix(in srgb, var(--hb-primary) 35%, var(--hb-line));
}
.hb-destination__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--hb-primary);
    color: var(--hb-on-primary);
}
.hb-destination__label { color: var(--hb-primary); font-size: var(--hb-text-xs); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.hb-destination__name { margin-top: 2px; font-size: 1.2rem; font-weight: 720; }
.hb-destination__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; color: var(--hb-muted); font-size: var(--hb-text-sm); }
.hb-destination__meta span { display: inline-flex; align-items: center; gap: 4px; }
.hb-destination__meta .hb-ic { width: 16px; height: 16px; }
.hb-destination .hb-btn { grid-column: 2; justify-self: start; }
.hb-places__groups { display: grid; gap: var(--hb-space-3); margin-top: var(--hb-space-3); }
.hb-places__icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--hb-soft);
    color: var(--hb-primary);
}
.hb-places__icon .hb-ic { width: 18px; height: 18px; }
.hb-count {
    margin-left: auto;
    padding: 1px 8px;
    border-radius: var(--hb-radius-pill);
    background: var(--hb-soft);
    color: var(--hb-muted);
    font-family: var(--hb-font-body);
    font-size: var(--hb-text-xs);
    font-weight: 700;
}
.hb-places__list { margin: var(--hb-space-2) 0 0; padding: 0; list-style: none; }
.hb-place {
    display: flex;
    align-items: center;
    gap: var(--hb-space-3);
    padding: 10px 0;
    border-top: 1px solid var(--hb-line);
}
.hb-place:first-child { border-top: 0; }
.hb-place__body { flex: 1; min-width: 0; }
.hb-place__name { font-weight: 600; }
.hb-place__meta, .hb-place__note { color: var(--hb-muted); font-size: var(--hb-text-sm); }
.hb-places__group .hb-btn { margin-top: var(--hb-space-2); }

/* ------------------------------------------------------------------ footer */

.hb-foot { padding-top: var(--hb-space-7); padding-bottom: var(--hb-space-7); }
.hb-disclaimer {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: var(--hb-space-3);
    padding: var(--hb-card-pad);
    border-radius: var(--hb-radius-lg);
    border: 1px solid var(--hb-line);
    background: var(--hb-surface);
    font-size: var(--hb-text-sm);
}
.hb-disclaimer--demo {
    background: var(--hb-sun-soft);
    border-color: color-mix(in srgb, var(--hb-sun) 45%, var(--hb-line));
}
.hb-disclaimer .hb-ic { width: 22px; height: 22px; color: var(--hb-mid); }
.hb-disclaimer__title { font-weight: 700; margin-bottom: 2px; }

.hb-foot__org { margin-top: var(--hb-space-4); color: var(--hb-muted); font-size: var(--hb-text-sm); }
.hb-sources { margin-top: var(--hb-space-6); }
.hb-sources__title { font-size: 1.3rem; font-weight: 720; }
.hb-sources__intro { margin-top: 4px; color: var(--hb-muted); font-size: var(--hb-text-sm); }
.hb-sources__details { margin-top: var(--hb-space-3); border-top: 1px solid var(--hb-line); }
.hb-sources__details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--hb-space-2);
    min-height: 48px;
    font-weight: 650;
    font-size: var(--hb-text-sm);
    color: var(--hb-primary);
    cursor: pointer;
    list-style: none;
}
.hb-sources__details summary::-webkit-details-marker { display: none; }
.hb-sources__details summary .hb-ic { transition: transform .2s var(--hb-ease); }
.hb-sources__details[open] summary .hb-ic { transform: rotate(180deg); }
.hb-sources__list { margin: 0; padding: 0; list-style: none; }
.hb-sources__list li {
    display: grid;
    gap: 2px 8px;
    justify-items: start;
    padding: 10px 0;
    border-top: 1px solid var(--hb-line);
    font-size: var(--hb-text-sm);
}
.hb-sources__list strong { font-weight: 650; }
.hb-sources__list span:not(.hb-tag) { color: var(--hb-muted); }
.hb-sources__attribution {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    margin-top: var(--hb-space-3);
    padding-top: var(--hb-space-3);
    border-top: 1px solid var(--hb-line);
    font-size: var(--hb-text-sm);
    color: var(--hb-muted);
}
.hb-sources__label { font-weight: 700; color: var(--hb-ink); }

.hb-foot__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--hb-space-4);
    margin-top: var(--hb-space-6);
    padding: var(--hb-space-5);
    border-radius: var(--hb-radius-lg);
    background:
        radial-gradient(80% 140% at 100% 0%, var(--hb-dark-glow-sun), transparent 60%),
        var(--hb-dark-bg);
    color: var(--hb-dark-ink);
}
.hb-foot__pitch { font-family: var(--hb-font-display); font-size: 1.25rem; font-weight: 720; }
.hb-foot__pitch-sub { margin-top: 4px; color: var(--hb-dark-muted); font-size: var(--hb-text-sm); max-width: 36ch; }
.hb-guide .hb-foot__cta a.hb-btn--primary { background: var(--hb-dark-accent); color: var(--hb-dark-accent-ink); }
.hb-guide .hb-foot__cta a.hb-btn--primary:hover { background: var(--hb-dark-accent-hover); }
.hb-foot__made { margin-top: var(--hb-space-5); color: var(--hb-muted); font-size: var(--hb-text-xs); }
.hb-guide .hb-foot__brand { color: var(--hb-ink); text-decoration: none; }
.hb-guide .hb-foot__brand:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ fatal / no-js */

.hb-fatal {
    grid-column: 1 / -1;
    display: grid;
    justify-items: start;
    gap: var(--hb-space-3);
    margin: var(--hb-space-4) var(--hb-panel-pad) 0;
    padding: var(--hb-card-pad);
    border-radius: var(--hb-radius-lg);
    border: 1px solid var(--hb-line);
    background: var(--hb-home-soft);
}
.hb-app.is-fatal .hb-report,
.hb-app.is-fatal .hb-sectionnav,
.hb-app.is-fatal .hb-stage,
.hb-app.is-fatal .hb-picker__controls,
.hb-app.is-fatal .hb-field--plan,
.hb-app.is-fatal .hb-unit { display: none; }
.hb-noscript {
    max-width: 680px;
    margin: var(--hb-space-5) max(var(--hb-gutter), calc((100% - 680px) / 2));
    padding: var(--hb-card-pad);
    border-radius: var(--hb-radius-lg);
    background: var(--hb-surface);
    border: 1px solid var(--hb-line);
}
.hb-noscript p { margin-top: var(--hb-space-3); }
.no-js .hb-report, .no-js .hb-picker__controls, .no-js .hb-field--plan, .no-js .hb-unit { display: none; }

/* ------------------------------------------------------------------ preferences */

@media (prefers-reduced-motion: reduce) {
    .hb-compass__needle { transition: none; }
}

@media print {
    .hb-top, .hb-stage, .hb-sectionnav, .hb-view__actions, .hb-foot__cta, .hb-tableview summary { display: none !important; }
    .hb-tableview[open] .hb-tableview__scroll, .hb-tableview .hb-tableview__scroll { display: block; }
    .hb-card { box-shadow: none; break-inside: avoid; }
}
