/* Keep useful listing and explanatory text copyable, overriding older blanket rules. */
* { -webkit-user-select: auto; user-select: auto; }
body { -webkit-user-select: text; user-select: text; }

/* Display headings and hero copy behave like interface decoration. Include
   nested spans so animated words do not become individually selectable. */
:is(h1, h2, .cl-hero-text, .hero-copy) {
  -webkit-user-select: none;
  user-select: none;
}
:is(h1, h2, .cl-hero-text, .hero-copy) * {
  -webkit-user-select: none;
  user-select: none;
}

/* Names, answers and practical details remain available to copy, even when
   they contain headings or sit inside a decorative hero container. */
:is(.housing-card, .chat-card, .msg, .resource-card, .item, .opt-card, .result, .selected-home,
    .photo-attribution, .photo-source-notice, [data-selectable],
    input, textarea, [contenteditable="true"],
    a[href^="tel:"], a[href^="mailto:"]),
:is(.housing-card, .chat-card, .msg, .resource-card, .item, .opt-card, .result, .selected-home,
    .photo-attribution, .photo-source-notice, [data-selectable]) * {
  -webkit-user-select: text;
  user-select: text;
}

/* Avoid accidental selection while operating controls. */
:is(button, button *, [role="button"], [role="button"] *, select, option,
       summary, nav a, .header-links a, .brand, .brand *, .hero-art, .hero-art *,
       .tab-icon, .step-number, .eyebrow, .housing-status, .photo-expand-mark) {
  -webkit-user-select: none;
  user-select: none;
}

:where(img, svg) {
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Preserve editing, copying, keyboard focus and screen-reader access. */
:where(input, textarea, [contenteditable="true"]) {
  -webkit-user-select: text;
  user-select: text;
}

.photo-source-notice {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.photo-attribution {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.6;
}

/* A gentle rose halo distinguishes Save from the adjacent Share control. */
.card-tools .favorite-btn:hover,
.card-tools .favorite-btn:focus-visible {
  background: #fff0f2;
  border-color: #d88e99;
  color: #ac3548;
  box-shadow: 0 0 0 4px #c944591a;
}

/* Mounted above the cards so their clipped photo panels cannot hide it. */
.favorite-float {
  position: fixed;
  z-index: 1000;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  color: #bc3d53;
  pointer-events: none;
  animation: favorite-drift 850ms ease-out both;
}
.favorite-float svg { display: block; width: 100%; height: 100%; fill: currentColor; }
@keyframes favorite-drift {
  0% { opacity: 0; transform: translate(0, 0) scale(.65); }
  20% { opacity: 1; transform: translate(-3px, -12px) scale(1); }
  65% { opacity: .8; transform: translate(6px, -38px) scale(.95); }
  100% { opacity: 0; transform: translate(10px, -62px) scale(.75); }
}
@media (prefers-reduced-motion: reduce) {
  .favorite-float { display: none; animation: none; }
}
