/* ScanCasa — schlichtes, mobile-first Stylesheet. Kein Framework. */

:root {
  --color-bg: #f6f4f1;
  --color-card: #ffffff;
  --color-input-bg: #ffffff;
  --color-text: #1f2421;
  --color-text-muted: #6b7280;
  --color-border: #e6e1da;
  /* Terrakotta als Markenfarbe — angelehnt an die warmen Fassaden- und
     Dachziegel-Töne spanischer Ortschaften, statt eines "corporate" Blaus
     oder Monochrom-Schwarz. */
  --color-accent: #c1502e;
  --color-accent-hover: #a8431f;
  --color-accent-text: #ffffff;
  /* Gedecktes Terrakotta/Petrol als zweite Markenfarbe für Akzente/Links,
     die sich vom knalligen CTA-Terrakotta absetzen sollen. */
  --color-brand-2: #2a6f68;
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --color-success-text: #15803d;
  --color-success-border: #bbf7d0;
  --color-danger: #dc2626;
  --color-danger-bg: #fef2f2;
  --color-danger-text: #b91c1c;
  --color-danger-border: #fecaca;
  --color-warn: #ca8a04;
  --color-warn-bg: #fffbeb;
  --color-shadow: rgba(31, 24, 18, 0.1);
  --radius: 14px;
  --radius-pill: 999px;
  --font-display: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --max-width: 640px;
  /* Die Landingpage darf auf großen Bildschirmen breiter atmen als die
     Formular-Seiten (Signup/Dashboard) — dort bleibt die schmalere Breite,
     weil Formulare auf breiten Bildschirmen unangenehm lang wirken. */
  --max-width-wide: 980px;
  /* Die Suchergebnis-Seite braucht noch etwas mehr Breite als die Landing-
     page — Filter-Sidebar + Ergebnisliste nebeneinander (ab Desktop). */
  --max-width-search: 1180px;
}

/* Dunkler Modus — folgt standardmäßig der Systemeinstellung
   (prefers-color-scheme), kann aber über den Umschalter im Header
   überstimmt werden (setzt data-theme="dark"/"light" auf <html>, siehe
   partials/head.ejs + foot.ejs). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #17140f;
    --color-card: #221d17;
    --color-input-bg: #17140f;
    --color-text: #f5f1ea;
    --color-text-muted: #a89e8f;
    --color-border: #3a3227;
    --color-accent: #e0703f;
    --color-accent-hover: #ef8656;
    --color-accent-text: #1f1208;
    --color-brand-2: #4fa89c;
    --color-success: #22c55e;
    --color-success-bg: #052e16;
    --color-success-text: #4ade80;
    --color-success-border: #14532d;
    --color-danger: #f87171;
    --color-danger-bg: #450a0a;
    --color-danger-text: #fca5a5;
    --color-danger-border: #7f1d1d;
    --color-warn: #eab308;
    --color-warn-bg: #422006;
    --color-shadow: rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  --color-bg: #17140f;
  --color-card: #221d17;
  --color-input-bg: #17140f;
  --color-text: #f5f1ea;
  --color-text-muted: #a89e8f;
  --color-border: #3a3227;
  --color-accent: #e0703f;
  --color-accent-hover: #ef8656;
  --color-accent-text: #1f1208;
  --color-brand-2: #4fa89c;
  --color-success: #22c55e;
  --color-success-bg: #052e16;
  --color-success-text: #4ade80;
  --color-success-border: #14532d;
  --color-danger: #f87171;
  --color-danger-bg: #450a0a;
  --color-danger-text: #fca5a5;
  --color-danger-border: #7f1d1d;
  --color-warn: #eab308;
  --color-warn-bg: #422006;
  --color-shadow: rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* Kein globales scroll-behavior:smooth — das lässt manche Browser den
   Sprung zu einem #anchor beim ERSTEN Laden der Seite (z.B. Klick auf
   "Suscripción" im "Mein Profil"-Menü) stillschweigend auslassen, weil das
   Smooth-Scrolling vor Abschluss des Layouts startet. Der normale, sofortige
   Sprung funktioniert dagegen zuverlässig — nur die Zielposition wird unten
   per scroll-margin-top korrigiert, damit der sticky Header sie nicht
   überdeckt. */

/* Anker-Ziele im Dashboard (#ajustes, #notificaciones, #suscripcion, siehe
   partials/head.ejs "Mein Profil"-Menü) — ohne das würde der sticky Header
   die Überschrift beim Hinspringen überdecken. */
#ajustes,
#notificaciones,
#suscripcion {
  scroll-margin-top: 90px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Der Hero-Banner bricht absichtlich per negativer Margin aus der
     Content-Spalte aus (voller Bildschirmbreite) — ohne dies könnte das
     bei manchen Bildschirmbreiten/Scrollbar-Kombinationen einen minimalen
     horizontalen Scrollbalken erzeugen. */
  overflow-x: hidden;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

body.page-landing .container {
  max-width: var(--max-width-wide);
  /* Der Hero-Banner steht als erstes Element im Container und soll direkt
     unter dem Header beginnen, nicht mit dem üblichen Innenabstand. */
  padding-top: 0;
}

body.page-search .container {
  max-width: var(--max-width-search);
}

/* Login/Signup — dezentes Hintergrundfoto (Wohnstraße in Barcelona, vom
   Nutzer bereitgestelltes, lizenzfreies Foto — höhere Auflösung als das
   vorherige) hinter der Formular-Karte statt schlichtem Einfarbig. */
body.page-auth {
  background: linear-gradient(180deg, rgba(23, 18, 12, 0.5), rgba(23, 18, 12, 0.72)), url("/images/parked-cars-in-narrow-lane.jpg") center /
    cover no-repeat;
  min-height: 100vh;
}

body.page-auth .container {
  padding-top: 40px;
}

body.page-auth h1,
body.page-auth > .container > p:not(.hint):not(.error-text) {
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

/* Skip-Link — für Tastatur-/Screenreader-Nutzer, damit sie nicht bei jeder
   Seite erst durch Header-Navigation/Sprachumschalter tabben müssen.
   Unsichtbar, bis es per Tab fokussiert wird. */
.skip-link {
  position: absolute;
  top: -60px;
  left: 8px;
  z-index: 1000;
  background: var(--color-accent);
  color: var(--color-accent-text);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 8px;
}

header.site-header {
  padding: 20px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-card);
  position: sticky;
  top: 0;
  z-index: 500;
  box-shadow: 0 1px 0 var(--color-border), 0 4px 16px var(--color-shadow);
}

header.site-header .container {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-decoration: none;
}

.logo span {
  color: var(--color-accent);
}

/* Auf dem Handy nimmt das Haus-Emoji unnötig Platz neben dem Namen weg —
   ab Desktop-Breite bleibt es (siehe media query unten). */
.logo-emoji {
  display: none;
}

@media (min-width: 640px) {
  .logo-emoji {
    display: inline;
  }
}

/* display:flex nötig, seit site-nav nicht mehr nur <a>-Links (inline von
   Natur aus) enthält, sondern auch das "Herramientas"-<details>-Dropdown
   (block-level) — ohne das brach es in eine eigene Zeile UNTER/ÜBER
   "Mein Profil" um, statt sauber daneben zu stehen. */
nav.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

nav.site-nav a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

nav.site-nav a:hover {
  color: var(--color-text);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-switch {
  display: flex;
  gap: 4px;
  border-left: 1px solid var(--color-border);
  padding-left: 12px;
}

.lang-switch a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
}

.lang-switch a:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.lang-switch a.active {
  background: var(--color-text);
  color: var(--color-bg);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-card);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.theme-toggle:hover {
  background: var(--color-bg);
}

/* "Mein Profil"-Dropdown im Header (ersetzt Login/Registrieren-Links,
   sobald eine Session existiert — siehe partials/head.ejs). Baut auf dem
   nativen <details>/<summary> auf: braucht kein JS für Auf-/Zuklappen,
   nur fürs Schließen bei Klick außerhalb (siehe partials/foot.ejs). */
.profile-menu {
  position: relative;
}

.profile-menu summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
}

.profile-menu summary::-webkit-details-marker {
  display: none;
}

.profile-menu summary:hover {
  background: var(--color-bg);
}

.profile-menu-icon {
  font-size: 14px;
}

.profile-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 600;
  min-width: 200px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px var(--color-shadow);
  padding: 6px;
  display: flex;
  flex-direction: column;
}

/* .header-right vorangestellt, damit diese Regel sicher stärker wiegt als
   "nav.site-nav a" (die Dropdown-Links liegen selbst innerhalb von
   <nav class="site-nav">) — sonst übernehmen die Links versehentlich deren
   margin-left:16px und wirken dadurch nach rechts verschoben/asymmetrisch
   gegenüber dem "Abmelden"-Button (der als <button> von dieser Regel gar
   nicht getroffen wird und deshalb korrekt saß). */
.header-right .profile-menu-list a,
.header-right .profile-menu-list button {
  display: block;
  width: 100%;
  margin: 0;
  text-align: left;
  background: none;
  border: none;
  color: var(--color-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
}

.profile-menu-list a:hover,
.profile-menu-list button:hover {
  background: var(--color-bg);
}

.profile-menu-list hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 6px 2px;
}

.profile-menu-list form {
  gap: 0;
}

@media (max-width: 420px) {
  nav.site-nav {
    gap: 8px;
  }
  nav.site-nav a {
    font-size: 13px;
  }
  .header-right {
    gap: 10px;
  }
  .lang-switch {
    padding-left: 8px;
  }
}

/* Desktop: die Kopfzeile nutzt die volle Bildschirmbreite — Logo nah an der
   linken, Login/Registrieren/Sprachumschalter nah an der rechten Kante,
   statt wie der restliche Seiteninhalt auf eine schmalere Spalte begrenzt
   zu sein. */
@media (min-width: 900px) {
  header.site-header {
    padding: 20px 40px;
  }
  header.site-header .container {
    max-width: none;
  }
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid var(--color-border);
}

/* Typo-Politur (Nutzer-Wunsch: "professioneller wirken" über Schriftgröße/
   -farbe/Platzierung): etwas kräftigere, engere Überschriften-Skala mit
   negativem letter-spacing bei großer Schrift (üblich bei hochwertigem
   UI-Type, wirkt "gezeichneter" statt einfach nur groß skaliert), plus
   eine responsive Stufe für h1 — vorher blieb die Startseiten-Überschrift
   auf großen Bildschirmen genauso klein wie auf dem Handy und wirkte dort
   unterdimensioniert/wenig selbstbewusst. */
h1 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 28px;
  margin: 0 0 12px;
  line-height: 1.18;
}

@media (min-width: 640px) {
  h1 {
    font-size: 36px;
  }
}

h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 21px;
  line-height: 1.3;
  margin: 0 0 14px;
}

/* Fallback für einzelne h3, die (noch) keine eigene, komponentenspezifische
   Regel haben (z.B. .subscription-tier h3, .how-step h3 — die bleiben
   unverändert, da spezifischer und damit stärker gewichtet). */
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-text);
  margin: 0 0 6px;
}

p {
  color: var(--color-text-muted);
  margin: 0 0 12px;
}

/* Etwas mehr Luft zwischen dem Ende eines Abschnitts (.card) und der
   nächsten Überschrift — vorher kam die Abstand ausschließlich aus dem
   margin-bottom der Karte, was zwischen den vielen aufeinanderfolgenden
   Dashboard-/Landingpage-Abschnitten etwas eng wirkte. */
.card + h2,
.card + h1 {
  margin-top: 10px;
}

.subline {
  font-size: 16px;
  font-weight: normal;
  color: var(--color-text-muted);
  margin: -6px 0 12px;
}

.lead {
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-text);
}

@media (min-width: 640px) {
  .lead {
    font-size: 17px;
  }
}

/* Buttons */

.btn {
  display: inline-block;
  font-family: var(--font-display);
  background: var(--color-accent);
  color: var(--color-accent-text);
  text-decoration: none;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px var(--color-shadow);
}

.btn:active {
  transform: translateY(0);
}

.btn-block {
  display: block;
  width: 100%;
}

.btn-danger {
  background: var(--color-danger);
}

.btn-danger:hover {
  background: var(--color-danger);
  opacity: 0.9;
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-bg);
  box-shadow: none;
}

/* Forms */

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-row {
  display: flex;
  gap: 12px;
}

.field-row .field {
  flex: 1;
  min-width: 0;
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

label .optional {
  font-weight: 400;
  color: var(--color-text-muted);
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
select {
  font-size: 16px; /* verhindert Auto-Zoom auf iOS */
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-input-bg);
  color: var(--color-text);
  width: 100%;
}

input:focus,
select:focus {
  outline: 2px solid var(--color-text);
  outline-offset: -1px;
}

/* Passwort-Sichtbar-Umschalter — wird per JS um jedes Passwort-Feld ergänzt
   (siehe partials/foot.ejs). */
.password-field {
  position: relative;
}

.password-field input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  line-height: 1;
  border-radius: 6px;
}

.password-toggle:hover {
  background: var(--color-bg);
}

/* Passwort-Stärke-Anzeige — nur bei der Passwort-VERGABE (Signup, neues
   Passwort setzen), siehe partials/foot.ejs. */
.password-strength {
  display: flex;
  align-items: center;
  gap: 8px;
  visibility: hidden;
}

.password-strength-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--color-border);
  position: relative;
  overflow: hidden;
}

.password-strength-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  transform-origin: left;
  transition: transform 0.15s, background-color 0.15s;
  transform: scaleX(0);
}

.password-strength-bar.level-0::before {
  transform: scaleX(0.15);
  background: var(--color-danger);
}

.password-strength-bar.level-1::before {
  transform: scaleX(0.4);
  background: var(--color-warn);
}

.password-strength-bar.level-2::before {
  transform: scaleX(0.7);
  background: var(--color-warn);
}

.password-strength-bar.level-3::before {
  transform: scaleX(1);
  background: var(--color-success);
}

.password-strength-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

.error-text {
  font-size: 13px;
  color: var(--color-danger);
  margin: 0;
}

/* Notices / Alerts */

.notice {
  text-align: center;
  padding: 8px;
}

.notice .icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.notice.ok .card {
  border-color: var(--color-success);
  background: var(--color-success-bg);
}

.notice.error .card {
  border-color: var(--color-danger);
  background: var(--color-danger-bg);
}

.search-unavailable {
  border-color: var(--color-warn);
  background: var(--color-warn-bg);
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  text-align: left;
}

.newsletter-form input[type="email"] {
  background: var(--color-input-bg);
}

@media (min-width: 480px) {
  .newsletter-form {
    flex-direction: row;
  }
  .newsletter-form input[type="email"] {
    flex: 1;
  }
  .newsletter-form .btn {
    flex: 0 0 auto;
  }
}

.alert {
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid var(--color-success-border);
}

.alert-error {
  background: var(--color-danger-bg);
  color: var(--color-danger-text);
  border: 1px solid var(--color-danger-border);
}

/* Match / listing cards */

.match {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.match-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 999px;
}

/* Kleiner Fortschritts-Ring vor der Punktzahl (partials/score-badge.ejs) —
   reines CSS: ein conic-gradient-Kreis, per mask zum Ring ausgehöhlt
   (Donut-Technik, kein zusätzliches Bild/keine Chart-Library nötig). Der
   Verlauf selbst kommt als Inline-Style vom Server (abhängig vom
   tatsächlichen Score), diese Klasse kümmert sich nur um Form/Größe. */
.score-badge-ring {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
}

.match-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  margin: 4px 0;
}

.match-meta {
  font-size: 13px;
  color: var(--color-text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.feedback-tag {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--color-bg);
  color: var(--color-text-muted);
}

/* ==========================================================================
   Suchergebnis-Seite — Filter-Sidebar + Ergebnisliste nebeneinander (ab
   Desktop), angelehnt an das Grundprinzip großer Immobilienportale (Filter
   links, Ergebnisse rechts), aber mit eigenem Karten-/Farbstil statt 1:1
   übernommenem Layout.
   ========================================================================== */

.search-layout {
  display: block;
}

@media (min-width: 900px) {
  .search-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
  }
}

.search-filters {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

@media (min-width: 900px) {
  .search-filters {
    position: sticky;
    /* Höhe des sticky Headers + etwas Luft, damit die Filter-Box nicht
       direkt am Header klebt. */
    top: 88px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
    margin-bottom: 0;
  }
}

.search-filters-heading {
  font-size: 15px;
  margin-bottom: 14px;
}

.search-main {
  min-width: 0; /* verhindert, dass Bild-/Text-Inhalte das Grid aufdrücken */
}

/* Ergebnis-Karten: Bild links (oder Platzhalter), Inhalt rechts — auf dem
   Handy stapeln sie sich (Bild oben). */
.result-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--color-card);
}

@media (min-width: 560px) {
  .result-card {
    flex-direction: row;
  }
}

.result-card-media {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  height: 180px;
  background: var(--color-bg);
}

@media (min-width: 560px) {
  .result-card-media {
    width: 220px;
    height: auto;
  }
}

.result-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

/* Leichter Zoom auf das Vorschaubild beim Hover über die ganze Karte
   (nicht nur übers Bild selbst) — .result-card hat bereits overflow:hidden,
   der Zoom bleibt also sauber innerhalb der Kartengrenzen. */
@media (hover: hover) {
  .result-card:hover .result-card-media img {
    transform: scale(1.06);
  }
}

.result-card-media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  opacity: 0.4;
}

.result-card-score {
  position: absolute;
  top: 10px;
  left: 10px;
}

/* Favoriten-Herz ("❤️ Guardar") — oben rechts auf dem Vorschaubild, analog
   zu Idealista/Fotocasa/Pisos.com. Eigenes <form>, damit es ganz ohne JS
   funktioniert (klassischer POST + Redirect zurück zur selben Suche). */
.favorite-form {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
}

.favorite-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.1s ease;
}

.favorite-btn:hover {
  transform: scale(1.08);
}

.favorite-btn.is-favorite {
  background: rgba(255, 255, 255, 0.95);
}

.result-card-body {
  flex: 1;
  min-width: 0;
  padding: 16px;
}

/* Teilen-Leiste (partials/share-buttons.ejs) — Wettbewerbsvergleich zu
   Idealista/Fotocasa/pisos.com, siehe STATUS.md. */
.share-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.share-row-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-right: 2px;
}

.share-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  font-size: 15px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s ease, border-color 0.15s ease;
}

.share-btn:hover {
  transform: scale(1.08);
  border-color: var(--color-accent);
}

/* Letzte Rückfallstufe des "Link kopieren"-Buttons (siehe partials/
   foot.ejs) — falls weder die Zwischenablage-API noch execCommand('copy')
   noch window.prompt() funktionieren, erscheint der Link als markierbarer
   Text direkt neben dem Button. */
.share-copy-manual {
  display: inline-block;
  font-size: 12px;
  word-break: break-all;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  user-select: all;
}

/* Eigene Einladungs-Seite (/invita, views/invite-friend.ejs) — großer
   Belohnungs-Hinweis oben, damit die Botschaft ("bekommt ihr beide X
   gratis Such-Profile") sofort ins Auge fällt, statt in Fließtext
   unterzugehen. */
.invite-reward {
  display: flex;
  align-items: center;
  gap: 16px;
}

.invite-reward-icon {
  font-size: 40px;
  flex-shrink: 0;
}

.invite-reward-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  margin: 0 0 4px;
  color: var(--color-text);
}

.invite-reward-sub {
  margin: 0;
  font-size: 14px;
}

/* Dashboard-Teaser als farbenfrohe Foto-Karte statt reinem Text-auf-Karte
   (Nutzer-Wunsch: "ein, zwei stylische Fotos/Farben" ausserhalb der reinen
   Galerie). Gleiches Full-Bleed-unabhaengige Verlauf-Prinzip wie
   .cta-banner, aber eigenstaendig, damit sie im Dashboard ihr eigenes Foto
   per Inline-style (dashboard.ejs) bekommt statt das fest verdrahtete
   Cómo-funciona-Foto zu teilen. */
.invite-teaser {
  position: relative;
  border: none;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.invite-teaser::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, rgba(23, 18, 12, 0.4) 0%, rgba(23, 18, 12, 0.78) 100%);
}

.invite-teaser .invite-reward-headline,
.invite-teaser .invite-reward-sub {
  color: #fff;
}

.invite-link-box {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  word-break: break-all;
}

/* Preis-Historie-Badge (partials/price-history-badge.ejs) — Wettbewerbs-
   vergleich zu Idealista/Fotocasa "Ha bajado/subido de precio". */
.price-history-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

.price-history-down {
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid var(--color-success-border);
}

.price-history-up {
  background: var(--color-warn-bg);
  color: var(--color-warn);
  border: 1px solid var(--color-warn);
}

/* Kommentare auf einer geteilten Favoriten-Liste (Wettbewerbsvergleich:
   Fotocasa "listas de favoritos compartidas", partials/... + dashboard.ejs
   + shared-favorites.ejs). */
.shared-comments {
  border-top: 1px solid var(--color-border);
  padding-top: 10px;
  margin-top: 12px;
}

.shared-comments-heading {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin: 0 0 6px;
}

.shared-comment {
  font-size: 13px;
  color: var(--color-text);
  background: var(--color-bg);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
}

.shared-comment-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.shared-comment-form input,
.shared-comment-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-input-bg);
  color: var(--color-text);
  font-family: inherit;
  font-size: 13px;
}

.result-card-price {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  margin: 2px 0 8px;
}

.result-card-summary {
  font-size: 13px;
  margin: 10px 0;
}

/* Landing */

/* Volltonbild-Hero — bricht bewusst aus der sonst schmaleren .container-Spalte
   aus (klassischer "full-bleed"-Trick über 100vw + negative Margins), damit
   das Foto über die gesamte Bildschirmbreite reicht statt in der Content-
   Spalte eingerahmt zu wirken. Foto: spanische Altstadtgasse (Unsplash,
   lizenzfrei), mit dunklem Verlauf überblendet für lesbaren weißen Text. */
.hero-banner {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  /* Unterer Innenabstand bewusst gleich groß wie der Abstand, den .card
     unten über margin-bottom erzeugt (siehe unten) — damit der Abstand von
     der Bildleiste zur "in Arbeit"-Box genauso groß ist wie der Abstand von
     dieser Box zur nächsten ("En qué nos fijamos"). */
  padding: 56px 20px 20px;
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, rgba(23, 18, 12, 0.45) 0%, rgba(23, 18, 12, 0.35) 40%, rgba(23, 18, 12, 0.8) 100%),
    url("/images/pexels-jibarofoto-1500599.jpg") center 55% / cover no-repeat;
  isolation: isolate;
  /* Nötig, damit der weiche Schein unten (::after) sauber INNERHALB des
     Fotos bleibt statt in die Karten darunter zu bluten. */
  overflow: hidden;
}

/* Warmes, weiches "Spotlight" hinter der Suchleiste — feste rgba-Werte
   (unabhängig vom Theme, sitzt auf dem immer-dunkel-überblendeten Foto),
   reine Farbverläufe statt zusätzlicher Bilddateien: gibt dem Hero mehr
   Tiefe, ohne dass eine weitere Grafik geladen werden muss. Bewusst
   vollständig innerhalb des Fotos platziert (kein negativer bottom-Wert),
   damit nichts über den Fotorand hinausragt. */
.hero-banner::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 60%;
  max-width: 620px;
  aspect-ratio: 2 / 1;
  transform: translate(-50%, 35%);
  background: radial-gradient(ellipse at center, rgba(225, 123, 76, 0.35) 0%, rgba(225, 123, 76, 0) 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-banner-inner {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

.hero-banner h1 {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.hero-banner .subline,
.hero-banner .lead {
  color: rgba(255, 255, 255, 0.92);
}

@media (min-width: 640px) {
  .hero-banner {
    padding: 76px 20px 20px;
  }
}

/* Suchleiste — sitzt unten im Hero-Foto, wie bei den meisten Immobilien-
   Vergleichsportalen. Auf dem Handy stehen die Felder untereinander (volle
   Breite), ab Tablet-Breite ordnen sie sich zu einer einzeiligen,
   pillenförmigen Leiste — ganz ohne separate mobile/Desktop-Version, das
   übernimmt CSS automatisch je nach Bildschirmbreite. */
.search-bar-wrap {
  display: flex;
  justify-content: center;
  margin: 28px 0 0;
}

.search-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 10px;
  box-shadow: 0 8px 24px var(--color-shadow);
  width: 100%;
  max-width: 640px;
}

.search-bar .search-field {
  flex: 1;
  min-width: 0;
}

.search-bar input[type="text"],
.search-bar select {
  background: var(--color-bg);
  border: 1px solid transparent;
  height: 48px;
}

.search-btn {
  background: var(--color-accent);
  color: var(--color-accent-text);
  border: none;
  border-radius: 10px;
  padding: 0;
  height: 48px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}

.search-btn:hover {
  opacity: 0.9;
}

@media (min-width: 720px) {
  .search-bar {
    flex-direction: row;
    align-items: center;
    border-radius: 999px;
    padding: 8px;
    max-width: 760px;
  }
  .search-bar .search-field-op {
    flex: 0 0 170px;
  }
  .search-bar input[type="text"],
  .search-bar select {
    border-radius: 999px;
  }
  .search-btn {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 0 28px;
  }
}

/* Schnellzugriff-Chips auf beliebte Städte, unter der Suchleiste im Hero. */
.popular-zones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.popular-zone-chip {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(2px);
  transition: background-color 0.15s;
}

.popular-zone-chip:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Vertrauens-/Feature-Leiste direkt unter dem Hero. */
.trust-bar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 20px 0;
}

/* Der Hero-Banner hat selbst keinen sichtbaren Randabstand nach unten (sein
   padding-bottom endet innerhalb des Fotos, erzeugt also KEINEN sichtbaren
   Zwischenraum wie eine normale .card). Die "in Arbeit"-Box direkt danach
   braucht daher einen eigenen margin-top, damit ihr Abstand zum Fotorand
   genauso groß ist wie zwischen allen anderen Boxen (20px). Wenn die Suche
   aktiv ist, folgt stattdessen direkt .trust-bar, die bereits ihren eigenen
   margin-top mitbringt — dort ist kein Zusatz nötig. */
.hero-banner + .search-unavailable {
  margin-top: 20px;
}

@media (min-width: 640px) {
  .trust-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

.trust-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.notify-cta {
  border-color: var(--color-accent);
  border-width: 2px;
}

/* Bild-Banner-Variante der Hinweiskarte — nur auf der Landingpage, für
   "Cómo funciona". Foto: spanisches Küstendorf (Unsplash, lizenzfrei). */
.cta-banner {
  position: relative;
  border: none;
  overflow: hidden;
  padding: 32px 24px;
  color: #fff;
  isolation: isolate;
}

.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* War vorher dasselbe Foto wie die Madrid-Galerie-Karte weiter oben auf
     der Seite (Nutzer wollte keine Dopplung) — jetzt ein eigenes,
     bisher ungenutztes Foto (Sevilla, Plaza de España). */
  background: linear-gradient(180deg, rgba(23, 18, 12, 0.55) 0%, rgba(23, 18, 12, 0.78) 100%),
    url("/images/pexels-daniel-yampolschi-3656014-5470586.jpg") center 40% / cover no-repeat;
}

.cta-banner h2,
.cta-banner p {
  color: #fff;
}

.how-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 18px 0 22px;
  text-align: left;
}

@media (min-width: 640px) {
  .how-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Normale Variante (auf gewöhnlichem Karten-Hintergrund, z.B. invite-
   friend.ejs "So funktioniert's") — nutzt die Theme-Variablen, damit der
   Text im hellen UND dunklen Modus lesbar bleibt. Die dunkle Foto-Banner-
   Variante (.cta-banner, siehe unten) überschreibt das gezielt mit fest
   weißer Schrift, weil sie über einem dunkel überblendeten Foto sitzt —
   dort war .how-step ursprünglich fest auf weiß gebaut, was auf einem
   normalen (hellen) Karten-Hintergrund weiß-auf-weiß und damit unlesbar
   wurde (echter Fund, live gemeldet). */
.how-step {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 16px;
}

.how-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 10px;
}

.how-step h3 {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 6px;
}

.how-step p {
  color: var(--color-text-muted);
  font-size: 13px;
  margin: 0;
}

.cta-banner .how-step {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.cta-banner .how-step h3 {
  color: #fff;
}

.cta-banner .how-step p {
  color: rgba(255, 255, 255, 0.85);
}

/* Leer-Zustand mit kleinem Haus-Symbol (partials/empty-state.ejs) — ersetzt
   reine "Todavía no has..."-Textzeilen an mehreren Stellen (Suche,
   Favoriten, Matches, letzte Suchen), die vorher wie ein fehlender Inhalt
   statt wie ein bewusst gestalteter Zustand wirkten. */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
  gap: 10px;
  color: var(--color-text-muted);
}

.empty-state-icon {
  width: 36px;
  height: 36px;
  color: var(--color-border);
}

.empty-state-text {
  margin: 0;
  font-size: 14px;
  max-width: 360px;
}

.results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
  flex-wrap: wrap;
}

.results-count {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 640px) {
  .feature-list {
    grid-template-columns: 1fr 1fr;
  }
}

.feature-list li {
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.45;
}

.feature-list .emoji {
  margin-right: 8px;
}

/* "Herramientas gratuitas"-Karten auf der Startseite (landing.ejs) —
   sichtbarer Einstieg zu den 3 Rechnern, statt nur im Footer/Header-
   Dropdown versteckt. */
.tools-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 14px;
}

@media (min-width: 640px) {
  .tools-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.tool-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.tool-card-icon {
  font-size: 26px;
  margin-bottom: 4px;
}

.tool-card-title {
  font-weight: 700;
  font-size: 15px;
}

.tool-card-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* "Explora por ciudad"-Galerie auf der Startseite — echte Fotos statt
   reiner Text-Chips für die beliebtesten Städte (die Text-Chips im Hero
   bleiben zusätzlich bestehen, das hier ist der bildstarke Zweit-Einstieg
   weiter unten). Bewusst NUR Städte, für die ein wirklich passendes,
   eindeutig zuordenbares Foto vorhanden ist (siehe STATUS.md) — lieber
   weniger Karten als eine falsch beschriftete Stadt. */
.city-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}

@media (min-width: 640px) {
  .city-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

.city-card {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 140px;
  border-radius: 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.city-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(23, 18, 12, 0) 40%, rgba(23, 18, 12, 0.75) 100%);
}

.city-card-name {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 12px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

@media (hover: hover) {
  .city-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px var(--color-shadow);
  }
}

/* FAQ-Akkordeon auf der Landingpage — natives <details>/<summary>, kein JS
   nötig. */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 4px 16px;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 24px 12px 0;
  font-weight: 600;
  color: var(--color-text);
  font-size: 14px;
  position: relative;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 10px;
  font-size: 20px;
  font-weight: 400;
  color: var(--color-text-muted);
  transition: transform 0.15s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  font-size: 13px;
  margin: 0 0 14px;
}

/* Bookend zum Marken-Signaturstreifen im Header (::after dort) — dieselbe
   Terrakotta→Petrol-Verlaufslinie taucht jetzt auch über dem Footer auf,
   damit die Seite optisch "eingerahmt" wirkt statt nur oben ein
   Markenelement zu haben. */
footer.site-footer {
  position: relative;
  padding: 40px 16px 24px;
  color: var(--color-text-muted);
  font-size: 12px;
  border-top: 1px solid var(--color-border);
  margin-top: 24px;
}

footer.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-brand-2));
}

footer.site-footer a {
  color: var(--color-text-muted);
  text-decoration: none;
}

footer.site-footer a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: var(--max-width-wide);
  margin: 0 auto 24px;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h3 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text);
  margin: 0 0 4px;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--color-text);
  margin: 0;
}

.footer-brand span {
  color: var(--color-accent);
}

.footer-tagline {
  font-size: 12px;
  margin: 0;
  max-width: 260px;
}

.footer-copy {
  text-align: center;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.stat-row {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  flex: 1;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.stat .value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text);
}

.stat .label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 24px 0;
}

.danger-zone {
  border: 1px solid var(--color-danger-border);
  background: var(--color-danger-bg);
}

/* (Responsive h1-Größe lebt jetzt zentral bei der Basis-h1-Regel oben,
   zusammen mit der übrigen Überschriften-Skala — vorher gab es hier eine
   zweite, konkurrierende @media(min-width:640px)-Regel für h1 an ganz
   anderer Stelle im Stylesheet, die die neue, größere Stufe durch reine
   Quellreihenfolge wieder überschrieben hat. Beim Testen bemerkt und
   zusammengeführt, statt zwei Regeln für dieselbe Sache im Stylesheet zu
   behalten.) */

/* Karten-Suche (Bereich einzeichnen / auswählen) */

.map-mode-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.mode-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-input-bg);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.mode-btn.active {
  background: var(--color-text);
  color: var(--color-bg);
  border-color: var(--color-text);
}

.map-sub-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.btn-chip {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-input-bg);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-chip.active {
  background: var(--color-success);
  color: var(--color-bg);
  border-color: var(--color-success);
}

/* Lade-Spinner für den Zonen-Status-Text (statt reinem Text-only-Hinweis
   während des Ladens) — kleiner rotierender Ring vor der Meldung. */
.zone-status {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 16px;
}

.zone-status-loading::before {
  content: "";
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-accent);
  animation: zone-spin 0.7s linear infinite;
}

@keyframes zone-spin {
  to {
    transform: rotate(360deg);
  }
}

.map-picker-wrap {
  border-radius: 8px;
  overflow: hidden;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 12px var(--color-shadow);
}

.autocomplete-list:empty {
  display: none;
  border: none;
  box-shadow: none;
}

.autocomplete-item {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--color-bg);
}

.autocomplete-item.disabled {
  color: var(--color-text-muted);
  cursor: not-allowed;
  font-style: italic;
}

.autocomplete-item.disabled:hover {
  background: none;
}

.zone-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.zone-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-success-bg);
  color: var(--color-success-text);
  border: 1px solid var(--color-success-border);
  border-radius: 999px;
  padding: 4px 6px 4px 12px;
  font-size: 12px;
  font-weight: 600;
}

.zone-tag button {
  background: none;
  border: none;
  color: var(--color-success-text);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

#zone-search-wrapper input,
.map-sub-toolbar input[type="text"] {
  width: 100%;
}

/* Dashboard — "Mein Profil" */

.profile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-email {
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.profile-member-since {
  font-size: 12px;
  color: var(--color-text-muted);
}

.plan-info-row {
  display: flex;
  gap: 12px;
  margin: 16px 0;
}

.plan-info {
  flex: 1;
  background: var(--color-bg);
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.plan-info .value {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.plan-info .label {
  font-size: 12px;
  color: var(--color-text-muted);
}

.mortgage-result {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

.mortgage-result .plan-info .value {
  color: var(--color-accent);
}

.settings-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.settings-row form {
  display: inline;
}

/* Abo-Übersicht im Dashboard — drei Pakete nebeneinander (Mobile:
   untereinander). Alle aktuell kostenlos (Testphase), siehe i18n
   dashboard.subscription.testingNotice. */
.subscription-tiers {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px) {
  .subscription-tiers {
    grid-template-columns: repeat(3, 1fr);
  }
}

.subscription-tier {
  position: relative;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
}

.subscription-tier h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--color-text);
}

.subscription-tier-price {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 12px;
}

.subscription-tier ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  flex: 1;
}

.subscription-tier li {
  font-size: 13px;
  color: var(--color-text);
  padding: 5px 0 5px 20px;
  position: relative;
}

.subscription-tier li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.subscription-tier-current {
  border-color: var(--color-accent);
  border-width: 2px;
}

.subscription-tier-badge {
  position: absolute;
  top: -11px;
  left: 14px;
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

/* "Premium" optisch als empfohlene Stufe hervorheben — zweite Markenfarbe
   (Petrol statt Terrakotta), damit sie sich klar vom "Plan actual"-Badge
   (Terrakotta) unterscheidet, auch wenn beide gleichzeitig sichtbar wären. */
.subscription-tier-recommended {
  border-color: var(--color-brand-2);
  border-width: 2px;
}

.subscription-tier-recommended .subscription-tier-badge {
  background: var(--color-brand-2);
  color: #fff;
}

.subscription-tier .btn:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
  box-shadow: none;
}

/* Such-Karten mit einem "Hebel" zum schnellen Ein-/Ausschalten von
   Benachrichtigungen, statt dafür das komplette Filter-Formular abschicken
   zu müssen. */
.saved-search-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.saved-search-title {
  font-weight: 600;
  color: var(--color-text);
  font-size: 14px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: var(--color-card);
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .switch-slider {
  background: var(--color-success);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(18px);
}

.switch input:focus-visible + .switch-slider {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

.recent-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}

.recent-search-item:last-child {
  border-bottom: none;
}

.recent-search-label {
  color: var(--color-text);
}

.recent-search-date {
  color: var(--color-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

/* Rechtliche Seiten (Aviso Legal, Privacidad, Condiciones, Respeto a Bases
   de Datos) — reine Lese-Inhalte, brauchen etwas mehr Zeilenabstand/Struktur
   als die restigen, eher kompakten Karten. */
.legal-page h1 {
  font-size: 24px;
  margin-bottom: 20px;
}

.legal-page section {
  margin-bottom: 28px;
}

.legal-page h2 {
  font-size: 17px;
  margin: 0 0 10px;
  padding-top: 4px;
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

.legal-page section:first-of-type h2 {
  border-top: none;
  padding-top: 0;
}

.legal-page h3 {
  font-size: 14px;
  margin: 16px 0 6px;
  color: var(--color-text);
}

.legal-page p {
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.6;
}

.legal-page ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.legal-page li {
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 4px;
}

.legal-page a {
  color: var(--color-success);
}

.legal-updated {
  color: var(--color-text-muted) !important;
  font-size: 12px !important;
}

/* ==========================================================================
   Design-Politur (auf Wunsch, "kreativ" — kein Rebrand, sondern ein Schliff
   auf dem bestehenden warmen Terrakotta/Petrol-Stil): mehr Tiefe/Haptik bei
   Karten und Buttons, ein Marken-Signaturstreifen im Header, ruhige
   Eintritts-Animation im Hero, und durchgängige, sichtbare Fokus-Ringe für
   Tastatur-Nutzung. Alles respektiert prefers-reduced-motion.
   ========================================================================== */

/* Feiner Verlaufsstreifen direkt unter dem Header — kleines wiederkehrendes
   Markenelement (Terrakotta -> Petrol, dieselben zwei Markenfarben, die
   sonst nur einzeln auftauchen), taucht auf JEDER Seite auf, ohne den
   bestehenden Header selbst zu verändern. */
/* header.site-header ist bereits position:sticky (siehe oben) — das reicht
   als Positionierungskontext für dieses ::after, kein zusätzliches
   position:relative nötig. */
header.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-brand-2));
}

/* Karten fühlen sich jetzt "greifbarer" an — ein sanftes Anheben beim
   Hover statt eines reinen Farbwechsels, konsistent über alle Karten-
   artigen Bausteine hinweg (Info-Karten, Suchergebnis-Karten, Rechner-
   Kacheln, Abo-Stufen, Match-/Favoriten-Karten). */
.card,
.result-card,
.match,
.subscription-tier {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

@media (hover: hover) {
  .card:hover,
  .result-card:hover,
  .match:hover,
  .subscription-tier:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px var(--color-shadow);
    border-color: color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
  }

  /* Klickbare/interaktive Karten (Rechner-Übersicht) heben sich zusätzlich
     spürbar per Skalierung ab — sie sind reine Links, dürfen also etwas
     verspielter reagieren als die reinen Info-Karten oben. */
  .tool-card:hover {
    box-shadow: 0 14px 32px var(--color-shadow);
  }
}

/* Score-Badge ("Puntuación: 82/100") bekommt einen dezenten Glanz-Rand
   (heller Innenschimmer oben + weicher Schlagschatten) statt einer reinen
   Flatcolor-Pille — die Hintergrundfarbe selbst bleibt dynamisch (Grün/Gelb/
   Rot per Inline-Style, siehe *.ejs), dieser Zusatz funktioniert unabhängig
   davon über jeder Farbe. */
.score-badge {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Icons in der Vertrauens-Leiste ("5 portales, una sola búsqueda" etc.)
   bekommen einen eigenen, farbig hinterlegten Kreis statt nackt neben dem
   Text zu stehen — deutlich mehr visuelles Gewicht für die vier wichtigsten
   Verkaufsargumente direkt unter dem Hero. */
.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
  flex-shrink: 0;
}

.trust-item {
  transition: transform 0.18s ease, border-color 0.18s ease;
}

@media (hover: hover) {
  .trust-item:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--color-accent) 35%, var(--color-border));
  }
}

.popular-zone-chip {
  transition: background-color 0.15s, transform 0.15s;
}

@media (hover: hover) {
  .popular-zone-chip:hover {
    transform: translateY(-2px);
  }
}

/* Sichtbare, markenfarbige Fokus-Ringe für Tastatur-Navigation — bewusst
   :focus-visible statt :focus, damit ein Ring nur bei Tab-Navigation
   erscheint, nicht bei jedem Maus-Klick (das wirkt sonst unruhig). Deckt
   alle interaktiven Elemente pauschal ab, überschreibt also z.B. auch den
   Browser-Standard-Ring auf Links/Karten. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.card:focus-visible,
.result-card:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .result-card,
  .match,
  .subscription-tier,
  .trust-item,
  .popular-zone-chip {
    transition: none;
  }
}

/* ==========================================================================
   Kompakter Foto-Streifen (partials/page-banner.ejs) — für Seiten, die
   bisher rein textbasiert waren (die drei Rechner) und dadurch im
   Vergleich zur bebilderten Startseite/Anmeldung etwas flach/leblos
   wirkten. Deutlich niedriger als .hero-banner (reine Stimmungs-Grafik,
   kein Text/keine Suchleiste darüber), sonst dieselbe Full-Bleed-Technik
   und derselbe dunkle Verlauf-Look.
   ========================================================================== */
/* Ohne dies ließ das übliche padding-top von .container (siehe oben) eine
   sichtbare Lücke zwischen dem Marken-Streifen im Header und dem Foto
   entstehen — genau das Problem, das body.page-landing .container für den
   großen Hero-Banner schon löst, hier über :has() nachgerüstet, ohne jede
   Rechner-Seite einzeln mit einer eigenen bodyClass ausstatten zu müssen. */
.container:has(> .page-banner) {
  padding-top: 0;
}

.page-banner {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
  margin-right: -50vw;
  /* Etwas großzügiger als vorher (war 120/180px) — füllt mehr vom oberen
     Freiraum und lässt genug Foto sichtbar, auch wenn die Titel-Box unten
     ein gutes Stück hineinragt (siehe .page-banner-title-wrap). */
  height: 220px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (min-width: 640px) {
  .page-banner {
    height: 320px;
  }
}

/* Überschrift in einer freistehenden, abgerundeten Karte, die unten auf das
   Foto ragt (negativer margin-top zieht sie hoch) — klassisches "Hero mit
   überlappender Titelkarte"-Muster, wirkt hochwertiger als Foto und
   Überschrift einfach nur übereinander zu stapeln. */
.page-banner-title-wrap {
  display: flex;
  justify-content: center;
  margin-top: -48px;
  margin-bottom: 20px;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

.page-banner-title-box {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px var(--color-shadow);
  padding: 18px 24px;
  text-align: center;
  max-width: 560px;
}

.page-banner-title-box h1 {
  margin: 0;
}

/* ==========================================================================
   Scroll-Reveal (partials/foot.ejs) — rein optische Zusatzbelebung beim
   Runterscrollen. Die Klassen werden AUSSCHLIESSLICH per JS gesetzt, nie als
   CSS-Grundzustand: .reveal-hidden existiert nur für Elemente, die das
   Script bereits als "noch außerhalb des Viewports" erkannt hat, und wird
   sofort wieder entfernt, sobald sie ins Bild scrollen. Ohne JS (oder bei
   deaktiviertem JS) bleibt jedes Element ganz normal bei voller Deckkraft —
   siehe die Lektion zum entfernten Hero-Fade-in in STATUS.md. */
.reveal-hidden {
  opacity: 0;
  transform: translateY(14px);
}

.reveal-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  .reveal-hidden {
    opacity: 1;
    transform: none;
  }
  .reveal-visible {
    transition: none;
  }
}

/* ==========================================================================
   Landing-Promo-Karte fuer den KI-Such-Assistenten (/asistente-ia) — eigene,
   auffaellige Foto-Karte zwischen Hero und "Explora por ciudad", analog zu
   .invite-teaser im Dashboard: eigenes Foto per Inline-Style, gleiche
   Verlauf+Text-Logik wie .cta-banner/.invite-teaser.
   ========================================================================== */
.assistant-promo {
  position: relative;
  border: none;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  text-decoration: none;
}

.assistant-promo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, rgba(23, 18, 12, 0.35) 0%, rgba(23, 18, 12, 0.8) 100%);
}

.assistant-promo-eyebrow {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-accent-text);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

.assistant-promo h2,
.assistant-promo p {
  color: #fff;
  max-width: 560px;
}

@media (hover: hover) {
  .assistant-promo:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px var(--color-shadow);
  }
}

/* ==========================================================================
   KI-Such-Assistent — Chat-Oberflaeche (/asistente-ia, views/assistant.ejs)
   ========================================================================== */
.assistant-feature-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0 0 20px;
}

@media (min-width: 640px) {
  .assistant-feature-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

.chat-card {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .chat-card {
    padding: 20px 24px;
  }
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 55vh;
  min-height: 260px;
  overflow-y: auto;
  padding: 4px 2px;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 100%;
}

.chat-message-user {
  flex-direction: row-reverse;
}

.chat-avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* Markenfarbige Avatare statt neutralem Grau — Assistent in der
   Terrakotta/Petrol-Signaturfarbe des Headers/Footers, Nutzer dezenter. */
.chat-avatar-bot {
  background: linear-gradient(135deg, var(--color-accent), var(--color-brand-2));
  border-color: transparent;
}

.chat-avatar-user {
  background: var(--color-text);
  border-color: transparent;
  filter: grayscale(0.2);
}

/* Schnellauswahl-Chips direkt unter der Begrüßung — sparen bei der
   allerersten Antwort einen Tippschritt (Kauf/Miete ist praktisch immer
   die erste Frage des Assistenten). Verschwinden nach der ersten
   gesendeten Nachricht (siehe foot-Script). */
.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 4px 40px;
}

.chat-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}

.chat-chip:hover {
  border-color: var(--color-accent);
  transform: translateY(-1px);
}

.chat-bubble {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  max-width: min(480px, 84%);
}

.chat-message-user .chat-bubble {
  background: var(--color-accent);
  color: var(--color-accent-text);
  border-color: var(--color-accent);
}

/* Hervorgehobene Bubble fuer die fertige Profil-Zusammenfassung ("##
   🏡"-Marker aus dem System-Prompt, erkannt in assistant.ejs) — deutlich
   auffaelliger als eine normale Antwort, plus eigener CTA-Button zur
   Suche. */
.chat-bubble-profile {
  max-width: min(560px, 92%);
  background: var(--color-card);
  border: 2px solid var(--color-accent);
  box-shadow: 0 8px 24px var(--color-shadow);
}

.chat-bubble-profile h3 {
  font-family: var(--font-display);
  font-size: 17px;
}

.chat-profile-cta {
  margin-top: 10px;
}

.chat-bubble p {
  color: inherit;
  margin: 0 0 8px;
}

.chat-bubble p:last-child {
  margin-bottom: 0;
}

.chat-bubble h3 {
  color: inherit;
  font-size: 15px;
  margin: 4px 0 6px;
}

.chat-bubble ul {
  margin: 0 0 8px;
  padding-left: 18px;
}

.chat-bubble li {
  margin-bottom: 2px;
}

.chat-bubble hr {
  border: none;
  border-top: 1px solid currentColor;
  opacity: 0.2;
  margin: 8px 0;
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-bubble-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
}

.chat-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-muted);
  animation: chat-typing-bounce 1s infinite ease-in-out;
}

.chat-typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.chat-typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes chat-typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat-typing-dot {
    animation: none;
  }
}

.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  border-top: 1px solid var(--color-border);
  padding-top: 12px;
}

.chat-input-row textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 160px;
  font-size: 15px;
  font-family: inherit;
  padding: 11px 14px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-input-bg);
  color: var(--color-text);
  line-height: 1.4;
}

.chat-input-row textarea:focus {
  outline: 2px solid var(--color-text);
  outline-offset: -1px;
}

.chat-send-btn {
  flex-shrink: 0;
  padding: 12px 20px;
}

.chat-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.chat-disclaimer {
  margin: 0;
}

.chat-footer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-small {
  padding: 8px 16px;
  font-size: 13px;
}

