/* Mapa 3D v2 · Vila Abraão Festival 2026. Mesmo layout e estilo da prévia da Marcha (implantacao-3d/style.css), na identidade do Vila:
   verde-noite #14261b, verde #1f3a28, oliva #626721, laranja #ff8b00 (2026) / #d47615 (oficial), creme #f7f0da.
   Anton (títulos) + Poppins (texto), locais. Pares de contraste: verde-noite sobre laranja e creme; branco sobre verde-noite. */
:root {
  --azul: #1f3a28;
  --azul-escuro: #14261b;
  --azul-noite: #14261b;
  --azul-medio: #626721;
  --amarelo: #ff8b00;
  --amarelo-hover: #ffa033;
  --ciano: #f7f0da;
  --verde-escuro: #2f6b2a;
  --verde-claro: #66dc5c;
  --claro: #f7f0da;
  --texto: #1b2419;
  --mudo: #55604f;
  --mudo-claro: #d9d3bd;
  --display: "Anton", "Arial Narrow", Impact, sans-serif;
  --body: "Poppins", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: var(--azul-noite); }
body { font-family: var(--body); color: var(--texto); -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--amarelo); outline-offset: 2px; }

.app { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; overflow: hidden; }
.stage3d, .labels { position: absolute; inset: 0; }
.stage3d canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.labels { pointer-events: none; overflow: hidden; }
/* gestos de pinça fora do mapa não dão zoom na página inteira (a legenda continua rolando) */
.top, .ctrl, .compass, .credit { touch-action: manipulation; }
.legend { touch-action: pan-y; }

/* rótulos dos blocos: marcador ciano (palco amarelo) com borda azul-noite, como no croqui 2D */
.lb { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: 3px 10px 3px 3px;
  background: rgba(255,255,255,.95); border-radius: 999px; box-shadow: 0 2px 10px rgba(20,38,27,.45);
  font-size: 13px; font-weight: 600; line-height: 1; color: var(--azul-noite); white-space: nowrap; will-change: transform; }
.lb::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 2px; height: 6px; margin-left: -1px; background: rgba(255,255,255,.95); }
.lb b { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ciano); color: var(--azul-noite); border: 2px solid var(--azul-noite); font: 700 12px/1 var(--body); }
.lb.stage b { background: var(--amarelo); }
.lb.pub { background: var(--verde-escuro); color: #fff; padding: 5px 12px; font-family: var(--display); font-weight: 400; font-size: 14px; letter-spacing: .05em; text-transform: uppercase; }
.lb.pub i { font: 500 11px/1 var(--body); font-style: normal; text-transform: none; letter-spacing: 0; opacity: .95; }
.lb.pub::after { background: var(--verde-escuro); }
.lb.hidden { display: none; }

/* topo */
.top { position: absolute; left: 16px; top: 14px; max-width: min(560px, calc(100% - 32px)); pointer-events: none; }
.sticker { display: inline-block; background: var(--azul-escuro); color: var(--amarelo); border: 2px solid var(--amarelo); font: 400 13px/1.2 var(--display); letter-spacing: .05em; text-transform: uppercase; padding: 4px 12px; border-radius: 8px; box-shadow: 0 3px 10px rgba(20,38,27,.4); }
.top h1 { margin-top: 8px; font: 400 28px/1.06 var(--display); text-transform: uppercase; letter-spacing: .01em; color: #fff; text-shadow: 0 2px 12px rgba(20,38,27,.85), 0 0 2px rgba(20,38,27,.9); }
.top h1 span { display: block; margin-top: 5px; font: 500 14px/1.3 var(--body); text-transform: none; letter-spacing: 0; color: #fff; }

/* legenda */
.legend { position: absolute; right: 16px; top: 14px; width: 318px; max-height: calc(100% - 120px); overflow-y: auto; background: rgba(255,255,255,.97); border-radius: 16px; box-shadow: 0 8px 30px rgba(20,38,27,.45); padding: 14px 16px; border-top: 4px solid var(--amarelo); }
.legend-toggle { display: block; width: 100%; text-align: left; background: none; border: 0; font: 400 17px/1 var(--display); color: var(--azul); text-transform: uppercase; letter-spacing: .04em; padding: 2px 0 10px; }
.legend-toggle::after { content: "–"; float: right; font-family: var(--body); font-weight: 700; }
.legend.closed .legend-toggle::after { content: "+"; }
.legend.closed .legend-body { display: none; }
.legend.closed .legend-toggle { padding-bottom: 2px; }
.legend ol, .legend ul { list-style: none; }
.legend ol button { display: flex; align-items: flex-start; gap: 9px; width: 100%; background: none; border: 0; padding: 4px 4px; text-align: left; font-size: 14px; line-height: 1.25; border-radius: 6px; color: var(--texto); }
.legend ol button:hover, .legend ol button:focus-visible { background: var(--claro); outline: none; }
.legend ol .t { display: block; font-weight: 600; color: var(--azul-noite); }
.legend ol small { display: block; font-weight: 400; font-size: 12px; line-height: 1.3; color: var(--mudo); margin-top: 1px; }
.b { flex: none; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ciano); color: var(--azul-noite); border: 2px solid var(--azul-noite); font: 700 11px/1 var(--body); }
.b.stage { background: var(--amarelo); }
.keys { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(20,38,27,.16); }
.keys li { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; line-height: 1.35; margin: 5px 0; color: var(--texto); }
.sw { flex: none; width: 24px; height: 14px; margin-top: 2px; border-radius: 3px; }
.sw.pub { background: linear-gradient(90deg, rgba(102,220,92,.25), rgba(102,220,92,.8)); border: 1.5px dashed var(--verde-escuro); }
.sw.pas { background: #9a7a55; height: 8px; margin-top: 5px; }
.sw.grd { height: 12px; background: repeating-linear-gradient(90deg, #9aa4b1 0 1.5px, transparent 1.5px 4px), #fff; border: 2px solid #9aa4b1; border-radius: 1px; }
.sw.dkl { background: #9a7a55; height: 10px; margin-top: 3px; }
.sw.bar { height: 9px; margin-top: 4px; background: repeating-linear-gradient(90deg, #3a3f47 0 2px, transparent 2px 4px), #fff; border: 2px solid #173a78; border-radius: 1px; }
.sw.fen { background: repeating-linear-gradient(90deg, #c9ced4 0 5px, #8a9099 5px 6px); border: 1px solid #8a9099; }
.sw.outl { border: 2px dashed #fff; background: #5d6670; }
.sw.per { border: 2px dashed #e0262b; background: transparent; }
.note { margin-top: 10px; font-size: 12px; line-height: 1.4; font-style: italic; color: var(--mudo); }

/* controles */
.ctrl { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; background: rgba(20,38,27,.88); border-radius: 12px; box-shadow: 0 6px 24px rgba(20,38,27,.5); max-width: calc(100% - 20px); }
.ctrl button { border: 0; border-radius: 8px; background: var(--claro); color: var(--azul-noite); font-weight: 600; font-size: 14px; padding: 10px 14px; white-space: nowrap; }
.ctrl button:hover { background: #fff; }
.ctrl button.on, .ctrl button[aria-pressed="true"] { background: var(--amarelo); color: var(--azul-noite); }
.ctrl button.on:hover, .ctrl button[aria-pressed="true"]:hover { background: var(--amarelo-hover); }
.ctrl button.alt { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(197,210,229,.6); }
.ctrl button.alt:hover { background: rgba(255,255,255,.1); }

.compass { position: absolute; left: 16px; bottom: 40px; width: 40px; height: 40px; border-radius: 50%; background: rgba(20,38,27,.86); display: grid; place-items: center; }
.compass span { display: block; font: 700 12px/1 var(--body); color: #fff; position: relative; padding-top: 6px; }
.compass span::before { content: ""; position: absolute; left: 50%; top: -6px; margin-left: -5px; border: 5px solid transparent; border-bottom: 8px solid var(--amarelo); }

.hint { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); font-size: 12px; color: #fff; background: rgba(20,38,27,.7); padding: 5px 12px; border-radius: 999px; white-space: nowrap; transition: opacity .6s; pointer-events: none; }
.hint.off { opacity: 0; }
.credit { position: absolute; right: 8px; bottom: 6px; left: 8px; text-align: right; font-size: 10px; line-height: 1.3; color: rgba(255,255,255,.9); text-shadow: 0 1px 2px rgba(20,38,27,.95); pointer-events: none; }
.nogl { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; text-align: center; color: #fff; font-size: 16px; background: var(--azul-noite); }
.nogl[hidden] { display: none; }

/* modo embutido no site (?embed=1): sem a faixa de título, que já está na página */
.embed .top { display: none; }
.embed .credit { display: none; } /* o crédito do satélite fica no texto da seção do site */
.embed .compass { top: auto; }
/* modo vídeo: esconde controles e dicas */
.video .ctrl, .video .hint, .video .legend-toggle::after { display: none; }

/* celular */
@media (max-width: 720px) {
  .top { left: 12px; top: 10px; max-width: calc(100% - 64px); }
  .sticker { font-size: 11px; padding: 3px 9px; }
  .top h1 { font-size: 20px; }
  .top h1 span { font-size: 12px; }
  .legend { left: 10px; right: 10px; top: auto; bottom: 84px; width: auto; padding: 10px 12px; border-radius: 12px; max-height: 50vh; overflow-y: auto; background: #fff; }
  .legend-toggle { font-size: 15px; }
  .legend ol button { font-size: 12.5px; padding: 3px 2px; gap: 7px; }
  .legend ol small { font-size: 11px; }
  .b { width: 21px; height: 21px; font-size: 10.5px; }
  .keys li { font-size: 11.5px; }
  .note { margin-top: 6px; font-size: 11px; }
  .ctrl { bottom: 26px; gap: 4px; padding: 4px; width: calc(100% - 20px); justify-content: space-between; }
  .ctrl button { font-size: 12px; padding: 9px 6px; flex: 1 1 auto; }
  .compass { left: auto; right: 12px; top: 12px; bottom: auto; width: 34px; height: 34px; }
  .hint { display: none; }
  .credit { font-size: 10px; bottom: 5px; text-align: center; letter-spacing: 0; }
  .lb { font-size: 11px; gap: 4px; padding: 2px 8px 2px 2px; }
  .lb b { width: 20px; height: 20px; font-size: 10.5px; }
  .lb.pub { font-size: 12px; padding: 4px 9px; }
  .lb.pub i { font-size: 9.5px; }
}

/* gravação do vídeo (?video=1) */
.video .legend { display: none; }
.video .credit { font-size: 11px; }
.lb.num { padding: 3px; gap: 0; }
.lb.num span { display: none; }

/* telas muito estreitas (ex.: o mapa embutido no site pelo celular): botões menores, tudo cabe */
@media (max-width: 380px) {
  .ctrl { gap: 3px; padding: 3px; width: calc(100% - 12px); }
  .ctrl button { font-size: 11px; padding: 8px 2px; letter-spacing: 0; min-width: 0; }
  .embed .ctrl { bottom: 12px; }
  .embed .legend { bottom: 66px; left: 8px; right: 8px; }
}

/* Vila: marcador na cor da categoria da planta (definida no próprio elemento), rótulo clicável, cartão do ponto, logo no selo */
.lb { pointer-events: auto; cursor: pointer; border: 0; font-family: var(--body); }
.lb:hover, .lb.on { background: var(--amarelo); }
.lb:hover::after, .lb.on::after { background: var(--amarelo); }
.lb.pub { pointer-events: none; }
.sticker { display: inline-flex; align-items: center; gap: 8px; }
.sticker img { height: 22px; width: auto; display: block; }
.legend ol button.on { background: var(--claro); }
.info { position: absolute; left: 16px; bottom: 96px; width: min(360px, calc(100% - 32px)); background: var(--azul-noite); color: #fff; border-radius: 14px; padding: 14px 40px 14px 16px; box-shadow: 0 8px 30px rgba(20,38,27,.55); border-top: 4px solid var(--amarelo); touch-action: manipulation; }
.info[hidden] { display: none; }
.info-cat { font: 700 10.5px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--amarelo); }
.info h2 { margin-top: 6px; font: 400 22px/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; }
.info p#infoDesc { margin-top: 6px; font-size: 13.5px; line-height: 1.45; color: var(--claro); }
.info-x { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 20px; line-height: 1; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--claro); font: 400 20px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; background: var(--azul-noite); transition: opacity .4s; }
.loading.off { opacity: 0; pointer-events: none; }
.sw.dck { background: #c9a46a; height: 10px; margin-top: 3px; }
.sw.grb { height: 9px; margin-top: 4px; background: repeating-linear-gradient(90deg, #9aa4b1 0 1.5px, transparent 1.5px 4px), #fff; border: 2px solid #9aa4b1; border-radius: 1px; }
.sw.seta { height: 14px; background: #4d4d4d; clip-path: polygon(0 30%, 60% 30%, 60% 0, 100% 50%, 60% 100%, 60% 70%, 0 70%); border-radius: 0; }
html, body { touch-action: none; overscroll-behavior: none; }
@media (max-width: 720px) {
  .info { left: 10px; right: 10px; width: auto; bottom: 168px; padding: 12px 40px 12px 14px; }
  .info h2 { font-size: 19px; } .info p#infoDesc { font-size: 12.5px; }
  .ctrl { flex-wrap: wrap; justify-content: center; }
  .ctrl button { flex: 1 1 28%; }
  .legend { bottom: 120px; }
  .sticker img { height: 18px; }
}

/* ---------- v2: botão Caminhar e modo caminhada ---------- */
.ctrl button.walk { background: var(--amarelo); color: var(--azul-noite); }
.ctrl button.walk:hover { background: var(--amarelo-hover); }
.walking .ctrl, .walking .hint, .walking .legend, .walking .info { display: none; }
.walking .lb { pointer-events: none; }
.walking .stage3d canvas { cursor: grab; }
.walking .stage3d canvas:active { cursor: grabbing; }
.whud[hidden] { display: none; }
.whud { position: absolute; inset: 0; pointer-events: none; }
.wsair { position: absolute; right: 16px; top: 14px; pointer-events: auto; border: 2px solid var(--amarelo); border-radius: 10px; background: var(--azul-noite); color: #fff; font: 600 14px/1 var(--body); padding: 11px 16px; box-shadow: 0 6px 20px rgba(20,38,27,.5); touch-action: manipulation; }
.wsair:hover { background: var(--azul); }
.watalhos { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; background: rgba(20,38,27,.88); border-radius: 12px; pointer-events: auto; box-shadow: 0 6px 24px rgba(20,38,27,.5); max-width: calc(100% - 20px); touch-action: manipulation; }
.watalhos button { border: 0; border-radius: 8px; background: var(--claro); color: var(--azul-noite); font: 600 13px/1 var(--body); padding: 10px 12px; white-space: nowrap; }
.watalhos button:hover, .watalhos button:active { background: var(--amarelo); }
.whint { position: absolute; left: 50%; bottom: 92px; transform: translateX(-50%); font-size: 12px; color: #fff; background: rgba(20,38,27,.62); padding: 5px 12px; border-radius: 999px; white-space: nowrap; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; }
.joy { position: absolute; left: 0; top: 0; width: 110px; height: 110px; border-radius: 50%; border: 2px solid rgba(255,255,255,.75); background: rgba(20,38,27,.28); display: none; place-items: center; }
.joy.on { display: grid; }
.joy i { width: 46px; height: 46px; border-radius: 50%; background: rgba(255,139,0,.92); box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.mira { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: rgba(255,255,255,.75); box-shadow: 0 0 0 1px rgba(20,38,27,.5); }
.walking .compass { left: 16px; bottom: 40px; }
@media (max-width: 720px) {
  .ctrl button { flex: 1 1 22%; }
  .wsair { right: 10px; top: auto; bottom: 150px; font-size: 13px; padding: 10px 14px; }
  .watalhos { bottom: 26px; flex-wrap: wrap; justify-content: center; width: calc(100% - 20px); gap: 4px; padding: 4px; }
  .watalhos button { flex: 1 1 30%; font-size: 12px; padding: 9px 4px; }
  .whint { bottom: 118px; white-space: normal; text-align: center; width: calc(100% - 140px); left: 10px; transform: none; font-size: 11px; border-radius: 10px; }
  .walking .compass { right: 12px; left: auto; top: 12px; bottom: auto; }
}
/* montagem v19b (31/10): mais botões de vista; no celular ficam numa linha só, com rolagem lateral, para não cobrir a legenda */
@media (max-width: 720px) {
  .ctrl { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .ctrl::-webkit-scrollbar { display: none; }
  .ctrl button { flex: 0 0 auto; padding: 9px 12px; }
  .legend { bottom: 84px; }
}
/* v20: etiquetas dos estandes (nome do expositor) */
.lb.est { padding: 2px 8px 2px 2px; font-size: 11px; background: rgba(255,255,255,.95); }
.lb.est b { width: auto; min-width: 26px; padding: 0 4px; height: 18px; border-radius: 9px; background: var(--amarelo); font-size: 10px; }
.lb.est { padding: 2px; cursor: pointer; }
.lb.est::after { display: none; }
.lb.est b { min-width: 30px; height: 20px; font-size: 11px; border: 2px solid var(--azul-noite); }

/* v21: barra de vistas rolável (muitas vistas), ferramentas fixas à direita */
.ctrl { align-items: center; }
.ctrl .views { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; min-width: 0; flex: 1 1 auto; max-width: 62vw; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.ctrl .views button { flex: 0 0 auto; scroll-snap-align: start; }
.sw.vipp { background: repeating-linear-gradient(90deg, #ffffff 0 6px, #FF8B00 6px 9px); border: 1px solid #70300E; }
.sw.cinza { background: #9c9ea3; border: 1px solid #70300E; }   /* v26: tenda do fornecedor (cinza na planta) */
/* v21: etiquetas dos estandes com o nome (vista com o teto removido) */
.lb.est .nm { display: none; }
.lb.est.full { padding: 2px 7px 2px 2px; gap: 4px; max-width: 132px; }
.lb.est.full .nm { display: block; font: 600 11px/1.15 var(--body); white-space: normal; text-align: left; max-width: 104px; }
.lb.est.full b { width: auto; min-width: 26px; height: 18px; padding: 0 4px; border-radius: 9px; font-size: 10px; }
@media (max-width: 720px) {
  .ctrl { flex-wrap: wrap; row-gap: 4px; }
  .ctrl .views { flex: 1 0 100%; max-width: 100%; gap: 4px; }
  .ctrl .views button { flex: 0 0 auto; padding: 9px 10px; }
  .ctrl > button { flex: 1 1 0; }
  .legend { bottom: 132px; }
  .hint { bottom: 140px; }
  .lb.est.full { max-width: 118px; }
  .lb.est.full .nm { font-size: 10px; max-width: 88px; }
}

/* v22 (Chefe 6711): caminhada guiada (Pausar/Continuar) e destinos andando; barra de destinos rolável no celular */
.wguia { position: absolute; left: 16px; top: 14px; display: flex; gap: 6px; pointer-events: auto; }
.wguia button { border: 2px solid var(--amarelo); border-radius: 10px; background: var(--azul-noite); color: #fff; font: 600 14px/1 var(--body); padding: 11px 14px; box-shadow: 0 6px 20px rgba(20,38,27,.5); touch-action: manipulation; }
.wguia button.on, .wguia button[aria-pressed="true"] { background: var(--amarelo); color: var(--azul-noite); }
.walking .top { display: none; }
@media (max-width: 720px) {
  .wguia { left: 10px; top: auto; bottom: 150px; }
  .wsair { top: 12px; left: 10px; right: auto; bottom: auto; }
  .ctrl > button { flex: 1 1 0; min-width: 0; padding: 9px 3px; font-size: 11.5px; }
  .wguia button { font-size: 13px; padding: 10px 12px; }
  .watalhos { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; overscroll-behavior-x: contain; }
  .watalhos button { flex: 0 0 auto; }
  .whint { bottom: 200px; white-space: normal; text-align: center; }
}

/* v23 (Chefe 6723): barra em 2 linhas em qualquer largura: linha 1 = vistas (quebra no desktop, rola no celular), linha 2 = ferramentas centralizadas */
.ctrl { flex-wrap: wrap; justify-content: center; row-gap: 6px; width: min(1180px, calc(100% - 20px)); max-width: calc(100% - 20px); }
.ctrl .views { flex: 1 0 100%; max-width: 100%; flex-wrap: wrap; justify-content: center; overflow: visible; }
.ctrl > button { flex: 0 0 auto; }
@media (max-width: 720px) {
  .ctrl { width: calc(100% - 20px); }
  .ctrl .views { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; }
  .ctrl > button { flex: 1 1 0; min-width: 0; padding: 9px 3px; font-size: 11.5px; }
}

.ctrl > button { overflow: hidden; text-overflow: ellipsis; }

/* v24 (Chefe 6824): botão Música (liga/desliga a trilha do Vila); ligado = amarelo como os outros botões ativos */
.ctrl button.musica::before, .wguia button.musica::before { content: "\266A"; margin-right: 5px; font-weight: 700; }
.wguia button.musica[aria-pressed="false"] { background: var(--azul-noite); color: #fff; }
@media (min-width: 721px) {
  .walking .compass { bottom: 96px; }   /* caminhada no desktop: a bússola sobe e não fica por cima da barra de destinos */
}
@media (max-width: 720px) {
  .ctrl button.musica::before, .wguia button.musica::before { margin-right: 2px; }
}
@media (max-width: 480px) {
  .ctrl > button { flex: 1 1 auto; padding-left: 4px; padding-right: 4px; }   /* 6 ferramentas numa linha: largura pelo rótulo, sobra dividida */
  .ctrl button.musica::before { content: none; }
}
@media (max-width: 340px) {
  .ctrl > button { font-size: 10.5px; padding-left: 3px; padding-right: 3px; }
}
