/* AeroCity 3D · interface. Mesma identidade da apresentação: azul-marinho, cartões de vidro, destaque azul-claro. */
:root {
  --fundo: #050b24; --marinho: #0a1948; --marca: #1747c9; --sinal: #008cf0; --acento: #7cc8ff; --menta: #6fe8b8;
  --t1: #ffffff; --t2: rgb(222 231 255 / .86); --t3: rgb(192 208 246 / .66);
  --borda: rgb(255 255 255 / .17);
  --vidro: rgb(10 25 72 / .6);
  --sombra: inset 0 1px 0 rgb(255 255 255 / .14), 0 26px 50px -26px rgb(0 4 26 / .85);
  --azul: linear-gradient(180deg, #2f7bff, #1747c9);
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --texto: "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--fundo); color: var(--t1); font-family: var(--texto); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
#cena { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
#rotulos { position: fixed; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; transition: opacity .3s; }
#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; transition: opacity .3s; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }
/* escurece de leve os cantos, como em cinema */
body::after { content: ""; position: fixed; inset: 0; z-index: 2; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, transparent 52%, rgb(3 6 24 / .5) 100%); }
/* computador sem folga (main.js liga): os vidros deixam de desfocar o 3D e ficam um pouco mais fechados */
body.leve { --vidro: rgb(10 25 72 / .84); }
body.leve #hud *, body.leve .selo { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
body.leve .selo { background: rgb(10 25 72 / .9); }
body.sem-interface #hud, body.sem-interface #rotulos { opacity: 0; }
body.sem-interface #hud * { pointer-events: none !important; }

/* ---------- selo de cada ponto, sobre a cena ---------- */
.selo { position: absolute; left: 0; top: 0; margin-top: -14px; pointer-events: auto; appearance: none; display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px;
  border-radius: 999px; border: 1px solid var(--borda); background: rgb(10 25 72 / .74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #fff;
  font: 600 13.5px/1 var(--display); white-space: nowrap; cursor: pointer; box-shadow: 0 12px 26px -12px rgb(0 4 26 / .95); transition: background .2s, border-color .2s; will-change: transform; }
.selo b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: var(--marinho); font-size: 12.5px; font-weight: 800; }
.selo em { display: none; margin-left: 2px; padding: 4px 8px; border-radius: 999px; background: var(--menta); color: #05301f; font-style: normal; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.selo.aqui em { display: inline-block; }
.selo.aqui { border-color: rgb(111 232 184 / .7); }
.selo.realce { background: rgb(23 71 201 / .92); border-color: rgb(255 255 255 / .42); }
@media (hover: hover) { .selo:hover { background: rgb(23 71 201 / .92); border-color: rgb(255 255 255 / .42); } }
.selo::after { content: ""; position: absolute; left: calc(50% + var(--haste, 0px)); top: 100%; width: 2px; height: 13px; margin-left: -1px; background: linear-gradient(rgb(255 255 255 / .65), transparent); }

/* ---------- barra do topo ---------- */
.topo { position: absolute; inset: 0 0 auto 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 18px 24px 30px;
  background: linear-gradient(rgb(5 11 36 / .6), transparent); }
.topo > * { pointer-events: auto; }
.marca { display: flex; align-items: center; gap: 14px; min-width: 0; }
.marca img { display: block; height: 30px; width: auto; }
.marca span { padding-left: 14px; border-left: 1px solid var(--borda); font-size: 13.5px; color: var(--t2); white-space: nowrap; }
.acoes { display: flex; justify-content: flex-end; gap: 8px; }

.troca { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 999px; border: 1px solid var(--borda); background: var(--vidro);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--sombra); }
.troca button { position: relative; z-index: 1; appearance: none; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 24px; border-radius: 999px; color: var(--t2); font: 650 15.5px/1 var(--display); white-space: nowrap; cursor: pointer; transition: color .25s; }
.troca button.ativo { color: #fff; }
.troca-polegar { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--azul);
  box-shadow: 0 8px 22px -8px rgb(0 140 240 / .95), inset 0 1px 0 rgb(255 255 255 / .35); transition: transform .45s cubic-bezier(.5, 0, .2, 1.25); }
.troca[data-modo="placa"] .troca-polegar { transform: translateX(100%); }

.botao { appearance: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 12px; border: 1px solid var(--borda); background: var(--vidro);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font: 600 14px/1 var(--texto); white-space: nowrap; cursor: pointer; transition: background .2s, border-color .2s, transform .15s; }
.botao:hover { background: rgb(23 71 201 / .78); border-color: rgb(255 255 255 / .36); }
.botao:active { transform: scale(.97); }
.botao.so-icone { padding: 10px; }
.botao.primario { background: var(--azul); border-color: rgb(255 255 255 / .3); }
button:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }

/* ---------- pontos (base) e aviso de simulação ---------- */
.pontos { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; border-radius: 16px; border: 1px solid var(--borda);
  background: var(--vidro); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--sombra); pointer-events: auto; }
.ponto { appearance: none; border: 0; background: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px 8px 8px; border-radius: 11px; color: var(--t2);
  font: 600 14px/1 var(--display); white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.ponto b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgb(255 255 255 / .14); color: #fff; font-size: 12.5px; transition: background .2s, color .2s; }
.ponto:hover { background: rgb(255 255 255 / .1); color: #fff; }
.ponto.ativo { background: var(--azul); color: #fff; box-shadow: 0 8px 20px -10px rgb(0 140 240 / .95); }
.ponto.ativo b { background: #fff; color: var(--marinho); }
.aviso-sim { position: absolute; left: 24px; bottom: 24px; margin: 0; font-size: 12px; color: var(--t3); text-shadow: 0 1px 6px rgb(0 4 26 / .9); }

/* ---------- painéis do foco ---------- */
.painel { position: absolute; top: 51%; display: flex; flex-direction: column; align-items: center; gap: 10px; transform: translateY(-50%); pointer-events: auto; }
.painel-totem { left: 28px; }
.painel-fone { right: 28px; }
.painel-totem.entra { animation: entra-esq .5s cubic-bezier(.2, .8, .2, 1) both; }
.painel-fone.entra { animation: entra-dir .5s .08s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes entra-esq { from { opacity: 0; transform: translate(-44px, -50%) scale(.96); } }
@keyframes entra-dir { from { opacity: 0; transform: translate(44px, -50%) scale(.96); } }
.painel-titulo { display: flex; align-items: center; gap: 8px; margin: 0; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--borda); background: var(--vidro);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 13px; color: var(--t2); white-space: nowrap; }
.painel-titulo b { font: 700 13.5px/1 var(--display); color: #fff; }
.painel-dica { margin: 0; max-width: 300px; text-align: center; font-size: 12.5px; line-height: 1.35; color: var(--t2); text-shadow: 0 1px 8px rgb(0 4 26 / .9); }

.aparelho { height: min(66vh, 860px); aspect-ratio: 9 / 16; perspective: 1400px; }
.aparelho-face { width: 100%; height: 100%; padding: 10px; border-radius: 24px; background: linear-gradient(180deg, #1a3594, #0a1948);
  box-shadow: 0 0 0 1px rgb(124 200 255 / .5), 0 0 38px -4px rgb(0 140 240 / .6), 0 40px 70px -30px rgb(0 4 26 / .95); transition: transform .26s ease-in; }
.aparelho.virando .aparelho-face { transform: rotateY(90deg); }
.visor { position: relative; width: 100%; height: 100%; }
.visor canvas { display: block; width: 100%; height: 100%; border-radius: 15px; background: #0a1948; }
.painel-totem[data-modo="placa"] .aparelho { height: min(60vh, 780px); aspect-ratio: 217 / 372; }
.painel-totem[data-modo="placa"] .aparelho-face { padding: 9px; border-radius: 9px; box-shadow: 0 0 0 1px rgb(255 255 255 / .28), 0 40px 70px -30px rgb(0 4 26 / .95); }
.painel-totem[data-modo="placa"] .visor canvas { border-radius: 2px; }
.toques { position: absolute; inset: 0; pointer-events: none; }
.toque { position: absolute; appearance: none; border: 0; background: none; border-radius: 12px; cursor: pointer; pointer-events: auto; }
.toque-qr { position: absolute; appearance: none; border: 0; background: none; border-radius: 14px; cursor: zoom-in; }

/* --z = altura do celular ÷ 680 (posto pelo hud.js): a moldura e a conversa crescem ou encolhem juntas */
.fone { position: relative; height: min(64vh, 820px); aspect-ratio: 9 / 18.6; padding: calc(10px * var(--z, 1)); border-radius: calc(44px * var(--z, 1)); background: linear-gradient(160deg, #1c2542, #070b1c);
  box-shadow: 0 0 0 1.5px rgb(255 255 255 / .24), 0 0 44px -10px rgb(0 140 240 / .4), 0 40px 70px -30px rgb(0 4 26 / .95); }
.fone-ilha { position: absolute; z-index: 3; left: 50%; top: calc(19px * var(--z, 1)); width: calc(74px * var(--z, 1)); height: calc(20px * var(--z, 1)); margin-left: calc(-37px * var(--z, 1)); border-radius: 12px; background: #05070f; }
.fone-tela { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; border-radius: calc(35px * var(--z, 1)); overflow: hidden; background: #f4f7fc; }
.fone-tela::before { content: ""; flex: none; height: calc(34px * var(--z, 1)); background: #0a1948; }
.fone-conversa { flex: 1; min-height: 0; zoom: var(--z, 1); }

.leitor { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  background: radial-gradient(120% 90% at 50% 40%, #1b2749, #060a18); transition: opacity .35s ease, visibility .35s; }
.leitor.fim { opacity: 0; visibility: hidden; }
.leitor-mira { position: relative; width: 64%; aspect-ratio: 1; padding: 9%;
  background:
    linear-gradient(#7cc8ff, #7cc8ff) left top / 24% 3px no-repeat, linear-gradient(#7cc8ff, #7cc8ff) left top / 3px 24% no-repeat,
    linear-gradient(#7cc8ff, #7cc8ff) right top / 24% 3px no-repeat, linear-gradient(#7cc8ff, #7cc8ff) right top / 3px 24% no-repeat,
    linear-gradient(#7cc8ff, #7cc8ff) left bottom / 24% 3px no-repeat, linear-gradient(#7cc8ff, #7cc8ff) left bottom / 3px 24% no-repeat,
    linear-gradient(#7cc8ff, #7cc8ff) right bottom / 24% 3px no-repeat, linear-gradient(#7cc8ff, #7cc8ff) right bottom / 3px 24% no-repeat; }
.leitor-qr { width: 100%; height: 100%; border-radius: 8px; overflow: hidden; background: #fff; }
.leitor-qr svg { display: block; width: 100%; height: 100%; }
.leitor-linha { position: absolute; left: 5%; right: 5%; top: 8%; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, #9ad8ff, transparent); box-shadow: 0 0 16px 3px rgb(124 200 255 / .85); opacity: 0; }
.leitor.lendo .leitor-linha { animation: varre .95s ease-in-out both; }
@keyframes varre { 0% { top: 8%; opacity: 0; } 15%, 85% { opacity: 1; } 100% { top: 90%; opacity: 0; } }
.leitor-link { display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 8px 8px 14px; border-radius: 999px; background: rgb(255 255 255 / .96); color: #0f1626; font-size: 12.5px;
  opacity: 0; transform: translateY(10px) scale(.96); transition: opacity .3s, transform .3s; }
.leitor-link b { padding: 6px 12px; border-radius: 999px; background: #2a5ce6; color: #fff; font-size: 12.5px; }
.leitor.achou .leitor-link { opacity: 1; transform: none; }

/* ---------- rota, tour e QR grande ---------- */
.cartao-rota { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; padding: 10px 10px 10px 18px; border-radius: 16px;
  border: 1px solid rgb(124 200 255 / .5); background: rgb(8 18 56 / .82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--sombra); pointer-events: auto; animation: sobe .4s ease both; }
.cartao-rota b { display: block; font: 700 17px/1.2 var(--display); }
.cartao-rota span { font-size: 13px; color: var(--t2); }
body.em-tour .cartao-rota { bottom: 196px; }
@keyframes sobe { from { opacity: 0; transform: translate(-50%, 14px); } }

/* a legenda cabe entre os dois painéis do foco (o da esquerda mede 66vh × 9/16), para não cobrir nenhum deles em telas menores */
.legenda { position: absolute; z-index: 41; left: 50%; bottom: 84px; transform: translateX(-50%); width: min(900px, calc(100vw - 48px), max(420px, calc(100vw - 2 * (48px + min(66vh, 860px) * 9 / 16)))); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px;
  padding: 14px 16px 14px 22px; border-radius: 20px; border: 1px solid var(--borda); background: rgb(8 18 56 / .84); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--sombra); pointer-events: auto; animation: sobe .4s ease both; }
.legenda-passo { font: 700 13px/1 var(--display); letter-spacing: .06em; color: var(--acento); white-space: nowrap; }
.legenda-texto b { display: block; font: 700 clamp(20px, 1.75vw, 29px)/1.15 var(--display); letter-spacing: -.01em; }
.legenda-texto p { margin: 4px 0 0; font-size: clamp(14px, 1.1vw, 18px); color: var(--t2); }
.legenda-botoes { display: flex; gap: 8px; }

.sobre { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgb(3 8 32 / .74); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); pointer-events: auto; animation: aparece .25s ease both; }
body.em-tour .sobre { padding-bottom: 170px; } /* no tour, o QR sobe para a legenda continuar à vista (ela fica por cima do fundo escuro) */
.qr-cartao { position: relative; display: flex; align-items: center; gap: 36px; padding: 30px 40px 30px 30px; border-radius: 28px; background: #fff; color: #0f1626; box-shadow: 0 50px 100px -40px rgb(0 4 26 / .95); animation: cresce .38s cubic-bezier(.2, .9, .2, 1.1) both; }
.qr-imagem svg { display: block; width: min(54vh, 480px); height: auto; }
.qr-texto { max-width: 340px; }
.qr-texto b { display: block; font: 800 34px/1.1 var(--display); letter-spacing: -.02em; color: #0a1948; }
.qr-texto p { margin: 14px 0 0; font-size: 19px; font-weight: 600; color: #1747c9; }
.qr-texto .qr-sub { font-size: 16px; font-weight: 400; color: #4a5672; line-height: 1.4; }
.qr-texto .qr-url { font: 600 13.5px/1.3 ui-monospace, "Cascadia Mono", Consolas, monospace; color: #7a86a3; }
.qr-fecha { position: absolute; right: 14px; top: 14px; appearance: none; display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #eef2fa; color: #31405f; cursor: pointer; }
.qr-fecha:hover { background: #dfe7f7; }
@keyframes aparece { from { opacity: 0; } }
@keyframes cresce { from { opacity: 0; transform: scale(.9); } }

/* ---------- carregando ---------- */
#carregando { position: fixed; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 20px;
  background: radial-gradient(900px 520px at 50% 30%, rgb(0 140 240 / .24), transparent 70%), #050b24; transition: opacity .8s ease, visibility .8s; }
#carregando.some { opacity: 0; visibility: hidden; pointer-events: none; }
#carregando img { width: 230px; height: auto; }
#carregando i { width: 180px; height: 3px; border-radius: 3px; background: rgb(255 255 255 / .14); overflow: hidden; position: relative; }
#carregando i::after { content: ""; position: absolute; inset: 0; width: 40%; border-radius: 3px; background: var(--acento); animation: corre 1.1s ease-in-out infinite; }
#carregando.erro i { display: none; }
#carregando p { margin: 0; padding: 0 24px; font-size: 14px; color: var(--t2); text-align: center; }
#carregando a { padding: 11px 18px; border-radius: 999px; border: 1px solid rgb(124 200 255 / .55); color: #bfe3ff; font-size: 14px; font-weight: 600; text-decoration: none; }
@keyframes corre { from { transform: translateX(-110%); } to { transform: translateX(270%); } }

/* ---------- telas menores (ainda no layout de computador) ---------- */
@media (max-width: 1320px) { .marca span { display: none; } .troca button { padding: 11px 16px; font-size: 14.5px; } .botao span { display: none; } .botao { padding: 10px; } .botao.primario span, .cartao-rota .botao span { display: inline; } }

/* ==============================================================================================================
   CELULAR. O main.js marca o <body>: data-tela="grande" (computador), "celular" (em pé: a sala fica em cima e a
   conversa sobe de baixo, como uma folha) ou "deitado" (aparelho deitado: a conversa fica ao lado).
   --folha (altura da folha) e --lado (largura do painel lateral) vêm do hud.js, em px.
   Embaixo da sala fica uma coisa de cada vez: os pontos, o cartão da rota ou a legenda do tour.
   ============================================================================================================== */
.ver-totem, .fecha-painel, .dica-toque, .selo-curto { display: none; }
.troca button span i { font-style: normal; }

/* --- barra do topo: símbolo, interruptor curto e dois botões --- */
body:not([data-tela="grande"]) .topo { grid-template-columns: auto 1fr auto; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 22px calc(12px + env(safe-area-inset-left)); }
body:not([data-tela="grande"]) .marca img { width: 32px; height: 32px; object-fit: cover; object-position: left center; }
body:not([data-tela="grande"]) .troca { justify-self: center; padding: 4px; }
body:not([data-tela="grande"]) .troca-polegar { top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); }
body:not([data-tela="grande"]) .troca button { padding: 9px 13px; gap: 6px; font-size: 13.5px; }
body:not([data-tela="grande"]) .troca button span i { display: none; }
body:not([data-tela="grande"]) .acoes { gap: 6px; }
body:not([data-tela="grande"]) [data-acao="cheia"], body:not([data-tela="grande"]):not(.em-foco) [data-acao="geral"] { display: none; }
@media (max-width: 345px) { body[data-tela="celular"] .troca button span { display: none; } }

/* --- selos dos pontos: nome curto e área de toque maior --- */
body:not([data-tela="grande"]) .selo { gap: 6px; padding: 4px 11px 4px 4px; font-size: 12.5px; }
body:not([data-tela="grande"]) .selo b { width: 24px; height: 24px; font-size: 12px; }
body:not([data-tela="grande"]) .selo-nome { display: none; }
body:not([data-tela="grande"]) .selo-curto { display: inline; }
body:not([data-tela="grande"]) .selo em { padding: 3px 7px; font-size: 9.5px; }
body:not([data-tela="grande"]) .selo::before { content: ""; position: absolute; inset: -9px -6px; }
body:not([data-tela="grande"]).em-foco:not(.com-rota) #rotulos { display: none; } /* ponto aberto: o seletor embaixo da sala já diz onde a pessoa está */

/* --- visão geral: os quatro pontos numa barra de baixo, a dica e o aviso de simulação --- */
body[data-tela="celular"] .pontos { left: calc(10px + env(safe-area-inset-left)); right: calc(10px + env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); transform: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; padding: 5px; }
body[data-tela="celular"] .ponto { flex-direction: column; justify-content: center; gap: 4px; min-width: 0; padding: 7px 2px 6px; font-size: 12px; }
body[data-tela="celular"] .ponto span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
body[data-tela="deitado"] .pontos { bottom: calc(8px + env(safe-area-inset-bottom)); padding: 4px; }
body[data-tela="deitado"] .ponto { padding: 6px 12px 6px 6px; font-size: 13px; }
body:not([data-tela="grande"]) .dica-toque { display: block; position: absolute; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); margin: 0; padding: 8px 15px; border-radius: 999px; transform: translateX(-50%);
  background: rgb(111 232 184 / .96); color: #05301f; font: 700 13px/1 var(--display); white-space: nowrap; box-shadow: 0 12px 26px -12px rgb(0 4 26 / .95); pointer-events: none; animation: quica 1.8s ease-in-out infinite; }
body[data-tela="deitado"] .dica-toque { bottom: calc(62px + env(safe-area-inset-bottom)); }
body.em-foco .dica-toque, body.ja-tocou .dica-toque, body.em-tour .dica-toque { display: none; }
@keyframes quica { 50% { transform: translate(-50%, -5px); } }
body[data-tela="celular"] .aviso-sim { left: 0; right: 0; bottom: calc(80px + env(safe-area-inset-bottom)); text-align: center; font-size: 10.5px; }
body[data-tela="deitado"] .aviso-sim { left: calc(12px + env(safe-area-inset-left)); bottom: calc(12px + env(safe-area-inset-bottom)); font-size: 10.5px; }
body:not([data-tela="grande"]).em-foco .aviso-sim, body:not([data-tela="grande"]).em-tour .aviso-sim { display: none; }

/* --- ponto aberto: a conversa é a folha; os pontos viram um seletor pequeno embaixo da sala --- */
body[data-tela="celular"] .painel-fone { z-index: 20; top: auto; left: 0; right: 0; bottom: 0; height: var(--folha, 60vh); gap: 0; align-items: stretch; transform: none; }
body[data-tela="celular"] .painel-fone.entra { animation: sobe-folha .42s cubic-bezier(.2, .8, .2, 1) both; }
@media (min-width: 640px) { body[data-tela="celular"] .painel-fone { left: 50%; right: auto; width: 600px; margin-left: -300px; } }
body[data-tela="deitado"] .painel-fone { z-index: 20; top: 0; bottom: 0; left: auto; right: 0; width: var(--lado, 46vw); gap: 0; align-items: stretch; transform: none; }
body[data-tela="deitado"] .painel-fone.entra { animation: entra-lado .42s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes sobe-folha { from { transform: translateY(102%); } }
@keyframes entra-lado { from { transform: translateX(102%); } }
body:not([data-tela="grande"]) .painel-fone .painel-titulo { display: none; }
body:not([data-tela="grande"]) .fone { flex: 1; min-height: 0; width: auto; height: auto; aspect-ratio: auto; padding: 0; overflow: hidden; background: #f4f7fc;
  box-shadow: 0 0 0 1px rgb(255 255 255 / .2), 0 -20px 50px -18px rgb(0 4 26 / .95); }
body[data-tela="celular"] .fone { border-radius: 22px 22px 0 0; }
body[data-tela="deitado"] .fone { border-radius: 20px 0 0 20px; }
body:not([data-tela="grande"]) .fone-ilha, body:not([data-tela="grande"]) .fone-tela::before { display: none; }
body:not([data-tela="grande"]) .fone-tela { border-radius: 0; }
body:not([data-tela="grande"]) .fone .cv { font-size: 15px; }
body:not([data-tela="grande"]) .fone .cv-topo { padding: 9px 56px 9px 14px; }
body:not([data-tela="grande"]) .fone .cv-topo img { width: 34px; height: 34px; }
body:not([data-tela="grande"]) .fone .cv-campo { display: none; }
body:not([data-tela="grande"]) .fone .cv-rodape { padding: 0 12px calc(6px + env(safe-area-inset-bottom)); border-top: 0; background: none; }
body:not([data-tela="grande"]) .fone .cv-sim { margin-top: 0; }
body:not([data-tela="grande"]) .fone .cv-chips.cv-menu { gap: 6px; padding: 6px 10px 8px; }
body:not([data-tela="grande"]) .fone .cv-servico { min-height: 58px; gap: 4px; padding: 6px 3px; }
body:not([data-tela="grande"]) .fone .cv-servico i { width: 28px; height: 28px; border-radius: 10px; }
body:not([data-tela="grande"]) .fone .cv-chip { min-height: 40px; font-size: 14px; }
body:not([data-tela="grande"]) .fone .cv-acao { min-height: 44px; font-size: 14.5px; }
body:not([data-tela="grande"]) .leitor { gap: 14px; }
body:not([data-tela="grande"]) .leitor-mira { width: min(52%, 46vh, 200px); }
body:not([data-tela="grande"]) .painel-fone .fecha-painel { display: grid; place-items: center; position: absolute; z-index: 4; top: 9px; right: 10px; width: 36px; height: 36px; appearance: none; border: 0; border-radius: 50%;
  background: rgb(255 255 255 / .15); color: #fff; cursor: pointer; }
body:not([data-tela="grande"]).em-foco .pontos { left: 50%; right: auto; bottom: calc(var(--folha) + 8px); transform: translateX(-50%); display: flex; gap: 3px; padding: 4px; border-radius: 999px; }
body[data-tela="deitado"].em-foco .pontos { left: calc((100% - var(--lado)) / 2); bottom: calc(8px + env(safe-area-inset-bottom)); }
body:not([data-tela="grande"]).em-foco .ponto { flex-direction: row; gap: 6px; padding: 4px; border-radius: 999px; font-size: 12.5px; }
body:not([data-tela="grande"]).em-foco .ponto span { display: none; }
body:not([data-tela="grande"]).em-foco .ponto.ativo { padding-right: 12px; }
body:not([data-tela="grande"]).em-foco .ponto.ativo span { display: inline; }
body:not([data-tela="grande"]).com-rota .pontos, body:not([data-tela="grande"]).em-tour .pontos { display: none; }
body[data-tela="deitado"].em-foco .topo { right: var(--lado); }

/* --- a tela do totem (ou a placa) ampliada, por cima de tudo --- */
body:not([data-tela="grande"]) .painel-totem { display: none; }
body:not([data-tela="grande"]).totem-aberto .painel-totem:not([hidden]) { display: flex; position: fixed; z-index: 35; inset: 0; justify-content: center; gap: 12px; transform: none;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom)); background: rgb(3 8 32 / .82); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); animation: aparece .25s ease both; }
body:not([data-tela="grande"]) .painel-totem .aparelho { height: min(68vh, 660px); max-width: 88vw; }
body:not([data-tela="grande"]) .painel-totem[data-modo="placa"] .aparelho { height: min(66vh, 640px); }
body[data-tela="deitado"] .painel-totem .aparelho, body[data-tela="deitado"] .painel-totem[data-modo="placa"] .aparelho { height: 74vh; }
body[data-tela="deitado"] .painel-totem .painel-dica { display: none; }
body:not([data-tela="grande"]).em-tour.totem-aberto .painel-totem:not([hidden]) { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
body:not([data-tela="grande"]).em-tour .painel-totem .aparelho { height: min(58vh, 600px); }
body:not([data-tela="grande"]) .painel-totem .fecha-painel { display: grid; place-items: center; position: absolute; top: calc(12px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); width: 42px; height: 42px; appearance: none;
  border: 1px solid var(--borda); border-radius: 50%; background: var(--vidro); color: #fff; cursor: pointer; }
body:not([data-tela="grande"]) .ver-totem:not([hidden]) { display: flex; flex-direction: column; align-items: center; gap: 4px; position: absolute; z-index: 3; top: calc((100% - var(--folha)) / 2 + 24px); right: calc(10px + env(safe-area-inset-right));
  min-width: 56px; padding: 9px 8px 7px; appearance: none; border: 1px solid var(--borda); border-radius: 16px; transform: translateY(-50%); background: var(--vidro); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #fff; font: 650 10.5px/1 var(--texto); white-space: nowrap; box-shadow: var(--sombra); cursor: pointer; pointer-events: auto; }
body[data-tela="deitado"] .ver-totem:not([hidden]) { top: 54%; right: calc(var(--lado) + 10px); }
body:not([data-tela="grande"]) .ver-totem .ico { width: 20px; height: 20px; }
body:not([data-tela="grande"]).em-tour .ver-totem:not([hidden]), body:not([data-tela="grande"]).com-rota .ver-totem:not([hidden]) { display: none; }

/* --- cartão da rota e legenda do tour: compactos, embaixo da sala --- */
body:not([data-tela="grande"]) .cartao-rota { left: calc(10px + env(safe-area-inset-left)); right: calc(10px + env(safe-area-inset-right)); bottom: calc(var(--folha) + 8px); transform: none; justify-content: space-between; gap: 10px;
  padding: 7px 7px 7px 14px; border-radius: 14px; animation: aparece .3s ease both; }
body[data-tela="deitado"] .cartao-rota { right: calc(var(--lado) + 10px); bottom: calc(8px + env(safe-area-inset-bottom)); }
body:not([data-tela="grande"]) .cartao-rota b { font-size: 14.5px; }
body:not([data-tela="grande"]) .cartao-rota span { font-size: 12px; }
body:not([data-tela="grande"]) .cartao-rota .botao { padding: 9px 11px; }
body:not([data-tela="grande"]) .cartao-rota .botao span { display: none; }
body:not([data-tela="grande"]).em-tour .cartao-rota { display: none; }
body:not([data-tela="grande"]) .legenda { left: calc(10px + env(safe-area-inset-left)); right: calc(10px + env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); width: auto; transform: none;
  grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px; padding: 10px 10px 10px 14px; border-radius: 16px; animation: aparece .3s ease both; }
body[data-tela="celular"].em-foco .legenda { bottom: calc(var(--folha) + 8px); }
body[data-tela="deitado"].em-foco .legenda { right: calc(var(--lado) + 10px); }
body:not([data-tela="grande"]).totem-aberto .legenda, body:not([data-tela="grande"]).com-qr .legenda { right: calc(10px + env(safe-area-inset-right)); bottom: calc(10px + env(safe-area-inset-bottom)); }
body:not([data-tela="grande"]) .legenda-passo { grid-column: 1; grid-row: 1; font-size: 11.5px; }
body:not([data-tela="grande"]) .legenda-texto { grid-column: 1; grid-row: 2; }
body:not([data-tela="grande"]) .legenda-texto b { font-size: 15.5px; line-height: 1.2; }
body:not([data-tela="grande"]) .legenda-texto p { margin-top: 3px; font-size: 12.5px; line-height: 1.3; }
body:not([data-tela="grande"]) .legenda-botoes { grid-column: 2; grid-row: 1 / 3; align-self: center; gap: 6px; }
body:not([data-tela="grande"]) .legenda-botoes .botao { padding: 11px; }
body:not([data-tela="grande"]) .legenda-botoes .botao.primario span { display: none; }
body[data-tela="deitado"] .legenda-texto p { display: none; }
@media (max-height: 640px) { body[data-tela="celular"].em-foco .legenda-texto p { display: none; } }

/* --- QR grande: empilhado --- */
body:not([data-tela="grande"]) .sobre { padding: 16px; }
body:not([data-tela="grande"]).em-tour .sobre { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
body[data-tela="celular"] .qr-cartao { flex-direction: column; gap: 12px; max-width: 100%; padding: 22px 18px 18px; border-radius: 22px; text-align: center; }
body[data-tela="celular"] .qr-imagem svg { width: min(70vw, 40vh, 340px); }
body[data-tela="deitado"] .qr-cartao { gap: 20px; padding: 16px 44px 16px 16px; border-radius: 20px; }
body[data-tela="deitado"] .qr-imagem svg { width: min(58vh, 300px); }
body:not([data-tela="grande"]) .qr-texto b { font-size: 21px; }
body:not([data-tela="grande"]) .qr-texto p { margin-top: 6px; font-size: 15px; }
body:not([data-tela="grande"]) .qr-texto .qr-sub { font-size: 13.5px; }
body:not([data-tela="grande"]) .qr-texto .qr-url { font-size: 11.5px; overflow-wrap: anywhere; }
body:not([data-tela="grande"]) #carregando img { width: 190px; }

@media (prefers-reduced-motion: reduce) { .painel.entra, .cartao-rota, .legenda, .sobre, .qr-cartao, .dica-toque, body:not([data-tela="grande"]) .painel-fone.entra { animation: none; } }
