/* ===== Componentes (um bloco por componente de app/components/ui) ===== */

/* Wordmark + StepDots */
.abar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); min-height: 54px }
.wm { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none }
.wm .nome { display: block; width: 70px; height: 22px; flex: none }
.wm .mascot { --ms: 28px }

/* Mascot: o Espiando, azul com luz e topete, num azulejo claro (design/marca). Um humor por vez (.m-*); os que são
   estado (calmo, curioso, concentrado, sonolento) repetem, os que são reação (surpreso, feliz, apaixonado) tocam duas
   vezes e param. O topete (.mt) acompanha o humor. */
.mascot { --ms: 24px; display: inline-block; flex: none; width: var(--ms); height: var(--ms); border-radius: 23%; overflow: hidden; vertical-align: middle;
          background: linear-gradient(var(--tile-a), var(--tile-b)); box-shadow: inset 0 0 0 1px var(--tile-edge) }
.mascot svg { display: block; width: 100%; height: 100%; overflow: visible }
.mascot .mb { transform-box: fill-box; transform-origin: 50% 100% }
.mascot .me, .mascot .mo, .mascot .ml { transform-box: fill-box; transform-origin: center }
.mascot .mt { transform-box: view-box; transform-origin: 53px 52px; transition: transform .4s cubic-bezier(.3, 1.5, .5, 1) }
.mascot.look-dot .me { transform: translate(3.5px, -2.5px) } /* ao lado do nome: olha para o pingo do i */
.wait .mascot { --ms: 40px; flex: none }
.m-calm .mt { animation: msTuft 3.2s ease-in-out infinite }
.m-curious .mt { animation: msTuftLook 3s ease-in-out infinite }
.m-focus .mt { transform: rotate(6deg) }
.m-wow .mt { transform: rotate(-26deg) }
.m-joy .mt { animation: msTuftHop 1s 2 }
.m-love .mt { transform: rotate(-12deg) }
.m-sleepy .mt { transform: rotate(22deg) }
.m-shy .mt { transform: rotate(32deg) }
.m-sad .mt { transform: rotate(44deg) }
.m-calm .mb { animation: msBreath 3.2s ease-in-out infinite }
.m-calm .mo { animation: msBlink 4.4s infinite }
.m-curious .me { animation: msLook 3s ease-in-out infinite }
.m-curious .mb { animation: msTilt 3s ease-in-out infinite }
.m-focus .me { transform: translateY(2px) }
.m-focus .mo { transform: scaleY(.55) }
.m-focus .mb { animation: msStep 1.2s steps(1) infinite }
.m-wow .mb { animation: msJolt 1.2s 2 }
.m-wow .mo { animation: msBig 1.2s 2 }
.m-joy .mb { animation: msHop 1s 2 }
.m-love .ml { animation: msBeat 1.4s 2 }
.m-sleepy .mo { animation: msLids 4s infinite }
.m-sleepy .mb { animation: msNod 4s infinite }
.m-sleepy .mz { animation: msZ 4s infinite }
.m-shy .me { transform: translate(-4px, 3px) }
.m-shy .mb { animation: msShy 2.6s ease-in-out infinite }
.m-sad .me { transform: translateY(3px) }
.m-sad .mo { transform: scale(.85) }
.m-sad .mb { animation: msSink 1.6s ease-out forwards }
@keyframes msBreath { 0%, 100% { transform: none } 50% { transform: translateY(-1.5px) } }
@keyframes msBlink { 0%, 60%, 66%, 100% { transform: none } 63% { transform: scaleY(.1) } }
@keyframes msLook { 0%, 8% { transform: none } 20%, 40% { transform: translateX(-6px) } 55%, 78% { transform: translate(6px, -1px) } 92%, 100% { transform: none } }
@keyframes msTilt { 0%, 8%, 92%, 100% { transform: none } 20%, 40% { transform: rotate(-3deg) } 55%, 78% { transform: rotate(3deg) } }
@keyframes msStep { 0%, 100% { transform: none } 10% { transform: translateX(.6px) } 20% { transform: translateX(-.6px) } 30% { transform: none } }
@keyframes msJolt { 0%, 20% { transform: none } 36% { transform: translateY(-7px) } 70%, 100% { transform: none } }
@keyframes msBig { 0%, 20% { transform: none } 36%, 70% { transform: scale(1.35) } 90%, 100% { transform: none } }
@keyframes msHop { 0%, 100% { transform: none } 30% { transform: translateY(-9px) } 55% { transform: scaleY(.94) } }
@keyframes msBeat { 0%, 40%, 100% { transform: none } 10%, 30% { transform: scale(1.25) } 20% { transform: scale(1.05) } }
@keyframes msLids { 0% { transform: scaleY(.45) } 60% { transform: scaleY(.12) } 66% { transform: scaleY(1.1) } 74%, 100% { transform: scaleY(.45) } }
@keyframes msNod { 0% { transform: none } 60% { transform: translateY(6px) } 64% { transform: translateY(-3px) } 72%, 100% { transform: none } }
@keyframes msZ { 0%, 10% { opacity: 0; transform: none } 30%, 50% { opacity: 1 } 62%, 100% { opacity: 0; transform: translateY(-6px) } }
@keyframes msShy { 0%, 100% { transform: translateY(1px) } 50% { transform: translateY(3px) rotate(-2deg) } }
@keyframes msSink { to { transform: translateY(5px) } }
@keyframes msTuft { 0%, 100% { transform: rotate(-3deg) } 50% { transform: rotate(4deg) } }
@keyframes msTuftLook { 0%, 8%, 92%, 100% { transform: none } 20%, 40% { transform: rotate(8deg) } 55%, 78% { transform: rotate(-8deg) } }
@keyframes msTuftHop { 0%, 100% { transform: none } 30% { transform: rotate(22deg) } 55% { transform: rotate(-10deg) } }
@media (prefers-reduced-motion: reduce) {
  .mascot * { animation: none !important }
  .m-sleepy .mo { transform: scaleY(.45) }
}
/* StepDots. Celular: "Contornar" sobre três segmentos (feito · atual · a fazer). Computador: círculos com rótulos. */
.steps { display: grid; justify-items: center; gap: 5px; min-width: 0 }
.steps .now { font-size: 13px; font-weight: 700; line-height: 1; color: var(--ink); white-space: nowrap }
.dots { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; align-items: center }
.dots li { width: 18px; height: 4px; border-radius: 2px; background: var(--line); display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink2) }
.dots li.done { background: var(--ink) }
.dots li.on { background: var(--accent) }
.dots li i, .dots li span { display: none }
.dots li i { place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--surface2); color: var(--ink2); font-style: normal; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums }
.dots li i .ic { width: 13px; height: 13px; stroke-width: 3.2 }
.dots li + li::before { content: ""; display: none; width: 18px; height: 2px; border-radius: 1px; background: var(--line) }
.dots li.done + li::before { background: var(--ink) }
.dots li.done i { background: var(--ink); color: var(--bg) }
.dots li.on i { background: var(--accent); color: var(--accent-ink) }
.dots li.on span { color: var(--ink) }
@container app (min-width: 700px) {
  .steps .now { display: none }
  .dots { gap: 8px }
  .dots li, .dots li.done, .dots li.on { width: auto; height: auto; background: none; border-radius: 0; gap: 7px }
  .dots li i { display: grid } .dots li span { display: inline } .dots li + li::before { display: block }
}

/* Botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; color: var(--ink) }
.btn:disabled { opacity: .55; cursor: not-allowed }
.btn.pri { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); flex: 1 }
.btn.big { min-height: 56px; font-size: 17px; border-radius: var(--r-lg); padding: 0 26px }
.btn.icon { width: 48px; padding: 0; flex: none }
/* No celular: ícone com a legenda curta embaixo ("Redes"), para caber ao lado de "Outro" e "Salvar N fotos" */
.btn.icon-text { flex: none; flex-direction: column; gap: 1px; padding: 0 10px; font-size: 11.5px; line-height: 1.1 }
.bar .btn { white-space: nowrap }
.bar .btn.pri { min-width: 0 }   /* a ação principal encolhe e quebra a linha antes de sair da tela */
.bar .btn.pri .btn-lines > span { white-space: normal }
/* Celular estreito: ao lado de Apagar mais e Postar, a ação principal fica sem o ícone e mais justa, para
   "Salvar N fotos" caber numa linha. */
@container app (max-width: 359px) {
  .bar { gap: 6px; padding-inline: 12px }
  .bar .btn:not(.pri) { padding: 0 10px }
  .bar:has(.btn.icon-text) .btn.pri:has(.btn-lines) { padding: 6px 10px; font-size: 14px }
  .bar:has(.btn.icon-text) .btn.pri:has(.btn-lines) > .ic { display: none }
  .bar:has(.btn.icon-text) .btn.pri .btn-lines > span { white-space: nowrap }
}
.btn.sm { min-height: 44px; font-size: 14px; padding: 0 14px; border-radius: 10px }
.btn.link { border-color: transparent; background: transparent; color: var(--ink2); min-height: 44px; font-weight: 600 }
.btn.block { flex: none; width: 100% }
.btn .lg { display: none }
@container app (min-width: 700px) {
  .btn .lg { display: inline } .btn .sm-only { display: none }
  .btn.icon-text { flex-direction: row; gap: 8px; padding: 0 18px; font-size: 15px; flex: 1 }
  .bar .btn.pri { flex: 1 1 100% }   /* no painel lateral a ação principal ocupa a linha inteira */
}
form.button_to { display: contents }

/* Banner (avisos) */
.note { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--r-md); padding: 10px 12px; font-size: 14px; line-height: 1.4 }
.note p { margin: 0; flex: 1 }
.note .ic { margin-top: 1px }
.note.warn { background: var(--warn-bg) } .note.warn .ic { color: var(--warn) }
.note.bad { background: var(--bad-bg) } .note.bad .ic { color: var(--bad) }
.note .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px }
.offline { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: var(--ink); color: var(--bg); font-size: 14px }
.offline p { margin: 0; flex: 1; line-height: 1.3 }
.offline .spy { position: relative; flex: none; width: 30px; height: 26px } /* ele dorme na faixa */
.offline .spy svg { width: 30px }
.offline button { border: 1px solid currentColor; background: transparent; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-weight: 600; font-size: 13px; white-space: nowrap; color: inherit }

/* PhotoTile */
.tile { position: relative; aspect-ratio: 4/3; border-radius: var(--r-sm); overflow: hidden; background: var(--surface2); flex: none; border: 0; padding: 0; display: block; width: 100% }
.tile > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
button.tile, a.tile { cursor: pointer }
.tile.uploading > img { opacity: .45; filter: grayscale(.6) }
.tile .placeholder { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink2) }
.ring { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px; border-radius: 50%;
        background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), rgba(255,255,255,.7) 0);
        -webkit-mask: radial-gradient(circle, transparent 52%, #000 54%); mask: radial-gradient(circle, transparent 52%, #000 54%) }
.badge { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.25); z-index: 2 }
.badge .ic { width: 13px; height: 13px; stroke-width: 3 }
.b-found { background: var(--accent); color: var(--accent-ink); animation: pop .32s cubic-bezier(.3,1.6,.5,1) var(--d, 0ms) both }
.b-done { background: var(--good); color: #fff }
.b-fail { background: var(--bad); color: #fff }
.b-absent { background: var(--surface); color: var(--ink2) }
.tile.absent { outline: 2px dashed var(--ink2); outline-offset: -2px }
.tile.absent > img { opacity: .4 }
.tile .like { position: absolute; top: 5px; right: 5px; width: 16px; height: 16px; border: 1.5px dashed #fff; border-radius: 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.35); z-index: 2 }
.tile.searching::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); background-size: 220% 100%; animation: scan 1.1s linear infinite }
.tile.erasing > img { filter: saturate(.7) brightness(.92) }
.tile.erasing .spin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; border: 3px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spin .8s linear infinite }
.tile.ref { outline: 3px solid var(--select); outline-offset: -3px }
.tile.bad { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: var(--bad-bg); color: var(--bad); text-align: center; padding: 4px }
.tile.bad .ic { width: 20px; height: 20px }
.tile.bad span { font-size: 11px; font-weight: 700; line-height: 1.1 }
.tile .tact { position: absolute; inset: auto 4px 4px 4px; border: 0; border-radius: 6px; background: rgba(17,22,34,.82); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 0; cursor: pointer; z-index: 2 }
.tile.bad .tact { position: static; background: var(--bad); margin-top: 2px; padding: 3px 8px }
.tile.big .kb { position: absolute; top: 4px; left: 4px; background: var(--warn); color: var(--warn-bg); border-radius: 5px; font-size: 10px; font-weight: 700; line-height: 1.2; padding: 1px 4px; max-width: calc(100% - 8px); z-index: 2 }
.tile.big > img, .tile.failed > img { opacity: .55 }
/* recém-apagada: a foto antiga some com brilho por cima da nova */

/* ActionBar */
.bar { grid-area: bar; display: flex; gap: 8px; align-items: center; padding: 12px 16px 14px; background: var(--surface); border-top: 1px solid var(--line); min-height: 76px }
.prog { flex: 1; display: grid; gap: 6px }
.prog .row > span:first-child { min-width: 0 }
.prog .row .eta { white-space: nowrap }
.prog .row { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums }
.bar-t { height: 6px; border-radius: 3px; background: var(--surface2); overflow: hidden }
.bar-t i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .25s }
.slideup { animation: slideup .28s var(--ease-out) both }

/* Toast */
.toasts { position: absolute; left: 12px; right: 12px; bottom: 92px; display: grid; justify-items: center; gap: 8px; pointer-events: none; z-index: 20 }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); border-radius: var(--r-md); padding: 10px 10px 10px 14px; font-size: 14px; font-weight: 500; max-width: 440px; width: 100%; box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); position: relative; overflow: hidden; animation: slideup .25s ease-out both }
.toast p { margin: 0; flex: 1; line-height: 1.3 }
.toast .ic { width: 18px; height: 18px }
.toast.bad .ic { color: var(--bad) } .toast.good .ic { color: var(--good) }
.toast .tact { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 0; background: var(--bg); color: var(--ink); border-radius: 8px; padding: 9px 12px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none }
.toast .timer { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); animation: timer var(--ttl) linear both }
/* No computador o aviso fica acima da linha de ferramentas, nunca sobre a foto onde se faz o gesto. */
@container app (min-width: 700px) { .toasts { left: 16px; right: 346px; bottom: 74px } .s-entrada .toasts, .s-envio .toasts { right: 16px; bottom: 20px } }
/* Na Entrada o aviso desce sobre o botão e sobre o Espiando: no celular ele fica no alto, logo abaixo da barra (v0.28). */
@container app (max-width: 699px) { .s-entrada .toasts { bottom: auto; top: 66px } }

/* Stage (foto grande) */
.stage { grid-area: stage; container: stage / size; position: relative; display: flex; align-items: center; justify-content: center; background: var(--stage); min-height: 0 }
.photo { position: relative; width: min(calc(100cqw - 24px), calc((100cqh - 120px) * var(--ar, 1.333))); aspect-ratio: var(--ar, 1.333); border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px -18px rgba(0,0,0,.5); cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none }
/* A foto do palco. --ah e --aw: a altura e a largura que o palco dá à foto; --fw: a largura da foto inteira (1×).
   O quadro cresce com o zoom (--zs) até encher o palco e só então corta a foto; --bw é a largura da foto inteira,
   medida (zoom_controller.js). */
.stage > .photo { --ah: calc(100cqh - 120px); --aw: calc(100cqw - 24px); --fw: min(var(--aw), calc(var(--ah) * var(--ar, 1.333)));
  width: min(var(--aw), calc(var(--fw) * var(--zs, 1))); height: min(var(--ah), calc(var(--fw) * var(--zs, 1) / var(--ar, 1.333))); aspect-ratio: auto }
.stage > .photo .zl { inset: 0 auto auto 0; width: var(--bw, 100%); aspect-ratio: var(--ar, 1.333) }
.stage > .photo:not([data-zoom-target]) { --zs: 1; --zx: 0px; --zy: 0px } /* a foto sem zoom é sempre a inteira */
.photo.zglide { transition: width .35s var(--ease-out), height .35s var(--ease-out) }
.photo.zglide .zl { transition: transform .35s var(--ease-out) }
/* Folhear no Resultado (PageArrowComponent): seta de 44 px. No computador, uma de cada lado do palco, com a foto entre
   as duas faixas (52 px cada: a seta e 4 px de cada lado dela). No celular, nas pontas da tira, e o palco é só da foto. */
.pgr { position: relative; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); z-index: 6 }
.pgr .ic { width: 22px; height: 22px }
.pgr .badge { top: -3px; right: -3px; width: 18px; height: 18px }
.pgr .badge .ic { width: 12px; height: 12px }
.pgr:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px }
.stage > .pgr { position: absolute; top: calc(50% - 33px); margin-top: -22px }
.stage > .pgr.prev { left: 4px } .stage > .pgr.next { right: 4px }
.stage:not(:has(> .abrow)) > .pgr { top: 50% }
#strip > .pgr { display: none }
#strip > .rolo { display: contents } /* no computador as miniaturas ficam na grade da tira */
@container app (min-width: 700px) { .stage:has(> .pgr) > .photo { --aw: calc(100cqw - 104px) } }
@container app (max-width: 699px) {
  .stage > .pgr { display: none }
  /* As setas ficam paradas nas pontas; as miniaturas rolam entre elas (.rolo). */
  #strip:has(> .rolo) { overflow: visible; align-items: center }
  #strip > .rolo { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; scroll-padding-inline: 8px }
  #strip > .pgr { display: grid }
  #strip > .pgr.chama { animation: setaChama 1.3s ease-in-out 1 }
}
/* O anel que anda de uma miniatura até a outra ao folhear (folhear_controller.js). */
.ring-anda { position: fixed; z-index: 30; border-radius: 7px; box-shadow: inset 0 0 0 3px var(--select); pointer-events: none }
.btn.pri.pulsa-uma { animation: pulsaUma .9s ease-out 1 }
@keyframes setaChama { 0%, 100% { transform: none } 20%, 60% { transform: translateX(6px) } 40%, 80% { transform: none } }
@keyframes pulsaUma { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent) } 100% { box-shadow: 0 0 0 14px transparent } }
@media (prefers-reduced-motion: reduce) { #strip > .pgr.chama, .btn.pri.pulsa-uma { animation: none } }
/* A foto que não saiu: o contorno em vermelho, parado, e o selo no canto de cima dele; embaixo, no lugar do
   Antes | Depois, um botão só (falhou_controller.js). O mesmo selo da miniatura, da seta e da linha do topo. */
.photo.falhou .falhou-c { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none }
.photo.falhou .falhou-c path { fill: color-mix(in srgb, var(--bad) 14%, transparent); stroke: var(--bad); stroke-width: 3; stroke-dasharray: 7 5;
  vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)) }
.photo.falhou .fselo { right: auto; width: 30px; height: 30px; margin: -15px 0 0 -15px; z-index: 3 }
.photo.falhou .fselo .ic { width: 18px; height: 18px; stroke-width: 3 }
.stage > .abrow .button_to:has(.retry) { flex: 1 }
.btn.pri.retry { width: 100%; min-height: 56px; font-size: 17px }
.btn.pri.retry .btn-lines { display: grid; text-align: left; line-height: 1.15 }
.btn.pri.retry small { font-size: 13px; font-weight: 600; opacity: .9 }
.sline.bad.falhou > .ic { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--bad); color: #fff; stroke-width: 3 }
.photo > img, .zl > img, .photo .layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none }
.photo[aria-busy="true"] { cursor: progress }
/* Botões de objeto existem para o teclado (Tab + Enter). Não capturam toque nem clique: o toque livre decide. */
.objbtn { position: absolute; border: 0; background: transparent; border-radius: 10px; padding: 0; z-index: 3; pointer-events: none }
.objbtn:focus-visible { outline: 3px dashed var(--select); outline-offset: 2px }
.selov { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2 }
/* A foto que volta pelo Desfazer do tirar do lote (volta_controller.js): a miniatura volta, o contorno se desenha, o ✓
   salta, o número do botão sobe. */
.tile.back { animation: tileBack .22s cubic-bezier(.2,.8,.3,1) both }
.tile.back .b-found { animation-delay: .5s }
.selov.draw .ants, .selov.draw .occ.on .line { animation: selDraw .36s ease-out .15s backwards, ants .9s linear .51s infinite }
.selov.draw .dim { animation: selDim .2s linear .45s backwards }
.btn .tick { display: inline-block; animation: tick .22s ease-out .55s backwards }
@keyframes tileBack { from { opacity: 0; transform: translateY(-14px) scale(.8) } }
@keyframes selDraw { from { stroke-dasharray: var(--len, 2000px); stroke-dashoffset: var(--len, 2000px); fill-opacity: 0 } to { stroke-dasharray: var(--len, 2000px); stroke-dashoffset: 0 } }
@keyframes selDim { from { opacity: 0 } }
@keyframes tick { from { opacity: 0; transform: translateY(8px) } }
.toast .tact[aria-disabled="true"] { opacity: .55; cursor: default }
.toast .tact-wait { display: inline-flex; vertical-align: -3px; margin-right: 6px }
.toast .tact-wait[hidden] { display: none }
.toast .tact-wait .ic { width: 15px; height: 15px; color: inherit }
/* A busca não saiu na foto aberta: a marca da miniatura ao lado do Tentar de novo, no alto da foto, à esquerda (embaixo,
   à direita, ficam o − e o +). */
.vbanner.selfail, html:not([data-espiando="desligado"]) .vbanner.selfail { top: 8px; bottom: auto; gap: 6px }
html:not([data-espiando="desligado"]) .vbanner.selfail { left: 8px; transform: none }
.vbanner.selfail .badge { position: static; flex: none; width: 26px; height: 26px }
.vbanner.selfail .badge .ic { width: 16px; height: 16px }
.selwait { position: absolute; inset: 0; pointer-events: none; z-index: 2 }
.selwait.searching { background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); background-size: 220% 100%; animation: scan 1.1s linear infinite }
.selov .dim { fill: var(--scrim) }
.selov .ants { fill: rgba(255,197,61,.16); stroke: var(--select); stroke-width: 3; stroke-dasharray: 7 5; vector-effect: non-scaling-stroke; animation: ants .9s linear infinite }
.lassobox { position: absolute; border: 2px dashed var(--select); background: rgba(255,197,61,.14); border-radius: 6px; pointer-events: none; z-index: 4 }
/* Tirar e pôr (v0.35): achado = o tracejado da seleção; parecido = tracejado fino, branco e parado, sem escurecer.
   .hot: o contorno sob o cursor ou o dedo engrossa (é o que o toque vai alternar). */
.selov .occ .line { vector-effect: non-scaling-stroke; transition: stroke-width .12s }
.selov .occ.on .line { fill: rgba(255,197,61,.16); stroke: var(--select); stroke-width: 3; stroke-dasharray: 7 5; animation: ants .9s linear infinite }
.selov .occ.off .line { fill: transparent; stroke: #fff; stroke-width: 1.5; stroke-dasharray: 4 4; filter: drop-shadow(0 0 1px rgba(0,0,0,.7)) }
.selov .occ.hot .line, .selov .occ:focus-visible .line { stroke-width: 5 }
.selov .occ.off.hot .line, .selov .occ.off:focus-visible .line { stroke-width: 3 }
.selov .occ:focus { outline: none }
.selov .occ.look .line { animation: occLook .5s ease-out }
/* O ensino (ensino_controller.js): enquanto o dedo aperta, o contorno mostra como fica trocado. */
.selov .occ.demo-on .line { fill: rgba(255,197,61,.16); stroke: var(--select); stroke-width: 3; stroke-dasharray: 7 5; filter: none; animation: ants .9s linear infinite }
.selov .occ.demo-off .line { fill: transparent; stroke: #fff; stroke-width: 1.5; stroke-dasharray: 4 4; animation: none }
.tapgest.teach { z-index: 4; opacity: 1; animation: none }
.tapgest.teach.press { animation: teachPress 1.2s cubic-bezier(.4,0,.2,1) both }
.tapgest.teach::after { animation: none }
.tapgest.teach.press::after { animation: teachRing 1.2s ease-out both }
@keyframes teachPress { 0% { opacity: 0; transform: translate(8px, 12px) scale(1.06) } 25% { opacity: 1; transform: none } 35%, 75% { opacity: 1; transform: scale(.9) } 85% { opacity: 1; transform: none } 100% { opacity: 0; transform: translate(8px, 12px) scale(1.06) } }
@keyframes teachRing { 0%, 32% { opacity: 0; transform: scale(.4) } 36% { opacity: 1 } 70%, 100% { opacity: 0; transform: scale(1.3) } }
.tile.look { animation: tileLook .9s ease-out }
@keyframes tileLook { 30% { transform: scale(1.08) } }
@keyframes occLook { 50% { stroke-width: 6 } }
/* Acertar antes de confirmar: alças nos cantos do contorno e, colados no canto de baixo, o encolher e o esticar. */
.rsz { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; padding: 0; border-radius: 50%; background: #fff; border: 2.5px solid var(--select); box-shadow: 0 1px 3px rgba(0,0,0,.45); z-index: 4; touch-action: none; pointer-events: auto }
.rsz::before { content: ""; position: absolute; inset: -14px } /* alvo de toque de 44 px */
.rsz-nw, .rsz-se { cursor: nwse-resize } .rsz-ne, .rsz-sw { cursor: nesw-resize }
.rsz:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
.rsteps { position: absolute; display: flex; gap: 6px; margin: 10px 0 0 10px; z-index: 4; transform-origin: 0 0 }
.rsteps.dentro { translate: calc(-100% - 20px) 0 } /* sem lugar à direita: do lado de dentro do contorno */
.rsteps.acima { translate: 0 calc(-100% - 20px) } .rsteps.dentro.acima { translate: calc(-100% - 20px) calc(-100% - 20px) }
.rstep { position: relative; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; background: #fff; color: #111622; border: 2.5px solid var(--select); box-shadow: 0 1px 4px rgba(0,0,0,.35); cursor: pointer }
.rstep .ic { width: 22px; height: 22px }
.rstep::before { content: ""; position: absolute; inset: -2px } /* com o vão entre eles, 44 px de alvo */
.rstep:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
.photo.relendo .rsteps { opacity: 0; pointer-events: none }
.picknote { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; font-weight: 700; font-size: 15px }
.picknote .ic { width: 22px; height: 22px; color: var(--select); flex: none }
/* A luz que lê: fora do contorno a foto escurece; dentro, uma faixa clara desce e volta. Com menos movimento, a faixa
   para no meio e a borda pisca devagar. */
.lendo-luz { position: absolute; border-radius: 8px; outline: 2.5px solid #fff; box-shadow: 0 0 0 200vmax rgba(10,13,20,.55); overflow: hidden; pointer-events: none; z-index: 4 }
.lendo-luz::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%; background: linear-gradient(to bottom, transparent, rgba(255,255,255,.7), transparent); animation: leLuz 1.3s ease-in-out infinite alternate }
@keyframes leLuz { from { translate: 0 -100% } to { translate: 0 250% } }
@keyframes leBorda { 50% { outline-color: rgba(255,255,255,.25) } }
@media (prefers-reduced-motion: reduce) {
  .lendo-luz { animation: leBorda 2.4s ease-in-out infinite }
  .lendo-luz::after { animation: none; translate: 0 75% }
}
/* O contorno ajustado está sendo lido de novo: aparece a caixa que a pessoa deixou, com o contorno de antes apagado
   atrás dela; as bolinhas somem sem perder o foco do teclado. */
.photo.relendo .selov { opacity: .3 }
.photo.relendo .rsz { opacity: 0; pointer-events: none }
/* Desligado: a pergunta num cartão embaixo da foto (entre ela e as ferramentas), com os mesmos botões do balão; a foto
   encolhe para ele caber. */
.stage:has(> .convcard) > .photo { --ah: calc(100cqh - 230px) }
.convcard { display: grid; gap: 8px; width: max-content; max-width: calc(100% - 24px); padding: 10px 12px; border-radius: 14px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: 0 12px 30px -10px rgba(0,0,0,.5) }
.convcard p { margin: 0; font-weight: 700; font-size: 15px }
.convcard span { display: flex; gap: 8px; flex-wrap: wrap }
/* O cursor diz o que o clique faz: mira na foto e no arrasto; mãozinha sobre o que alterna; somar com "Adicionar outro". */
.photo.dragging { cursor: crosshair }
.photo.over-occ { cursor: pointer }
.photo.adding, .photo.adding.over-occ { cursor: copy }
.coach { position: absolute; inset: 0; pointer-events: none; z-index: 3 }

/* Gesture (Ui::GestureComponent): o gesto ensinado. Um contorno que se desenha sozinho enquanto o dedo
   percorre os quatro cantos; o contorno pisca e some. Ciclo de --loop (6,4 s; 1 % = 64 ms), só CSS.
   Dedo entra 3–6 %, contorna 6–34 %, solta 34–40 %; contorno pisca 34–48 % e some 48–58 %. */
.tracebox { position: absolute; pointer-events: none; z-index: 1; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)); animation: traceFade var(--loop) linear infinite }
/* Cada borda mostra o pontilhado do contorno de verdade (amarelo, 7 traço · 5 vão, como .selov .ants), que entra
   deslizando atrás do toque. */
.tracebox .te { position: absolute; overflow: hidden }
.tracebox .te::before { content: ""; position: absolute; inset: 0; animation: var(--edge) var(--loop) cubic-bezier(.4,0,.2,1) infinite }
.tracebox .t, .tracebox .b { width: 100%; height: 3px } .tracebox .r, .tracebox .l { width: 3px; height: 100% }
.tracebox .t::before, .tracebox .b::before { background: repeating-linear-gradient(90deg, var(--select) 0 7px, transparent 7px 12px) }
.tracebox .r::before, .tracebox .l::before { background: repeating-linear-gradient(180deg, var(--select) 0 7px, transparent 7px 12px) }
.tracebox .t { left: 0; top: 0; --edge: edgeT } .tracebox .r { right: 0; top: 0; --edge: edgeR }
.tracebox .b { right: 0; bottom: 0; --edge: edgeB } .tracebox .l { left: 0; bottom: 0; --edge: edgeL }
.tracebox .tfill { position: absolute; inset: 0; background: rgba(255,197,61,.3); opacity: 0; animation: traceFill var(--loop) linear infinite }
@keyframes edgeT { 0%, 6% { transform: translateX(-100%) } 13%, 100% { transform: none } }
@keyframes edgeR { 0%, 13% { transform: translateY(-100%) } 20%, 100% { transform: none } }
@keyframes edgeB { 0%, 20% { transform: translateX(100%) } 27%, 100% { transform: none } }
@keyframes edgeL { 0%, 27% { transform: translateY(100%) } 34%, 100% { transform: none } }
@keyframes traceFill { 0%, 34% { opacity: 0 } 40% { opacity: 1 } 48% { opacity: .27 } 58%, 100% { opacity: 0 } }
@keyframes traceFade { 0%, 48% { opacity: 1 } 58%, 99% { opacity: 0 } 100% { opacity: 1 } }
.hand { position: absolute; left: var(--x0); top: var(--y0); width: 40px; height: 40px; margin: -6px 0 0 -18px; color: #fff; opacity: 0; pointer-events: none;
        filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); animation: demoHand var(--loop) cubic-bezier(.4,0,.2,1) infinite }
.hand .ic { width: 40px; height: 40px; stroke-width: 1.8; fill: rgba(20,24,34,.55) }
/* Só transform e opacidade: o navegador anima sem recalcular a página (antes: left/top a cada quadro). */
.handpath { position: absolute; inset: 0; pointer-events: none; animation: demoPath var(--loop) cubic-bezier(.4,0,.2,1) infinite }
@keyframes demoPath { 0%, 6% { transform: none } 13% { transform: translate(var(--dx), 0) } 20% { transform: translate(var(--dx), var(--dy)) } 27% { transform: translate(0, var(--dy)) } 34%, 100% { transform: none } }
@keyframes demoHand { 0%, 3% { opacity: 0; transform: translate(8px, 12px) scale(1.06) } 6%, 34% { opacity: 1; transform: none } 40%, 100% { opacity: 0; transform: translate(8px, 12px) scale(1.06) } }
/* Gesture :tap: o dedo desce, aperta, uma onda sai da ponta e ele sobe. Ciclo de 2,4 s, só CSS. */
.tapgest { position: absolute; width: 40px; height: 40px; margin: -6px 0 0 -18px; color: #fff; opacity: 0; pointer-events: none;
           filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); animation: tapHand 2.4s cubic-bezier(.4,0,.2,1) infinite }
.tapgest .ic { width: 40px; height: 40px; stroke-width: 1.8; fill: rgba(20,24,34,.55) }
.tapgest::after { content: ""; position: absolute; left: 18px; top: 6px; width: 40px; height: 40px; margin: -20px; border-radius: 50%; border: 3px solid #fff; opacity: 0; animation: tapRing 2.4s ease-out infinite }
@keyframes tapHand { 0% { opacity: 0; transform: translate(8px, 12px) scale(1.06) } 15%, 25% { opacity: 1; transform: none } 32% { opacity: 1; transform: scale(.9) } 42%, 70% { opacity: 1; transform: none } 85%, 100% { opacity: 0; transform: translate(8px, 12px) scale(1.06) } }
@keyframes tapRing { 0%, 30% { opacity: 0; transform: scale(.4) } 34% { opacity: 1 } 62%, 100% { opacity: 0; transform: scale(1.3) } }
.hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; background: rgba(10,13,20,.82); color: #fff; border-radius: 999px; padding: 7px 13px 7px 10px; font-size: 14px; font-weight: 600; max-width: calc(100% - 20px); width: max-content; text-align: center; pointer-events: none; z-index: 5 }
.hint .ic { width: 16px; height: 16px }

/* CompareSlider */
.photo.cmp { cursor: ew-resize; container: foto / inline-size }
/* Foto pequena: sem as etiquetas Antes e Depois, que a alça cobriria; os botões Antes | Depois embaixo dizem o mesmo. */
@container foto (max-width: 199px) { .photo.cmp .lbl.a, .photo.cmp .lbl.d { display: none } }
.photo.cmp .before { clip-path: inset(0 calc(100% - var(--c)) 0 0) }
.handle { position: absolute; top: 0; bottom: 0; left: var(--c); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.2); pointer-events: none; z-index: 3 }
.handle::after { content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35) }
.handle svg { position: absolute; top: 50%; left: 50%; width: 22px; height: 22px; margin: -11px; z-index: 1; color: #111622 }
.cmpr { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; z-index: 4 }
.cmpr:focus-visible + .handle::after { box-shadow: 0 0 0 4px var(--accent) }
.lbl { position: absolute; top: 8px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(10,13,20,.7); padding: 2px 8px; border-radius: 5px; pointer-events: none; z-index: 3 }
.lbl.a { left: 8px } .lbl.d { right: 8px }
.photo.still { cursor: default }

/* Resultado (compare_controller, drag): o arraste é do controller; o range fica para o teclado. A alça é um botão
   redondo grande; ampliada, só ela compara (o resto da foto move). Antes | Depois a levam até a ponta, deslizando. */
.photo.cmp > .before { position: absolute; inset: 0; z-index: 2; pointer-events: none }
.photo.cmp.drag .cmpr { pointer-events: none }
.photo.cmp.drag .handle { width: 56px; margin-left: -28px; background: linear-gradient(#fff, #fff) center / 3px 100% no-repeat; box-shadow: none }
.photo.cmp.drag .handle::after { width: 52px; height: 52px; margin: -26px }
.photo.cmp.drag .handle svg { width: 28px; height: 28px; margin: -14px }
.photo.cmp.zoomed .handle { pointer-events: auto; cursor: ew-resize }
.photo.cmp.zoomed { cursor: grab }
.photo.cmp.panning { cursor: grabbing }
/* Seleção: a foto ampliada que já tem contorno se move com um dedo ou o mouse (a mãozinha sobre o que alterna fica). */
[data-zoom-pan-value="true"] .photo.zoomed:not(.cmp):not(.adding):not(.over-occ) { cursor: grab }
[data-zoom-pan-value="true"] .photo.zoomed.panning:not(.cmp) { cursor: grabbing }
.photo.cmp.glide > .before { transition: clip-path .3s var(--ease-out) }
.photo.cmp.glide .handle { transition: left .3s var(--ease-out) }
.abrow { display: flex; gap: 8px; width: min(calc(100% - 24px), 460px); flex: none }
.abtns { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; flex: 1; padding: 4px; border-radius: 14px; background: var(--surface2) }
.abtn { min-height: 48px; border: 0; border-radius: 10px; background: transparent; color: var(--ink2); font: inherit; font-size: 16px; font-weight: 800; cursor: pointer }
.abtn[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line), 0 1px 3px rgba(0,0,0,.15) }
.abtn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
/* O gesto que ensina a comparar (compare#teach): Antes e Depois acendem, o anel da lupa aparece vazio, e com movimento
   reduzido a barra ganha uma seta para cada lado. */
.abtn { transition: background-color .2s, color .2s, box-shadow .2s }
.abtn.acende { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent) }
.handle .seta { display: none }
.photo.gesto-rm .handle .seta { display: block; position: absolute; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: #fff; color: #111622; box-shadow: 0 2px 8px rgba(0,0,0,.35) }
.photo.gesto-rm .handle .seta.e { right: calc(50% + 32px) } .photo.gesto-rm .handle .seta.d { left: calc(50% + 32px) }
.photo.gesto-rm .handle .seta svg { position: static; width: 18px; height: 18px; margin: 4px }
.photo.gesto-anel .loupe-ring { animation: anelGesto 1.3s ease-out 1 }
@keyframes anelGesto { 0% { opacity: 0; transform: scale(.4) } 35% { opacity: 1; transform: scale(1.12) } 55%, 100% { opacity: 1; transform: scale(1) } }
@media (prefers-reduced-motion: reduce) { .abtn { transition: none } .photo.gesto-anel .loupe-ring { animation: none; box-shadow: 0 0 0 3px var(--accent), 0 6px 18px rgba(0,0,0,.35) } }
.stage:has(> .abrow) > .photo { --ah: calc(100cqh - 180px) }
/* Resultado: ele por cima da foto (v0.38), a foto desce 30 px para os olhos dele. */
html:not([data-espiando="desligado"]) .stage:has(> .stage-spy[data-edge="top"]):has(> .abrow) > .photo { margin-top: var(--top, 30px); --ah: calc(100cqh - 210px) }
html:not([data-espiando="desligado"]) .stage:has(> .stage-spy[data-edge="top"]):has(> .abrow) > .pgr { top: calc(50% - 18px) }
/* Palco alto e largo (computador): a foto encosta no alto, com 42 px para os olhos dele, e o Antes | Depois logo
   embaixo; sem faixa vazia em cima nem embaixo. A foto: altura do palco − alto (42) − 16 − linha (56) − 12. */
@container stage (min-height: 481px) and (min-width: 600px) {
  html:not([data-espiando="desligado"]) .stage:has(> .stage-spy[data-edge="top"]):has(> .abrow) { justify-content: flex-start }
  html:not([data-espiando="desligado"]) .stage:has(> .stage-spy[data-edge="top"]):has(> .abrow) > .photo { --top: 42px; --ah: calc(100cqh - var(--top) - 84px) }
  /* Com as setas, a foto fica no meio do palco: a sobra de altura se divide em cima e embaixo. */
  html:not([data-espiando="desligado"]) .stage:has(> .stage-spy[data-edge="top"]):has(> .abrow):has(> .pgr) { justify-content: center }
  html:not([data-espiando="desligado"]) .stage:has(> .stage-spy[data-edge="top"]):has(> .abrow) > .pgr { top: calc(50% - 15px) }
}
/* Palco baixo (celular): a foto encosta no alto. O aviso da prévia diz só "Prévia".
   A foto: altura do palco − alto (12 px; 36 com ele por cima) − 10 − linha (50) − 12. */
@container stage (max-height: 480px) {
  .stage > .abrow { margin-bottom: 12px }
  .abrow .abtns { padding: 3px; gap: 3px }
  .abrow .abtn { min-height: 44px; font-size: 15px }
  .stage:has(> .abrow) > .photo { --top: 12px; margin-top: var(--top); --ah: calc(100cqh - var(--top) - 72px) }
  .stage:has(> .abrow) > .pgr { top: calc(50% - 30px) }
  html:not([data-espiando="desligado"]) .stage:has(> .stage-spy[data-edge="top"]):has(> .abrow) > .photo { --top: 36px; --ah: calc(100cqh - var(--top) - 72px) }
  html:not([data-espiando="desligado"]) .stage:has(> .stage-spy[data-edge="top"]):has(> .abrow) > .pgr { top: calc(50% - 18px) }
  .photo.cmp .lbl.mk .mk-mais { display: none }
}

/* Zoom (zoom_controller): as camadas .zl ampliam e movem pelas variáveis --zs, --zx e --zy; botões, etiquetas e
   a alça ficam no lugar. O que se desenha na camada guarda o tamanho de tela. */
.zl { position: absolute; inset: 0; transform-origin: 0 0; transform: translate(var(--zx, 0px), var(--zy, 0px)) scale(var(--zs, 1)) }
.zl .lassobox { border-width: calc(2px / var(--zs, 1)) }
.zl :is(.loupe-ring, .rsteps) { scale: calc(1 / var(--zs, 1)) }
.zl .loupe { clip-path: circle(calc(var(--lr) / var(--zs, 1)) at var(--lx, 50%) var(--ly, 50%)) }
/* − [2×] + embaixo da foto: nas ferramentas (Seleção) ou na linha do Antes | Depois (Resultado). A largura já conta
   com o número, que aparece no meio: o − e o + não saem de baixo do dedo quando a foto amplia. */
.zbar { display: flex; align-items: center; justify-content: space-between; gap: 2px; flex: none; min-width: 128px; padding: 3px; border-radius: 14px; background: var(--surface2) }
.tools .zbar { padding: 0; border-radius: 999px; background: var(--surface); border: 1px solid var(--line) }
/* Palco largo: um vão do tamanho do − + do outro lado deixa as ferramentas no meio da foto, longe do balão dele. */
@container stage (min-width: 620px) { .tools:has(> .zbar)::before { content: ""; flex: 0 0 128px } }
.zb { min-width: 44px; height: 44px; padding: 0 6px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); display: grid; place-items: center; font: inherit; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer }
.zb[hidden] { display: none }
.zlv { min-width: 34px; padding: 0 2px }
.zb .ic { width: 20px; height: 20px }
.zb[aria-disabled="true"] { opacity: .4; cursor: default }
.zb:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px }
.pcorner { position: absolute; right: 8px; bottom: 8px; display: flex; align-items: center; gap: 8px; z-index: 6 }
.pcorner .ptool { position: static }
.photo.cmp .lbl.mk { left: 8px; right: auto; transform: none; width: max-content; max-width: calc(100% - 210px); text-align: left }
@container app (max-width: 699px) { .photo.cmp .lbl.mk { max-width: calc(100% - 160px) } }
@container stage (max-height: 480px) { .photo.cmp .lbl.mk { max-width: calc(100% - 68px) } }

/* ===== Animações ===== */
@keyframes ants { to { stroke-dashoffset: -24 } }
@keyframes pop { 0% { transform: scale(0) } 70% { transform: scale(1.2) } 100% { transform: scale(1) } }
@keyframes slideup { from { transform: translateY(14px); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes timer { from { width: 100% } to { width: 0 } }
@keyframes pulse { 0% { transform: scale(.55); opacity: 1 } 100% { transform: scale(1.5); opacity: 0 } }
@keyframes nudge { 0%, 100% { margin-left: -10px } 50% { margin-left: 10px } }
@keyframes scan { from { background-position: 120% 0 } to { background-position: -120% 0 } }
@keyframes spin { to { transform: rotate(360deg) } }

/* Movimento reduzido: sem cascata; trocas diretas e curtas. */
@media (prefers-reduced-motion: reduce) {
  .hand { display: none }
  .b-found, .toast, .slideup { animation: none }
  .selov .ants, .selov .occ.on .line, .tile.searching::after, .selwait.searching { animation: none }
  .tile.back, .tile.back .b-found, .selov.draw .ants, .selov.draw .occ.on .line, .selov.draw .dim, .btn .tick { animation: none }
  .photo.cmp.glide > .before, .photo.cmp.glide .handle { transition: none }
  .photo.zglide, .photo.zglide .zl { transition: none }
  /* o gesto vira contorno pronto; o detalhe da demo só esmaece */
  .tracebox, .tracebox .te::before { animation: none; transform: none } .tracebox { opacity: .9 }
  .tracebox .tfill { animation: none; opacity: .4 }
  .tapgest, .tapgest.teach.press { animation: none; opacity: 1 } /* o dedo fica parado em cima */
  .tile.look, .selov .occ.look .line, .selov .occ.demo-on .line { animation: none }
  .tapgest::after { display: none }
  .demo .o-selo { animation: demoMarkRm var(--loop) linear infinite }
  .toast .timer { animation: none; width: 0 }
  .tile.erasing .spin { animation-duration: 2s }
}
@keyframes demoMarkRm { 0%, 44% { opacity: 1 } 52%, 100% { opacity: 0 } }

/* Ferramentas do palco: Adicionar outro · contagem de partes; e as mensagens de espera */
.stage { flex-direction: column; gap: 10px }
.tools { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 0 12px; min-height: 40px }
.tool { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
        background: var(--surface); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none }
.tool .ic { width: 18px; height: 18px }
.tool[aria-pressed="true"] { background: var(--select); border-color: var(--select); color: #111622 }
.tool.wait { cursor: default; background: rgba(10,13,20,.82); border-color: transparent; color: #fff; font-weight: 500; max-width: 100%; min-height: 36px }
.tool.wait span { white-space: normal; text-align: left; line-height: 1.25; transition: opacity .25s }
.work.lendo :is(.strip .tile, .strip label, .tools button, .bar .btn:not(.parar)), body:has(.work.lendo) header.abar :is(a, button) { opacity: .5; cursor: not-allowed } /* o contorno está sendo lido */
.work.lendo .photo { pointer-events: none } /* nem gesto, nem zoom: só o Parar */
#bar.lendo > :not(.parar) { display: none }
#bar .parar { flex: 1 }
.work:has(#bar[data-resync-pending]) .tools .tirar { display: none } /* o Tirar do lote espera a busca no lote acabar */
.tool-count { font-size: 13px; font-weight: 700; color: var(--ink2); background: var(--surface2); border-radius: 999px; padding: 4px 10px }
.photo.adding { cursor: copy; outline: 3px solid var(--select); outline-offset: -3px }

/* Botão com duas linhas: ação + quanto leva */
.btn-lines { display: grid; line-height: 1.15; text-align: left }
.btn-lines small { font-size: 12px; font-weight: 500; opacity: .85; white-space: normal }

/* Progresso: o trecho "em andamento" cresce sozinho no ritmo medido, até a próxima foto ficar pronta */
.bar-t { position: relative }
.bar-t i { position: relative; z-index: 1 }
.bar-t b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); opacity: .35; border-radius: 3px; animation: creep var(--cycle, 9s) cubic-bezier(.2,.6,.4,1) forwards }
@keyframes creep { from { width: var(--from) } to { width: var(--to) } }
.prog .eta { font-weight: 500; color: var(--ink2); font-size: 14px }
.head .hint-line { flex-basis: 100% }

/* Miniatura na fila */
.tile.queued > img { opacity: .7 }
.b-queued { background: var(--surface); color: var(--ink2) }

@media (prefers-reduced-motion: reduce) { .bar-t b { animation: none; width: var(--from) } .tool.wait span { transition: none } }


/* Ação em destaque no toast ("Mostrar como": repete o gesto ensinado) */
.toast .tact-pri { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px }
.toast .tact-pri .ic { width: 16px; height: 16px; color: inherit }

/* AppBar: Voltar à esquerda da marca (só no Envio) */
.abar .lft { display: flex; align-items: center; gap: 8px; min-width: 0 }
.abar .back { width: 40px; height: 40px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; color: inherit; padding: 0 }
.abar .back .ic { width: 20px; height: 20px }
/* Com a seta de voltar, a marca some no celular (senão sobrepõe as etapas e o saldo) */
.abar .lft:has(.back) .wm { display: none }
@container app (min-width: 700px) { .abar .lft:has(.back) .wm { display: flex } }
/* Voltar com o destino escrito (v0.28): "‹ Início". No celular o azulejo continua e só o nome sai, para caber. */
.abar .back.named { width: auto; display: inline-flex; align-items: center; gap: 2px; border-color: transparent; background: transparent; color: var(--accent); font-weight: 700; font-size: 15px; padding: 0 10px 0 4px; text-decoration: none; white-space: nowrap }
.abar .back.named .ic { color: var(--accent) }
.abar .lft:has(.back.named) .wm { display: flex }
@container app (max-width: 699px) { .abar .lft:has(.back.named) .wm .nome { display: none } }
.homebtn { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; color: var(--accent); font-weight: 700; font-size: 15px; text-decoration: none; border-radius: 10px }
.homebtn:focus-visible, .abar .back.named:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px }

/* "+ Fotos": uma miniatura que é botão de enviar */
.add-tile { background: transparent; border: 2px dashed var(--accent); color: var(--accent) }
.add-tile .add-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font-size: 12px; font-weight: 700 }
.add-tile .add-label .ic { width: 22px; height: 22px }
.add-tile:hover { background: var(--tint) }
.add-tile:focus-within { outline: 3px solid var(--accent); outline-offset: 2px }
.add-tile[aria-busy="true"] { opacity: .5; pointer-events: none }

/* ===== Cobrança (telas 6–10 do blueprint) ===== */

/* BalanceChip */
.abar .rgt { display: flex; align-items: center; gap: 10px; min-width: 0 }
.bal { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 11px 6px 9px; font-size: 13px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); text-decoration: none; min-height: 34px }
.bal .ic { width: 16px; height: 16px; color: var(--accent) }
.bal .bd { display: none }
@container app (min-width: 700px) { .bal .bm { display: none } .bal .bd { display: inline } }
.bal.zero { border-color: var(--warn); background: var(--warn-bg) } .bal.zero .ic { color: var(--warn) }
.bal.plan .ic { color: var(--good) }
/* O chip sem carteira pulsa uma vez por navegador (chip_novo_controller.js). */
.bal.pulsa-uma { animation: chipNovo 1.2s ease-out .4s 1 }
@keyframes chipNovo { 0% { transform: scale(1); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent) } 30% { transform: scale(1.08) } 60% { transform: scale(1) } 100% { box-shadow: 0 0 0 14px transparent } }
@media (prefers-reduced-motion: reduce) { .bal.pulsa-uma { animation: none } }

/* Sheet: folha no celular, diálogo no computador */
.sheetwrap { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center }
.sheetwrap .back-scrim { position: absolute; inset: 0; background: var(--scrim); border: 0; cursor: pointer; padding: 0 }
/* .shbox: a folha e, atrás da borda de cima dela, o Espiando (.shpeek). --shtop: o espaço que o balão dele pede acima da
   folha (lib/balloon.js); só a folha alta encolhe. Tocar nesse espaço (no balão) ou nele não fecha a folha. */
.shbox { position: relative; width: 100%; animation: slideup .28s var(--ease-out) both }
.shbox::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: var(--shtop, 0px) }
.sheet { position: relative; width: 100%; max-height: min(92vh, 100vh - var(--shtop, 0px)); max-height: min(92dvh, 100dvh - var(--shtop, 0px)); overflow-y: auto; background: var(--surface); border-radius: 18px 18px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 12px; box-shadow: 0 -20px 50px -30px rgba(0,0,0,.5) }
.sheet .grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: -4px auto 2px }
.shead { display: flex; align-items: flex-start; gap: 10px }
.sheet > .shclose { justify-self: center }
.shead h3 { font-size: 20px; font-weight: 800; line-height: 1.1 }
.shead p { margin: 3px 0 0; color: var(--ink2); font-size: 14px }
.shead .grow { flex: 1; min-width: 0 }
/* Passo anterior dentro da folha, com o nome ("‹ Opções"). */
.sback { display: inline-flex; align-items: center; gap: 2px; flex: none; min-height: 40px; padding: 0 8px 0 0; color: var(--accent); font-weight: 700; font-size: 15px; text-decoration: none; white-space: nowrap }
.sback .ic { width: 20px; height: 20px; color: var(--accent) }
.sback:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px }
@container app (min-width: 700px) {
  .sheetwrap { align-items: center }
  .shbox { width: min(520px, calc(100% - 48px)) }
  .sheet { max-height: min(88vh, 100vh - 2 * var(--shtop, 0px)); max-height: min(88dvh, 100dvh - 2 * var(--shtop, 0px)); border-radius: 18px; padding: 20px 22px 22px }
  .sheet .grip { display: none }
}
@media (prefers-reduced-motion: reduce) { .shbox { animation: none } }
/* Diálogo (a folha com campo de digitar): no pedaço da tela à vista, acima do teclado (--vv-top e --vv-h:
   sheet_controller.js); no celular, no meio, com 48 px em cima para o Espiando e o espaço do balão (--shtop: balloon.js). */
.sheetwrap:has(> .shbox.dialogo) { bottom: auto; top: var(--vv-top, 0px); height: var(--vv-h, 100dvh); transition: top .2s var(--ease-out), height .2s var(--ease-out) }
@container app (max-width: 699px) {
  .sheetwrap:has(> .shbox.dialogo) { align-items: center; padding: 48px 16px 16px }
  .shbox.dialogo { width: min(520px, 100%); margin-top: var(--shtop, 0px); animation-name: dialogoEntra }
  .shbox.dialogo .sheet { max-height: calc(var(--vv-h, 100dvh) - 64px - var(--shtop, 0px)); border-radius: 18px; padding: 16px 16px 18px; box-shadow: 0 20px 50px -24px rgba(0,0,0,.5) }
  .shbox.dialogo .grip { display: none }
}
@container app (min-width: 700px) {
  .shbox.dialogo .sheet { max-height: calc(var(--vv-h, 100dvh) - 32px - 2 * var(--shtop, 0px)) }
}
@keyframes dialogoEntra { from { opacity: 0; transform: scale(.97) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) { .sheetwrap:has(> .shbox.dialogo) { transition: none } .shbox.dialogo { animation: none } }
.sheet-form, .pay { display: grid; gap: 12px }

/* PlanCard */
.plans { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none }
.plan { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; width: 100%; border: 1.5px solid var(--line); background: var(--bg); border-radius: var(--r-lg); padding: 12px 14px; cursor: pointer; position: relative }
.plan[aria-checked="true"], .plan.fmt:has(input:checked) { border-color: var(--accent); background: var(--tint); box-shadow: inset 0 0 0 1px var(--accent) }
.plan:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px }
.plan .rad { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ink2); display: grid; place-items: center; grid-row: span 2 }
.plan[aria-checked="true"] .rad { border-color: var(--accent) }
.plan[aria-checked="true"] .rad::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent) }
.plan .n { font-family: var(--f-display); font-size: 19px; font-weight: 800; line-height: 1.1 }
.plan .pr { font-family: var(--f-display); font-size: 19px; font-weight: 800; text-align: right; grid-row: span 2; display: grid; font-variant-numeric: tabular-nums }
.plan .d { font-size: 13px; color: var(--ink2); grid-column: 2 }
/* Opção de compra (Ui::PlanOptionComponent): bolinha, pilha de fotos, quantidade, selo e preço. No celular o selo fica
   sob a quantidade; no computador, ao lado. Os rótulos dos grupos (.grp) separam "Uma vez" de "Todo mês". */
.plans .grp { display: flex; align-items: center; gap: 6px; margin: 2px 0 -4px; font-size: 14px; font-weight: 700; color: var(--ink2) }
.plans .grp .ic { width: 16px; height: 16px }
.plan.soon { opacity: .5; cursor: default }
.plan.opt { grid-template-columns: auto auto 1fr auto; gap: 2px 10px; min-height: 56px; padding: 10px 14px }
.plan.opt .rad { grid-row: auto }
.plan.opt .pr { grid-row: auto; grid-column: 4; display: block; white-space: nowrap }
.plan.opt .nm { display: none }
.plan.opt.hasrec .rad, .plan.opt.hasrec .pst { grid-row: 1 / span 2 }
.plan.opt .rec { grid-column: 3 / 5; grid-row: 2; justify-self: start; display: inline-flex; align-items: center; gap: 4px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 2px 9px 2px 6px; font: 700 14px/1.3 var(--f-body); white-space: nowrap; animation: planPop .4s cubic-bezier(.3, 1.6, .5, 1) .62s both }
.plan.opt .rec svg { width: 13px; height: 13px; fill: currentColor }
@container app (min-width: 700px) {
  .plan.opt { grid-template-columns: auto auto auto 1fr auto }
  .plan.opt .rec { grid-column: 4; grid-row: 1 }
  .plan.opt .pr { grid-column: 5 }
  .plan.opt.hasrec .rad, .plan.opt.hasrec .pst { grid-row: 1 }
}
/* Pilha de fotos (Ui::PhotoStackComponent): cada cartão sobe um degrau; entram um a um, da opção menor para a maior. */
.pst { position: relative; width: 34px; height: 26px; flex: none }
.pst i { position: absolute; left: calc(var(--k) * 4px); bottom: calc(var(--k) * 3px); width: 20px; height: 15px; border-radius: 3px; border: 1.5px solid var(--ink2); background: var(--surface2); animation: planPop .3s cubic-bezier(.3, 1.6, .5, 1) calc(var(--lv, 1) * 110ms + var(--k) * 60ms) both }
.plan[aria-checked="true"] .pst i { border-color: var(--accent); background: var(--surface) }
@keyframes planPop { 0% { transform: scale(0) } 70% { transform: scale(1.2) } 100% { transform: scale(1) } }
@media (prefers-reduced-motion: reduce) { .pst i, .plan.opt .rec { animation: none } }
.rule { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink2); margin: 0 }
.rule .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--good) }
.rule a { color: var(--accent); font-weight: 600 }
.srow { display: flex; gap: 8px; flex-wrap: wrap }
.srow > .btn, .srow form.button_to > .btn, .srow > a.btn { flex: 1 }

/* Campos e abas */
.field { display: grid; gap: 5px }
.field label { font-size: 14px; font-weight: 700 }
.field input { min-height: 48px; border: 1.5px solid var(--edge); border-radius: 11px; padding: 0 12px; background: var(--bg); width: 100% }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--tint) }
.field input[aria-invalid="true"] { border-color: var(--bad) }
.field small { font-size: 13px; color: var(--ink2) }
.field small.err { color: var(--bad); font-weight: 600 }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--surface2); border-radius: var(--r-md); padding: 4px }
.tabs2 button { border: 0; background: transparent; border-radius: 9px; min-height: 44px; font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px }
.tabs2 button[aria-selected="true"], .tabs2 button[aria-pressed="true"] { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0,0,0,.12), inset 0 0 0 1px var(--seg-on-edge) }
.tabs2 .ic { width: 16px; height: 16px }
.pixgo { display: grid; gap: 8px }
.hint2 { font-size: 13px; color: var(--ink2); text-align: center }
.brick { min-height: 60px }
.fakecard { display: grid; gap: 8px; border: 1px dashed var(--line); border-radius: var(--r-md); padding: 10px }
.fakecard small { color: var(--ink2); font-size: 12px }

/* PixCode */
.pix { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center }
.pix .secure { grid-column: 1 / -1 }
.qr { width: 160px; height: 160px; border-radius: 10px; background: #fff; padding: 8px; border: 1px solid var(--line) }
.qr svg { display: block; width: 100%; height: 100% }
.pix .side { display: grid; gap: 8px; justify-items: start }
.wait { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2) }
.wait.bad { color: var(--bad); font-weight: 700 }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; flex: none }
@keyframes spin { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none } }
.mono { font-family: var(--f-mono); font-size: 12px; color: var(--ink2) }
.secure { display: flex; gap: 6px; align-items: flex-start; font-size: 13px; color: var(--ink2); margin: 0 }
.secure .ic { width: 14px; height: 14px; margin-top: 2px }
@container app (max-width: 699px) { .pix { grid-template-columns: 1fr; justify-items: center; text-align: center } .pix .side { justify-items: center } }

/* Liberado */
.okbig { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 10px 0 4px }
.okbig .ck { width: 64px; height: 64px; border-radius: 50%; background: var(--good-bg); color: var(--good); display: grid; place-items: center; animation: pop .4s cubic-bezier(.3,1.6,.5,1) both }
.okbig .ck.wait-ck { background: var(--tint); color: var(--accent) }
.okbig .mascot { --ms: 72px; box-shadow: 0 10px 24px -12px rgba(31,55,217,.6) }
.okbig .ck .ic { width: 32px; height: 32px; stroke-width: 2.5 }
.okbig h3 { font-size: 22px; font-weight: 800 }
.okbig p { margin: 0; color: var(--ink2); font-size: 14px; max-width: 42ch }

/* Seu saldo · Equipe · Termos. Cada linha tem a altura do que leva: quando não cabe, a página rola e nada encolhe. */
.acct { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 24px; display: grid; grid-auto-rows: max-content; gap: 12px; align-content: start; width: 100% }
@container app (min-width: 700px) { .acct { max-width: 640px; margin: 0 auto; padding: 24px } }
.acct h2 { font-size: 26px; font-weight: 800 }
/* O contato no pé de Seu saldo: o e-mail num botão e, embaixo, Termos e Privacidade. */
.acct .contato { display: grid; justify-items: center; gap: 6px; margin-top: 12px }
.acct .contato .btn { min-height: 44px; font-weight: 600 }
.acct .contato .legal a { display: inline-block; padding: 6px 4px }
.hero { display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: var(--surface) }
.hero .num { font-family: var(--f-display); font-size: 40px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums }
.hero .num small { font-family: var(--f-body); font-size: 15px; font-weight: 600; color: var(--ink2); margin-left: 6px }
.hero p { margin: 0; color: var(--ink2); font-size: 14px }
.hero .srow { margin-top: 8px }
/* Suas fotos sem carteira (wallets/empty): o ícone grande, as grátis, Entrar e os preços. */
.acct.vazia .hero { justify-items: center; text-align: center; gap: 10px }
.acct.vazia .hero .ic.big { width: 48px; height: 48px; color: var(--accent) }
.acct.vazia .hero .num small { margin-left: 0 } /* o espaço vem do texto: "15 grátis" para o leitor de tela */
.acct.vazia .hero .gsiw { width: 100%; padding: 0 }
.acct.vazia .row2 .price { font-weight: 700; font-variant-numeric: tabular-nums }
.acct.vazia .rows { margin: 0; padding: 0; list-style: none }
.rows { display: grid; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden }
.row2 { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 14px; margin: 0 }
.row2:first-child { border-top: 0 }
.row2 > .ic { color: var(--ink2); flex: none }
/* Linha da nota fiscal: "Trocar" abre os dois campos no lugar. */
.row2 details.swap { margin-top: 6px }
.row2 details.swap > summary { display: inline-flex; list-style: none; cursor: pointer }
.row2 details.swap > summary::-webkit-details-marker { display: none }
.row2 details.swap form { display: grid; gap: 10px; margin-top: 10px }
.row2:has(details.swap[open]) { align-items: flex-start }
.row2 .t { flex: 1; min-width: 0; display: grid; gap: 2px }
.row2 .t b { font-size: 14px; overflow-wrap: anywhere }
.row2 .t span { font-size: 13px; color: var(--ink2) }
.row2 .btn.sm, .row2 form.button_to .btn { flex: none }
.hist { display: grid; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; font-size: 13px }
.hist > div { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); align-items: center }
.hist > div > span:last-child:empty { display: none }
.hist > div:first-child { border-top: 0; color: var(--ink2); font-family: var(--f-mono); font-size: 11px }
.legal { margin: 4px 0 0; font-size: 12px; color: var(--ink2); text-align: center }
.legal a, .legaltext a { color: inherit }
.legaltext h3 { font-size: 17px; margin-top: 8px }
.legaltext p, .legaltext li { font-size: 14px; color: var(--ink2); line-height: 1.55 }
.legaltext ul { margin: 0; padding-left: 20px; display: grid; gap: 6px }
.legaltext b { color: var(--ink) }

/* Catálogo: folhas desenhadas no lugar, sem sobrepor a página */
.cat-sheet .sheetwrap { position: static; display: block }
.cat-sheet .back-scrim, .cat-sheet .grip { display: none }
.cat-sheet .shbox { animation: none; margin-top: 44px }
.cat-sheet .sheet { border-radius: 18px; border: 1px solid var(--line); max-height: none; box-shadow: none }
.srow > .btn.pri { flex: 2; white-space: nowrap }
.row2 { flex-wrap: wrap }
.row2 .t { flex: 1 1 60% }
.row2 .t b { overflow-wrap: anywhere; word-break: normal }

/* Prazo do lote (24 h) e lotes guardados em Suas fotos */
.head .keep { display: inline-flex; align-items: center; gap: 6px; width: 100%; font-size: 13.5px; font-weight: 500; color: var(--ink2) }
.head .keep .ic { width: 15px; height: 15px; color: inherit }
.head .keep .kbtn { display: none }
.keepnote { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13.5px; color: var(--ink2) }
.keepnote .ic { width: 15px; height: 15px }
.lots { display: grid; gap: 8px }
.lots h3 { font-size: 17px }
.lots ul { list-style: none; margin: 0; padding: 0 }
.row2.lot { color: inherit; text-decoration: none; flex-wrap: nowrap }
.row2.lot:hover { background: var(--bg) }
.row2.lot img { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; flex: none; background: var(--surface2) }
.row2.lot .t span.soon { color: var(--warn); font-weight: 700 }
.lots .row2.lot { border-top: 0 }
.lots li + li .row2.lot { border-top: 1px solid var(--line) }

/* O Espiando em cena (lib/spy.js, lib/wait_scene.js; blueprint v0.24 e v0.26). .spy é a janela atrás de uma borda: a
   borda de baixo dela é o horizonte, e o corpo sobe e desce por molas (script). */
.spy { position: absolute; width: var(--s); height: calc(var(--s) * .85); overflow: hidden }
.spy svg { position: absolute; left: 0; top: calc(var(--s) * -.15); width: var(--s); height: calc(var(--s) * 1.3); display: block; overflow: visible;
           filter: drop-shadow(0 3px 5px rgba(16, 30, 140, .32)) }
.spy[data-mood="calm"] > svg { animation: spyBreath 4.4s ease-in-out infinite } /* respirar: compositor, sem redesenhar */
@keyframes spyBreath { 0%, 100% { transform: none } 50% { transform: translateY(-1.2%) } }
.spy .zz { transform-box: fill-box; transform-origin: center; animation: zz 2.6s ease-in-out infinite }
.spy .zz.z1 { animation-delay: 1.3s }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 4px) scale(.7) } 30% { opacity: 1 } 100% { opacity: 0; transform: translate(5px, -9px) scale(1.1) } }
/* Palco (v0.26: ele mora ali na Seleção e no Resultado, em olhinhos): atrás da borda de baixo, fora da foto; a legenda da
   espera é do app, solta ao lado. A foto deixa a faixa dele livre (72 px × .85): nem esticado ele encosta nas ferramentas. */
.stage-spy { left: 12px; bottom: 0; z-index: 5 }
/* Resultado (v0.38): ele atrás da foto, os olhos por cima da borda de cima (stage_spy_controller#placeTop); a foto fica na
   frente do corpo dele. */
.stage-spy[data-edge="top"] { bottom: auto; z-index: 0; pointer-events: none } /* a caixa dele passa do palco: o toque atravessa */
.stage:has(> .stage-spy[data-edge="top"]) > .photo { z-index: 1 }
html:not([data-espiando="desligado"]) .stage:has(> .stage-spy:not([data-edge])) > .photo { --ah: calc(100cqh - 150px) }
.spy-cap { position: absolute; left: 96px; right: 12px; bottom: 10px; z-index: 5; display: grid; gap: 7px; justify-items: start;
           font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink); pointer-events: none }
.spy-cap .bs { display: flex; gap: 6px; flex-wrap: wrap; pointer-events: auto }
.spy-cap.alone { left: 12px } /* Desligado: a legenda e os botões sem ele */
/* Pelo canto: a borda é vertical (o painel ao lado do palco); o corpo gira e espia da direita para a esquerda. */
.spy[data-edge="right"] { transform: rotate(-90deg); left: auto; bottom: auto; right: calc(var(--s) * -.075); top: calc(50% - var(--s) * .425) }
.stage.espiando-lado .spy-cap { left: 12px; right: calc(var(--s-lado, 72px) + 12px) }
.stage.espiando .tools { visibility: hidden }
/* Trilho do Envio e do Apagando: empurra a barra e anda com a ponta. */
.trk { position: relative; height: 31px }
.rail-spy { bottom: 0; left: calc((100% - var(--s)) * var(--x, 0) / 100) }
.bar { position: relative }
/* v0.26 · A viagem entre telas (lib/espiando_viagem.js): o retrato que sai fica por cima de tudo e não pega toque. */
.spy.ghost { position: fixed; z-index: 60; pointer-events: none }
/* Enquanto ele está em outro lugar da tela, o logo continua inteiro (v0.28, caminho a): a marca nunca fica vazia,
   só os olhos do azulejo se voltam para baixo, para onde ele foi. O azulejo do cabeçalho do trabalho esvazia: ele foi olhar. */
.wm .mascot .me { transition: transform .3s cubic-bezier(.2,.8,.3,1) }
html[data-espiando-fora] .wm .mascot .me { animation: none; transform: translate(1.5px, 3px) } /* parado, olhando para ele */
.head .mascot svg { transition: opacity .2s }
html[data-espiando-fora] .head .mascot svg { opacity: 0 }
@media (prefers-reduced-motion: reduce) { .spy .zz, .wm .mascot .me, .head .mascot svg { animation: none; transition: none } }
/* v0.27 · O balão: a voz dele (lib/balloon.js). Uma camada por cima de tudo que não pega toque: o toque atravessa o
   balão e chega ao que está embaixo (um balão que aparece sob o dedo não pode engolir o toque); só os botões dele pegam. */
.bubl { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden }
.bub { position: absolute; left: 0; top: 0; pointer-events: none; width: max-content; max-width: min(260px, calc(100vw - 24px));
       background: var(--bub-bg); color: var(--bub-ink); border: 1px solid var(--bub-edge); border-radius: 18px; padding: 9px 13px 10px;
       font: 600 15px/1.32 var(--f-body); box-shadow: var(--bub-sh); cursor: default; transform-origin: var(--ox, 0) var(--oy, 50%);
       transition: translate .28s cubic-bezier(.2, .8, .3, 1) }
.bub[hidden] { display: none }
.bub p { margin: 0; position: relative }
.bub.hero p { font-weight: 700 }
.bub .bb { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; position: relative; pointer-events: auto }
.bub .bb[hidden] { display: none }
.bub .bb button { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; min-height: 36px; font: 700 14px var(--f-body);
                  background: var(--surface2); color: var(--ink); cursor: pointer }
.bub .bb button.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink) }
@media (pointer: coarse) { .bub .bb button { min-height: 44px } } /* a resposta da pergunta, no dedo */
/* A cauda aponta para ele, saindo do lado da cabeça (ele não tem boca); sem ele na tela, sem cauda. */
.bub .tail { position: absolute; width: 12px; height: 12px; background: var(--bub-bg); border: 1px solid var(--bub-edge); transform: rotate(45deg) }
.bub[data-t="l"] .tail { left: -7px; top: calc(var(--tp) - 6px); border-top-color: transparent; border-right-color: transparent }
.bub[data-t="r"] .tail { right: -7px; top: calc(var(--tp) - 6px); border-bottom-color: transparent; border-left-color: transparent }
.bub[data-t="t"] .tail { top: -7px; left: calc(var(--tp) - 6px); border-bottom-color: transparent; border-right-color: transparent }
.bub[data-t="b"] .tail { bottom: -7px; left: calc(var(--tp) - 6px); border-top-color: transparent; border-left-color: transparent }
.bub[data-t="n"] .tail { display: none }
/* Entra com uma mola curta, crescendo a partir da cauda; sai com um fade. Calmo e movimento reduzido: só aparece. */
.bub.in { animation: bubIn .42s cubic-bezier(.3, 1.5, .5, 1) both }
.bub.still.in { animation: bubFade .2s ease-out both }
.bub.out { animation: bubOut .22s ease-out forwards; pointer-events: none }
@keyframes bubIn { from { opacity: 0; transform: scale(.5) } 35% { opacity: 1 } to { opacity: 1; transform: none } }
@keyframes bubFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes bubOut { to { opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .bub.in { animation: bubFade .2s ease-out both } .bub { transition: none } }
html[data-espiando="desligado"] .bubl { display: none }
/* Nas folhas ele espia de trás da borda de cima, à direita (Ui::SheetComponent#peek); o balão fica ao lado dele, acima
   da folha (lib/balloon.js). Desligado: sem ele. */
.shpeek { position: absolute; right: 22px; bottom: calc(100% - 1px); width: 44px; height: 42px; overflow: hidden; display: flex; align-items: flex-end }
.shpeek .spy { position: relative; flex: none; width: 44px; height: 37px }
html[data-espiando="desligado"] .shpeek { display: none }
/* Os textos que viraram fala dele saem da tela (vz-x), trocam por uma versão curta (vz-o) ou ficam só para o leitor de
   tela (vz-sr). Desligado: tudo volta aos lugares de sempre. */
.vz-o { display: none }
html:not([data-espiando="desligado"]) .vz-x { display: none }
html:not([data-espiando="desligado"]) .vz-o { display: inline }
html:not([data-espiando="desligado"]) .vz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
/* Modos (lib/espiando_mode.js): Calmo e Desligado param toda animação dele; Desligado também o esconde fora do azulejo. */
html[data-espiando="calmo"] :is(.mascot, .spy) *, html[data-espiando="desligado"] :is(.mascot, .spy) * { animation: none !important; transition: none !important }
html[data-espiando="desligado"] .spy { display: none }
/* O controle em Ajustes e recibos */
.modes { display: inline-flex; gap: 4px; background: var(--surface2); border-radius: 12px; padding: 4px; flex: none }
.modes button { border: 0; background: transparent; border-radius: 9px; min-height: 38px; padding: 0 12px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--ink2) }
.modes button[aria-checked="true"] { background: var(--seg-on); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12), inset 0 0 0 1px var(--seg-on-edge) }
@container app (max-width: 420px) { .row2.modes-row { flex-wrap: wrap } .row2.modes-row .modes { width: 100% } .row2.modes-row .modes button { flex: 1 } }
.devs { display: grid; gap: 8px }
.devs h3 { font-size: 17px }
.devs ul { list-style: none; margin: 0; padding: 0 }
.devs li.row2 .ic { color: var(--ink2) }
/* Excluir meus dados: sem título, um traço a separa dos aparelhos. */
.devs.excl { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--line) }

/* Seleção: cartão de ensino, erro com saída, legenda das miniaturas */
.coachcard { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: rgba(10,13,20,.9); color: #fff; border-radius: 14px; padding: 10px 14px; font-size: 15px; font-weight: 700; line-height: 1.25; width: max-content; max-width: calc(100% - 20px); z-index: 5; pointer-events: none }
.coachcard .ic { width: 24px; height: 24px; color: var(--select); flex: none }
.coachcard small { display: block; font-weight: 500; font-size: 14px; opacity: .9; margin-top: 2px }
.lassobox.fail { border-color: #FF7468; background: rgba(255,116,104,.22) }
/* A busca não respondeu: um botão só, "Tentar de novo / nenhuma foto foi gasta". Desligado, o quadro traz a frase
   (.vmsg); com o Espiando, a frase é a fala dele e sobre a foto fica só o botão. */
.vbanner { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 7; display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; background: var(--surface); color: var(--ink); border: 1.5px solid var(--bad); border-radius: 12px; padding: 10px 10px 10px 12px; font-size: 14px; line-height: 1.3; box-shadow: 0 10px 30px -12px rgba(0,0,0,.5); cursor: default; pointer-events: auto }
.vbanner .vmsg { display: flex; align-items: center; gap: 10px; flex: 1 1 0; min-width: 150px }
.vbanner .vmsg .ic { color: var(--bad); width: 22px; height: 22px; flex: none }
.vbanner .vmsg p { margin: 0 }
.vbanner .vmsg b { display: block; font-size: 15px }
.vbanner .vmsg span { color: var(--ink2) }
.vbanner .btn { flex: 1 1 100%; min-height: 52px }
@container app (min-width: 700px) { .vbanner .btn { flex: none } }
html:not([data-espiando="desligado"]) .vbanner { left: 50%; right: auto; bottom: 12px; transform: translateX(-50%); background: none; border: 0; padding: 0; box-shadow: none; pointer-events: none }
html:not([data-espiando="desligado"]) .vbanner .btn { flex: none; white-space: nowrap; pointer-events: auto; box-shadow: 0 10px 30px -10px rgba(0,0,0,.6) }
.head .excs { margin: 0 }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; width: 100%; font-size: 13px; font-weight: 500; color: var(--ink2) }
.legend span { display: inline-flex; align-items: center; gap: 5px }
.legend .ic { width: 15px; height: 15px; stroke-width: 3 }
.legend .f .ic { color: var(--accent) } .legend .d .ic { color: var(--good) } .legend .a .ic { color: var(--ink2) } .legend .x .ic { color: var(--bad) }
@container app (max-width: 699px) { .legend { display: none } }

/* Folha de pagamento: linha de nota (Pix ou cartão), "Agora não" em texto */
.paynote { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 14px; color: var(--ink2) }
.paynote .ic { width: 18px; height: 18px; color: var(--ink) }
.sfoot { display: grid; gap: 4px }

/* Suas fotos: bloco recolhido */
.foldbtn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 12px 14px; cursor: pointer; min-height: 56px; color: inherit }
.foldbtn .t { flex: 1; min-width: 0; display: grid; gap: 2px }
.foldbtn .t b { font-size: 15px }
.foldbtn .t span { font-size: 13px; color: var(--ink2) }
.foldbtn > .ic { color: var(--ink2) }
.foldbtn .chev { transition: transform .2s }
@media (prefers-reduced-motion: reduce) { .foldbtn .chev { transition: none } }
details.fold > summary { list-style: none } details.fold > summary::-webkit-details-marker { display: none }
details.fold[open] > summary .chev { transform: rotate(90deg) }
details.fold { display: grid; gap: 12px }
.sheet:focus { outline: none }

/* Atalhos de teclado: só onde há teclado (no toque somem) */
kbd { font: 600 12px/1 var(--f-body); padding: 2px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--ink2) }
@media (pointer: coarse) { .kbd-only { display: none } }

/* Para redes (folha de formatos) */
.fmt-prev { position: relative; height: 168px; aspect-ratio: var(--ar); max-width: 100%; margin: 0 auto; border-radius: 12px; overflow: hidden; background: var(--surface2); box-shadow: 0 0 0 1px var(--line); transition: aspect-ratio .25s ease }
.fmt-prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.fmt-prev .bg { display: none; filter: blur(14px) brightness(.82); transform: scale(1.15) }
.fmt-prev.whole .bg { display: block }
.fmt-prev.whole .fg { object-fit: fill; box-shadow: 0 0 0 1.5px rgba(255,255,255,.95), 0 2px 10px rgba(0,0,0,.35) }
.fmt-prev .fg { transition: width .2s ease, height .2s ease, left .2s ease, top .2s ease }
.fmt-prev:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
.fmt-fig { margin: 0; display: grid; gap: 6px; justify-items: center }
.fmt-cut { font-size: 13px; font-weight: 600; color: var(--ink2); text-align: center; min-height: 1.3em }
.fmts { grid-template-columns: 1fr 1fr; gap: 8px }
.plan.fmt { grid-template-columns: auto 1fr; align-items: start; padding: 10px 12px; gap: 2px 10px }
.plan.fmt .frame { grid-row: span 2; width: 18px; aspect-ratio: var(--ar); max-height: 30px; border: 2px solid var(--ink2); border-radius: 4px; margin-top: 2px }
.plan.fmt:has(input:checked) .frame { border-color: var(--accent); background: var(--tint) }
.plan.fmt .n { font-size: 16px }
.plan.fmt .n small { font-family: var(--f-body); font-size: 12px; font-weight: 600; color: var(--ink2) }
.plan.fmt .d { font-size: 12px; line-height: 1.35 }
.fit label { border-radius: 9px; min-height: 44px; font-weight: 700; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center }
.fit label:has(input:checked) { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0,0,0,.12), inset 0 0 0 1px var(--seg-on-edge) }
.fit label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 1px }
.fmt-note .ic { color: var(--ink2) }
.fmt-how .ic { color: var(--ink2) }
.touch-only { display: none }
@media (pointer: coarse) { .touch-only { display: flex } .fine-only { display: none } }
@media (prefers-reduced-motion: reduce) { .fmt-prev, .fmt-prev .fg { transition: none } }
@container app (max-width: 380px) { .fmts { grid-template-columns: 1fr } }
/* Com uma folha aberta os avisos sobem para o topo: embaixo cobririam o botão principal da folha */
html.sheet-open .app .toasts { top: calc(env(safe-area-inset-top, 0px) + 12px); bottom: auto; left: 12px; right: 12px; z-index: 30 }

/* "Apagar N agora", na folha de Fotos */
.fits { display: grid; gap: 4px; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: var(--r-lg) }
.fits .btn { width: 100% }
.fits small { font-size: 13px; color: var(--ink2) }
.exc.warn { border-color: var(--warn); background: var(--warn-bg) }
.exc.warn .ic { color: var(--warn) }
.legend .w .ic { color: var(--warn) }

/* "×" que tira uma foto do lote (Envio e passo 1) */
.tile-wrap { position: relative; min-width: 0 }
.tile-wrap > .tile { width: 100% }
.tx { position: absolute; top: -6px; left: -6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); background: var(--ink); color: var(--bg); display: grid; place-items: center; padding: 0; cursor: pointer; z-index: 2; box-shadow: 0 1px 4px rgba(0,0,0,.3) }
.tx .ic { width: 14px; height: 14px; stroke-width: 3 }
.tx::after { content: ""; position: absolute; inset: -9px } /* alvo de toque de 44 px */
@media (hover: hover) and (pointer: fine) {
  .tile-wrap .tx { opacity: .65; transition: opacity .12s }
  .tile-wrap:hover .tx, .tile-wrap:focus-within .tx { opacity: 1 }
}
@media (prefers-reduced-motion: reduce) { .tile-wrap .tx { transition: none } }

/* Fotos de resultado não se salvam por fora do Baixar: sem toque longo ("Salvar imagem"), sem arrastar, sem selecionar */
.stage img, .strip img, .grid img, .fmt-prev img, .tile img { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-user-drag: none }
/* Aviso da prévia: embaixo; no comparador, à esquerda do − + (.photo.cmp .lbl.mk). */
.lbl.mk { top: auto; bottom: 8px; left: 50%; right: auto; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% - 16px); width: max-content; text-align: center; z-index: 5 }
.lbl.mk .ic { width: 12px; height: 12px }

.exc.mute { color: var(--ink2); background: transparent }
/* alvo de toque de 44 px nos chips e no saldo */
.exc, .bal { position: relative }
.exc::after, .bal::after { content: ""; position: absolute; inset: -8px 0 }
.exc.mute .ic { color: var(--ink2) }

/* Corte escolhido arrastando; fundo branco em "Sem cortar" */
.fmt-prev.movable { cursor: grab; touch-action: none }
.fmt-prev.movable:active { cursor: grabbing }
.fmt-prev.white { background: #fff }
/* O dedo que ensina a arrastar o corte (formats_controller#teach): o mesmo dedo do gesto ensinado; aperta, leva a foto
   para um lado e para o outro (--p0..--p2, --hx/--hy) e solta. Uma vez por .teach. Movimento reduzido: parado. */
.fmt-hand { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -6px 0 0 -18px; color: #fff; opacity: 0; pointer-events: none; z-index: 2;
            filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)) }
.fmt-hand .ic { width: 40px; height: 40px; stroke-width: 1.8; fill: rgba(20,24,34,.55) }
.fmt-prev.teach .fmt-hand { animation: fmtHand 2.6s cubic-bezier(.4,0,.2,1) both }
.fmt-prev.teach .fg { animation: fmtPan 2.6s cubic-bezier(.4,0,.2,1) both }
@keyframes fmtHand { 0% { opacity: 0; transform: translate(8px, 12px) scale(1.06) } 12% { opacity: 1; transform: none } 18% { transform: scale(.92) }
  42% { transform: translate(var(--hx), var(--hy)) scale(.92) } 72% { transform: translate(calc(-1 * var(--hx)), calc(-1 * var(--hy))) scale(.92) }
  86% { opacity: 1; transform: scale(.92) } 100% { opacity: 0; transform: translate(8px, 12px) scale(1.06) } }
@keyframes fmtPan { 0%, 18% { object-position: var(--p0) } 42% { object-position: var(--p1) } 72% { object-position: var(--p2) } 86%, 100% { object-position: var(--p0) } }
@media (prefers-reduced-motion: reduce) { .fmt-prev.teach .fmt-hand { animation: none; opacity: 1 } .fmt-prev.teach .fg { animation: none } }
.fmt-prev.white .bg { display: none }
.bgpick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px }
.bgpick[hidden] { display: none }
.bgpick .lab { color: var(--ink2); font-weight: 600 }
.bgpick label { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 700; cursor: pointer }
.bgpick label:has(input:checked) { border-color: var(--accent); background: var(--tint) }
.bgpick label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px }
.bgpick .sw { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line) }
.bgpick .sw.desfocado { background: linear-gradient(135deg, #8a7f73, #c9b8a4); filter: blur(.5px) }
.bgpick .sw.branco { background: #fff }

/* Tela de início (blueprint v0.29): a linha do Resultado e a folha de passos do iPhone/Mac. */
.sline.pwa .ic { color: var(--accent) }
.sline.pwa .pwx { border: 0; background: none; padding: 0 8px; min-height: 36px; color: var(--ink2); font-size: 18px; line-height: 1; cursor: pointer }
.sline.pwa button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px }
.sheet:has(.pwsteps) { padding-bottom: calc(34px + env(safe-area-inset-bottom, 0px)) }
.pwsteps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: p }
.pwsteps li { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: 13px; font-weight: 600; line-height: 1.25; color: var(--ink2) }
.pwsteps li i { counter-increment: p; font: 700 11px var(--f-mono); color: var(--ink2); font-style: normal }
.pwsteps li i::before { content: counter(p) }
.pwsteps .k { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface2); color: var(--accent); border: 1px solid var(--line) }
.pwsteps .k .ic { width: 26px; height: 26px }
.pwsteps .k.duo { grid-auto-flow: column; gap: 2px; width: auto; padding: 0 10px }
.pwsteps .k.duo .ic { width: 22px; height: 22px }
.pwsteps .k.duo small { font-size: 12px; color: var(--ink2); margin: 0 2px }
/* A seta pula para o canto de baixo, onde fica o botão do Safari. */
.pwarrow { position: absolute; right: 16px; bottom: 4px; color: var(--accent); animation: pwbob 1.2s ease-in-out infinite }
.pwarrow .ic { width: 26px; height: 26px; transform: rotate(90deg); stroke-width: 2.6 }
@keyframes pwbob { 50% { transform: translateY(6px) } }
html[data-espiando="desligado"] .pwarrow, html[data-espiando="calmo"] .pwarrow { animation: none }
@media (prefers-reduced-motion: reduce) { .pwarrow { animation: none } }
@container app (min-width: 700px) { .pwarrow { display: none } }

/* =================== Resultado sem ruído (blueprint v0.21) =================== */
/* Herói: número grande + uma palavra, como o medidor da Equipe. Celular: numa linha só, com o Desfazer e o prazo ao
   lado, para a foto subir. */
.rhero { display: flex; align-items: baseline; gap: 8px; min-width: 0 }
.rhero b { font-size: 28px; font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums }
.rhero small { font-size: 15px; font-weight: 600; color: var(--ink2) }
.head.res { row-gap: 6px }
.head.res .excs { width: auto; flex: 1 1 auto; align-items: center }
@container app (max-width: 699px) { .head.res .exc { white-space: nowrap } }   /* celular: sem lugar ao lado do número, o chip desce inteiro */
.head.res .sline { order: 1 }   /* celular: as linhas de exceção vêm embaixo da linha do número */
.head.res .excs .sline.png { flex-basis: 100%; order: 1 }   /* "sai em PNG": uma linha inteira na faixa do Desfazer, embaixo no celular */
@container app (min-width: 700px) {
  .rhero { display: grid; gap: 2px; justify-items: start }
  .rhero b { font-size: 44px }
  .head.res .excs { width: 100%; flex: none; justify-content: flex-start }
  .head.res .sline { order: 0 }
  .head.res .excs .sline.png { order: -1 }   /* no computador, em cima do Desfazer */
}
/* Celular estreito (até 360 px): o prazo é só o relógio, um botão; o toque ou o clique mostra o horário ao lado. */
@container app (max-width: 360px) {
  .head .keep > .ic { display: none }
  .head .keep .kbtn { display: inline-flex; position: relative; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 999px; background: none; color: inherit; cursor: pointer }
  .head .keep .kbtn::after { content: ""; position: absolute; inset: -6px }
  .head .keep .kbtn[aria-expanded="true"] { background: var(--line) }
  .head .keep .kbtn:not([aria-expanded="true"]) + .kt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
}
/* Celular muito baixo (até 700 px de altura): o cabeçalho mais justo, o do Resultado numa linha só (o número com
   "fotos prontas" em duas linhas miúdas ao lado, e o Desfazer, o prazo e o "sai em PNG" numa faixa que desliza) e a
   tira mais baixa.
   O Desfazer cabe inteiro na faixa (quebra em duas linhas se for preciso) e o toque dele continua com 44 px (o
   ::after); a miniatura fica com 60 × 45. A foto fica com o espaço. Com mouse, a faixa mostra a barra de rolagem. */
@container app (max-width: 699px) {
  @media (max-height: 700px) {
    .work .head { padding-block: 6px; min-height: 44px }
    .head.res { row-gap: 4px }
    .head.res .rhero { align-items: center; gap: 6px; flex: none }
    .head.res .rhero b { font-size: 24px }
    .head.res .rhero small { width: min-content; font-size: 12px; line-height: 1.1 }
    .head.res .excs { flex: 1 1 0; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-block: 10px; margin-block: -10px }
    .head.res .excs::-webkit-scrollbar { display: none }
    @media (hover: hover) and (pointer: fine) { .head.res .excs { scrollbar-width: thin; padding-bottom: 4px } }
    .head.res .exc { flex: none; max-width: calc(100% - 38px); white-space: normal; text-align: left; font-size: 12px; line-height: 1.2; padding: 4px 9px 4px 7px }
    .head.res .exc .ic { flex: none }
    .head.res .exc::after { inset: -10px 0 }
    .head.res .keep.quiet { flex: none; font-size: 12px }
    .head.res .excs .sline.png { flex: none; width: auto; order: 0; flex-wrap: nowrap; gap: 6px; min-height: 0; padding: 4px 10px; border-radius: 999px; font-size: 12px; white-space: nowrap }
    .head.res .excs .sline.png .ic { width: 15px; height: 15px }
    .work .strip { padding-block: 5px }
    .work .strip .tile { width: 60px }
  }
}
/* Uma linha de status por exceção (o .sline da Equipe): ícone + texto + ação, só quando há o que dizer. */
.head .sline { width: 100% }
.head .sline .ic { width: 18px; height: 18px }
.sline .slact, .sline .pwgo { border: 0; background: none; padding: 0 6px; min-height: 36px; display: inline-flex; align-items: center; font: inherit; font-weight: 700; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer }
/* O prazo, discreto: um relógio e a hora. Desfazer sem devolver saldo: só o ícone, mudo. */
.head .keep.quiet { width: auto; font-size: 13px; white-space: nowrap }
.exc.only-ic { padding: 5px 9px }
.exc.only-ic .ic { width: 16px; height: 16px }
/* Palco: Antes/Depois em pílula com fundo; somem depois do primeiro arraste. Copiar é um ícone no canto da foto. */
.lbl.a, .lbl.d { border-radius: 999px; padding: 4px 10px; background: rgba(10,13,20,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: opacity .2s }
.cmp.touched .lbl.a, .cmp.touched .lbl.d { opacity: 0 }
.lbl.c { left: 50%; top: auto; bottom: 10px; transform: translateX(-50%); font-size: 13px; padding: 5px 12px; border-radius: 14px; width: max-content; max-width: calc(100% - 12px); text-align: center }
.ptool { position: absolute; right: 8px; bottom: 8px; z-index: 4; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(10,13,20,.6); color: #fff; display: grid; place-items: center; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px) }
.ptool .ic { width: 18px; height: 18px }
.ptool:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
@container app (max-width: 699px) { .ptool { display: none } }
@media not ((hover: hover) and (pointer: fine)) { .ptool { display: none } }
/* Tira no Resultado: selo no canto de baixo (não cobre o rosto); "+ Fotos" fantasma no fim; arrastar a miniatura salva a foto */
.head.res ~ .strip .badge { top: auto; bottom: 4px }
.add-tile.quiet { border-color: var(--line); color: var(--ink2) }
.add-tile.quiet:hover { background: var(--surface2) }
.tile.drag { -webkit-user-drag: element }
@media (hover: hover) and (pointer: fine) { .tile.drag { cursor: grab } .tile.drag:active { cursor: grabbing } }
/* Barra 2×2 quando há quatro ações (depois de baixar). O Baixar fica no lugar e muda de estado. */
.bar.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px }
.bar.grid2 .btn { min-width: 0 }
.bar.grid2 .btn.icon-text { flex-direction: row; gap: 8px; font-size: 14px; padding: 0 10px }
@container app (min-width: 700px) { .bar.done:not(.grid2) .btn.icon-text { flex: 1 1 0; min-width: 0; padding: 0 10px } }
/* Rodada pela metade (blueprint v0.47): o trilho "15 de 46" (Ui::RoundMeterComponent), a barra de um botão principal,
   a miniatura que falta apagar e o que acontece ao tocar em Outro detalhe com fotos faltando (.nudge). */
.rmeter { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0 }
.rmeter .n { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; font-variant-numeric: tabular-nums }
.rmeter .n b { font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: -.02em }
.rmeter .n small { font-size: 13px; font-weight: 600; color: var(--ink2) }
.rmeter .rtrk { position: relative; flex: 1; min-width: 40px; height: 10px; border-radius: 5px; overflow: hidden; background: repeating-linear-gradient(90deg, var(--edge) 0 3px, transparent 3px 7px) }
.rmeter .rtrk i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--good) }
.rmeter.fresh .rtrk i { animation: rmFill 1.1s cubic-bezier(.3,.7,.3,1) both }
@keyframes rmFill { from { width: 0 } }
.head.res .rhero.half { display: block; flex: 1 1 100%; width: 100% }
.bar.half { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px }
.bar.half .btn { width: 100%; min-width: 0 }
.bar-more { display: flex; gap: 8px }
.bar.half .bar-more .btn { flex: 1; width: auto; min-height: 44px; border-color: transparent; background: none; color: var(--ink2); font-size: 14px; flex-direction: row; gap: 6px; padding: 0 8px }
.bar.half.fresh .btn.pri { animation: halfPulse .7s ease-out 1.6s both }
.bar.half.nudge .btn.pri { animation: halfPulse .7s ease-out .35s both }
@keyframes halfPulse { from { box-shadow: 0 0 0 0 var(--accent) } 60% { box-shadow: 0 0 0 7px transparent } to { box-shadow: 0 0 0 0 transparent } }
.tile.held img { opacity: .45; filter: grayscale(.5) }
.tile .like.falta { border-color: var(--select) }
.strip.nudge .tile.held { animation: heldWave .45s ease-in-out both }
.strip.nudge .tile.held:nth-child(even) { animation-delay: .08s }
@keyframes heldWave { 50% { transform: translateY(-6px) } }
@keyframes heldRing { 0%, 90% { outline: 3px solid var(--accent); outline-offset: -3px } 100% { outline: 3px solid transparent; outline-offset: -3px } }
.xs-only { display: none }
@container app (max-width: 360px) { .xs-only { display: inline } .xs-no { display: none } }
@media (prefers-reduced-motion: reduce) {
  .rmeter.fresh .rtrk i, .bar.half.fresh .btn.pri, .bar.half.nudge .btn.pri { animation: none }
  .strip.nudge .tile.held { animation: heldRing 2s linear both }
}
.fits .rmeter { margin-bottom: 2px }
.btn.okd { color: var(--good); border-color: var(--good) }
.btn.okd .ic { color: var(--good) }
/* Baixar (400 ms): a seta cai e o botão preenche em verde da esquerda. Movimento reduzido: sem animação. */
.btn.dl-anim { position: relative; overflow: hidden; border-color: var(--good); color: #fff }
.btn.dl-anim::before { content: ""; position: absolute; inset: 0; background: var(--good); transform-origin: left; animation: dlFill .4s cubic-bezier(.2,.8,.3,1) both }
.btn.dl-anim > * { position: relative }
.btn.dl-anim > .ic { animation: dlDrop .4s ease-in both }
@keyframes dlFill { from { transform: scaleX(0) } to { transform: scaleX(1) } }
@keyframes dlDrop { 0% { transform: none; opacity: 1 } 100% { transform: translateY(14px); opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .btn.dl-anim::before, .btn.dl-anim > .ic { animation: none } }
/* Etapas no Resultado: o trabalho acabou; um ✓ só */
@container app (max-width: 699px) { .steps.fin .dots li { background: var(--good) } }
.steps.fin .dots li i { background: var(--good); color: #fff }
/* Chip de saldo compacto nas telas de trabalho: ícone e número; a palavra fica no toque (title) e no leitor de tela.
   "Liberar N grátis" e o zerado continuam por extenso. */
.s-work .bal:not(.zero):not(.claim) .bm, .s-work .bal:not(.zero):not(.claim) .bd { display: none }

/* =================== Cognição baixa (blueprint v0.19) =================== */
/* O único Desfazer pisca uma vez quando o resultado chega (o aviso só conta o que aconteceu). */
.exc.pulse { animation: excPulse 1.2s ease-out 2 }
@keyframes excPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent) } 100% { box-shadow: 0 0 0 9px transparent } }
@media (prefers-reduced-motion: reduce) { .exc.pulse { animation: none } }
/* Pix no celular: copiar é o principal, com três passos; o QR fica para pagar de outro celular. No computador, o QR. */
.pixsteps { list-style: none; margin: 0; padding: 0; display: none; gap: 8px; counter-reset: ps; text-align: left; justify-self: stretch }
.pixsteps li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600 }
.pixsteps li::before { counter-increment: ps; content: counter(ps); width: 26px; height: 26px; border-radius: 50%; background: var(--tint); color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 800; flex: none }
.qrmore { display: none; justify-self: stretch; text-align: center }
.qrmore summary { cursor: pointer; color: var(--accent); font-weight: 700; font-size: 14px; min-height: 44px; display: flex; align-items: center; justify-content: center }
.qrmore .qr { margin: 4px auto 0 }
@media (hover: none) and (pointer: coarse) {
  .pix .qrdesk { display: none }
  .pix .pixsteps { display: grid }
  .pix .qrmore { display: block }
  .pix .side { justify-items: stretch }
  .pix .copypix { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); width: 100% }
}
/* Folha de Fotos curta: uma opção, a menor que cobre o lote, numa linha só (nome e preço); a bolinha, os grupos, a
   pilha e o selo aparecem com o resto, atrás de "Ver outras opções" (more_controller). */
.sheet-form.short .plans li:not(:has(input:checked)), .sheet-form.short .sfoot .rule, .sheet-form.short .sfoot .btn.link,
.fits.short small, .sheet-form.short .plan .rad, .sheet-form.short .plan .pst, .sheet-form.short .plan .rec, .sheet-form.short .plan .qt { display: none }
.sheet-form.short .plan .nm { display: inline }
.sheet-form.short .plan { grid-template-columns: 1fr auto; cursor: default; border-color: var(--line); background: var(--bg); box-shadow: none }
.sheet-form.short .plan .pr { grid-row: auto; grid-column: auto }
.sheet-form .payic { display: inline-flex; gap: 4px }
.sheet-form .sfoot .rule { justify-content: center; margin: 4px 0 0; font-size: 14px }
.sheet-form .sfoot .rule.off { visibility: hidden }
.fits.short { border: 0; padding: 0 }
.sheetbody { display: grid; gap: 12px }
.moreopt { border: 0; background: transparent; color: var(--accent); font-weight: 700; font-size: 15px; cursor: pointer; min-height: 44px; justify-self: center; display: inline-flex; align-items: center; gap: 4px }
.moreopt .ic { width: 18px; height: 18px }
/* Folha com uma linha fina em cima: sobre o fundo escurecido, a sombra sumia no escuro (v0.19). */
.sheet { border-top: 1px solid var(--line) }

/* =================== O Espiando na espera, 2ª rodada (blueprint v0.22) =================== */
/* Lupa da prévia: pixels limpos em volta da área apagada, que seguem o dedo ou o mouse. Só no lado "depois". */
.photo.cmp.marked { --lr: 72px }
@container app (max-width: 699px) { .photo.cmp.marked { --lr: 54px } }
.loupe { position: absolute; inset: 0; pointer-events: none; clip-path: circle(var(--lr) at var(--lx, 50%) var(--ly, 50%)); z-index: 1 }
.loupe img { position: absolute; display: block; object-fit: fill }
.loupe-ring { position: absolute; left: var(--lx, 50%); top: var(--ly, 50%); width: calc(var(--lr) * 2); height: calc(var(--lr) * 2); margin: calc(var(--lr) * -1) 0 0 calc(var(--lr) * -1); border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0,0,0,.25), 0 6px 18px rgba(0,0,0,.35); pointer-events: none; z-index: 1 }
.loupe-ring::after { content: ""; position: absolute; left: 50%; top: 100%; width: 28px; height: 4px; margin: 6px 0 0 -14px; border-radius: 2px; background: #fff; opacity: .9 }

/* A palavra de cada aparelho (helper dv): "clique" no computador, "toque" no celular. */
.dv-c { display: none }
@media (hover: hover) and (pointer: fine) { .dv-c { display: inline } .dv-t { display: none } }


/* Folha de entrar: o botão do Google no desenho oficial dele (Ui::GoogleButtonComponent), claro ou escuro. */
.signin { display: grid; gap: 12px; padding-bottom: 4px }
.signin .fine { justify-content: center; text-align: center; font-size: 13px }
.gsi { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; padding: 0 16px;
  border-radius: 24px; border: 1px solid #747775; background: #FFFFFF; color: #1F1F1F; text-decoration: none;
  font: 500 15px/20px Roboto, "Helvetica Neue", Arial, sans-serif; letter-spacing: .25px; width: 100% }
.gsi:hover { background: #F8F9FA }
.gsi:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px }
.gsi-g { display: inline-flex; width: 20px; height: 20px }
.gsiw { padding: 0 14px 14px } /* o botão dentro de uma lista de linhas (Seu saldo) */
.gsiw.fine { margin: -4px 0 0; font-size: 13px; color: var(--ink2); text-align: center } /* sem acesso ao Google: o atendimento por e-mail */
.signin .help a, .gsiw.fine a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px }
@media (prefers-color-scheme: dark) {
  .gsi { background: #131314; border-color: #8E918F; color: #E3E3E3 }
  .gsi:hover { background: #1E1F20 }
}

/* O momento da mágica (v0.34, v0.38): a cena da chegada ao Resultado (StageComponent .mg, lib/magica.js). html.mg-wait
   segura o primeiro quadro (o último do Apagando) até a foto limpa carregar; html.mg-run toca. --mgd: o tempo já passado
   (negativo; Desligado começa 200 ms adiante). mg-a: a cena inteira; mg-rm (movimento reduzido): o detalhe e o
   escurecido somem em 200 ms. Durante a cena, só a foto e o Espiando; depois (html.mg-depois), um de cada vez: a tira,
   o comparador, o topo e a barra. Com movimento reduzido, o resto aparece de uma vez no fim. */
@property --mr { syntax: "<percentage>"; inherits: false; initial-value: 0% }
.mg { display: none }
html:is(.mg-wait, .mg-run) .mg { display: block; position: absolute; inset: 0; z-index: 3; pointer-events: none }
html:is(.mg-wait, .mg-run) :is(.photo.cmp > :is(.before, .handle, .lbl, .pcorner, .hint), .stage > :is(.abrow, .pgr), #head > *, #strip, #bar) { opacity: 0 }
html.mg-depois #strip { animation: mgUp .34s cubic-bezier(.2,.8,.3,1) 700ms both }
html.mg-depois :is(.photo.cmp > :is(.before, .handle, .lbl, .pcorner, .hint), .stage > :is(.abrow, .pgr)) { animation: mgFade .32s ease-out 1500ms both }
html.mg-depois .photo.cmp .handle::after, html.mg-depois .photo.cmp .handle svg { animation: mgPop .42s cubic-bezier(.3,1.5,.5,1) 1500ms both }
html.mg-depois :is(#head > *, #bar) { animation: mgUp .34s cubic-bezier(.2,.8,.3,1) 2300ms both }
.mg .mgp, .mg .mgx { position: absolute; inset: 0 }
.mg .mgp { --mr: var(--mr0); -webkit-mask-image: radial-gradient(circle at var(--ox) var(--oy), #000 var(--mr), transparent calc(var(--mr) + 4%)); mask-image: radial-gradient(circle at var(--ox) var(--oy), #000 var(--mr), transparent calc(var(--mr) + 4%)) }
.mg .mgp svg { width: 100%; height: 100%; display: block }
.mg .mgg { position: absolute; left: var(--ox); top: var(--oy); width: var(--gw); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; opacity: 0;
  background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,236,170,.55) 45%, rgba(255,255,255,0)) }
html.mg-a .mg .mgp { animation: mgShrink .7s cubic-bezier(.55,0,.35,1) calc(var(--mgd) + 350ms) both }
html.mg-a .mg .mgx .dim { animation: mgOut .26s ease-out calc(var(--mgd) + 1000ms) both }
html.mg-a .mg .mgx .ants { animation: ants .9s linear infinite, mgOut .22s ease-out calc(var(--mgd) + 1030ms) both }
html.mg-a .mg .mgg { animation: mgGlow .5s ease-out calc(var(--mgd) + 850ms) both }
html.mg-rm .mg :is(.mgp, .mgx) { animation: mgOut .2s linear both }
html.mg-rm .mg .mgx .ants { animation: none }
html.mg-rm .mg .mgg { display: none }
@keyframes mgShrink { 0% { --mr: var(--mr0); opacity: 1 } 85% { opacity: 1 } 100% { --mr: 0%; opacity: 0 } }
@keyframes mgGlow { 0% { opacity: 0; scale: .3 } 40% { opacity: .95; scale: 1 } 100% { opacity: 0; scale: 1.25 } }
@keyframes mgOut { from { opacity: 1 } to { opacity: 0 } }
@keyframes mgFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes mgUp { from { opacity: 0; transform: translateY(8px) } to { opacity: 1; transform: none } }
@keyframes mgPop { from { scale: .4; opacity: 0 } to { scale: 1; opacity: 1 } }

/* O widget do Turnstile que acompanha o Apagar (prova_controller.js): fora da vista; se pedir um gesto, a ficha não
   vem e a folha "Liberar fotos grátis" mostra o desafio. */
.prova-w { position: absolute; width: 0; height: 0; overflow: hidden }
