* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #F0F4FF;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
}

/* ══════════════════════════════
   TELA DO LOCAL
══════════════════════════════ */
#tela-local {
  display: none;
  flex-direction: column;
  width: 100%;
  max-width: 412px;
  min-height: 100dvh;
  background: #F0F4FF;
  overflow-y: auto;
}

.tela-label {
  text-align: center;
  font-size: 11px;
  color: #aaa;
  letter-spacing: 0.5px;
  padding: 10px 0 4px;
}

/* Hero */
.hero {
  position: relative;
  width: 100%;
  height: 220px;
  flex-shrink: 0;
  background: linear-gradient(160deg, #7ab8d4 0%, #a8cce0 45%, #c5dde8 75%, #b0c8d5 100%);
}

.nome-local {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  border: 2px dashed rgba(255,255,255,0.85);
  padding: 10px 14px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  line-height: 1.3;
}

.hero-btns {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
}

.hero-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-btn img {
  width: 48px; height: 48px;
  object-fit: contain;
}

/* Container pai geral */
.conteudo-wrapper {
  width: 100%;
  max-width: 412px;
  min-height: 594px;
  border-radius: 24px 24px 0 0;
  background: #F0F4FF;
  margin-top: -24px;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 16px 32px;
  gap: 16px;
}

/* "Sobre a atração" + botão Ouvir — fora do card branco */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 8px;
}

.card-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

/* Card branco interno */
.card {
  display: flex;
  padding: 24px;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  align-self: stretch;
  border-radius: 24px;
  background: #fff;
}

/* Botão Ouvir */
.btn-ouvir {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.btn-ouvir:hover { opacity: 0.8; }

.btn-ouvir img {
  height: 36px;
  display: block;
}

/* Texto da história */
.historia-box {
  width: 100%;
  font-size: 14px;
  line-height: 1.75;
  color: #333;
}

.historia-box p            { margin-bottom: 12px; }
.historia-box p:last-child { margin-bottom: 0; }
.historia-box strong       { font-weight: 700; color: #1a1a1a; }

/* Curiosidades */
.curiosidades-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.curiosidade-card {
  background: #fff;
  border-radius: 16px;
  border-left: 4px solid #3d7cf5;
  padding: 16px 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: stretch;
}

.curiosidade-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.curiosidade-titulo {
  font-size: 15px;
  font-weight: 700;
  color: #3d7cf5;
  line-height: 1.3;
  flex: 1;
}

.curiosidade-conteudo {
  font-size: 14px;
  line-height: 1.75;
  color: #333;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.curiosidade-conteudo .topico strong { font-weight: 700; color: #1a1a1a; }

.curiosidade-conteudo .titulo-lista {
  font-weight: 700;
  color: #1a1a1a;
  margin-top: 4px;
}

.curiosidade-conteudo ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.curiosidade-conteudo ul li strong { font-weight: 700; color: #1a1a1a; }

/* Botão QR */
.btn-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #3d7cf5;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-qr:hover { opacity: 0.7; }

.card-btns {
  display: flex;
  gap: 24px;
  justify-content: center;
}

#tela-mao-fs {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
}

#tela-mao-fs.ativo {
  display: block;
}

#mao-fs-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mao-fs-canvas-3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}


#mao-fs-status {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.55);
  color: #00ffcc;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  white-space: nowrap;
}

#btn-fechar-mao-fs {
  position: absolute;
  top: 20px;
  left: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,0,0,0.55);
  border: none;
  border-radius: 24px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px 8px 10px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

.btn-qr img {
  width: 64px;
  height: 64px;
  display: block;
}

/* ══════════════════════════════
   TELA SEM QR
══════════════════════════════ */
#tela-sem-qr {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 412px;
  min-height: 100dvh;
  padding: 40px 28px;
  gap: 24px;
  text-align: center;
  background: #F0F4FF;
}

#tela-sem-qr .logo {
  width: 72px; height: 72px;
  background: #fff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#tela-sem-qr h1 {
  font-size: 22px;
  font-weight: 800;
  color: #1a1a1a;
}

#tela-sem-qr p {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  max-width: 300px;
}

/* ══════════════════════════════
   MODAL SCANNER
══════════════════════════════ */
#overlay-scanner {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

#overlay-scanner.ativo { display: flex; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-box {
  background: #1a1a2e;
  width: 100%;
  max-width: 480px;
  border-radius: 28px 28px 0 0;
  padding: 16px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.1, 0.64, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 2px;
  flex-shrink: 0;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.modal-header h3 {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}

#btn-fechar-scanner {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s;
}

#btn-fechar-scanner:hover { background: rgba(255,255,255,0.2); }

#video-wrapper {
  position: relative;
  width: min(280px, 80vw);
  height: min(280px, 80vw);
  border-radius: 20px;
  overflow: hidden;
  border: 2.5px solid #3d7cf5;
  box-shadow: 0 0 0 4px rgba(61,124,245,0.15);
}

@media (min-width: 600px) {
  #video-wrapper {
    width: 340px;
    height: 340px;
  }

  .modal-box {
    border-radius: 28px;
    margin-bottom: 40px;
    max-width: 440px;
  }

  #overlay-scanner {
    align-items: center;
  }
}

#video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3d7cf5, transparent);
  animation: scan 2s linear infinite;
}

@keyframes scan {
  0%   { top: 8%; }
  50%  { top: 88%; }
  100% { top: 8%; }
}

.corner { position: absolute; width: 22px; height: 22px; border-color: #fff; border-style: solid; }
.corner.tl { top: 8px;    left: 8px;   border-width: 3px 0 0 3px; }
.corner.tr { top: 8px;    right: 8px;  border-width: 3px 3px 0 0; }
.corner.bl { bottom: 8px; left: 8px;   border-width: 0 0 3px 3px; }
.corner.br { bottom: 8px; right: 8px;  border-width: 0 3px 3px 0; }

#tela-permissao, #tela-erro-camera {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 0 4px;
  text-align: center;
}

.permissao-icone {
  width: 72px; height: 72px;
  background: rgba(61,124,245,0.12);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.permissao-icone.erro { background: rgba(224,68,68,0.1); }

.permissao-titulo {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.permissao-desc {
  color: rgba(255,255,255,0.55);
  font-size: 13px;
  line-height: 1.6;
  max-width: 280px;
}

.btn-permitir {
  background: #3d7cf5;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 36px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}

.btn-permitir:hover { background: #2c6ae0; }

#msg-scanner {
  color: rgba(255,255,255,0.5);
  font-size: 13px;
  text-align: center;
}

.hidden { display: none !important; }

/* ══════════════════════════════
   GALERIA
══════════════════════════════ */
#galeria-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: stretch;
}

.galeria-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.galeria-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.galeria-track-wrapper {
  overflow: hidden;
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 4 / 3;
}

.galeria-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.galeria-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
}

.galeria-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.galeria-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.88);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: background 0.2s, opacity 0.2s;
  z-index: 10;
}

.galeria-btn:hover { background: #fff; }

.galeria-prev { left: 10px; }
.galeria-next { right: 10px; }

.galeria-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.galeria-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.55);
  transition: background 0.2s, transform 0.2s;
}

.galeria-dot.ativo {
  background: #fff;
  transform: scale(1.25);
}

/* ══════════════════════════════
   BOTÃO DESLIZANTE DE MÃO
══════════════════════════════ */
.slide-btn-wrapper {
  align-self: stretch;
  padding: 4px 0 8px;
}

.slide-btn-track {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  border: 2px solid #3d7cf5;
  border-radius: 50px;
  height: 64px;
  padding: 6px 6px 6px 6px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.slide-btn-thumb {
  position: relative;
  z-index: 2;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #3d7cf5;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(61,124,245,0.35);
  transition: transform 0.15s;
}

.slide-btn-thumb img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.slide-btn-label {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  line-height: 1.45;
  padding: 0 8px;
  pointer-events: none;
}

/* ══════════════════════════════
   MODAL MÃO
══════════════════════════════ */
#overlay-mao {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

#overlay-mao.ativo { display: flex; }

.modal-mao .modal-header button {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s;
}

.modal-mao .modal-header button:hover { background: rgba(255,255,255,0.2); }

#mao-video-wrapper {
  position: relative;
  width: min(300px, 82vw);
  height: min(300px, 82vw);
  border-radius: 20px;
  overflow: hidden;
  border: 2.5px solid #3d7cf5;
  box-shadow: 0 0 0 4px rgba(61,124,245,0.15);
}

#mao-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#mao-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mao-instrucao {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0,0,0,0.38);
  animation: pulseMao 2s ease-in-out infinite;
}

.mao-instrucao img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.mao-instrucao span {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

@keyframes pulseMao {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.7; }
}

[vw-access-button] {
  display: none !important;
}
