:root {
  /* Paleta "Sakura" (elegida 2026-09-14 entre 3 propuestas: Bósforo/Ruta de
     Seda/Sakura) — rosa cerezo saturado + añil de noche + dorado festivo,
     en vez del berry/rosa apagados originales. Mismos nombres de variable
     que antes a propósito, para no tener que tocar el resto del CSS/JS. */
  --c-berry: #e0457b;
  --c-pink: #ffd9e7;
  --c-tan: #e8ac3e;
  --c-mauve: #463779;
  --c-cream: #fff5f7;

  --bg: var(--c-cream);
  --surface: #ffffff;
  --text: #2b1f3d;
  --text-muted: #8b7a95;
  --border: #f6d9e3;
  --accent: var(--c-berry);
  --accent-2: var(--c-mauve);
  --accent-soft: var(--c-pink);
  --cultura: var(--c-berry);
  --museos: var(--c-mauve);
  --lifestyle: var(--c-tan);
  --gastronomia: var(--c-pink);
  --compras: #8b7a95;
  --success: #3f9463;
  --type-flight: var(--c-mauve);
  --type-hotel: var(--c-tan);
  --type-other: var(--c-pink);
  --radius: 16px;
  --shadow: 0 6px 16px rgba(43, 31, 61, 0.16);
  --font-display: Georgia, 'Playfair Display', 'Times New Roman', serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #211a2e;
    --surface: #2f2640;
    --text: var(--c-cream);
    --text-muted: #c7b9d3;
    --border: #453963;
    --accent: #f07ba8;
    --accent-2: #a89bd4;
    --accent-soft: #3a2b4a;
    --shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    --success: #8fbf9e;
    --type-flight: #a89bd4;
    --type-hotel: #f0c675;
    --type-other: #5c3a52;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

#family-gate-overlay { display: none; }
html.gate-locked #family-gate-overlay { display: flex; }
html.gate-locked .app-header,
html.gate-locked .tabs,
html.gate-locked #main { display: none; }

.family-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
}

.family-gate-form {
  width: 100%;
  max-width: 320px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.family-gate-photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  display: block;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.family-gate-form h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  color: var(--accent);
}

.family-gate-form p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.family-gate-form input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: calc(var(--radius) / 2);
  border: 1px solid var(--border);
  font-size: 1rem;
  margin-bottom: 14px;
  text-align: center;
}

.family-gate-form .btn-primary {
  width: 100%;
}

.app-header {
  padding: 18px 16px 16px;
  padding-top: calc(18px + env(safe-area-inset-top));
  background: var(--accent);
  border-bottom: none;
}

.app-header h1 {
  margin: 0;
  font-size: 1.25rem;
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #fff;
}

.app-header h1 span {
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
}

.tabs {
  display: flex;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  position: relative;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden { display: none !important; }

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  color: var(--accent-2);
}

.nav-icon svg { width: 100%; height: 100%; stroke-width: 2.6; }

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: transparent;
  font-weight: 600;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 22%;
  right: 22%;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}

.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
}

main {
  flex: 1;
  overflow: hidden;
  display: flex;
  position: relative;
}

.tab-panel {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
}

.tab-panel.active {
  display: block;
}

#tab-itinerario.active {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.split-map {
  position: relative;
  flex: 2 1 0;
  min-height: 0;
}

.split-list {
  flex: 3 1 0;
  overflow-y: auto;
  min-height: 0;
}

@media (min-width: 700px) {
  #tab-itinerario.active { flex-direction: row; }
  .split-map { height: auto; min-width: 0; }
  .split-list { min-width: 0; }
}

#map {
  width: 100%;
  height: 100%;
}

/* --- Selector de días (sobre el mapa) / pill-bars en general --- */
.pill-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 10px;
}

.split-map .pill-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 450;
  background: rgba(247, 237, 225, 0.92);
}

@media (prefers-color-scheme: dark) {
  .split-map .pill-bar { background: rgba(28, 20, 16, 0.92); }
}

.pill-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.pill-btn.active {
  background: var(--accent-2);
  border-color: transparent;
  color: #fff;
}

.trip-marker.trip-marker--active {
  background: var(--accent-2);
  transform: scale(1.35);
  box-shadow: 0 0 0 5px var(--accent-soft);
  transition: background 0.2s ease, transform 0.2s ease;
}

.day-card--active {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 2px var(--accent-2);
}

.day-item-row { display: flex; gap: 10px; align-items: flex-start; }

.place-extra {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.place-thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--accent-soft);
  flex-shrink: 0;
}

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

.place-links { display: flex; gap: 6px; flex-wrap: wrap; }

.place-link-btn {
  font-size: 0.72rem;
  padding: 4px 9px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.content-list {
  padding: 14px;
  max-width: 720px;
  margin: 0 auto;
}

/* --- Marcadores del mapa --- */
.trip-marker {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  border: 2px solid #fff;
  box-shadow: var(--shadow);
}

.leaflet-popup-content { font-size: 0.85rem; }

/* --- Tarjetas genéricas --- */
.card {
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  font-family: var(--font-display);
}

.card .body-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

/* --- Día especial: cumpleaños --- */
.card--birthday {
  border-color: var(--c-tan);
  background: linear-gradient(135deg, var(--accent-soft), var(--surface) 55%);
  box-shadow: 0 0 0 2px var(--c-tan), var(--shadow);
}

.card--birthday h3 { color: var(--accent); }

.birthday-banner {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--c-tan);
  color: var(--text);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

.anniversary-banner {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--c-pink);
  color: var(--text);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 6px;
}

/* --- Leg (tramo de viaje) --- */
.leg-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px 14px;
  padding: 8px 12px;
  border-left: 2px dashed var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.leg-card .leg-icon { font-size: 1.1rem; }
.leg-card b { color: var(--text); }
.leg-card .leg-note { display: block; font-size: 0.76rem; margin-top: 2px; }

.leg-card.flight-layover {
  border-left-color: var(--accent-2);
  align-items: flex-start;
}
.leg-card.flight-layover b { color: var(--accent-2); }

/* --- Detail overlay --- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 20, 12, 0.45);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
}

.overlay.hidden { display: none; }

.detail-panel {
  background: var(--bg);
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 18px 18px 32px;
  position: relative;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
}

@media (min-width: 700px) {
  .overlay { align-items: center; justify-content: center; }
  .detail-panel { max-width: 560px; border-radius: 20px; max-height: 82vh; }
}

.close-btn {
  position: sticky;
  top: 0;
  float: right;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--text);
}

.detail-content h2 {
  margin: 0 4px 2px 0;
  font-size: 1.3rem;
  font-family: var(--font-display);
}

.detail-content .subtitle {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 14px;
}

.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 18px 0 8px;
  font-weight: 700;
}

.section-title:first-of-type { margin-top: 4px; }

.info-row {
  display: flex;
  gap: 8px;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.info-row .ico { width: 20px; text-align: center; }

.weather-box {
  display: flex;
  gap: 16px;
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 10px 14px;
  align-items: center;
}

.weather-box .temp { font-size: 1.4rem; font-weight: 700; }
.weather-box .temp small { font-size: 0.7rem; font-weight: 400; }
.weather-box .weather-label { font-size: 0.75rem; color: var(--text-muted); }
.weather-box.loading, .weather-box.error { font-size: 0.82rem; color: var(--text-muted); padding: 10px 14px; }

.suggestion-item {
  border-radius: 14px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.suggestion-item .tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 1px 7px;
  border-radius: 20px;
  color: #fff;
  margin-bottom: 4px;
}

.tag.cultura { background: var(--cultura); }
.tag.museos { background: var(--museos); }
.tag.lifestyle { background: var(--lifestyle); color: var(--text); }
.tag.gastronomia { background: var(--gastronomia); color: var(--text); }
.tag.compras { background: var(--compras); }

/* Cajitas de color para las actividades fijas de cada día (Itinerario) —
   mismos colores de categoría que las tags del catálogo, pero en formato
   legible (no mayúsculas diminutas) porque aquí llevan el nombre completo. */
.activity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.activity-chip {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 14px;
  color: #fff;
}

.activity-chip.cultura { background: var(--cultura); }
.activity-chip.museos { background: var(--museos); }
.activity-chip.lifestyle { background: var(--lifestyle); color: var(--text); }
.activity-chip.gastronomia { background: var(--gastronomia); color: var(--text); }
.activity-chip.compras { background: var(--compras); }
.activity-chip--plain { background: var(--border); color: var(--text-muted); }

/* Cajita + controles (× de quitar, ↑↓ de reordenar) como un único bloque que
   no se separa al hacer wrap — solo aparece en el modal (login real). */
.chip-with-controls {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.chip-remove-btn {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.75;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 0 0 6px;
  cursor: pointer;
}

.chip-remove-btn:hover { opacity: 1; }

.suggestion-item .s-title { font-weight: 600; font-size: 0.9rem; }
.suggestion-item .s-desc { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }
.suggestion-item .badge-reservation { float: right; }

.activity-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.badge-reservation { background: var(--accent-soft); color: var(--accent); }

.reorder-btn {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.reorder-btn:disabled { opacity: 0.3; cursor: default; }
.reorder-btn .icon { width: 12px; height: 12px; }
.reorder-btn.reorder-up .icon { transform: rotate(-90deg); }
.reorder-btn.reorder-down .icon { transform: rotate(90deg); }

.activity-add-form,
.hotel-details-form {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.activity-add-form select,
.flight-number-form select {
  flex: 1;
  min-width: 120px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}

.custom-activity-form { margin-top: 8px; }

.detail-hint { font-size: 0.78rem; font-style: italic; }

/* .day-item apila su contenido en vertical (texto arriba, miniatura+links
   abajo) — antes era flex-row con la miniatura a un lado, lo que le dejaba
   casi la mitad del ancho a un thumbnail decorativo y aplastaba las
   cajitas de actividad contra el otro lado. */
.day-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.day-item-main {
  display: flex;
  flex-direction: column;
}

.day-item--clickable {
  cursor: pointer;
  border-radius: 12px;
  padding: 4px 6px;
  margin: -4px -6px 4px;
  transition: background 0.15s ease;
}

.day-item--clickable:hover,
.day-item--clickable:active {
  background: var(--accent-soft);
}

.day-item-chevron {
  margin-left: auto;
  color: var(--text-muted);
  flex-shrink: 0;
  align-self: center;
  width: 16px;
  height: 16px;
}

[data-loc] { cursor: pointer; }

.transport-item {
  border-radius: 14px;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.transport-item .transport-label { font-weight: 600; font-size: 0.85rem; }
.transport-item .transport-text { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.transport-item .place-link-btn { margin-left: 4px; vertical-align: middle; }

.day-item .day-date {
  min-width: 78px;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.78rem;
}

/* --- Frases --- */
.phrases-intro p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.phrase-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 8px;
  gap: 10px;
}

.bargain-tip {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.bargain-tip-title { font-weight: 700; font-size: 0.85rem; color: var(--accent); margin-bottom: 4px; }
.bargain-tip p { font-size: 0.82rem; margin: 0; }

.phrase-item .translation { font-size: 0.82rem; color: var(--text-muted); }
.phrase-item .native { font-size: 1rem; font-weight: 600; margin: 2px 0; }
.phrase-item .phon { font-size: 0.82rem; font-style: italic; color: var(--accent-2); }

.camera-cta {
  display: block;
  text-align: center;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 13px 16px;
  border-radius: 16px;
  margin-bottom: 16px;
}

/* --- Historia --- */
.essentials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 6px;
}

.essential-item {
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 8px 10px;
}

.essential-label { font-weight: 700; font-size: 0.75rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.03em; }
.essential-text { font-size: 0.8rem; margin-top: 2px; }

.history-period {
  margin-bottom: 12px;
}

.history-period h4 {
  margin: 0 0 4px;
  font-size: 0.92rem;
  color: var(--accent);
}

.history-period p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
}

.place-history .card h3 { font-size: 0.98rem; }
.country-block { margin-bottom: 8px; }

/* --- Quiz de historia --- */
.quiz-card h3 { display: flex; align-items: center; gap: 8px; }

.quiz-start-btn { width: 100%; }

.quiz-progress {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 8px;
}

.quiz-question {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.quiz-option {
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
}

.quiz-option:disabled { cursor: default; }

.quiz-option.quiz-correct {
  border-color: var(--c-tan);
  background: var(--c-tan);
  color: var(--text);
  font-weight: 600;
}

.quiz-option.quiz-wrong {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.quiz-explanation {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 4px 0 12px;
}

.quiz-explanation.hidden, .quiz-next-btn.hidden { display: none; }

.quiz-result { text-align: center; padding: 6px 0; }

.quiz-score {
  font-size: 2rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent);
  margin-bottom: 6px;
}

/* --- Reservas --- */
.reserva-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.reserva-card .leg-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--type-other);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Colores por tipo de reserva (vuelo/hotel/otro) — franja a la izquierda de
   la tarjeta + color del círculo del icono, para distinguirlas de un vistazo. */
.reserva-card--flight { border-left-color: var(--type-flight); border-left-width: 4px; }
.reserva-card--flight .leg-icon-wrap { background: var(--type-flight); color: #fff; }
.reserva-card--hotel { border-left-color: var(--type-hotel); border-left-width: 4px; }
.reserva-card--hotel .leg-icon-wrap { background: var(--type-hotel); color: var(--text); }

.reserva-card .icon { width: 1.1em; height: 1.1em; }

.reserva-card .reserva-body { flex: 1; min-width: 0; }
.reserva-card .reserva-title { font-weight: 700; font-size: 0.95rem; }
.reserva-card .reserva-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.reserva-card .reserva-price { font-size: 0.82rem; margin-top: 4px; font-weight: 600; }

.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px 9px;
  border-radius: 20px;
  margin-top: 6px;
}

.badge-confirmed { background: var(--success); color: #fff; }
.badge-cancelled { background: var(--border); color: var(--text-muted); }
.badge-warning { background: var(--accent-soft); color: var(--accent); margin-left: 6px; }

.pending-warning {
  font-size: 0.78rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 12px;
  padding: 8px 10px;
  margin-top: 6px;
}

.reserva-card--cancelled { opacity: 0.62; }
.reserva-card--cancelled .reserva-title { text-decoration: line-through; }

.flight-number-slot { margin-top: 8px; }

.flight-number-value {
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.flight-number-form {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.flight-number-form input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
  font-family: inherit;
}

/* --- Perfil de viajero --- */
.form-group { margin-bottom: 12px; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

.form-group textarea { min-height: 70px; resize: vertical; }

.btn-primary, .btn-secondary {
  border-radius: 14px;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-right: 8px;
}

.btn-primary { background: var(--accent); color: #fff; border: none; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--accent-soft);
  flex-shrink: 0;
}

.avatar-lg { width: 80px; height: 80px; }

.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-muted);
}

.profile-card { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.profile-card h3 { margin: 0; font-size: 1rem; }
.tag-own { font-size: 0.7rem; color: var(--text-muted); font-weight: 400; }

.checklist-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 6px;
  cursor: pointer;
}

.checklist-item input[type="checkbox"] { width: 18px; height: 18px; flex-shrink: 0; }
.checklist-item input:checked + span { text-decoration: line-through; color: var(--text-muted); }

.perfil-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.profile-detail-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.profile-detail-head h2 { margin: 0; }

.doc-photo {
  width: 100%;
  max-width: 320px;
  border-radius: 14px;
  margin: 6px 0 10px;
  display: block;
  border: 1px solid var(--border);
}

.form-error { color: var(--accent); font-size: 0.82rem; margin-top: 8px; }
.help-text { font-size: 0.85rem; color: var(--text-muted); }

/* --- Tabla resumen de perfiles --- */
.table-wrap { overflow-x: auto; }

.profiles-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }

.profiles-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.profiles-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.profiles-table tbody tr { cursor: pointer; }
.profiles-table tbody tr:hover td { background: var(--accent-soft); }

/* --- Recuerdos (feed / cuadrícula) --- */
.feed-toggle { padding: 0 0 12px; }

.challenge-btn {
  display: block;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  margin-bottom: 8px;
}

.challenge-btn h3 { display: flex; align-items: center; gap: 6px; }

.challenge-btn--locked { opacity: 0.6; }

.countdown {
  font-size: 2.2rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--accent);
  text-align: center;
  padding: 20px 0 8px;
}

.diary-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.diary-hero img {
  width: 100%;
  display: block;
}

.diary-hero-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  background: linear-gradient(0deg, rgba(0,0,0,0.55), transparent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  text-align: center;
}

.challenge-date {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.feed-item .feed-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.feed-author { font-weight: 600; font-size: 0.9rem; }
.feed-date { font-size: 0.76rem; color: var(--text-muted); }

.feed-photo {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 8px;
  display: block;
}

.feed-challenge-desc {
  font-size: 0.8rem;
  font-style: italic;
  color: var(--text-muted);
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 6px 10px;
  margin: 0 0 8px;
}

.feed-text { margin-bottom: 8px; }

.feed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}

.feed-grid-item {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 6px;
}

.feed-grid-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ios-install-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 2000;
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 36px 14px 16px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.ios-install-banner p { margin: 0; }

.ios-install-banner svg {
  width: 1.1em;
  height: 1.1em;
  vertical-align: -0.2em;
  stroke: var(--accent);
}

.ios-install-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.ios-install-arrow {
  text-align: center;
  font-size: 1.4rem;
  color: var(--accent);
  animation: ios-install-bounce 1.4s infinite;
}

@keyframes ios-install-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}
