/* NORÐRA · tema único oscuro (manual de marca v1.0): obsidiana, basalto, nieve, ceniza, musgo, glaciar y lava.
   La interfaz sigue el concepto «app nativa»: cabecera y filtros flotando sobre el mapa, barra de pestañas con botón
   central de acción, hojas con asa y Mosi de pie sobre el mapa. */
:root {
  color-scheme: dark;
  --paper: #101110;
  --paper-2: #1c211f;
  --paper-3: #2a302d;
  --glass: rgb(20 23 21 / 78%);
  --ink: #f2ede4;
  --ink-2: #b7bdb7;
  --line: #343b37;
  --moss: #b9ca91;
  --moss-ink: #101110;
  --ember: #ff702e;
  --lava-ink: #101110;
  --warn-bg: #3c2f1a;
  --warn-ink: #f2d6a8;
  --ok-ink: #b9ca91;
  --gold: #e5bc4f;
  --glacier: #9ddfec;
  --shadow: 0 8px 28px rgb(0 0 0 / 55%);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Manrope", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--sans);
  --radius-control: 12px;
  --radius-card: 16px;
  --radius-sheet: 24px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 var(--sans);
  overscroll-behavior: none;
}
h1, h2, h3 { font-family: var(--sans); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--glacier); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--glacier); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.noscript { padding: 24px; }

#app { display: flex; flex-direction: column; height: 100dvh; padding-left: var(--safe-left); padding-right: var(--safe-right); }
#views { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
.view { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#view-map { overflow: hidden; }
#map { position: absolute; inset: 0; background: #151a21; z-index: 0; }
/* Mapa oscuro: los tonos claros de OSM se invierten y se enfrían, como el modo nocturno de un mapa nativo. */
.leaflet-tile-pane { filter: invert(1) hue-rotate(195deg) brightness(0.86) saturate(0.55) contrast(0.95); }
.leaflet-container { font: inherit; background: #151a21; }
.leaflet-control-attribution { font-size: 10px; background: rgb(16 17 16 / 70%) !important; color: var(--ink-2); border-radius: 6px 6px 0 0; }
.leaflet-control-attribution a { color: var(--ink-2); }
.leaflet-bottom.leaflet-left .leaflet-control-zoom { margin: 0 0 124px 10px; border: 0; box-shadow: var(--shadow); border-radius: 14px; overflow: hidden; }
/* Con «Ofertas cerca» hay un botón más en .map-tools (46 px + 8 de separación): el zoom sube para no quedar tapado. */
.has-offers .leaflet-bottom.leaflet-left .leaflet-control-zoom { margin-bottom: 186px; }
#btn-offers { color: var(--ember); }
.leaflet-touch .leaflet-bar a, .leaflet-bar a { width: 46px; height: 46px; line-height: 46px; font-size: 24px; background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--ink); border-color: var(--line); }
.leaflet-bar a.leaflet-disabled { background: var(--paper-3); color: var(--ink-2); }

/* ---- Cabecera flotante: marca, acciones, buscador y filtros ---- */
.map-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 700;
  display: flex; flex-direction: column; gap: 10px; padding: calc(var(--safe-top) + 10px) 12px 10px; pointer-events: none;
  background: linear-gradient(to bottom, rgb(16 17 16 / 88%) 0%, rgb(16 17 16 / 50%) 55%, rgb(16 17 16 / 0%) 100%);
}
.map-head > * { pointer-events: none; }
.head-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 0 1 auto; }
.brand-logo { flex: none; width: 30px; height: 30px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; gap: 2px; min-width: 0; }
.brand-mark { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.brand-sub { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 380px) { .brand-sub { display: none; } }
.head-right { display: flex; gap: 8px; align-items: center; pointer-events: auto; min-width: 0; flex: 0 1 auto; }
.round {
  flex: none; width: 46px; height: 46px; min-height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--ink); padding: 0; display: grid; place-items: center; cursor: pointer;
}
.round:active { transform: scale(0.95); }
.tab.tab-menu[aria-current="page"] { background: var(--ember); color: var(--lava-ink); border-color: var(--ember); }
.pill {
  min-height: 44px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  font-size: 13px; font-weight: 600; max-width: 40vw; min-width: 44px; flex: 0 3 auto; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lava-chip {
  flex: none; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--ember); font: 800 15px/1 var(--sans);
  font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
}
.lava-chip:active { transform: scale(0.95); }
/* Auroras: círculo con el Kp de esta noche y cortina animada sobre el mapa (ui/aurora-sky.js). */
.aurora-kp {
  --kp: #b9ca91; --kp-glow: rgb(185 202 145 / 40%);
  position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  background: var(--kp); color: var(--paper); box-shadow: 0 0 18px var(--kp-glow); font-family: var(--sans);
}
.aurora-kp[hidden] { display: none; }
.aurora-kp small { font-size: 9px; font-weight: 800; letter-spacing: 0.06em; }
.aurora-kp strong { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.aurora-kp[data-tone="medium"] { --kp: #7ef0a8; --kp-glow: rgb(126 240 168 / 50%); }
.aurora-kp[data-tone="high"] { --kp: var(--gold); --kp-glow: rgb(229 188 79 / 55%); }
.aurora-kp[data-tone="storm"] { --kp: #ff5fa2; --kp-glow: rgb(255 95 162 / 60%); }
.aurora-kp::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--kp); opacity: 0; }
.aurora-kp:active { transform: scale(0.95); }
@media (prefers-reduced-motion: no-preference) {
  .aurora-kp:not([data-cloudy])::after { animation: aurora-ring 2.4s ease-out infinite; }
}
/* Actividad alta con el cielo cubierto: el círculo se apaga y lleva una nube; sin cortina ni pulso. */
.aurora-kp[data-cloudy] { --kp: #8d989c; box-shadow: none; }
.aurora-kp-cloud {
  position: absolute; right: -5px; bottom: -3px; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #eef1f2; color: #5f6a6e; box-shadow: 0 1px 4px rgb(0 0 0 / 30%);
}
@keyframes aurora-ring { 0% { transform: scale(0.9); opacity: 0.8; } 100% { transform: scale(1.35); opacity: 0; } }
.aurora-sky {
  position: absolute; left: 0; right: 0; top: 0; width: 100%; height: calc(var(--safe-top) + 520px);
  z-index: 1; pointer-events: none;
}
.aurora-sky[hidden] { display: none; }
/* En un teléfono la cabecera lleva solo el logo, siempre: el círculo de auroras y la Lava llegan un
   momento después de abrir y, si el nombre dependiera de ellos, la cabecera saltaría al cargar.
   480px cubre todos los teléfonos en vertical, también los Pro Max (440px). */
@media (max-width: 480px) {
  .brand-text { display: none; }
  #sync-pill.quiet { display: none; }
  /* Con el círculo de auroras, «Iniciar sesión» se queda en el icono para que nada vaya apretado. */
  .head-row:has(.aurora-kp:not([hidden])) .pill:has(.pill-text) { width: 46px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
  .head-row:has(.aurora-kp:not([hidden])) .pill .pill-text { display: none; }
  .head-row:has(.aurora-kp:not([hidden])) .pill .pill-icon { display: inline-flex; }
}
/* Teléfonos muy estrechos con aurora y Lava a la vez: los botones se juntan. Solo si además hay un aviso
   de sincronización deja de caber el logo. */
@media (max-width: 359px) {
  .head-row:has(.aurora-kp:not([hidden])):has(.lava-chip:not([hidden])):has(#sync-pill:not(.quiet)) .brand { display: none; }
  .head-row:has(.aurora-kp:not([hidden])):has(.lava-chip:not([hidden])) .head-right { gap: 5px; }
}
.pill-icon { display: none; }
.pill-login { display: inline-flex; align-items: center; gap: 6px; background: var(--paper-2); }
.pill-login svg { flex: none; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.pill.good { color: var(--ok-ink); }

.dock { display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.dock > * { pointer-events: auto; }
.search { position: relative; }
.search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-2); display: grid; pointer-events: none; }
.search input {
  width: 100%; height: 50px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 0 16px 0 48px; font-size: 16px; color: var(--ink); appearance: none; -webkit-appearance: none;
}
.search input::placeholder { color: var(--ink-2); }
.chips { flex: none; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 2px 12px 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; color: var(--ink);
}
.chip svg { flex: none; }
.chip[aria-pressed="true"] { background: var(--ember); color: var(--lava-ink); border-color: var(--ember); }
.chip-sep { flex: none; width: 1px; background: var(--line); margin: 8px 2px; }
.swatch { color: var(--chip-color); }
.chip[aria-pressed="true"] .swatch { color: inherit; }
.filter-count { font-size: 13px; color: var(--ink-2); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.linkish { background: none; border: 0; padding: 8px 0; color: var(--glacier); font-weight: 600; text-decoration: underline; cursor: pointer; font-size: 14px; }

/* Fuera del mapa, la cabecera es un bloque opaco y las vistas se colocan debajo. */
#views[data-view]:not([data-view="map"]) .map-head { position: static; background: var(--paper); border-bottom: 1px solid var(--line); flex: none; }
#views[data-view]:not([data-view="map"]) .view { position: relative; inset: auto; flex: 1; min-height: 0; }
#views[data-view]:not([data-view="map"]) #btn-locate { display: none; }
#views[data-view="journal"] .dock, #views[data-view="community"] .dock, #views[data-view="aurora"] .dock { display: none; }

.map-hint {
  position: absolute; left: 12px; right: 12px; top: calc(var(--safe-top) + 200px); z-index: 500; background: var(--paper-2);
  border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 12px 14px; font-size: 14px; display: flex; gap: 10px; align-items: center;
  max-width: 520px; border: 1px solid var(--line);
}
.map-hint p { flex: 1; }
.map-hint-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.map-tools { position: absolute; left: 10px; bottom: 26px; display: flex; flex-direction: column; gap: 8px; z-index: 500; }
.tool {
  width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.tool.busy { opacity: 0.6; }

.pick-bar {
  position: absolute; left: 12px; right: 128px; bottom: 12px; z-index: 600; background: var(--paper-2); border-radius: var(--radius-card); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 12px; display: flex; flex-direction: column; gap: 10px; max-width: 480px;
}
.pick-bar .row { display: flex; gap: 8px; }
.pick-bar .row > * { flex: 1; }
.pick-bar .coords { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--ink-2); }

/* ---- Barra de pestañas con botón central ---- */
.tabs {
  display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; background: var(--paper); border-top: 1px solid var(--line);
  padding: 4px 8px var(--safe-bottom); position: relative;
}
.tab {
  min-height: 58px; padding: 0 2px; min-width: 0; background: none; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 12px; color: var(--ink-2); cursor: pointer; font-weight: 600; position: relative;
}
.tab[aria-current="page"] { color: var(--ember); }
.tab[aria-current="page"]::after { content: ''; position: absolute; bottom: 4px; width: 28px; height: 3px; border-radius: 2px; background: var(--ember); }
.tab-add { color: var(--ink-2); font-size: 0; }
.tab-add span {
  background: var(--ember); border-radius: 50%; width: 64px; height: 64px; display: grid; place-items: center; margin-top: -26px;
  box-shadow: 0 8px 22px rgb(255 112 46 / 40%); border: 4px solid var(--paper); color: var(--lava-ink);
}
.tab-add span svg { width: 30px; height: 30px; stroke-width: 2.4; }
.tab-add:active span { transform: scale(0.95); }
.tab-add[aria-current="page"]::after { display: none; }
/* En los teléfonos más estrechos, el botón central cede sitio para que quepan «Norðurljós» y «Samfélag». */
@media (max-width: 359px) {
  .tabs { grid-template-columns: 1fr 1fr 70px 1fr 1fr; padding-left: 4px; padding-right: 4px; }
  .tab { font-size: 11px; letter-spacing: -0.01em; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: var(--radius-control);
  border: 1px solid var(--line); background: var(--paper-2); font-weight: 600; cursor: pointer; text-decoration: none; color: var(--ink); text-align: center;
}
.btn:disabled { opacity: 0.55; cursor: default; }
.btn-primary { background: var(--ember); color: var(--lava-ink); border-color: var(--ember); }
.btn-danger { color: var(--ember); border-color: var(--ember); }
.btn-danger-solid { background: #a13c1a; color: #fff; border-color: #a13c1a; }
.btn-small { min-height: 44px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > * { flex: 1 1 140px; }

dialog { color: var(--ink); border: 0; padding: 0; }
dialog::backdrop { background: rgb(0 0 0 / 55%); }
.sheet {
  width: 100%; max-width: 560px; margin: auto auto var(--keyboard, 0px); max-height: max(280px, calc(min(92dvh, 900px) - var(--keyboard, 0px))); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; background: var(--paper-2);
  overflow: hidden; box-shadow: var(--shadow);
}
.sheet[open] { display: flex; flex-direction: column; }
.sheet::before { content: ''; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; flex: none; }
.sheet-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px 10px 18px; flex: none;
}
.sheet-head h2:focus { outline: none; }
.sheet-head h2 { flex: 1; font-size: 22px; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--paper-3); display: grid; place-items: center; cursor: pointer; flex: none; color: var(--ink); }
.sheet-body { padding: 6px 18px 16px; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 14px; -webkit-overflow-scrolling: touch; }
.sheet-foot { padding: 10px 18px calc(var(--safe-bottom) + 12px); border-top: 1px solid var(--line); display: flex; gap: 8px; flex: none; background: var(--paper-2); }
.sheet-foot > * { flex: 1; }

.field { display: flex; flex-direction: column; gap: 4px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 600; font-size: 14px; padding: 0; }
.field input[type="text"], .field input[type="date"], .field input[type="email"], .field input[type="password"], .field textarea, .field select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--paper); font-size: 16px; color: var(--ink);
}
.field textarea { min-height: 110px; resize: vertical; }
/* En iOS, el selector de fecha nativo impone su propio ancho y se sale del formulario. */
.field input[type="date"] { appearance: none; -webkit-appearance: none; display: block; min-width: 0; max-width: 100%; text-align: left; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.coords-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hint { font-size: 13px; color: var(--ink-2); }
.error { background: var(--warn-bg); color: var(--warn-ink); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.error ul { margin: 4px 0 0; padding-left: 18px; }

.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cat-option { position: relative; }
.cat-option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cat-option span {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 58px; justify-content: center; padding: 6px 2px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper); font-size: 12.5px; text-align: center;
}
.cat-option input:checked + span { background: var(--opt-color); color: #fff; border-color: var(--opt-color); font-weight: 700; }
.cat-option input:focus-visible + span { outline: 3px solid var(--glacier); outline-offset: 2px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg span { display: flex; min-height: 46px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.seg input:checked + span { background: var(--ember); color: var(--lava-ink); font-weight: 700; border-color: var(--ember); }
.seg input:focus-visible + span { outline: 3px solid var(--glacier); outline-offset: 2px; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 46px; font-weight: 600; }
.check-row input { width: 24px; height: 24px; accent-color: var(--ember); }

.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
.file-btn:focus-within { outline: 3px solid var(--glacier); outline-offset: 2px; }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--paper-3); border: 0; padding: 0; display: block; cursor: pointer; width: 100%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-wrap { position: relative; }
.thumb-remove {
  position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0;
}
.thumb-remove i { width: 26px; height: 26px; background: rgb(20 20 20 / 78%); color: #fff; border-radius: 50%; display: grid; place-items: center; }
.thumb-empty { display: grid; place-items: center; font-size: 12px; color: var(--ink-2); padding: 6px; text-align: center; height: 100%; }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; color: #fff; background: var(--badge, #55605a); }
.badge-out { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.meta-line { color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 17px; line-height: 1.5; }
.notes-empty { color: var(--ink-2); font-style: italic; }

.list-wrap { padding: 12px 12px 56px; max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-head h1 { font-size: 26px; }
.list-head select { min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper-2); padding: 0 8px; font-size: 15px; max-width: 48vw; color: var(--ink); }
.card {
  display: flex; gap: 12px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 10px; text-align: left; width: 100%; cursor: pointer; align-items: center;
}
.card-photo { width: 76px; height: 76px; flex: none; border-radius: 12px; object-fit: cover; background: var(--paper-3); display: grid; place-items: center; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.card-title { font: 700 17px/1.25 var(--sans); overflow-wrap: anywhere; display: flex; gap: 6px; align-items: baseline; }
.card-title svg { color: var(--gold); flex: none; align-self: center; }
.card-sub { font-size: 13px; color: var(--ink-2); }
.card-notes { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 36px 16px; color: var(--ink-2); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty h2 { color: var(--ink); }

.panel { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.panel h2 { font-size: 20px; }
.panel ol, .panel ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.notice { background: var(--warn-bg); color: var(--warn-ink); padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--paper); border-radius: 10px; padding: 8px; text-align: center; }
.stat strong { display: block; font: 700 20px var(--sans); }
.stat span { font-size: 12px; color: var(--ink-2); }
.stat-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stat-grid-4 .stat { padding: 8px 4px; }
.stat-grid-4 .stat span { overflow-wrap: anywhere; }
.pending-item { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.rev { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.rev strong { font-size: 16px; overflow-wrap: anywhere; }
.rev-notes { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); max-height: 7em; overflow: hidden; }
details summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.radio-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.radio-row input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ember); flex: none; }

.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; background: #000; }
.viewer[open] { display: block; }
.viewer-track:focus { outline: none; }
.viewer-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; }
.viewer-slide { flex: none; width: 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; color: #eee; }
.viewer-slide img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-close { position: absolute; top: calc(var(--safe-top) + 10px); right: 10px; background: rgb(255 255 255 / 92%); color: #111; }
.viewer-count { position: absolute; bottom: calc(var(--safe-bottom) + 14px); left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; pointer-events: none; }

.toasts { position: fixed; left: 12px; right: 12px; top: calc(var(--safe-top) + 10px); z-index: 2000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: 15px; max-width: 520px; pointer-events: auto; }
.toast.err { background: #8b2f10; color: #fff; }
.toast-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toast-actions > span:first-child { flex: 1 1 180px; }
.toast-buttons { display: flex; gap: 6px; }
.toast-btn { background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 14px; font-weight: 600; min-height: 36px; cursor: pointer; }
.toast-floating { position: fixed; left: 12px; right: 12px; top: calc(var(--safe-top) + 10px); margin: 0 auto; z-index: 10; }
.update-bar {
  position: fixed; left: 10px; right: 10px; bottom: calc(var(--safe-bottom) + 74px); z-index: 1500; background: var(--paper-2); border-radius: var(--radius-card); border: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 10px 12px; display: flex; align-items: center; gap: 10px; font-size: 14px; max-width: 520px; margin: 0 auto;
}
.update-bar span { flex: 1; }

.pin { position: relative; width: 38px; height: 48px; display: block; filter: drop-shadow(0 2px 3px rgb(0 0 0 / 55%)); }
.pin svg { display: block; }
.pin-icon { position: absolute; left: 8px; top: 7px; width: 22px; height: 22px; }
.pin-star { position: absolute; right: -3px; top: -3px; color: #e0ac17; }
.leaflet-marker-icon:focus-visible .pin { outline: 3px solid #fff; outline-offset: 1px; border-radius: 8px; }
.candidate { filter: drop-shadow(0 2px 4px rgb(0 0 0 / 45%)); }
/* Hotel con promociones (solo en la demostración local): logo redondo con punta y el número de promociones. */
.hotel-pin {
  position: relative; display: block; width: 52px; height: 52px; border-radius: 50%; background: #fbf8f1; border: 3px solid var(--ember);
  box-shadow: 0 3px 8px rgb(0 0 0 / 55%); cursor: pointer;
}
.hotel-pin::after {
  content: ''; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; background: #fbf8f1; border: 3px solid var(--ember);
  border-top: 0; border-left: 0; transform: translateX(-50%) rotate(45deg); border-radius: 0 0 3px 0;
}
.hotel-pin-logo { width: 100%; height: 100%; border-radius: 50%; object-fit: contain; padding: 4px; position: relative; z-index: 1; background: #fbf8f1; }
.hotel-pin-mono {
  position: relative; z-index: 1; display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; border-radius: 50%;
  background: #fbf8f1; color: #101110; font: 800 17px/1 var(--sans); letter-spacing: 0.02em;
}
.hotel-pin-count {
  position: absolute; z-index: 2; right: -8px; top: -6px; display: inline-flex; align-items: center; gap: 2px; padding: 2px 6px 2px 5px; border-radius: 999px;
  background: var(--ember); color: var(--lava-ink); font: 800 12px/1.2 var(--sans); box-shadow: 0 1px 4px rgb(0 0 0 / 40%);
}
.leaflet-marker-icon:focus-visible .hotel-pin { outline: 3px solid #fff; outline-offset: 2px; }
.hotel-promos-head { display: flex; align-items: center; gap: 12px; }
.hotel-promos-logo { flex: none; width: 64px; height: 64px; border-radius: 50%; object-fit: contain; background: #fbf8f1; border: 3px solid var(--ember); }
img.hotel-promos-logo { padding: 5px; }
.hotel-promos-head .hint { font-size: 15px; }
/* Promoción pagada: siempre a la vista en el pin y en la ficha. */
.hotel-pin-sponsored { border-color: var(--gold); }
.hotel-pin-sponsored::after { border-color: var(--gold); }
.hotel-pin-ad {
  position: absolute; z-index: 2; left: 50%; top: -20px; transform: translateX(-50%); padding: 1px 6px; border-radius: 999px; white-space: nowrap;
  background: #101110; border: 1px solid var(--gold); color: var(--gold); font: 700 10px/1.4 var(--sans); letter-spacing: 0.04em; text-transform: uppercase;
}
.sponsored-tag {
  align-self: flex-start; margin: 4px 0 0; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold);
  font: 700 12px/1.4 var(--sans); letter-spacing: 0.04em; text-transform: uppercase;
}
.hotel-promos-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hotel-promos-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--paper); }
.hotel-promos-list strong { display: block; font-size: 16px; line-height: 1.3; }
.offer-status { display: inline-block; align-self: flex-start; margin-top: 6px; font-size: 12px; font-weight: 700; line-height: 1.3; padding: 3px 9px; border-radius: 999px; border: 1px solid currentColor; }
.offer-status-verbal { color: var(--gold); }
.offer-status-confirmed { color: var(--ok-ink); }
.offer-status-proposal { color: var(--ink-2); border-style: dashed; }
.hotel-promos-list .hint { margin: 4px 0 0; }
.offers-item { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.offers-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.offers-item-text .hint { margin: 0; }
.offers-item-promo { color: var(--ember); font-weight: 600; }
.offers-item .sponsored-tag { flex: none; margin: 0; }
.hotel-promos-icon { flex: none; display: flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; background: var(--paper-3); color: var(--ember); }
.user-dot { fill: #4da3ff; stroke: #fff; }

@media (min-width: 720px) {
  .sheet { margin: auto; border-radius: var(--radius-sheet); }
  .tabs { grid-template-columns: 120px 120px 84px 120px 120px; justify-content: center; }
}
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: rise 0.22s cubic-bezier(.2,.8,.3,1); }
  @keyframes rise { from { transform: translateY(24px); opacity: 0.5; } to { transform: none; opacity: 1; } }
}

/* ---- Retos, concursos y Lava ---- */
.lava-head { display: flex; align-items: center; gap: 12px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 12px 14px; }
.lava-head .lava-amount { font: 800 28px/1 var(--sans); display: flex; align-items: center; gap: 6px; color: var(--ember); }
.lava-head .lava-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lava-head .lava-meta strong { overflow-wrap: anywhere; }
.ai-opinion { display: flex; flex-direction: column; gap: 4px; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-control); }
.ai-opinion:has(.ai-ask) { padding: 0; border: 0; }
.rank-bar { height: 6px; border-radius: 3px; background: var(--paper-3); overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--ember); }
.subtabs { flex: none; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px 2px; }
.subtabs::-webkit-scrollbar { display: none; }
.subtab { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper-2); cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--ink); }
.subtab[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.demo-banner { background: var(--warn-bg); color: var(--warn-ink); padding: 10px 12px; border-radius: 10px; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.demo-banner svg { flex: none; margin-top: 2px; }
.challenge { display: flex; gap: 12px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 12px; text-align: left; width: 100%; cursor: pointer; align-items: flex-start; color: var(--ink); }
.challenge-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; background: var(--ch-color, var(--moss)); }
.challenge-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.challenge-title { font: 700 17px/1.25 var(--sans); overflow-wrap: anywhere; }
.challenge-sub { font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.challenge-sub .lava { color: var(--ember); font-weight: 700; }
.challenge.done { border-color: var(--moss); }
.status-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--paper-3); }
.status-pill.approved { background: var(--moss); color: var(--moss-ink); }
.status-pill.pending { background: var(--warn-bg); color: var(--warn-ink); }
.status-pill.rejected { background: #a13c1a; color: #fff; }
.status-pill.queued { background: var(--paper-3); }
.safety { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 10px 12px; font-size: 14px; display: flex; gap: 8px; }
.safety svg { flex: none; margin-top: 2px; }
.proof-list { display: flex; flex-direction: column; gap: 8px; }
.proof { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.proof img, .proof .thumb-empty { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; background: var(--paper-3); }
.proof-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.proof-body .hint { overflow-wrap: anywhere; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.gallery figure { margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.gallery img, .gallery .thumb-empty { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: var(--paper-3); }
.gallery figcaption { overflow-wrap: anywhere; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.badge-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; font-size: 13px; background: var(--paper-2); }
.badge-card.locked { opacity: 0.45; }
.badge-card strong { font-size: 14px; }
.badge-card svg { color: var(--gold); }
.ledger { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ledger-row { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding: 6px 0; }
.ledger-row span:last-child { font-variant-numeric: tabular-nums; font-weight: 700; flex: none; }
.ledger-row .neg { color: var(--ember); }
.board-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.board-row .pos { width: 28px; font: 700 18px var(--sans); color: var(--ink-2); flex: none; text-align: center; }
.board-row .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.board-row .who span { font-size: 12px; color: var(--ink-2); }
.board-row.me { background: var(--paper-3); border-radius: 8px; padding: 8px; }
.board-row .pts { font-weight: 700; color: var(--ember); flex: none; }
.entry-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper-2); display: flex; flex-direction: column; }
.entry-card img, .entry-card .thumb-empty { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--paper-3); display: grid; place-items: center; }
.entry-card .entry-body { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.entry-card .entry-body strong { overflow-wrap: anywhere; }
.entry-actions { display: flex; gap: 6px; align-items: center; justify-content: space-between; }
.vote-btn[aria-pressed="true"] { background: var(--ember); color: var(--lava-ink); border-color: var(--ember); }
.mod-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: var(--paper-2); }
.mod-item img { width: 100%; max-height: 260px; object-fit: contain; border-radius: 8px; background: #000; }
.mod-facts { font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 2px; }
.mod-facts .bad { color: var(--ember); font-weight: 700; }
.mod-facts .good { color: var(--ok-ink); font-weight: 700; }
.countdown { font-size: 13px; color: var(--ink-2); }
.rules-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* ---- Mosi sobre el mapa ---- */
.mosi-slot { position: absolute; right: 6px; bottom: 8px; z-index: 500; display: flex; flex-direction: column; align-items: flex-end; gap: 0; pointer-events: none; }
.mosi-btn { width: 104px; height: 104px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; padding: 0; pointer-events: auto; filter: drop-shadow(0 10px 14px rgb(0 0 0 / 55%)); }
.mosi-btn:active .mosi-raster { transform: scale(0.95); }
.mosi-btn .mosi-raster { width: 104px; height: 104px; }
.mosi-raster { object-fit: contain; display: block; transform-origin: 50% 92%; }
.mosi-bubble {
  background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--ink); border: 1px solid var(--line); border-radius: 16px 16px 4px 16px;
  padding: 10px 14px; font-size: 15px; font-weight: 600; box-shadow: var(--shadow); max-width: 230px; pointer-events: auto; margin: 0 8px -4px 0; cursor: pointer; text-align: left;
}
.mosi-bubble small { display: block; font-weight: 500; font-size: 13px; color: var(--ink-2); }
.mosi-bubble.hidden { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .mosi-btn .mosi-raster { animation: mosi-idle 4.5s ease-in-out infinite; }
  .mosi-anim-wave .mosi-raster, .mosi-raster.mosi-anim-wave { animation: mosi-wave 1.1s ease-in-out; }
  .mosi-anim-bounce .mosi-raster, .mosi-raster.mosi-anim-bounce { animation: mosi-bounce 0.8s cubic-bezier(.3,1.4,.5,1); }
  .mosi-anim-nod .mosi-raster, .mosi-raster.mosi-anim-nod { animation: mosi-nod 0.9s ease-in-out; }
  .mosi-anim-think .mosi-raster, .mosi-raster.mosi-anim-think { animation: mosi-think 1.4s ease-in-out; }
  .mosi-bubble { animation: pop 0.25s cubic-bezier(.2,.9,.3,1.3); }
}
@keyframes mosi-idle { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.015, 0.99); } }
@keyframes mosi-wave { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(6deg); } }
@keyframes mosi-bounce { 0% { transform: scale(1); } 30% { transform: scale(1.18, .88) translateY(3px); } 60% { transform: scale(.94, 1.1) translateY(-8px); } 100% { transform: scale(1); } }
@keyframes mosi-nod { 0%, 100% { transform: rotate(0) translateY(0); } 30% { transform: rotate(-5deg) translateY(-2px); } 70% { transform: rotate(4deg) translateY(1px); } }
@keyframes mosi-think { 0%, 100% { transform: rotate(0); } 35% { transform: rotate(8deg) translateX(2px); } 70% { transform: rotate(6deg) translateX(2px); } }
@keyframes pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* ---- Panel de Mosi ---- */
.mosi-hero { display: flex; gap: 14px; align-items: center; }
.mosi-hero .mosi-raster { flex: none; width: 112px; height: 112px; }
.mosi-hero h3 { font-size: 26px; }
.mosi-hero p { color: var(--ink-2); font-size: 15px; }
.mosi-q { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
.mosi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mosi-card { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 12px; border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-align: left; cursor: pointer; font-weight: 600; font-size: 15px; line-height: 1.2; }
.mosi-card svg { flex: none; color: var(--ember); }
.mosi-card:active { transform: scale(0.98); }
.mosi-ask { display: flex; gap: 8px; align-items: center; }
.mosi-ask input { flex: 1; min-width: 0; height: 52px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); padding: 0 16px 0 44px; font-size: 16px; color: var(--ink); }
.mosi-ask .search-icon { left: 14px; }
.mosi-ask .ask-wrap { position: relative; flex: 1; }
.mosi-ask .send { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ember); color: var(--lava-ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.mosi-ask .send:disabled { opacity: 0.5; }
.mosi-actions { display: grid; gap: 8px; }
.mosi-actions .btn { justify-content: flex-start; }
.aurora-verdict { display: flex; gap: 12px; align-items: flex-start; border-radius: var(--radius-card); padding: 12px; border: 1px solid var(--line); background: var(--paper); }
.aurora-verdict strong { display: block; font: 700 18px/1.25 var(--sans); margin-bottom: 6px; }
.aurora-verdict.good { border-color: var(--moss); }
.aurora-verdict.none, .aurora-verdict.low { opacity: 0.95; }
.aurora-verdict.unknown { border-color: var(--gold); }
.cond-row { border-top: 1px solid var(--line); padding: 10px 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.cond-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.chat-log { display: flex; flex-direction: column; gap: 8px; max-height: 40dvh; overflow-y: auto; }
.chat-me { align-self: flex-end; background: var(--ember); color: var(--lava-ink); padding: 8px 12px; border-radius: 16px 16px 2px 16px; max-width: 85%; }
.chat-mosi { align-self: flex-start; background: var(--paper-3); padding: 8px 12px; border-radius: 16px 16px 16px 2px; max-width: 85%; white-space: pre-wrap; }
.chip-check { display: inline-flex; }
.chip-check input { margin: 0 6px 0 0; width: 20px; height: 20px; accent-color: var(--ember); }
.chips-wrap { flex-wrap: wrap; overflow: visible; }
.mosi-intro { display: flex; gap: 12px; align-items: center; }
.mosi-intro strong { display: block; font: 700 17px var(--sans); margin-bottom: 4px; }
.mosi-intro .mosi-raster { flex: none; }

/* ---- Islandés con Mosi ---- */
.phrase-list { display: flex; flex-direction: column; gap: 6px; }
.phrase { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: var(--paper); }
.phrase-body { flex: 1; min-width: 0; }
.phrase-is { font: 700 17px var(--sans); }
.phrase-es { font-size: 14px; color: var(--ink-2); }
.phrase-say { font-size: 13px; color: var(--glacier); font-style: italic; }
.phrase .icon-btn { background: var(--ember); color: var(--lava-ink); }
.phrase .icon-btn:disabled { background: var(--paper-3); color: var(--ink-2); }
.word-day { display: flex; gap: 12px; align-items: center; border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--paper); padding: 12px; }
.word-day .mosi-raster { flex: none; width: 64px; height: 64px; }
.word-day strong { font-size: 22px; display: block; }
.letters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; font-size: 13px; }
.letters div { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--paper); }
.letters b { font-size: 17px; display: block; }

/* ---- Reproductor de ruta ---- */
.route-bar { right: 128px; }
.route-vehicles { display: flex; gap: 6px; flex-wrap: wrap; }
.route-vehicles .chip { min-height: 40px; }
.vehicle { width: 40px; height: 40px; border-radius: 50%; background: var(--ember); color: #101110; display: grid; place-items: center; box-shadow: 0 2px 6px rgb(0 0 0 / 40%); border: 2px solid #101110; }

/* ---- Cerca de ti ---- */
/* A la izquierda quedan los botones del mapa y a la derecha Mosi: la tarjeta va entre ellos, sin el saludo. */
.nearby-card { top: auto; bottom: 12px; left: 64px; right: 112px; max-width: 420px; flex-direction: column; align-items: stretch; gap: 8px; }
.nearby-card:not([hidden]) ~ .mosi-slot .mosi-bubble { display: none; }
.nearby-head { display: flex; align-items: center; gap: 8px; }
.nearby-head strong { flex: 1; font: 700 17px var(--sans); }
.nearby-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.nearby-list li { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.nearby-list .linkish { flex: 1 1 60%; min-width: 0; min-height: 0; text-align: left; padding: 2px 0; }
.nearby-suggest { background: var(--warn-bg); color: var(--warn-ink); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.nearby-watch { min-height: 40px; font-size: 14px; font-weight: 500; }

/* ---- Comunidad: lugares compartidos ---- */
.pin-community { filter: drop-shadow(0 2px 3px rgb(0 0 0 / 55%)); }
.pin-community .pin-icon { color: var(--paper); }
.feed-card .card-photo, .feed-card .thumb-empty.card-photo { width: 76px; height: 76px; border-radius: 12px; object-fit: cover; }
.public-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--paper-3); display: block; }
.thumb-empty.public-photo { display: grid; place-items: center; }
.publish-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.publish-option { position: relative; cursor: pointer; }
.publish-option input { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; margin: 0; accent-color: var(--ember); z-index: 1; }
.publish-option:has(input:checked) { outline: 3px solid var(--glacier); outline-offset: 1px; }
.publish-option:focus-within { outline: 3px solid var(--glacier); outline-offset: 1px; }
.mod-item .mod-facts a { color: var(--glacier); display: inline-flex; align-items: center; gap: 4px; }
#my-public-places .proof img, #my-public-places .proof .thumb-empty { width: 64px; height: 64px; }
#places-feed, #my-public-places, #publish-picker { display: flex; flex-direction: column; gap: 10px; }

.mod-banner { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 8px 14px; border: 0; border-radius: var(--radius-control); background: var(--ember); color: var(--lava-ink); font-weight: 700; text-align: left; cursor: pointer; }

/* ---- Búsqueda de direcciones (formulario y mapa) ---- */
.geo-query { display: flex; gap: 8px; align-items: stretch; }
.geo-query input { flex: 1; min-width: 0; }
.geo-panel {
  display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: var(--radius-card); border: 1px solid var(--line); background: var(--paper-2); box-shadow: var(--shadow);
  max-height: 52dvh; overflow-y: auto;
}
.geo-panel[hidden], .geo-results[hidden] { display: none; }
.geo-results { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.geo-panel .geo-results { margin-top: 0; }
.geo-head { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.geo-status { font-size: 14px; outline: none; }
.geo-status.geo-error { background: var(--warn-bg); color: var(--warn-ink); padding: 10px 12px; border-radius: 10px; flex: 1; }
.geo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.geo-list:empty { display: none; }
.geo-result {
  width: 100%; min-height: 44px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper-3); color: var(--ink); font-size: 14px;
}
.geo-result span { font-size: 13px; color: var(--ink-2); overflow-wrap: anywhere; }
.geo-credit { margin-top: 6px; }
.geo-panel .geo-credit { margin-top: 0; }
.geo-credit a { color: var(--glacier); }

/* ---- Sugerencias del buscador (combobox) ---- */
.suggest-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.suggest-list:empty { display: none; }
.suggest-option { min-height: 44px; padding: 8px 12px; border-radius: 10px; display: flex; flex-direction: column; gap: 2px; cursor: pointer; font-size: 14px; border: 1px solid transparent; }
.suggest-option span { font-size: 13px; color: var(--ink-2); }
.suggest-option[aria-selected="true"] { background: var(--paper-3); border-color: var(--glacier); }
@media (hover: hover) { .suggest-option:hover { background: var(--paper-3); } }
.badge-extra { opacity: 0.85; }
.cat-option input:disabled + span { opacity: 0.35; cursor: not-allowed; }

/* ---- Comunidad: seguir perfiles y feed «Siguiendo» ---- */
.avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--moss); color: var(--moss-ink); font: 700 17px/1 var(--sans); }
.avatar-lg { width: 64px; height: 64px; font-size: 28px; }
.avatar-btn { background: none; border: 0; padding: 2px; border-radius: 50%; cursor: pointer; flex: none; min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.follow-item { display: flex; gap: 10px; align-items: flex-start; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 10px; }
.follow-item .card-photo, .follow-item .thumb-empty.card-photo { width: 64px; height: 64px; }
.follow-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; background: none; border: 0; padding: 0; text-align: left; color: inherit; cursor: pointer; font: inherit; min-height: 44px; }
.follow-line { font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.person-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.person-row:last-child { border-bottom: 0; }
.person-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; color: inherit; text-align: left; cursor: pointer; font: inherit; min-height: 44px; }
.person-open .who { display: flex; flex-direction: column; min-width: 0; }
.person-open .who strong { overflow-wrap: anywhere; }
.person-open .who span { font-size: 12px; color: var(--ink-2); }
.follow-btn { flex: none; }
.follow-btn[aria-pressed="true"] { background: var(--paper-3); color: var(--ink); }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-meta strong { font-size: 19px; overflow-wrap: anywhere; }
.profile-meta svg { color: var(--ember); vertical-align: -2px; }
.people-list summary { justify-content: space-between; }
.author-link { padding: 0; font-size: inherit; }

/* ---- Aurora (Norðurljós): respuesta primero, después el viaje del viento solar ---- */
.aurora-page { gap: 14px; }
.aur-hero {
  --hue: #7ef0a8; position: relative; overflow: hidden; border-radius: var(--radius-card); padding: 20px 18px 18px; border: 1px solid var(--line);
  background: linear-gradient(160deg, #0d1a1b 0%, #101110 70%);
}
.aur-hero::before {
  content: ''; position: absolute; inset: -40% -20% auto; height: 120%; pointer-events: none; opacity: 0.55; filter: blur(28px);
  background: radial-gradient(60% 40% at 30% 60%, var(--hue), transparent 70%), radial-gradient(40% 30% at 75% 40%, #6fd3ff, transparent 70%);
}
.aur-hero > * { position: relative; }
.aur-hero.tone-medium { --hue: var(--gold); }
.aur-hero.tone-low, .aur-hero.tone-none, .aur-hero.tone-unknown { --hue: #5c6a66; }
.aur-q { font-size: 14px; color: var(--ink); font-weight: 700; text-shadow: 0 1px 6px rgb(0 0 0 / 60%); }
.aur-answer { font: 800 30px/1.15 var(--sans); margin: 4px 0 8px; }
.aur-why { font-size: 15px; }
.aur-zone { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.aur-window { display: flex; gap: 6px; align-items: center; font-size: 15px; font-weight: 600; margin-top: 8px; }
.aur-reasons { margin-top: 10px; font-size: 14px; }
.aur-reasons summary { cursor: pointer; color: var(--ink-2); }
.aur-reasons ul { margin: 6px 0 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }
.aur-now { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-card); background: var(--paper-2); border: 1px solid var(--line); font-weight: 600; }
.aur-now svg { flex: none; color: var(--ink-2); }
.aur-now.door-open svg, .aur-now.door-wide svg { color: #7ef0a8; }
.aur-path { width: 100%; height: 128px; display: block; border-radius: 12px; background: radial-gradient(120% 90% at 0% 50%, rgb(255 140 60 / 14%), transparent 55%), #0b0d0c; }
.aur-path-labels { display: grid; grid-template-columns: 1fr auto 1fr; font-size: 12px; color: var(--ink-2); }
.aur-path-labels span:nth-child(2) { text-align: center; }
.aur-path-labels span:last-child { text-align: right; }
.aur-stations { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.aur-station {
  --lvl: 0.33; --c: var(--moss); display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; border-radius: var(--radius-card);
  background: var(--paper-2); border: 1px solid var(--line); min-width: 0;
}
.aur-station.lvl-mid { --lvl: 0.66; --c: var(--gold); }
.aur-station.lvl-high { --lvl: 1; --c: var(--ember); }
.aur-st-label { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.aur-st-value { font: 800 22px/1.1 var(--sans); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.aur-st-value small { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.aur-st-reading { font-size: 13px; font-weight: 700; color: var(--c); }
.aur-meter { height: 4px; border-radius: 2px; background: var(--paper-3); margin-top: 6px; overflow: hidden; }
.aur-meter span { display: block; height: 100%; width: calc(var(--lvl) * 100%); background: var(--c); }
.aur-door { grid-column: 1 / -1; --c: var(--ink-2); }
.aur-door .aur-st-value { font-size: 30px; }
.aur-door.door-ajar { --c: var(--gold); }
.aur-door.door-open, .aur-door.door-wide { --c: #7ef0a8; border-color: rgb(126 240 168 / 45%); }
.aur-spark { width: 100%; height: 56px; margin-top: 8px; }
.aur-zero { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.aur-line { fill: none; stroke: var(--c); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.aur-spark-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); }
.aur-bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; align-items: end; height: 120px; }
.aur-bar { --kp: #9aa39d; position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-radius: 6px; padding-bottom: 18px; }
.aur-bar.is-dark { background: rgb(111 211 255 / 12%); box-shadow: inset 0 3px 0 var(--glacier); }
.aur-bar.tone-medium { --kp: #7ef0a8; }
.aur-bar.tone-high { --kp: var(--gold); }
.aur-bar.tone-storm { --kp: #ff5fa2; }
.aur-bar-fill { width: 70%; max-height: calc(100% - 18px); border-radius: 4px 4px 0 0; background: var(--kp); }
.aur-bar-kp { position: absolute; top: 0; font-size: 11px; font-weight: 700; }
.aur-bar-time { position: absolute; bottom: 0; font-size: 10px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.aur-zones { list-style: none; padding: 0 !important; margin: 0; gap: 0 !important; }
.aur-zones li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.aur-zones li:first-child { border-top: 0; }
.aur-z-name { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.aur-z-sky { font-variant-numeric: tabular-nums; }
.aur-zones li.clear .aur-z-sky { color: #7ef0a8; font-weight: 700; }
.aur-zones li.cloudy .aur-z-sky { color: var(--ink-2); }
.aur-z-chance { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.aur-z-chance.oval-overhead, .aur-z-chance.oval-strong { color: var(--ok-ink); font-weight: 600; }
.aur-zones .aur-z-map { padding: 0 4px; min-height: 44px; }
.aur-night { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.aur-night > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: var(--radius-card); background: var(--paper-2); border: 1px solid var(--line); font-size: 14px; }
.aur-tip { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--radius-card); background: var(--paper-2); border: 1px solid var(--line); }
.aur-tip p { font-size: 15px; }
.aur-sources ul { list-style: none; padding: 0 !important; font-size: 13px; gap: 8px !important; }
@media (max-width: 359px) {
  .aur-stations { grid-template-columns: 1fr 1fr; }
  .aur-zones li { grid-template-columns: 1fr auto auto; row-gap: 0; }
  .aur-z-chance { grid-column: 1; grid-row: 2; }
  .aur-z-map { grid-row: 1 / span 2; grid-column: 3; }
}
@media (prefers-reduced-motion: no-preference) {
  .aur-hero::before { animation: aur-sway 14s ease-in-out infinite alternate; }
}
@keyframes aur-sway { from { transform: translateX(-6%) skewX(-6deg); } to { transform: translateX(6%) skewX(6deg); } }
