* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ffffff;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 28%),
    radial-gradient(circle at bottom right, rgba(0, 163, 255, 0.28), transparent 30%),
    linear-gradient(145deg, #06172f, #0a4f8f 45%, #12a8e0);
}

.app {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 18px 30px;
}

.hero {
  text-align: center;
  padding: 20px 0 18px;
}

.logo-box {
  width: 94px;
  height: 94px;
  margin: 0 auto 16px;
  padding: 10px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
}

.logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #06345d;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2rem, 9vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  text-wrap: balance;
  margin-bottom: 16px;
}

.intro {
  max-width: 430px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1rem;
  line-height: 1.45;
}

.recorrido {
  margin-top: 22px;
}

.recorrido h2,
.info h2 {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.cards {
  display: grid;
  gap: 12px;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 16px;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.18), transparent 45%);
  pointer-events: none;
}

.card:active {
  transform: scale(0.98);
}

.numero {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #073b66;
  background: #ffffff;
  font-weight: 900;
  font-size: 0.95rem;
}

.card h3 {
  font-size: 1.02rem;
  margin-bottom: 5px;
}

.card p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  line-height: 1.35;
}

.flecha {
  font-size: 1.7rem;
  font-weight: 800;
  opacity: 0.9;
}

.info {
  margin-top: 22px;
  padding: 18px;
  border-radius: 24px;
  color: #083155;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.info p {
  font-size: 0.95rem;
  line-height: 1.45;
}

footer {
  padding: 24px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
}

footer .mini {
  margin-top: 4px;
  opacity: 0.75;
}

/* ============================= */
/* SALAS AR */
/* ============================= */

.ar-body {
  min-height: 100vh;
  overflow: hidden;
  color: #ffffff;
  background: #06172f;
}

.camera-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  background: #06172f;
}

.fallback-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.22), transparent 25%),
    radial-gradient(circle at 80% 80%, rgba(0, 172, 255, 0.30), transparent 30%),
    linear-gradient(145deg, #06172f, #0a4f8f 45%, #12a8e0);
}

.fallback-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  animation: gridMove 12s linear infinite;
}

@keyframes gridMove {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(36px);
  }
}

.ar-layer {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  max-width: 520px;
  margin: 0 auto;
  padding: 14px 14px 18px;
  display: flex;
  flex-direction: column;
}

.ar-layer::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.45), transparent 28%, rgba(0,0,0,0.58)),
    radial-gradient(circle at center, transparent 30%, rgba(0,0,0,0.30));
  pointer-events: none;
}

.ar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #073b66;
  background: rgba(255, 255, 255, 0.92);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0,0,0,0.18);
}

.ar-logo-box {
  width: 54px;
  height: 54px;
  padding: 6px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

.ar-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ar-title {
  text-align: center;
  padding: 18px 6px 6px;
}

.ar-badge {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #06345d;
  background: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ar-title h1 {
  font-size: clamp(1.85rem, 8vw, 3rem);
  line-height: 0.95;
  margin-bottom: 8px;
  text-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.ar-title p {
  max-width: 360px;
  margin: 0 auto;
  color: rgba(255,255,255,0.88);
  font-size: 0.96rem;
  line-height: 1.35;
}

.postal-stage {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 14px 0;
  perspective: 1100px;
}

.postal-card {
  width: min(92vw, 390px);
  border-radius: 28px;
  overflow: hidden;
  color: #082d4e;
  background: rgba(255,255,255,0.94);
  box-shadow:
    0 26px 70px rgba(0,0,0,0.42),
    inset 0 0 0 1px rgba(255,255,255,0.35);
  transform-style: preserve-3d;
  animation: floatCard 4.6s ease-in-out infinite;
  transition: transform 0.65s ease, opacity 0.3s ease;
}

.postal-card.rotated {
  transform: rotateY(18deg) rotateX(4deg);
}

@keyframes floatCard {
  0%, 100% {
    translate: 0 0;
  }

  50% {
    translate: 0 -12px;
  }
}

.postal-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #d8f2ff, #ffffff);
  overflow: hidden;
}

.postal-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.06) contrast(1.04);
}

.postal-content {
  padding: 17px 18px 20px;
}

.postal-counter {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: #0a65a4;
  font-size: 0.76rem;
  font-weight: 900;
}

.postal-content h2 {
  font-size: 1.45rem;
  line-height: 1.05;
  margin-bottom: 9px;
  letter-spacing: -0.03em;
}

.postal-content p {
  color: #24435d;
  font-size: 1rem;
  line-height: 1.4;
}

.ar-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-bottom: 8px;
}

.control-btn {
  min-height: 48px;
  border: none;
  border-radius: 18px;
  font-size: 0.94rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(0,0,0,0.24);
}

.control-btn:active {
  transform: scale(0.97);
}

.control-btn.primary {
  color: #073b66;
  background: #ffffff;
}

.control-btn.secondary {
  color: #ffffff;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.24);
  backdrop-filter: blur(10px);
}

.ar-footer {
  text-align: center;
  color: rgba(255,255,255,0.74);
  font-size: 0.76rem;
  padding-top: 4px;
}

@media (max-height: 720px) {
  .ar-title {
    padding-top: 10px;
  }

  .ar-title h1 {
    font-size: 1.8rem;
  }

  .ar-title p {
    font-size: 0.86rem;
  }

  .postal-card {
    width: min(88vw, 340px);
  }

  .postal-content {
    padding: 13px 15px 15px;
  }

  .postal-content h2 {
    font-size: 1.25rem;
  }

  .postal-content p {
    font-size: 0.9rem;
  }

  .control-btn {
    min-height: 43px;
  }
}

/* ============================= */
/* SALA 3 - ROBOT GUÍA */
/* ============================= */

.robot-layer {
  overflow: hidden;
}

.robot-title h1 {
  font-size: clamp(1.7rem, 7.8vw, 2.8rem);
}

.robot-stage {
  flex: 1;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  padding: 10px 0 16px;
}

.robot-orbit {
  position: relative;
  width: min(66vw, 280px);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.robot-glow {
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(255,255,255,0.9), rgba(38,184,255,0.35) 42%, transparent 68%);
  filter: blur(4px);
  opacity: 0.9;
  animation: pulseGlow 2.8s ease-in-out infinite;
}

.robot-orbit::before {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.35);
  animation: spinOrbit 12s linear infinite;
}

.robot-orbit::after {
  content: "";
  position: absolute;
  bottom: 7%;
  width: 70%;
  height: 16%;
  border-radius: 50%;
  background: rgba(0,0,0,0.28);
  filter: blur(10px);
}

.robot-img {
  position: relative;
  z-index: 2;
  width: 82%;
  height: 82%;
  object-fit: contain;
  animation: robotFloat 4s ease-in-out infinite;
  filter: drop-shadow(0 22px 28px rgba(0,0,0,0.35));
}

.dialog-card {
  width: min(92vw, 410px);
  padding: 18px 18px 20px;
  border-radius: 28px;
  color: #082d4e;
  background: rgba(255,255,255,0.94);
  box-shadow:
    0 26px 70px rgba(0,0,0,0.38),
    inset 0 0 0 1px rgba(255,255,255,0.45);
  transform-origin: center;
  animation: dialogEnter 0.45s ease both;
}

.dialog-card.changing {
  animation: dialogChange 0.35s ease both;
}

.dialog-step {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: #0a65a4;
  font-size: 0.76rem;
  font-weight: 900;
}

.dialog-card h2 {
  font-size: 1.45rem;
  line-height: 1.05;
  margin-bottom: 9px;
  letter-spacing: -0.03em;
}

.dialog-card p {
  color: #24435d;
  font-size: 1rem;
  line-height: 1.45;
}

.robot-controls {
  grid-template-columns: 1fr 1fr;
}

@keyframes robotFloat {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-14px) rotate(1.5deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.72;
  }

  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes spinOrbit {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes dialogEnter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes dialogChange {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  50% {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-height: 720px) {
  .robot-orbit {
    width: min(52vw, 220px);
  }

  .dialog-card {
    padding: 14px 15px 16px;
  }

  .dialog-card h2 {
    font-size: 1.25rem;
  }

  .dialog-card p {
    font-size: 0.9rem;
  }
}

/* ============================= */
/* SALA 4 - FOTO PATRIA AR */
/* ============================= */

.foto-body {
  background: #06172f;
}

.foto-layer {
  overflow: hidden;
}

.foto-title {
  text-align: center;
  padding: 14px 6px 4px;
}

.foto-title h1 {
  font-size: clamp(1.9rem, 8vw, 3rem);
  line-height: 0.95;
  margin-bottom: 8px;
  text-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.foto-title p {
  max-width: 360px;
  margin: 0 auto;
  color: rgba(255,255,255,0.88);
  font-size: 0.94rem;
  line-height: 1.35;
}

.foto-stage {
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
  padding: 8px 0 14px;
}

.photo-frame {
  position: relative;
  width: min(92vw, 410px);
  aspect-ratio: 9 / 16;
  border-radius: 34px;
  overflow: hidden;
  border: 4px solid rgba(255,255,255,0.94);
  box-shadow:
    0 26px 70px rgba(0,0,0,0.42),
    inset 0 0 0 2px rgba(0,174,255,0.35);
  pointer-events: none;
}

.photo-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,130,210,0.38), transparent 22%, transparent 70%, rgba(0,70,140,0.48)),
    radial-gradient(circle at top, rgba(255,255,255,0.25), transparent 34%);
  z-index: 1;
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 26px;
  border: 2px dashed rgba(255,255,255,0.55);
  z-index: 2;
}

.frame-top,
.frame-bottom {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 4;
  text-align: center;
  color: #ffffff;
  text-shadow: 0 5px 18px rgba(0,0,0,0.55);
}

.frame-top {
  top: 24px;
  padding: 12px 14px;
  border-radius: 22px;
  background: rgba(0, 98, 170, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
}

.frame-top span {
  display: block;
  font-size: 2.2rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -0.05em;
}

.frame-top strong {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.frame-bottom {
  bottom: 24px;
  padding: 13px 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.92);
  color: #06345d;
  text-shadow: none;
  box-shadow: 0 12px 26px rgba(0,0,0,0.25);
}

.frame-bottom p {
  margin-bottom: 5px;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.15;
}

.frame-bottom strong {
  display: block;
  font-size: 0.88rem;
  letter-spacing: 0.06em;
}

.frame-center {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.sun-badge {
  position: absolute;
  top: 118px;
  right: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #0b5b9a;
  background: rgba(255, 255, 255, 0.92);
  font-size: 2rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.28);
  animation: sunPulse 2.4s ease-in-out infinite;
}

.ribbon {
  position: absolute;
  width: 108px;
  height: 108px;
  border-radius: 26px;
  background:
    linear-gradient(135deg, #ffffff 0 34%, #5ecbff 34% 66%, #ffffff 66% 100%);
  opacity: 0.88;
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.30));
}

.ribbon.left {
  left: -36px;
  bottom: 128px;
  transform: rotate(24deg);
}

.ribbon.right {
  right: -36px;
  bottom: 128px;
  transform: rotate(-24deg);
}

.foto-controls {
  grid-template-columns: 1fr 1fr;
}

.control-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  padding: 18px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(8px);
}

.preview-card {
  width: min(94vw, 430px);
  max-height: 92vh;
  overflow: auto;
  padding: 18px;
  border-radius: 28px;
  color: #083155;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 28px 80px rgba(0,0,0,0.45);
  text-align: center;
}

.preview-card h2 {
  font-size: 1.6rem;
  margin-bottom: 5px;
}

.preview-card p {
  color: #39556b;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.preview-card img {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 20px;
  background: #dcefff;
  box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

@keyframes sunPulse {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }

  50% {
    transform: scale(1.08) rotate(6deg);
  }
}

@media (max-height: 760px) {
  .foto-title {
    padding-top: 8px;
  }

  .foto-title h1 {
    font-size: 1.8rem;
  }

  .foto-title p {
    font-size: 0.84rem;
  }

  .photo-frame {
    width: min(74vw, 300px);
  }

  .frame-top {
    top: 18px;
    padding: 10px;
  }

  .frame-top span {
    font-size: 1.7rem;
  }

  .frame-top strong {
    font-size: 0.72rem;
  }

  .frame-bottom {
    bottom: 18px;
    padding: 10px;
  }

  .frame-bottom p {
    font-size: 0.82rem;
  }

  .frame-bottom strong {
    font-size: 0.72rem;
  }

  .sun-badge {
    top: 92px;
    width: 46px;
    height: 46px;
    font-size: 1.55rem;
  }
}