/* ============================================================================
 * Life Panel — world / continent selection
 * Visual language matches .world-map-panel (dark glass, 45px radius) and the
 * app-wide "Blond" display font. Map + bubbles are rendered by life-panel.js
 * (D3). This file styles the shell, the continent bubbles, the drill-down
 * layers (provinces / municipalities / cities), labels, breadcrumb and states.
 * ==========================================================================*/

/* ---- Panel shell (mirrors .world-map-panel positioning) ---- */
.life-panel {
  position: absolute;
  top: 2px;
  left: 85px;
  width: min(1100px, calc(100% - 110px));
  height: 880px;
  max-height: calc(100vh - 160px);
  background: rgba(20, 22, 28, 0.78);
  border: 1px solid rgba(253, 253, 253, 0.18);
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.4),
    inset 0 0 18px 4px rgba(255, 255, 255, 0.04);
  border-radius: 45px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease-standard);
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  box-sizing: border-box;
  color: rgba(255, 255, 255, 0.92);
  font-family: "Blond Spec", "Blond", "Inter", sans-serif;
}
.life-panel.is-open { opacity: 1; pointer-events: all; z-index: 60; }

/* When the Life Panel is open, banish every other panel off-screen so none of
   them can intercept clicks (some sit transparent over the same area). */
body:has(.life-panel.is-open) .timing__panel,
body:has(.life-panel.is-open) .planner_panel,
body:has(.life-panel.is-open) .trading__sim-panel,
body:has(.life-panel.is-open) .world-map-panel,
body:has(.life-panel.is-open) .routine-finance-panel,
body:has(.life-panel.is-open) .achievement-panel,
body:has(.life-panel.is-open) .color_engine-panel,
body:has(.life-panel.is-open) .comment-panel,
body:has(.life-panel.is-open) .ai-panel,
body:has(.life-panel.is-open) .ai-panel__surface {
  left: -99999px !important;
  pointer-events: none !important;
  opacity: 0 !important;
}

.life-panel__inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

/* ---- Animated ivy trail flowing horizontally behind the map ---- */
.lp-ivy-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.lp-ivy-leaf {
  position: absolute;
  left: 0;
  color: #ffffff;          /* stem stroke uses currentColor */
  fill: #ffffff;
  opacity: var(--o0, 0.05);
  transform-origin: center;
  /* NO will-change here: it forced a permanent GPU layer per leaf, which
     blew the layer budget and tanked the whole app's compositing. The browser
     composites these only while actively animating, then releases them. */
  animation-name: lp-ivy-drift;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}
/* One compositor-only transform animation (drift + gentle sway) — far cheaper
   than animating `left`, which forced a layout/paint every frame per leaf. */
@keyframes lp-ivy-drift {
  0%   { transform: translateX(-140px) rotate(var(--r, 0deg)) scale(1); }
  50%  { transform: translateX(55vw)  rotate(calc(var(--r, 0deg) + 7deg)) scale(1.06); }
  100% { transform: translateX(112vw) rotate(var(--r, 0deg)) scale(1); }
}
/* While the panel is closed: drop the ivy entirely (no layers at all — paused
   transforms can still hold a layer), pause label animation, kill the blur. */
.life-panel:not(.is-open) .lp-ivy-bg { display: none; }
.life-panel:not(.is-open) .lp-clabel { animation-play-state: paused; }
.life-panel:not(.is-open) { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* ---- Big headline above the continents (replaces title/subtitle) ---- */
.lp-headline {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  margin: 0;
  max-width: 92%;
  text-align: center;
  white-space: nowrap;
  font-family: "Blond Spec", "Blond", "Inter", sans-serif;
  font-size: clamp(26px, 3.4vw, 46px);
  letter-spacing: 0.05em;
  color: #fdfdfd;
  pointer-events: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
}

/* ---- Breadcrumb — floats top-left, hidden at the world level ---- */
.lp-crumbs {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 12px;
  letter-spacing: 0.06em;
}
.life-panel[data-level="world"] .life-panel__stage .lp-crumbs { display: none; }
.lp-crumb {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 7px;
  border-radius: 8px;
  transition: color var(--dur-base) var(--ease-standard), background var(--dur-base) var(--ease-standard);
}
.lp-crumb:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.lp-crumb.is-current { color: #fdfdfd; cursor: default; }
.lp-crumb.is-current:hover { background: transparent; }
.lp-crumb--back {
  font-size: 18px;
  line-height: 1;
  padding: 1px 11px 3px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fdfdfd;
}
.lp-crumb-sep { color: rgba(255, 255, 255, 0.28); font-size: 12px; user-select: none; }

/* ---- Map stage ---- */
.life-panel__stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.lp-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* Base world (countries) — the continents themselves are the click targets. */
.lp-country {
  fill: rgba(255, 255, 255, 0.06);
  stroke: rgba(255, 255, 255, 0.13);
  stroke-width: 0.5;
  vector-effect: non-scaling-stroke;
  transition: fill var(--dur-slow) var(--ease-standard), fill-opacity var(--dur-slow) var(--ease-standard), stroke var(--dur-slow) var(--ease-standard);
}
.life-panel[data-level="world"] .lp-cont-group { cursor: pointer; }
.lp-cont-group.is-lit .lp-country {
  fill: var(--lp-c, #6dffb0);
  fill-opacity: 0.26;
  stroke: var(--lp-c, #6dffb0);
  stroke-opacity: 0.55;
}
.lp-country.is-dim { fill: rgba(255, 255, 255, 0.025); }

/* ---- Drill-down vector layers (country -> province -> municipality) ---- */
.lp-ctry, .lp-prov, .lp-muni {
  fill: var(--lp-c, #6dffb0);
  fill-opacity: 0;
  stroke: var(--lp-c, #6dffb0);
  stroke-opacity: 0.6;
  stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: fill-opacity var(--dur-slow) var(--ease-standard), stroke-opacity var(--dur-slow) var(--ease-standard);
}
.lp-ctry { stroke-width: 1.1; }
.lp-ctry.is-hover, .lp-prov.is-hover, .lp-muni.is-hover { fill-opacity: 0.22; stroke-opacity: 1; }
.lp-ctry.is-dim, .lp-prov.is-dim, .lp-muni.is-dim { stroke-opacity: 0.18; }
.lp-ctry.is-selected, .lp-prov.is-selected, .lp-muni.is-selected {
  fill-opacity: 0.14;
  stroke-opacity: 1;
  stroke-width: 1.4;
}

/* ---- Cities (terminal, not selectable) ---- */
.lp-city-dot {
  fill: #fdfdfd;
  stroke: var(--lp-c, #6dffb0);
  stroke-width: 1.4;
  vector-effect: non-scaling-stroke;
  pointer-events: none;
}
.lp-city-dot.is-capital { fill: var(--lp-c, #6dffb0); }

/* ---- Labels (rendered in a non-zoomed overlay, constant size) ---- */
.lp-labels { pointer-events: none; }
.lp-clabel {
  font-family: "Blond Spec", "Blond", "Inter", sans-serif;
  font-size: 26px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: #ffffff;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(8, 10, 14, 0.6);
  stroke-width: 3.5px;
  pointer-events: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}
.lp-rlabel {
  font-family: "Blond Spec", "Blond", "Inter", sans-serif;
  font-size: 12px;
  letter-spacing: 0.04em;
  fill: rgba(255, 255, 255, 0.88);
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.6);
  stroke-width: 2.4px;
  pointer-events: none;
}
.lp-city-label {
  font-family: "Inter", "Blond", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  fill: rgba(255, 255, 255, 0.82);
  text-anchor: start;
  paint-order: stroke;
  stroke: rgba(0, 0, 0, 0.65);
  stroke-width: 2.2px;
  pointer-events: none;
}

/* ---- Loading overlay ---- */
.lp-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(14, 16, 20, 0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-standard);
  z-index: 5;
}
.lp-loading.is-on { opacity: 1; pointer-events: all; }
.lp-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.18);
  border-top-color: #6dffb0;
  animation: lp-spin 0.9s linear infinite;
}
.lp-loading-text {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
}
@keyframes lp-spin { to { transform: rotate(360deg); } }

/* ---- Error / empty toast ---- */
.lp-note {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(8px);
  background: rgba(10, 12, 16, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.85);
  font-size: 12px;
  letter-spacing: 0.03em;
  padding: 9px 16px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
  z-index: 6;
}
.lp-note.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Completed view (shown when selection already finished) ---- */
.lp-complete {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 40px;
}
.life-panel[data-view="complete"] .lp-complete { display: flex; }
.life-panel[data-view="complete"] .life-panel__stage .lp-svg { opacity: 0.18; filter: blur(1px); }
.lp-complete__eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}
.lp-complete__place {
  font-family: "Blond Spec", "Blond", "Inter", sans-serif;
  font-size: 34px;
  letter-spacing: 0.06em;
  color: #fdfdfd;
}
.lp-complete__path { font-size: 13px; color: rgba(255, 255, 255, 0.6); letter-spacing: 0.04em; }
.lp-complete__change {
  margin-top: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fdfdfd;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
.lp-complete__change:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.55); }

/* In the completed view, hide the live map chrome. */
.life-panel[data-view="complete"] .lp-crumbs,
.life-panel[data-view="complete"] .lp-headline { display: none; }

/* App-wide: freeze all animations while the browser tab is hidden. */
body.lp-bg-hidden *, body.lp-bg-hidden *::before, body.lp-bg-hidden *::after {
  animation-play-state: paused !important;
}

/* Exemption: chat bubbles must NEVER freeze mid-entry. Their enter animation
   is a one-shot 600ms fade — if a Billie reply lands while the tab is hidden
   (common: users tab away during long reasoning), pausing leaves the bubble
   stuck at the 0% keyframe (opacity 0, invisible — report button included)
   until a full page reload. Letting it finish costs nothing. */
body.lp-bg-hidden .ai-panel__message,
body.lp-bg-hidden .ai-panel__message::before,
body.lp-bg-hidden .ai-panel__message::after {
  animation-play-state: running !important;
}

/* Respect reduced motion: hide the drifting ivy + calm the label float/spinner. */
@media (prefers-reduced-motion: reduce) {
  .lp-ivy-bg { display: none; }
  .lp-clabel { animation: none !important; }
  .lp-spinner { animation-duration: 1.6s; }
}

/* ============================================================================
 * City-select transition + Life dashboard (idea 2)
 * ==========================================================================*/

/* Selected city dot grows + glows during the collapse animation. */
.lp-city-dot.is-chosen { stroke-width: 2.5; filter: drop-shadow(0 0 8px var(--lp-c, #6dffb0)); }

/* Decrypt headline overlay shown as the province collapses to the dot. */
.lp-decrypt {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 8%;
  z-index: 8;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slowest) var(--ease-standard);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: clamp(18px, 2.6vw, 32px);
  letter-spacing: 0.12em;
  color: #fdfdfd;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.8), 0 0 16px rgba(109, 255, 176, 0.25);
}
.lp-decrypt.is-on { opacity: 1; }

/* The stage (world view) cross-fades out when the dashboard is shown. */
.life-panel__stage { transition: opacity var(--dur-slowest) var(--ease-standard); }
.life-panel[data-view="life"] .life-panel__stage { opacity: 0; pointer-events: none; }

/* ---- Life dashboard view ---- */
.lp-life-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-slowest) var(--ease-standard);
  z-index: 3;
}
.life-panel[data-view="life"] .lp-life-view { opacity: 1; pointer-events: auto; }

.lp-life-head { padding: 26px 30px 10px; flex: 0 0 auto; }
.lp-life-crumbs { position: static; top: auto; left: auto; }   /* override map-overlay crumbs */
.lp-asof {
  margin-top: 6px;
  padding-left: 3px;
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
}
.lp-asof b { color: rgba(255, 255, 255, 0.7); font-weight: 500; }

.lp-life-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 10px 30px 30px; }
.lp-life-scroll::-webkit-scrollbar { width: 8px; }
.lp-life-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; }

.lp-life-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(248px, 1fr));
  gap: 16px;
  align-items: start;
}

/* ---- Cards (Apple-like glass) ---- */
.lp-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 22px;
  padding: 20px 22px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 16px 2px rgba(255, 255, 255, 0.02);
  opacity: 0;
  transform: translateY(14px);
  animation: lp-card-in var(--dur-slowest) var(--ease-out) forwards;
}
.lp-card--wide { grid-column: 1 / -1; }
@keyframes lp-card-in { to { opacity: 1; transform: translateY(0); } }

.lp-card__label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  display: flex;
  align-items: center;
  gap: 8px;
}
.lp-card__value {
  font-family: "Blond Spec", "Blond", "Inter", sans-serif;
  font-size: 30px;
  line-height: 1.1;
  color: #fdfdfd;
  margin-top: 10px;
}
.lp-card__sub { margin-top: 6px; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); }
.lp-tag {
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 2px 7px;
  border-radius: 99px;
}

/* House-price range bar */
.lp-range { margin-top: 16px; }
.lp-range__bar {
  height: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, #3fcf8e, #e8a33d 55%, #ff6b6b);
  position: relative;
  opacity: 0.85;
}
.lp-range__row { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: rgba(255, 255, 255, 0.6); }
.lp-range__row b { display: block; color: #fdfdfd; font-size: 14px; font-weight: 500; margin-top: 2px; }

/* Tax brackets */
.lp-brackets { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.lp-bracket { display: flex; justify-content: space-between; font-size: 12px; color: rgba(255, 255, 255, 0.62); }
.lp-bracket span:last-child { color: #fdfdfd; }
.lp-card__note { margin-top: 12px; font-size: 10.5px; color: rgba(255, 255, 255, 0.38); line-height: 1.45; }

/* Insurances card */
.lp-ins-tabs { display: flex; gap: 8px; margin: 14px 0 4px; flex-wrap: wrap; }
.lp-ins-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard), color var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
.lp-ins-tab:hover { color: #fff; }
.lp-ins-tab.is-active { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.lp-ins-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.lp-ins-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.lp-ins-chip:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-1px); }
.lp-ins-chip.is-selected { border-color: var(--lp-c, #6dffb0); background: color-mix(in srgb, var(--lp-c, #6dffb0) 14%, transparent); color: #fff; }
.lp-ins-check {
  width: 16px; height: 16px; border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; color: #07210f;
}
.lp-ins-chip.is-selected .lp-ins-check { background: var(--lp-c, #6dffb0); border-color: var(--lp-c, #6dffb0); }
.lp-ins-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.lp-ask-billie {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fdfdfd; color: #0c0e12;
  border: none; border-radius: 99px;
  font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0.02em;
  padding: 11px 20px; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-standard), box-shadow var(--dur-base) var(--ease-standard);
}
.lp-ask-billie:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); }
.lp-ins-hint { font-size: 11.5px; color: rgba(255, 255, 255, 0.45); }

/* ---- Change-location modal ---- */
.lp-modal {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(8, 10, 14, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9;
}
.lp-modal.is-on { display: flex; animation: lp-fade var(--dur-base) var(--ease-standard); }
@keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }
.lp-modal__card {
  width: min(460px, 90%);
  background: rgba(22, 24, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  padding: 26px 26px 20px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}
.lp-modal__title {
  margin: 0 0 12px;
  font-family: "Blond Spec", "Blond", "Inter", sans-serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #fdfdfd;
}
.lp-modal__body { font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, 0.75); }
.lp-modal__body ul { margin: 8px 0 0; padding-left: 18px; }
.lp-modal__body li { margin: 3px 0; }
.lp-modal__body .lp-good { color: #6dffb0; }
.lp-modal__body .lp-warn { color: #ffb15a; }
.lp-modal__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.lp-modal__btn {
  font-family: inherit; font-size: 13px; letter-spacing: 0.03em;
  padding: 10px 18px; border-radius: 99px; cursor: pointer;
  border: 1px solid transparent; transition: background var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
.lp-modal__btn--ghost { background: transparent; border-color: rgba(255, 255, 255, 0.22); color: rgba(255, 255, 255, 0.85); }
.lp-modal__btn--ghost:hover { background: rgba(255, 255, 255, 0.08); }
.lp-modal__btn--go { background: #ff6b6b; color: #2a0606; font-weight: 600; }
.lp-modal__btn--go:hover { background: #ff8585; }

/* Life-view internal loader */
.lp-life-loading {
  position: absolute; inset: 0; z-index: 4;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(14, 16, 20, 0.4); opacity: 0; pointer-events: none; transition: opacity var(--dur-base) var(--ease-standard);
}
.lp-life-loading.is-on { opacity: 1; pointer-events: all; }

@media (prefers-reduced-motion: reduce) {
  .lp-card { animation: none; opacity: 1; transform: none; }
}

/* Selected-city badge synced into the profile panel from the Life Panel. */
.profile-panel__location {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 1px 0 5px;
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  color: rgba(245, 245, 245, 0.6);
}
.profile-panel__location[hidden] { display: none; }
.profile-panel__location-pin { opacity: 0.85; }
.profile-panel__location-text {
  color: rgba(245, 245, 245, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* ============================================================================
 * Insurance brand cards + house-price map (Life Panel optimisation)
 * ==========================================================================*/
.lp-ins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.lp-ins-card {
  position: relative;
  display: flex;
  gap: 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  transition: background var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard), transform var(--dur-fast) var(--ease-standard);
}
.lp-ins-card:hover { background: rgba(255, 255, 255, 0.075); transform: translateY(-1px); }
.lp-ins-card.is-selected {
  border-color: var(--lp-c, #6dffb0);
  background: color-mix(in srgb, var(--lp-c, #6dffb0) 12%, transparent);
}
.lp-ins-logo {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 11px;
  background: #ffffff;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.lp-ins-logo img { width: 100%; height: 100%; object-fit: contain; padding: 5px; box-sizing: border-box; }
.lp-ins-mono { font-family: "Blond Spec", "Blond", "Inter", sans-serif; font-weight: 600; font-size: 16px; color: #15171c; }
.lp-ins-card__body { min-width: 0; flex: 1; }
.lp-ins-card__name { font-size: 14px; font-weight: 600; color: #fdfdfd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-ins-card__blurb {
  margin-top: 3px; font-size: 11.5px; line-height: 1.4; color: rgba(255, 255, 255, 0.6);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.lp-ins-card__actions { display: flex; gap: 8px; margin-top: 9px; }
.lp-ins-link, .lp-ins-ask {
  font-family: inherit; font-size: 11px; letter-spacing: 0.02em;
  padding: 5px 10px; border-radius: 99px; cursor: pointer; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16); background: transparent; color: rgba(255, 255, 255, 0.8);
  transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
}
.lp-ins-link:hover, .lp-ins-ask:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.lp-ins-pick {
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; line-height: 1;
  border: 1.5px solid rgba(255, 255, 255, 0.28); color: rgba(255, 255, 255, 0.6);
}
.lp-ins-card.is-selected .lp-ins-pick { background: var(--lp-c, #6dffb0); border-color: var(--lp-c, #6dffb0); color: #07210f; }

/* Insurance card extra info */
.lp-ins-card__meta { margin-top: 2px; font-size: 10.5px; letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.45); }
.lp-ins-card__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.lp-ins-pill {
  font-size: 9.5px; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.75);
  background: color-mix(in srgb, var(--lp-c, #6dffb0) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--lp-c, #6dffb0) 32%, transparent);
  padding: 2px 8px; border-radius: 99px;
}

/* Home-prices card — inline expandable map */
.lp-house-card { cursor: default; }
.lp-house-head { cursor: pointer; }
.lp-house-hint {
  margin-top: 12px; font-size: 11.5px; letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.5);
  display: flex; align-items: center; gap: 6px;
}
.lp-house-chevron { transition: transform var(--dur-base) var(--ease-standard); }
.lp-house-card.is-expanded { grid-column: 1 / -1; }
.lp-house-mapwrap { max-height: 0; overflow: hidden; transition: max-height var(--dur-deliberate) var(--ease-standard); }
.lp-house-card.is-expanded .lp-house-mapwrap { max-height: 520px; margin-top: 14px; }
.lp-house-badge {
  display: inline-block; margin-bottom: 8px;
  font-size: 10.5px; letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14); padding: 3px 9px; border-radius: 99px;
}
.lp-house-badge.is-real { color: #6dffb0; border-color: rgba(109, 255, 176, 0.4); }
.lp-house-map { height: 360px; width: 100%; border-radius: 14px; overflow: hidden; background: rgba(0,0,0,0.2); }
.lp-house-legend { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 11.5px; color: rgba(255, 255, 255, 0.65); }
.lp-house-scale { width: 120px; height: 8px; border-radius: 99px; }
.lp-house-range { margin-left: auto; color: #fdfdfd; font-weight: 500; }
.lp-house-map .leaflet-container { font-family: inherit; background: #aadaff; }
