/* Tutorial de instalação na tela de início (28/11/2026). Ver
   frontend/static/js/tutorial-instalacao.js. Mesmo visual da prévia aprovada
   (/static/lab/tutorial-iphone.html). */
.tinst-overlay { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center;
  padding: 16px; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: rgba(5,5,10,.72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .22s ease; }
.tinst-overlay.show { opacity: 1; }
.tinst-card { width: 100%; max-width: 400px; max-height: 100%; overflow-y: auto; background: #15151f; color: #ececf4;
  border-radius: 16px; border: 1px solid rgba(255,255,255,.07); box-shadow: 0 20px 60px rgba(0,0,0,.5);
  display: flex; flex-direction: column; transform: translateY(12px); transition: transform .22s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.tinst-overlay.show .tinst-card { transform: none; }
.tinst-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 0; }
.tinst-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(124,77,255,.16); color: #7C4DFF; flex-shrink: 0; }
.tinst-htxt { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.tinst-htxt strong { font-size: 14.5px; }
.tinst-htxt span { color: #8a8aa0; font-size: 12px; }
.tinst-pontos { display: flex; gap: 5px; }
.tinst-pontos i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); transition: width .2s, background .2s; }
.tinst-pontos i.at { width: 16px; background: #7C4DFF; }
.tinst-imgwrap { position: relative; margin: 14px auto 0; width: fit-content; max-width: calc(100% - 28px);
  border-radius: 10px; overflow: hidden; background: #0a0a12; border: 1px solid rgba(255,255,255,.05); flex-shrink: 0; }
.tinst-imgwrap > img, .tinst-imgwrap > video { display: block; max-width: 100%; height: auto; margin: 0 auto;
  max-height: clamp(200px, calc(100vh - 340px), 460px); max-height: clamp(200px, calc(100dvh - 340px), 460px); }
/* Anel com o formato do que marca: círculo (botão redondo) ou linha de menu. */
.tinst-ring { position: absolute; transform: translate(-50%,-50%); border: 2.5px solid #7C4DFF; border-radius: 10px;
  pointer-events: none; animation: tinst-pulso 1.35s ease-in-out infinite; }
.tinst-ring.circulo { border-radius: 50%; }
@keyframes tinst-pulso {
  0%,100% { opacity: .6; box-shadow: 0 0 0 2px rgba(124,77,255,.2), 0 0 10px rgba(124,77,255,.35); }
  50% { opacity: 1; box-shadow: 0 0 0 5px rgba(124,77,255,.35), 0 0 24px rgba(124,77,255,.75); }
}
/* Mão: o ponto (left/top) é a ponta do dedo; o desenho aponta para cima e gira
   em volta da ponta. Para a esquerda é espelhada (polegar para cima). */
.tinst-mao { position: absolute; width: 26px; height: 30px; margin: -1px 0 0 -10px; transform-origin: 10px 1px;
  transform: var(--g); pointer-events: none; filter: drop-shadow(0 2px 5px rgba(0,0,0,.65));
  animation: tinst-aponta 1.1s ease-in-out infinite; }
.tinst-mao svg { display: block; width: 26px; height: 30px; }
.tinst-mao.esq { --g: rotate(90deg); }
.tinst-mao.dir { --g: scaleX(-1) rotate(90deg); }
.tinst-mao.cima { --g: scaleX(-1) rotate(180deg); }
.tinst-mao.baixo { --g: rotate(0deg); }
@keyframes tinst-aponta { 0%,100% { transform: var(--g) translateY(6px); } 50% { transform: var(--g) translateY(1px); } }
/* Último passo: tela de início desenhada, com o ícone do Freely. */
.tinst-tela-inicio { width: 260px; padding: 26px 18px 30px; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px 12px; justify-items: center;
  background: radial-gradient(120% 90% at 20% 0%, #3a2a7a 0%, #1a1530 55%, #0e0c1a 100%); }
.tinst-app { display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.tinst-app i { width: 48px; height: 48px; border-radius: 12px; background: rgba(255,255,255,.10); display: block; }
.tinst-app span { font-size: 10px; line-height: 12px; }
.tinst-app span:empty { width: 30px; height: 6px; margin: 3px 0; border-radius: 3px; background: rgba(255,255,255,.12); }
.tinst-app.freely img { width: 48px; height: 48px; border-radius: 12px; display: block; }
.tinst-app.freely span { color: #fff; font-weight: 500; }
.tinst-app.freely .tinst-ring { left: 24px; top: 24px; width: 60px; height: 60px; border-radius: 16px; }
.tinst-app.freely .tinst-mao { left: 58px; top: 24px; }
.tinst-body { padding: 14px 18px 4px; }
.tinst-body h4 { margin: 0 0 6px; font-size: 16px; color: #ececf4; }
.tinst-body p { margin: 0; color: #b6b6c8; font-size: 13.5px; line-height: 1.6; }
.tinst-body b { color: #fff; }
/* Botões do iPhone no texto: recorte real (⋯, Ver Mais) ou item de menu montado. */
.tinst-botao { display: inline-block; width: auto; vertical-align: middle; margin: 2px 1px; border-radius: 8px; }
.tinst-botao.circulo { border-radius: 50%; }
.tinst-menu { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; margin: 2px 1px;
  padding: 5px 12px 5px 9px; border-radius: 10px; background: #2c2c31; color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 14px; font-weight: 400; line-height: 1.2; white-space: nowrap; }
.tinst-menu svg { width: 16px; height: 18px; flex-shrink: 0; }
.tinst-menu img { width: 20px; height: 20px; flex-shrink: 0; margin: -2px -2px -1px; }
.tinst-foot { display: flex; gap: 10px; padding: 14px 16px 16px; }
.tinst-foot button { flex: 1; height: 44px; border-radius: 22px; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.tinst-voltar { background: none; color: #b6b6c8; border: 1px solid rgba(255,255,255,.14); }
.tinst-avancar { background: #7C4DFF; color: #fff; border: 0; }
.tinst-agora-nao { background: none; border: 0; color: #8a8aa0; font: inherit; font-size: 13px; padding: 0 0 14px; cursor: pointer; }
