/* ── Montador de terço (personalizar.html) ──
   Palco colorido com o terço ao vivo + painel branco com as partes e opções.
   A cor do palco acompanha a corda escolhida (variáveis definidas no montador.js). */

.page-montador {
  background: var(--white);
}

.mt {
  --corda: #1c1c1e;
  --corda-escura: #000000;
  --corda-clara: #555555;
  --palco: #ece8e2;
  --palco-fundo-texto: #d9d4cc;
  --mt-topo: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: calc(100svh - var(--mt-topo));
  overflow-x: clip;
}

/* ───────── palco ───────── */
.mt-palco {
  position: sticky;
  top: var(--mt-topo);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: calc(100svh - var(--mt-topo));
  padding: clamp(1.5rem, 3vw, 2.75rem);
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 50% 45%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 70%),
    var(--palco);
  transition: background-color 0.7s var(--ease);
}

.mt-palco__fundo {
  position: absolute;
  left: 50%;
  top: 46%;
  margin: 0;
  transform: translate(-50%, -50%);
  font-size: clamp(5rem, 13vw, 13rem);
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: var(--palco-fundo-texto);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
  transition: color 0.7s var(--ease);
}

.mt-palco__topo {
  position: relative;
  z-index: 1;
}

.mt-palco__eyebrow {
  margin: 0 0 0.35rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

.mt-palco__modelo {
  margin: 0;
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mt-palco__terco {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
}

/* a foto usa toda a altura entre o título e o valor */
.mt-palco__terco {
  position: static;
}

.mt-palco__tela {
  position: absolute;
  inset: 7.75rem 1rem 7.25rem;
  z-index: 0;
}

/* a legenda repete o resumo do painel: fica só para leitores de tela */
.mt-palco__legenda {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 999px) {
  .mt-palco__tela {
    inset: 2.6rem 0.5rem 4.4rem;
  }
}

/* a foto do terço ocupa a altura disponível, sem distorcer (o tamanho vem da base, ver terco.json) */
.mt-canvas {
  position: absolute;
  inset: 0;
  margin: auto;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 791 / 1407;
  object-fit: contain;
  filter: drop-shadow(0 22px 26px rgba(0, 0, 0, 0.16));
}

.mt-canvas--antes {
  opacity: 0;
  pointer-events: none;
}

.mt-carregando {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.25rem;
  height: 2.25rem;
  margin: -1.125rem 0 0 -1.125rem;
  border: 2px solid rgba(0, 0, 0, 0.15);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: mt-girar 0.8s linear infinite;
}

.mt.is-foto .mt-carregando {
  display: none;
}

@keyframes mt-girar {
  to {
    transform: rotate(360deg);
  }
}

.mt-palco__legenda {
  position: absolute;
  bottom: 5.6rem;
  left: 0;
  right: 0;
  font-size: var(--fs-xs);
  text-align: center;
  color: rgba(0, 0, 0, 0.55);
}

.mt-palco__compra {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
}

.mt-palco__preco {
  display: grid;
}

.mt-palco__preco-rotulo {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.55);
}

.mt-palco__preco strong {
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mt-palco__preco strong.is-pulso {
  animation: mt-pulso 0.5s var(--ease);
}

@keyframes mt-pulso {
  40% {
    transform: scale(1.06);
  }
}

/* ───────── desenho do terço ───────── */
.mt-corda {
  fill: none;
  stroke: var(--corda);
  stroke-width: 5;
  stroke-linejoin: round;
  transition: stroke 0.6s var(--ease);
}

.mt-corda__trama {
  fill: none;
  stroke: var(--corda-clara);
  stroke-width: 4;
  stroke-dasharray: 1.4 2.4;
  opacity: 0.45;
  transition: stroke 0.6s var(--ease);
}

.mt-no__corpo {
  fill: var(--corda);
  stroke: var(--corda-escura);
  stroke-width: 0.8;
  transition: fill 0.6s var(--ease), stroke 0.6s var(--ease);
}

.mt-no__voltas {
  fill: none;
  stroke: var(--corda-escura);
  stroke-width: 1.1;
  stroke-linecap: round;
  opacity: 0.8;
}

.mt-no__luz {
  fill: var(--corda-clara);
  opacity: 0.45;
}

.mt-argola {
  stroke: #a3a3a3;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.mt-tag__txt {
  font-family: var(--font-body);
  font-size: 3.4px;
  font-weight: 700;
  letter-spacing: 0.25px;
  text-anchor: middle;
  fill: #3a3a3a;
}

.mt-letra__txt {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 800;
  text-anchor: middle;
  fill: #1e1e1e;
}

.mt-conta,
.mt-letra,
.mt-cruz,
.mt-pingente {
  transform-box: fill-box;
  transform-origin: center;
}

.mt-contas.is-novo .mt-conta,
.mt-letra.is-novo {
  animation: mt-pop 0.5s var(--ease) backwards;
  animation-delay: var(--d, 0ms);
}

@keyframes mt-pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}

.mt-cruz.is-novo {
  animation: mt-cair 0.7s var(--ease) backwards;
}

@keyframes mt-cair {
  from {
    opacity: 0;
    transform: translateY(-26px) rotate(-6deg);
  }
}

.mt-pingente {
  transform-box: view-box;
}

.mt-pingente.is-novo {
  animation: mt-balanco 1.1s var(--ease) backwards;
}

@keyframes mt-balanco {
  0% {
    opacity: 0;
    transform: rotate(-22deg);
  }
  35% {
    opacity: 1;
    transform: rotate(10deg);
  }
  65% {
    transform: rotate(-4deg);
  }
}

/* ───────── painel ───────── */
.mt-painel {
  position: relative;
  padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1.25rem, 4vw, 4rem);
  background: var(--white);
}

.mt-voltar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.3s var(--ease);
}

.mt-voltar:hover {
  border-color: var(--ink);
  transform: translateX(-2px);
}

.mt-titulo {
  margin: 1.4rem 0 1.5rem;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.mt-titulo:focus {
  outline: none;
}

/* abas das partes (ícones, como no configurador de referência) */
.mt-etapas {
  display: flex;
  gap: 0.6rem;
  margin: 0 -0.25rem 1.75rem;
  padding: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.mt-etapas::-webkit-scrollbar {
  display: none;
}

.mt-etapa {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  min-width: 4.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.mt-etapa__icone {
  position: relative;
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.35s var(--ease), box-shadow 0.3s var(--ease);
}

.mt-etapa:hover .mt-etapa__icone {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.mt-etapa.is-ativa .mt-etapa__icone {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

/* check verde: parte já escolhida */
.mt-etapa__check {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: #1e8e3e;
  color: #fff;
  animation: mt-check-entra 0.35s var(--ease) backwards;
}

@keyframes mt-check-entra {
  from {
    transform: scale(0.3);
    opacity: 0;
  }
}

/* parte obrigatória que ainda falta: pontinho laranja */
.mt-etapa.is-falta:not(.is-ativa) .mt-etapa__icone::after {
  content: "";
  position: absolute;
  top: -3px;
  right: -3px;
  width: 0.6rem;
  height: 0.6rem;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: #e37400;
}

.mt-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.mt-etapa__nome {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--muted);
}

.mt-etapa.is-ativa .mt-etapa__nome {
  color: var(--ink);
}

.mt-etapa__num {
  font-weight: 400;
  opacity: 0.6;
}

.mt-etapa:focus-visible {
  outline: none;
}

.mt-etapa:focus-visible .mt-etapa__icone {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* opções */
.mt-opcoes.is-entrando > * {
  animation: mt-subir 0.45s var(--ease) backwards;
}

.mt-opcoes.is-entrando > *:nth-child(2) {
  animation-delay: 0.05s;
}

.mt-opcoes.is-entrando > *:nth-child(3) {
  animation-delay: 0.1s;
}

@keyframes mt-subir {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.mt-opcoes__cab {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  margin-bottom: 1rem;
}

.mt-opcoes__titulo {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.mt-opcoes__info {
  flex: 1 1 12rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* mesmo estilo do "*imagem meramente ilustrativa" do palco */
.mt-opcoes__aviso {
  font-size: var(--fs-xs, 0.78rem);
  font-weight: var(--fw-medium, 500);
  color: rgba(0, 0, 0, 0.5);
}

.mt-foto-real {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.mt-foto-real:hover {
  border-color: var(--ink);
}

.mt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.1rem;
}

.mt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.mt-chip:hover {
  border-color: var(--ink);
}

.mt-chip.is-ativa {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.mt-chip--cor i {
  width: 0.85rem;
  height: 0.85rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 3px;
  background: var(--c);
}

.mt-grade {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.75rem, 1fr));
  gap: 0.35rem;
}

.mt-grade--pecas {
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  align-items: stretch;
}

/* cruzes inclusas no valor: todas na mesma faixa, uma ao lado da outra */
.mt-grade--inclusas {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  margin-bottom: 0.35rem;
}

.mt-grade--inclusas > .mt-op {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
}

.mt-grade--inclusas .mt-op__selo {
  max-width: 100%;
  padding-inline: 0.35rem;
  font-size: 0.58rem;
}

.mt-grade--pecas .mt-op {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  height: auto;
}

.mt-grade--pecas .mt-op__selo {
  margin-top: auto;
}

.mt-op {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.3rem;
  padding: 0.85rem 0.35rem 1.05rem;
  border: 0;
  border-radius: 14px;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: background 0.3s var(--ease);
}

.mt-op:hover {
  background: #f6f4f0;
}

.mt-op.is-ativa {
  background: #f1ede6;
}

/* barrinha embaixo da opção escolhida */
.mt-op::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0.45rem;
  width: 1.75rem;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.35s var(--ease);
}

.mt-op.is-ativa::after {
  transform: translateX(-50%) scaleX(1);
}

.mt-op:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.mt-op__visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 3.4rem;
  transition: transform 0.4s var(--ease);
}

/* passar o mouse aumenta um pouco a peça */
.mt-op:hover .mt-op__visual {
  transform: translateY(-2px) scale(1.12);
}

/* cruzes, medalhas e relicários: todos na mesma caixa pequena, a imagem cabe inteira */
.mt-grade--pecas .mt-op__visual {
  width: 100%;
  height: 4.75rem;
}

.mt-grade--pecas .mt-op__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
}

/* peça menor que uma medalha (ponto de luz): aparece no tamanho proporcional */
.mt-grade--pecas .mt-op__visual[style*="--mt-escala"] img {
  inset: calc((1 - var(--mt-escala)) * 50%);
  width: calc(var(--mt-escala) * 100%);
  height: calc(var(--mt-escala) * 100%);
}

.mt-op__visual img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: opacity 0.35s var(--ease);
}

.mt-op__verso {
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
}

/* cores do modelo escolhido */
.mt-cores {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  animation: mt-subir 0.4s var(--ease) backwards;
}

.mt-cores__titulo {
  margin: 0 0 0.6rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.mt-cores__titulo strong {
  color: var(--ink);
}

.mt-cores .mt-chip--cor i {
  border-radius: 50%;
}

.mt-op[data-tem-verso]:hover .mt-op__verso {
  opacity: 1;
}

.mt-op[data-tem-verso]:hover .mt-op__visual img:first-child {
  opacity: 0;
}

.mt-op__nome {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.25;
}

.mt-op__sub,
.mt-op__preco {
  font-size: var(--fs-xs);
  color: var(--muted);
}

.mt-op__preco {
  font-weight: var(--fw-semibold);
  color: var(--ink);
}

/* amostra da corda: cor lisa e chapada (contorno fino só para as cores claras não sumirem no branco) */
.mt-corda-amostra {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* cor lisa com foto real: o centro do rolinho de corda (foto 400x501, rolinho no meio) */
.mt-corda-amostra--foto {
  background-color: var(--c);
  background-size: 460% auto;
  background-position: center;
  background-repeat: no-repeat;
}

.mt-sem {
  position: relative;
  width: 2.9rem;
  height: 2.9rem;
  border: 1.5px dashed rgba(0, 0, 0, 0.3);
  border-radius: 50%;
}

.mt-sem::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 12%;
  bottom: 12%;
  width: 1.5px;
  background: rgba(0, 0, 0, 0.3);
  transform: rotate(45deg);
}

/* foto do relicário e nome */
.mt-foto,
.mt-nome {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #faf9f7;
}

.mt-foto__label,
.mt-nome__label {
  display: block;
  margin: 0 0 0.5rem;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--ink);
}

.mt-foto__label span {
  margin-left: 0.35rem;
  font-weight: 400;
  color: var(--muted);
}

.mt-foto__ajuda,
.mt-foto__status,
.mt-nome__conta {
  margin: 0 0 0.75rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.mt-foto__status:empty {
  display: none;
}

/* campo de arquivo nativo: cabe no celular e com cara de botão da loja */
.mt-foto input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  font: inherit;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.mt-foto input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.mt-nome__input {
  width: 100%;
  min-height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  background: var(--white);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
}

.mt-nome__input:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.mt-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  text-decoration: underline;
  text-underline-offset: 0.3em;
  cursor: pointer;
}

.mt-erro {
  color: var(--danger);
}

/* rodapé do painel */
.mt-rodape {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* o que ainda falta escolher (ou tudo certo) */
.mt-rodape__status {
  flex: 1 1 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  background: #fef3e2;
  color: #8a4b00;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.4;
}

.mt-rodape__status::before {
  content: "!";
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: #e37400;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.mt-rodape__status.is-ok {
  background: #e6f4ea;
  color: #137333;
}

.mt-rodape__status.is-ok::before {
  content: none;
}

.mt-rodape__resumo {
  flex: 1 1 14rem;
  margin: 0;
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--muted);
}

/* botões */
.mt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 50px;
  padding: 0 1.5rem;
  border: 1px solid var(--ink);
  border-radius: var(--radius-btn);
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-size: var(--fs-body-sm);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.25s ease, color 0.25s ease;
}

.mt-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.mt-btn:active {
  transform: translateY(0);
}

.mt-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.mt-btn--linha {
  background: var(--white);
  color: var(--ink);
  border-color: var(--line);
}

.mt-btn--linha:hover {
  border-color: var(--ink);
  box-shadow: none;
}

/* ───────── depois de adicionar ───────── */
.mt-painel__pronto {
  max-width: 34rem;
  padding-top: clamp(1rem, 6vh, 4rem);
}

.mt-painel__pronto:not([hidden]) > * {
  animation: mt-subir 0.55s var(--ease) backwards;
}

.mt-painel__pronto > *:nth-child(2) { animation-delay: 0.06s; }
.mt-painel__pronto > *:nth-child(3) { animation-delay: 0.12s; }
.mt-painel__pronto > *:nth-child(4) { animation-delay: 0.18s; }
.mt-painel__pronto > *:nth-child(5) { animation-delay: 0.24s; }
.mt-painel__pronto > *:nth-child(6) { animation-delay: 0.3s; }

.mt-pronto__icone {
  display: inline-grid;
  color: var(--ink);
}

.mt-pronto__texto {
  margin: -0.75rem 0 1.5rem;
  color: var(--muted);
}

.mt-pronto__acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.mt-pronto__sub {
  margin: 2.75rem 0 1rem;
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--ink);
}

.mt-extras {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mt-extra {
  display: grid;
  gap: 0.4rem;
}

.mt-extra img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 12px;
  background: #f3f1ed;
}

.mt-extra__nome {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1.3;
}

.mt-extra__linha {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: var(--fs-sm);
}

.mt-extra__add {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.3s var(--ease);
}

.mt-extra__add:hover {
  border-color: var(--ink);
  transform: rotate(90deg);
}

.mt-extra__add.is-ok {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
  transform: none;
}

/* no computador, os dois lados trocam de lugar (como na referência) */
@media (min-width: 1000px) {
  .mt[data-tela="pronto"] .mt-palco {
    order: 2;
    animation: mt-vem-da-esquerda 0.8s var(--ease);
  }

  .mt[data-tela="pronto"] .mt-painel {
    order: 1;
    display: grid;
    align-items: center;
    animation: mt-vem-da-direita 0.8s var(--ease);
  }

  @keyframes mt-vem-da-esquerda {
    from {
      transform: translateX(-100%);
    }
  }

  @keyframes mt-vem-da-direita {
    from {
      transform: translateX(100%);
    }
  }
}

/* ───────── galeria de fotos reais ───────── */
.mt-galeria {
  width: min(64rem, calc(100vw - 2rem));
  max-height: calc(100svh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
}

.mt-galeria::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.mt-galeria__topo {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.mt-galeria__topo h2 {
  margin: 0;
  font-size: 1.05rem;
}

.mt-galeria__fechar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
}

.mt-galeria__fotos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  padding: 1.25rem;
}

.mt-galeria figure {
  margin: 0;
}

.mt-galeria img {
  width: 100%;
  border-radius: 12px;
}

.mt-galeria figcaption {
  margin-top: 0.4rem;
  font-size: var(--fs-sm);
  color: var(--muted);
}

/* aviso flutuante */
.mt-aviso {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 60;
  width: max-content;
  max-width: min(34rem, calc(100vw - 2rem));
  margin: 0;
  padding: 0.8rem 1.2rem;
  border-radius: 14px;
  line-height: 1.45;
  text-align: center;
  background: var(--ink);
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  opacity: 0;
  transform: translate(-50%, 1rem);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.mt-aviso.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.mt-aviso.is-erro {
  background: var(--danger);
}

.mt-aviso.is-ok {
  background: #137333;
}

/* ───────── tablet e celular: palco em cima (fixo enquanto rola), opções embaixo ───────── */
@media (max-width: 999px) {
  .mt {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .mt-palco {
    z-index: 5;
    height: clamp(19rem, 46svh, 28rem);
    padding: 0.9rem 1rem 0.75rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }

  .mt-palco__fundo {
    font-size: clamp(4rem, 22vw, 8rem);
  }

  .mt-palco__eyebrow {
    display: none;
  }

  .mt-palco__modelo {
    font-size: 1rem;
  }

  .mt-palco__legenda {
    display: none;
  }

  .mt-palco__compra {
    padding-top: 0.5rem;
  }

  .mt-palco__preco strong {
    font-size: 1.35rem;
  }

  .mt-palco__compra .mt-btn {
    min-height: 44px;
    padding: 0 1rem;
  }

  .mt-painel {
    padding: 1.25rem 1rem 2.5rem;
  }

  .mt-voltar {
    display: none;
  }

  .mt-titulo {
    margin: 0.25rem 0 1rem;
    font-size: 1.5rem;
  }

  .mt[data-tela="pronto"] .mt-palco {
    position: relative;
    top: 0;
  }
}

@media (max-width: 420px) {
  .mt-palco__compra .mt-btn {
    font-size: var(--fs-sm);
  }

  .mt-grade {
    grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr));
  }

  .mt-grade--pecas {
    grid-template-columns: repeat(auto-fill, minmax(6.25rem, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .mt *,
  .mt *::before,
  .mt *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* depois de adicionar, o palco só mostra o terço e o valor (evita adicionar duas vezes) */
.mt[data-tela="pronto"] .mt-palco [data-mt-add] {
  display: none;
}

/* vários nomes */
.mt-nome__linha + .mt-nome__linha {
  margin-top: 0.9rem;
}

.mt-nome__label span {
  font-weight: 400;
  color: var(--muted);
}

.mt-nome__campo {
  display: flex;
  gap: 0.5rem;
}

.mt-nome__campo .mt-nome__input {
  flex: 1;
  min-width: 0;
}

.mt-nome__tirar {
  display: grid;
  place-items: center;
  flex: 0 0 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.mt-nome__tirar:hover {
  border-color: var(--ink);
}

.mt-nome__mais {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  margin: 0.9rem 0 0.25rem;
  padding: 0 1rem;
  border: 1px dashed rgba(0, 0, 0, 0.35);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.mt-nome__mais:hover {
  border-style: solid;
  border-color: var(--ink);
}

.mt-nome__nao {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  margin: 0 0 0.9rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-align: left;
  cursor: pointer;
}

.mt-nome__nao.is-ativa {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.mt-nome__conta {
  margin-top: 0.75rem;
}

/* pergunta ao voltar: continuar o terço ou começar um novo */
.mt-retomar {
  width: min(30rem, calc(100vw - 2rem));
  padding: clamp(1.5rem, 4vw, 2rem);
  border: 0;
  border-radius: 18px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

.mt-retomar[open] {
  animation: mt-subir 0.4s var(--ease);
}

.mt-retomar::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.mt-retomar h2 {
  margin: 0 0 0.6rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.mt-retomar p {
  margin: 0 0 0.9rem;
  line-height: 1.55;
  color: var(--muted);
}

.mt-retomar__resumo {
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: #f3f0ea;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--ink) !important;
}

.mt-retomar__acoes {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

/* ícone da corda: as voltas do meio cobrem as alças (cor do fundo do botão) */
.mt-icone-volta {
  fill: var(--white);
}

.mt-etapa.is-ativa .mt-icone-volta {
  fill: var(--ink);
}

.mt-etapa__icone svg {
  overflow: visible;
}

/* O palco encosta no rodapé (sem a faixa branca entre os dois) */
.page-montador .site-footer {
  margin-top: 0;
}

/* Topo na largura toda: o logo começa na mesma linha dos textos do palco
   e os ícones terminam na mesma margem do painel */
.page-montador .site-header .header-inner {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-left: clamp(1.5rem, 3vw, 2.75rem);
  padding-right: clamp(1.25rem, 4vw, 4rem);
}

@media (max-width: 999px) {
  .page-montador .site-header .header-inner {
    padding-inline: 1rem;
  }
}

/* O ícone do carrinho (não a área de toque) termina na mesma linha do "Ver foto real" */
@media (min-width: 1000px) {
  .page-montador .site-header .cart-drawer-btn {
    margin-right: -12px;
  }
}

/* ───────── foto real das cordas ───────── */
/* bolinha discreta nas cores que têm foto real */
.mt-op[data-tem-foto] .mt-op__visual::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: 2px;
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid var(--white);
  border-radius: 50%;
  background: var(--ink)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6'%3E%3Crect x='3' y='6' width='18' height='13' rx='2'/%3E%3Ccircle cx='12' cy='12.5' r='3'/%3E%3C/svg%3E")
    center / 62% no-repeat;
}

/* prévia ao passar o mouse (só em telas com mouse) */
.mt-corda-pop {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .mt-corda-pop {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 0.6rem);
    z-index: 20;
    display: grid;
    width: 11rem;
    padding: 0.4rem 0.4rem 0.5rem;
    border-radius: 14px;
    background: var(--white);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(-50%, 6px) scale(0.96);
    transform-origin: 50% 100%;
    transition: opacity 0.2s var(--ease), transform 0.25s var(--ease), visibility 0s linear 0.2s;
  }

  /* setinha */
  .mt-corda-pop::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 100%;
    border: 7px solid transparent;
    border-top-color: var(--white);
    transform: translateX(-50%);
  }

  .mt-corda-pop img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    object-fit: cover;
    background: #dbdad7;
  }

  .mt-corda-pop span {
    margin-top: 0.35rem;
    font-size: var(--fs-2xs, 0.7rem);
    font-weight: var(--fw-semibold);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
  }

  /* desfaz o zoom da amostra dentro da prévia */
  .mt-op:hover .mt-corda-pop,
  .mt-op:focus-visible .mt-corda-pop {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0) scale(calc(1 / 1.12));
    transition-delay: 0.12s, 0.12s, 0s;
  }
}

/* foto da corda em tamanho grande (celular: segundo toque na cor escolhida) */
.mt-galeria--uma {
  width: min(34rem, calc(100vw - 2rem));
}

.mt-galeria--uma .mt-galeria__fotos {
  grid-template-columns: 1fr;
}

.mt-galeria--uma img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #dbdad7;
}

/* dica só no celular (no computador a foto aparece ao passar o mouse) */
.mt-dica-foto {
  display: none;
}

@media (hover: none) {
  .mt-dica-foto {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: -0.25rem 0 0.75rem;
    font-size: var(--fs-xs);
    line-height: 1.35;
    color: var(--muted);
  }

  .mt-dica-foto i {
    flex: none;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    background: var(--ink)
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6'%3E%3Crect x='3' y='6' width='18' height='13' rx='2'/%3E%3Ccircle cx='12' cy='12.5' r='3'/%3E%3C/svg%3E")
      center / 62% no-repeat;
  }
}

/* "Ver foto real" das cordas: uma foto por cor, em grade menor */
.mt-galeria--cordas .mt-galeria__fotos {
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.9rem 0.75rem;
}

.mt-galeria--cordas img {
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #dbdad7;
}

.mt-galeria--cordas figcaption {
  font-weight: var(--fw-semibold);
  color: var(--ink);
  text-align: center;
}

/* cordas estampadas: a bolinha mostra um recorte da foto real (a trama da estampa) */
.mt-corda-amostra--estampa {
  background-color: var(--c);
  background-position: 50% 52%;
  background-size: 620%;
  background-repeat: no-repeat;
}

.mt-subtitulo {
  margin: 1.4rem 0 0.4rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* cruz: as cores ficam no topo, antes dos modelos */
.mt-cores--topo {
  margin: 0 0 1rem;
  padding: 0 0 1rem;
  border-top: 0;
  border-bottom: 1px solid var(--line);
  animation: none;
}

.mt-cores--topo .mt-chips {
  margin-bottom: 0;
}

/* aviso no canto superior direito do palco, alinhado à borda direita do botão "Adicionar ao carrinho" */
.mt-palco__aviso {
  position: absolute;
  top: 0;
  right: 0;
  margin: 0;
  font-size: var(--fs-xs, 0.78rem);
  font-weight: var(--fw-medium, 500);
  text-align: right;
  color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 999px) {
  .mt-palco__aviso {
    top: 0.2rem;
    font-size: 0.7rem;
    white-space: nowrap;
  }
}

/* medalhas: dá para marcar mais de uma */
.mt-medalhas__ajuda {
  margin: -0.35rem 0 0.75rem;
  font-size: var(--fs-xs);
  color: var(--muted);
}

.mt-op__marca {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 1.3rem;
  height: 1.3rem;
  border: 1.5px solid rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  background: var(--white);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.mt-op--marca.is-ativa .mt-op__marca {
  border-color: var(--ink);
  background: var(--ink)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 72% no-repeat;
}

/* card da medalha + botão "ver frente e verso" no canto (o ✓ fica no outro canto) */
.mt-medalha {
  position: relative;
  display: flex;
  min-width: 0;
}

.mt-medalha > .mt-op {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.mt-medalha__ver {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white, #fff);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

/* área de toque maior que o círculo no celular */
.mt-medalha__ver::before {
  content: "";
  position: absolute;
  inset: -0.45rem;
}

.mt-medalha__ver:hover {
  border-color: var(--ink);
  transform: scale(1.06);
}

.mt-medalha__ver:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* já tem o máximo: as outras ficam apagadas (o clique avisa) */
.mt-op--marca.is-cheia {
  opacity: 0.45;
}

.mt-medalhas__conta {
  margin: 0.9rem 0 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

/* "Ver foto real" das cordas: mini zoom na foto ao passar o mouse */
.mt-galeria--cordas figure {
  border-radius: 12px;
}

.mt-galeria--cordas figure > img {
  display: block;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .mt-galeria--cordas figure:hover > img {
    transform: scale(1.04);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  }

  .mt-galeria--cordas figure:hover figcaption {
    color: var(--ink);
  }
}

/* amostra de continha com foto real: três contas, a do meio um pouco acima (como no desenho antigo) */
.mt-contas-foto {
  position: relative;
  display: block;
  width: 64px;
  height: 48px;
}

.mt-contas-foto i {
  position: absolute;
  top: 18px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background-size: 160%;
  background-position: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

/* volume: luz no alto à esquerda, sombra na borda de baixo */
.mt-contas-foto i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.55) 0, rgba(255, 255, 255, 0.12) 18%, rgba(255, 255, 255, 0) 34%),
    radial-gradient(circle at 45% 40%, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.42) 100%);
}

.mt-contas-foto i:nth-child(1) { left: 5px; }
.mt-contas-foto i:nth-child(2) { left: 21px; top: 10px; z-index: 1; }
.mt-contas-foto i:nth-child(3) { left: 37px; }

/* contas recortadas de foto de terço: já têm volume e brilho; só o contorno escurece de leve, como no palco */
.mt-contas-foto--real i::after {
  background: radial-gradient(circle, rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0.22) 71%);
}

/* Lupa sobre o terço (montador.js, ligarLupa) */
.mt-lupa {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  width: clamp(150px, 15vw, 230px);
  height: clamp(150px, 15vw, 230px);
  border-radius: 50%;
  background: var(--palco, #f3f0eb);
  box-shadow: 0 0 0 3px #111, 0 14px 34px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.15s ease, transform 0.2s var(--ease, ease);
}

.mt-lupa.is-on {
  opacity: 1;
  transform: scale(1);
}

.mt-palco__tela:hover,
.mt-palco__tela.is-lupa {
  cursor: crosshair;
}

/* com a lupa ligada no toque, arrastar move a lupa em vez de rolar a página */
.mt-palco__tela.is-lupa {
  touch-action: none;
}

.mt-lupa-btn {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line, rgba(0, 0, 0, 0.12));
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink, #111);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.mt-lupa-btn:hover {
  border-color: var(--ink, #111);
}

.mt-lupa-btn[aria-pressed="true"] {
  background: var(--ink, #111);
  border-color: var(--ink, #111);
  color: #fff;
}

.mt-lupa-dica {
  position: absolute;
  right: 52px;
  bottom: 6px;
  /* abaixo da lupa: o texto não fica por cima do que está sendo ampliado */
  z-index: 2;
  max-width: 15rem;
  margin: 0;
  font-size: var(--fs-xs, 0.78rem);
  line-height: 1.3;
  text-align: right;
  color: rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.mt-lupa-dica:empty {
  display: none;
}

@media (max-width: 999px) {
  .mt-lupa {
    width: 160px;
    height: 160px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mt-lupa {
    transition: none;
  }
}

/* Contato antes de montar (personalizar.html, montador.js pedirContato) */
.mt-entrada {
  position: fixed;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
}

.mt-entrada__form {
  position: relative;
  display: grid;
  gap: 0.85rem;
}

.mt-entrada__form h2 {
  padding-right: 2.5rem;
}

.mt-entrada__form > p {
  margin: 0;
}

.mt-entrada__fechar {
  position: absolute;
  top: -0.4rem;
  right: -0.4rem;
}

.mt-entrada__campo {
  display: grid;
  gap: 0.35rem;
}

.mt-entrada__campo > span {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--ink);
}

.mt-entrada__campo em {
  margin-left: 0.25rem;
  font-style: normal;
  font-weight: var(--fw-medium, 500);
  font-size: var(--fs-xs, 0.78rem);
  color: var(--muted);
}

.mt-entrada__campo input {
  width: 100%;
  min-height: 48px;
  padding: 0 0.95rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mt-entrada__campo input:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.mt-entrada__campo input[aria-invalid="true"] {
  border-color: #b3261e;
}

.mt-entrada__erro {
  min-height: 0;
  font-size: var(--fs-xs, 0.78rem);
  color: #b3261e;
}

.mt-entrada__erro:empty {
  display: none;
}

.mt-entrada__check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--ink);
  cursor: pointer;
}

.mt-entrada__check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0.1rem 0 0;
  accent-color: var(--ink);
}

.mt-entrada__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mt-retomar p.mt-entrada__lgpd {
  font-size: var(--fs-xs, 0.78rem);
  line-height: 1.5;
}

.mt-entrada__lgpd a {
  color: var(--ink);
  text-decoration: underline;
}

.mt-retomar p.mt-entrada__msg {
  color: #b3261e;
  font-size: var(--fs-sm);
}

.mt-entrada__msg:empty {
  display: none;
}

.mt-entrada .mt-retomar__acoes {
  margin-top: 0.35rem;
}

/* selo da cruz original (Slim): já vem no terço, sem custo extra */
.mt-op__selo {
  margin-top: 0.15rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: var(--ink, #111);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ───────── visor da cruz (zoom, girar, verso) ───────── */
.mt-op__lupa {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--white, #fff);
  color: var(--ink, #111);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.mt-visor {
  width: min(44rem, calc(100vw - 2rem));
  overflow: hidden;
}

.mt-visor__palco {
  position: relative;
  height: min(62svh, 34rem);
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #ffffff 0%, #ecebe8 75%);
  cursor: zoom-in;
  touch-action: none;
  perspective: 1400px;
  user-select: none;
}

.mt-visor__palco.is-zoom {
  cursor: grab;
}

.mt-visor__palco.is-zoom:active {
  cursor: grabbing;
}

.mt-visor__mover,
.mt-visor__giro {
  position: absolute;
  inset: 0;
}

.mt-visor__mover {
  transition: transform 0.12s ease-out;
}

.mt-visor__giro {
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.2, 1);
}

.mt-visor .mt-visor__face {
  position: absolute;
  inset: 6%;
  width: 88%;
  height: 88%;
  object-fit: contain;
  border-radius: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
  pointer-events: none;
}

.mt-visor .mt-visor__face--verso {
  transform: rotateY(180deg);
}

.mt-visor .mt-visor__face[hidden] {
  display: none;
}

/* medalha: cores do modelo logo abaixo do palco */
.mt-visor__cores {
  justify-content: center;
  margin: 0;
  padding: 0.75rem 1rem 0;
  border-top: 1px solid var(--line);
}

.mt-visor__cores[hidden] {
  display: none;
}

.mt-visor__cores .mt-chip--cor i {
  border-radius: 50%;
}

.mt-visor__barra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem 1rem;
  padding: 0.9rem 1rem 0.4rem;
  border-top: 1px solid var(--line);
}

.mt-visor__grupo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mt-visor__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 44px;
  height: 44px;
  padding: 0 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white, #fff);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.mt-visor__btn--texto {
  padding: 0 1rem;
}

.mt-visor__btn[hidden] {
  display: none;
}

.mt-visor__btn:hover:not(:disabled) {
  border-color: var(--ink);
}

.mt-visor__btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.mt-visor__btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.mt-visor__zoom {
  min-width: 3.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.mt-visor__dica {
  margin: 0;
  padding: 0.2rem 1rem 1rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .mt-visor__mover,
  .mt-visor__giro {
    transition: none;
  }
}

/* argola do chaveiro: anel na cor do metal */
.mt-argola-amostra {
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 50%;
  background: transparent;
  box-shadow: inset 0 0 0 0.42rem var(--c), inset 0 0 0 calc(0.42rem + 1px) rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* celular digitando (nomes): o palco sai do topo fixo e rola com a página, para o campo ficar acima do teclado */
@media (max-width: 999px) {
  .mt.is-digitando .mt-palco {
    position: relative;
    top: 0;
  }

  .mt-opcoes input,
  .mt-opcoes textarea {
    scroll-margin-top: calc(var(--mt-topo) + 1rem);
    scroll-margin-bottom: 1rem;
  }
}

/* aviso de modelo cujo desenho muda com a cor (montador.json → nota_cor) */
.mt-op__nota,
.mt-cores__nota,
.mt-visor__nota {
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--muted, #6b6b6b);
}

.mt-op__nota {
  display: block;
  margin-top: 0.1rem;
}

.mt-visor__nota {
  flex-basis: 100%;
  margin: 0.25rem 0 0;
  text-align: center;
}

/* página do relicário: o palco é só a foto da peça */
.mt--relicario .mt-palco {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
}

/* carrossel: fechado (frente), aberto e fechado (verso), no fundo do palco */
.rl-carrossel {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.rl-carrossel__trilho {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.rl-carrossel__trilho::-webkit-scrollbar {
  display: none;
}

.rl-carrossel__trilho:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}

.rl-carrossel__slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  place-items: center;
  gap: 1rem;
  margin: 0;
  padding: 2.5rem 3.5rem 3.25rem;
  scroll-snap-align: center;
}

.rl-carrossel__slide img {
  width: min(100%, 28rem);
  height: min(100%, 32rem);
  object-fit: contain;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.16));
  user-select: none;
}

/* aberto é mais largo que alto: ganha a largura do palco */
.rl-carrossel__slide.is-largo img {
  width: min(100%, 40rem);
}

.rl-carrossel__slide figcaption {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted, #6f6a63);
}

.rl-carrossel__seta {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white, #fff);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-50%);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rl-carrossel__seta:hover {
  border-color: var(--ink);
  transform: translateY(-50%) scale(1.06);
}

.rl-carrossel__seta:focus-visible,
.rl-carrossel__ponto:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.rl-carrossel__seta--ant {
  left: 0.25rem;
}

.rl-carrossel__seta--prox {
  right: 0.25rem;
}

.rl-carrossel__pontos {
  position: absolute;
  left: 50%;
  bottom: 0.75rem;
  display: flex;
  gap: 0.5rem;
  transform: translateX(-50%);
}

.rl-carrossel__ponto {
  position: relative;
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: width 0.25s ease, background-color 0.25s ease;
}

/* área de toque maior que o ponto */
.rl-carrossel__ponto::before {
  content: "";
  position: absolute;
  inset: -0.6rem -0.3rem;
}

.rl-carrossel__ponto.is-ativo {
  width: 1.5rem;
  background: var(--ink);
}

.rl-carrossel.is-unico .rl-carrossel__seta {
  display: none;
}

.mt--relicario .mt-relicario__add {
  width: 100%;
  margin-top: 1.25rem;
}

@media (max-width: 999px) {
  .rl-carrossel__slide {
    gap: 0.5rem;
    padding: 0.5rem 2.75rem 1.75rem;
  }

  .rl-carrossel__slide figcaption {
    font-size: 0.66rem;
  }

  .rl-carrossel__seta {
    width: 2.25rem;
    height: 2.25rem;
  }

  .rl-carrossel__seta--ant {
    left: 0;
  }

  .rl-carrossel__seta--prox {
    right: 0;
  }

  .rl-carrossel__pontos {
    bottom: 0.1rem;
  }
}
