/* BLD HDB prices — the 3D journey (public page). Loaded after hdb-explore.css; everything is scoped to .bld-h3d.hj so the
   plain explorer and the member version are untouched. Mobile first. The page is fully usable without WebGL
   (.hj-flat keeps a dark gradient instead of the 3D sky) and without motion (prefers-reduced-motion). */
body.bld-hj-page { background: #0a0e18; }
.bld-h3d.hj { background: transparent; padding-bottom: 96px; position: relative; color: #fff; }

/* the backdrop: a dark gradient, then the 3D map of Singapore over the whole screen (1.9.0-rc55) */
.hj-sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(120% 90% at 70% 10%, #1c2a52 0%, #0a0e18 62%); }
.hj-map { position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .8s; }
.hj.hj-ready .hj-map { opacity: 1; }
.hj-map.is-live { pointer-events: auto; }
.hj-map .h3d-stage { position: absolute; inset: 0; height: 100%; min-height: 0; max-height: none; border-radius: 0; box-shadow: none; background: transparent; }
.hj-map .h3d-loading { position: absolute; left: 16px; bottom: 16px; margin: 0; color: #c3cded; font-size: 13px; }
.hj-map .maplibregl-ctrl-top-right { top: 64px; }
.hj-map .maplibregl-ctrl-top-right, .hj-map .maplibregl-ctrl-bottom-right, .hj-map .h3d-typelegend { transition: opacity .3s; }
.hj-map:not(.is-live) .maplibregl-ctrl-top-right, .hj-map:not(.is-live) .maplibregl-ctrl-bottom-right, .hj-map:not(.is-live) .h3d-typelegend, .hj-map:not(.is-live) .maplibregl-popup { opacity: 0; visibility: hidden; }
.hj-map .h3d-typelegend { top: 66px; }
.hj-map .maplibregl-ctrl-attrib { background: rgba(10,14,24,.7); color: #d6ddf3; }
.hj-map .maplibregl-ctrl-attrib a { color: #fff; }
.hj.hj-flat .hj-map { display: none; }
.hj > header, .hj > section, .hj > footer, .hj > p { position: relative; z-index: 1; }

/* progress + rail */
.hj-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; background: rgba(255,255,255,.12); }
.hj-progress i { display: block; height: 100%; background: #e8a63b; transform: scaleX(0); transform-origin: 0 50%; }
.hj-rail { display: none; }

/* hero: a glass card over the sky */
.hj .h3d-hero { margin: 14px 12px 0; padding: 22px 18px 20px; max-width: 760px; background: rgba(10,14,24,.74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.14); border-radius: 24px; color: #fff; }
body .bld-h3d.hj .h3d-hero h1, body .bld-h3d.hj .hj-time h2 { color: #fff; }
.hj .h3d-eyebrow { color: #f0c36b; }
.hj .h3d-lede { color: #d6ddf3; }
.hj .h3d-kpis li { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); }
.hj .h3d-kpis span { color: #c3cded; }
.hj .h3d-hero .h3d-btn.is-primary { background: #e8a63b; border-color: #e8a63b; color: #1d1b16; }
.hj .h3d-hero .h3d-btn.is-primary:hover { background: #f2b653; }
.hj .h3d-note { background: rgba(255,255,255,.1); color: #fff; }

.hj-quick { margin: 0 0 16px; padding: 14px; border-radius: 18px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
.hj-quick__q { margin: 0 0 10px; font-size: 16px; color: #fff; }
.hj-quick__q span { color: #c3cded; }
.hj-quick__row { display: grid; gap: 10px; }
.hj-quick .h3d-field > span { color: #d6ddf3; font-weight: 600; font-size: 14px; }
.hj-quick__out:not(:empty) { margin-top: 12px; }
.hj-quick__wait, .hj-quick__note { margin: 0 0 10px; color: #d6ddf3; font-size: 14px; }
.hj-quick__range { margin: 0; font-size: clamp(28px, 8vw, 40px); font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; line-height: 1.1; }
.hj .hj-quick .h3d-formerr { color: #ffb4a9; }

/* time travel: tall, with a sticky screen that follows the scroll */
.hj-time { position: relative; z-index: 1; margin: 18px 0 0; }
.hj-time__stick { display: flex; flex-direction: column; padding: 56px 16px 20px; min-height: 70vh; color: #fff; background: linear-gradient(to top, rgba(10,14,24,.92) 0%, rgba(10,14,24,.8) 30%, rgba(10,14,24,0) 52%); }
.hj-time__stick h2, .hj-time__stick .h3d-eyebrow { text-shadow: 0 2px 14px rgba(0,0,0,.7); }
.hj-time.hj-scrub { height: 280vh; }
.hj-time.hj-scrub .hj-time__stick { position: sticky; top: 0; height: 100vh; height: 100svh; min-height: 0; }
body .bld-h3d.hj .hj-time h2 { font-size: clamp(24px, 6vw, 38px); margin: 0 0 4px; max-width: 520px; }
.hj-time__year { margin: auto 0 0; font-size: clamp(64px, 20vw, 150px); font-weight: 800; line-height: .95; font-variant-numeric: tabular-nums; color: #f0c36b; letter-spacing: -.02em; }
.hj-time__line { margin: 6px 0 12px; min-height: 3.2em; color: #e4e9f8; font-size: 15px; max-width: 640px; }
.hj-time__line strong { color: #fff; }
.hj-time__range { display: block; max-width: 640px; }
.hj-time__range input { width: 100%; min-height: 44px; accent-color: #e8a63b; }
.hj-time__hint { margin: 6px 0 0; color: #b9c4e6; font-size: 13px; }

/* the existing tools become paper panels over the sky */
.hj .h3d-explore, .hj .h3d-section:not(.h3d-ctaband) { background: rgba(246,243,236,.98); color: var(--h3d-ink); border-radius: 24px; width: calc(100% - 24px); max-width: 1180px; margin: 28px auto 0; padding: 18px 14px 20px; box-shadow: 0 18px 60px rgba(0,0,0,.4); }
.hj .h3d-ctaband { background: rgba(10,14,24,.78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.14); border-radius: 24px; width: calc(100% - 24px); max-width: 1180px; margin: 28px auto 0; padding: 20px 14px; }
body .bld-h3d.hj .h3d-ctaband > h2 { color: #fff; }
.hj .h3d-ctaband .h3d-card h3, .hj .h3d-ctaband .h3d-card p { color: var(--h3d-ink); }
.hj .h3d-ctaband .h3d-card p { color: var(--h3d-ink2); }
.hj .h3d-ctaband .h3d-btn.is-primary { background: var(--h3d-ink); }
.hj .h3d-foot { color: #b9c4e6; background: rgba(10,14,24,.7); border-radius: 16px; padding: 14px 16px; width: calc(100% - 24px); max-width: 1180px; }
.hj [data-hj-ch].hj-in { transition: transform .6s ease; }
.hj.hj-ready .h3d-explore:not(.hj-in), .hj.hj-ready .h3d-section:not(.hj-in) { transform: translateY(26px); }

/* always-visible button: slides in after the first screen */
body .bld-h3d.hj .h3d-sticky { transform: translateY(115%); transition: transform .35s ease; }
body .bld-h3d.hj .h3d-sticky.is-on { transform: none; }
.hj-nudge { position: fixed; left: 12px; right: 12px; bottom: 84px; z-index: 55; max-width: 440px; margin: 0 auto; padding: 14px 16px; border-radius: 18px; background: #0f1630; color: #fff; border: 1px solid rgba(255,255,255,.2); box-shadow: 0 14px 40px rgba(0,0,0,.45); }
.hj-nudge[hidden] { display: none; }
.hj-nudge p { margin: 0 0 10px; font-size: 15px; line-height: 1.4; }
.hj-nudge__act { display: flex; gap: 8px; flex-wrap: wrap; }
.hj-nudge .h3d-btn.is-primary { background: #e8a63b; border-color: #e8a63b; color: #1d1b16; }
.hj-nudge .h3d-btn.is-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hj.hj-flat .hj-sky { background: radial-gradient(120% 90% at 70% 10%, #243a73 0%, #0a0e18 65%); }

@media (min-width: 700px) {
	.hj-quick__row { grid-template-columns: 1fr 1fr auto; align-items: end; }
	.hj .h3d-explore, .hj .h3d-section:not(.h3d-ctaband) { padding: 24px 22px 26px; }
}
@media (min-width: 1000px) {
	.hj .h3d-hero { margin: 7vh 0 0 max(12px, 5vw); padding: 30px 30px 26px; }
	.hj-time__stick { padding: 72px max(24px, 6vw) 32px; }
	.hj-rail { display: flex; flex-direction: column; gap: 4px; position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 65; }
	.hj-rail a { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 28px; color: #fff; text-decoration: none; font-size: 13px; font-weight: 600; }
	.hj-rail a span { opacity: 0; transform: translateX(6px); transition: opacity .2s, transform .2s; background: #0f1630; border-radius: 8px; padding: 3px 8px; }
	.hj-rail a::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.4); border: 2px solid #0a0e18; flex: none; }
	.hj-rail a:hover span, .hj-rail a:focus-visible span, .hj-rail a[aria-current] span { opacity: 1; transform: none; }
	.hj-rail a[aria-current]::after { background: #e8a63b; }
	body .bld-h3d.hj .h3d-sticky { display: flex; left: auto; right: 56px; bottom: 20px; width: auto; border-radius: 999px; border: 1px solid var(--h3d-line); padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
	body .bld-h3d.hj .h3d-sticky .h3d-btn { flex: none; }
	.hj-nudge { left: auto; right: 56px; bottom: 84px; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.hj-map, .hj-rail a span, .hj [data-hj-ch].hj-in, body .bld-h3d.hj .h3d-sticky { transition: none; }
	.hj.hj-ready .h3d-explore:not(.hj-in), .hj.hj-ready .h3d-section:not(.hj-in) { transform: none; }
}

/* the site's own link and button colours must not win over the journey's (contrast) */
body .bld-h3d.hj .hj-rail a, body .bld-h3d.hj .hj-rail a span { color: #fff; }
body .bld-h3d.hj .h3d-hero .h3d-btn.is-primary, body .bld-h3d.hj .hj-nudge .h3d-btn.is-primary { background: #e8a63b; border-color: #e8a63b; color: #1d1b16 !important; }
body .bld-h3d.hj .h3d-hero .h3d-btn.is-wa { color: #fff; }

/* first screen: let the 3D show. On phones the sky owns the top of the screen and the card sits below it. */
.hj .h3d-hero { margin-top: min(36vh, 280px); background: rgba(10,14,24,.62); }
.hj.hj-flat .h3d-hero { margin-top: 14px; background: rgba(10,14,24,.74); }
.hj-why { margin: 12px 0 0; font-size: 13px; color: #c3cded; }
@media (min-width: 1000px) { .hj .h3d-hero { margin-top: 7vh; background: rgba(10,14,24,.58); } .hj.hj-flat .h3d-hero { margin-top: 7vh; } }

/* the end of the story (rc57): a card with one button that opens the map full screen */
.hj .hj-end { width: calc(100% - 24px); max-width: 760px; margin: 28px auto 0; padding: 26px 20px; border-radius: 24px; text-align: center; background: rgba(10,14,24,.84); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.16); color: #fff; }
body .bld-h3d.hj .hj-end h2 { color: #fff; margin: 0 0 8px; font-size: clamp(24px, 6vw, 34px); }
.hj .hj-end p { color: #d6ddf3; margin: 0 auto 16px; max-width: 520px; }
body .bld-h3d.hj .hj-end .hj-endgo { background: #e8a63b; border-color: #e8a63b; color: #1d1b16 !important; font-size: 17px; padding: 14px 26px; min-height: 52px; }
body .bld-h3d.hj .hj-end .hj-endgo:hover { background: #f2b653; }
.hj.hj-flat .hj-end { display: none; }
.hj .h3d-foot { background: rgba(10,14,24,.88); color: #c9d2ee; }
body .bld-h3d.hj .h3d-foot a { color: #f0c36b; }

/* map mode: the story steps aside, the page stops scrolling, and the map and its controls have the whole screen */
html.hj-lock, html.hj-lock body { overflow: hidden; overscroll-behavior: none; }
.hj:not(.hj-flat) .hj-mapui { display: none; }
.hj.hj-mapmode > header, .hj.hj-mapmode > section:not(.hj-mapui), .hj.hj-mapmode > footer, .hj.hj-mapmode .hj-rail, .hj.hj-mapmode .hj-progress, .hj.hj-mapmode .hj-nudge { visibility: hidden; }
.hj.hj-mapmode .hj-map { opacity: 1; }
.hj.hj-mapmode .hj-mapui { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 5; margin: 0; width: auto; max-width: none; padding: 72px 12px 84px; background: transparent; box-shadow: none; border-radius: 0; pointer-events: none; transform: none; color: var(--h3d-ink); }
.hj.hj-mapmode .hj-mapui .hj-maptop, .hj.hj-mapmode .hj-mapui .h3d-toolbar, .hj.hj-mapmode .hj-mapui .h3d-timeline, .hj.hj-mapmode .hj-mapui .h3d-panel, .hj.hj-mapmode .hj-mapui .h3d-tablewrap { pointer-events: auto; }
.hj-maptop { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
body .bld-h3d.hj .hj-mapback { background: #fff; color: var(--h3d-ink); border-color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
body .bld-h3d.hj .hj-maph { margin: 0; padding: 6px 12px; border-radius: 999px; background: rgba(10,14,24,.85); color: #fff; font-size: 16px; line-height: 1.3; font-weight: 700; }
.hj-maph:focus { outline: none; }
.hj.hj-mapmode .hj-mapui .h3d-toolbar { margin: 0 0 8px; padding: 8px 10px; background: rgba(246,243,236,.96); border-radius: 18px; box-shadow: 0 10px 34px rgba(0,0,0,.35); }
.hj.hj-mapmode .hj-mapui .h3d-stagewrap { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; }
.hj.hj-mapmode .hj-mapui .h3d-year { position: absolute; top: 210px; left: 16px; color: #fff; text-shadow: 0 2px 16px rgba(0,0,0,.8); }
.hj.hj-mapmode .hj-mapui .h3d-legend { position: static; align-self: flex-start; }
.hj.hj-mapmode .hj-mapui .h3d-timeline { position: static; }
.hj.hj-mapmode .hj-mapui .h3d-panel { position: static; max-height: 34vh; max-height: 34svh; overflow: auto; box-shadow: 0 14px 44px rgba(0,0,0,.4); }
.hj.hj-mapmode .hj-mapui .h3d-tablewrap { max-height: 34vh; max-height: 34svh; margin: 0; }
.hj.hj-mapmode .hj-mapui .h3d-hint { display: none; }
.hj-map .maplibregl-ctrl-top-right { top: 64px; }
@media (max-width: 999px) {
	.hj-map .maplibregl-ctrl-bottom-right { display: none; } /* phones: pinch to zoom, two-finger drag to tilt */
	.hj-map .maplibregl-ctrl-bottom-left { bottom: 76px; }
	.hj.hj-mapmode .hj-mapui .h3d-panel:empty + .h3d-tablewrap[hidden] { display: none; }
}
@media (min-width: 1000px) {
	.hj.hj-mapmode .hj-mapui { padding: 76px max(24px, 3vw) 24px; }
	.hj.hj-mapmode .hj-mapui .hj-maptop, .hj.hj-mapmode .hj-mapui .h3d-toolbar { width: calc(100% - 420px); }
	.hj.hj-mapmode .hj-mapui .h3d-stagewrap { position: static; display: block; }
	.hj.hj-mapmode .hj-mapui .h3d-panel { position: fixed; top: 76px; right: 64px; width: 340px; max-height: calc(100vh - 110px); }
	.hj.hj-mapmode .hj-mapui .h3d-timeline { position: fixed; left: max(24px, 3vw); right: 440px; bottom: 24px; }
	.hj.hj-mapmode .hj-mapui .h3d-legend { position: fixed; left: max(24px, 3vw); bottom: 86px; }
	.hj.hj-mapmode .hj-mapui .h3d-year { top: 200px; left: max(28px, 3vw); }
	.hj.hj-mapmode .hj-mapui .h3d-tablewrap { position: fixed; left: max(24px, 3vw); top: 200px; width: min(620px, calc(100% - 500px)); max-height: calc(100vh - 320px); box-shadow: 0 14px 44px rgba(0,0,0,.4); }
	.hj.hj-mapmode .hj-map .maplibregl-ctrl-bottom-left { bottom: 128px; }
}
/* the page no longer slides its chapters in (it read as the page shifting while scrolling) */
.hj.hj-ready .h3d-explore:not(.hj-in), .hj.hj-ready .h3d-section:not(.hj-in) { transform: none; }
.hj [data-hj-ch].hj-in { transition: none; }
.hj.hj-flat .hj-maptop { display: none; }
@media (max-width: 999px) { .hj.hj-mapmode .hj-map .maplibregl-ctrl-bottom-left { top: 64px; bottom: auto; left: auto; right: 0; } }
@media (max-width: 999px) {
	.hj.hj-mapmode .hj-mapui { padding-top: 64px; }
	.hj.hj-mapmode .hj-mapui .hj-maptop { margin-bottom: 6px; }
	body .bld-h3d.hj .hj-maph { font-size: 14px; padding: 5px 10px; }
	.hj.hj-mapmode .hj-mapui .h3d-toolbar { padding: 6px 8px; gap: 6px 8px; }
	.hj.hj-mapmode .hj-mapui .h3d-chips span { padding: 6px 9px; font-size: 13px; }
	.hj.hj-mapmode .hj-mapui .h3d-panel, .hj.hj-mapmode .hj-mapui .h3d-tablewrap { max-height: 24vh; max-height: 24svh; padding: 12px; }
	.hj.hj-mapmode .hj-mapui .h3d-legend { padding: 4px 8px; }
}
/* the daytime 3D city (rc59): a soft dark veil keeps the story's white text readable over it; gone in map mode */
.hj.h3d-city .hj-map::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10,14,24,.62) 0%, rgba(10,14,24,.38) 45%, rgba(10,14,24,.66) 100%); transition: opacity .4s; }
.hj.h3d-city.hj-mapmode .hj-map::after { opacity: 0; }
/* rc61: the room-type key sits under the map-mode toolbar, not behind it */
.hj.hj-mapmode .hj-map .h3d-typelegend { top: 196px; left: max(24px, 3vw); right: 460px; }
@media (max-width: 999px) { .hj.hj-mapmode .hj-map .h3d-typelegend { top: 236px; left: 12px; right: 12px; } }
/* rc62 phones in the map view: the map gets the screen — one slim bar on top (options fold away), a sheet at the bottom
   that shows its first lines until tapped open, no legend text. Laptops and tablets are unchanged. */
@media (max-width: 699px) {
	.hj.hj-mapmode .hj-mapui { padding: 60px 8px 76px; }
	.hj.hj-mapmode .hj-mapui .hj-maptop { position: absolute; left: 8px; top: 60px; margin: 0; z-index: 2; }
	body .bld-h3d.hj .hj-mapback { min-height: 36px; padding: 6px 10px; font-size: 13px; }
	body .bld-h3d.hj .hj-maph { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.hj-mapback-l { display: none; } .hj-mapback-s { display: inline; }
	.hj.hj-mapmode .hj-mapui .h3d-toolbar { margin: 0 0 6px 0; padding: 4px 6px 4px 8px; padding-left: 88px; flex-wrap: nowrap; min-height: 44px; border-radius: 14px; align-items: center; gap: 6px; }
	.hj.hj-mapmode .hj-mapui .h3d-crumbs [data-h3d-home]:not([aria-current]), .hj.hj-mapmode .hj-mapui .h3d-crumbs [data-h3d-home]:not([aria-current]) + span { display: none; } /* phones: the town (and block) only; Singapore is one tap away via Back to island zoom */
	.hj.hj-mapmode .hj-mapui .h3d-toolbar .h3d-crumbs { font-size: 13px; flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
	.hj.hj-mapmode .hj-mapui .h3d-toolbar:not(.is-open) .h3d-chips, .hj.hj-mapmode .hj-mapui .h3d-toolbar:not(.is-open) .h3d-select, .hj.hj-mapmode .hj-mapui .h3d-toolbar:not(.is-open) [data-h3d-tablebtn] { display: none; }
	.hj.hj-mapmode .hj-mapui .h3d-toolbar.is-open { padding-left: 8px; padding-top: 48px; flex-wrap: wrap; }
	.hj.hj-mapmode .h3d-filtbtn { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--h3d-line, #ddd6c8); background: #fff; color: var(--h3d-ink, #1d1b16); font: 600 13px/1 system-ui, sans-serif; cursor: pointer; }
	.hj.hj-mapmode .hj-mapui .h3d-toolbar.is-open .h3d-filtbtn { position: absolute; right: 14px; top: 68px; }
	.hj.hj-mapmode .hj-mapui .h3d-legend { display: none; }
	.hj.hj-mapmode .hj-mapui .h3d-timeline { padding: 3px 10px 3px 3px; }
	.hj.hj-mapmode .hj-mapui .h3d-timeline .h3d-play { width: 34px; height: 34px; }
	.hj.hj-mapmode .hj-mapui .h3d-stagewrap { gap: 6px; }
	.hj.hj-mapmode .hj-mapui .h3d-panel { position: relative; max-height: 96px; overflow: hidden; padding: 10px 12px; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
	.hj.hj-mapmode.h3d-sheet-open .hj-mapui .h3d-panel { max-height: 52vh; max-height: 52svh; overflow: auto; -webkit-mask-image: none; mask-image: none; }
	.hj.hj-mapmode .h3d-sheetbtn { display: inline-flex; align-self: flex-end; align-items: center; gap: 4px; min-height: 32px; margin-bottom: -4px; padding: 0 12px; border-radius: 999px 999px 0 0; border: 0; background: #fff; color: var(--h3d-ink, #1d1b16); font: 700 12px/1 system-ui, sans-serif; box-shadow: 0 -4px 12px rgba(0,0,0,.18); cursor: pointer; pointer-events: auto; position: relative; z-index: 1; }
	.hj.hj-mapmode .h3d-panel:empty ~ .h3d-sheetbtn, .hj.hj-mapmode .h3d-sheetbtn:has(+ .h3d-panel:empty) { display: none; }
	.hj.hj-mapmode .hj-mapui .h3d-panel .h3d-ptitle { font-size: 17px; margin: 0 0 2px; }
	.hj.hj-mapmode .hj-mapui .h3d-tablewrap { max-height: 40vh; max-height: 40svh; }
	.hj.hj-mapmode .hj-map .h3d-typelegend { top: 112px; }
}

@media (min-width: 700px) { .hj-mapback-s { display: none; } }
