/* Totem 43" em pé (≈1080×1920). Tudo em rem: 1rem = 20px em 1080 de largura,
   e escala junto com a tela (54rem × 96rem). Paleta e tipos do Manual da Marca RTZ. */
:root {
  --navy: #0E1B2C;
  --navy-2: #16293F;
  --navy-3: #1E3550;
  --ouro: #C49A6A;
  --ouro-claro: #D9B88E;
  --areia: #D8CDB0;
  --creme: #ECE6D6;
  --petroleo: #3E6E8C;
  --linha: rgba(216, 205, 176, .14);
  --texto-2: #B9B3A2;
  --display: 'Archivo', system-ui, sans-serif;
  --corpo: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { font-size: min(1.852vw, 1.0417vh); }
html, body { margin: 0; height: 100%; background: var(--navy); color: var(--creme); }
body {
  font-family: var(--corpo); overflow: hidden;
  -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
#app { position: fixed; inset: 0; display: flex; justify-content: center; }
img { display: block; -webkit-user-drag: none; }
button { font: inherit; color: inherit; }

.tela {
  position: relative; width: 54rem; max-width: 100vw; height: 100%;
  display: flex; flex-direction: column; padding: 3.2rem 3.2rem 3.6rem;
  animation: entra .45s ease both;
}
@keyframes entra { from { opacity: 0; transform: translateY(1.2rem); } }

.label {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ouro);
}
.titulo {
  margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase;
  letter-spacing: -.01em; line-height: .95;
}

.btn {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  min-height: 4.6rem; padding: 0 2.4rem; border: 0; border-radius: .3rem; cursor: pointer;
  background: var(--ouro); color: var(--navy);
  font-family: var(--display); font-weight: 800; font-size: 1.3rem; letter-spacing: .08em; text-transform: uppercase;
  transition: transform .12s, background .2s;
}
.btn:active { transform: scale(.98); background: var(--ouro-claro); }
.btn[disabled] { opacity: .35; }
.btn-sec {
  background: none; color: var(--creme); border: 1px solid var(--linha);
}
.btn svg { width: 1.6rem; height: 1.6rem; }

/* ---------- Abertura ---------- */
.abertura { padding: 0; }
.abertura-foto { position: relative; flex: 1 1 auto; overflow: hidden; }
.abertura-foto > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
  opacity: 0; transition: opacity 1.6s ease;
}
.abertura-foto > img.on { opacity: 1; }
.abertura-foto::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,27,44,.55) 0%, rgba(14,27,44,0) 22%, rgba(14,27,44,0) 55%, var(--navy) 100%);
}
.abertura-topo {
  position: absolute; z-index: 2; top: 3.2rem; left: 3.2rem; right: 3.2rem;
  display: flex; justify-content: space-between; align-items: center;
}
.abertura-topo img { height: 3rem; width: auto; }
.abertura-corpo { padding: 0 3.2rem 3.6rem; display: flex; flex-direction: column; gap: 1.6rem; margin-top: -9rem; position: relative; z-index: 2; }
.abertura-corpo .titulo { font-size: 6.8rem; }
.abertura-corpo p { margin: 0; font-size: 1.5rem; line-height: 1.5; color: var(--texto-2); max-width: 40rem; }
.abertura-corpo .btn { margin-top: 1.6rem; min-height: 6rem; font-size: 1.6rem; justify-content: space-between; }
.abertura-rodape { display: flex; justify-content: space-between; font-family: var(--mono); font-size: .8rem; letter-spacing: .16em; color: #7E96B2; }
.toque { animation: pulso 2.4s ease-in-out infinite; }
@keyframes pulso { 50% { box-shadow: 0 0 0 1.2rem rgba(196,154,106,0); } 0% { box-shadow: 0 0 0 0 rgba(196,154,106,.45); } }

/* ---------- Pergunta ---------- */
.topo { display: flex; align-items: center; justify-content: space-between; height: 4.4rem; }
.voltar {
  width: 4.4rem; height: 4.4rem; display: flex; align-items: center; justify-content: center;
  background: none; border: 1px solid var(--linha); border-radius: 50%; cursor: pointer; padding: 0;
}
.voltar svg { width: 1.8rem; height: 1.8rem; }
.voltar[hidden] { display: flex; visibility: hidden; }
.contador { font-family: var(--mono); font-size: 1.1rem; }
.contador span { color: #7E96B2; }
.topo .simbolo { height: 2.8rem; width: auto; opacity: .9; }
.progresso { height: .3rem; background: var(--navy-3); border-radius: .2rem; margin: 1.6rem 0 2.4rem; overflow: hidden; }
.progresso div { height: 100%; background: var(--ouro); transition: width .5s ease; }
.cabeca { display: flex; flex-direction: column; gap: .8rem; margin-bottom: 2.4rem; }
.cabeca .titulo { font-size: 3.6rem; font-weight: 900; }
.cabeca .dica { font-size: 1.2rem; color: var(--texto-2); }

.grade { flex: 1; min-height: 0; display: grid; gap: 1.2rem; align-content: start; }
.grade.g6 { grid-template-columns: repeat(2, 1fr); }
.grade.g7 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); align-content: stretch; }
.grade.g7 .op, .grade.g7.retrato .op { aspect-ratio: auto; height: 100%; }
.op {
  position: relative; padding: 0; border: 0; border-radius: .4rem; overflow: hidden; cursor: pointer;
  background: var(--navy-2); aspect-ratio: 1 / 1; outline: 2px solid transparent; outline-offset: -2px;
  transition: transform .18s ease, opacity .25s ease, outline-color .15s;
}
.grade.retrato .op { aspect-ratio: 3 / 4; }
.grade.g6 .op { max-height: 21.2rem; aspect-ratio: auto; height: 21.2rem; }
.op img { width: 100%; height: 100%; object-fit: cover; }
.op:active { transform: scale(.975); }
.op.escolhida { outline: .3rem solid var(--ouro); }
.op.escolhida::after {
  content: ''; position: absolute; top: 1rem; right: 1rem; width: 2.8rem; height: 2.8rem; border-radius: 50%;
  background: var(--ouro) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230E1B2C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 60% no-repeat;
}
.grade.decidida .op:not(.escolhida) { opacity: .3; }
.grade.g7 .op:last-child:nth-child(7) { grid-column: 2; }

/* ---------- Analisando ---------- */
.analisando { align-items: center; justify-content: center; gap: 3.6rem; text-align: center; }
.anel { width: 16rem; height: 16rem; }
.anel circle { fill: none; stroke-width: 5; }
.anel .fundo { stroke: var(--navy-3); }
.anel .frente { stroke: var(--ouro); stroke-linecap: round; transform: rotate(-90deg); transform-origin: center; stroke-dasharray: 452; stroke-dashoffset: 452; }
.anel text { font-family: var(--mono); font-size: 22px; fill: var(--creme); }
.analisando .titulo { font-size: 3.6rem; }
.passos { display: flex; flex-direction: column; gap: 1.2rem; font-size: 1.4rem; text-align: left; }
.passos div { display: flex; align-items: center; gap: 1rem; color: #7E96B2; transition: color .3s; }
.passos div.ok { color: var(--creme); }
.passos svg { width: 1.4rem; height: 1.4rem; }

/* ---------- Captura ---------- */
.teaser { position: relative; height: 15rem; margin: 0 0 2.4rem; }
.teaser-card {
  position: absolute; inset: 0; background: var(--navy-2); border: 1px solid var(--linha); border-radius: .5rem;
  padding: 2rem 2.4rem; display: flex; flex-direction: column; gap: .8rem; filter: blur(.7rem);
}
.teaser-card .titulo { font-size: 4.6rem; }
.teaser-cadeado {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.teaser-cadeado span {
  width: 5.6rem; height: 5.6rem; border-radius: 50%; background: var(--navy); border: 1px solid var(--ouro);
  display: flex; align-items: center; justify-content: center;
}
.teaser-cadeado svg { width: 2.2rem; height: 2.2rem; }
.form { display: flex; flex-direction: column; gap: 1.6rem; }
.form .titulo { font-size: 3.6rem; margin-bottom: .8rem; }
.campo { display: flex; flex-direction: column; gap: .6rem; font-size: 1.2rem; color: var(--texto-2); }
.campo input {
  height: 4.8rem; padding: 0 1.4rem; background: var(--navy-2); border: 1px solid #2B4361; border-radius: .3rem;
  color: var(--creme); font-family: var(--corpo); font-size: 1.6rem; user-select: text; -webkit-user-select: text;
}
.campo input:focus { outline: none; border-color: var(--ouro); }
.campo.erro input { border-color: #D9735B; }
.campo small { color: #E39A86; font-size: 1.05rem; min-height: 1.2rem; }
.opcional { color: #7E96B2; }
.aceite { display: flex; gap: 1.2rem; align-items: flex-start; font-size: 1.15rem; line-height: 1.45; color: var(--texto-2); cursor: pointer; }
.aceite input { width: 2.2rem; height: 2.2rem; margin: 0; accent-color: var(--ouro); flex-shrink: 0; }
.form .btn { margin-top: .8rem; }
.form .nota { font-size: 1.05rem; color: #7E96B2; text-align: center; }

/* ---------- Resultado ---------- */
.resultado { padding-top: 2.8rem; gap: 1.8rem; }
.res-cabeca { display: flex; flex-direction: column; gap: 1rem; }
.res-cabeca .titulo { font-size: 7rem; line-height: .9; white-space: nowrap; overflow: hidden; }
.res-topo { display: grid; grid-template-columns: 16rem minmax(0, 1fr); gap: 2.4rem; }
.res-foto { border-radius: .4rem; overflow: hidden; aspect-ratio: 3 / 4; background: var(--navy-2); }
.res-foto img { width: 100%; height: 100%; object-fit: cover; }
.res-nome { display: flex; flex-direction: column; gap: 1.2rem; justify-content: center; }
.res-estilo { font-size: 1.6rem; }
.res-estilo b { font-family: var(--mono); color: var(--ouro); font-weight: 400; }
.res-frase { margin: 0; font-size: 1.5rem; font-style: italic; color: var(--texto-2); }
.barra { display: flex; height: .9rem; border-radius: .45rem; overflow: hidden; gap: .2rem; }
.barra span:first-child { background: var(--ouro); }
.barra span:last-child { background: var(--petroleo); }
.barra-leg { display: flex; justify-content: space-between; font-size: 1.05rem; color: var(--texto-2); }
.toque-de { margin: 0; font-size: 1.25rem; line-height: 1.5; color: var(--texto-2); }
.toque-de strong { color: var(--creme); }
.secao { display: flex; flex-direction: column; gap: 1rem; padding-top: 1.6rem; border-top: 1px solid var(--linha); }
.secao h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 2.2rem; text-transform: uppercase; letter-spacing: -.02em; }
.kit { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.kit div { background: var(--navy-2); border-radius: .4rem; padding: 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .4rem; }
.kit span { font-family: var(--mono); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: #7E96B2; }
.kit b { font-size: 1.35rem; font-weight: 600; line-height: 1.3; }
.paleta { display: flex; gap: 1rem; }
.paleta div { flex: 1; display: flex; flex-direction: column; gap: .6rem; font-size: 1.05rem; color: var(--texto-2); }
.paleta i { display: block; height: 3.6rem; border-radius: .3rem; border: 1px solid var(--linha); }
.levar { display: grid; grid-template-columns: 9.5rem 1fr; gap: 2rem; align-items: center; background: var(--navy-2); border-radius: .5rem; padding: 1.6rem; }
.qr { width: 9.5rem; height: 9.5rem; background: var(--creme); border-radius: .3rem; padding: .6rem; }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr.vazio { display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: .8rem; color: var(--navy); text-align: center; }
.levar h3 { margin: 0 0 .6rem; font-family: var(--display); font-weight: 800; font-size: 1.7rem; text-transform: uppercase; }
.levar p { margin: 0; font-size: 1.2rem; line-height: 1.45; color: var(--texto-2); }
.res-acoes { margin-top: auto; display: grid; grid-template-columns: 1fr; gap: 1rem; }

/* ---------- Aviso de inatividade ---------- */
.aviso { position: fixed; inset: 0; z-index: 50; background: rgba(7, 14, 24, .82); display: flex; align-items: center; justify-content: center; }
.aviso[hidden] { display: none; }
.aviso-caixa { width: 40rem; background: var(--navy-2); border: 1px solid var(--linha); border-radius: .6rem; padding: 3.2rem; display: flex; flex-direction: column; gap: 1.2rem; }
.aviso-caixa h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: 3.4rem; text-transform: uppercase; }
.aviso-caixa p { margin: 0 0 1.2rem; font-size: 1.4rem; color: var(--texto-2); }
.aviso-caixa strong { color: var(--ouro); font-family: var(--mono); }
