:root {
  --bg-main:              #F5F0EA;
  --bg-card:              #FAF7F3;
  --bg-white:             #FFFFFF;
  --color-primary:        #5C3D2E;
  --color-primary-light:  #8B6B5A;
  --color-text:           #4A3728;
  --color-text-secondary: #9B8B7E;
  --color-accent-green:   #5A8A5E;
  --color-border:         #E5DDD4;
  --color-shadow:         rgba(92, 61, 46, 0.08);

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', 'Segoe UI', system-ui, sans-serif;

  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   24px;
  --radius-full: 50%;

  /* Efectos de memoria espacio-temporal */
  --color-golden:       rgba(196, 164, 105, 0.6);
  --color-golden-light: rgba(196, 164, 105, 0.3);
  --color-gold:         #C4A469;
  --color-dark:         #1A0F07;
  --color-sepia:        sepia(0.7);
  --transition-memory:  2.5s ease-out;

  /* Safe area inferior con floor mínimo. En navegador la URL bar
     puede flotar sobre el contenido y env(safe-area-inset-bottom)
     no la cubre; en PWA standalone sin home indicator es 0. El
     floor de 16px garantiza margen mínimo en ambos casos. */
  --safe-bottom: max(16px, env(safe-area-inset-bottom, 16px));
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-main);
  color: var(--color-text);
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------ */
/* Utility                                                             */
/* ------------------------------------------------------------------ */

.view { min-height: 100vh; min-height: 100dvh; }
.hidden { display: none !important; }

/* ------------------------------------------------------------------ */
/* Login                                                               */
/* ------------------------------------------------------------------ */

#view-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 40px 32px 36px;
  box-shadow: 0 4px 24px var(--color-shadow);
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 2rem;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: 0.01em;
  margin-bottom: 8px;
}

.login-subtitle {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

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

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

.field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

.field input {
  background: var(--bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s;
}

.field input:focus {
  border-color: var(--color-primary-light);
}

.btn-login {
  margin-top: 8px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-login:hover  { background: var(--color-primary-light); }
.btn-login:active { opacity: 0.9; }

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-error {
  min-height: 1.2em;
  font-size: 0.82rem;
  color: #c0392b;
  text-align: center;
}

/* ------------------------------------------------------------------ */
/* Shared app shell                                                    */
/* ------------------------------------------------------------------ */

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 4px var(--color-shadow);
}

.app-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-text);
}

.app-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.user-name {
  font-size: 0.62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  line-height: 1;
}

.btn-logout {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.btn-logout:hover {
  border-color: var(--color-primary-light);
  color: var(--color-primary);
}

.app-main {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 65px);
  min-height: calc(100dvh - 65px);
  padding: 24px 16px;
}

.placeholder-card {
  text-align: center;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  box-shadow: 0 4px 24px var(--color-shadow);
}

.placeholder-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.placeholder-card h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.3rem;
  color: var(--color-text);
  margin-bottom: 10px;
}

.placeholder-card p {
  font-size: 0.88rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.btn-back-card {
  margin-top: 20px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 8px 18px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-back-card:hover { border-color: var(--color-primary-light); color: var(--color-primary); }

/* ------------------------------------------------------------------ */
/* Zonas                                                               */
/* ------------------------------------------------------------------ */

.btn-back {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s;
}
.btn-back:hover { color: var(--color-primary); }

.zones-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.zones-intro {
  text-align: center;
  margin-bottom: 32px;
}

.zones-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.5rem;
  color: var(--color-text);
  margin-bottom: 8px;
}

.zones-subheading {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  letter-spacing: 0.02em;
}

/* Grid: 1 col mobile, 2 col tablet+ */
.zones-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 540px) {
  .zones-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Tarjeta de zona */
.zone-card {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 2px 8px var(--color-shadow);
}

.zone-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--color-shadow);
}

.zone-card:active { transform: translateY(-1px); }

.zone-card-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--color-border);
  overflow: hidden;
  position: relative;
}

.zone-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.zone-card-body {
  padding: 14px 16px 16px;
}

.zone-card-label {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--color-text);
  margin-bottom: 4px;
}

.zone-card-desc {
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Estado de carga y vacío */
.zones-loading {
  display: flex;
  justify-content: center;
  padding: 40px 0;
}

.zones-loading.hidden { display: none; }

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.zones-empty {
  text-align: center;
  padding: 48px 0;
  font-size: 0.88rem;
  color: var(--color-text-secondary);
}

.zones-empty.hidden { display: none; }

/* Botones de acción en tarjeta de zona */
.zone-card-actions {
  display: flex;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--color-border);
}

.btn-zone-enter {
  flex: 1;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn-zone-enter:hover  { opacity: 0.88; }
.btn-zone-enter:active { opacity: 0.75; }

.btn-zone-map {
  flex: 1;
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-zone-map:hover { border-color: var(--color-primary-light); color: var(--color-primary); }

/* Botón global Ver mapa en cabecera */
.btn-map-global {
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-map-global:hover { border-color: var(--color-primary-light); color: var(--color-primary); }

/* ------------------------------------------------------------------ */
/* Vista mapa                                                           */
/* ------------------------------------------------------------------ */

#view-map {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  height: 100svh;
  background: var(--bg-main);
  z-index: 10;
  overflow: hidden;
}

/* Loading overlay */
.map-loading {
  position: absolute;
  inset: 0;
  z-index: 100;
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: opacity .5s;
}
.map-loading.fade { opacity: 0; pointer-events: none; }
.map-load-brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.75rem;
  color: var(--color-primary);
}
.map-load-txt {
  font-size: 0.65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

/* Google Maps canvas */
#map-el {
  position: absolute;
  inset: 0;
  background: #EDE8E0;
}

/* Barra superior */
.map-top-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  padding: 12px 16px 24px;
  background: linear-gradient(to bottom, rgba(245,240,234,.97) 55%, rgba(245,240,234,0));
  pointer-events: none;
}
.map-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: all;
}
.map-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-map-back {
  background: rgba(245,240,234,.9);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
}
.btn-map-back:hover { border-color: var(--color-primary-light); color: var(--color-primary); }
.map-brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--color-primary);
  line-height: 1.2;
}
.map-brand-sub {
  font-size: 0.58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.map-gps-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.58rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 20px;
  background: rgba(196,164,105,.14);
  color: #9A7A45;
  border: .5px solid rgba(196,164,105,.35);
  white-space: nowrap;
}
.map-pdot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: map-pdot 2s infinite;
}
@keyframes map-pdot { 0%,100%{opacity:1} 50%{opacity:.3} }

/* Flecha de dirección */
.map-dir-fab {
  position: absolute;
  right: 14px;
  z-index: 25;
  transition: bottom .4s ease;
}
.map-dir-fab-inner {
  width: 50px; height: 50px;
  border-radius: 50%;
  background: rgba(245,240,234,.96);
  border: .5px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(92,61,46,.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bottom sheet */
.map-bottom {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  background: var(--bg-main);
  border-top: .5px solid var(--color-border);
  border-radius: 24px 24px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: height .4s cubic-bezier(.4,0,.2,1);
  padding-bottom: var(--safe-bottom);
}
.map-bottom[data-panel="explore"] { height: calc(min(160px, 22svh) + var(--safe-bottom)); }
.map-bottom[data-panel="ficha"]   { height: calc(min(580px, 82svh) + var(--safe-bottom)); }
.map-bottom[data-panel="nav"]     { height: calc(min(210px, 26svh) + var(--safe-bottom)); }
.map-bottom[data-panel="arrive"]  { height: calc(min(186px, 24svh) + var(--safe-bottom)); }

/* Paneles */
.map-panel              { display: none; flex-direction: column; flex: 1; overflow: hidden; }
.map-panel-ficha.active { display: flex; }
.map-panel-arrive.active{ display: flex; flex-direction: column; align-items: center; justify-content: center; }
.map-panel-explore.active,
.map-panel-nav.active   { display: block; }

/* Panel Explorar */
.map-panel-explore { padding: 14px 16px; }
.map-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(196,164,105,.08);
  border: .5px solid rgba(196,164,105,.2);
  border-radius: 12px;
  margin-bottom: 12px;
}
.map-hint-ico {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(196,164,105,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-gold);
}
.map-hint-ico svg { width: 13px; height: 13px; }
.map-hint-txt { font-size: 0.75rem; color: var(--color-text-secondary); line-height: 1.4; }
.map-hint-txt strong { color: var(--color-primary); font-weight: 500; display: block; font-size: 0.82rem; margin-bottom: 1px; }
.map-chips-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.map-chips-row::-webkit-scrollbar { display: none; }
.map-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--bg-card);
  border: .5px solid var(--color-border);
  border-radius: 22px;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .15s, background .15s;
}
.map-chip:hover, .map-chip.active { border-color: var(--color-gold); background: rgba(196,164,105,.08); }
.map-chip-sym  { font-size: 13px; }
.map-chip-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.7rem;
  color: var(--color-primary);
}
.map-chip-dist { font-size: 0.65rem; color: var(--color-text-secondary); }

/* Panel Ficha */
.map-pf-handle {
  width: 36px; height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}
.map-pf-header {
  height: 160px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.map-pf-header.has-image .map-pf-overlay { background: linear-gradient(to top, rgba(26,15,7,.75) 0%, rgba(26,15,7,.1) 65%, transparent 100%); }
.map-pf-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,15,7,.6) 0%, transparent 70%);
}
.map-pf-close {
  position: absolute;
  top: 10px; right: 12px;
  z-index: 10;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(26,15,7,.35);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.map-pf-close svg { width: 13px; height: 13px; color: var(--bg-main); }
.map-pf-header-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 16px 12px;
}
.map-pf-sym  { font-size: 2rem; opacity: .8; margin-bottom: 2px; }
.map-pf-name { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 400; color: var(--bg-main); line-height: 1.2; }
.map-pf-meta {
  display: flex;
  border-bottom: .5px solid var(--color-border);
  flex-shrink: 0;
}
.map-pf-met { flex: 1; text-align: center; padding: 11px 0; }
.map-pf-met + .map-pf-met { border-left: .5px solid var(--color-border); }
.map-pf-mv  { font-size: 1.1rem; font-weight: 500; color: var(--color-primary); line-height: 1; }
.map-pf-ml  { font-size: 0.58rem; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: .07em; margin-top: 2px; }
.map-pf-scroll { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.map-pf-scroll::-webkit-scrollbar { display: none; }
.map-pf-body   { padding: 12px 16px; }
.map-pf-desc   { font-size: 0.82rem; line-height: 1.72; color: var(--color-text); opacity: .85; }
.map-pf-cta-wrap {
  padding: 10px 16px 16px;
  border-top: .5px solid var(--color-border);
  flex-shrink: 0;
  background: var(--bg-main);
}
.map-pf-cta {
  width: 100%; height: 48px;
  background: var(--color-primary);
  border: none;
  border-radius: 24px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--bg-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .2s;
}
.map-pf-cta svg { width: 14px; height: 14px; }
.map-pf-cta:active { opacity: .8; }

/* Panel Navegando */
.map-panel-nav { padding: 14px 16px 0; }
.map-nav-step  { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.map-nav-box   {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--color-primary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-nav-box svg { width: 20px; height: 20px; color: var(--bg-main); }
.map-nav-text  { flex: 1; }
.map-nav-sd    { font-size: 0.75rem; color: var(--color-text-secondary); margin-bottom: 2px; }
.map-nav-si    { font-family: var(--font-serif); font-size: 1rem; color: var(--color-primary); line-height: 1.25; }
.map-nav-mets  { display: flex; border-top: .5px solid var(--color-border); padding-top: 10px; margin-bottom: 8px; }
.map-nav-met   { flex: 1; text-align: center; }
.map-nav-met + .map-nav-met { border-left: .5px solid var(--color-border); }
.map-nav-mv    { font-size: 1.1rem; font-weight: 500; color: var(--color-primary); line-height: 1; }
.map-nav-mu    { font-size: 0.58rem; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: .07em; margin-top: 2px; }
.map-nav-cancel{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 6px;
}
.map-nav-cancel svg { width: 11px; height: 11px; }

/* Panel Llegando */
.map-panel-arrive { padding: 16px 20px; gap: 14px; text-align: center; }
.map-arrive-txt   { font-size: 0.82rem; color: var(--color-text-secondary); line-height: 1.5; }
.map-arrive-txt strong { color: var(--color-primary); display: block; font-family: var(--font-serif); font-style: italic; font-size: 1rem; margin-bottom: 3px; font-weight: 400; }
.map-enter-btn {
  width: 100%; height: 52px;
  background: var(--color-gold);
  border: none;
  border-radius: 26px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  animation: map-arrive-pulse 2s ease-in-out infinite;
}
.map-enter-btn svg { width: 15px; height: 15px; }
.map-enter-btn:active { transform: scale(.97); }
@keyframes map-arrive-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(196,164,105,.5); }
  50%      { box-shadow: 0 0 0 12px rgba(196,164,105,0); }
}

/* Banner de zona próxima (geofence pasivo, solo en modo explore) */
.map-nearby-banner {
  position: absolute;
  left: 12px; right: 12px;
  bottom: calc(min(160px, 22vh) + env(safe-area-inset-bottom, 0px) + 10px);
  z-index: 21;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: .5px solid var(--color-border);
  box-shadow: 0 4px 20px var(--color-shadow);
  animation: map-banner-in .3s cubic-bezier(.4,0,.2,1);
}
@keyframes map-banner-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}
.map-nearby-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.map-nearby-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.map-nearby-sym  { font-size: 1.1rem; flex-shrink: 0; }
.map-nearby-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-nearby-actions { display: flex; gap: 6px; flex-shrink: 0; }
.map-nearby-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .15s;
}
.map-nearby-ignore {
  background: transparent;
  color: var(--color-text-secondary);
  border: .5px solid var(--color-border);
}
.map-nearby-enter {
  background: var(--color-primary);
  color: var(--bg-main);
  border: none;
}
.map-nearby-btn:active { opacity: .75; }

/* ------------------------------------------------------------------ */
/* Vista inmersiva                                                      */
/* ------------------------------------------------------------------ */

.view-immersive {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg-main);
  position: relative;
}

/* --- Cabecera inmersiva --- */

.imm-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  position: relative;
  z-index: 10;
}

.imm-title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.imm-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 5px 12px 5px 9px;
}

.imm-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent-green);
  flex-shrink: 0;
}

.imm-status-text {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.imm-menu-wrap {
  position: relative;
}

.imm-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  -webkit-tap-highlight-color: transparent;
}

.imm-menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
}

.imm-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px var(--color-shadow);
  min-width: 180px;
  padding: 8px 0;
  z-index: 20;
}

.imm-dropdown-zone {
  padding: 8px 16px 10px;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

.imm-dropdown-item {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  padding: 10px 16px;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.1s;
}

.imm-dropdown-item:hover { background: var(--bg-main); }

.imm-dropdown-danger { color: #c0392b; }

/* --- Zona central: anillos + avatar --- */

.imm-center {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 16px;
  min-height: 0;
}

.imm-rings-wrap {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.imm-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  opacity: 0.6;
  pointer-events: none;
}

.imm-avatar-circle {
  position: relative;
  z-index: 2;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border);
  background: var(--bg-card);
  box-shadow: 0 2px 16px var(--color-shadow);
  flex-shrink: 0;
}

.imm-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder si no hay avatar */
.imm-avatar-circle::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: var(--color-border);
  position: absolute;
  inset: 0;
  z-index: -1;
}

/* --- Burbujas de escena --- */

.imm-scene-bubbles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.imm-scene-bubble {
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--bg-card);
  cursor: pointer;
  pointer-events: auto;
  background: var(--bg-card);
  will-change: transform, box-shadow;
  /* La clase .is-appearing activa la animación de entrada */
}

/* Aparición: "algo emerge del pasado" */
.imm-scene-bubble.is-appearing {
  animation: bubbleAppear var(--transition-memory) forwards;
}

/* Estado normal (tras desaparecer .is-appearing) */
.imm-scene-bubble:not(.is-appearing) {
  transform: scale(1);
  box-shadow: 0 0 8px 2px var(--color-golden-light), 0 2px 8px var(--color-shadow);
  transition: transform 0.15s;
}

.imm-scene-bubble:not(.is-appearing):active { transform: scale(0.92); }

/* Imagen dentro de la burbuja: reveal desde sepia+blur */
.imm-scene-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: filter, opacity, transform;
}

.imm-scene-bubble.is-appearing img {
  animation: bubbleImgReveal var(--transition-memory) forwards;
}

/* ---------- Keyframes burbuja ---------- */

@keyframes bubbleAppear {
  0%   {
    transform: scale(0.1);
    box-shadow: 0 0 28px 14px rgba(196,164,105,0.85),
                0 0  6px  2px rgba(196,164,105,0.4);
  }
  55%  {
    transform: scale(1.1);
    box-shadow: 0 0 22px 8px  rgba(196,164,105,0.55),
                0 2px 8px 0   var(--color-shadow);
  }
  70%  {
    /* Primer pulso */
    transform: scale(0.97);
    box-shadow: 0 0 32px 14px rgba(196,164,105,0.45),
                0 2px 8px 0   var(--color-shadow);
  }
  82%  {
    transform: scale(1.02);
    box-shadow: 0 0 10px  3px rgba(196,164,105,0.2),
                0 2px 8px 0   var(--color-shadow);
  }
  92%  {
    /* Segundo pulso */
    transform: scale(1);
    box-shadow: 0 0 24px 10px rgba(196,164,105,0.35),
                0 2px 8px 0   var(--color-shadow);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0  8px  2px rgba(196,164,105,0.15),
                0 2px 8px 0   var(--color-shadow);
  }
}

@keyframes bubbleImgReveal {
  0%   { opacity: 0; filter: blur(8px) sepia(0.85); }
  35%  { opacity: 0; filter: blur(8px) sepia(0.85); }
  100% { opacity: 1; filter: blur(0)   sepia(0); }
}

/* ---------- Órbita de la burbuja alrededor del avatar ---------- */

/* Contenedor giratorio — misma área que imm-rings-wrap (280×280).
   Rota desde su centro (140, 140) arrastrando la burbuja con él.   */
.imm-orbit-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* transform-origin: center center — por defecto */
}

/* Órbita activa: rotación continua, pausada y contemplativa */
.imm-orbit-container.is-orbiting {
  animation: sceneOrbit 20s linear infinite;
}

/* Congelada: la burbuja se detiene en el punto donde se pulsó */
.imm-orbit-container.is-frozen {
  animation-play-state: paused;
}

/* Burbuja en el rim este del anillo exterior.
   Cálculo: center(140) + radius(122) − half-bubble(24) = 238
            center(140)              − half-bubble(24) = 116  */
.imm-orbit-container .imm-scene-bubble {
  top:  116px;
  left: 238px;
}

/* Contra-rotación de la imagen — misma duración y timing que sceneOrbit
   para que la foto siempre se vea derecha mientras orbita.            */
.imm-orbit-container.is-orbiting .imm-scene-bubble img {
  animation: sceneOrbitCounter 20s linear infinite;
}

.imm-orbit-container.is-frozen .imm-scene-bubble img {
  animation-play-state: paused;
}

@keyframes sceneOrbit {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes sceneOrbitCounter {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* --- Nombre del personaje --- */

.imm-char-name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 400;
  color: var(--color-text);
  text-align: center;
  line-height: 1.3;
}

.imm-char-title {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  text-align: center;
}

/* --- Área de estado de audio --- */

.imm-audio-area {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 4px 0 8px;
  min-height: 64px;
}

.imm-waveform {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
}

.imm-waveform span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--color-primary-light);
  animation: immWaveBar 0.9s ease-in-out infinite;
}

.imm-waveform span:nth-child(1) { height: 8px;  animation-delay: 0s; }
.imm-waveform span:nth-child(2) { height: 18px; animation-delay: 0.12s; }
.imm-waveform span:nth-child(3) { height: 28px; animation-delay: 0.24s; }
.imm-waveform span:nth-child(4) { height: 18px; animation-delay: 0.36s; }
.imm-waveform span:nth-child(5) { height: 8px;  animation-delay: 0.48s; }

@keyframes immWaveBar {
  0%, 100% { transform: scaleY(0.35); opacity: 0.6; }
  50%       { transform: scaleY(1);   opacity: 1; }
}

.imm-waveform.paused span { animation-play-state: paused; }

.imm-audio-label {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  text-align: center;
}

/* --- Botón replay inmersivo --- */

.imm-replay-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text-secondary);
  opacity: 0.5;
  line-height: 1;
  transition: opacity 0.2s;
  touch-action: manipulation;
  flex-shrink: 0;
}

.imm-replay-btn:hover,
.imm-replay-btn:focus-visible { opacity: 1; outline: none; }

/* --- Botón push-to-talk --- */

.imm-ptt-area {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.imm-ptt-ring-outer {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: rgba(92, 61, 46, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
}

.imm-ptt-ring-inner {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(92, 61, 46, 0.13);
  display: flex;
  align-items: center;
  justify-content: center;
}

.imm-ptt-btn {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  box-shadow: 0 4px 16px rgba(92, 61, 46, 0.35);
}

.imm-ptt-btn:active,
.imm-ptt-btn.recording {
  background: #b03a2e;
  transform: scale(1.06);
  box-shadow: 0 4px 20px rgba(176, 58, 46, 0.5);
}

.imm-ptt-btn.processing {
  background: var(--color-primary-light);
  cursor: not-allowed;
  transform: none;
}

.imm-ptt-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@keyframes pttPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(176, 58, 46, 0.4); }
  50%       { box-shadow: 0 0 0 10px rgba(176, 58, 46, 0); }
}

.imm-ptt-btn.recording {
  animation: pttPulse 1s ease-in-out infinite;
}

.imm-ptt-label {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  text-align: center;
}

/* --- Pie de la vista inmersiva --- */

.imm-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  padding: 8px 0 max(20px, env(safe-area-inset-bottom, 20px));
}

.imm-btn-chat {
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 8px 20px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}

.imm-btn-chat:hover { color: var(--color-primary); }

/* ------------------------------------------------------------------ */
/* Bottom sheet chat                                                    */
/* ------------------------------------------------------------------ */

.chat-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.14);
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 50;
  display: flex;
  flex-direction: column;
  max-height: 92vh;
  max-height: 92dvh;
  min-height: 56vh;
  min-height: 56dvh;
  padding-bottom: var(--safe-bottom);
}

.chat-sheet.open {
  transform: translateY(0);
}

.chat-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin: 12px auto 6px;
  flex-shrink: 0;
  cursor: grab;
}

.chat-btn-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--color-text-muted, #888);
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  z-index: 10;
}

/* --- Área de mensajes --- */

.chat-messages {
  flex: 1 1 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.chat-welcome {
  text-align: center;
  padding: 24px 16px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* --- Burbujas de mensaje --- */

.chat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.chat-msg-user {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg-yusuf {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 16px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.5;
  word-break: break-word;
}

.chat-msg-user .chat-bubble {
  background: var(--color-primary);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-msg-yusuf .chat-bubble {
  background: var(--bg-white);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 4px;
  position: relative;
}

/* Botón replay discreto dentro de la burbuja de Yusuf */
.chat-bubble-play {
  display: block;
  margin-top: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--color-text-secondary);
  opacity: 0.45;
  line-height: 1;
  transition: opacity 0.15s;
  touch-action: manipulation;
}

.chat-bubble-play:hover,
.chat-bubble-play:focus-visible { opacity: 1; outline: none; }

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

.chat-bubble-thinking span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-text-secondary);
  animation: thinkDot 1.2s ease-in-out infinite;
}

.chat-bubble-thinking span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble-thinking span:nth-child(3) { animation-delay: 0.4s; }

@keyframes thinkDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}

.chat-msg-time {
  font-size: 0.68rem;
  color: var(--color-text-secondary);
  margin-top: 3px;
  padding: 0 4px;
}

/* Imagen inline en burbuja */
.chat-bubble-img {
  margin-top: 8px;
  width: 100%;
  max-width: 200px;
  border-radius: 10px;
  cursor: pointer;
  display: block;
  object-fit: cover;
  aspect-ratio: 4/3;
}

/* --- Barra de input --- */

.chat-input-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--color-border);
  background: var(--bg-card);
}

.chat-input {
  flex: 1;
  background: var(--bg-white);
  border: 1px solid var(--color-border);
  border-radius: 22px;
  padding: 9px 16px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s;
  min-width: 0;
}

.chat-input:focus { border-color: var(--color-primary-light); }

.chat-input-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.chat-btn-mic {
  background: var(--bg-white);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.chat-btn-mic:active,
.chat-btn-mic.recording {
  background: #b03a2e;
  color: #fff;
  border-color: #b03a2e;
  transform: scale(1.05);
}

.chat-btn-send {
  background: var(--color-primary);
  color: #fff;
}

.chat-btn-send:active { transform: scale(0.95); }

/* Indicador de grabación en el chat */
.chat-recording-indicator {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(176, 58, 46, 0.08);
  border-radius: 22px;
  border: 1px solid rgba(176, 58, 46, 0.2);
}

.chat-recording-indicator.hidden { display: none; }

.chat-rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b03a2e;
  animation: recBlink 1s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes recBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.chat-rec-text {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: #b03a2e;
}

/* ------------------------------------------------------------------ */
/* Lightbox — "abrir un recuerdo"                                       */
/* ------------------------------------------------------------------ */

/*
 * Visibilidad gestionada por clases JS (no por .hidden):
 *   .lb-open    → visible + pointer-events
 *   .lb-opening → animación de entrada
 *   .lb-closing → animación de salida
 */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
}

.lightbox.lb-open {
  visibility: visible;
  pointer-events: auto;
}

/* Onda circular que emana desde la zona de la burbuja (top-right) */
.lightbox.lb-opening::before {
  content: '';
  position: absolute;
  right: 18%;
  top: 36%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translate(50%, -50%) scale(1);
  border: 1.5px solid rgba(196, 164, 105, 0.8);
  pointer-events: none;
  z-index: 5;
  animation: lbRipple 1.0s cubic-bezier(0.2, 0.8, 0.4, 1) forwards;
}

/* --- Overlay --- */

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  opacity: 0;
}

.lightbox.lb-opening .lightbox-overlay {
  animation: lbOverlayIn 0.8s ease-out 0.1s forwards;
}

.lightbox.lb-closing .lightbox-overlay {
  animation: lbOverlayOut 0.75s ease-in forwards;
}

/* --- Imagen + viñeteado --- */

.lightbox-img-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  will-change: filter, opacity, transform;
}

/* Viñeteado: bordes oscuros que se atenúan al "recordar" */
.lightbox-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-md);
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(0, 0, 0, 0.7) 100%
  );
  z-index: 2;
  pointer-events: none;
  opacity: 1;
  transition: opacity 1.2s ease-out 0.6s;
}

.lightbox.lb-open:not(.lb-opening):not(.lb-closing) .lightbox-img-wrap::after {
  opacity: 0.12; /* casi imperceptible una vez el recuerdo está "vivo" */
}

/* Animación de entrada del contenedor */
.lightbox.lb-opening .lightbox-img-wrap {
  animation: lbImgReveal 1.5s ease-out 0.25s forwards;
}

/* Animación de salida del contenedor */
.lightbox.lb-closing .lightbox-img-wrap {
  animation: lbImgClose 0.7s ease-in forwards;
}

/* La imagen en sí */
.lightbox-img {
  display: block;
  max-width: 92vw;
  max-height: 88dvh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

/* --- Motas de polvo dorado --- */

.lb-dust {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(196, 164, 105, 0.75);
  pointer-events: none;
  z-index: 4;
}

/* --- Botón de cierre --- */

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 6;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0);   /* invisible mientras abre */
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.6s ease-out 1s, background 0.2s;
}

/* Aparece después de que termina la animación de entrada */
.lightbox.lb-open:not(.lb-opening) .lightbox-close { color: #fff; }
.lightbox-close:hover { background: rgba(255, 255, 255, 0.25); }

/* ---- Keyframes lightbox ---- */

@keyframes lbRipple {
  0%   { width: 8px;   height: 8px;   opacity: 0.9; }
  100% { width: 320px; height: 320px; opacity: 0;   }
}

@keyframes lbOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lbOverlayOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

@keyframes lbImgReveal {
  0%   { filter: blur(7px) sepia(0.75); opacity: 0; transform: scale(0.95); }
  25%  { opacity: 1; }
  100% { filter: blur(0)   sepia(0);    opacity: 1; transform: scale(1); }
}

@keyframes lbImgClose {
  0%   { filter: blur(0)   sepia(0);    opacity: 1; transform: scale(1); }
  100% { filter: blur(7px) sepia(0.75); opacity: 0; transform: scale(0.94); }
}

@keyframes dustFloat {
  0%   { transform: translateY(0)     scale(1);   opacity: 0.9; }
  100% { transform: translateY(-45px) scale(0.4); opacity: 0;   }
}
