/* ============================================================
   SILIENTE — EXPERIENCIA VIRTUAL v3
   ============================================================ */

:root {
  --bg-deep: #061c2a;
  --bg-main: #082638;
  --bg-panel: #082b3e;

  --border: rgba(91, 190, 226, 0.26);
  --grid-minor: rgba(77, 156, 190, 0.06);
  --grid-major: rgba(77, 156, 190, 0.12);

  --text-main: #f7fbff;
  --text-soft: #9eacb8;

  --green: #45ef98;
  --blueprint: #47a6ce;

  --red: #e8242a;
  --yellow: #dc7900;
  --medical: #2867e8;
  --evacuation: #16a34a;

  --shadow-panel: 0 24px 80px rgba(0, 0, 0, 0.34);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg-deep);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text-main);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background:
    radial-gradient(circle at 60% 32%, rgba(22, 101, 126, 0.22), transparent 34%),
    linear-gradient(180deg, #061c2a 0%, #082638 100%);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

/* ============================================================
   AVISO SUPERIOR
   ============================================================ */

.demo-banner {
  position: sticky;
  top: 0;
  z-index: 80;

  display: flex;
  justify-content: center;
  align-items: center;

  min-height: 36px;
  padding: 8px 18px;

  color: #d9f8e8;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-align: center;

  background: #082a2b;
  border-bottom: 1px solid rgba(69, 239, 152, 0.28);
}

/* ============================================================
   BLOQUEO PARA MÓVIL
   ============================================================ */

.device-blocker {
  position: fixed;
  inset: 36px 0 0;
  z-index: 95;

  display: none;
  place-items: center;

  padding: 20px;

  background: rgba(2, 14, 22, 0.96);
  backdrop-filter: blur(10px);
}

.device-blocker.is-visible {
  display: grid;
}

.device-blocker__card {
  width: min(640px, 100%);
  padding: 36px;

  background:
    linear-gradient(
      145deg,
      rgba(11, 47, 66, 0.98),
      rgba(5, 29, 43, 0.98)
    );

  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-panel);
}

.device-blocker h1 {
  margin: 14px 0 12px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
}

.device-blocker p {
  margin-bottom: 24px;
  color: #cad6de;
  line-height: 1.55;
}

.eyebrow {
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

/* ============================================================
   MODALES
   ============================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;

  display: none;
  place-items: center;

  padding: 24px;

  background: rgba(1, 13, 22, 0.84);
  backdrop-filter: blur(14px);
}

.modal-backdrop.is-visible {
  display: grid;
}

.intro-modal,
.alert-confirmation {
  width: min(720px, 100%);

  color: var(--text-main);

  background:
    linear-gradient(
      145deg,
      rgba(11, 47, 66, 0.98),
      rgba(5, 29, 43, 0.98)
    );

  border: 1px solid var(--border);
  box-shadow: var(--shadow-panel);
}

.intro-modal {
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
}

.modal-eyebrow,
.experience-header__eyebrow,
.device-panel__eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;

  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.status-dot {
  width: 10px;
  height: 10px;

  flex: 0 0 auto;

  background: var(--green);
  border-radius: 50%;

  box-shadow:
    0 0 0 7px rgba(69, 239, 152, 0.1),
    0 0 18px rgba(69, 239, 152, 0.85);
}

.intro-modal h1 {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1;
}

.intro-modal p,
.intro-modal li {
  color: #c4d0d9;
  line-height: 1.55;
}

.intro-modal ul {
  display: grid;
  gap: 9px;

  margin: 22px 0;
  padding-left: 22px;
}

.consent-check {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: flex-start;

  padding: 16px;

  color: #e7f2f8;
  line-height: 1.45;

  background: rgba(69, 239, 152, 0.06);
  border: 1px solid rgba(69, 239, 152, 0.2);
  border-radius: var(--radius-sm);

  cursor: pointer;
}

.consent-check input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--green);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;

  margin-top: 24px;
}

.button {
  min-height: 48px;
  padding: 0 20px;

  font-weight: 800;
  text-decoration: none;

  border: 0;
  border-radius: 999px;

  cursor: pointer;

  transition:
    transform 150ms ease,
    opacity 150ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.button--primary {
  color: #032113;
  background: var(--green);
}

.button--secondary {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.button--danger {
  color: #fff;
  background: var(--red);
}

.alert-confirmation {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;

  padding: 28px;

  border-radius: var(--radius-md);
}

.alert-confirmation__icon {
  display: grid;
  place-items: center;

  width: 48px;
  height: 48px;

  color: #fff;
  font-size: 1.4rem;
  font-weight: 900;

  background: var(--red);
  border-radius: 50%;
}

.alert-confirmation h2 {
  margin: 0 0 6px;
}

.alert-confirmation p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

.alert-confirmation .modal-actions {
  grid-column: 1 / -1;
  margin-top: 4px;
}

/* ============================================================
   ESTRUCTURA GENERAL
   ============================================================ */

.experience-shell {
  width: min(1740px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 54px;
}

.experience-shell[aria-hidden="true"] {
  filter: blur(3px);
  pointer-events: none;
  user-select: none;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  align-items: flex-start;

  margin-bottom: 28px;
}

.experience-header h1 {
  margin: 12px 0 8px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.experience-header p {
  max-width: 700px;
  margin: 0;

  color: var(--text-soft);
  line-height: 1.55;
}

.system-card {
  min-width: 320px;
  padding: 24px 26px;

  background: rgba(3, 26, 39, 0.78);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.system-card span,
.system-card strong,
.system-card small {
  display: block;
}

.system-card span {
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.system-card strong {
  margin: 16px 0 4px;

  color: var(--green);
  font-size: 1.8rem;
}

.system-card small {
  color: var(--text-soft);
}

.experience-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.experience-layout.has-device {
  grid-template-columns: minmax(0, 1fr) minmax(390px, 440px);
}

.map-card,
.device-panel {
  background: rgba(3, 26, 39, 0.74);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

.map-card {
  overflow: hidden;
}

.map-card__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;

  padding: 20px 24px;

  border-bottom: 1px solid var(--border);
}

.map-card__label {
  color: var(--green);
  font-size: 0.69rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.map-card__toolbar h2 {
  margin: 4px 0 0;
  font-size: 1.25rem;
}

.map-tools {
  display: flex;
  gap: 10px;
}

.map-tool {
  padding: 10px 14px;

  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 800;

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;

  cursor: pointer;
}

.map-wrapper {
  position: relative;
  min-height: 720px;
  overflow: auto;

  background:
    radial-gradient(circle at center, rgba(22, 106, 130, 0.18), transparent 55%),
    #082638;
}

.school-map {
  display: block;
  width: 100%;
  min-width: 1180px;
  height: auto;
}

.map-disclaimer {
  position: absolute;
  z-index: 8;
  top: 18px;
  right: 18px;

  width: min(320px, calc(100% - 36px));
  padding: 12px 14px;

  background: rgba(3, 26, 39, 0.9);
  border: 1px solid rgba(69, 239, 152, 0.2);
  border-radius: 12px;

  backdrop-filter: blur(10px);
}

.map-disclaimer strong,
.map-disclaimer span {
  display: block;
}

.map-disclaimer strong {
  margin-bottom: 3px;
  color: var(--green);
  font-size: 0.78rem;
}

.map-disclaimer span {
  color: #b8c8d2;
  font-size: 0.68rem;
  line-height: 1.4;
}

.person-tooltip {
  position: fixed;
  z-index: 90;

  display: none;

  min-width: 210px;
  padding: 11px 13px;

  color: #fff;

  background: rgba(3, 26, 39, 0.97);
  border: 1px solid rgba(69, 239, 152, 0.25);
  border-radius: 10px;

  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);

  pointer-events: none;
}

.person-tooltip.is-visible {
  display: block;
}

.person-tooltip strong,
.person-tooltip span {
  display: block;
}

.person-tooltip strong {
  margin-bottom: 3px;
}

.person-tooltip span {
  color: var(--text-soft);
  font-size: 0.78rem;
}

/* ============================================================
   MAPA SVG
   ============================================================ */

.grid-line {
  fill: none;
}

.grid-line--minor {
  stroke: var(--grid-minor);
  stroke-width: 1;
}

.grid-line--major {
  stroke: var(--grid-major);
  stroke-width: 1.2;
}

.street {
  fill: rgba(2, 20, 30, 0.84);
  stroke: rgba(71, 166, 206, 0.22);
  stroke-width: 2;
}

.street-name {
  fill: rgba(158, 201, 220, 0.55);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 4px;
}

.street-name--vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.site-boundary {
  fill: rgba(10, 49, 68, 0.12);
  stroke: rgba(71, 166, 206, 0.82);
  stroke-width: 4;
  stroke-dasharray: 14 8;
}

.parking,
.landscape,
.open-area,
.yard {
  fill: rgba(7, 41, 58, 0.22);
  stroke: rgba(71, 166, 206, 0.48);
  stroke-width: 3;
}

.site-path {
  fill: none;
  stroke: rgba(71, 166, 206, 0.18);
  stroke-width: 16;
}

.area-label,
.sector-title,
.building-title,
.room-label {
  fill: rgba(216, 240, 249, 0.86);
  font-weight: 800;
}

.area-label {
  font-size: 15px;
  letter-spacing: 1.3px;
}

.sector-title {
  font-size: 18px;
  letter-spacing: 2px;
}

.sector-title--large {
  font-size: 28px;
  letter-spacing: 5px;
}

.court {
  fill: rgba(7, 41, 58, 0.42);
  stroke: rgba(71, 166, 206, 0.72);
  stroke-width: 3;
}

.court-line {
  fill: none;
  stroke: rgba(71, 166, 206, 0.48);
  stroke-width: 2;
}

.central-yard {
  fill: rgba(9, 58, 72, 0.48);
  stroke: rgba(71, 166, 206, 0.72);
  stroke-width: 4;
}

.stage {
  fill: rgba(71, 166, 206, 0.14);
  stroke: rgba(71, 166, 206, 0.52);
  stroke-width: 2;
}

.building > rect,
.building > path {
  fill: rgba(7, 41, 58, 0.62);
  stroke: rgba(71, 166, 206, 0.94);
  stroke-width: 4;
}

.building line {
  stroke: rgba(71, 166, 206, 0.56);
  stroke-width: 2.5;
}

.building-title {
  font-size: 18px;
  letter-spacing: 2px;
}

.map-room rect {
  fill: rgba(7, 41, 58, 0.52);
  stroke: rgba(71, 166, 206, 0.58);
  stroke-width: 2.5;
}

.room-label {
  font-size: 14px;
}

.corridor {
  fill: none;
  stroke: rgba(124, 214, 255, 0.24);
  stroke-width: 28;
  stroke-linecap: square;
}

.safe-zone rect {
  fill: rgba(69, 239, 152, 0.08);
  stroke: rgba(69, 239, 152, 0.7);
  stroke-width: 3;
  stroke-dasharray: 9 6;
}

.safe-zone text {
  fill: rgba(122, 255, 184, 0.88);
  font-size: 15px;
  font-weight: 800;
}

.door {
  fill: #d9f7ff;
  stroke: var(--blueprint);
  stroke-width: 3;
}

/* Red técnica oculta */
.navigation-edge,
.navigation-node {
  opacity: 0;
  pointer-events: none;
}

body.debug-map .navigation-edge,
body.debug-map .navigation-node {
  opacity: 1;
}

.navigation-edge {
  fill: none;
  stroke: #ffdd57;
  stroke-width: 3;
  stroke-dasharray: 8 6;
}

.navigation-node {
  fill: #ffdd57;
  stroke: #1a1a1a;
  stroke-width: 2;
}

/* Personas */
.person-node {
  cursor: pointer;
  outline: none;
}

.person-hitbox {
  fill: transparent;
}

.person-glow {
  fill: rgba(69, 239, 152, 0.45);
}

.person-core {
  fill: #d8ffe9;
  stroke: var(--green);
  stroke-width: 4;

  transition:
    transform 180ms ease,
    fill 180ms ease,
    stroke 180ms ease;

  transform-box: fill-box;
  transform-origin: center;
}

.person-node:hover .person-core,
.person-node:focus .person-core,
.person-node.is-selected .person-core {
  transform: scale(1.55);
}

.person-node.is-selected .person-glow {
  fill: rgba(69, 239, 152, 0.82);
}

.person-node.is-yellow .person-core {
  fill: #fff3a3;
  stroke: var(--yellow);
}

.person-node.is-medical .person-core {
  fill: #dce8ff;
  stroke: var(--medical);
}

.person-node.is-red .person-core {
  fill: #ffdede;
  stroke: var(--red);
}

.person-node.is-evacuation .person-core {
  fill: #dfffe8;
  stroke: var(--evacuation);
}

/* Marcador de alerta */
.active-alert-marker {
  opacity: 0;
  pointer-events: none;
}

.active-alert-marker.is-active {
  opacity: 1;
}

.alert-core {
  fill: #fff;
  stroke: var(--red);
  stroke-width: 9;
}

.alert-wave {
  fill: none;
  stroke: rgba(232, 36, 42, 0.44);
  stroke-width: 4;

  transform-box: fill-box;
  transform-origin: center;

  animation: alertPulse 1.8s ease-out infinite;
}

.alert-wave--2 {
  animation-delay: 0.35s;
}

.alert-wave--3 {
  animation-delay: 0.7s;
}

@keyframes alertPulse {
  0% {
    opacity: 0.85;
    transform: scale(0.55);
  }

  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

/* Estado inferior */
.map-status {
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);

  padding: 18px 22px;

  background: rgba(2, 21, 31, 0.88);
  border-top: 1px solid var(--border);
}

.map-status > div {
  display: flex;
  gap: 12px;
  align-items: center;

  min-height: 48px;
  padding: 0 20px;

  border-right: 1px solid rgba(122, 176, 201, 0.18);
}

.map-status > div:first-child {
  padding-left: 0;
}

.map-status > div:last-child {
  border-right: 0;
}

.map-status strong,
.map-status small {
  display: block;
}

.map-status strong {
  font-size: 0.86rem;
}

.map-status small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.7rem;
}

.map-status__dot {
  width: 14px;
  height: 14px;

  flex: 0 0 auto;

  background: var(--green);
  border: 4px solid rgba(69, 239, 152, 0.18);
  border-radius: 50%;

  box-shadow: 0 0 18px rgba(69, 239, 152, 0.7);
}

/* ============================================================
   PANEL LATERAL
   ============================================================ */

.device-panel {
  position: sticky;
  top: 58px;

  display: none;

  padding: 18px;
}

.device-panel.is-open {
  display: block;
  animation: panelEnter 260ms ease both;
}

@keyframes panelEnter {
  from {
    opacity: 0;
    transform: translateX(28px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.device-panel__header {
  display: flex;
  justify-content: space-between;
  gap: 14px;

  padding: 4px 4px 16px;
}

.device-panel__header h2 {
  margin: 5px 0 4px;
  font-size: 1.15rem;
}

.device-panel__header p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.78rem;
}

.device-panel__close {
  width: 38px;
  height: 38px;

  color: #fff;
  font-size: 1.5rem;

  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;

  cursor: pointer;
}

/* ============================================================
   TELÉFONO
   ============================================================ */

.phone-frame {
  padding: 9px;

  background: #10141a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 35px;

  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45);
}

.phone-screen {
  max-height: min(790px, calc(100vh - 155px));
  overflow-y: auto;

  color: #151c2f;
  background: #f2f4f7;
  border-radius: 27px;

  scrollbar-width: thin;
}

.phone-statusbar {
  display: flex;
  justify-content: space-between;

  padding: 12px 18px;

  color: #fff;
  font-size: 0.73rem;

  background: #111a34;
}

.phone-appbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;

  min-height: 66px;
  padding: 0 18px;

  color: #fff;
  background: #111a34;
}

.phone-appbar strong {
  font-size: 1.46rem;
  letter-spacing: 0.02em;
}

.phone-appbar span:last-child {
  justify-self: end;
}

.phone-content {
  padding: 12px 14px 26px;
}

.phone-card {
  width: 100%;
  padding: 18px;

  text-align: left;

  background: #fff;
  border: 0;
  border-radius: 23px;

  box-shadow: 0 8px 26px rgba(28, 44, 70, 0.08);
}

.phone-card h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.phone-card p {
  margin: 0;
  color: #556074;
  font-size: 0.88rem;
  line-height: 1.5;
}

.protocol-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;

  margin-top: 13px;

  color: #11172a;
}

.phone-section-title {
  margin: 20px 2px 12px;
  font-size: 1.32rem;
}

.phone-tip {
  margin-bottom: 12px;
  padding: 10px 12px;

  color: #2f3f55;
  font-size: 0.78rem;
  line-height: 1.4;

  background: #e7eef8;
  border-left: 4px solid #3d68d9;
  border-radius: 14px;

  box-shadow: 0 6px 16px rgba(22, 44, 70, 0.06);

  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.phone-tip.is-highlighted {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(22, 44, 70, 0.12);
}

/* ============================================================
   BOTONES DESLIZABLES
   ============================================================ */

.alert-slider {
  display: grid;
  gap: 13px;

  margin-bottom: 12px;
  padding: 17px;

  color: #fff;

  border-radius: 24px;
  box-shadow: 0 8px 22px rgba(22, 33, 60, 0.14);
}

.alert-slider--red {
  background: var(--red);
}

.alert-slider--yellow {
  background: var(--yellow);
}

.alert-slider--medical {
  background: var(--medical);
}

.alert-slider--evacuation {
  background: var(--evacuation);
}

.alert-slider__text strong,
.alert-slider__text span {
  display: block;
}

.alert-slider__text strong {
  font-size: 1.12rem;
}

.alert-slider__text span {
  margin-top: 3px;
  font-size: 0.83rem;
  font-weight: 700;
  opacity: 0.9;
}

.alert-slider__track {
  position: relative;

  display: flex;
  align-items: center;

  height: 48px;
  overflow: hidden;

  background: rgba(255, 255, 255, 0.23);
  border-radius: 999px;

  touch-action: none;
}

.alert-slider__progress {
  position: absolute;
  inset: 0 auto 0 0;

  width: 0%;

  background: rgba(255, 255, 255, 0.32);

  transition: width 80ms linear;
}

.alert-slider__counter {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  color: rgba(255, 255, 255, 0.95);
  font-size: 0.92rem;
  font-weight: 900;
  letter-spacing: 0.04em;

  pointer-events: none;
}

.alert-slider__handle {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;

  display: grid;
  place-items: center;

  width: 40px;
  height: 40px;

  color: #253044;
  font-size: 1.45rem;
  font-weight: 900;

  background: #fff;
  border: 0;
  border-radius: 50%;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);

  cursor: grab;
  touch-action: none;
}

.alert-slider__handle:active {
  cursor: grabbing;
}

.alert-slider.is-holding .alert-slider__handle {
  box-shadow:
    0 0 0 5px rgba(255, 255, 255, 0.25),
    0 4px 12px rgba(0, 0, 0, 0.16);
}

.alert-slider.is-complete {
  outline: 4px solid rgba(255, 255, 255, 0.45);
}

.phone-help {
  margin: 14px 8px 0;

  color: #677287;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1480px) {
  .experience-layout.has-device {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 420px);
  }
}

@media (max-width: 1260px) {
  .experience-header {
    display: grid;
  }

  .system-card {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .demo-banner {
    font-size: 0.61rem;
    letter-spacing: 0.09em;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .intro-modal {
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  .modal-actions {
    display: grid;
  }

  .button {
    display: grid;
    place-items: center;
    width: 100%;
  }
}

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}


/* ============================================================
   V4 — MAPA BASADO EN RED DE CAMINOS
   ============================================================ */

.walkway {
  fill: none;
  stroke: rgba(104, 197, 235, 0.22);
  stroke-width: 44;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.walkway--secondary {
  stroke-width: 34;
  stroke: rgba(104, 197, 235, 0.16);
}

.walk-junction {
  fill: rgba(104, 197, 235, 0.18);
  stroke: rgba(104, 197, 235, 0.35);
  stroke-width: 2;
}

.walk-junction--small {
  fill: rgba(104, 197, 235, 0.12);
}

.map-car rect {
  fill: rgba(208, 226, 236, 0.48);
  stroke: rgba(208, 226, 236, 0.7);
  stroke-width: 2;
}

.map-car circle {
  fill: rgba(8, 38, 55, 0.95);
}

.small-building .building-title {
  font-size: 14px;
}

#walk-network-layer {
  pointer-events: none;
}

#building-a,
#building-b,
#building-c,
#administration-building,
#building-gym,
#casino,
#library,
#infirmary {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.08));
}


/* ============================================================
   V5 — DIRECCIÓN VISUAL PROFESIONAL DEL MAPA
   ============================================================ */

.school-map {
  background:
    radial-gradient(circle at 56% 48%, rgba(22, 93, 116, 0.13), transparent 45%),
    linear-gradient(180deg, rgba(4, 29, 43, 0.12), rgba(4, 29, 43, 0.02));
}

.urban-base {
  fill: rgba(4, 24, 35, 0.18);
}

.grid-line--minor {
  stroke: rgba(77, 156, 190, 0.035);
}

.grid-line--major {
  stroke: rgba(77, 156, 190, 0.075);
}

.site-boundary {
  stroke-width: 3;
  stroke-dasharray: 10 9;
  fill: rgba(10, 49, 68, 0.08);
}

.walkway {
  stroke: rgba(102, 196, 232, 0.16);
  stroke-width: 22;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.walkway--secondary {
  stroke-width: 14;
  stroke: rgba(102, 196, 232, 0.11);
}

.walk-junction {
  r: 18;
  fill: rgba(102, 196, 232, 0.12);
  stroke: rgba(102, 196, 232, 0.25);
  stroke-width: 1.5;
}

.walk-junction--small {
  fill: rgba(102, 196, 232, 0.08);
}

.building > rect,
.building > path {
  fill: rgba(7, 41, 58, 0.54);
  stroke: rgba(71, 166, 206, 0.76);
  stroke-width: 3;
}

.map-room rect {
  fill: rgba(7, 41, 58, 0.38);
  stroke: rgba(71, 166, 206, 0.42);
  stroke-width: 1.8;
}

.building line {
  stroke: rgba(71, 166, 206, 0.38);
  stroke-width: 1.8;
}

.central-yard,
.open-area,
.parking,
.landscape {
  fill: rgba(7, 41, 58, 0.14);
  stroke: rgba(71, 166, 206, 0.36);
  stroke-width: 2.5;
}

.court {
  fill: rgba(7, 41, 58, 0.2);
  stroke: rgba(71, 166, 206, 0.52);
  stroke-width: 2.2;
}

.stage {
  fill: rgba(71, 166, 206, 0.1);
  stroke: rgba(71, 166, 206, 0.28);
  stroke-width: 1.5;
}

.sector-title {
  font-size: 16px;
  letter-spacing: 2.4px;
  fill: rgba(216, 240, 249, 0.72);
}

.sector-title--large {
  font-size: 25px;
  letter-spacing: 5px;
}

.building-title {
  font-size: 15px;
  letter-spacing: 2px;
  fill: rgba(216, 240, 249, 0.78);
}

.room-label {
  font-size: 12px;
  fill: rgba(216, 240, 249, 0.72);
}

.area-label {
  font-size: 13px;
  fill: rgba(216, 240, 249, 0.66);
}

.safe-zone rect {
  fill: rgba(69, 239, 152, 0.04);
  stroke: rgba(69, 239, 152, 0.48);
  stroke-width: 2.2;
  stroke-dasharray: 8 7;
}

.safe-zone text {
  font-size: 13px;
  fill: rgba(122, 255, 184, 0.72);
}

.street-name {
  font-size: 15px;
  fill: rgba(158, 201, 220, 0.42);
}

.map-car rect {
  fill: rgba(208, 226, 236, 0.34);
  stroke: rgba(208, 226, 236, 0.5);
  stroke-width: 1.5;
}

.person-glow {
  fill: rgba(69, 239, 152, 0.34);
}

.person-core {
  stroke-width: 3;
}

.door {
  r: 4;
  fill: rgba(214, 247, 255, 0.78);
  stroke-width: 2;
}

.navigation-edge {
  stroke-width: 2;
  stroke-dasharray: 7 7;
}

.navigation-node {
  r: 6;
}

#administration-sector,
#sports-sector,
#academic-west-sector,
#central-sector,
#academic-east-sector {
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.07));
}


/* ============================================================
   V6 — SEGUIMIENTO DE EVENTO Y ANIMACIÓN OPERATIVA
   ============================================================ */

.event-view[hidden] {
  display: none;
}

.event-view {
  min-height: 100%;
  padding-bottom: 18px;
}

.event-view__header {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  margin: 0 -2px 18px;
  color: #111a31;
}

.event-view__header strong {
  text-align: center;
  font-size: 1.18rem;
}

.event-back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: #111a31;
  font-size: 1.45rem;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.event-alert-title {
  margin: 2px 0 16px;
  font-size: 1.72rem;
  line-height: 1;
  text-align: center;
  letter-spacing: 0.02em;
}

.event-protocol {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 16px;
  color: #172039;
  background: rgba(37, 103, 232, 0.08);
  border: 1px solid currentColor;
  border-radius: 20px;
}

.event-protocol__icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  font-size: 1rem;
  font-weight: 900;
  border-radius: 50%;
}

.event-protocol p {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.45;
}

.event-origin-card,
.event-update-card,
.event-history {
  margin-bottom: 14px;
  padding: 16px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(28, 44, 70, 0.07);
}

.event-origin-card {
  display: grid;
  gap: 10px;
}

.event-origin-card strong {
  color: #151c2f;
  font-size: 0.84rem;
  line-height: 1.35;
}

.event-origin-card span {
  font-weight: 800;
}

.event-update-card label {
  display: block;
  margin-bottom: 10px;
  color: #151c2f;
  font-size: 0.86rem;
  font-weight: 850;
}

.event-update-card textarea {
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 92px;
  padding: 12px;
  color: #30394b;
  font-size: 0.82rem;
  line-height: 1.4;
  background: #fff;
  border: 1px solid #7d8492;
  border-radius: 8px;
}

.event-update-card button,
.event-notified-button {
  width: 100%;
  min-height: 46px;
  color: #fff;
  font-weight: 800;
  background: #4c66a0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.event-update-card button {
  margin-top: 12px;
}

.event-notified-button {
  margin-bottom: 14px;
}

.event-history h3 {
  margin: 0 0 14px;
  color: #151c2f;
  font-size: 1rem;
}

.event-history__list {
  display: grid;
  gap: 10px;
}

.event-message {
  padding: 13px 14px;
  color: #172039;
  background: #f0f2f5;
  border-left: 4px solid var(--message-accent, #4c66a0);
  border-radius: 16px;
  opacity: 0;
  transform: translateY(10px);
  animation: eventMessageEnter 340ms ease forwards;
}

.event-message--command {
  background: #e9edf6;
}

.event-message--initial {
  background: #f4eef0;
}

.event-message strong,
.event-message span,
.event-message p {
  display: block;
}

.event-message strong {
  font-size: 0.82rem;
}

.event-message span {
  margin-top: 3px;
  color: #667085;
  font-size: 0.72rem;
}

.event-message p {
  margin: 9px 0 0;
  font-size: 0.82rem;
  line-height: 1.42;
}

@keyframes eventMessageEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.person-node {
  transition: opacity 180ms ease;
}

.person-node.is-notified .person-glow {
  opacity: 0.9;
}

.person-node.is-moving .person-core {
  animation: movingPulse 850ms ease-in-out infinite;
}

.person-node.is-arrived .person-core,
.person-node.is-sheltered .person-core {
  filter: drop-shadow(0 0 7px currentColor);
}

.person-node.is-arrived .person-glow,
.person-node.is-sheltered .person-glow {
  opacity: 0.95;
}

.person-node.is-reporting .person-core {
  animation: reportingFlash 520ms ease;
}

@keyframes movingPulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.55);
  }
}

@keyframes reportingFlash {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(2);
  }
}


/* ============================================================
   V7 — MOVIMIENTO CONTINUO POR PASILLOS
   ============================================================ */

.person-node.is-moving .person-glow {
  opacity: 1;
  animation: routeMovementGlow 900ms ease-in-out infinite;
}

.person-node.is-moving .person-core {
  animation: routeMovementCore 900ms ease-in-out infinite;
}

.person-node.is-sheltered .person-core {
  transform: scale(0.95);
}

@keyframes routeMovementGlow {
  0%,
  100% {
    opacity: 0.55;
  }

  50% {
    opacity: 1;
  }
}

@keyframes routeMovementCore {
  0%,
  100% {
    filter: drop-shadow(0 0 3px currentColor);
  }

  50% {
    filter: drop-shadow(0 0 10px currentColor);
  }
}


/* ============================================================
   V8 — SONIDO Y EXPLICACIÓN DINÁMICA
   ============================================================ */

.map-tool--sound {
  min-width: 112px;
}

.map-tool--sound.is-muted {
  color: rgba(247, 251, 255, 0.62);
  background: rgba(255, 255, 255, 0.035);
}

.simulation-narrative {
  position: absolute;
  z-index: 8;
  top: 128px;
  right: 18px;
  width: min(320px, calc(100% - 36px));
  padding: 14px 15px;
  color: var(--text-main);
  background:
    linear-gradient(
      145deg,
      rgba(5, 34, 48, 0.94),
      rgba(3, 26, 39, 0.9)
    );
  border: 1px solid rgba(88, 184, 218, 0.2);
  border-radius: 14px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(10px);
  transition:
    border-color 180ms ease,
    transform 180ms ease;
}

.simulation-narrative.is-active {
  transform: translateY(-2px);
  border-color: var(--narrative-color, rgba(69, 239, 152, 0.42));
}

.simulation-narrative__eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--narrative-color, var(--green));
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.15em;
}

.simulation-narrative strong {
  display: block;
  margin-bottom: 6px;
  font-size: 0.88rem;
  line-height: 1.3;
}

.simulation-narrative p {
  margin: 0;
  color: #b9c8d1;
  font-size: 0.72rem;
  line-height: 1.45;
}

.simulation-narrative__status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding-top: 10px;
  color: #dceaf1;
  font-size: 0.7rem;
  font-weight: 750;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.simulation-narrative__pulse {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  background: var(--narrative-color, var(--green));
  border-radius: 50%;
  box-shadow:
    0 0 0 5px rgba(69, 239, 152, 0.12),
    0 0 12px var(--narrative-color, var(--green));
}

.simulation-narrative.is-active .simulation-narrative__pulse {
  animation: narrativePulse 1.35s ease-in-out infinite;
}

@keyframes narrativePulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.15);
  }
}
