/* Tapar datos en foto — papel cuadriculado tkaed + patrón de sobre de seguridad + cinta ámbar */

:root {
  --paper: #f2f6f3;
  --card: #ffffff;
  --ink: #112a3a;
  --pencil: #4d626e;
  --line: rgba(17, 42, 58, 0.14);
  --amber: #f2b632;
  --amber-soft: rgba(242, 182, 50, 0.32);
  --yes: #1d6f55;
  --no: #a8324a;
  --env: #16314a;
  --serif: "Young Serif", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --envelope: repeating-linear-gradient(45deg, rgba(255,255,255,.13) 0 2px, transparent 2px 7px),
              repeating-linear-gradient(-45deg, rgba(255,255,255,.09) 0 2px, transparent 2px 7px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); font-size: 1rem; line-height: 1.6; color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
h1, h2 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
h2 { font-size: 1.5rem; }
p { margin: 0 0 1em; }
[hidden] { display: none !important; }
main, .top, .foot { width: min(1080px, 100% - 2rem); margin-inline: auto; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.8rem 0; }
.brand { font-family: var(--serif); font-size: 1.1rem; text-decoration: none; }
.top nav { display: flex; gap: 1.25rem; font-size: 0.95rem; }
.top nav a { text-decoration: none; border-bottom: 2px solid transparent; }
.top nav a:hover { border-bottom-color: var(--amber); }

.intro { padding: 0.3rem 0 0.9rem; max-width: 46rem; }
.intro h1 { font-size: clamp(1.7rem, 6vw, 3rem); margin-bottom: 0.4rem; }
.lede { font-size: 1.02rem; color: var(--pencil); margin: 0; }

/* Herramienta */
.tool {
  background: var(--card); border: 2px solid var(--ink); border-radius: 6px;
  box-shadow: 7px 7px 0 var(--amber); margin-bottom: 1.5rem;
}
.pledge {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem;
  background-color: var(--env); background-image: var(--envelope); color: #fff;
  padding: 0.55rem 0.9rem; font-size: 0.9rem; font-weight: 500; border-radius: 3px 3px 0 0;
}
.pledge b { display: inline-flex; align-items: center; gap: 0.4rem; }
.pledge svg { flex: none; }

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem;
  width: calc(100% - 1.8rem); min-height: 150px; margin: 0.9rem; padding: 1rem;
  font: inherit; color: var(--ink); text-align: center; cursor: pointer;
  background: var(--paper); border: 2px dashed var(--ink); border-radius: 6px;
}
.drop:hover, .drop.over { background: var(--amber-soft); border-style: solid; }
.drop-big { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; }
.drop-small { font-size: 0.85rem; color: var(--pencil); }
.msg { margin: 0 0.9rem 0.9rem; font-weight: 500; }
.msg:empty { display: none; }
.msg.err { color: var(--no); }
.msg.ok { color: var(--yes); }

.caution {
  margin: 0; padding: 0.5rem 0.9rem; font-size: 0.92rem; font-weight: 500;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, #f6c95e 10px 20px);
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.caution span { background: var(--amber); padding: 0 0.25rem; }

.editor { display: grid; }
@media (min-width: 900px) {
  .editor { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
  .panel { border-left: 2px solid var(--ink); }
}

.stage-wrap { position: relative; display: flex; flex-direction: column; }
.stage {
  position: relative; height: min(58vh, 560px); min-height: 300px; overflow: hidden;
  background: #dde5e2; touch-action: none; cursor: crosshair;
  background-image: linear-gradient(45deg, #d3dcd9 25%, transparent 25%, transparent 75%, #d3dcd9 75%),
                    linear-gradient(45deg, #d3dcd9 25%, transparent 25%, transparent 75%, #d3dcd9 75%);
  background-size: 20px 20px; background-position: 0 0, 10px 10px;
}
@media (max-width: 899px) {
  .stage { height: calc(100vh - 150px); height: calc(100svh - 150px); max-height: 600px; min-height: 260px; }
}
.stage.pan { cursor: grab; }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage:focus-visible { outline-offset: -4px; }
.zoom { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 6px; }
.zoom button {
  width: 42px; height: 42px; font: inherit; font-size: 1.3rem; font-weight: 700; line-height: 1;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; cursor: pointer;
}
.zoom button:hover { background: var(--amber-soft); }
.stage-hint {
  position: absolute; left: 8px; bottom: 8px; right: 60px; margin: 0; pointer-events: none;
  font-size: 0.82rem; font-weight: 500; background: rgba(255,255,255,.92); padding: 0.25rem 0.5rem; border-radius: 4px;
  width: fit-content;
}

.stamp { position: absolute; pointer-events: none; animation: stamp 0.26s cubic-bezier(.2,.9,.3,1.25) both; border: 3px solid var(--ink); }
.stamp.solid { background: #000; }
.stamp.env { background-color: var(--env); background-image: var(--envelope); }
.stamp.pix, .stamp.blur { background: rgba(17,42,58,.25); }
@keyframes stamp {
  0% { transform: scale(1.35) rotate(-3deg); opacity: 0; }
  60% { transform: scale(0.96) rotate(0.5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 0; }
}

/* Barra al alcance del pulgar */
.bar {
  position: sticky; bottom: 0; z-index: 5;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; padding: 6px;
  background: var(--ink); border-top: 2px solid var(--ink);
}
.bar button {
  min-height: 52px; padding: 4px 2px; font: inherit; font-size: 0.72rem; font-weight: 700; line-height: 1.1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: transparent; color: #fff; border: 2px solid transparent; border-radius: 6px; cursor: pointer;
}
.bar button svg { width: 22px; height: 22px; }
.bar button:hover:not(:disabled) { border-color: rgba(255,255,255,.35); }
.bar button[aria-pressed="true"] { background: var(--amber); color: var(--ink); }
.bar button:disabled { opacity: 0.38; cursor: default; }

.panel { padding: 0.9rem; display: flex; flex-direction: column; gap: 1.1rem; }
.label { display: block; font-weight: 700; margin: 0 0 0.45rem; }
.styles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.style-btn {
  display: flex; align-items: center; gap: 0.5rem; min-height: 52px; padding: 0.35rem 0.5rem; text-align: left;
  font: inherit; font-size: 0.9rem; font-weight: 700; line-height: 1.15; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 4px; cursor: pointer;
}
.style-btn small { display: block; font-weight: 500; font-size: 0.74rem; color: var(--pencil); }
.style-btn small.weak { color: var(--no); }
.style-btn[aria-checked="true"] { background: var(--ink); color: #fff; }
.style-btn[aria-checked="true"] small { color: #d6e0e4; }
.style-btn[aria-checked="true"] small.weak { color: #ffc2cd; }
.sw { flex: none; width: 26px; height: 26px; border-radius: 3px; border: 2px solid currentColor; }
.sw.solid { background: #000; }
.sw.env { background-color: var(--env); background-image: var(--envelope); }
.sw.pix { background: conic-gradient(#7d8b93 0 25%, #c9d1d4 0 50%, #7d8b93 0 75%, #c9d1d4 0) 0 0 / 12px 12px; }
.sw.blur { background: radial-gradient(circle, #8a979e, #d9e0e2); filter: blur(1px); }
.style-note { font-size: 0.86rem; margin: 0.45rem 0 0; padding: 0.4rem 0.6rem; background: var(--amber-soft); border-left: 4px solid var(--amber); }

.wm summary { cursor: pointer; font-weight: 700; padding: 0.15rem 0; }
.wm-body { display: grid; gap: 0.6rem; margin-top: 0.6rem; }
.wm input[type="text"], .out select {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 4px; padding: 0.55rem 0.6rem;
}
.range { display: grid; grid-template-columns: 6.2rem 1fr; align-items: center; gap: 0.5rem; font-size: 0.88rem; font-weight: 500; }
.range input { width: 100%; accent-color: var(--ink); height: 28px; }
.hint { font-size: 0.86rem; color: var(--pencil); margin: 0.35rem 0 0; }

.out-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.5rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.seg button { font: inherit; font-weight: 700; min-height: 44px; border: 0; background: var(--paper); color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 2px solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.btns { display: grid; gap: 0.5rem; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; min-height: 50px;
  font: inherit; font-weight: 700; font-size: 1.02rem; text-decoration: none; cursor: pointer;
  background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; padding: 0.6rem 1rem;
}
.btn:hover { background: var(--amber-soft); }
.btn.main { background: var(--ink); color: #fff; }
.btn.main:hover { background: #0b1d29; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.btn-row.one { grid-template-columns: 1fr; }

.confirm { padding: 0.7rem; background: var(--amber); border: 2px solid var(--ink); border-radius: 4px; font-weight: 700; }
.confirm p { margin: 0 0 0.5rem; }
.confirm .btn-row .btn { min-height: 44px; font-size: 0.95rem; }

.checklist { border: 2px dashed var(--line); border-radius: 6px; padding: 0.6rem 0.8rem; }
.checklist p { margin: 0 0 0.3rem; font-weight: 700; }
.checklist ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.1rem; }
.checklist label { display: flex; align-items: center; gap: 0.5rem; min-height: 34px; cursor: pointer; font-size: 0.93rem; }
.checklist input { width: 20px; height: 20px; accent-color: var(--yes); flex: none; }
.checklist input:checked + span { text-decoration: line-through; color: var(--pencil); }

.change { font: inherit; font-size: 0.9rem; background: none; border: 0; padding: 0.3rem 0; color: var(--ink); text-decoration: underline; cursor: pointer; justify-self: start; }

/* Vista final a pantalla completa */
.viewer {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column;
  background: #0d1b25; color: #fff;
}
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.6rem 0.9rem; background-color: var(--env); background-image: var(--envelope); }
.viewer-head p { margin: 0; font-size: 0.9rem; font-weight: 500; }
.viewer-img { flex: 1; overflow: auto; display: flex; align-items: flex-start; justify-content: center; padding: 0.5rem; }
.viewer-img img { max-width: 100%; height: auto; display: block; margin: auto; cursor: zoom-in; background: #fff; }
.viewer-img.full img { max-width: none; cursor: zoom-out; }
.viewer-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0.6rem 0.9rem calc(0.6rem + env(safe-area-inset-bottom)); background: #0d1b25; border-top: 1px solid rgba(255,255,255,.2); }
.viewer-foot.one { grid-template-columns: 1fr; }
.viewer .btn { min-height: 48px; }
.viewer-close { font: inherit; font-weight: 700; background: #fff; color: var(--ink); border: 0; border-radius: 4px; padding: 0.5rem 0.9rem; cursor: pointer; min-height: 44px; }
body.noscroll { overflow: hidden; }

/* Avisos publicitarios y contenido */
.ad-slot {
  min-height: 90px; margin: 2rem 0; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line); border-radius: 4px; color: rgba(77, 98, 110, 0.55); font-size: 0.8rem;
}
.how, .seo, .faq { max-width: 46rem; margin: 3rem 0; }
.how h2, .faq h2 { margin-bottom: 1rem; }
.seo h2 { margin: 1.8rem 0 0.8rem; }
.seo h2:first-child { margin-top: 0; }
.seo p, .seo li { max-width: 42rem; }
.steps { padding-left: 1.4rem; margin: 0; }
.steps li { margin-bottom: 0.8rem; padding-left: 0.3rem; }

.sizes { margin: 2.5rem 0; }
.sizes h2 { margin-bottom: 0.8rem; }
.sizes ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.7rem; }
.sizes a {
  display: inline-block; padding: 0.5rem 0.9rem; border: 2px solid var(--ink); border-radius: 8px;
  background: #fff; color: var(--ink); text-decoration: none; font-weight: 500; box-shadow: 3px 3px 0 var(--amber);
}
.sizes a:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--amber); }
.sizes a[aria-current="page"] { background: var(--amber); box-shadow: none; }

.faq summary { cursor: pointer; font-weight: 500; }
.faq details { border-top: 1px solid var(--line); padding: 0.8rem 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq details p { margin: 0.6rem 0 0; color: var(--pencil); }

.foot { padding: 2rem 0 3rem; border-top: 2px solid var(--ink); color: var(--pencil); font-size: 0.9rem; }
.foot p { margin: 0; }
.noscript { background: var(--amber); padding: 1rem; text-align: center; margin: 0; }

@media (max-width: 420px) {
  .top nav a[href="#preguntas"] { display: none; }
  .intro h1 { font-size: 1.6rem; }
  .lede { font-size: 0.95rem; }
  .pledge { font-size: 0.82rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp { animation: none; display: none; }
  .sizes a:hover { transform: none; }
}

/* Escondido hasta que AdSense apruebe; entonces borrar esta regla y poner los bloques. */
.ad-slot { display: none !important; }
