:root {
  /* ---- Superficies claras — modo «buscar» ---- */
  --bg:            #f2f5f8;
  --surface:       #ffffff;
  --surface-sunk:  #e7edf2;
  --border:        #d5dde5;   /* solo dashed e inputs; las tarjetas no llevan borde */
  --hairline:      #eef2f6;   /* separador dentro de una tarjeta */

  /* ---- Superficies oscuras — modo «ahora» ---- */
  --dark-top:      #1b2b3a;
  --dark-bottom:   #0e1720;
  --on-dark:       #eef3f7;
  --on-dark-mut:   #9fb6c9;
  --on-dark-dim:   #7f97ac;
  --on-dark-line:  rgba(255, 255, 255, .12);

  /* ---- Texto sobre claro ---- */
  --text:          #16222e;
  --muted:         #5b7387;
  --muted-strong:  #44586a;
  --placeholder:   #9db0c0;

  /* ---- Acentos: dos, y solo uno por pantalla ---- */
  --now:           #6ee7b7;
  --now-ink:       #0f9e78;
  --now-wash:      #f0fdf7;
  --warn:          #b45309;
  --warn-wash:     #fff9ef;
  --warn-dot:      #f59e0b;
  --purchase:      #a855c7;

  /* ---- Forma ---- */
  --r-card:        18px;
  --r-frame:       22px;
  --r-inner:       12px;
  --r-pill:        999px;
  --shadow-card:   0 1px 2px rgba(22, 34, 46, .06);
  --shadow-focus:  0 1px 2px rgba(22, 34, 46, .06), 0 12px 28px rgba(22, 34, 46, .06);

  /* ---- Tipografía ---- */
  --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "IBM Plex Mono", monospace;

  /* Alto de la barra de abajo. El contenido reserva esto mismo para que la
     última fila no quede debajo de ella, ni pegada a la barra de Safari. */
  --alto-barra: 62px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}

.container { max-width: 1100px; margin: 0 auto; padding: 24px; }
.page-title { margin: 4px 0 8px; font-size: 28px; }
.section-title { font-size: 16px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.count { font-size: 12px; color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); }
.back-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.back-link:hover { color: var(--text); }

/* Buttons */
.btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { border-color: var(--text); color: var(--text); }
.btn-primary { background: var(--text); border-color: var(--text); color: #fff; }
.btn-primary:hover { background: #233240; color: #fff; }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-small { padding: 6px 12px; font-size: 13px; margin-top: 8px; }
.icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 6px;
  text-decoration: none;
}
.icon-btn:hover { background: var(--bg); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); }

/* Badges */
.badge {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  vertical-align: middle;
}

/* Trip grid */
.trip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.trip-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform .12s, border-color .12s;
}
.trip-card:hover { transform: translateY(-2px); border-color: var(--text); }
.trip-card h2 { margin: 8px 0 4px; font-size: 19px; }
.trip-card.status-past { opacity: .7; }
.trip-dest { font-size: 14px; color: var(--muted); }
.trip-dates { font-size: 14px; margin-top: 8px; font-weight: 600; }
.trip-meta { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* Trip detail layout */
.trip-header { margin-bottom: 8px; }
.trip-sub { display: flex; gap: 18px; color: var(--muted); font-size: 15px; flex-wrap: wrap; }
.layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin-top: 20px;
  align-items: start;
}
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }

/* Itinerary */
.day-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.day-block.today { border-color: var(--now-ink); }
.day-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.day-name { font-weight: 700; }
.day-date { color: var(--muted); font-size: 14px; }
.day-header .icon-btn { margin-left: auto; font-weight: 700; }
.day-empty { padding: 12px 16px; color: var(--muted); font-size: 14px; font-style: italic; }

.item {
  display: grid;
  grid-template-columns: 72px 32px 1fr auto;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.item:last-child { border-bottom: none; }
.item-time { font-weight: 700; font-size: 14px; padding-top: 2px; white-space: nowrap; }
.item-icon { font-size: 18px; }
.item-title { font-weight: 600; }
.item-sub { display: flex; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.conf { font-family: ui-monospace, monospace; }
.item-details { font-size: 13px; color: var(--muted); margin-top: 4px; white-space: pre-line; }
.item-files { margin-top: 6px; display: flex; gap: 12px; flex-wrap: wrap; }
.item-files a { font-size: 13px; color: var(--text); text-decoration: none; }
.item-files a:hover { text-decoration: underline; }
.item-actions { display: flex; align-items: center; }
.item-actions form { display: inline; }

/* Sidebar panels */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.panel textarea, .modal textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  font-size: 14px;
  resize: vertical;
}
.upload-form { display: flex; gap: 8px; align-items: center; }
.upload-form input[type=file] { font-size: 13px; flex: 1; min-width: 0; }
.upload-form .btn-small { margin-top: 0; }

.file-list { list-style: none; padding: 0; margin: 12px 0 0; }
.file-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.file-list li:last-child { border-bottom: none; }
.file-list a { color: var(--text); text-decoration: none; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list a:hover { color: var(--text); }
.file-size { color: var(--muted); font-size: 12px; white-space: nowrap; }
.file-actions { display: flex; align-items: center; }
.file-actions form { display: inline; }

.checklist-add { display: flex; gap: 8px; }
.checklist-add input { flex: 1; }
.checklist-add .btn-small { margin-top: 0; }
.checklist { list-style: none; padding: 0; margin: 12px 0 0; }
.checklist li { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 14px; }
.checklist li.done .check-text { text-decoration: line-through; color: var(--muted); }
.check-btn { border: none; background: none; font-size: 17px; cursor: pointer; padding: 0 4px; }
.check-text { flex: 1; }
.checklist form { display: inline; }

.danger-zone { text-align: center; background: transparent; border-style: dashed; box-shadow: none; }

/* Assistant / chat */
.assistant-panel { border-color: #c7d2fe; }
.chat-log {
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 2px;
  margin-bottom: 10px;
}
.chat-msg {
  font-size: 14px;
  line-height: 1.45;
  padding: 8px 11px;
  border-radius: 12px;
  max-width: 90%;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.chat-msg.assistant { background: #eef2ff; color: #1e293b; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--text); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.chat-msg.pending { color: var(--muted); font-style: italic; }
.chat-msg.error { background: #fef2f2; color: var(--danger); align-self: flex-start; }
.chat-msg.note { background: #ecfdf5; color: #065f46; align-self: center; font-size: .82rem; }
.chat-form { display: flex; gap: 8px; }
.chat-form input { flex: 1; }
.chat-form .btn-small { margin-top: 0; }
.chat-hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

/* Forms & modals */
input, select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  width: 100%;
}
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--muted); }
label input, label select, label textarea { margin-top: 4px; }
.form-row { display: flex; gap: 12px; }
.form-row label { flex: 1; }

.modal {
  border: none;
  border-radius: var(--radius);
  padding: 24px;
  width: min(480px, 92vw);
  box-shadow: 0 20px 60px rgba(15, 23, 42, .3);
}
.modal::backdrop { background: rgba(15, 23, 42, .45); }
.modal.modal-wide { width: min(620px, 94vw); }
.modal h3 { margin: 0 0 16px; }
.form-hint { font-size: 13px; color: var(--muted); margin: -8px 0 16px; }
.form-sep { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.segment {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px 2px;
  margin-bottom: 12px;
}
.segment legend { font-size: 12px; font-weight: 700; color: var(--muted); padding: 0 6px; }
.segment .remove-segment { position: absolute; top: 8px; right: 8px; }
input.iata { text-transform: uppercase; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Show in Chinese overlay */
/* The compact 中文 chip in the itinerary. When the button is also a .btn
   (the focus screen), the button styles win and set their own colors. */
.icon-btn.zh-btn { font-size: 13px; font-weight: 700; color: var(--text); }
.icon-btn.zh-btn:hover { background: var(--bg); }
.zh-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.zh-overlay[hidden] { display: none; }
/* Landscape: make it as big as possible to show a driver */
@media (orientation: landscape) {
  .zh-name { font-size: 15vw; }
  .zh-addr { font-size: 9vw; margin-top: 2vh; }
  .zh-hint { display: none; }
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state.small { padding: 30px 20px; background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.empty-emoji { font-size: 48px; margin-bottom: 8px; }

/* ---- Delete a trip from the grid ---- */
.trip-slot { position: relative; }
.trip-delete { position: absolute; top: 10px; right: 10px; z-index: 2; }
.trip-delete .icon-btn { opacity: .35; }
.trip-slot:hover .trip-delete .icon-btn { opacity: 1; }

/* ---- Agenda (day by day) ---- */
.agenda { max-width: 640px; margin: 0 auto; }
.agenda-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.agenda-when { text-align: center; }
.agenda-weekday { font-size: 1.35rem; font-weight: 800; text-transform: capitalize; }
.agenda-date { color: var(--muted); }
.agenda-jump { display: flex; gap: 8px; align-items: center; justify-content: center; margin-bottom: 18px; }
.btn.disabled { opacity: .3; pointer-events: none; }

.agenda-card {
  display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--border);
  border-radius: 12px; padding: 14px; margin-bottom: 10px;
}
.agenda-card:hover { border-color: var(--text); }
.agenda-time { font-weight: 700; min-width: 74px; font-variant-numeric: tabular-nums; }
.agenda-body { flex: 1; min-width: 0; }
.agenda-title { font-weight: 600; margin-bottom: 4px; }
.agenda-loc, .agenda-dir, .agenda-conf { font-size: .86rem; color: var(--muted); }
.agenda-dir { color: #0f766e; }
.agenda-go { color: var(--muted); font-size: 1.4rem; line-height: 1; }
.agenda-extra { margin-top: 18px; }
.agenda-extra summary { cursor: pointer; color: var(--muted); padding: 6px 0; }
.bell { font-size: .8rem; }

/* ---- Focus on one event ---- */
.focus { max-width: 640px; margin: 0 auto; }
.focus-when { color: var(--muted); margin-bottom: 6px; }
.focus-title { font-size: 1.7rem; line-height: 1.2; margin: 0 0 20px; }
.focus-block { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.focus-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.focus-loc { font-size: 1.05rem; }
.focus-zh { font-size: 1.5rem; font-weight: 700; margin-top: 6px; }
.focus-conf { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.focus-text { white-space: pre-wrap; line-height: 1.55; }
.focus-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.focus-nav { display: flex; gap: 8px; justify-content: space-between; margin-top: 20px; }

/* ---- Ingest review ---- */
.ingest-form textarea { width: 100%; margin: 8px 0; }
.ingest-summary { font-size: 1.05rem; }
.proposed { margin-bottom: 16px; }
.proposed-keep { display: flex; gap: 8px; align-items: center; font-weight: 600; margin-bottom: 10px; }
.alert { border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.alert-error { background: #fef2f2; color: var(--danger); }
.alert-warn { background: #fffbeb; color: #92400e; }
.alert ul { margin: 6px 0 0 18px; }
.inline-check { display: flex; gap: 8px; align-items: center; }
.small { font-size: .85rem; }

/* ---- Wallet: personal documents ---- */
.navlink { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; margin-right: auto; }
.navlink:hover { color: var(--text); }
.brand { margin-right: 16px; }

.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.doc-card {
  display: flex; gap: 14px; align-items: center; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--border);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.doc-card:hover { border-color: var(--text); }
.doc-icon { font-size: 30px; }
.doc-body { flex: 1; min-width: 0; }
.doc-label { font-weight: 700; }
.doc-kind, .doc-exp, .doc-trip { font-size: .84rem; color: var(--muted); }
.doc-count { font-size: .8rem; color: var(--muted); white-space: nowrap; }

.doc-preview { display: block; margin-bottom: 10px; }
.doc-preview img { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.doc-pdf { display: inline-block; padding: 14px; background: var(--bg); border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 600; }
.doc-file-actions { display: flex; gap: 8px; align-items: center; margin: 8px 0 16px; }
.doc-file-actions form { display: inline; }
.pdf-frame {
  width: 100%; height: 70vh; min-height: 420px; margin-bottom: 10px;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg);
}
.pdf-frame iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 700px) { .pdf-frame { height: 60vh; } }
.trip-doc-group { margin-bottom: 20px; }
.trip-doc-title { display: inline-block; font-weight: 700; text-decoration: none; color: var(--text); margin-bottom: 8px; }
.trip-doc-title:hover { color: var(--text); }
.doc-add summary { cursor: pointer; color: var(--text); font-weight: 600; font-size: .88rem; padding: 8px 0; }
.doc-add label { display: block; margin-bottom: 8px; }
.doc-add input, .doc-add select { width: 100%; }

/* ---- Subir un documento: un solo botón ---- */
.scan { margin: 20px 20px 0; }
.scan-boton { width: 100%; cursor: pointer; }
.scan-boton input[type=file] { display: none; }
.scan.scanning .scan-boton { opacity: .6; pointer-events: none; }

.review-block { border: 2px solid var(--text); }
.review-block label { display: block; margin-bottom: 10px; }
.review-block input, .review-block select, .review-block textarea { width: 100%; }
.conf-low { color: var(--danger); font-weight: 600; }
.conf-med { color: #b45309; font-weight: 600; }

/* ---- Items with a start and an end (car rental, hotel) ---- */
.focus-when-strong { font-weight: 700; margin-bottom: 6px; }
.focus-cost { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.item-end { color: #a16207; }
.item-cost { font-weight: 600; color: var(--text); }

/* Detail is collapsed by default: an itinerary is a list, not a document. */
.item-more summary {
  cursor: pointer; color: var(--text); font-size: 13px; font-weight: 600;
  padding: 4px 0; list-style: none;
}
.item-more summary::-webkit-details-marker { display: none; }
.item-more summary::before { content: '▸ '; }
.item-more[open] summary::before { content: '▾ '; }
.agenda-card.ending { border-style: dashed; }
.agenda-card.ending .agenda-title { color: #a16207; }

/* ---- Transport: be-there-by and transfer time ---- */
.suggested { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #b45309; background: #fef3c7; padding: 1px 6px; border-radius: 999px; }
.agenda-transfer, .item-transfer { color: #1d4ed8; font-size: .86rem; }

/* ============================================================
   Phone. This app is used standing in a station with one hand.
   ============================================================ */

/* Bottom tab bar: hidden on desktop, where the top bar is enough. */
.tabbar { display: none; }

@media (max-width: 760px) {
  .container { padding: 14px 12px 92px; }   /* room for the tab bar */
  .page-title { font-size: 22px; }

  /* Top bar: brand shrinks, the wallet link moves to the tab bar, and
     whatever is left scrolls sideways instead of wrapping into two rows. */
  .topbar { padding: 10px 12px; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .topbar::-webkit-scrollbar { display: none; }
  .brand { font-size: 17px; margin-right: auto; white-space: nowrap; }
  .navlink { display: none; }
  .topbar .btn { padding: 8px 12px; font-size: 13px; white-space: nowrap; }

  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tab {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600;
    padding: 6px 2px; border-radius: 10px; min-height: 44px; justify-content: center;
  }
  .tab span { font-size: 19px; line-height: 1; }
  .tab.on { color: var(--text); background: #eff6ff; }

  /* Itinerary rows: icon, time and actions share a line; the body gets the
     full width instead of being squeezed into a third of it. */
  .item {
    grid-template-columns: 30px auto 1fr;
    grid-template-areas: "icon time actions" "body body body";
    gap: 6px 8px; padding: 12px;
  }
  .item-icon { grid-area: icon; }
  .item-time { grid-area: time; }
  .item-body { grid-area: body; }
  .item-actions { grid-area: actions; justify-self: end; gap: 2px; }
  .item-actions .icon-btn { padding: 8px; min-width: 36px; }

  .day-header { padding: 10px 12px; }
  .trip-sub { gap: 8px; font-size: 14px; }

  /* Two-column layout stacks; panels stay full width. */
  .layout { gap: 14px; }
  .panel { padding: 14px; }

  /* Modals as bottom sheets: reachable with a thumb. */
  .modal {
    width: 100%; max-width: 100%; margin: auto auto 0; border-radius: 16px 16px 0 0;
    max-height: 92vh; padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  /* The action row floats over the scrolling form, so it needs its own ground
     and the form needs room to scroll clear of it. */
  .modal form { padding-bottom: 4px; }
  .modal-actions {
    position: sticky; bottom: 0; background: var(--surface);
    padding: 12px 0 4px; margin-top: 4px;
    border-top: 1px solid var(--border); box-shadow: 0 -8px 12px -8px rgba(15,23,42,.2);
  }
  .modal-actions .btn { flex: 1; padding: 12px; }

  /* 16px stops iOS from zooming the page when a field gets focus. */
  input, select, textarea { font-size: 16px; }
  .btn { min-height: 40px; }

  .focus-title { font-size: 1.45rem; }
  .agenda-time { min-width: 62px; font-size: .95rem; }
  .doc-grid, .trip-grid { grid-template-columns: 1fr; }
  .transfer-table th { font-size: .82rem; }
}

/* The row title is a link, but it is the row's heading first. */
.item-title a { color: inherit; text-decoration: none; }
.item-title a:hover { color: var(--text); }

@media (max-width: 760px) {
  .hide-mobile { display: none; }   /* the tab bar already goes there */
}

@media (max-width: 760px) {
  /* Day navigation stays put while the day scrolls under it. */
  .agenda-nav {
    position: sticky; top: 0; z-index: 20; background: var(--bg);
    padding: 8px 0 4px; margin-bottom: 0;
  }
  .agenda-weekday { font-size: 1.15rem; }
  .agenda-date { font-size: .85rem; }
  .agenda-jump { margin-bottom: 12px; }
  .agenda-jump input[type=date] { flex: 1; min-width: 0; padding: 8px; }
  .agenda-card { padding: 12px; gap: 10px; }
  .agenda-title { font-size: 1rem; }
}

/* ---- Shopping stops ---- */
.buy-list { list-style: none; padding: 0; margin: 0 0 12px; }
.buy-list li { display: flex; align-items: flex-start; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.buy-list li:last-child { border-bottom: none; }
.buy-list li.done .buy-text { text-decoration: line-through; color: var(--muted); }
.buy-list form { display: inline; }
.buy-text { flex: 1; line-height: 1.4; }
.buy-note { display: block; font-size: .84rem; color: var(--muted); }
.buy-row .inline-check input[name^="line_"] { flex: 1; }
.qty-input { max-width: 80px; }
.checklist-add { flex-wrap: wrap; }
.checklist-add input[name=text] { flex: 1 1 60%; min-width: 140px; }
.whoami { font-size: 12px; color: var(--muted); white-space: nowrap; padding-left: 8px; }
@media (max-width: 760px) { .whoami { display: none; } }

/* ---- Novedades: cambios propuestos sobre el itinerario ---- */
.sync-panel { border-color: #a5b4fc; }
.change { border-left: 4px solid var(--border); }
.change-create { border-left-color: var(--now-ink); }
.change-update { border-left-color: #d97706; }
.change-delete { border-left-color: var(--danger); background: #fffbfb; }
.change-head { gap: 10px; flex-wrap: wrap; }
.change-tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  padding: 2px 8px; border-radius: 999px;
}
.tag-create { background: #dcfce7; color: var(--now-ink); }
.tag-update { background: #fef3c7; color: #92400e; }
.tag-delete { background: #fee2e2; color: var(--danger); }
.change-reason { font-size: .9rem; color: var(--muted); margin: 10px 0; }
.change-warn { color: var(--danger); font-size: .9rem; font-weight: 600; }
.change-table { width: 100%; border-collapse: collapse; font-size: .88rem; margin-top: 8px; }
.change-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 6px 10px 6px 0; vertical-align: top; }
.change-table tr:first-child th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; }
.change-table td { padding: 6px 10px 6px 0; vertical-align: top; width: 42%; white-space: pre-wrap; }
.change-table .antes { color: var(--muted); text-decoration: line-through; }
.change-table .despues { font-weight: 600; }
@media (max-width: 760px) {
  .change-table td { width: auto; font-size: .84rem; }
}

/* ============================================================
   3c · Cuenta regresiva
   Oscuro cuando la app te dice qué hacer ahora.
   Claro cuando tú buscas algo.
   ============================================================ */

.eyebrow {
  font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow-now { color: var(--now-ink); }

.pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill); border: 0; cursor: pointer;
  font-size: 16px; font-weight: 600; text-decoration: none; padding: 17px 24px;
}
.pill-now { background: var(--now); color: var(--dark-bottom); }
.pill-dark { background: var(--text); color: #fff; }
.pill-linea { background: transparent; border: 1px solid var(--on-dark-line); color: var(--on-dark); }
.circulo {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.22); background: transparent;
  color: inherit; text-decoration: none; font-size: 13px; cursor: pointer;
}
.circulo-sm { width: 34px; height: 34px; font-size: 15px; }

/* ---- Pantalla oscura: hoy ---- */
body.dark-screen {
  background: linear-gradient(180deg, var(--dark-top) 0%, var(--dark-bottom) 100%);
  color: var(--on-dark); min-height: 100dvh;
}
body.dark-screen .topbar { display: none; }
body.dark-screen .container { max-width: 560px; padding: 0; }

.hoy { display: flex; flex-direction: column; min-height: 100dvh; }
.hoy-top {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px 0; font-size: 13px; color: var(--on-dark-dim);
}
.hoy-fecha { color: var(--on-dark-dim); text-decoration: none; }
.hoy-centro { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 24px; }
.hoy-label { font-size: 15px; color: var(--on-dark-dim); letter-spacing: .04em; margin: 0; }

.cuenta { display: flex; align-items: baseline; gap: 8px; }
.cuenta-num { font-size: 108px; font-weight: 200; letter-spacing: -.05em; line-height: 1; }
.cuenta-unidad { font-size: 26px; font-weight: 300; color: var(--on-dark-mut); }
.cuenta.urgente .cuenta-num { animation: latido 900ms ease-in-out; }
@keyframes latido { 0%,100% { opacity: 1 } 50% { opacity: .55 } }

.barra { height: 4px; border-radius: 999px; background: rgba(255,255,255,.1); margin: 26px 0 22px; }
.barra-relleno { height: 100%; border-radius: 999px; background: var(--now); width: 0; transition: width .4s linear; }
.barra.tarde .barra-relleno { background: var(--warn-dot); }

.hoy-destino { font-size: 26px; font-weight: 400; line-height: 1.25; margin: 8px 0 0; }
.hoy-zh { font-size: 20px; color: var(--on-dark-mut); margin: 8px 0 0; }
.hoy-datos {
  display: flex; gap: 18px; margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--on-dark-line);
}
.hoy-datos .eyebrow { color: var(--on-dark-dim); display: block; margin-bottom: 4px; }
.hoy-datos b { font-size: 20px; font-weight: 300; }

.hoy-acciones { display: flex; gap: 10px; padding: 0 24px 10px; }
.hoy-acciones .pill { flex: 1; }
.hoy-pie {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 14px 24px 8px; font-size: 13px; color: var(--on-dark-dim);
}
.hoy-luego { display: flex; flex-direction: column; gap: 4px; }
.hoy-luego a, .hoy-luego span { color: var(--on-dark-dim); text-decoration: none; }
.handle { width: 36px; height: 5px; border-radius: 999px; background: rgba(255,255,255,.25); }
.hoy-dias {
  display: flex; justify-content: space-between;
  padding: 6px 24px calc(18px + env(safe-area-inset-bottom));
  font-size: 13px;
}
.hoy-dias a { color: var(--on-dark-dim); text-decoration: none; }
.hoy-vacio .pill-linea { align-self: flex-start; margin-top: 22px; }

/* ---- 中文 a pantalla completa, ahora oscuro ---- */
.zh-overlay {
  position: fixed; inset: 0; z-index: 100; background: var(--dark-bottom);
  color: var(--on-dark); display: flex; flex-direction: column;
}
.zh-overlay[hidden] { display: none; }
.zh-top { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; }
.zh-top .eyebrow { color: var(--on-dark-dim); }
.zh-content {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  gap: 22px; padding: 24px; text-align: left;
}
/* El chino es lo más brillante de la pantalla: es lo que otra persona lee
   a un brazo de distancia, muchas veces con reflejo. */
.zh-name { font-size: 62px; font-weight: 400; line-height: 1.1; color: #fff; }
.zh-addr { font-size: 30px; font-weight: 300; line-height: 1.4; color: #fff; }
.zh-line { height: 1px; background: var(--on-dark-line); }

/* Lo que dice, para el dueño del teléfono. Legible, no un pie de página. */
.zh-verifica {
  padding: 18px 24px; border-top: 1px solid var(--on-dark-line);
  background: rgba(255, 255, 255, .04);
}
.zh-verifica .eyebrow { color: var(--on-dark-dim); }
.zh-orig {
  white-space: pre-line;
  font-size: 17px; line-height: 1.45; color: var(--on-dark);
  margin: 8px 0 0; font-weight: 400;
}
.zh-pie { display: flex; gap: 10px; padding: 0 24px calc(22px + env(safe-area-inset-bottom)); }
.zh-pie .pill { flex: 1; }
@media (orientation: landscape) {
  .zh-name { font-size: 12vw; }
  .zh-addr { font-size: 7vw; }
  .zh-top, .zh-pie { display: none; }
  /* En apaisado el bloque de verificación se encoge pero NO desaparece:
     es cuando el teléfono está dado vuelta hacia otra persona y más falta
     hace saber qué dice. */
  .zh-verifica { padding: 10px 24px; }
  .zh-orig { font-size: 14px; }
}

@media (hover: hover) {
  .pill-dark:hover { background: #233240; }
  .pill-now:hover { background: #5bd3a4; }
}
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--now-ink); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  .cuenta.urgente .cuenta-num { animation: none; }
  .barra-relleno { transition: none; }
}

/* ---- Pantalla clara: evento ---- */
.ev { max-width: 560px; margin: 0 auto;
  padding-bottom: calc(var(--alto-barra) + env(safe-area-inset-bottom) + 16px); }
.ev-top { display: flex; justify-content: space-between; padding: 20px 24px 12px; font-size: 14px; }
.ev-top a, .link-btn {
  color: var(--muted); text-decoration: none; background: none; border: 0;
  font: inherit; font-size: 14px; cursor: pointer; padding: 0;
}
.link-btn.acento { color: var(--now-ink); font-weight: 600; }
.ev-titulo { padding: 8px 24px 0; }
.ev-titulo h1 { font-size: 30px; font-weight: 400; letter-spacing: -.01em; line-height: 1.2; margin: 8px 0 0; }
.eyebrow-compra { color: var(--purchase); }
.eyebrow-warn { color: var(--warn); }

.card {
  background: var(--surface); border-radius: var(--r-card); padding: 22px;
  margin: 12px 20px 0; box-shadow: var(--shadow-card);
}
.card-hero { margin-top: 22px; box-shadow: var(--shadow-focus); }
.hero-num { font-size: 68px; font-weight: 200; letter-spacing: -.04em; margin: 6px 0 0; line-height: 1; }
.hero-nota { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
.tres {
  display: flex; gap: 22px; margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--hairline); flex-wrap: wrap;
}
.tres .eyebrow { display: block; margin-bottom: 4px; }
.tres b { font-size: 19px; font-weight: 300; }

.donde-zh { font-size: 25px; line-height: 1.35; margin: 8px 0 0; }
.donde-rom { font-size: 14px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.acciones { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.acciones .pill { flex: 1 1 0; min-width: 0; padding: 16px 14px; font-size: 15px; white-space: nowrap; }
.pill-linea-clara { background: transparent; border: 1px solid var(--border); color: var(--text); font-weight: 400; }

.card-datos { display: flex; gap: 24px; flex-wrap: wrap; padding: 18px 22px; }
.card-datos .eyebrow { display: block; margin-bottom: 4px; }
.mono { font-family: ui-monospace, "SF Mono", "IBM Plex Mono", monospace; font-size: 16px; font-weight: 400; }
.card-warn { background: var(--warn-wash); box-shadow: none; }
.warn-linea { font-size: 15px; color: #6b4e0a; line-height: 1.5; margin: 8px 0 0; }
.cuerpo { font-size: 15px; line-height: 1.55; white-space: pre-wrap; margin: 8px 0 0; }

.lista-top { display: flex; justify-content: space-between; align-items: baseline; }
.contador { font-family: ui-monospace, monospace; font-size: 16px; }
.contador .de { color: var(--placeholder); }
.lista { list-style: none; padding: 0; margin: 4px 0 0; }
.lista li { display: flex; gap: 14px; align-items: flex-start; padding-top: 18px; margin-top: 18px; border-top: 1px solid var(--hairline); }
.lista li:first-child { border-top: 0; margin-top: 0; }
.lista li.hecho .lista-texto { text-decoration: line-through; opacity: .5; }
.lista form { display: inline; }
.caja {
  width: 26px; height: 26px; flex: none; border: 1.5px solid #cfd9e2;
  border-radius: 8px; background: transparent; cursor: pointer; font-size: 14px;
}
.lista li.hecho .caja { background: var(--text); color: #fff; border-color: var(--text); }
.lista-texto { flex: 1; font-size: 17px; line-height: 1.4; }
.lista-nota { display: block; font-size: 14px; color: var(--muted); }
.quitar { color: var(--placeholder); }
.alta { display: flex; gap: 10px; margin-top: 18px; }
.alta input {
  flex: 1; background: var(--bg); border: 0; border-radius: var(--r-pill);
  padding: 14px 18px; font: inherit; font-size: 16px;
}
.circulo-dark {
  width: 46px; height: 46px; flex: none; border-radius: 50%; border: 0;
  background: var(--text); color: #fff; font-size: 22px; font-weight: 200; cursor: pointer;
}

.ev-aviso {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px 0; font-size: 14px;
}
.ev-error { color: var(--warn); font-size: 13px; padding: 8px 24px 0; }
.ev-nav { display: flex; gap: 10px; padding: 22px 20px 0; }
.ev-nav .pill { flex: 1; padding: 14px; font-size: 15px; }

/* Tab bar: tres pastillas de texto. El emoji era el icono; ahora es la palabra. */
@media (max-width: 760px) {
  .tabbar { gap: 6px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--surface-sunk); }
  .tab {
    flex: 1; flex-direction: row; font-size: 14px; font-weight: 400;
    color: var(--muted); border-radius: var(--r-pill); padding: 11px 8px; min-height: 0;
  }
  .tab.on { background: var(--surface); color: var(--text); font-weight: 600; }
}

/* ---- Mis viajes ---- */
.viajes { max-width: 560px; margin: 0 auto; }
.pagina-top { padding: 20px 24px 0; }
.pagina-top h1 { font-size: 32px; font-weight: 400; letter-spacing: -.02em; margin: 8px 0 0; }
.pagina-top .bajada { font-size: 14px; color: var(--muted); margin: 8px 0 0; }

.card-oscura {
  display: block; margin: 22px 20px 0; padding: 22px; border-radius: var(--r-card);
  background: linear-gradient(180deg, var(--dark-top) 0%, var(--dark-bottom) 100%);
  color: var(--on-dark); text-decoration: none;
}
.card-oscura h2 { font-size: 26px; font-weight: 400; margin: 10px 0 0; }
.eyebrow-en-curso { color: var(--now); display: flex; align-items: center; gap: 8px; }
.punto { width: 7px; height: 7px; border-radius: 50%; background: var(--now); display: inline-block; }
.destinos { font-size: 14px; color: var(--on-dark-mut); line-height: 1.5; margin: 6px 0 0; }
.oscura-datos {
  display: flex; gap: 24px; margin: 18px 0 0; padding-top: 16px;
  border-top: 1px solid var(--on-dark-line);
}
.oscura-datos .eyebrow { color: var(--on-dark-dim); display: block; margin-bottom: 4px; }
.oscura-datos b { font-size: 19px; font-weight: 300; }
.pill.ancho { width: 100%; margin-top: 18px; }

.fila-viaje { position: relative; }
.fila-viaje.pasado { opacity: .62; }
.fila-viaje .card { display: block; text-decoration: none; color: inherit; }
.fila-viaje h2 { font-size: 21px; font-weight: 400; margin: 8px 0 0; }
.fila-viaje .meta { font-size: 14px; color: var(--muted); margin: 6px 0 0; }
.borrar-viaje { position: absolute; top: 16px; right: 32px; }
.borrar-viaje button {
  background: none; border: 0; color: var(--placeholder); font-size: 15px; cursor: pointer; padding: 6px;
}
.viajes-pie {
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 20px calc(22px + env(safe-area-inset-bottom));
}
.viajes-pie .scan { width: 100%; }
.viajes-pie .scan-boton { width: 100%; justify-content: center; }
.vacio { padding: 40px 24px; text-align: center; color: var(--muted); }
.vacio .pill { margin-top: 16px; }

/* ---- Viaje completo: una columna, chips, el día como una tarjeta ---- */
.viaje { max-width: 560px; margin: 0 auto;
  padding-bottom: calc(var(--alto-barra) + env(safe-area-inset-bottom) + 16px); }
.viaje-nombre { font-size: 28px; font-weight: 400; margin: 0; }
.pagina-top .meta { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

.chips { display: flex; gap: 8px; padding: 18px 24px 0; flex-wrap: wrap; }
.chip {
  padding: 9px 16px; border-radius: var(--r-pill); font-size: 13px;
  text-decoration: none; background: var(--surface); color: var(--muted-strong);
}
.chip.on { background: var(--text); color: #fff; font-weight: 600; }

.dia { margin-top: 22px; }
.dia-cabecera { display: flex; align-items: center; gap: 12px; padding: 0 24px 8px; }
.dia-cabecera .regla { flex: 1; height: 1px; background: var(--border); }
.dia-mas { text-decoration: none; color: var(--muted); font-size: 18px; line-height: 1; }
.dia-hoy .eyebrow { color: var(--now-ink); }
.dia-hoy .regla { background: var(--now); }
.dia-hoy .dia-card { box-shadow: var(--shadow-focus); }
.dia-pasado .dia-card { opacity: .55; }
.dia-libre { padding: 0 24px; font-size: 14px; color: var(--placeholder); }
.dia-card { padding: 0; }

.fila {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 22px;
  text-decoration: none; color: inherit; border-top: 1px solid var(--hairline);
  min-height: 44px;
}
.fila:first-child { border-top: 0; }
.fila-hora {
  width: 62px; flex: none; font-family: ui-monospace, monospace; font-size: 13px;
  color: var(--muted); padding-top: 2px;
}
.fila-cuerpo { flex: 1; min-width: 0; }
.fila-cuerpo .eyebrow { display: block; margin-bottom: 3px; }
.fila-titulo { font-size: 16px; line-height: 1.35; }
.fila-extra { display: block; font-size: 13px; color: var(--now-ink); margin-top: 4px; }
.fila-activa { background: var(--now-wash); }
.fila-activa .fila-hora, .fila-activa .eyebrow { color: var(--now-ink); font-weight: 600; }
.fila-activa .fila-titulo { font-size: 17px; font-weight: 500; }

.viaje-acciones { padding: 22px 20px 0; }
.mas { margin: 22px 20px 0; }
.mas > summary {
  cursor: pointer; font-size: 14px; color: var(--muted-strong); font-weight: 600;
  padding: 12px 0; list-style: none;
}
.mas > summary::-webkit-details-marker { display: none; }
.mas > summary::before { content: '＋ '; }
.mas[open] > summary::before { content: '－ '; }
.mas .card { margin-left: 0; margin-right: 0; }
.form-col { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.form-col textarea, .form-col input[type=text], .form-col input:not([type]) {
  width: 100%; border: 1px solid var(--border); border-radius: var(--r-inner);
  padding: 12px 14px; font: inherit; font-size: 15px;
}
.nota-lateral { font-size: 13px; color: var(--muted); padding: 12px 24px 0; line-height: 1.5; }
.peligro { color: var(--warn); border-color: var(--warn); }
@media (max-width: 760px) {
  .fila-hora { width: 54px; }
}

/* ---- Documentos ---- */
.docs { max-width: 560px; margin: 0 auto;
  padding-bottom: calc(var(--alto-barra) + env(safe-area-inset-bottom) + 16px); }
.docs .card { margin-top: 20px; }
.punto-estado { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 18px; }
.punto-estado.vigente { background: var(--now); }
.punto-estado.pronto  { background: var(--warn-dot); }
.punto-estado.vencido { background: var(--warn); }
.punto-estado.mudo    { background: var(--border); }
.fila-warn { background: var(--warn-wash); }
.en-warn { color: var(--warn); }
.en-mudo { color: var(--muted); }

.scan { margin: 20px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.doc-titulo { font-size: 28px; font-weight: 400; line-height: 1.2; margin: 8px 0 0; padding: 0 24px; }
.mono.grande { font-size: 21px; }
.ingest-summary { font-size: 16px; padding: 0 24px; line-height: 1.5; }
.alert { border-radius: var(--r-card); padding: 16px 20px; margin: 16px 20px 0; font-size: 14px; line-height: 1.5; }
.alert-error { background: #fef2f2; color: var(--warn); }
.alert-warn { background: var(--warn-wash); color: #6b4e0a; }
.change-tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; padding: 3px 10px; border-radius: var(--r-pill); }
.tag-create { background: #dcfce7; color: var(--now-ink); }
.tag-update { background: #fef3c7; color: var(--warn); }
.tag-delete { background: #fee2e2; color: var(--warn); }
.change { border-left: 3px solid var(--border); }
.change-create { border-left-color: var(--now); }
.change-update { border-left-color: var(--warn-dot); }
.change-delete { border-left-color: var(--warn); background: var(--warn-wash); }

/* La barra de pestañas sobre fondo oscuro. Misma navegación, otro traje. */
body.dark-screen .tabbar {
  display: flex; position: static; background: transparent;
  border-top: 1px solid var(--on-dark-line);
  padding: 10px 20px calc(12px + env(safe-area-inset-bottom));
}
body.dark-screen .tab { color: var(--on-dark-dim); }
body.dark-screen .tab.on { background: rgba(255,255,255,.1); color: var(--on-dark); }
body.dark-screen .hoy { min-height: calc(100dvh - 74px); }
@media (min-width: 761px) {
  body.dark-screen .tabbar {
    display: flex; gap: 8px; max-width: 560px; margin: 0 auto;
  }
  body.dark-screen .tab {
    flex: 1; flex-direction: row; justify-content: center; text-decoration: none;
    font-size: 14px; padding: 11px 8px; border-radius: var(--r-pill);
  }
}
.ver-viaje { color: var(--on-dark-mut); text-decoration: none; font-size: 13px; white-space: nowrap; }
.oscura-acciones { display: flex; gap: 10px; margin-top: 18px; }
.oscura-acciones .pill { flex: 1; padding: 15px 12px; font-size: 15px; }
.card-oscura h2 a { color: inherit; text-decoration: none; }

/* ---- Hoja de preguntas ---- */
.hoja {
  width: 100%; max-width: 560px; border: 0; border-radius: 22px 22px 0 0;
  margin: auto auto 0; padding: 20px 20px calc(16px + env(safe-area-inset-bottom));
  max-height: 88vh; background: var(--surface); color: var(--text);
}
.hoja::backdrop { background: rgba(14, 23, 32, .55); }
.hoja-top { display: flex; justify-content: space-between; align-items: center; }
.hoja-sugerencias { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip-preg {
  border: 1px solid var(--border); background: var(--bg); color: var(--muted-strong);
  border-radius: var(--r-pill); padding: 10px 14px; font: inherit; font-size: 14px;
  cursor: pointer; text-align: left;
}
.chip-preg:hover { border-color: var(--text); color: var(--text); }
.hoja-log {
  display: flex; flex-direction: column; gap: 10px; margin-top: 16px;
  max-height: 46vh; overflow-y: auto;
}
.hoja-log:empty { display: none; }
.preg-user {
  align-self: flex-end; background: var(--text); color: #fff;
  padding: 10px 14px; border-radius: 16px 16px 4px 16px; font-size: 15px; max-width: 85%;
}
.preg-resp {
  background: var(--bg); padding: 14px 16px; border-radius: 16px 16px 16px 4px;
  font-size: 15px; line-height: 1.5; white-space: pre-wrap;
}
.preg-resp.pendiente { color: var(--muted); font-style: italic; }
.preg-resp.error { background: var(--warn-wash); color: var(--warn); }
.hoja-form { display: flex; gap: 10px; margin-top: 16px; }
.hoja-form input {
  flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-pill); padding: 14px 18px; font: inherit; font-size: 16px;
}
/* El botón «Preguntar» es una pestaña más: mismo tamaño, mismo peso. */
.tabbar .tab { border: 0; background: transparent; font: inherit; cursor: pointer; }

/* Elegir destino: tres opciones del mismo peso visual, una debajo de la otra,
   para que ninguna gane por tamaño. La recomendada gana solo por color. */
.destino { display: flex; flex-direction: column; gap: 10px; }
.destino-op {
  display: flex; flex-direction: column; gap: 4px; width: 100%;
  padding: 15px 16px; text-align: left; cursor: pointer;
  border: 0; border-radius: var(--r-card);
  background: var(--surface); color: var(--text);
  font: inherit; box-shadow: var(--shadow-card);
}
.destino-op:active { transform: scale(.995); }
.destino-op-fuerte {
  background: linear-gradient(var(--dark-top), var(--dark-bottom));
  color: var(--on-dark);
}
.destino-titulo { font-weight: 600; font-size: 1rem; }
.destino-nota { font-size: .85rem; color: var(--muted); line-height: 1.35; }
.destino-op-fuerte .destino-nota { color: var(--on-dark-mut); }

/* Mientras el servidor lee el documento: sin segundo toque, y se nota que trabaja. */
.trabajando { pointer-events: none; }
.trabajando button[type=submit] { opacity: .75; }

/* ---- Conversor: dos filas gemelas, la de abajo es el resultado ---- */
.conv { display: flex; flex-direction: column; gap: 8px; }
.conv-fila { display: flex; align-items: center; gap: 10px; }
.conv-monto {
  /* El monto manda: el selector se queda con su ancho y no crece. */
  flex: 1 1 auto; min-width: 0; width: 100%; display: block; box-sizing: border-box;
  font-size: 30px; font-weight: 600; letter-spacing: -.02em;
  border: 0; background: var(--surface-sunk); color: var(--text);
  border-radius: var(--r-inner); padding: 12px 14px; font-family: inherit;
  text-align: right; font-variant-numeric: tabular-nums;
}
.conv-fila > .conv-moneda { flex: 0 0 96px; }
.conv-monto:focus { outline: 2px solid var(--now-ink); outline-offset: 1px; }
.conv-resultado { background: transparent; color: var(--now-ink); }
.conv-moneda {
  border: 0; background: var(--surface-sunk); color: var(--muted-strong);
  border-radius: var(--r-pill); padding: 12px 14px; font: inherit; font-weight: 600;
}
.conv-swap {
  align-self: center; width: 36px; height: 36px; border: 0; cursor: pointer;
  border-radius: var(--r-pill); background: var(--surface-sunk);
  color: var(--muted-strong); font-size: 17px; line-height: 1;
}
.conv-tasa { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.conv-regla { list-style: none; margin: 0; padding: 0; }
.conv-regla li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-top: 1px solid var(--hairline);
  font-variant-numeric: tabular-nums;
}
.conv-regla li:first-child { border-top: 0; }
.conv-regla li span:first-child { color: var(--muted); }
.conv-regla li span:last-child { font-weight: 600; }

/* ---- Gente: la cara primero, que es lo que uno reconoce ---- */
.cara {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: var(--r-pill);
  object-fit: cover; background: var(--surface-sunk);
  font-weight: 600; color: var(--muted); font-size: 17px;
}
/* Ojo: `display:flex` sobre un <img> lo vuelve contenedor y deja de pintar la
   imagen. Centrar la inicial es cosa del marcador de posicion, no de la foto. */
img.cara { display: block; }
.cara-vacia { display: flex; align-items: center; justify-content: center; }
.cara-grande { width: 84px; height: 84px; font-size: 32px; flex-basis: 84px; }
.persona-fila { display: flex; align-items: center; gap: 12px; }
.apodo { color: var(--muted); font-weight: 400; }
.persona-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.persona-nombre { font-size: 24px; font-weight: 600; margin: 8px 0 0; }
.persona-apodo { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- Notas de visita ---- */
.nota-acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nota-acciones .pill { cursor: pointer; }
.dictando { background: var(--now); color: var(--text); border-color: transparent; }
.nota { padding: 14px 0; border-top: 1px solid var(--hairline); }
.nota-texto { white-space: pre-wrap; }
.nota-audio { width: 100%; margin-top: 10px; }
.nota-pie { display: flex; gap: 14px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.nota-crudo summary { font-size: 13px; color: var(--muted); cursor: pointer; }
.cara-logo { border-radius: var(--r-inner); object-fit: contain; background: #fff; }

/* La accion del momento: verde, ancha, arriba del itinerario. */
.pill-ahora {
  display: block; margin: 0 24px 4px; text-align: center;
  background: var(--now); color: var(--text); font-weight: 600;
}
.atajos { display: flex; gap: 8px; padding: 4px 24px 0; flex-wrap: wrap; }

/* La cara como boton: se ve que se puede tocar, sin gritar. */
.cara-boton { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.cara-pie { font-size: 12px; color: var(--muted); }
.cara-boton:active .cara { opacity: .7; }

/* Enlaces del programa compartido */
.enlace-url { word-break: break-all; font-size: 12px; }
.enlace-fila { align-items: flex-start; gap: 12px; }
.dia-nav { display: flex; justify-content: space-between; padding: 12px 24px; }

/* Interruptor de internet en el chat: apagado se ve como un borde, encendido
   como el verde de la app. Sin texto de estado: el color ya lo dice. */
.pill-buscar {
  flex: 0 0 auto; border: 1px solid var(--border); background: transparent;
  color: var(--muted); border-radius: var(--r-pill);
  padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.pill-buscar.on { background: var(--now); border-color: transparent; color: var(--text); }

/* En iOS, tocar una <img> dentro de un <label> NO abre el selector de archivos:
   el toque se lo queda la imagen. Por eso cambiar una foto existente no hacia
   nada mientras que ponerle una a quien no tenia si funcionaba: ahi el label
   envuelve texto. Dejando la cara sin eventos, el toque llega siempre al label. */
.cara-boton > * { pointer-events: none; }
.cara-boton img { -webkit-touch-callout: none; user-select: none; }

/* Quién tocó una ficha: se lee, no se grita. */
.firma { margin: 0 24px 6px; font-size: 12px; color: var(--muted); }
.fila-mas { color: var(--muted); font-size: 18px; align-self: center; }
.acciones-centro { display: flex; justify-content: center; padding: 4px 24px 8px; }

.fila-form { padding: 0; }
.fila-boton {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 20px; border: 0; background: transparent; cursor: pointer;
  font: inherit; color: inherit; text-align: left;
}
.fila-boton:active { background: var(--surface-sunk); }

/* ---- Portada de «búscate»: la explicación manda ---- */
.portada { padding: 28px 24px 18px; }
.portada-titulo {
  font-size: 32px; line-height: 1.1; font-weight: 600;
  letter-spacing: -.02em; margin: 8px 0 10px; color: var(--text);
}
.portada-bajada {
  margin: 0; font-size: 16px; line-height: 1.45; color: var(--muted-strong);
  max-width: 34ch;
}

/* ---- El día completo bajo la cuenta regresiva (pantalla oscura) ---- */
.hoy-dia {
  padding: 22px 24px calc(28px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--on-dark-line);
}
.hoy-dia-titulo {
  margin: 0 0 6px; font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--on-dark-dim);
}
.hoy-fila {
  display: flex; gap: 14px; align-items: flex-start; padding: 13px 0;
  border-bottom: 1px solid var(--on-dark-line); text-decoration: none;
  color: var(--on-dark);
}
.hoy-fila:last-of-type { border-bottom: 0; }
.hoy-hora {
  flex: 0 0 58px; font-family: var(--font-mono); font-size: 13px;
  color: var(--on-dark-mut); padding-top: 2px;
}
.hoy-fila-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hoy-fila-titulo { font-size: 15px; line-height: 1.3; }
.hoy-fila-lugar { font-size: 13px; color: var(--on-dark-dim); }
.hoy-fila .eyebrow { color: var(--on-dark-dim); }
/* Lo que ya pasó se apaga, no desaparece: ubica dónde vas en el día. */
.hoy-fila-pasada { opacity: .42; }
.hoy-fila-ahora .hoy-fila-titulo { font-weight: 600; }
.hoy-fila-ahora .eyebrow { color: var(--now); }
.punto-ahora {
  flex: 0 0 8px; width: 8px; height: 8px; margin-top: 6px;
  border-radius: 999px; background: var(--now);
}
.hoy-dia-vacio { color: var(--on-dark-dim); font-size: 14px; }
.hoy-dia .ver-viaje {
  display: inline-block; margin-top: 16px; color: var(--on-dark-mut);
  text-decoration: none; font-size: 14px;
}

/* ---- Ficha completa: se ve lo que hay y lo que falta ---- */
.campos { list-style: none; margin: 0; padding: 0; }
.campos li {
  display: flex; gap: 14px; align-items: baseline;
  padding: 10px 0; border-top: 1px solid var(--hairline);
}
.campos li:first-child { border-top: 0; }
.campo-label { flex: 0 0 84px; font-size: 13px; color: var(--muted); }
.campo-valor { flex: 1; min-width: 0; word-break: break-word; }
/* «falta» en ámbar: es un pendiente, no un error. */
.campo-falta {
  flex: 1; font-size: 13px; color: var(--warn);
  background: var(--warn-wash); border-radius: var(--r-pill);
  padding: 2px 10px; align-self: center;
}
.campo-extra { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--hairline); }

/* Ficha completa: cada campo en su fila, y lo que falta se ve. */
.campos { list-style: none; margin: 0; padding: 0; }
.campos li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 11px 0; border-top: 1px solid var(--hairline);
}
.campos li:first-child { border-top: 0; }
.campos span { color: var(--muted); font-size: 13px; flex: 0 0 auto; }
.campos b { font-weight: 600; text-align: right; word-break: break-word; }
.campos .falta {
  font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--warn);
  background: var(--warn-wash); padding: 3px 9px; border-radius: var(--r-pill);
}
.campos-nota { margin: 12px 0 0; }

/* La empresa va bajo el nombre: es lo segundo que se busca al leer una lista. */
.fila-empresa { color: var(--muted-strong); font-weight: 600; }

/* El avance, arriba pero discreto: una línea de 4 px y un pie de 12. Ocupa
   catorce píxeles de alto y no compite con el título. */
.avance { margin-top: 16px; max-width: 34ch; }
.avance-barra {
  height: 4px; border-radius: var(--r-pill);
  background: var(--surface-sunk); overflow: hidden;
}
.avance-barra i {
  display: block; height: 100%; background: var(--now);
  border-radius: var(--r-pill); transition: width .4s ease;
}
.avance-texto { margin: 7px 0 0; font-size: 12px; color: var(--muted); }

/* Un botón que ocupa el ancho del texto, sin desbordarse por los márgenes. */
.ancho-24 { display: block; margin: 4px 24px 10px; text-align: center; }

/* ---------- La cama que abre y cierra el día ----------
   Deliberadamente distinta de una fila de agenda: sin hora, sin tarjeta y sin
   flecha. No es una cita a la que hay que llegar, es dónde estás cuando el día
   empieza y cuando termina. */
.cama {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--surface-sunk);
  color: var(--muted);
}
.cama-manana { border-left: 3px solid #e0a33c; }
.cama-noche  { border-left: 3px solid #5b7fb0; }
.cama-icono { font-size: 15px; line-height: 1; opacity: .85; }
.cama-manana .cama-icono { color: #c9871f; }
.cama-noche  .cama-icono { color: #47679a; }
.cama-cuerpo { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cama-nombre {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cama-donde { font-size: 12px; color: var(--muted); }

/* Los 4 dígitos del login: campo corto, para que se vea que son cuatro. */
.clave-4 {
  max-width: 8ch;
  font-size: 22px;
  letter-spacing: .35em;
  text-align: center;
}

/* La agenda del día vive sobre fondo oscuro: la banda se adapta o desaparece. */
.hoy-dia .cama { background: rgba(255, 255, 255, .06); }
.hoy-dia .cama-nombre { color: var(--on-dark); }
.hoy-dia .cama-donde,
.hoy-dia .cama { color: var(--on-dark-mut); }
.hoy-dia .cama-manana .cama-icono { color: #e9b559; }
.hoy-dia .cama-noche  .cama-icono { color: #8fb0e0; }

/* ---------- Cuaderno de visitas ---------- */
.fila-vacia { opacity: .5; }
.tesis { font-size: 16px; line-height: 1.45; }
.card-lectura { border-left: 3px solid #2f7d5b; }

/* Las cifras se leen de un vistazo o no se leen: el dato grande, el contexto
   chico debajo. En prosa se pierden. */
.cifras { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px;
          grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.cifras li { display: flex; flex-direction: column; gap: 2px; }
.cifra-dato { font-size: 19px; font-weight: 650; color: var(--text); line-height: 1.15; }
.cifra-que { font-size: 12px; color: var(--muted); line-height: 1.35; }

.cita { margin: 12px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--border); }
.cita p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text); }
.cita cite { display: block; margin-top: 4px; font-size: 12px; font-style: normal;
             color: var(--muted); }

.lista-puntos { margin: 6px 0 0; padding-left: 18px; }
.lista-puntos li { font-size: 14px; line-height: 1.5; margin-bottom: 7px; color: var(--text); }

.punto { margin-top: 12px; }
.punto:first-of-type { margin-top: 4px; }
.punto-titulo { margin: 0 0 2px; font-size: 14px; font-weight: 650; color: var(--text); }

/* La banda de hotel como botón: el nombre solo no basta, lo que se busca a las
   once de la noche es la dirección y el teléfono. */
a.cama-boton { text-decoration: none; }
a.cama-boton:active { background: var(--border); }
.cama-cuerpo { flex: 1; }
.cama-mas { color: var(--muted); font-size: 18px; line-height: 1; }
.hoy-dia a.cama-boton:active { background: rgba(255, 255, 255, .12); }
.hoy-dia .cama-mas { color: var(--on-dark-dim); }

/* ============================================================
   La web de la gira: las mismas piezas en el teléfono y en el
   escritorio. La pantalla grande no es otro producto: es la misma
   gira con más espacio para mirar las fotos.
   ============================================================ */

[hidden] { display: none !important; }

/* La navegación del grupo: abajo en el teléfono (reglas de arriba), arriba y
   centrada en una pantalla grande. Es un solo elemento, no dos menús. */
@media (min-width: 761px) {
  body.eesl .tabbar {
    display: flex; justify-content: center; gap: 4px;
    position: sticky; top: 0; bottom: auto; left: auto; right: auto; z-index: 40;
    background: var(--surface); border-top: 0; border-bottom: 1px solid var(--border);
    padding: 8px 16px;
  }
  body.eesl .tab {
    flex: none; padding: 8px 20px; border-radius: var(--r-pill); min-height: 0;
    color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none;
  }
  body.eesl .tab:hover { color: var(--text); background: var(--surface-sunk); }
  body.eesl .tab.on { background: var(--text); color: #fff; }
  body.eesl.dark-screen .tabbar { background: var(--dark-top); border-bottom-color: var(--on-dark-line); }
  body.eesl.dark-screen .tab { color: var(--on-dark-dim); }
  body.eesl.dark-screen .tab.on { background: rgba(255, 255, 255, .14); color: var(--on-dark); }
}

/* Ancho de lectura y de galería. El resto de la app vive en 560 px porque es
   para el teléfono; la gira se mira sentado. */
.ancho {
  max-width: 1160px; margin: 0 auto;
  padding: 0 12px calc(var(--alto-barra) + env(safe-area-inset-bottom) + 24px);
}
@media (min-width: 761px) { .ancho { padding: 0 28px 56px; } }
.ancho .pagina-top { padding: 22px 8px 0; }
.ancho .pagina-top .bajada { max-width: 640px; }

/* ---- La gira, día por día ---- */
.gira-dias {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  padding: 16px 8px 8px; position: sticky; top: 0; z-index: 5; background: var(--bg);
}
.gira-dias::-webkit-scrollbar { display: none; }
@media (min-width: 761px) { .gira-dias { top: 53px; } }
.gira-dias a {
  flex: none; padding: 6px 12px; border-radius: var(--r-pill); background: var(--surface);
  color: var(--muted-strong); text-decoration: none; font-size: 13px; font-weight: 600;
  box-shadow: var(--shadow-card);
}
.gira-dias a:hover { color: var(--text); }
.gira-dia { scroll-margin-top: 120px; }
.gira-dia-titulo { font-size: 22px; font-weight: 400; margin: 26px 8px 12px; }
.gira-dia-titulo span { color: var(--muted); text-transform: capitalize; }
.gira-evento {
  display: flex; gap: 20px; align-items: center; margin: 0 0 10px; padding: 18px 20px;
  background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-card);
  color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s;
}
.gira-evento:hover { box-shadow: var(--shadow-focus); transform: translateY(-1px); }
.gira-evento-vacio { background: transparent; box-shadow: none; border: 1px dashed var(--border); }
.gira-evento-cuerpo { flex: 1; min-width: 0; }
.gira-evento-titulo { font-size: 18px; font-weight: 600; margin: 4px 0 0; }
.gira-evento-tesis { color: var(--muted-strong); margin: 6px 0 0; font-size: 15px; line-height: 1.45; max-width: 640px; }
.gira-evento-pie { display: flex; gap: 14px; flex-wrap: wrap; margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.marca-nota { color: var(--now-ink); font-weight: 600; }
.gira-evento-fotos { flex: none; position: relative; display: grid; grid-template-columns: repeat(4, 96px); gap: 4px; }
.gira-evento-fotos img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; display: block; }
.gira-mas {
  position: absolute; right: 4px; bottom: 4px; padding: 2px 7px; border-radius: 6px;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 600;
}
.gira-sueltos { margin: 4px 8px 14px; }
@media (max-width: 760px) {
  .gira-evento { flex-direction: column; align-items: stretch; gap: 12px; }
  .gira-evento-fotos { grid-template-columns: repeat(4, 1fr); }
  .gira-evento-fotos img { width: 100%; height: auto; aspect-ratio: 1; }
}

/* ---- La galería y su visor ---- */
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 12px; }
.galeria-item {
  position: relative; display: block; aspect-ratio: 1; overflow: hidden;
  border-radius: 10px; background: var(--surface-sunk);
}
.galeria-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.galeria-item:hover img { transform: scale(1.04); }
.galeria-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 24px; text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, .35));
}
.luz {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 12, 16, .94);
}
.luz-marco { display: flex; max-width: calc(100vw - 130px); max-height: calc(100dvh - 90px); }
.luz-marco img, .luz-marco video { max-width: 100%; max-height: calc(100dvh - 90px); border-radius: 6px; object-fit: contain; }
.luz-cerrar {
  position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .1); color: #fff; font-size: 18px; cursor: pointer;
}
.luz-flecha {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 72px;
  border: 0; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff;
  font-size: 34px; cursor: pointer;
}
.luz-flecha:hover, .luz-cerrar:hover { background: rgba(255, 255, 255, .18); }
.luz-antes { left: 14px; }
.luz-despues { right: 14px; }
.luz-pie { position: absolute; bottom: 16px; left: 0; right: 0; margin: 0; text-align: center; color: var(--on-dark-mut); font-size: 13px; }
@media (max-width: 760px) {
  .luz-marco { max-width: 100vw; }
  .luz-flecha { width: 40px; height: 56px; background: rgba(0, 0, 0, .35); }
}

/* ---- La página de un evento ---- */
.evento-web .ev-top { padding-left: 8px; padding-right: 8px; }
.evento-vecinos { display: flex; gap: 20px; }
.evento-vecinos a { color: var(--muted); text-decoration: none; font-size: 14px; }
.evento-vecinos a:hover { color: var(--text); }
.evento-web .card { margin-left: 0; margin-right: 0; }
/* En el teléfono las fotos van primero; en el escritorio, al lado de la lectura. */
.evento-cuerpo { display: flex; flex-direction: column-reverse; }
@media (min-width: 1000px) {
  .evento-cuerpo { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 24px; align-items: start; }
  .evento-lado { position: sticky; top: 64px; }
  .evento-lectura { max-width: 720px; }
}

/* ---- Subir ---- */
.subir { margin-top: 14px; }
.subir-zona {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 22px 16px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--border); border-radius: var(--r-inner);
  transition: border-color .15s, background .15s;
}
.subir-zona:hover, .subir-zona.encima { border-color: var(--now-ink); background: var(--now-wash); }
.subir-zona input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.subir-zona > span { pointer-events: none; }
.subir-titulo { font-weight: 600; }
.subir-bajada { font-size: 13px; color: var(--muted); max-width: 300px; }
.subir-lista { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.subir-lista li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; font-size: 13px; }
.subir-nombre { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subir-estado { color: var(--muted); }
.subir-lista .ok .subir-estado { color: var(--now-ink); }
.subir-lista .mal .subir-estado { color: var(--warn); }
.subir-barra { grid-column: 1 / -1; height: 4px; border-radius: 2px; overflow: hidden; background: var(--surface-sunk); }
.subir-barra i { display: block; width: 0; height: 100%; background: var(--now-ink); transition: width .2s; }

/* ---- El mapa ---- */
.mapa-web { display: flex; flex-direction: column; }
.mapa-lienzo { order: -1; height: 58vh; min-height: 320px; background: var(--surface-sunk); }
.mapa-lista { padding-bottom: calc(var(--alto-barra) + env(safe-area-inset-bottom) + 16px); }
@media (min-width: 761px) {
  .mapa-web { flex-direction: row; height: calc(100dvh - 106px); }
  .mapa-lienzo { flex: 1; height: auto; }
  .mapa-lista { width: 370px; flex: none; overflow-y: auto; padding-bottom: 24px; }
}
.mapa-lugares { list-style: none; margin: 10px 0 0; padding: 0 10px; }
.mapa-lugares-dia {
  padding: 14px 8px 6px; font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
.mapa-lugar {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 8px;
  border: 0; border-radius: 10px; background: none; color: inherit; font: inherit;
  text-align: left; cursor: pointer;
}
.mapa-lugar:hover, .mapa-lugar.on { background: var(--surface); }
.mapa-num {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; background: var(--text); color: #fff;
  font-size: 12px; font-weight: 700;
}
.mapa-lugar.sin-pin .mapa-num { background: var(--warn-dot); }
.mapa-lugar-cuerpo { display: flex; flex-direction: column; min-width: 0; }
.mapa-lugar-titulo { font-size: 14px; font-weight: 600; }
.mapa-lugar-extra { font-size: 12px; color: var(--muted); }
/* El pin lleva el mismo número que la lista: así se cruzan sin leer nombres. */
.pin-num {
  display: flex !important; align-items: center; justify-content: center;
  border: 2px solid #fff; border-radius: 50%; background: var(--text); color: #fff;
  font: 700 12px var(--font); box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.pin-num.aprox { background: var(--muted); }
.popup-lugar { width: 240px; font-family: var(--font); }
.popup-lugar img { display: block; width: 100%; height: 130px; object-fit: cover; border-radius: 8px; margin-bottom: 8px; }
.popup-lugar .eyebrow { display: block; }
.popup-lugar b { display: block; margin: 2px 0 4px; font-size: 15px; }
.popup-lugar p { margin: 0 0 8px; font-size: 13px; color: var(--muted-strong); }
.popup-lugar a { font-weight: 600; color: var(--now-ink); text-decoration: none; }

/* ---- Curar fotos (admin) ---- */
.admin-grilla { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 12px; }
.admin-medio { margin: 0; overflow: hidden; border-radius: 10px; background: var(--bg); }
.admin-medio img, .admin-sin-mini { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.admin-sin-mini { display: flex; align-items: center; justify-content: center; background: var(--surface-sunk); color: var(--muted); font-size: 12px; }
.admin-medio.oculto img { opacity: .3; filter: grayscale(1); }
.admin-medio figcaption { display: flex; flex-direction: column; gap: 4px; padding: 8px; font-size: 12px; }
.admin-dato { color: var(--muted); }
.admin-form select { width: 100%; font-size: 12px; }
.admin-acciones { display: flex; justify-content: space-between; }
.admin-acciones form { display: inline; }
.mapa-admin { height: calc(100dvh - 60px); }

/* ---- Mapa limpio: ciudades en español, recorrido y hoteles ---- */
/* El nombre se corre del centro de la ciudad, que es donde se amontonan los
   pines: un rótulo tapado no rotula nada. El corrimiento lo pone el span. */
.ciudad span { display: block; margin-top: -9px; }
.ciudad {
  white-space: nowrap;
  font: 600 15px var(--font); letter-spacing: .06em; text-transform: uppercase;
  color: #52697d; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 6px #fff;
  pointer-events: none;
}
.pin-num { border-radius: var(--r-pill) !important; }
.pin-hotel {
  border: 2px solid #fff; border-radius: 50%; background: #8a9bab;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.flecha-ruta { display: flex !important; align-items: center; justify-content: center; pointer-events: none; }
.flecha-ruta span { display: block; font-size: 11px; line-height: 1; color: #16222e; opacity: .7; }
.popup-sep { border: 0; border-top: 1px solid var(--hairline); margin: 10px 0; }
.mapa-lugar.es-hotel .mapa-num { width: 12px; height: 12px; margin: 6px; background: #8a9bab; }
.mapa-lugar.es-hotel .mapa-lugar-titulo { font-weight: 400; color: var(--muted-strong); }
.alert-ok { background: var(--now-wash); color: var(--now-ink); }
.acciones-contacto { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* ---- LinkedIn: el ícono de notificación y el llamado ----
   No es obligatorio, pero es lo que mantiene a la delegación en contacto. Se
   insiste con el mismo ícono en tres lugares: sobre la cara en la lista, en la
   leyenda de arriba y en el formulario, así se entiende sin explicarlo dos veces. */
.cara-marco { position: relative; flex: none; display: inline-flex; }
.aviso-li {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: #0a66c2; color: #fff; font: 700 10px/1 var(--font); letter-spacing: 0;
  box-shadow: 0 0 0 2px var(--surface);
}
.cara-marco .aviso-li { position: absolute; top: -3px; right: -5px; }
.aviso-li-grande { min-width: 30px; height: 30px; border-radius: 8px; font-size: 15px; box-shadow: none; flex: none; }
.llamado-li {
  display: flex; gap: 14px; align-items: flex-start;
  margin: 14px 20px 0; padding: 14px 16px; border-radius: var(--r-inner);
  background: #eaf3fc; border: 1px solid #b9d5f2;
}
.llamado-li-form { margin: 4px 0; }
.llamado-li-form input { margin-top: 10px; width: 100%; }
.llamado-li-titulo { margin: 0; font-weight: 700; color: #0a4a8c; }
.llamado-li-texto { margin: 4px 0 0; font-size: 14px; color: #274b6e; line-height: 1.45; }
.falta-li { display: inline-flex; align-items: center; gap: 6px; font-style: normal; color: #0a66c2; font-weight: 600; }

/* El día abierto se marca en la fila de días de la web. */
.gira-dias a.on { background: var(--text); color: #fff; }
