/* =========================================================================
   BERLÍN_LOCO — mapa no oficial
   Paleta: negro, rosa, morado, gris. Tipografía: terminal y consola.
   ========================================================================= */

@font-face {
  font-family: 'VT323';
  src: url('/fonts/vt323-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('/fonts/space-mono-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('/fonts/space-mono-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #08070a;
  --bg-deep: #050406;
  --panel: #100d14;
  --panel-2: #16121c;
  --ink: #f2eef5;
  --gray: #9a939f;
  --gray-soft: #c4bec9;
  --gray-dark: #5d5664;
  --line: #2d2833;
  --patina: #46404e;
  --pink: #ff2e9a;
  --pink-soft: #ff83c6;
  --purple: #8b5cf6;
  --purple-deep: #581c87;
  --white: #f7f4fa;
  --c-fiesta: #ff2e9a;
  --c-mercados: #a6a2af;
  --c-comida: #ff82c8;
  --c-cultura: #8b5cf6;
  --c-otras: #e0dbe6;
  --c-casas: #6d28d9;
  --font-display: 'VT323', 'Courier New', monospace;
  --font-body: 'Space Mono', 'Courier New', monospace;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --hard-shadow: 3px 3px 0 rgba(139, 92, 246, .45);
  --pink-shadow: 3px 3px 0 rgba(255, 46, 154, .34);
}

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

html {
  height: 100%;
  background: var(--bg-deep);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  background-color: var(--bg-deep);
  background-image:
    linear-gradient(rgba(255, 255, 255, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
    radial-gradient(circle at 14% 12%, rgba(255, 46, 154, .12), transparent 28%),
    radial-gradient(circle at 89% 82%, rgba(139, 92, 246, .14), transparent 25%);
  background-size: 28px 28px, 28px 28px, auto, auto;
  overscroll-behavior: none;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}
button { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--pink); color: #08070a; }

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

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

.app-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100dvh;
  min-height: 500px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
  border: 0 solid var(--line);
  isolation: isolate;
}

@media (min-width: 700px) {
  body { padding: 18px 0; }
  .app-shell {
    height: calc(100dvh - 36px);
    min-height: 640px;
    border-width: 1px;
    box-shadow:
      0 0 0 1px #17131d,
      8px 8px 0 rgba(255, 46, 154, .15),
      -8px -8px 0 rgba(139, 92, 246, .1),
      0 32px 100px #000;
  }
}

/* =========================================================================
   Piezas básicas
   ========================================================================= */

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 400; }

.terminal-label {
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--pink);
}

.blink {
  display: inline-block;
  color: var(--pink);
  animation: blink 1.1s steps(1, end) infinite;
}
@keyframes blink { 0%, 48% { opacity: 1; } 49%, 100% { opacity: 0; } }

.scanlines {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: .5;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, .022) 3px,
    rgba(255, 255, 255, .022) 4px
  );
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 45px;
  padding: 10px 15px;
  border: 1px solid var(--gray-dark);
  border-radius: 0;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 rgba(139, 92, 246, .22);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover {
  border-color: var(--pink);
  background: #17121d;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 rgba(139, 92, 246, .35);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 rgba(139, 92, 246, .3);
}
.btn:disabled {
  cursor: not-allowed;
  opacity: .4;
  transform: none;
  box-shadow: 2px 2px 0 rgba(139, 92, 246, .12);
}
.btn--primary {
  border-color: var(--pink);
  background: var(--pink);
  color: #08070a;
  box-shadow: 4px 4px 0 var(--purple);
}
.btn--primary:hover { background: #ff4cab; border-color: var(--pink-soft); }
.btn--primary:disabled { background: #5e4351; border-color: #5e4351; color: #b9aeb5; box-shadow: none; }
.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--gray);
  box-shadow: none;
}
.btn--ghost:hover { border-color: var(--line); background: #121017; box-shadow: none; color: var(--ink); }
.btn--danger {
  border-color: var(--pink);
  background: #230b18;
  color: var(--pink-soft);
  box-shadow: 3px 3px 0 rgba(255, 46, 154, .18);
}
.btn--small { min-height: 38px; font-size: 10px; padding: 8px 10px; }
.btn--full { width: 100%; }
.btn .icon { width: 16px; height: 16px; stroke-width: 2; }
.btn__arrow {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1;
  transition: transform .16s ease;
}
.btn:not(:disabled):hover .btn__arrow { transform: translate(2px, -2px); }

.icon-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-dark);
  border-radius: 0;
  background: #0c0a0f;
  color: var(--gray-soft);
  cursor: pointer;
  transition: border-color .12s ease, color .12s ease, background .12s ease;
}
.icon-button:hover { border-color: var(--pink); color: var(--pink); background: #17101a; }
.icon-button .icon { width: 16px; height: 16px; stroke-width: 1.8; }

/* =========================================================================
   Entrada / terminal de bienvenida
   ========================================================================= */

.welcome {
  position: absolute;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  overscroll-behavior: contain;
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, rgba(255, 46, 154, .06) 1px, transparent 1px),
    linear-gradient(rgba(255, 46, 154, .04) 1px, transparent 1px),
    radial-gradient(circle at 96% 7%, rgba(139, 92, 246, .2), transparent 24%),
    radial-gradient(circle at 0% 48%, rgba(255, 46, 154, .09), transparent 26%);
  background-size: 42px 42px, 42px 42px, auto, auto;
  transition: opacity .24s ease, transform .3s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.welcome.is-leaving { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.welcome::-webkit-scrollbar { width: 5px; }
.welcome::-webkit-scrollbar-thumb { background: var(--line); }
.welcome__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 468px;
  min-height: 100%;
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) 18px calc(18px + var(--safe-bottom));
}

.sysbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--gray);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.sysbar__brand { color: var(--gray-soft); white-space: nowrap; }
.sysbar__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--pink);
  white-space: nowrap;
}
.status-dot {
  width: 5px;
  height: 5px;
  background: var(--pink);
  border-radius: 50%;
  box-shadow: 0 0 7px var(--pink);
  animation: blink 1.6s steps(1, end) infinite;
}

.welcome__hero {
  padding: 18px 0 10px;
}
.welcome__kicker {
  color: var(--pink);
  font-size: 10px;
  line-height: 1;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.welcome h1 {
  margin: 8px 0 6px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(86px, 27vw, 122px);
  font-weight: 400;
  line-height: .74;
  letter-spacing: .015em;
  text-transform: uppercase;
}
.welcome h1 .glitch {
  position: relative;
  display: inline-block;
  text-shadow: 3px 0 0 var(--pink), -3px 0 0 var(--purple);
}
.welcome h1 .glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  z-index: -1;
  color: var(--pink);
  transform: translate(2px, 1px);
  clip-path: polygon(0 63%, 100% 55%, 100% 70%, 0 78%);
  opacity: .7;
  animation: glitch-slice 6s steps(1, end) infinite;
}
@keyframes glitch-slice {
  0%, 91%, 100% { transform: translate(2px, 1px); }
  92% { transform: translate(-8px, 1px); }
  93% { transform: translate(5px, -2px); }
  94% { transform: translate(2px, 1px); }
}
.welcome h1 em {
  display: block;
  width: fit-content;
  margin-top: 8px;
  margin-left: 2px;
  padding: 1px 6px 3px;
  border: 1px solid var(--pink);
  background: #0e0a0e;
  color: var(--pink);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-style: normal;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .18em;
  text-transform: uppercase;
  transform: rotate(-1.3deg);
  box-shadow: 3px 3px 0 rgba(139, 92, 246, .35);
}
.welcome__intro {
  max-width: 350px;
  margin-top: 11px;
  color: var(--gray-soft);
  font-size: 13px;
  line-height: 1.55;
}

.photo-strip {
  display: grid;
  grid-template-columns: 1.06fr 1.3fr .94fr;
  align-items: start;
  gap: 7px;
  margin: 11px 0 10px;
}
.photo-card {
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--gray-dark);
  background: #0c0a0f;
  box-shadow: 2px 2px 0 rgba(255, 46, 154, .1);
}
.photo-card:nth-child(1) { transform: rotate(-2deg); }
.photo-card:nth-child(2) { transform: translateY(7px) rotate(1.1deg); }
.photo-card:nth-child(3) { transform: rotate(-.8deg); }
.photo-card--pink { border-color: var(--pink); }
.photo-card--purple { border-color: var(--purple); }
.photo-card--gray { border-color: var(--gray); }
.photo-card__img {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1.28 / 1;
  background: #17131c;
}
.photo-card:nth-child(2) .photo-card__img { aspect-ratio: 1.45 / 1; }
.photo-card__img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.22) brightness(.8);
}
.photo-card__img::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--pink);
  mix-blend-mode: color;
  opacity: .46;
}
.photo-card--purple .photo-card__img::after { background: var(--purple); opacity: .56; }
.photo-card--gray .photo-card__img::after { background: #aaa4b2; opacity: .3; }
.photo-card figcaption {
  overflow: hidden;
  margin-top: 3px;
  color: var(--gray);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: .015em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.boot-log {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 13px;
  padding: 6px 0;
  border-top: 1px dashed #3b3543;
  border-bottom: 1px dashed #3b3543;
  color: var(--gray);
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.welcome__picker {
  position: relative;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--pink);
  background: rgba(15, 12, 19, .92);
  box-shadow: 4px 4px 0 rgba(139, 92, 246, .16);
}
.welcome__picker::after {
  content: '';
  position: absolute;
  top: -1px;
  right: 16px;
  width: 42px;
  height: 3px;
  background: var(--pink);
}
.picker-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.step-code {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 29px;
  height: 23px;
  padding: 1px 4px;
  border: 1px solid var(--pink);
  background: var(--pink);
  color: #08070a;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}
.picker-heading h2 {
  margin: 1px 0 2px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 34px;
  line-height: .88;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.picker-heading p:not(.terminal-label) {
  color: var(--gray);
  font-size: 9.5px;
  line-height: 1.4;
}

.person-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.person-card {
  --person-color: var(--pink);
  position: relative;
  min-width: 0;
  min-height: 75px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3px;
  padding: 8px 9px 7px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #0c0a10;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(139, 92, 246, .1);
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease, transform .12s ease;
}
.person-card:hover {
  border-color: var(--person-color);
  background: #121018;
  transform: translate(-1px, -1px);
}
.person-card.is-selected {
  border-color: var(--person-color);
  background: #17121d;
  box-shadow: 3px 3px 0 var(--person-color);
  transform: translate(-1px, -1px);
}
.person-card.is-selected::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 2px;
  background: var(--person-color);
}
.person-card__top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.person-card__index {
  color: var(--person-color);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: .04em;
}
.person-card__check {
  color: var(--gray-dark);
  font-size: 9px;
  line-height: 1.2;
}
.person-card.is-selected .person-card__check { color: var(--person-color); }
.person-card__name {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--person-color);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-card__sub {
  display: block;
  width: 100%;
  overflow: hidden;
  color: var(--gray);
  font-size: 8.5px;
  line-height: 1.2;
  letter-spacing: .02em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.btn--enter { width: 100%; margin-top: 11px; min-height: 48px; font-size: 11px; }
.welcome__fineprint {
  margin-top: 10px;
  color: var(--gray);
  font-size: 9px;
  line-height: 1.5;
}
.welcome__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--gray-dark);
  font-size: 8px;
  letter-spacing: .04em;
}
.welcome__footer a {
  color: var(--gray);
  text-decoration: none;
  border-bottom: 1px dashed var(--gray-dark);
}
.welcome__footer a:hover { color: var(--pink); border-color: var(--pink); }

/* =========================================================================
   Mapa oscuro
   ========================================================================= */

.map-view {
  position: absolute;
  inset: 0;
  z-index: 10;
  overflow: hidden;
  background: var(--bg);
}
.map-view.is-entering { animation: map-enter .32s ease both; }
@keyframes map-enter { from { opacity: 0; } to { opacity: 1; } }

.map-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #0b090e;
  font-family: var(--font-body);
}
.map-canvas.is-placing { cursor: crosshair; }
.leaflet-container { background: #0b090e; outline: none; }
.leaflet-tile-pane {
  filter: grayscale(1) invert(.92) contrast(1.16) brightness(.82);
}
.leaflet-tile { background: #0b090e; }
.map-wash {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 7, 10, .94) 0, rgba(8, 7, 10, .45) 12%, rgba(8, 7, 10, 0) 24%),
    linear-gradient(0deg, rgba(8, 7, 10, .92) 0, rgba(8, 7, 10, 0) 26%),
    radial-gradient(ellipse at 50% 48%, transparent 38%, rgba(8, 7, 10, .34) 100%),
    linear-gradient(135deg, rgba(255, 46, 154, .04), rgba(139, 92, 246, .06));
}
.map-wash::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .35;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, .03) 3px,
    rgba(255, 255, 255, .03) 4px
  );
  mix-blend-mode: screen;
}

.leaflet-bottom.leaflet-right {
  bottom: auto !important;
  top: calc(104px + var(--safe-top));
  right: 5px;
  pointer-events: none;
}
.leaflet-control-attribution {
  pointer-events: auto;
  margin: 0 !important;
  padding: 1px 5px !important;
  border: 1px solid #36313c;
  border-radius: 0;
  background: rgba(8, 7, 10, .86) !important;
  color: var(--gray) !important;
  font-family: var(--font-body);
  font-size: 8px !important;
  line-height: 1.35;
  letter-spacing: .015em;
  box-shadow: 1px 1px 0 #000;
}
.leaflet-control-attribution a { color: var(--pink-soft) !important; text-decoration: none; }
.leaflet-control-attribution a:hover { text-decoration: underline; }

.topbar {
  position: absolute;
  top: calc(8px + var(--safe-top));
  left: 10px;
  right: 10px;
  z-index: 700;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}
.brand {
  position: relative;
  max-width: calc(100% - 74px);
  padding: 6px 9px 5px;
  border: 1px solid #4b4452;
  border-left: 3px solid var(--pink);
  background: rgba(8, 7, 10, .92);
  box-shadow: 3px 3px 0 rgba(139, 92, 246, .26);
  transform: rotate(-.35deg);
  pointer-events: auto;
}
.brand__kicker {
  display: block;
  color: var(--gray);
  font-size: 8px;
  line-height: 1.35;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.brand__title {
  display: block;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 28px;
  line-height: .82;
  letter-spacing: .015em;
  text-transform: uppercase;
}
.brand__title span { color: var(--pink); }

.avatar-button {
  min-width: 55px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
}
.avatar {
  --person-color: var(--pink);
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  position: relative;
  border: 1px solid var(--person-color);
  border-radius: 0;
  background: #0b090e;
  color: var(--person-color);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  box-shadow: 2px 2px 0 var(--person-color);
  transition: transform .12s ease;
}
.avatar::after {
  content: '';
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 6px;
  height: 6px;
  background: var(--person-color);
}
.avatar-button:hover .avatar { transform: translate(-1px, -1px); }
.avatar-button__hint {
  max-width: 62px;
  overflow: hidden;
  padding: 1px 4px;
  border: 1px solid var(--line);
  background: #08070a;
  color: var(--gray-soft);
  font-size: 8px;
  line-height: 1.4;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
  transform: rotate(1deg);
}
.avatar--sm {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-width: 1px;
  box-shadow: 1px 1px 0 var(--person-color);
  font-size: 15px;
}
.avatar--sm::after { display: none; }

.filters-wrap {
  position: absolute;
  top: calc(67px + var(--safe-top));
  left: 0;
  right: 0;
  z-index: 680;
  pointer-events: none;
}
.filter-rail {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 2px 10px 5px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  pointer-events: auto;
  -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
  mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
}
.filter-rail::-webkit-scrollbar { display: none; }
.filter-chip {
  flex: 0 0 auto;
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border: 1px solid #3b3543;
  border-radius: 0;
  background: rgba(8, 7, 10, .92);
  color: var(--gray-soft);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: .05em;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.filter-chip:hover { border-color: var(--pink); color: var(--ink); }
.filter-chip__icon {
  width: 14px;
  height: 14px;
  display: grid;
  place-items: center;
  color: var(--gray-soft);
}
.filter-chip__icon .icon { width: 14px; height: 14px; stroke-width: 2; }
.filter-chip__label { text-transform: uppercase; }
.filter-chip__count {
  color: var(--gray);
  font-size: 8.5px;
  line-height: 1;
}
.filter-chip__count::before { content: '['; }
.filter-chip__count::after { content: ']'; }
.filter-chip.is-active {
  border-color: var(--white);
  background: var(--white);
  color: #08070a;
  box-shadow: 2px 2px 0 rgba(139, 92, 246, .42);
}
.filter-chip.is-active .filter-chip__icon,
.filter-chip.is-active .filter-chip__label,
.filter-chip.is-active .filter-chip__count { color: #08070a; }
.filter-chip.is-active .filter-chip__count { opacity: .62; }

.map-side-tools {
  position: absolute;
  right: 10px;
  bottom: calc(83px + var(--safe-bottom));
  z-index: 660;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid #4b4452;
  border-radius: 0;
  background: rgba(8, 7, 10, .94);
  box-shadow: 2px 2px 0 rgba(139, 92, 246, .28);
  overflow: hidden;
  transition: opacity .15s ease;
}
.map-tool {
  width: 38px;
  height: 37px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--gray-soft);
  cursor: pointer;
}
.map-tool:hover { background: var(--pink); color: #08070a; }
.map-tool:active { background: var(--pink-soft); }
.map-tool .icon { width: 16px; height: 16px; stroke-width: 2; }
.map-tool__divider { width: 22px; height: 1px; background: var(--line); }

.map-actions {
  position: absolute;
  left: 50%;
  bottom: calc(11px + var(--safe-bottom));
  z-index: 720;
  width: min(calc(100% - 20px), 396px);
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  gap: 7px;
  transition: opacity .15s ease, transform .15s ease;
}
.add-button {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 11px 0 8px;
  border: 1px solid var(--pink);
  border-radius: 0;
  background: var(--pink);
  color: #08070a;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--purple);
  transition: transform .12s ease, box-shadow .12s ease, opacity .15s ease;
}
.add-button:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--purple); }
.add-button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--purple); }
.search-map-button {
  flex: 0 0 86px;
  height: 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0 5px;
  border: 1px solid var(--pink);
  border-radius: 0;
  background: #0a080d;
  color: var(--pink);
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--purple);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, color .12s ease;
}
.search-map-button .icon { width: 20px; height: 20px; stroke-width: 2.2; }
.search-map-button:hover { transform: translate(-1px, -1px); background: var(--pink); color: #08070a; box-shadow: 5px 5px 0 var(--purple); }
.search-map-button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--purple); }
.add-button__plus {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  display: grid;
  place-items: center;
  border: 1px solid #08070a;
  background: #08070a;
  color: var(--pink);
}
.add-button__plus .icon { width: 18px; height: 18px; stroke-width: 2; }
.add-button__hint {
  margin-left: auto;
  color: rgba(8, 7, 10, .58);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: .02em;
}
.map-view.sheet-open .map-actions,
.map-view.is-placing .map-actions { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(12px); }
.map-view.is-placing .map-side-tools,
.map-view.sheet-open .map-side-tools { opacity: 0; pointer-events: none; }

.empty-note {
  position: absolute;
  left: 10px;
  bottom: calc(83px + var(--safe-bottom));
  z-index: 640;
  width: 218px;
  border: 1px solid var(--pink);
  border-radius: 0;
  background: rgba(9, 7, 11, .96);
  box-shadow: 4px 4px 0 rgba(139, 92, 246, .3);
  animation: note-in .25s ease both;
}
@keyframes note-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.empty-note__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  background: var(--pink);
  color: #08070a;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .05em;
}
.empty-note__body {
  display: flex;
  align-items: stretch;
  gap: 7px;
  padding: 8px;
}
.empty-note__title {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 29px;
  line-height: .72;
  letter-spacing: .01em;
}
.empty-note__copy {
  margin-top: 6px;
  color: var(--gray);
  font-size: 9px;
  line-height: 1.35;
}
.empty-note__img {
  width: 53px;
  height: 68px;
  flex: 0 0 53px;
  object-fit: cover;
  align-self: center;
  filter: grayscale(1) contrast(1.25) brightness(.75);
  border: 1px solid #3b3543;
}

.placing-banner {
  position: absolute;
  top: calc(102px + var(--safe-top));
  left: 10px;
  right: 10px;
  z-index: 690;
  min-height: 41px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 8px;
  border: 1px solid #08070a;
  border-radius: 0;
  background: var(--pink);
  color: #08070a;
  box-shadow: 3px 3px 0 var(--purple);
  animation: banner-in .18s ease both;
}
@keyframes banner-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.placing-banner p { flex: 1; font-size: 9.5px; line-height: 1.35; letter-spacing: .02em; text-transform: uppercase; }
.placing-banner p strong { font-weight: 700; }
.placing-banner__pin {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  background: #08070a;
  color: var(--pink);
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1;
}
.banner-cancel {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border: 1px solid #08070a;
  border-radius: 0;
  background: transparent;
  color: #08070a;
  cursor: pointer;
}
.banner-cancel:hover { background: #08070a; color: var(--pink); }
.banner-cancel .icon { width: 14px; height: 14px; stroke-width: 2; }

.map-sync {
  position: absolute;
  left: 50%;
  bottom: calc(73px + var(--safe-bottom));
  z-index: 650;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border: 1px solid #3b3543;
  background: rgba(8, 7, 10, .92);
  color: var(--gray);
  font-size: 8px;
  line-height: 1.5;
  letter-spacing: .04em;
  white-space: nowrap;
}
.map-sync__dot { width: 4px; height: 4px; background: var(--pink); box-shadow: 0 0 5px var(--pink); }
.map-sync[hidden] { display: none; }

/* Chinchetas */
.map-pin { background: transparent; border: 0; }
.map-pin .pin-wrap,
.map-pin .pin-wrap * { pointer-events: none; }
.pin-wrap {
  --pin-color: var(--pink);
  position: relative;
  width: 56px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .55));
  transition: transform .14s ease, filter .14s ease;
  transform-origin: 24px 45px;
}
.pin-tag {
  position: relative;
  width: 48px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #08070a;
  background: var(--pin-color);
  color: #08070a;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .04em;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: 2px 2px 0 #08070a;
}
.pin-tag .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.pin-tag::before {
  content: '';
  position: absolute;
  left: 3px;
  top: 3px;
  width: 3px;
  height: 3px;
  background: #08070a;
  opacity: .35;
}
.pin-wrap:hover { transform: translateY(-2px); filter: drop-shadow(3px 3px 0 rgba(0, 0, 0, .65)); }
.pin-wrap.is-selected .pin-tag {
  box-shadow: 0 0 0 2px var(--white), 3px 3px 0 rgba(0, 0, 0, .7);
}
.pin-wrap.is-selected .pin-tag::before { background: #08070a; }
.pin-stem {
  width: 1px;
  height: 10px;
  margin-left: 21px;
  background: var(--pin-color);
  transform: rotate(var(--tilt, 0deg));
  transform-origin: top;
}
.pin-stem::after {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  margin-left: -2px;
  background: var(--pin-color);
  border: 1px solid #08070a;
}
.pin-comments {
  position: absolute;
  top: -7px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 2px;
  border: 1px solid #08070a;
  background: var(--white);
  color: #08070a;
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(5deg);
}
.leaflet-tooltip.map-tooltip {
  padding: 3px 6px 4px;
  border: 1px solid var(--pink);
  border-radius: 0;
  background: #08070a;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 9px;
  line-height: 1.2;
  letter-spacing: .02em;
  box-shadow: 2px 2px 0 rgba(139, 92, 246, .4);
}
.map-tooltip strong { display: block; font-weight: 700; }
.map-tooltip__meta { display: block; margin-top: 2px; color: var(--gray); font-size: 7px; text-transform: uppercase; letter-spacing: .04em; }
.leaflet-tooltip.map-tooltip::before { display: none; }
.leaflet-marker-icon:focus-visible { outline: 2px dashed var(--pink); outline-offset: 4px; }

/* =========================================================================
   Hojas / paneles
   ========================================================================= */

.sheet-scrim {
  position: absolute;
  inset: 0;
  z-index: 1000;
  background: rgba(3, 2, 5, .74);
  opacity: 0;
  transition: opacity .22s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sheet-scrim.is-visible { opacity: 1; }

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  max-height: 84dvh;
  display: flex;
  flex-direction: column;
  border-top: 2px solid var(--pink);
  border-radius: 0;
  background-color: #0a080d;
  background-image:
    linear-gradient(rgba(255, 46, 154, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 46, 154, .02) 1px, transparent 1px);
  background-size: 32px 32px, 32px 32px;
  box-shadow: 0 -10px 0 rgba(139, 92, 246, .13), 0 -22px 60px #000;
  transform: translateY(105%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  touch-action: none;
}
.sheet.is-open { transform: translateY(0); }
.sheet.is-dragging { transition: none; }
.sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .36;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, .024) 3px,
    rgba(255, 255, 255, .024) 4px
  );
}
.sheet--details { max-height: min(79dvh, 690px); }
.sheet--form { max-height: 92dvh; }
.sheet--profile { max-height: 68dvh; }
.sheet__grip {
  position: relative;
  z-index: 3;
  flex: 0 0 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}
.sheet__grip:active { cursor: grabbing; }
.sheet__grip span { width: 42px; height: 3px; background: var(--gray-dark); }
.sheet__scroll {
  position: relative;
  z-index: 2;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px calc(22px + var(--safe-bottom));
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.sheet__scroll::-webkit-scrollbar { width: 4px; }
.sheet__scroll::-webkit-scrollbar-thumb { background: var(--line); }
.sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0 12px;
}
.sheet__eyebrow {
  color: var(--pink);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.sheet__header h2 {
  margin-top: 2px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 39px;
  line-height: .85;
  letter-spacing: .01em;
  text-transform: uppercase;
}

/* Ficha */
.detail-hero {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 2px 0 9px;
}
.detail-cat-icon {
  --person-color: var(--pink);
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--person-color);
  background: #08070a;
  color: var(--person-color);
  box-shadow: 2px 2px 0 var(--person-color);
  transform: rotate(-1.5deg);
}
.detail-cat-icon .icon { width: 24px; height: 24px; stroke-width: 1.9; }
.detail-heading { flex: 1; min-width: 0; }
.detail-category {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gray);
  font-size: 8.5px;
  line-height: 1.25;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.detail-category::before {
  content: '//';
  color: var(--person-color, var(--pink));
}
.detail-heading h2 {
  margin-top: 2px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 43px;
  line-height: .83;
  letter-spacing: .01em;
  word-break: break-word;
}
.detail-close { margin-left: auto; }
.detail-byline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 0 13px;
  color: var(--gray);
  font-size: 9.5px;
  line-height: 1.35;
}
.detail-byline strong { color: var(--gray-soft); font-weight: 700; }
.detail-byline .dot { width: 3px; height: 3px; background: var(--gray-dark); }

.address-card {
  position: relative;
  padding: 11px;
  border: 1px solid #3b3543;
  border-left: 2px solid var(--pink);
  background: #0e0b12;
}
.address-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  color: var(--pink);
  font-size: 8.5px;
  line-height: 1.3;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.address-label .icon { width: 11px; height: 11px; }
.address-text {
  padding-right: 4px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}
.address-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 9px;
}
.action-btn {
  min-height: 39px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid #3b3543;
  border-radius: 0;
  background: #09070c;
  color: var(--gray-soft);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .04em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}
.action-btn:hover { border-color: var(--pink); color: var(--pink); background: #130d14; }
.action-btn .icon { width: 13px; height: 13px; }
.action-btn--maps { border-color: var(--pink); background: var(--pink); color: #08070a; }
.action-btn--maps:hover { border-color: var(--pink-soft); background: var(--pink-soft); color: #08070a; }
.action-btn.is-copied { border-color: var(--purple); background: #1b1228; color: var(--white); }
.detail-edit { display: flex; justify-content: flex-end; margin-top: 7px; }
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px;
  border: 0;
  background: transparent;
  color: var(--gray);
  font-family: var(--font-body);
  font-size: 9px;
  line-height: 1.3;
  letter-spacing: .03em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}
.text-button:hover { color: var(--pink); }
.text-button .icon { width: 12px; height: 12px; }

.comments-block { margin-top: 14px; }
.comments-heading {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.comments-heading h3 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.comments-count { color: var(--pink); font-size: 9px; font-weight: 700; }
.comments-count::before { content: '['; }
.comments-count::after { content: ']'; }
.comments-squiggle {
  flex: 1;
  height: 1px;
  border-top: 1px dashed #3b3543;
}
.comment-list { display: flex; flex-direction: column; gap: 7px; }
.comment { display: flex; align-items: flex-start; gap: 7px; }
.comment__body {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #302b38;
  border-left: 2px solid #4a4354;
  background: #0d0b11;
}
.comment__meta {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 2px;
  color: var(--gray-dark);
  font-size: 8.5px;
  line-height: 1.3;
  letter-spacing: .02em;
}
.comment__meta strong { color: var(--pink-soft); font-weight: 700; }
.comment__text {
  color: var(--gray-soft);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.comment__text::before { content: '> '; color: var(--pink); }
.comments-empty {
  padding: 8px 9px;
  border: 1px dashed #3b3543;
  color: var(--gray);
  font-size: 10px;
  line-height: 1.5;
}
.comment-form {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-top: 9px;
  padding-top: 9px;
  border-top: 1px dashed #3b3543;
}
.comment-input-wrap { flex: 1; min-width: 0; }
.comment-input {
  width: 100%;
  height: 40px;
  padding: 5px 8px;
  border: 1px solid #3b3543;
  border-radius: 0;
  background: #070609;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.3;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5);
}
.comment-input::placeholder { color: #6d6675; }
.comment-input:focus { outline: none; border-color: var(--pink); box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5), 0 0 0 1px var(--pink); }
.comment-send {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--pink);
  border-radius: 0;
  background: var(--pink);
  color: #08070a;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--purple);
}
.comment-send:hover { background: var(--pink-soft); }
.comment-send:disabled { opacity: .35; background: #3b3543; border-color: #3b3543; color: #0a080d; box-shadow: none; cursor: default; }
.comment-send .icon { width: 16px; height: 16px; }

/* Formulario */
.place-point {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  max-width: 100%;
  margin: -2px 0 13px;
  padding: 3px 7px;
  border: 1px solid #493048;
  background: #160e16;
  color: var(--pink-soft);
  font-size: 8.5px;
  line-height: 1.35;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.place-point .icon { width: 11px; height: 11px; }
.place-point span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.form-block { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.form-block legend {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 0 0 6px;
  color: var(--gray-soft);
  font-size: 9.5px;
  line-height: 1.25;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.number-scribble {
  display: inline-block;
  flex: 0 0 auto;
  color: var(--pink);
  font-size: 8.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .02em;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.category-option {
  min-height: 61px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  padding: 7px 6px;
  border: 1px solid #3b3543;
  border-radius: 0;
  background: #0b090e;
  color: var(--gray-soft);
  font-family: var(--font-body);
  font-size: 8.5px;
  line-height: 1.2;
  text-align: left;
  letter-spacing: .02em;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}
.category-option:hover { border-color: var(--gray-soft); color: var(--ink); }
.category-option__icon { display: grid; place-items: center; color: var(--gray-soft); }
.category-option__icon .icon { width: 21px; height: 21px; stroke-width: 1.9; }
.category-option__label { text-transform: uppercase; }
.category-option.is-selected {
  border-color: var(--white);
  background: var(--white);
  color: #08070a;
  box-shadow: 2px 2px 0 var(--purple);
}
.category-option.is-selected .category-option__icon { color: #08070a; }

.field { position: relative; display: block; }
.field input {
  width: 100%;
  height: 43px;
  padding: 6px 9px;
  border: 1px solid #3b3543;
  border-radius: 0;
  background: #070609;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 12px;
  line-height: 1.3;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5);
}
.field input::placeholder { color: #6d6675; }
.field input:focus {
  outline: none;
  border-color: var(--pink);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5), 0 0 0 1px var(--pink);
}
.field--search input { padding-left: 32px; padding-right: 30px; }
.field__icon {
  position: absolute;
  left: 9px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  color: var(--gray);
  pointer-events: none;
}
.field__spinner {
  position: absolute;
  right: 10px;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-top: -7px;
  border: 1px solid #3b3543;
  border-top-color: var(--pink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.field-hint {
  margin: 4px 1px 0;
  color: var(--gray-dark);
  font-size: 9px;
  line-height: 1.4;
}
.form-error {
  margin: 0 0 10px;
  padding: 7px 8px;
  border: 1px solid var(--pink);
  border-left: 3px solid var(--pink);
  background: #220d18;
  color: var(--pink-soft);
  font-size: 10px;
  line-height: 1.4;
}
.form-error::before { content: 'ERR: '; color: var(--pink); }
.address-results {
  margin-top: 6px;
  padding: 7px;
  border: 1px dashed #3b3543;
  background: #0c0a10;
}
.address-results__title {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 5px;
  color: var(--pink);
  font-size: 8.5px;
  line-height: 1.35;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.address-results__title .icon { width: 10px; height: 10px; }
.address-results__list { display: flex; flex-direction: column; gap: 4px; }
.address-result {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 6px;
  border: 1px solid #332e3b;
  border-radius: 0;
  background: #08070a;
  text-align: left;
  cursor: pointer;
}
.address-result:hover { border-color: var(--pink); background: #120d14; }
.address-result__pin {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: grid;
  place-items: center;
  border: 1px solid #3b3543;
  background: #0d0a11;
  color: var(--pink);
}
.address-result__pin .icon { width: 12px; height: 12px; }
.address-result__text { min-width: 0; flex: 1; }
.address-result__name {
  display: block;
  overflow: hidden;
  color: var(--gray-soft);
  font-size: 10px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.address-result__address {
  display: block;
  overflow: hidden;
  color: var(--gray-dark);
  font-size: 8.5px;
  line-height: 1.35;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.address-results__note {
  padding: 1px;
  color: var(--gray);
  font-size: 9px;
  line-height: 1.5;
}
.form-actions { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; }
.form-byline {
  margin: 1px 0 0;
  color: var(--gray-dark);
  font-size: 8.5px;
  line-height: 1.4;
  letter-spacing: .03em;
  text-align: center;
}
.form-byline strong { color: var(--gray); font-weight: 700; }
.delete-confirm {
  padding: 9px;
  border: 1px dashed var(--pink);
  background: #1b0a14;
  color: var(--pink-soft);
  font-size: 9.5px;
  line-height: 1.45;
}
.delete-confirm p { margin-bottom: 7px; }
.delete-confirm__buttons { display: flex; gap: 6px; }
.delete-confirm__buttons .btn { flex: 1; }

.sheet--search { max-height: 82dvh; }
.map-search-form { margin: 0; }
.map-search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 49px;
  padding: 0 11px;
  border: 1px solid var(--pink);
  background: #070609;
  color: var(--pink);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .5), 3px 3px 0 rgba(139, 92, 246, .18);
}
.map-search-box > .icon { width: 18px; height: 18px; flex: 0 0 18px; }
.map-search-box input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 25px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.3;
  -webkit-appearance: none;
  appearance: none;
}
.map-search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.map-search-box input::placeholder { color: #7d747f; }
.map-search-box .field__spinner { right: 10px; }
.map-search-hint {
  margin: 7px 1px 0;
  color: var(--gray);
  font-size: 9px;
  line-height: 1.5;
}
.map-search-results { margin-top: 11px; }
.map-search-idle {
  padding: 11px;
  border: 1px dashed #3b3543;
  color: var(--gray);
  font-size: 9px;
  line-height: 1.5;
}
.map-search-results .address-result { padding: 8px; }
.map-search-results .address-result__name { font-size: 11px; }
.map-search-results .address-result__address { font-size: 9px; }
.map-search-result-action {
  margin-left: auto;
  padding-left: 5px;
  color: var(--pink);
  font-size: 12px;
  line-height: 1;
}

.profile-note {
  margin-top: 10px;
  color: var(--gray);
  font-size: 9px;
  line-height: 1.55;
}
.person-grid--compact { grid-template-columns: 1fr 1fr; }
.person-grid--compact .person-card { min-height: 69px; }
.person-grid--compact .person-card__name { font-size: 15px; }

/* =========================================================================
   Avisos y glitch confetti
   ========================================================================= */

.toast {
  position: absolute;
  top: calc(104px + var(--safe-top));
  left: 50%;
  z-index: 2000;
  transform: translate(-50%, -6px);
  max-width: calc(100% - 24px);
  min-height: 35px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--pink);
  border-left: 3px solid var(--pink);
  border-radius: 0;
  background: #08070a;
  color: var(--gray-soft);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .02em;
  box-shadow: 3px 3px 0 var(--purple);
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast__icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: grid;
  place-items: center;
  border: 1px solid var(--pink);
  background: var(--pink);
  color: #08070a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
}
.toast--error { border-color: var(--pink); color: var(--pink-soft); }
#toastText::before { content: '> '; color: var(--pink); }

.doodle-burst {
  position: absolute;
  inset: 0;
  z-index: 1900;
  pointer-events: none;
  overflow: hidden;
}
.confetti-bit {
  position: absolute;
  width: 5px;
  height: 9px;
  border: 0;
  background: var(--pink);
  opacity: 0;
  animation: confetti-fall 780ms cubic-bezier(.12, .65, .34, 1) forwards;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(.7); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(1); }
}

/* =========================================================================
   Responsive y movimiento
   ========================================================================= */

@media (max-width: 370px) {
  .welcome__inner { padding-left: 14px; padding-right: 14px; }
  .welcome h1 { font-size: 78px; }
  .welcome__intro { font-size: 12px; }
  .photo-strip { gap: 5px; }
  .photo-card__img { aspect-ratio: 1.15 / 1; }
  .picker-heading h2 { font-size: 31px; }
  .person-card { min-height: 71px; padding-left: 8px; padding-right: 8px; }
  .person-card__name { font-size: 14px; }
  .filter-chip { font-size: 8.5px; gap: 4px; padding-left: 5px; padding-right: 5px; }
  .empty-note { width: 205px; }
  .search-map-button { flex-basis: 77px; font-size: 7.5px; }
  .add-button { font-size: 10px; gap: 7px; }
  .add-button__hint { display: none; }
  .sheet__scroll { padding-left: 12px; padding-right: 12px; }
  .detail-heading h2 { font-size: 38px; }
  .address-actions { gap: 5px; }
  .action-btn { font-size: 8px; }
  .category-grid { gap: 4px; }
  .category-option { min-height: 58px; padding: 6px 5px; font-size: 8px; }
  .toast { width: calc(100% - 20px); }
}

@media (max-height: 720px) {
  .welcome__hero { padding-top: 15px; }
  .welcome h1 { font-size: 84px; }
  .welcome__intro { margin-top: 10px; line-height: 1.45; }
  .photo-strip { margin-top: 10px; margin-bottom: 9px; }
  .photo-card__img { aspect-ratio: 1.5 / 1; }
  .photo-card figcaption { display: none; }
  .boot-log { padding: 4px 0; }
  .welcome__picker { margin-top: 10px; padding-top: 11px; padding-bottom: 11px; }
  .person-card { min-height: 66px; }
  .picker-heading { margin-bottom: 9px; }
  .welcome__footer { margin-top: 11px; }
  .sheet--form { max-height: 95dvh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* =========================================================================
   Página de créditos
   ========================================================================= */

.credits-page {
  min-height: 100dvh;
  color: var(--gray-soft);
  background: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 28px 28px;
  font-family: var(--font-body);
}
.credits-wrap { width: min(100% - 28px, 620px); margin: 0 auto; padding: 28px 0 50px; }
.credits-wrap h1 {
  margin: 10px 0 6px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 58px;
  line-height: .85;
  text-transform: uppercase;
  text-shadow: 2px 0 var(--pink), -2px 0 var(--purple);
}
.credits-wrap h2 {
  margin: 26px 0 8px;
  color: var(--pink);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.credits-wrap p, .credits-wrap li { font-size: 12px; line-height: 1.6; color: var(--gray); }
.credits-wrap ul { padding-left: 18px; }
.credits-wrap a { color: var(--pink-soft); }
.credits-back { display: inline-block; margin-bottom: 12px; color: var(--gray); font-size: 9px; text-decoration: none; border-bottom: 1px dashed var(--gray-dark); text-transform: uppercase; letter-spacing: .05em; }
.credits-back:hover { color: var(--pink); }
.credits-list { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.credits-item { display: grid; grid-template-columns: 86px 1fr; gap: 12px; padding: 8px; border: 1px solid var(--line); background: var(--panel); }
.credits-item img { width: 86px; height: 70px; object-fit: cover; filter: grayscale(1) brightness(.8); }
.credits-item h3 { margin: 0 0 4px; color: var(--gray-soft); font-size: 11px; }
.credits-item p { margin: 0; font-size: 10px; line-height: 1.5; }

@media (max-height: 630px) {
  .welcome__inner { padding-top: calc(10px + var(--safe-top)); }
  .welcome__hero { padding: 10px 0 6px; }
  .welcome__kicker { font-size: 8px; }
  .welcome h1 { font-size: 68px; margin-top: 5px; }
  .welcome h1 em { margin-top: 5px; font-size: 10px; }
  .welcome__intro { margin-top: 7px; font-size: 11px; line-height: 1.35; }
  .photo-strip { gap: 5px; margin: 6px 0 6px; }
  .photo-card { padding: 3px; }
  .photo-card__img { aspect-ratio: 2.05 / 1; }
  .photo-card figcaption { display: none; }
  .boot-log { display: none; }
  .welcome__picker { margin-top: 7px; padding: 10px; }
  .picker-heading { gap: 8px; margin-bottom: 7px; }
  .picker-heading h2 { font-size: 29px; }
  .picker-heading p:not(.terminal-label) { font-size: 8px; }
  .person-card { min-height: 56px; padding: 5px 8px; }
  .person-card__sub { display: none; }
  .person-card__name { font-size: 14px; }
  .btn--enter { min-height: 42px; margin-top: 7px; font-size: 10px; }
  .welcome__fineprint { margin-top: 6px; font-size: 7px; }
  .welcome__footer { margin-top: 8px; }
}
