/* Plano móvil — La Noche de los Institutos (Estación B: IPSA) */
:root {
  --bg: #060911;
  --panel: #0D111C;
  --card: #131B2E;
  --text: #F8FAFC;
  --muted: #94A3B8;
  --line: rgba(255, 255, 255, 0.16);
  --border-bright: rgba(255, 255, 255, 0.32);
  --teatro: #A20E2A;
  --musica: #F18211;
  --visuales: #05ADC2;
  --inter: #64748B;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0 1rem 3.5rem 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
  background-image: 
    radial-gradient(circle at 50% 12%, rgba(225, 29, 72, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 85% 65%, rgba(2, 132, 199, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 15% 85%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 0%, #131B2E 0%, #060810 60%, #030407 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-y: auto;
}

body.modal-open {
  overflow: hidden !important;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
}

/* ================= PORTADA (DEPRECADA A FAVOR DE ESTRUCTURA UNIFICADA) ================= */
.cover {
  display: none !important;
}

.cover-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.3px 1.3px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 28% 8%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 44% 22%, #fff, transparent),
    radial-gradient(1px 1px at 63% 12%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 80% 26%, #fff, transparent),
    radial-gradient(1px 1px at 92% 9%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 8% 46%, #fff, transparent),
    radial-gradient(1px 1px at 36% 52%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 72% 48%, #fff, transparent),
    radial-gradient(1px 1px at 95% 60%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 18% 74%, #fff, transparent),
    radial-gradient(1px 1px at 52% 82%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 84% 88%, #fff, transparent),
    radial-gradient(1px 1px at 6% 94%, #fff, transparent);
  opacity: 0.75;
  animation: twinkle 4.5s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: 0.45; } to { opacity: 0.95; } }

.cover-inner {
  position: relative;
  min-height: 100%;
  min-height: 100dvh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(1rem + env(safe-area-inset-top)) clamp(1rem, 4.5vw, 1.5rem) calc(1.6rem + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: clamp(0.7rem, 2vh, 1rem);
  box-sizing: border-box;
}

.cover-col-brand,
.cover-col-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.55rem, 1.8vh, 0.85rem);
}

/* Cluster Oficial Inseparable: Gobierno de Santa Cruz (Escudo) + Consejo Provincial de Educación */
.cover-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.gov-cpe-cluster {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.45rem, 2vw, 0.85rem);
  flex-wrap: nowrap !important; /* Siempre van juntos en la misma línea */
  white-space: nowrap;
  max-width: 100%;
  padding: 0.32rem clamp(0.5rem, 2.5vw, 0.85rem);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  box-sizing: border-box;
}
.cover-logo-gov {
  height: clamp(24px, 5.8vw, 34px);
  max-width: 38%;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 1;
}
.cover-logo-cpe {
  height: clamp(18px, 4.4vw, 26px);
  max-width: 58%;
  width: auto;
  object-fit: contain;
  display: block;
  flex-shrink: 1;
}
.gov-cpe-divider {
  width: 1px;
  height: clamp(20px, 4.8vw, 26px);
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  display: inline-block;
}

.cover-welcome {
  font-size: clamp(0.82rem, 3.2vw, 0.98rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #cbd5e1;
  text-align: center;
  margin-top: 0.2rem;
}

.cover-title {
  margin: 0;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  line-height: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.25);
  width: 100%;
}
.t-la {
  font-size: clamp(1rem, 4vw, 1.45rem);
  letter-spacing: clamp(0.25em, 1.5vw, 0.4em);
  padding-left: clamp(0.25em, 1.5vw, 0.4em);
  color: #e2e8f0;
}
.t-noche {
  font-size: clamp(2.3rem, 11vw, 3.8rem);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}
.t-rest {
  font-size: clamp(1.05rem, 4.5vw, 1.55rem);
  letter-spacing: clamp(0.04em, 1.2vw, 0.1em);
  color: #fff;
  text-align: center;
}
.moon-o {
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  margin: 0 0.02em;
  flex-shrink: 0;
}
.moon-o svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  display: block;
}

.cover-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  width: 70%;
  color: #cbd5e1;
}
.cover-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
}
.cover-divider i {
  font-style: normal;
}

.cover-station {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 14px;
  padding: clamp(0.55rem, 1.5vh, 0.72rem) 0.9rem;
  text-align: left;
  width: 100%;
  box-sizing: border-box;
}
.cover-ipsa {
  height: clamp(38px, 9vw, 46px);
  width: auto;
  flex-shrink: 0;
}
.cover-station-text small {
  display: block;
  font-size: clamp(0.64rem, 2.5vw, 0.72rem);
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #22D3EE;
  margin-bottom: 2px;
}
.cover-station-text strong {
  font-size: clamp(0.8rem, 3.2vw, 0.92rem);
  font-weight: 800;
  line-height: 1.25;
}

.cover-info {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 1.2vh, 0.55rem);
  text-align: left;
}
.cover-info li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  background: rgba(13, 17, 28, 0.75);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: clamp(0.48rem, 1.3vh, 0.65rem) 0.8rem;
  box-sizing: border-box;
}
.cover-info li > span {
  font-size: clamp(1rem, 3.5vw, 1.2rem);
  line-height: 1.3;
  flex-shrink: 0;
}
.cover-info b {
  display: block;
  font-size: clamp(0.8rem, 3vw, 0.88rem);
  font-weight: 800;
}
.cover-info em {
  display: block;
  font-style: normal;
  font-size: clamp(0.7rem, 2.6vw, 0.77rem);
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.35;
}

.cover-cta {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 999px;
  padding: clamp(0.85rem, 2vh, 1.05rem) 1.2rem;
  font-size: clamp(0.95rem, 3.6vw, 1.05rem);
  font-weight: 800;
  color: #06121a;
  background: linear-gradient(135deg, #ffffff, #bae6fd);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55), 0 10px 28px rgba(0, 0, 0, 0.5);
  animation: pulse 2.2s infinite;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cover-cta:active {
  transform: scale(0.98);
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0), 0 10px 28px rgba(0, 0, 0, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0), 0 10px 28px rgba(0, 0, 0, 0.5); }
}

.cover-drive-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 44px;
  padding: clamp(0.7rem, 1.6vh, 0.82rem) 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #22D3EE;
  font-size: clamp(0.8rem, 3vw, 0.88rem);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.cover-drive-btn:active {
  background: rgba(34, 211, 238, 0.22);
  transform: scale(0.98);
}
.cover-hint {
  margin: 0;
  font-size: clamp(0.7rem, 2.5vw, 0.76rem);
  color: var(--muted);
  text-align: center;
}

/* ================= APLICACIÓN DEL PLANO COMO MODAL ================= */
.app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  overflow: hidden;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.app.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.topbar {
  display: flex;
  align-items: center;
  gap: clamp(0.4rem, 2vw, 0.65rem);
  padding: calc(0.45rem + env(safe-area-inset-top)) clamp(0.5rem, 3vw, 0.85rem) 0.45rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.ui-icon {
  width: 1.15em;
  height: 1.15em;
  display: inline-block;
  vertical-align: middle;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.topbar-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.35rem clamp(0.5rem, 2vw, 0.75rem);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #F8FAFC;
  font-family: inherit;
  font-size: clamp(0.68rem, 2.3vw, 0.76rem);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.topbar-back-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  transform: translateY(-1px);
}
.topbar-back-btn:active {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(0.97);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.top-title {
  flex: 1;
  min-width: 0;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.top-brand-event {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: clamp(0.72rem, 2.8vw, 0.88rem);
  color: #FFFFFF;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
}
.top-moon-wrap {
  display: inline-block;
  width: 0.9em;
  height: 0.9em;
  margin: 0 0.02em;
  vertical-align: middle;
  flex-shrink: 0;
}
.top-moon-wrap svg {
  width: 100%;
  height: 100%;
  display: block;
}
.top-station-label {
  display: block;
  font-size: clamp(0.64rem, 2.3vw, 0.72rem);
  font-weight: 800;
  color: #22D3EE;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.06em;
}
.topbar-drive-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem clamp(0.45rem, 2vw, 0.65rem);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.45);
  color: #22D3EE;
  font-size: clamp(0.68rem, 2.5vw, 0.74rem);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-drive-btn:active {
  background: #22D3EE;
  color: #060911;
}
.top-logo {
  height: clamp(28px, 6vw, 34px);
  width: auto;
  flex-shrink: 0;
}

.controls {
  flex-shrink: 0;
  background: var(--panel);
  padding: 0.4rem clamp(0.5rem, 3vw, 0.85rem) 0.45rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  box-sizing: border-box;
}
.floor-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.3rem, 1.5vw, 0.5rem);
}
.floor-tab {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  padding: clamp(0.45rem, 1.2vh, 0.55rem) 0.4rem;
  min-height: 38px;
  border-radius: 10px;
  font-size: clamp(0.76rem, 2.8vw, 0.84rem);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.floor-tab.active {
  background: #fff;
  color: #06121a;
  border-color: #fff;
}

.prof-chips {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}
.prof-chips::-webkit-scrollbar {
  display: none;
}
.chip, .prof-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-family: inherit;
  font-size: clamp(0.7rem, 2.4vw, 0.76rem);
  font-weight: 700;
  min-height: 32px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.chip.all {
  padding-left: 0.7rem;
}
.chip .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chip:hover, .prof-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
}
.chip.active, .prof-chip.active {
  background: rgba(255, 255, 255, 0.95);
  color: #06121a;
  border-color: #FFFFFF;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}
.chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #F8FAFC;
  font-size: 0.68rem;
  font-weight: 800;
  margin-left: 2px;
}

/* ================= PERSONALIZACIÓN ESTACIÓN C: ISES ================= */
#appISES .top-station-label {
  color: #34D399;
}
#careerChipsISES .prof-chip.active {
  background: #10B981;
  color: #051A14;
  border-color: #34D399;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.45);
}
#careerChipsISES .prof-chip.active .chip-count {
  background: rgba(5, 26, 20, 0.35);
  color: #FFFFFF;
}
#openA4BtnTopISES {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34D399;
}
#openA4BtnTopISES:hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: #34D399;
  color: #FFFFFF;
}
#openA4BtnTopISES:active {
  background: #10B981;
  color: #051A14;
}

/* ================= ESCENARIO CON ZOOM Y ARRASTRE ================= */
.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background: #060911;
  touch-action: none;
  cursor: grab;
}
.stage:active {
  cursor: grabbing;
}

.pan-layer {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}
.pan-layer .plan-svg {
  display: block;
  max-height: none;
  height: auto;
  border: none;
  border-radius: 0;
}

.zoom-ctrl {
  position: absolute;
  right: calc(0.6rem + env(safe-area-inset-right));
  top: calc(0.6rem + env(safe-area-inset-top));
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  z-index: 5;
}
.zoom-ctrl button {
  width: clamp(38px, 9vw, 44px);
  height: clamp(38px, 9vw, 44px);
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(13, 17, 28, 0.9);
  color: #fff;
  font-size: clamp(1.15rem, 4vw, 1.35rem);
  font-weight: 700;
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.zoom-ctrl button:active {
  background: #fff;
  color: #06121a;
}

.stage-hint {
  position: absolute;
  left: 50%;
  top: calc(0.6rem + env(safe-area-inset-top));
  transform: translateX(-50%);
  background: rgba(13, 17, 28, 0.9);
  border: 1px solid var(--line);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: clamp(0.65rem, 2.4vw, 0.72rem);
  font-weight: 600;
  color: #cbd5e1;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.6s ease;
  backdrop-filter: blur(8px);
  z-index: 4;
}
.stage-hint.gone {
  opacity: 0;
}

/* ================= DETALLE DE ACTIVIDADES (BOTTOM SHEET ADAPTABLE) ================= */
.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  max-height: min(60vh, 60dvh);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-top: 1px solid var(--border-bright);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 36px rgba(0, 0, 0, 0.65);
  transform: translateY(105%);
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  width: 100%;
  box-sizing: border-box;
}
.sheet.open {
  transform: translateY(0);
}
.sheet.expanded {
  max-height: min(88vh, 88dvh);
}

.sheet-handle {
  background: none;
  border: none;
  padding: 0.6rem 0 0.3rem;
  width: 100%;
}
.sheet-handle span {
  display: block;
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
  margin: 0 auto;
}

.sheet-header {
  padding: 0.2rem clamp(0.8rem, 4vw, 1.2rem) 0.6rem;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.sheet-tag {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: clamp(0.66rem, 2.5vw, 0.72rem);
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sheet-tag b {
  color: #fff;
}
.sheet-header h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(0.95rem, 3.8vw, 1.15rem);
  font-weight: 800;
  line-height: 1.25;
}
.sheet-sub {
  margin: 0.3rem 0 0;
  font-size: clamp(0.72rem, 2.6vw, 0.78rem);
  color: var(--muted);
  line-height: 1.4;
}

.sheet-body {
  overflow-y: auto;
  padding: 0.7rem clamp(0.8rem, 4vw, 1.2rem) 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  -webkit-overflow-scrolling: touch;
}

.act-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--inter);
  border-radius: 12px;
  padding: clamp(0.6rem, 2vw, 0.8rem);
}
.act-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.4rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.18rem 0.55rem 0.18rem 0.3rem;
  font-size: clamp(0.64rem, 2.3vw, 0.7rem);
  font-weight: 800;
  color: #fff;
}
.badge.type {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  padding-left: 0.55rem;
  color: #e2e8f0;
}
.badge .ic {
  display: inline-flex;
}
.act-card h3 {
  margin: 0 0 0.4rem;
  font-size: clamp(0.88rem, 3.4vw, 1rem);
  font-weight: 800;
  line-height: 1.3;
}
.act-row {
  display: flex;
  gap: 0.5rem;
  font-size: clamp(0.74rem, 2.6vw, 0.8rem);
  color: #cbd5e1;
  line-height: 1.4;
  margin-top: 0.28rem;
}
.act-row .ri {
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}
.act-desc {
  margin: 0.45rem 0 0;
  font-size: clamp(0.74rem, 2.6vw, 0.8rem);
  color: var(--muted);
  line-height: 1.45;
}

.empty-box {
  text-align: center;
  padding: 1.1rem 0.8rem;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

/* Reducir realce hover en táctil: solo selección */
.pan-layer .room-group:hover .room-shape {
  filter: none;
}
.pan-layer .room-group.selected .room-shape {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.85));
}

/* ================= ESTILOS DEL PLANO SVG ================= */
.white-outline-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.plan-svg {
  width: 100%;
  max-height: 620px;
  height: auto;
  display: block;
  border-radius: 8px;
  user-select: none;
}

.plan-svg.night-svg {
  background: #060911;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.plan-svg.night-svg .street-label {
  fill: #64748B;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}
.plan-svg.night-svg .building-outline {
  fill: #0B0F1A;
  stroke: #FFFFFF;
  stroke-width: 2.5;
}
.plan-svg.night-svg .corridor-area {
  fill: #101726;
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1;
  stroke-dasharray: 4 2;
}
.plan-svg.night-svg .room-shape {
  fill: #131B2E;
  stroke: rgba(255, 255, 255, 0.35);
  stroke-width: 1.5;
  transition: all 0.18s ease;
}
.plan-svg.night-svg .service-room .room-shape {
  fill: #0D121F;
}
.plan-svg.night-svg .sanitario-room .room-shape {
  fill: #0F172A;
}
.plan-svg.night-svg .patio-room .room-shape {
  fill: #070A12;
  stroke-dasharray: 4 3;
}
.plan-svg.night-svg .room-label {
  fill: #F8FAFC;
  font-size: 9.5px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: middle;
  pointer-events: none;
}
.plan-svg.night-svg .room-label.small {
  font-size: 7.8px;
}

.room-group {
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.room-group:hover .room-shape {
  stroke: #FFFFFF !important;
  stroke-width: 3px !important;
}
.room-group.selected .room-shape {
  stroke: #FFFFFF !important;
  stroke-width: 3.5px !important;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
}
.room-group.dimmed {
  opacity: 0.22;
}

.pan-layer .plan-svg {
  width: auto;
  max-height: none;
}

/* ================= ADAPTACIÓN A TABLETS Y PANTALLAS ANCHAS (>= 640px) ================= */
@media (min-width: 640px) {
  .topbar, .controls {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    border-left: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }
  .cover-inner {
    max-width: 520px;
  }
  .sheet {
    left: 50%;
    right: auto;
    max-width: 520px;
    transform: translate(-50%, 105%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-bottom: none;
  }
  .sheet.open {
    transform: translate(-50%, 0);
  }
}

/* ================= ADAPTACIÓN A MODO HORIZONTAL (LANDSCAPE) EN CELULARES ================= */
@media (orientation: landscape) and (max-height: 550px) {
  .cover-inner {
    max-width: 820px;
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 1.2rem;
    align-items: center;
    text-align: left;
    padding-top: calc(0.6rem + env(safe-area-inset-top));
    padding-bottom: calc(0.8rem + env(safe-area-inset-bottom));
  }
  .cover-col-brand {
    align-items: flex-start;
  }
  .cover-welcome {
    text-align: left;
  }
  .cover-title {
    align-items: flex-start;
  }
  .t-noche {
    font-size: clamp(2rem, 6.5vw, 2.7rem);
  }
  .cover-divider {
    width: 100%;
  }
  .cover-info {
    gap: 0.35rem;
  }
  .cover-info li {
    padding: 0.38rem 0.6rem;
  }
  .cover-cta, .cover-drive-btn {
    min-height: 40px;
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
  }
  .topbar {
    padding-top: calc(0.3rem + env(safe-area-inset-top));
    padding-bottom: 0.3rem;
  }
  .controls {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
  }
  .sheet {
    max-height: 52dvh;
  }
  .sheet.expanded {
    max-height: 80dvh;
  }
}

/* ================= PANTALLAS MUY PEQUEÑAS (<= 360px) ================= */
@media (max-width: 360px) {
  .topbar-back-btn span {
    display: none;
  }
  .top-title span {
    display: none;
  }
  .topbar-drive-btn {
    padding: 0.3rem 0.45rem;
    font-size: 0.68rem;
  }
  .cover-info em {
    display: none;
  }
}

/* ================= MODAL FOLLETO OFICIAL A4 ================= */
.a4-modal {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: #040508;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s;
}
.a4-modal.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.a4-modal-header {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 2vw, 0.8rem);
  padding: calc(0.45rem + env(safe-area-inset-top)) clamp(0.6rem, 3vw, 1rem) 0.45rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.a4-header-text {
  flex: 1;
  min-width: 0;
}
.a4-header-text strong {
  display: block;
  font-size: clamp(0.85rem, 3vw, 0.98rem);
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.a4-header-text span {
  font-size: clamp(0.66rem, 2.5vw, 0.72rem);
  color: var(--muted);
  display: block;
}
.btn-print-a4 {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem clamp(0.55rem, 2vw, 0.85rem);
  border-radius: 8px;
  background: #fff;
  color: #06121a;
  font-size: clamp(0.72rem, 2.5vw, 0.8rem);
  font-weight: 800;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
}
.btn-print-a4:active {
  background: #22D3EE;
}
.a4-modal-tabs {
  display: flex;
  background: var(--panel);
  padding: 0.35rem clamp(0.6rem, 3vw, 1rem) 0.45rem;
  border-bottom: 1px solid var(--line);
  gap: 0.35rem;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}
.a4-modal-tabs::-webkit-scrollbar {
  display: none;
}
.a4-tab {
  flex: 1;
  min-width: 100px;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: #cbd5e1;
  font-size: clamp(0.7rem, 2.5vw, 0.76rem);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.a4-tab.active {
  background: #22D3EE;
  color: #060911;
  border-color: #22D3EE;
}
.a4-modal-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 1rem clamp(0.5rem, 3vw, 1.2rem) calc(2rem + env(safe-area-inset-bottom));
}
.a4-sheets-wrapper {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ================= HOJAS A4 DEL FOLLETO ================= */
.pdf-sheet {
  background-color: #060911;
  background-image:
    radial-gradient(1.5px 1.5px at 28px 34px, rgba(255, 255, 255, 0.9), transparent),
    radial-gradient(1px 1px at 94px 82px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.8px 1.8px at 168px 26px, rgba(255, 255, 255, 0.95), transparent),
    radial-gradient(1.1px 1.1px at 242px 124px, rgba(226, 232, 240, 0.75), transparent),
    radial-gradient(1.5px 1.5px at 318px 58px, rgba(255, 255, 255, 0.85), transparent);
  background-size: 520px 180px;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: clamp(0.8rem, 3vw, 1.4rem);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.75);
}

.pdf-night-poster-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  padding-bottom: 0.8rem;
  margin-bottom: 0.9rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.22);
}

.pdf-maps-side-by-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 680px) {
  .pdf-maps-side-by-side {
    grid-template-columns: 1fr;
  }
}

.references-columns {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.8rem;
  align-items: center;
  font-size: 0.74rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}
@media (max-width: 680px) {
  .references-columns {
    grid-template-columns: 1fr;
  }
}

.ref-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.2rem 0.5rem;
}
.ref-list li {
  line-height: 1.35;
  color: #cbd5e1;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: clamp(0.7rem, 2.2vw, 0.78rem);
}
.schedule-table th,
.schedule-table td {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.42rem 0.55rem;
  text-align: left;
  vertical-align: top;
}
.schedule-table th {
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: #22D3EE;
}

.brochure-gov-footer {
  margin-top: 1.1rem;
  padding: 0.75rem 1rem;
  background: rgba(7, 10, 18, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  color: #cbd5e1;
}
.brochure-gov-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.brochure-gov-logos img {
  max-height: 38px !important;
  width: auto !important;
  max-width: 240px !important;
  object-fit: contain;
  display: block;
}
.gov-cpe-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.35);
}

.prof-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.16rem 0.5rem;
  border-radius: 99px;
  color: #FFFFFF;
}
.prof-badge.teatro { background: var(--teatro); }
.prof-badge.musica { background: var(--musica); }
.prof-badge.visuales { background: var(--visuales); }
.prof-badge.interdisciplinario { background: #475569; }

/* ================= REGLAS DE IMPRESIÓN A4 ================= */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    overflow: visible !important;
  }
  .no-print, .cover, .app, .a4-modal-header, .a4-modal-tabs {
    display: none !important;
  }
  .a4-modal {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent !important;
    overflow: visible !important;
  }
  .a4-modal-scroll {
    padding: 0 !important;
    overflow: visible !important;
  }
  .a4-sheets-wrapper {
    max-width: 100% !important;
    gap: 0 !important;
  }
  .pdf-sheet {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 10mm !important;
    page-break-after: always;
    break-after: page;
  }
}
/* ================= VISTA DE FICHAS MÓVILES PARA LA GRILLA DE ACTIVIDADES ================= */
.schedule-view-switcher {
  display: flex;
  gap: 0.5rem;
  margin: 0.6rem 0 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.sched-switch-btn {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: #cbd5e1;
  font-size: clamp(0.72rem, 2.5vw, 0.8rem);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sched-switch-btn.active {
  background: #22D3EE;
  color: #060911;
  border-color: #22D3EE;
  box-shadow: 0 2px 10px rgba(34, 211, 238, 0.35);
}

.sched-section-h3 {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.92rem, 3.2vw, 1.1rem);
  font-weight: 800;
  color: #22D3EE;
  text-align: center;
  margin: 1.2rem 0 0.6rem;
}

.mob-schedule-cards-view {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.mob-schedule-space-card {
  background: rgba(13, 17, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  overflow: hidden;
}

.mob-space-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.mob-space-pill {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 6px;
  background: #22D3EE;
  color: #060911;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}
.mob-space-header strong {
  font-size: clamp(0.8rem, 3vw, 0.9rem);
  color: #fff;
  flex: 1;
}

.mob-space-acts {
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mob-space-act-item {
  background: rgba(19, 27, 46, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid #fff;
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
}

.mob-act-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}
.mob-act-time {
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
}

.mob-act-name {
  font-size: clamp(0.85rem, 3.2vw, 0.95rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 0.25rem;
}
.mob-act-prof {
  font-size: 0.75rem;
  color: #cbd5e1;
  margin-bottom: 0.2rem;
}
.mob-act-details {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
}

/* ================= CONTENEDOR DESLIZABLE DE LA TABLA A4 ================= */
.schedule-table-wrap {
  width: 100%;
}
.table-scroll-hint {
  text-align: center;
  font-size: 0.72rem;
  color: #22D3EE;
  background: rgba(34, 211, 238, 0.1);
  border: 1px dashed rgba(34, 211, 238, 0.35);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  margin-bottom: 0.6rem;
}
.schedule-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.schedule-table-scroll .schedule-table {
  min-width: 620px;
}

/* Adaptación del footer oficial para que el escudo y el texto del consejo estén siempre juntos */
.brochure-gov-footer .gov-cpe-cluster {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
  padding: 0.35rem 0.75rem;
}
/* Botón pequeño de cierre para volver fácil al mapa */
.sheet-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: all 0.2s ease;
}
.sheet-close-btn:hover,
.sheet-close-btn:active {
  background: rgba(239, 68, 68, 0.85);
  border-color: #f87171;
  color: #ffffff;
  transform: scale(1.08);
}

/* ================= ESTILOS ESPECÍFICOS PARA ESTACIÓN C: ISES ================= */
.a4-tab.a4-tab-ises.active {
  background: #10B981 !important;
  color: #060911 !important;
  border-color: #34D399 !important;
}

.ises-plan-svg .room-group:hover .room-shape {
  filter: drop-shadow(0 0 10px rgba(52, 211, 153, 0.65));
}

.ises-plan-svg .room-group.selected .room-shape {
  filter: drop-shadow(0 0 12px rgba(251, 191, 36, 0.95)) !important;
}

.ises-room-escenario:hover .room-shape {
  filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.75));
}

@media print {
  body.modal-open .top-header,
  body.modal-open .container,
  body.modal-open .site-footer {
    display: none !important;
  }
}

