/* ==========================================================
   Página da moldura — "Coloque o 10100 na sua foto"
   (usa as variáveis de cor de main.css)
   ========================================================== */
.mo-stage { padding-bottom: 48px; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Cabeçalho ---------- */
.mo-hero {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(40px, 7vh, 72px) 16px 28px;
  text-align: center;
}
.mo-logo {
  display: block;
  width: fit-content;
  margin: 0 auto 18px;
  border-radius: 12px;
  transition: transform .25s;
}
.mo-logo img {
  display: block;
  width: clamp(200px, 26vw, 300px);
  height: auto;
  filter: drop-shadow(0 14px 24px rgba(0,0,0,.45));
}
.mo-logo:hover, .mo-logo:focus-visible { transform: translateY(-3px) scale(1.03); }
.mo-logo:focus-visible { outline: 3px solid var(--yellow); outline-offset: 6px; }
.mo-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 18px;
  padding: 7px 14px;
  font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue-900);
  background: var(--yellow);
  border-radius: 999px;
  box-shadow: 0 10px 24px -10px rgba(245,194,0,.8);
}
.mo-title {
  margin: 0 0 16px;
  font-size: clamp(2.1rem, 5.6vw, 4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.02em;
  text-shadow: 0 6px 30px rgba(0,0,0,.25);
}
.mo-title mark {
  padding: 0 .18em;
  color: var(--blue-900);
  background: linear-gradient(transparent 8%, var(--yellow) 8%, var(--yellow) 92%, transparent 92%);
  border-radius: .12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.mo-lead { max-width: 640px; margin: 0 auto 22px; font-size: clamp(1rem, 1.4vw, 1.1rem); opacity: .95; }
.mo-lead strong { color: var(--yellow-300); }

.mo-steps {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px;
  margin: 0; padding: 0; list-style: none;
  font-size: .9rem; font-weight: 700;
}
.mo-steps li { display: inline-flex; align-items: center; gap: 8px; }
.mo-steps b {
  width: 26px; height: 26px; display: grid; place-items: center;
  font-size: .8rem; color: var(--blue-900); background: #fff; border-radius: 50%;
}

/* ---------- Cartão ---------- */
.mo-card {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 48px);
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(18px, 3vw, 36px);
  color: var(--ink);
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 40px 100px -30px rgba(0,0,0,.6);
}

/* editor */
.mo-editor { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.mo-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 540px;
  aspect-ratio: 1;
  border-radius: 20px;
  overflow: hidden;
  background:
    repeating-conic-gradient(#eef3f8 0 25%, #f8fafc 0 50%) 50% / 28px 28px;
  box-shadow: inset 0 0 0 1px #dbe6ef;
  touch-action: none;
  user-select: none;
  cursor: grab;
}
.mo-canvas-wrap.is-dragging { cursor: grabbing; }
.mo-canvas-wrap.is-over { box-shadow: inset 0 0 0 4px var(--yellow); }
#mo-canvas { display: block; width: 100%; height: 100%; }
.mo-empty {
  position: absolute;
  left: 50%; top: 42%;
  transform: translate(-50%, -50%);
  width: 62%;
  aspect-ratio: 1.25;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 16px;
  font: inherit;
  color: var(--blue-800);
  background: rgba(255,255,255,.88);
  border: 2px dashed #9fb6c9;
  border-radius: 18px;
  cursor: pointer;
  transition: border-color .2s, transform .2s, background .2s;
}
.mo-empty:hover, .mo-empty:focus-visible { border-color: var(--blue-700); background: #fff; transform: translate(-50%, -50%) scale(1.02); }
.mo-empty svg { width: 42px; height: 42px; color: var(--blue-700); }
.mo-empty b { font-size: 1.05rem; }
.mo-empty span { font-size: .82rem; color: var(--muted); }
.mo-canvas-wrap.has-photo .mo-empty { display: none; }
.mo-hint {
  display: flex; align-items: center; gap: 8px; margin: 0;
  font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.mo-hint svg { width: 16px; height: 16px; }

/* painel */
.mo-panel { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.mo-brand { display: flex; align-items: center; gap: 14px; }
.mo-brand img { width: 96px; height: auto; flex: none; }
.mo-brand b { display: block; font-size: 1.15rem; font-weight: 900; color: var(--blue-700); line-height: 1.2; }
.mo-brand span { font-size: .85rem; color: var(--muted); }

.mo-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.mo-models legend { grid-column: 1 / -1; }
.mo-models legend { margin-bottom: 8px; padding: 0; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mo-model { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.mo-model input { position: absolute; opacity: 0; pointer-events: none; }
.mo-model__thumb {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  background: #eef3f8;
  box-shadow: 0 0 0 2px #dbe6ef;
  transition: box-shadow .2s, transform .2s;
}
.mo-model span { font-size: .78rem; font-weight: 700; line-height: 1.2; text-align: center; color: var(--muted); }
.mo-model:hover .mo-model__thumb { transform: translateY(-2px); }
.mo-model input:checked + .mo-model__thumb { box-shadow: 0 0 0 3px var(--yellow), 0 10px 20px -10px rgba(5,90,140,.6); }
.mo-model input:checked ~ span { color: var(--blue-700); }
.mo-model input:focus-visible + .mo-model__thumb { box-shadow: 0 0 0 3px var(--blue-700); }

/* botões */
.mo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 12px 20px;
  font: inherit;
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, opacity .2s;
}
.mo-btn svg { width: 20px; height: 20px; flex: none; }
.mo-btn:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; transform: none; }
.mo-btn--primary { color: #fff; background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); box-shadow: 0 14px 30px -12px rgba(5,90,140,.8); }
.mo-btn--primary:not(:disabled):hover { transform: translateY(-2px); }
.mo-btn--ghost { min-height: 44px; font-size: .78rem; color: var(--blue-700); background: #f1f6fa; box-shadow: inset 0 0 0 1px #dbe6ef; }
.mo-btn--ghost:not(:disabled):hover { background: #e3eef7; }
.mo-btn--download { color: var(--blue-900); background: linear-gradient(135deg, var(--yellow-300), var(--yellow)); box-shadow: 0 14px 30px -12px rgba(245,194,0,.9); }
.mo-btn--download:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(245,194,0,1); }
.mo-btn--download:not(:disabled) { animation: mo-pulse 2.4s ease-in-out infinite; }
@keyframes mo-pulse { 50% { box-shadow: 0 14px 30px -12px rgba(245,194,0,.9), 0 0 0 8px rgba(245,194,0,.18); } }
.mo-btn--wa { color: #fff; background: #1faa53; }
.mo-btn--wa:hover { background: #17924a; }

.mo-tools { display: flex; flex-direction: column; gap: 10px; }
.mo-zoom { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.mo-zoom svg { width: 20px; height: 20px; flex: none; }
.mo-zoom input { flex: 1; accent-color: var(--blue-700); }
.mo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* compartilhar */
.mo-share { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding-top: 4px; }
.mo-share > span { margin-right: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.mo-share a, .mo-share button {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 0; border-radius: 12px;
  color: #fff; cursor: pointer;
  transition: transform .2s;
}
.mo-share a:hover, .mo-share button:hover { transform: translateY(-3px); }
.mo-share svg { width: 20px; height: 20px; fill: currentColor; }
.mo-share button svg { fill: none; }
.mo-share__wa { background: #1faa53; }
.mo-share__fb { background: #1877f2; }
.mo-share__x { background: #111; }
.mo-share__copy { background: var(--yellow); color: var(--blue-900) !important; }
.mo-share__copy.is-copied { background: var(--green-500); color: #fff !important; }

.mo-count { display: flex; align-items: center; gap: 12px; margin: 0; padding-top: 14px; border-top: 1px solid #e6edf3; font-size: .92rem; color: #2b3f50; }
.mo-count[hidden] { display: none; }
.mo-count b { color: var(--blue-700); font-weight: 900; }
.mo-count__avatars { display: flex; flex: none; }
.mo-count__avatars i {
  width: 32px; height: 32px; margin-left: -8px;
  display: grid; place-items: center;
  font-style: normal; font-size: .7rem; font-weight: 900;
  color: #fff; background: var(--blue-700);
  border: 2px solid #fff; border-radius: 50%;
}
.mo-count__avatars i:first-child { margin-left: 0; }
.mo-count__avatars i:nth-child(2) { background: var(--green-500); }
.mo-count__avatars i:nth-child(3) { background: var(--yellow); color: var(--blue-900); }

.mo-back { position: relative; z-index: 2; margin: 26px 0 0; text-align: center; }
.mo-back a { font-weight: 700; color: #fff; text-decoration: none; opacity: .9; }
.mo-back a:hover { text-decoration: underline; opacity: 1; }

/* ---------- Diálogo de cadastro ---------- */
.mo-dialog {
  width: min(460px, calc(100% - 24px));
  max-height: calc(100svh - 24px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 40px 120px rgba(0,0,0,.6);
}
.mo-dialog::backdrop { background: rgba(2,20,36,.72); backdrop-filter: blur(6px); }
.mo-dialog[open] { animation: cm-modal-in .4s cubic-bezier(.2,.9,.3,1.1); }
.mo-form { position: relative; padding: 28px 26px 24px; }
.mo-dialog__close {
  position: absolute; top: 12px; right: 12px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  color: var(--muted); background: #f1f6fa; cursor: pointer;
}
.mo-dialog__close:hover { color: var(--blue-900); background: var(--yellow); }
.mo-dialog__close svg { width: 16px; height: 16px; }
.mo-form__step { display: flex; flex-direction: column; gap: 14px; }
.mo-form__step[hidden] { display: none; }
.mo-form__preview {
  width: 112px; height: 112px;
  margin: 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--yellow), 0 16px 30px -12px rgba(0,0,0,.5);
}
.mo-form h2 { margin: 0; text-align: center; font-size: 1.6rem; font-weight: 900; color: var(--blue-700); }
.mo-form__lead { margin: -6px 0 0; text-align: center; color: var(--muted); }
.mo-field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 700; color: #2b3f50; }
.mo-field input {
  min-height: 50px;
  padding: 10px 14px;
  font: inherit; font-size: 1rem; font-weight: 500;
  color: var(--ink);
  border: 1.5px solid #cfd8e1;
  border-radius: 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.mo-field input:focus { border-color: var(--blue-700); box-shadow: 0 0 0 4px rgba(5,90,140,.15); }
.mo-field input[aria-invalid="true"] { border-color: #d63638; }
.mo-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.mo-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  font-size: .82rem; line-height: 1.45; color: #2b3f50;
  background: #f4f8fb;
  border: 1.5px solid #dbe6ef;
  border-radius: 12px;
  cursor: pointer;
}
.mo-check.is-invalid { border-color: #d63638; background: #fdf0f0; }
.mo-check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--blue-700); }
.mo-form__error { margin: 0; padding: 10px 12px; font-size: .88rem; font-weight: 600; color: #8a1f11; background: #fdf0f0; border-radius: 10px; }
.mo-form__note { margin: 0; text-align: center; font-size: .78rem; color: var(--muted); }
.mo-btn.is-loading { pointer-events: none; opacity: .7; position: relative; }
.mo-btn.is-loading::after {
  content: "";
  width: 18px; height: 18px;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: cm-spin .7s linear infinite;
}
.mo-done__img {
  display: block;
  width: min(300px, 100%);
  height: auto;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: 0 16px 34px -14px rgba(0,0,0,.55);
  -webkit-touch-callout: default; /* permite "tocar e segurar > Salvar imagem" no iPhone */
  user-select: auto;
}
.mo-done__tip { margin: -4px 0 0; text-align: center; font-size: .8rem; line-height: 1.45; color: var(--muted); }
.mo-inapp {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px 16px;
  font-size: .9rem;
  line-height: 1.45;
  color: var(--blue-900);
  background: var(--yellow-300);
  border-radius: 14px;
  box-shadow: 0 10px 24px -14px rgba(0,0,0,.6);
}
.mo-inapp[hidden] { display: none; }
.mo-done__icon {
  width: 72px; height: 72px; margin: 4px auto 0;
  display: grid; place-items: center;
  font-size: 2.2rem; font-weight: 900; color: #fff;
  background: var(--green-500); border-radius: 50%;
  box-shadow: 0 0 0 8px rgba(15,138,67,.18);
  animation: cm-pop .6s cubic-bezier(.3,1.5,.5,1) both;
}

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .mo-card { grid-template-columns: 1fr; }
  .mo-canvas-wrap { max-width: 520px; }
}
@media (max-width: 560px) {
  .mo-hero { padding-top: 32px; }
  .mo-steps { font-size: .82rem; gap: 8px 14px; }
  .mo-card { width: calc(100% - 20px); padding: 14px; border-radius: 22px; }
  .mo-canvas-wrap { border-radius: 14px; }
  .mo-empty { width: 76%; }
  .mo-brand img { width: 78px; }
  .mo-share { justify-content: center; }
  .mo-share > span { width: 100%; text-align: center; margin: 0; }
  .mo-count { font-size: .85rem; }
  .mo-dialog { width: 100%; max-height: 100svh; margin-bottom: 0; border-radius: 22px 22px 0 0; }
  .mo-form { padding: 24px 18px 20px; }
}
