/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f7f6f3;
  --card: #ffffff;
  --ink: #14171c;
  --ink-2: #4b525c;
  --line: #e4e1da;
  --accent: #ff5b2e;
  --accent-ink: #d93f12;
  --accent-soft: #fff0ea;
  --ok: #15803d;
  --warn: #a15c00;
  --bad: #b42318;
  --radius: 16px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 1px 2px rgba(20, 23, 28, 0.05), 0 8px 24px rgba(20, 23, 28, 0.06);
}

/* =============================================================
   2. Reset y base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select { font: inherit; color: inherit; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; line-height: 1.1; letter-spacing: -0.02em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 9999; padding: 0.6rem 1rem; background: var(--ink); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.wrap { width: min(100% - 2rem, 1180px); margin-inline: auto; }
[hidden] { display: none !important; }

/* =============================================================
   3. Cabecera
   ============================================================= */
.site-header { background: rgba(247, 246, 243, 0.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-in { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.header-nav { display: none; gap: 1.5rem; font-size: 0.95rem; }
.header-nav a { text-decoration: none; color: var(--ink-2); }
.header-nav a:hover { color: var(--ink); }

/* =============================================================
   4. Hero y herramienta
   ============================================================= */
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(1.9rem, 6vw, 3.1rem); font-weight: 800; }
.lead { margin-top: 0.6rem; color: var(--ink-2); max-width: 62ch; font-size: 1.05rem; }
.nojs { margin-top: 1rem; padding: 0.8rem 1rem; background: var(--accent-soft); border-radius: 10px; }

.tool { margin-top: 1.25rem; display: grid; gap: 0.9rem; grid-template-columns: minmax(0, 1fr); }
.panel, .preview { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; font-weight: 700; }
.num { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--sans); font-size: 0.85rem; font-weight: 700; }
.lab { display: block; margin: 0.9rem 0 0.4rem; font-size: 0.85rem; font-weight: 600; color: var(--ink-2); }
.opt { font-weight: 400; color: #77808b; }
.hint { font-size: 0.85rem; color: var(--ink-2); margin-top: 0.5rem; }
.err { margin-top: 0.5rem; font-size: 0.9rem; color: var(--bad); font-weight: 500; }

.field { width: 100%; padding: 0.8rem 0.9rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 1rem; transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out); }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 91, 46, 0.18); }
.grid2 { display: grid; gap: 0.6rem; grid-template-columns: 1fr; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.chips button { padding: 0.45rem 0.8rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 0.9rem; font-weight: 500; transition: all 0.2s var(--ease-out); }
.chips button:hover { border-color: #c9c5bb; }
.chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.colors { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0.5rem; align-items: center; }
.color { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; min-width: 0; }
.color input { width: 42px; height: 42px; border: 0; padding: 0; background: none; border-radius: 8px; cursor: pointer; flex: none; }
.color input::-webkit-color-swatch-wrapper { padding: 0; }
.color input::-webkit-color-swatch { border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 8px; }
.color input::-moz-color-swatch { border: 1px solid rgba(0, 0, 0, 0.15); border-radius: 8px; }
.color span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.color b { font-size: 0.88rem; }
.color small { font-size: 0.75rem; color: var(--ink-2); }
.swap { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-size: 1.1rem; }
.swap:hover { background: var(--accent-soft); }

.styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; }
.styles button { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; padding: 0.55rem 0.2rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-size: 0.78rem; font-weight: 500; }
.styles button[aria-checked="true"], .formats button[aria-checked="true"], .seg button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.st { width: 34px; height: 34px; display: block; background-size: 100% 100%; }
.st-clasico { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2314171c' d='M0 0h3v3H0zM5 0h3v3H5zM0 5h3v3H0zM4 4h1v1H4zM6 5h2v1H6zM5 7h1v1H5zM3 3h1v1H3z'/%3E%3C/svg%3E"); }
.st-redondeado { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Crect width='3' height='3' rx='1' fill='%2314171c'/%3E%3Crect x='5' width='3' height='3' rx='1' fill='%2314171c'/%3E%3Crect y='5' width='3' height='3' rx='1' fill='%2314171c'/%3E%3Crect x='4' y='4' width='1.4' height='1.4' rx='.6' fill='%2314171c'/%3E%3Crect x='6' y='5' width='2' height='1' rx='.5' fill='%2314171c'/%3E%3Crect x='3' y='3' width='1' height='1' rx='.4' fill='%2314171c'/%3E%3C/svg%3E"); }
.st-puntos { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Ccircle cx='1.5' cy='1.5' r='1.5' fill='%2314171c'/%3E%3Ccircle cx='6.5' cy='1.5' r='1.5' fill='%2314171c'/%3E%3Ccircle cx='1.5' cy='6.5' r='1.5' fill='%2314171c'/%3E%3Ccircle cx='4.5' cy='4.5' r='.7' fill='%2314171c'/%3E%3Ccircle cx='6.5' cy='5.5' r='.7' fill='%2314171c'/%3E%3Ccircle cx='3.5' cy='3.5' r='.7' fill='%2314171c'/%3E%3Ccircle cx='5.5' cy='7' r='.7' fill='%2314171c'/%3E%3C/svg%3E"); }
.st-elegante { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%2314171c' d='M0 0h3v3H0zM5 0h3v3H5zM0 5h3v3H0z' opacity='.9'/%3E%3Cpath fill='%2314171c' d='M4 4h1.5a.5.5 0 0 1 .5.5V6H4.5a.5.5 0 0 1-.5-.5zM6 5.2h2v1.4H6zM3 3h1v1H3z'/%3E%3C/svg%3E"); }

.emojis { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.emo { min-width: 40px; height: 40px; padding: 0 0.5rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 1.25rem; line-height: 1; }
.emo.none { font-size: 0.8rem; font-weight: 500; }
.emo[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.logo-row { display: flex; align-items: center; gap: 0.8rem; margin-top: 0.6rem; }

.formats { display: grid; gap: 0.45rem; grid-template-columns: 1fr; }
.formats button { display: flex; flex-direction: column; align-items: flex-start; padding: 0.7rem 0.9rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; text-align: left; }
.formats b { font-size: 0.95rem; }
.formats small { color: var(--ink-2); font-size: 0.8rem; }
#txt { margin-top: 0; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 28px; }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.4rem; }
.seg button { padding: 0.55rem 0.4rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 0.88rem; font-weight: 500; }
.seg small { display: block; font-size: 0.68rem; color: var(--accent-ink); font-weight: 600; }

/* ----- botones ----- */
.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; gap: 0.4rem; border-radius: 12px; font-weight: 600; transition: transform 0.15s var(--ease-out), background 0.2s; }
.btn:active { transform: scale(0.98); }
.btn-main { flex-direction: column; width: 100%; padding: 0.95rem 1rem; background: var(--accent-ink); color: #fff; box-shadow: 0 6px 18px rgba(217, 63, 18, 0.28); }
.btn-main:hover { background: #c2360c; }
.btn-main .b1 { font-size: 1.12rem; font-family: var(--display); font-weight: 800; }
.btn-main .b2 { font-size: 0.8rem; font-weight: 500; opacity: 0.92; }
.btn-sec { padding: 0.75rem 1rem; background: #fff; border: 1.5px solid var(--line); }
.btn-sec:hover { border-color: var(--ink); }
.btn-sm { padding: 0.5rem 0.8rem; font-size: 0.88rem; cursor: pointer; }
.btn.busy { opacity: 0.7; pointer-events: none; }
.link-btn { color: var(--ink-2); font-size: 0.85rem; text-decoration: underline; text-underline-offset: 3px; padding: 0.3rem 0; text-align: left; }
.link-btn:hover { color: var(--ink); }

/* ----- vista previa ----- */
.preview { display: grid; gap: 0.8rem; align-content: start; }
.pv-2d { position: relative; }
.qr2d { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1; width: min(100%, 320px); margin-inline: auto; background: #fff; }
.qr2d svg, .qr2d canvas { width: 100% !important; height: 100% !important; }
.ex-badge { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); background: rgba(20, 23, 28, 0.82); color: #fff; font-size: 0.72rem; padding: 0.2rem 0.65rem; border-radius: 999px; white-space: nowrap; }
.viewer { position: relative; height: 300px; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 100% at 50% 0%, #ffffff 0%, #ebe9e3 100%); border: 1px solid var(--line); }
.viewer-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; cursor: grab; }
.viewer-canvas:active { cursor: grabbing; }
.viewer-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 1rem; text-align: center; color: var(--ink-2); font-size: 0.9rem; pointer-events: none; }
.viewer-bar { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; margin-top: 0.35rem; }
.dims { font-size: 0.85rem; color: var(--ink-2); font-weight: 500; }
.notes { list-style: none; padding: 0; display: grid; gap: 0.3rem; }
.note { font-size: 0.85rem; padding-left: 1.5rem; position: relative; line-height: 1.4; }
.note::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.note.ok { color: var(--ok); } .note.ok::before { content: "✓"; }
.note.warn { color: var(--warn); } .note.warn::before { content: "!"; left: 0.2rem; }
.note.bad { color: var(--bad); } .note.bad::before { content: "✕"; }
.downloads { display: grid; gap: 0.55rem; }
.dl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.privacy { font-size: 0.8rem; color: var(--ink-2); line-height: 1.45; }

/* ----- anuncios (solo huecos) ----- */
.ad { display: flex; align-items: center; justify-content: center; gap: 0.6rem; border: 1.5px dashed #c9c5bb; border-radius: 12px; background: repeating-linear-gradient(135deg, #faf9f6, #faf9f6 10px, #f4f2ed 10px, #f4f2ed 20px); color: #8a8f98; font-weight: 600; letter-spacing: 0.08em; }
.ad-tag { font-size: 0.85rem; }
.ad-size { font-size: 0.72rem; font-weight: 500; letter-spacing: 0; opacity: 0.8; }
.ad-banner { margin-top: 1.2rem; min-height: 100px; }
.ad-mid { margin: 2.5rem auto; min-height: 280px; max-width: 760px; }
.ad-popup { inset: 0; margin: auto; height: fit-content; width: min(92vw, 380px); border: 0; border-radius: 18px; padding: 1.2rem; background: #fff; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35); }
.ad-popup::backdrop { background: rgba(20, 23, 28, 0.55); }
.ad-popup[open] { display: grid; gap: 0.8rem; }
.pop-ok { font-weight: 600; text-align: center; }
.ad-pop { min-height: 250px; }
.pop-x, .toast-x { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 50%; background: #f1efe9; font-size: 1.3rem; line-height: 1; z-index: 2; }
.pop-x:hover, .toast-x:hover { background: #e4e1da; }
.ad-toast { position: fixed; right: 12px; bottom: 12px; z-index: 40; width: min(300px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 0.5rem; box-shadow: var(--shadow), 0 12px 40px rgba(0, 0, 0, 0.18); animation: toast-in 0.5s var(--ease-out); }
.ad-toast-in { min-height: 90px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* =============================================================
   5. Secciones de contenido
   ============================================================= */
.sec { padding: 2.5rem 0; }
.sec h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 800; margin-bottom: 1.4rem; }
.steps { list-style: none; padding: 0; display: grid; gap: 1rem; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.steps svg { width: 44px; height: 44px; color: var(--accent-ink); margin-bottom: 0.7rem; }
.steps h3, .ideas h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.steps p, .ideas p { color: var(--ink-2); font-size: 0.97rem; }
.ideas { display: grid; gap: 0.9rem; }
.ideas article { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.ico { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent-soft); font-size: 1.5rem; margin-bottom: 0.6rem; }
.prose { max-width: 780px; }
.prose h3 { font-size: 1.2rem; margin: 1.6rem 0 0.4rem; }
.prose p, .prose li { color: #2c323a; }
.prose ul { padding-left: 1.2rem; display: grid; gap: 0.4rem; margin-top: 0.3rem; }
.faq { max-width: 820px; display: grid; gap: 0.6rem; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0 1rem; }
.faq summary { cursor: pointer; padding: 0.95rem 1.6rem 0.95rem 0; font-weight: 600; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 0.8rem; font-size: 1.4rem; color: var(--accent-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 1rem; color: var(--ink-2); }

.site-footer { margin-top: 2rem; border-top: 1px solid var(--line); padding: 1.6rem 0 2.2rem; color: var(--ink-2); font-size: 0.9rem; }
.foot-in { display: grid; gap: 0.4rem; }
.foot-links a { text-decoration: underline; text-underline-offset: 3px; }

/* páginas legales */
.legal { max-width: 760px; padding: 2rem 0 3rem; }
.legal h1 { font-size: 2rem; margin-bottom: 1rem; }
.legal h2 { font-size: 1.25rem; margin: 1.6rem 0 0.4rem; }
.legal p, .legal li { color: #2c323a; }
.legal ul { padding-left: 1.2rem; }
.todo { background: #fff6cc; padding: 0 0.25rem; border-radius: 4px; }

/* =============================================================
   6. Responsive (móvil primero)
   ============================================================= */
@media (min-width: 540px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .formats { grid-template-columns: repeat(3, 1fr); }
  .seg { grid-template-columns: repeat(4, 1fr); }
  .viewer { height: 340px; }
}
@media (min-width: 720px) {
  .header-nav { display: flex; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .ideas { grid-template-columns: repeat(2, 1fr); }
  .panel, .preview { padding: 1.3rem; }
}
@media (min-width: 960px) {
  .tool { grid-template-columns: minmax(0, 1fr) 420px; grid-template-areas: "s1 pv" "s2 pv" "s3 pv"; align-items: start; gap: 1rem 1.2rem; }
  .s1 { grid-area: s1; } .s2 { grid-area: s2; } .s3 { grid-area: s3; }
  .preview { grid-area: pv; position: sticky; top: 72px; }
  .viewer { height: 300px; }
  .ideas { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .tool { grid-template-columns: minmax(0, 1fr) 460px; }
}

/* solo efectos intrusivos */
@media (prefers-reduced-motion: reduce) {
  .ad-toast { animation: none; }
  html { scroll-behavior: auto; }
}

/* =============================================================
   7. Destinos, paletas, estilos y marcos
   ============================================================= */
.cats { display: flex; gap: 0.25rem; overflow-x: auto; padding: 0.25rem; margin-bottom: 0.7rem; background: #f1efe9; border-radius: 12px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; padding: 0.5rem 0.85rem; border-radius: 9px; font-size: 0.88rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.cats button[aria-selected="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 23, 28, 0.14); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0 0.6rem; }
.fld { grid-column: 1 / -1; }
.fld.half { grid-column: span 1; }
.fields .lab { margin-top: 0.2rem; }
.fld + .fld { margin-top: 0.1rem; }
@media (max-width: 539px) { .fld.half { grid-column: 1 / -1; } }

.palettes { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.palettes button { width: 38px; height: 38px; padding: 3px; border: 1.5px solid var(--line); border-radius: 50%; background: #fff; }
.palettes button i { display: block; width: 100%; height: 100%; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.12); }
.palettes button[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 3.5px var(--accent); }

.styles { grid-template-columns: repeat(4, 1fr); }
.st-thumb { display: block; width: 44px; height: 44px; }
.st-thumb svg { width: 44px; height: 44px; }

.formats { grid-template-columns: 1fr 1fr; }
.frames { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.frames button { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.8rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; font-size: 0.88rem; font-weight: 500; }
.frames button[aria-checked="true"] { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent) inset; }
.fr { display: inline-block; width: 18px; height: 18px; background: var(--ink); }
.fr-rect { border-radius: 4px; }
.fr-circle { border-radius: 50%; }
.fr-hex { clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%); }

.face2d { width: min(100%, 340px); height: auto; aspect-ratio: 1; margin-inline: auto; border-radius: 14px; border: 1px solid var(--line); background: radial-gradient(120% 100% at 50% 0%, #ffffff 0%, #ebe9e3 100%); }
.ad-toast { width: min(260px, calc(100vw - 24px)); }
.ad-toast-in { min-height: 70px; }
@media (min-width: 540px) { .formats { grid-template-columns: repeat(3, 1fr); } }
.brand-word b { color: var(--accent-ink); font-weight: 800; }
.fr-heart { background: var(--ink); clip-path: none; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7-4.6-9.5-9C.7 8.6 2.4 5 6 5c2 0 3.4 1 4.5 2.4h3C14.6 6 16 5 18 5c3.6 0 5.3 3.6 3.5 7C19 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7-4.6-9.5-9C.7 8.6 2.4 5 6 5c2 0 3.4 1 4.5 2.4h3C14.6 6 16 5 18 5c3.6 0 5.3 3.6 3.5 7C19 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat; }

/* =============================================================
   8. Plan Pro
   ============================================================= */
.pro-tag { display: inline-block; margin-left: 0.35rem; padding: 0.05rem 0.4rem; border-radius: 6px; background: var(--ink); color: #fff; font-family: var(--sans); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; vertical-align: middle; line-height: 1.5; }
.pro-tag.big { font-size: 0.8rem; padding: 0.1rem 0.55rem; }
.formats .pro-tag { position: absolute; top: 6px; right: 6px; margin: 0; }
.formats button { position: relative; }
.pro-badge { padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--accent-ink); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; }
.sec-lead { max-width: 64ch; color: var(--ink-2); margin: -0.6rem 0 1.2rem; }
.bill { display: inline-flex; padding: 0.25rem; background: #f1efe9; border-radius: 12px; margin-bottom: 1rem; }
.bill button { padding: 0.5rem 1rem; border-radius: 9px; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); }
.bill button small { color: var(--accent-ink); font-size: 0.7rem; font-weight: 700; }
.bill button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20, 23, 28, 0.14); }
.plans { display: grid; gap: 1rem; }
.plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; display: grid; gap: 0.7rem; align-content: start; }
.plan h3 { font-size: 1.3rem; }
.plan .price { font-family: var(--display); font-size: 2rem; font-weight: 800; line-height: 1; }
.plan .price span { font-family: var(--sans); font-size: 0.95rem; font-weight: 500; color: var(--ink-2); margin-left: 0.2rem; }
.plan ul { list-style: none; padding: 0; display: grid; gap: 0.45rem; font-size: 0.95rem; }
.plan li { padding-left: 1.5rem; position: relative; color: #2c323a; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.plan-pro { border: 2px solid var(--accent); box-shadow: 0 10px 30px rgba(255, 91, 46, 0.14); }
.ribbon { position: absolute; top: -12px; left: 1.2rem; background: var(--accent-ink); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 0.2rem 0.7rem; border-radius: 999px; }
.lote-box { max-width: 760px; display: grid; gap: 0.6rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow); }
.lote-box textarea { resize: vertical; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.9rem; line-height: 1.5; }
.lote-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; }
.tpl { display: grid; gap: 0.5rem; }
.tpl-btns { display: flex; align-items: center; gap: 0.8rem; }
.pro-dialog { text-align: left; }
.pro-dialog h3 { font-size: 1.3rem; padding-right: 2rem; }
.pro-list { padding-left: 1.2rem; display: grid; gap: 0.3rem; font-size: 0.93rem; color: #2c323a; }
.key summary { cursor: pointer; font-size: 0.9rem; color: var(--ink-2); padding: 0.3rem 0; }
.key[open] { display: grid; gap: 0.5rem; }
.is-pro .ad, .is-pro .ad-toast, .is-pro #ad-popup { display: none !important; }
@media (min-width: 720px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; } }

/* =============================================================
   9. Panel de vista previa: cabe en pantalla y las descargas siempre se ven
   ============================================================= */
.preview { display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; }
.pv-scroll { display: grid; gap: 0.8rem; padding: 1.1rem 1.1rem 0.8rem; align-content: start; }
.pv-imgs { display: grid; gap: 0.9rem; }
.pv-2d { display: grid; gap: 0.35rem; }
.pv-frame { position: relative; }
.size-row { display: grid; gap: 0.1rem; font-size: 0.85rem; color: var(--ink-2); font-weight: 600; }
.size-row output { color: var(--ink); }
.cap { font-size: 0.78rem; color: var(--ink-2); text-align: center; line-height: 1.35; }
.viewer { position: relative; }
.vfs { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 8px; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); font-size: 1rem; line-height: 1; z-index: 2; }
.vfs:hover { background: #fff; border-color: var(--ink); }
.viewer:fullscreen { height: 100vh; aspect-ratio: auto; border-radius: 0; }
.downloads { padding: 0.8rem 1.1rem 1.1rem; border-top: 1px solid var(--line); background: #fff; display: grid; gap: 0.55rem; }
.qr-dl { display: flex; gap: 0.7rem; align-items: center; }
.qr-thumb { width: 72px; height: 72px; flex: none; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.qr-thumb svg { width: 72px; height: 72px; }
.qr-dl-btns { flex: 1; display: grid; gap: 0.3rem; min-width: 0; }
.qr-dl-btns .cap { text-align: left; }
.dl-row .btn { padding: 0.6rem 0.5rem; font-size: 0.9rem; }
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, 0.96); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.dock .btn { padding: 0.7rem 1rem; }
.has-dock .ad-toast { bottom: 84px; }
@media (min-width: 960px) {
  .preview { max-height: calc(100vh - 88px); }
  .pv-scroll { overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
  .dock { display: none !important; }
}
@media (min-width: 1280px) {
  .tool { grid-template-columns: minmax(0, 1fr) 540px; }
  .pv-imgs { grid-template-columns: 1fr 1fr; align-items: start; }
  .face2d { width: 100%; }
  .viewer { height: auto; aspect-ratio: 1 / 1; }
}
