/* =============================================================
   QR 3D · Código QR para imprimir en 3D
   1. Tokens · 2. Reset · 3. Utilidades · 4. Tipografía
   5. Componentes · 6. Herramienta · 7. Secciones · 8. Anuncios
   9. Responsive · 10. Movimiento reducido
   ============================================================= */

/* 1. Tokens */
:root {
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --ink: #16161D;
  --ink-2: #44444F;
  --muted: #74747F;
  --line: #E7E3DA;
  --line-2: #D9D4C8;
  --accent: #FF5A1F;
  --accent-ink: #C2410C;
  --accent-soft: #FFF1EA;
  --ok: #0F7B55;
  --ok-soft: #E8F6EF;
  --mid: #A1620B;
  --mid-soft: #FFF6E3;
  --bad: #C42B2B;
  --bad-soft: #FDECEC;
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 1px 2px rgba(22,22,29,.04), 0 8px 28px -12px rgba(22,22,29,.14);
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Reset */
*, *::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, video, canvas { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.1; letter-spacing: -0.02em; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* 3. Utilidades */
.container { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 16px; }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--ink); color: #fff; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* 4. Tipografía */
h1 { font-family: var(--display); font-weight: 800; font-size: clamp(1.75rem, 1.1rem + 2.9vw, 3.1rem); }
.section-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.45rem, 1.05rem + 1.6vw, 2.2rem); margin-bottom: .6rem; }
.section-lead { color: var(--ink-2); max-width: 62ch; margin-bottom: 1.6rem; }

/* 5. Componentes */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247,245,240,.88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; }
.logo-mark { width: 28px; height: 28px; }
.header-nav { display: none; gap: 1.4rem; font-size: .92rem; font-weight: 600; color: var(--ink-2); }
.header-nav a { text-decoration: none; }
.header-nav a:hover { color: var(--accent-ink); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 12px; font-weight: 700; transition: transform .2s var(--ease-out), background .2s, box-shadow .2s, border-color .2s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -6px rgba(255,90,31,.6), inset 0 -2px 0 rgba(0,0,0,.12); }
.btn-primary:hover { background: #F24E12; }
.btn-ghost { background: var(--surface); border: 1.5px solid var(--line-2); padding: .55rem .9rem; font-size: .95rem; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-xl { width: 100%; flex-direction: column; gap: .1rem; padding: .95rem 1rem; }
.btn-main { font-size: 1.08rem; }
.btn-sub { font-size: .78rem; font-weight: 600; opacity: .9; }
.btn-link { display: block; margin: .65rem auto 0; font-size: .88rem; font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--accent-ink); }
.btn[aria-busy="true"], .btn-link[aria-busy="true"] { opacity: .7; pointer-events: none; }

.label { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; font-size: .85rem; font-weight: 700; color: var(--ink-2); margin: 0 0 .35rem; }
.label-sm { font-size: .78rem; margin-top: .7rem; }
.label output { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }
.opt { font-weight: 500; color: var(--muted); }
.hint { font-size: .8rem; color: var(--muted); margin-top: .4rem; line-height: 1.45; }
.input {
  width: 100%; background: var(--surface-2); border: 1.5px solid var(--line-2); border-radius: var(--radius-sm);
  padding: .6rem .75rem; font-size: .98rem; transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255,90,31,.14); background: #fff; }
.input-lg { font-size: 1.06rem; padding: .78rem .9rem; font-weight: 600; }
.input-sm { padding: .4rem .55rem; font-size: .88rem; }
select.input { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2344444F' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .7rem center; background-size: 11px; padding-right: 2rem; }
textarea.input { resize: vertical; min-height: 64px; }
.input.is-error { border-color: var(--bad); box-shadow: 0 0 0 4px rgba(196,43,43,.12); animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.check { display: inline-flex; align-items: center; gap: .5rem; font-size: .9rem; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.check-sm { display: flex; font-size: .82rem; margin-top: .9rem; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.chip { padding: .42rem .75rem; border-radius: 999px; background: var(--surface-2); border: 1.5px solid var(--line); font-size: .87rem; font-weight: 700; color: var(--ink-2); transition: all .15s; white-space: nowrap; }
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.segmented { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 12px; gap: 2px; }
.seg { padding: .38rem .85rem; border-radius: 9px; font-size: .86rem; font-weight: 700; color: var(--ink-2); transition: all .15s; }
.seg.is-active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented-sm .seg { padding: .25rem .6rem; font-size: .78rem; }

.row-2 { display: grid; grid-template-columns: 1fr; gap: .7rem; }
.row-tight { margin-top: .7rem; align-items: end; }

/* 6. Herramienta */
.hero { padding: 22px 16px 14px; text-align: left; }
.hero-sub { margin-top: .5rem; color: var(--ink-2); font-size: clamp(.95rem, .9rem + .3vw, 1.08rem); max-width: 70ch; }

.tool-card { background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); box-shadow: var(--shadow); padding: 10px; }
.noscript { padding: 1rem; background: var(--mid-soft); border-radius: var(--radius-sm); font-weight: 600; margin-bottom: 10px; }
.tool-grid { display: flex; flex-direction: column; gap: 10px; }
.controls, .stage { display: contents; }
.panel-content { order: 1; }
.preview-2d { order: 2; }
.panel-design { order: 3; }
.panel-object { order: 4; }
.preview-3d { order: 5; }
.export { order: 6; }

/* selector QR / código de barras */
.kind-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; margin-bottom: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.kind-opt { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem .5rem; border-radius: 12px; font-weight: 800; font-size: .98rem; color: var(--ink-2); transition: all .15s; }
.kind-opt svg { width: 22px; height: 22px; flex: none; }
.kind-opt:hover { color: var(--ink); }
.kind-opt.is-active { background: var(--ink); color: #fff; box-shadow: 0 4px 14px -6px rgba(22,22,29,.5); }
.tool-card[data-kind="bar"] .qr-only { display: none !important; }
.row-bar { display: grid; grid-template-columns: 1fr; gap: .7rem; }
.bar-status { font-size: .84rem; font-weight: 700; margin-top: .5rem; padding: .45rem .7rem; border-radius: 10px; }
.bar-status:empty { display: none; }
.bar-status.ok { background: var(--ok-soft); color: var(--ok); }
.bar-status.bad { background: var(--bad-soft); color: var(--bad); }
.bar-canvas { display: block; width: 100%; height: auto; }
.tool-card[data-kind="bar"] .qr-box { aspect-ratio: auto; width: 100%; padding: 6px 0; display: grid; place-items: center; min-height: 120px; }
.tool-card[data-kind="bar"] .qr-canvas { display: none; }
.tool-card[data-kind="bar"] .preview-2d { grid-template-columns: minmax(0, 1fr); }

.panel, .preview, .export { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.panel-title { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-size: 1.12rem; font-weight: 800; margin-bottom: .85rem; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-ink); font-family: var(--sans); font-size: .85rem; font-weight: 800; flex: none; }

/* estilos de puntos */
.styles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; margin-bottom: 1rem; }
.style-opt { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .6rem .3rem .5rem; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: .75rem; font-weight: 700; color: var(--ink-2); transition: all .15s; }
.style-opt svg { width: 30px; height: 30px; fill: currentColor; }
.style-opt:hover { border-color: var(--line-2); }
.style-opt.is-active { border-color: var(--ink); color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }

/* colores */
.colors { display: grid; gap: .8rem; margin-bottom: 1rem; }
.color-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.color-head .label { margin: 0; }
input[type="color"] { width: 40px; height: 30px; padding: 2px; border: 1.5px solid var(--line-2); border-radius: 8px; background: #fff; cursor: pointer; flex: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .45rem; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.14); position: relative; transition: transform .15s var(--ease-out); }
.swatch:hover { transform: scale(1.12); }
.swatch.is-active { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.contrast { font-size: .84rem; font-weight: 700; padding: .45rem .7rem; border-radius: 10px; }
.contrast.ok { background: var(--ok-soft); color: var(--ok); }
.contrast.mid { background: var(--mid-soft); color: var(--mid); }
.contrast.bad { background: var(--bad-soft); color: var(--bad); }

/* centro */
.center-pane { margin-top: .7rem; }
.emoji-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.emoji-btn { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface-2); font-size: 1.25rem; line-height: 1; display: grid; place-items: center; transition: all .12s; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.emoji-btn:hover { border-color: var(--line-2); transform: translateY(-1px); }
.emoji-btn.is-active { border-color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--ink); }
.emoji-btn.emoji-none { font-family: var(--sans); font-size: .7rem; font-weight: 800; color: var(--muted); }
.emoji-grid-sm .emoji-btn { width: 34px; height: 34px; font-size: 1.1rem; }
.emoji-custom { display: flex; align-items: center; gap: .5rem; margin-top: .6rem; font-size: .82rem; font-weight: 600; color: var(--muted); }
.input-emoji { width: 64px; padding: .35rem .5rem; text-align: center; font-size: 1.1rem; }
.upload { display: block; position: relative; border: 1.5px dashed var(--line-2); border-radius: 12px; padding: .9rem; text-align: center; cursor: pointer; background: var(--surface-2); transition: border-color .15s, background .15s; }
.upload:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.upload-txt { font-size: .9rem; font-weight: 700; color: var(--ink-2); }

/* formatos */
.formats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-bottom: 1rem; }
.format-opt { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; padding: .7rem .35rem .65rem; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink-2); transition: all .15s; }
.format-opt svg { width: 46px; height: 38px; color: var(--muted); margin-bottom: .15rem; transition: color .15s; }
.format-name { font-size: .84rem; font-weight: 800; color: var(--ink); line-height: 1.2; }
.format-desc { font-size: .7rem; font-weight: 600; color: var(--muted); line-height: 1.25; }
.format-opt:hover { border-color: var(--line-2); }
.format-opt.is-active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.format-opt.is-active svg { color: var(--accent); }

.row-label { display: grid; grid-template-columns: 1fr 108px; gap: .6rem; align-items: end; }
.sliders { display: grid; gap: .8rem; margin-top: 1rem; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 26px; cursor: pointer; }

.warnings { list-style: none; padding: 0; margin-top: 1rem; display: grid; gap: .4rem; }
.warnings li { font-size: .83rem; line-height: 1.45; padding: .5rem .7rem; border-radius: 10px; font-weight: 600; }
.warnings .ok { background: var(--ok-soft); color: var(--ok); }
.warnings .mid { background: var(--mid-soft); color: var(--mid); }
.warnings .bad { background: var(--bad-soft); color: var(--bad); }
.warnings .info { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }

/* vista previa 2D */
.preview-2d { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: center; }
.qr-wrap { display: grid; place-items: center; }
.qr-box { position: relative; width: min(100%, 250px); aspect-ratio: 1; border-radius: 14px; overflow: hidden; background-color: #fff; background-image: linear-gradient(45deg, #eee 25%, transparent 25%), linear-gradient(-45deg, #eee 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eee 75%), linear-gradient(-45deg, transparent 75%, #eee 75%); background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; box-shadow: 0 0 0 1px var(--line); }
.qr-canvas, .qr-canvas canvas, .qr-canvas svg { width: 100% !important; height: 100% !important; display: block; }
.demo-tag { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); background: rgba(22,22,29,.82); color: #fff; font-size: .7rem; font-weight: 700; padding: .2rem .55rem; border-radius: 99px; white-space: nowrap; pointer-events: none; }
.dl-2d { min-width: 0; }
.dl-title { font-weight: 800; font-size: .92rem; margin-bottom: .45rem; }
.dl-row { display: flex; gap: .45rem; }
.dl-row .btn { flex: 1; }
.payload { margin-top: .7rem; font-size: .74rem; color: var(--muted); word-break: break-all; line-height: 1.35; max-height: 3.9em; overflow: hidden; }

/* vista previa 3D */
.preview-3d { padding: 12px; }
.viewer-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 2px 4px 10px; flex-wrap: wrap; }
.viewer-title { font-weight: 800; font-size: .92rem; }
.viewer-tip { font-weight: 600; color: var(--muted); font-size: .8rem; }
.viewer { position: relative; height: 290px; border-radius: 14px; overflow: hidden; background: radial-gradient(120% 90% at 50% 15%, #FFFFFF 0%, #EEEBE4 62%, #E2DED4 100%); touch-action: pan-y; }
.viewer canvas { width: 100% !important; height: 100% !important; touch-action: none; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer-status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .6rem; padding: 1rem; text-align: center; font-size: .9rem; font-weight: 600; color: var(--ink-2); pointer-events: none; }
.viewer-status.is-error { color: var(--ink-2); background: rgba(255,255,255,.6); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.dims { font-size: .8rem; color: var(--ink-2); margin: 10px 4px 2px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.dims strong { color: var(--ink); }

/* exportar */
.export { background: linear-gradient(180deg, var(--accent-soft), #fff 70%); border-color: #FFD9C7; }
.export-msg { font-size: .84rem; text-align: center; color: var(--ink-2); margin-top: .5rem; min-height: 1.2em; font-weight: 600; }
.export-msg.is-error { color: var(--bad); }

.privacy { margin: 12px 4px 0; font-size: .86rem; color: var(--ink-2); text-align: center; }

/* 7. Secciones */
.section { padding-top: 56px; padding-bottom: 8px; }
.steps { list-style: none; padding: 0; display: grid; gap: 14px; margin-top: 1.2rem; counter-reset: s; }
.step-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; counter-increment: s; }
.step-card::after { content: counter(s); position: absolute; top: 14px; right: 18px; font-family: var(--display); font-weight: 800; font-size: 2.4rem; color: var(--line); line-height: 1; }
.step-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); margin-bottom: .8rem; }
.step-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.step-card h3 { font-size: 1.12rem; margin-bottom: .35rem; }
.step-card p { color: var(--ink-2); font-size: .95rem; }

.ideas { display: grid; grid-template-columns: 1fr; gap: 12px; }
.idea { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; transition: transform .25s var(--ease-out), box-shadow .25s; }
.idea:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.idea-emoji { font-size: 1.7rem; display: block; margin-bottom: .45rem; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
.idea h3 { font-size: 1.04rem; margin-bottom: .3rem; }
.idea p { color: var(--ink-2); font-size: .92rem; }

.prose-grid { display: grid; gap: 8px 40px; margin-top: 1rem; }
.prose h3 { font-size: 1.1rem; margin: 1.1rem 0 .4rem; }
.prose p { color: var(--ink-2); max-width: 64ch; }

.faq { display: grid; gap: 8px; margin-top: 1.2rem; max-width: 860px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 15px 28px 15px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 500; color: var(--accent-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 0 16px; color: var(--ink-2); }

.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: flex; flex-direction: column; gap: .7rem; padding-top: 26px; padding-bottom: 90px; font-size: .88rem; color: var(--ink-2); }
.footer-nav { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-nav a { text-underline-offset: 3px; }

.legal { max-width: 820px; }
.legal h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); margin-bottom: 1.2rem; }
.legal .section-title { font-size: 1.25rem; margin: 1.8rem 0 .5rem; }
.legal p { margin-bottom: .7rem; }

/* 8. Anuncios (huecos vacíos: el dueño pega su código más adelante) */
.ad-slot { position: relative; display: grid; place-items: center; border: 1.5px dashed #CFC8B8; border-radius: 12px; background: repeating-linear-gradient(-45deg, #F3F0E8, #F3F0E8 10px, #EFEBE2 10px, #EFEBE2 20px); color: #9B9384; overflow: hidden; }
.ad-label { font-size: .72rem; font-weight: 800; letter-spacing: .16em; }
.ad-leaderboard { min-height: 100px; margin-top: 28px; }
.ad-incontent { min-height: 250px; margin-top: 48px; }

.ad-pop { background: var(--surface); margin: auto; max-height: calc(100vh - 32px); overflow: auto; border: 0; padding: 22px 20px 18px; border-radius: 20px; width: min(92vw, 360px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.45); text-align: center; color: var(--ink); }
.ad-pop::backdrop { background: rgba(22,22,29,.55); backdrop-filter: blur(2px); }
.ad-pop[open] { animation: popIn .3s var(--ease-out); }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.ad-pop-title { font-weight: 800; margin: 0 24px 14px; }
.ad-pop-slot { width: 100%; max-width: 300px; aspect-ratio: 300 / 250; margin: 0 auto 14px; }
.ad-pop-close { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--ink-2); }
.ad-pop-close:hover { background: var(--surface-2); color: var(--ink); }
.ad-pop-continue { width: 100%; }

.ad-toast { position: fixed; z-index: 60; left: 10px; right: 10px; bottom: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px -14px rgba(0,0,0,.35); padding: 8px; animation: toastIn .4s var(--ease-out); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } }
.ad-toast-slot { min-height: 64px; }
.ad-toast-close { position: absolute; top: -10px; right: -6px; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 1rem; line-height: 1; z-index: 1; box-shadow: 0 2px 6px rgba(0,0,0,.25); }

/* 9. Responsive */
@media (min-width: 540px) {
  .container { padding: 0 20px; }
  .hero { padding: 28px 20px 16px; }
  .tool-card { padding: 14px; }
  .row-2 { grid-template-columns: 1fr 1fr; }
  .row-bar { grid-template-columns: 200px 1fr; align-items: end; }
  .preview-2d { grid-template-columns: 220px minmax(0, 1fr); }
  .qr-box { width: 220px; }
  .ideas { grid-template-columns: 1fr 1fr; }
  .ad-toast { left: 16px; right: auto; bottom: 16px; width: 340px; }
  .ad-toast-slot { min-height: 100px; }
}
@media (min-width: 720px) {
  .header-nav { display: flex; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .prose-grid { grid-template-columns: 1fr 1fr; }
  .viewer { height: 330px; }
  .footer-inner { flex-direction: row; justify-content: space-between; align-items: center; padding-bottom: 30px; }
}
@media (min-width: 960px) {
  .hero { padding: 34px 20px 18px; }
  .tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: 14px; align-items: start; }
  .controls { display: flex; flex-direction: column; gap: 14px; }
  .stage { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 68px; }
  .preview-2d { grid-template-columns: 150px minmax(0, 1fr); padding: 12px 14px; gap: 16px; }
  .qr-box { width: 150px; }
  .tool-card[data-kind="bar"] .preview-2d { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .tool-card[data-kind="bar"] .qr-box { min-height: 0; }
  .payload { margin-top: .5rem; max-height: 2.7em; }
  .viewer { height: clamp(240px, calc(100vh - 560px), 420px); }
  .export { padding: 12px 14px 10px; }
  .export .btn-xl { padding: .8rem 1rem; }
  .btn-link { margin-top: .5rem; }
  .export-msg { margin-top: .35rem; }
  .ideas { grid-template-columns: repeat(4, 1fr); }
  .ad-leaderboard { min-height: 110px; }
}

/* 9b. Modo incrustado (?embed=1): solo la herramienta, para meterla en otra web */
html.is-embed, html.is-embed body { background: transparent; }
html.is-embed .site-header, html.is-embed .hero, html.is-embed .section,
html.is-embed .ad-incontent, html.is-embed .site-footer, html.is-embed .skip-link { display: none !important; }
html.is-embed .tool { padding-top: 6px; }
html.is-embed .stage { position: static; }
html.is-embed .ad-leaderboard { margin: 16px 0 6px; }
html.is-embed .viewer { height: 320px; }

/* 10. Movimiento reducido: solo quitamos lo intrusivo */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .input.is-error { animation: none; }
}
