:root {
  --green: #0b6e4f;
  --orange: #ff6b00;
  --ink: #122018;
  --muted: #5a6b63;
  --card: #ffffff;
  font-family: "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; min-height: 100dvh; color: var(--ink); }
#app { height: 100%; min-height: 100dvh; position: relative; }
#map { position: absolute; inset: 0; z-index: 1; }
.leaflet-container { width: 100%; height: 100%; touch-action: none; cursor: grab; }

/* Lab en PC (localhost): marco tipo teléfono para probar la PWA móvil */
body.lab-desktop {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 30% 20%, #1a3d32 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, #0a2a22 0%, transparent 45%),
    #0d1f1a;
  overflow: auto;
}
body.lab-desktop #app {
  width: min(430px, 100vw);
  height: min(900px, 100dvh);
  min-height: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 0 0 3px #1e3a32,
    0 24px 64px rgba(0, 0, 0, 0.45);
  flex: 0 0 auto;
}
body.lab-desktop::before {
  content: "Lab local · http://localhost:4000";
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  font-size: 0.72rem;
  font-weight: 600;
  color: #9ec9b8;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.top, .actions {
  position: absolute;
  z-index: 500;
  width: min(400px, calc(100% - 20px));
  left: 50%;
  transform: translateX(-50%);
}

.top {
  top: calc(10px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  width: min(400px, calc(100% - 20px));
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 0;
  border-radius: 16px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.media {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.logo, .photo {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e2e8f0;
  flex: 0 0 48px;
}
.photo { object-fit: cover; background: #c4122f; border: 0; }

.top-copy { flex: 1; min-width: 0; }
.top h1 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.meta, .dist { margin: 2px 0 0; color: var(--muted); font-size: 0.72rem; }
.dist { white-space: normal; line-height: 1.25; }

.eta-box { flex: 0 0 auto; text-align: right; max-width: 48%; }
.eta {
  margin: 0;
  color: var(--green);
  font-weight: 800;
  font-size: 0.95rem;
  line-height: 1.2;
  word-break: break-word;
}
.advice {
  margin: 3px 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.25;
}
.advice:empty { display: none; }

.actions {
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: grid;
  gap: 8px;
}

.dest-block {
  display: grid;
  gap: 6px;
}
.dest-prompt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
}
.dest-block.needs-choice .dest-prompt {
  color: #b45309;
}
.dest-block.needs-choice .dirs .chip {
  border-color: #f59e0b;
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}
.dest-search-wrap {
  position: relative;
}
.dest-search {
  margin: 0;
}
.dest-or {
  margin: 2px 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
}
.dest-suggest {
  list-style: none;
  margin: 4px 0 0;
  padding: 4px;
  position: absolute;
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid #d5ddd8;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.dest-suggest-btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 10px 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.dest-suggest-btn:hover,
.dest-suggest-btn:focus {
  background: #e5f4ee;
}
.sheet-hint {
  margin: 0 0 4px;
  font-size: 0.72rem;
  color: var(--muted);
}
.stop-icon.dest .stop-pin {
  outline: 2px solid #ea580c;
  outline-offset: 1px;
}
.dest-badge {
  position: absolute;
  left: 50%;
  bottom: -2px;
  transform: translateX(-50%);
  background: #ea580c;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
}
.dirs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sheet-dirs { margin: 0 0 4px; }
.sheet-step {
  margin: 12px 0 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.sheet-step:first-of-type { margin-top: 8px; }
.chip {
  border: 1px solid #d5ddd8;
  background: #fff;
  border-radius: 10px;
  padding: 8px 6px;
  font-weight: 600;
  font-size: 0.78rem;
}
.chip.active { border-color: var(--green); background: #e5f4ee; color: var(--green); }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button.primary, button.ghost {
  border: 0;
  border-radius: 12px;
  min-height: 48px;
  font-weight: 700;
  font-size: 0.9rem;
}
button.primary { background: var(--orange); color: #fff; }
button.ghost { background: #fff; color: var(--ink); border: 1px solid #d5ddd8; }
button:disabled { opacity: 0.5; }

.lines {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 8px 0 0;
}
.chip.line-1 { border-color: #b7e4c7; color: #067a32; }
.chip.line-1.active { border-color: #08A441; background: #e8f8ef; color: #067a32; }
.chip.line-1a { border-color: #8fcfad; color: #008453; }
.chip.line-1a.active { border-color: #008453; background: #e6f4ec; color: #006b42; font-weight: 700; }
.chip.line-2 { border-color: #f5c2ce; color: #c41e3a; }
.chip.line-2.active { border-color: #E85A7A; background: #fde8ee; color: #E85A7A; }
.chip.line-2a { border-color: #e8a0a8; color: #9B111E; }
.chip.line-2a.active { border-color: #9B111E; background: #f8e6e8; color: #9B111E; font-weight: 700; }
.chip.line-3 { border-color: #a8d8ea; color: #0a7eab; }
.chip.line-3.active { border-color: #13A4DD; background: #e6f7fb; color: #0a7eab; }
.chip.line-4 { border-color: #f5d78e; color: #b87a00; }
.chip.line-4.active { border-color: #EFA300; background: #fff4e5; color: #b87a00; }
/* patrón v28 (snap Docker): pin con borde de línea + img al 100% */
.stop-icon { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.leaflet-div-icon.stop-icon {
  background: transparent !important;
  border: none !important;
}
.stop-pin {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  border-radius: 8px;
  background: #fff;
  border: 2px solid var(--stop, #DB4436);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.stop-pin img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  background: #fff;
  pointer-events: none;
}
.stop-icon.selected .stop-pin {
  outline: 2px solid #ff6b00;
  outline-offset: 1px;
}
.services { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 8px; }
.units { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 4px; }
.chip-rosa.active {
  background: #fce7f3;
  border-color: #db2777;
  color: #9d174d;
}
.rosa-hint {
  margin: 0 0 10px;
  color: #9d174d;
  font-size: 0.82rem;
  line-height: 1.35;
}
.station-search-wrap { display: block; margin: 0 0 10px; }
.station-search {
  width: 100%;
  border: 1px solid #d5ddd8;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  background: #f8faf9;
  color: var(--ink);
}
.station-search:focus {
  outline: 2px solid #0b6e4f;
  outline-offset: 1px;
  background: #fff;
}
.station-empty {
  margin: 12px 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 8px;
  background: #ffe4cc;
  color: #b44a00;
  font-size: 0.68rem;
  font-weight: 700;
}
.badge.rosa {
  background: #fce7f3;
  color: #9d174d;
}

.sheet {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 800;
  background: rgba(10, 20, 16, 0.4);
  cursor: pointer;
}
.sheet.open { display: block; }
.sheet-card {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, 100%);
  bottom: 0;
  max-height: 74%;
  overflow: auto;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  cursor: default;
}
.station-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  border: 0;
  background: #f4f7f5;
  margin: 6px 0;
  padding: 8px;
  border-radius: 12px;
}
.station-btn .logo, .station-btn .photo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid #e2e8f0;
  flex: 0 0 40px;
}
.station-btn .photo { object-fit: cover; background: #c4122f; }
.station-btn strong { display: block; }
.toast {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(260px, calc(100% - 128px));
  top: calc(var(--side-rail-top, 160px) - 52px);
  bottom: auto;
  z-index: 480;
  background: #1b1b1b;
  color: #fff;
  padding: 10px 12px;
  border-radius: 10px;
  display: none;
  font-size: 0.88rem;
  pointer-events: none;
}
.toast.show { display: block; }
.side-rail {
  position: absolute;
  z-index: 520;
  top: var(--side-rail-top, 160px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.side-rail--map {
  left: 10px;
  right: auto;
  align-items: flex-start;
}
.side-rail--tools {
  right: 10px;
  left: auto;
  align-items: flex-end;
}
.side-rail > * {
  pointer-events: auto;
  position: static !important;
  bottom: auto !important;
  right: auto !important;
  top: auto !important;
  left: auto !important;
}
.map-zoom,
.fit-network,
.map-style,
.locate {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.map-zoom {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}
.fit-network {
  color: #0f172a;
}
.live-toggle,
.presence-toggle {
  min-width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: #fff;
  color: #334155;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.22);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.7rem;
}
.live-toggle .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex: 0 0 auto;
}
.live-toggle.active {
  color: #fff;
  background: #0b6e4f;
}
.live-toggle.active .live-dot {
  background: #86efac;
  box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.35);
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.75; }
}
.presence-toggle .presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  flex: 0 0 auto;
}
.presence-toggle.active {
  color: #fff;
  background: #1d4ed8;
}
.presence-toggle.active .presence-dot {
  background: #93c5fd;
  box-shadow: 0 0 0 4px rgba(147, 197, 253, 0.35);
}
.live-panel {
  position: static;
  width: 100%;
  max-height: min(32vh, 220px);
  overflow: auto;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 14px;
  padding: 8px 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border: 1px solid #e2e8f0;
}
.live-panel[hidden] { display: none !important; }
.live-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.live-panel-head strong {
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 3px 8px;
}
.live-badge.hot {
  color: #065f46;
  background: #d1fae5;
}
.live-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}
.live-k {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
}
.live-v {
  margin: 2px 0 0;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
  word-break: break-word;
}
.cf-turnstile {
  position: fixed;
  z-index: 45;
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  /* Vacío si el widget es invisible; visible si Cloudflare pide un reto */
}
.weather-line {
  margin: 3px 0 0;
  font-size: 0.68rem;
  font-weight: 700;
  color: #0369a1;
  line-height: 1.25;
}
.weather-line.warn { color: #b45309; }
.weather-line.delay { color: #b91c1c; }

.dest-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 12px;
  padding: 8px 10px;
}
.dest-compact[hidden] { display: none !important; }
.dest-compact-text {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dest-compact-edit {
  border: 0;
  background: #e2e8f0;
  color: #334155;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.dest-full[hidden] { display: none !important; }

.live-grid-compact {
  gap: 6px 10px;
}

.mexi-wifi {
  margin: 0;
  padding: 6px 8px;
  background: rgba(248, 250, 252, 0.96);
  border-radius: 10px;
}
.mexi-wifi[hidden] { display: none !important; }
.mexi-wifi-summary {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.mexi-wifi-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}
.mexi-wifi-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.mexi-wifi-input {
  flex: 1;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
}
.mexi-wifi-clear {
  border: 0;
  background: #e2e8f0;
  color: #334155;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.72rem;
  font-weight: 700;
}
.mexi-wifi-hint {
  margin: 6px 0 0;
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.35;
}
.live-opinion {
  margin: 8px 0 0;
  padding: 6px 8px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: #334155;
  background: #f1f5f9;
  border-radius: 8px;
}
.live-note {
  margin: 8px 0 0;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.35;
}
body.live-on .actions {
  bottom: calc(14px + env(safe-area-inset-bottom));
  max-height: min(52vh, 420px);
  overflow: auto;
}
body.live-on .locate-cta {
  display: none !important;
}
body.live-on .live-note {
  margin-top: 6px;
  font-size: 0.65rem;
}
.eta-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 22px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #334155;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 1.5px solid #fff;
  line-height: 1;
}
.eta-badge.hot { background: #0b6e4f; }
.map-style {
  color: #334155;
}
.map-style.active {
  color: #0f172a;
  background: #f1f5f9;
  outline: 2px solid #94a3b8;
  outline-offset: 0;
}
.locate {
  color: #1d4ed8;
}
.locate.busy { opacity: 0.55; }
.locate.active { color: #0b6e4f; background: #e5f4ee; }
.locate.needs-geo {
  color: #fff;
  background: #1d4ed8;
  animation: locate-pulse 1.6s ease-in-out infinite;
}
@keyframes locate-pulse {
  0%, 100% { box-shadow: 0 2px 12px rgba(29, 78, 216, 0.35); }
  50% { box-shadow: 0 2px 18px rgba(29, 78, 216, 0.7); }
}
.locate-cta {
  width: 100%;
  border: 0;
  border-radius: 12px;
  min-height: 48px;
  font-weight: 800;
  font-size: 0.92rem;
  background: #1d4ed8;
  color: #fff;
  cursor: pointer;
}
.locate-cta[hidden] { display: none !important; }
.locate-cta.busy { opacity: 0.6; }
.leaflet-control-zoom { display: none !important; }
.leaflet-control-attribution { font-size: 10px; }

.app-version-root {
  position: absolute;
  z-index: 600;
  top: calc(10px + env(safe-area-inset-top));
  left: 10px;
}
.app-version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #d5ddd8;
  background: rgba(255, 255, 255, 0.95);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.68rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}
.app-version-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  flex: 0 0 auto;
}
.app-version-panel {
  margin-top: 8px;
  width: min(260px, calc(100vw - 24px));
  background: #122018;
  color: #e8f0ec;
  border: 1px solid #2a3d34;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.app-version-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}
.app-version-close {
  border: 0;
  background: transparent;
  color: #9db0a6;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}
.app-version-id {
  margin: 0 0 10px;
  color: #9db0a6;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.72rem;
}
.app-version-btn {
  width: 100%;
  border: 1px solid #2f6fed;
  background: transparent;
  color: #8eb6ff;
  border-radius: 10px;
  min-height: 40px;
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 6px;
  cursor: pointer;
}
.app-version-btn.ghost {
  border-color: #3a4f45;
  color: #c5d4cc;
}
.app-version-btn:disabled { opacity: 0.55; }
.app-version-msg {
  margin: 6px 0 0;
  font-size: 0.7rem;
  color: #86efac;
}
.app-version-msg.warn { color: #fbbf24; }
.app-version-hint {
  margin: 8px 0 0;
  font-size: 0.65rem;
  color: #6f857a;
  line-height: 1.35;
}
.update-banner {
  position: absolute;
  z-index: 950;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(220px + env(safe-area-inset-bottom));
  width: min(400px, calc(100% - 20px));
  display: flex;
  align-items: center;
  gap: 10px;
  background: #122018;
  color: #fff;
  border: 2px solid #2f6fed;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}
.update-banner[hidden] { display: none !important; }
.update-banner strong { display: block; color: #8eb6ff; font-size: 0.85rem; }
.update-banner p { margin: 2px 0 0; font-size: 0.72rem; color: #b7c7be; }
.update-banner .primary {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 12px;
  font-size: 0.78rem;
}

.support-ad {
  position: absolute;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(8, 18, 14, 0.72);
  backdrop-filter: blur(4px);
}
.support-ad[hidden] { display: none !important; }
.support-ad-card {
  position: relative;
  width: min(400px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 18px 16px 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}
.support-ad-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
}
.support-ad-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0b6e4f;
}
.support-ad-card h2 {
  margin: 6px 0 8px;
  font-size: 1.15rem;
  line-height: 1.25;
  color: var(--ink);
}
.support-ad-body {
  margin: 0 0 12px;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--muted);
}
.support-ad-slot {
  margin: 0 0 12px;
  min-height: 96px;
  border-radius: 12px;
  border: 1px dashed #94a3b8;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: grid;
  place-content: center;
  gap: 2px;
  text-align: center;
  padding: 12px;
}
.support-ad-slot-label {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.support-ad-slot-demo {
  margin: 0;
  font-size: 0.78rem;
  color: #475569;
}
.support-ad-card .primary,
.support-ad-card .ghost {
  width: 100%;
  margin-bottom: 8px;
}
.support-ad-fine {
  margin: 0;
  font-size: 0.72rem;
  color: #9a3412;
  text-align: center;
}
.support-ad-fine[hidden] { display: none !important; }

.support-banner {
  position: absolute;
  z-index: 510;
  left: 50%;
  transform: translateX(-50%);
  top: calc(96px + env(safe-area-inset-top));
  width: min(400px, calc(100% - 20px));
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(18, 32, 24, 0.92);
  color: #e8fff4;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  font-size: 0.72rem;
  line-height: 1.3;
}
.support-banner[hidden] { display: none !important; }
.support-banner p { margin: 0; flex: 1; min-width: 0; }
.support-banner-link {
  border: 0;
  background: transparent;
  color: #86efac;
  font-weight: 800;
  font-size: inherit;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.support-banner-x {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

@media (max-width: 639px) {
  .app-version-text { display: none; }
  .app-version-badge {
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  .app-version-dot { width: 10px; height: 10px; }
}

.account-btn {
  position: absolute;
  z-index: 530;
  left: auto;
  right: 10px;
  top: calc(10px + env(safe-area-inset-top));
  border: 0;
  border-radius: 999px;
  padding: 6px 10px;
  background: #122018;
  color: #e8fff4;
  font-weight: 700;
  font-size: 0.72rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}
.account-panel {
  position: absolute;
  z-index: 960;
  left: 50%;
  transform: translateX(-50%);
  top: calc(64px + env(safe-area-inset-top));
  width: min(400px, calc(100% - 20px));
  max-height: min(70vh, 560px);
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(11, 110, 79, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  padding: 12px;
}
.account-panel[hidden] { display: none !important; }
.account-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.account-hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.account-login { width: 100%; margin-bottom: 8px; }
.account-msg {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: var(--green);
}
.account-msg.err { color: #b42318; }
.account-user {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.account-user img {
  border-radius: 50%;
  object-fit: cover;
}
.account-name { margin: 0; font-weight: 700; }
.account-email { margin: 2px 0 0; font-size: 0.75rem; color: var(--muted); }
.account-balance {
  background: #f3faf6;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}
.pasaje-goal {
  margin: 0 0 10px;
  padding: 10px;
  background: #ecfdf5;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
}
.pasaje-goal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.pasaje-goal-amt {
  margin: 0;
  font-weight: 800;
  font-size: 0.85rem;
  color: #0b6e4f;
}
.pasaje-bar {
  margin: 8px 0 6px;
  height: 8px;
  border-radius: 999px;
  background: #d1fae5;
  overflow: hidden;
}
.pasaje-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: #0b6e4f;
  border-radius: 999px;
  transition: width 0.25s ease;
}
.pasaje-mission-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.pasaje-mission-list li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: #334155;
}
.pasaje-mission-list strong { font-weight: 700; }
.lab-only {
  margin-top: 8px !important;
  padding: 8px;
  background: #fff7ed;
  border-radius: 8px;
  color: #9a3412 !important;
  font-size: 0.68rem !important;
}
.account-ad-btn {
  width: 100%;
  margin-bottom: 4px;
}
.account-pending {
  margin: 4px 0 0;
  font-size: 0.72rem;
  color: #9a3412;
}
.account-missions { display: grid; gap: 8px; margin-bottom: 10px; }
.mission-card {
  border: 1px solid rgba(11, 110, 79, 0.14);
  border-radius: 12px;
  padding: 10px;
}
.mission-card p {
  margin: 4px 0 8px;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}
.mission-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.88rem;
}
.mission-claim { width: 100%; min-height: 40px; }
.account-mp {
  display: grid;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 650;
  margin-bottom: 8px;
}
.account-mp input {
  border: 1px solid rgba(11, 110, 79, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
}
.account-favorites { margin: 10px 0; }
.fav-list { display: grid; gap: 6px; margin: 6px 0 8px; }
.fav-row { display: flex; gap: 6px; align-items: center; }
.fav-row .fav-open { flex: 1; text-align: left; min-height: 36px; }
.fav-row .fav-del { flex: 0 0 36px; min-height: 36px; padding: 0; }

