/* El Barrio — portada: la calle de noche con el bloque, la plaza y el bar. */
:root {
  --noche: #0b0820;
  --noche-2: #150f2e;
  --papel: #f3ecff;
  --gris: #b9aed6;
  --bombilla: #ffd27a;
  --rojo: #ff4f6d;
  --amarillo: #ffd23f;
  --verde: #3ddc84;
  --azul: #59c3ff;
  --borde: rgba(255, 255, 255, 0.12);
}

body.portada { background: var(--noche); color: var(--papel); min-height: 100svh; }
a { color: inherit; }

/* Cabecera flotante */
.cabecera {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; gap: 1rem;
  padding: max(0.75rem, env(safe-area-inset-top)) 1.25rem 1.5rem;
  background: linear-gradient(#0b0820e6, #0b082000);
  pointer-events: none;
}
.cabecera > * { pointer-events: auto; }
.marca {
  font-weight: 900; font-stretch: 70%; font-size: 1.5rem; letter-spacing: 0.04em; text-decoration: none;
  color: var(--papel); text-shadow: 0 0 18px #ff9a3d88;
}
.en-linea { margin: 0; font-size: 0.85rem; color: var(--gris); flex: 1; }
.en-linea::before { content: ''; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--verde); margin-right: 0.45rem; box-shadow: 0 0 10px var(--verde); vertical-align: 0.05em; }
.en-linea:empty { visibility: hidden; }
.yo { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }
.yo-etiqueta { color: var(--gris); }
.yo-mote {
  border: 1px solid var(--borde); background: #ffffff10; border-radius: 999px; padding: 0.35rem 0.85rem;
  font-weight: 700; max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.yo-mote:hover { background: #ffffff20; }
.yo-mote::after { content: ' ✎'; font-weight: 400; color: var(--gris); }

/* La escena */
.calle { position: relative; overflow: hidden; }
.escena { width: 100%; height: min(100svh, 62vw); min-height: 30rem; background: #06041a; }
.zona { cursor: pointer; transition: opacity 0.35s, filter 0.35s; outline: none; }
.escena.con-foco .zona:not(.activa) { opacity: 0.45; filter: saturate(0.5); }
.zona.activa { filter: brightness(1.18); }
.zona:focus-visible { filter: brightness(1.3) drop-shadow(0 0 6px #ffd23f); }
.zona.en-obras { cursor: default; }

.horizonte { opacity: 0.95; }
.estrella { fill: #fff; animation: titilar 4s ease-in-out infinite; }
@keyframes titilar { 50% { opacity: 0.25; } }

.ventana { transition: fill 0.6s; }
.ventana.apagada { fill: #15101f; }
.ventana.luz { fill: #ffcf7a; }
.ventana.luz2 { fill: #e39a4c; }
.ventana.luz3 { fill: #ffe9c2; opacity: 0.85; }
.ventana.tele { fill: #6f8cff; animation: tele 1.7s steps(3) infinite; }
@keyframes tele { 33% { fill: #a6b8ff; } 66% { fill: #5a6fe0; } }
.ventana.crimen { fill: #ffe9a8; }
.ascensor { transition: transform 2.6s cubic-bezier(0.45, 0, 0.3, 1); filter: url(#halo); }

.numero-portal { font: 900 24px var(--f-texto); fill: #fff; }
.cinta-texto { font: 800 11px var(--f-texto); letter-spacing: 0.08em; fill: #111; }
.faro { mix-blend-mode: screen; animation: faro 1.2s steps(1) infinite; }
.faro-rojo { animation-delay: 0.6s; }
@keyframes faro { 50% { opacity: 0; } }

.bombilla { animation: titilar 2.2s ease-in-out infinite; }
.rotulo-orquesta { font: 400 16px var(--f-pixel); fill: #ffd23f; letter-spacing: 0.1em; }
.rotulo-churros { font: 900 15px var(--f-texto); fill: #3b1d0c; letter-spacing: 0.1em; }
.foco-escenario { animation: foco 3s ease-in-out infinite; }
@keyframes foco { 50% { opacity: 0.4; fill: #ff4fd8; } }
.persona { animation: botar var(--d, 0.9s) ease-in-out infinite alternate; animation-delay: var(--r, 0s); transform-box: fill-box; transform-origin: bottom; }
@keyframes botar { to { transform: translateY(-7px) rotate(var(--g, 3deg)); } }
.pancarta-texto { font: 900 22px var(--f-texto); font-stretch: 75%; letter-spacing: 0.12em; fill: #3b1d0c; }

.neon-bar { font: 900 64px var(--f-texto); font-style: italic; fill: #ffe3ea; stroke: #ff3b5c; stroke-width: 2; animation: parpadeo 7s infinite; }
.neon-recre { font: 400 22px var(--f-pixel); fill: #d9f3ff; stroke: #2fb4ff; stroke-width: 1; letter-spacing: 0.08em; }
@keyframes parpadeo { 0%, 91%, 93%, 100% { opacity: 1; } 92% { opacity: 0.3; } }
.pantalla { animation: pantalla var(--d, 2.4s) steps(4) infinite; }
@keyframes pantalla { 25% { fill: #ff4fd8; } 50% { fill: #3ddc84; } 75% { fill: #ffd23f; } }
.tiza { font: 700 13px var(--f-texto); fill: #e9efe8; letter-spacing: 0.06em; }
.tiza-juego { font-size: 11px; }

.chispa { animation: chispa 1.6s cubic-bezier(0.1, 0.7, 0.3, 1) forwards; }
@keyframes chispa {
  0% { transform: translate(0, 0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)); opacity: 0; }
}

.telon { position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity 0.55s ease-in; z-index: 20; }
.entrando .escena { transition: transform 0.75s cubic-bezier(0.6, 0, 0.9, 0.4); }
.entrando .telon { opacity: 1; }

/* Lo que hay esta noche */
.sitios { position: relative; padding: 0 1.25rem 3rem; margin-top: -6rem; z-index: 2; }
.entradilla {
  max-width: 40rem; margin: 0 auto 1.75rem; text-align: center; font-size: clamp(1.05rem, 2.2vw, 1.35rem); font-weight: 600;
  text-shadow: 0 2px 12px #000;
}
.tarjetas { list-style: none; margin: 0 auto; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 72rem; }
.tarjeta {
  position: relative; display: flex; flex-direction: column; gap: 0.4rem;
  background: linear-gradient(160deg, #1c1438f2, #120c26f2); border: 1px solid var(--borde);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  padding: 1.25rem 1.25rem 1.35rem; transition: transform 0.25s, background 0.25s;
}
.tarjeta::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--acento); }
.tarjeta[data-parte='bloque'] { --acento: var(--amarillo); }
.tarjeta[data-parte='verbena'] { --acento: var(--rojo); }
.tarjeta[data-parte='liga'] { --acento: var(--azul); }
.tarjeta.activa { transform: translateY(-4px); background: linear-gradient(160deg, #271b4ef2, #160f30f2); }
.lugar { margin: 0; font: 400 0.72rem var(--f-pixel); letter-spacing: 0.1em; color: var(--acento); text-transform: uppercase; }
.tarjeta h2 { margin: 0; font-size: 1.45rem; font-weight: 900; font-stretch: 78%; line-height: 1.1; }
.desc { margin: 0; color: var(--gris); font-size: 0.95rem; flex: 1; }
.vivo { margin: 0.35rem 0 0; font: 600 0.85rem var(--f-mono); color: var(--papel); min-height: 1.3em; }
.vivo:empty { display: none; }
.entrar {
  margin-top: 0.75rem; align-self: flex-start; text-decoration: none; font-weight: 800;
  background: var(--acento); color: #120c24; padding: 0.6rem 1.1rem;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.entrar:hover { filter: brightness(1.12); }
.entrar[aria-disabled='true'] { background: #3a3156; color: var(--gris); cursor: default; }

.pie { text-align: center; color: var(--gris); font-size: 0.8rem; padding: 1rem 1.25rem 2rem; }

/* Diálogo del vecino */
.dialogo { border: 1px solid var(--borde); background: #171030; color: var(--papel); padding: 0; max-width: 24rem; width: calc(100% - 2rem); }
.dialogo::backdrop { background: #05031099; backdrop-filter: blur(3px); }
.dialogo-caja { display: flex; flex-direction: column; gap: 0.45rem; padding: 1.4rem; }
.dialogo h2 { margin: 0 0 0.4rem; font-weight: 900; font-stretch: 78%; }
.dialogo label { font-weight: 700; font-size: 0.9rem; margin-top: 0.4rem; }
.opcional { font-weight: 400; color: var(--gris); }
.dialogo input { background: #0d0920; border: 1px solid #ffffff2a; padding: 0.6rem 0.7rem; border-radius: 4px; }
.nota { margin: 0; font-size: 0.82rem; color: var(--gris); }
.error { margin: 0; color: #ff8a9b; font-size: 0.88rem; min-height: 1.2em; }
.botones { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.5rem; }
.primario, .secundario { border: 0; padding: 0.55rem 1rem; font-weight: 800; border-radius: 3px; }
.primario { background: var(--amarillo); color: #120c24; }
.secundario { background: #ffffff14; }
.enlace { background: none; border: 0; padding: 0; color: var(--gris); text-decoration: underline; font-size: 0.85rem; }
.ya-tengo { margin: 0.3rem 0 0; text-align: center; }

@media (max-width: 860px) {
  .escena { height: auto; min-height: 0; aspect-ratio: 16 / 10; }
  .sitios { margin-top: 0; padding-top: 1.25rem; }
  .tarjetas { grid-template-columns: 1fr; }
  .en-linea { display: none; }
  .cabecera { position: sticky; padding-bottom: 0.65rem; background: #0b0820; }
  .marca { font-size: 1.2rem; }
  .yo-etiqueta { display: none; }
}
