/* =============================================================
   QR en Relieve — estilos
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  color-scheme: light;
  --bg: #F6F5F1;
  --bg-alt: #EFEDE6;
  --surface: #FFFFFF;
  --surface-2: #FAF9F6;
  --ink: #15171C;
  --ink-2: #454A54;
  --ink-3: #6B707A;
  --line: #E4E1D8;
  --line-2: #D3CEC1;
  --accent: #E4572E;
  --accent-btn: #C4411A;
  --accent-btn-hover: #A93714;
  --accent-soft: #FCEBE4;
  --ok: #1D7A4E;
  --ok-soft: #E3F2E9;
  --warn: #8F5B00;
  --warn-soft: #FCF0D9;
  --bad: #B42318;
  --bad-soft: #FDE8E5;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(21, 23, 28, .05), 0 10px 28px -16px rgba(21, 23, 28, .22);
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 16px; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.1; letter-spacing: -0.02em; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-btn); outline-offset: 2px; border-radius: 6px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.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;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--ink); color: #fff; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
[hidden] { display: none !important; }

/* =============================================================
   4. Cabecera y héroe
   ============================================================= */
.site-header { border-bottom: 1px solid var(--line); background: rgba(246, 245, 241, .92); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.12rem; text-decoration: none; letter-spacing: -.01em; }
.brand-mark { width: 30px; height: 30px; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { text-decoration: none; font-size: .92rem; font-weight: 500; color: var(--ink-2); padding: 8px 10px; border-radius: 8px; }
.site-nav a:hover { background: var(--bg-alt); color: var(--ink); }

.hero { padding: 26px 0 18px; }
.eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-btn); margin-bottom: 8px; }
.hero h1 { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 1.25rem + 3.1vw, 3.5rem); letter-spacing: -.03em; }
.lead { margin-top: 10px; max-width: 62ch; font-size: clamp(1rem, .95rem + .3vw, 1.15rem); color: var(--ink-2); }
.lead strong { color: var(--ink); font-weight: 600; }

/* =============================================================
   5. Componentes
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: .95rem; line-height: 1.2;
  text-decoration: none; border: 1px solid transparent;
  transition: background-color .2s var(--ease-out), border-color .2s var(--ease-out), transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent-btn); color: #fff; box-shadow: 0 6px 18px -8px rgba(196, 65, 26, .7); }
.btn-soft { background: #F0EEE8; border-color: var(--line); color: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink-2); }
.btn-sm { padding: 7px 12px; font-size: .86rem; border-radius: 10px; }
.btn-xl { width: 100%; padding: 15px 18px; font-size: 1.06rem; border-radius: 14px; }
@media (hover: hover) {
  .btn-primary:not(:disabled):hover { background: var(--accent-btn-hover); transform: translateY(-1px); }
  .btn-soft:not(:disabled):hover { background: #E8E5DD; }
  .btn-ghost:not(:disabled):hover { background: var(--bg-alt); color: var(--ink); }
}
.btn[aria-busy="true"] { cursor: progress; }
.link-btn { display: block; margin: 8px auto 0; font-size: .9rem; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; padding: 4px 8px; }
.link-btn:disabled { opacity: .45; cursor: not-allowed; }
.link-btn:not(:disabled):hover { color: var(--ink); }

.input {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  font-size: 16px; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--accent-btn); box-shadow: 0 0 0 3px rgba(228, 87, 46, .18); }
.input:disabled { background: var(--surface-2); color: var(--ink-3); }
.input-lg { min-height: 50px; font-size: 17px; padding: 12px 14px; }
.input-sm { min-height: 36px; padding: 6px 10px; font-size: 15px; }
textarea.input { resize: vertical; min-height: 88px; }
select.input { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23454A54' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; }
.input-group { display: flex; }
.input-group .input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-btn { flex: none; padding: 0 14px; border: 1px solid var(--line-2); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: #F0EEE8; font-size: .88rem; font-weight: 600; color: var(--ink-2); }

.field-label { display: block; font-size: .88rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.field-label output { font-weight: 700; color: var(--accent-btn); }
.opt { font-weight: 500; color: var(--ink-3); }
.hint { margin-top: 6px; font-size: .86rem; color: var(--ink-3); line-height: 1.5; }
.group { margin-top: 18px; }
.row-2 { display: grid; gap: 12px; }
.row-2 + .row-2 { margin-top: 12px; }
.check-inline { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .92rem; font-weight: 500; cursor: pointer; }
.check-inline input { width: 18px; height: 18px; accent-color: var(--accent-btn); }

/* Pestañas y atajos */
.tabs { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg-alt); border-radius: 12px; margin-bottom: 14px; }
.tabs [role="tab"] { padding: 8px 16px; border-radius: 9px; font-weight: 600; font-size: .92rem; color: var(--ink-2); min-height: 38px; }
.tabs [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(21, 23, 28, .12); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.chip { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .86rem; font-weight: 500; background: var(--surface); min-height: 34px; transition: border-color .15s, background-color .15s; }
.chip[aria-pressed="true"] { border-color: var(--accent-btn); background: var(--accent-soft); color: var(--accent-btn-hover); }
@media (hover: hover) { .chip:hover { border-color: var(--ink-3); } }

/* Estilos de puntos */
.style-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.style-opt, .format-opt { position: relative; cursor: pointer; }
.style-opt input, .format-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.style-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .78rem; font-weight: 600; color: var(--ink-2); transition: border-color .15s, box-shadow .15s; }
.style-card svg { width: 32px; height: 32px; fill: var(--ink); }
.style-opt input:checked + .style-card, .format-opt input:checked + .format-card { border-color: var(--accent-btn); box-shadow: 0 0 0 1px var(--accent-btn); color: var(--ink); background: #FFFBF9; }
.style-opt input:focus-visible + .style-card, .format-opt input:focus-visible + .format-card { outline: 2px solid var(--accent-btn); outline-offset: 2px; }

/* Colores */
.color-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.color-pick { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; font-weight: 500; cursor: pointer; }
input[type="color"] { -webkit-appearance: none; appearance: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line-2); border-radius: 10px; background: none; cursor: pointer; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 7px; }
input[type="color"]::-moz-color-swatch { border: 0; border-radius: 7px; }

/* Centro: emojis y logo */
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 6px; }
.emoji-btn { height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 21px; line-height: 1; transition: border-color .15s, transform .15s var(--ease-out); }
.emoji-btn[aria-pressed="true"] { border-color: var(--accent-btn); box-shadow: 0 0 0 1px var(--accent-btn); background: #FFFBF9; }
@media (hover: hover) { .emoji-btn:hover { transform: translateY(-1px); border-color: var(--ink-3); } }
.center-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.file-btn { position: relative; cursor: pointer; }
.file-btn input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.file-btn:focus-within { outline: 2px solid var(--accent-btn); outline-offset: 2px; }
.other-emoji .input { width: 140px; }

/* Formatos 3D */
.format-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.format-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 6px 10px; height: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.format-card svg { width: 44px; height: 44px; margin-bottom: 4px; }
.format-card strong { font-size: .88rem; line-height: 1.25; }
.format-card small { font-size: .74rem; color: var(--ink-3); line-height: 1.3; }
.f-plate { fill: #FAF8F3; stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: round; }
.f-code { fill: var(--ink); }
.f-base { fill: var(--line-2); }
.f-ring { fill: none; stroke: var(--ink-3); stroke-width: 2; }
.f-hole { fill: var(--line-2); }
.format-note { margin-top: 10px; }

/* Filamentos */
.filament { display: grid; gap: 10px; margin-bottom: 10px; }
.filament-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name mini" "sw sw"; align-items: center; gap: 6px 10px; }
.filament-name { grid-area: name; font-size: .86rem; font-weight: 600; color: var(--ink-2); }
.swatches { grid-area: sw; display: flex; flex-wrap: wrap; gap: 6px; }
.color-mini { grid-area: mini; }
.color-mini input[type="color"] { width: 34px; height: 34px; border-radius: 50%; }
.color-mini input[type="color"]::-webkit-color-swatch { border-radius: 50%; }
.color-mini input[type="color"]::-moz-color-swatch { border-radius: 50%; }
.swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--sw); border: 1px solid rgba(21, 23, 28, .18); transition: transform .15s var(--ease-out), box-shadow .15s; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-btn); }
@media (hover: hover) { .swatch:hover { transform: scale(1.08); } }

.range { width: 100%; height: 44px; accent-color: var(--accent-btn); cursor: pointer; }

/* Comprobaciones */
.checks { list-style: none; padding: 0; display: grid; gap: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; font-size: .86rem; line-height: 1.45; }
.check-ico { flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; font-size: .72rem; font-weight: 800; color: #fff; }
.check--ok { background: var(--ok-soft); color: #14563A; }
.check--ok .check-ico { background: var(--ok); }
.check--warn { background: var(--warn-soft); color: #6B4400; }
.check--warn .check-ico { background: #C27C0E; }
.check--bad { background: var(--bad-soft); color: #8A1A12; }
.check--bad .check-ico { background: var(--bad); }

/* =============================================================
   6. La herramienta
   ============================================================= */
.tool-section { padding-bottom: 8px; }
.tool { position: relative; }
.noscript-msg { display: none; padding: 18px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); font-weight: 600; }
.no-js .noscript-msg { display: block; }
.no-js .tool-grid { display: none; }
.tool-flash { margin-bottom: 12px; padding: 10px 14px; border-radius: 12px; background: var(--bad-soft); color: #8A1A12; font-size: .92rem; font-weight: 500; }

.tool-grid {
  display: grid; gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "content" "preview" "design" "object";
}
.panel-content { grid-area: content; }
.panel-design { grid-area: design; }
.panel-object { grid-area: object; }
.preview-col { grid-area: preview; }

.panel, .preview-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 16px;
}
.panel-title { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.14rem; margin-bottom: 14px; letter-spacing: -.01em; }
.step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-family: var(--sans); font-size: .82rem; font-weight: 700; flex: none; }
.panel-content .group:first-of-type { margin-top: 0; }

/* Vista previa */
.pv-2d { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr); gap: 14px; align-items: center; }
.qr-frame { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.qr-box, .qr-box svg, .qr-box canvas { width: 100%; height: 100%; }
.qr-box { transition: opacity .2s; }
.qr-box.is-empty { opacity: .14; filter: grayscale(1); }
.qr-empty-msg { display: none; position: absolute; inset: 0; place-items: center; padding: 12px; text-align: center; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.qr-box.is-empty + .qr-empty-msg { display: grid; }
.pv-2d-side { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.pv-kicker { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.pv-note { font-size: .78rem; line-height: 1.35; min-height: 1em; }
.pv-note[data-level="bad"] { color: var(--bad); font-weight: 600; }
.pv-note[data-level="warn"] { color: var(--warn); }
.too-long { margin-top: 10px; font-size: .86rem; color: var(--bad); font-weight: 600; }

.viewer {
  position: relative; margin-top: 14px; aspect-ratio: 5 / 4; border-radius: 12px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 30%, #FFFFFF 0%, #F1EFE9 55%, #E5E2D9 100%);
  border: 1px solid var(--line); touch-action: none;
}
.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: 20px; text-align: center; font-size: .9rem; font-weight: 500; color: var(--ink-3); }
.viewer[data-state="ready"] .viewer-msg { display: none; }
.viewer[data-state="nogl"], .viewer[data-state="error"] { aspect-ratio: auto; min-height: 120px; touch-action: auto; }
.viewer[data-state="nogl"] .viewer-hint, .viewer[data-state="error"] .viewer-hint { display: none; }
.viewer-hint { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .85); border: 1px solid var(--line); font-size: .75rem; font-weight: 600; color: var(--ink-2); pointer-events: none; }
.viewer-hint svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viewer[data-busy]::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: busy 1s linear infinite; }
@keyframes busy { from { background-position: -50% 0; } to { background-position: 150% 0; } }
.pv-dims { margin: 10px 0 12px; font-size: .84rem; color: var(--ink-2); text-align: center; font-variant-numeric: tabular-nums; }
.pv-tip { margin-top: 8px; font-size: .8rem; color: var(--ink-3); text-align: center; line-height: 1.45; }
.pv-tip strong { color: var(--ink-2); }

.privacy { display: flex; align-items: flex-start; gap: 10px; margin-top: 16px; font-size: .88rem; color: var(--ink-2); max-width: 880px; }
.privacy svg { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: var(--ok); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.privacy strong { color: var(--ok); }

/* =============================================================
   7. Huecos de anuncios (marcadores)
   ============================================================= */
.ad-slot {
  display: flex; align-items: center; justify-content: center; width: 100%;
  border: 1.5px dashed #C8C2B3; border-radius: 12px; color: #8A8577;
  background: repeating-linear-gradient(-45deg, #F1EFE8 0 10px, #F6F5F1 10px 20px);
}
.ad-label { font-size: .74rem; font-weight: 800; letter-spacing: .22em; }
.ad-slot--leaderboard { min-height: 100px; max-width: 970px; margin: 28px auto 8px; }
.ad-slot--incontent { min-height: 250px; max-width: 760px; margin: 8px auto; }
.ad-slot--popup { width: min(300px, 100%); min-height: 250px; margin: 14px auto; }
.ad-slot--toast { min-height: 96px; }

.ad-dialog { border: 0; padding: 0; border-radius: 18px; width: min(380px, calc(100% - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(21, 23, 28, .45); }
.ad-dialog::backdrop { background: rgba(21, 23, 28, .55); }
.ad-dialog[open] { animation: pop .3s var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.ad-dialog-inner { position: relative; padding: 20px 18px 18px; text-align: center; }
.ad-dialog-title { font-weight: 700; padding: 0 30px; }
.ad-dialog-title span { color: var(--ok); }
.ad-dialog .btn { width: 100%; }
.ad-x { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #F0EEE8; font-size: 1.3rem; line-height: 1; color: var(--ink-2); }
.ad-x:hover { background: #E4E1D8; color: var(--ink); }
.ad-x-sm { top: -10px; right: -10px; width: 28px; height: 28px; font-size: 1.1rem; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(21, 23, 28, .12); }

.ad-toast {
  position: fixed; right: 16px; bottom: 16px; z-index: 50; width: min(320px, calc(100% - 32px));
  padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 16px 40px -12px rgba(21, 23, 28, .35);
  opacity: 0; transform: translateY(16px); transition: opacity .3s var(--ease-out), transform .3s var(--ease-out);
}
.ad-toast.is-in { opacity: 1; transform: none; }

/* =============================================================
   8. Secciones de contenido
   ============================================================= */
.section { padding: 52px 0; }
.section-alt { background: var(--bg-alt); }
.section-title { font-family: var(--display); font-weight: 800; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); letter-spacing: -.025em; }
.section-lead { margin-top: 8px; color: var(--ink-2); max-width: 60ch; }

.steps { list-style: none; padding: 0; display: grid; gap: 14px; margin-top: 26px; counter-reset: none; }
.step-card { position: relative; padding: 22px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.step-card svg { width: 44px; height: 44px; fill: none; stroke: var(--accent-btn); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.step-card h3 { font-size: 1.12rem; margin-bottom: 6px; }
.step-card p { color: var(--ink-2); font-size: .95rem; }
.step-num { position: absolute; top: 18px; right: 18px; font-family: var(--display); font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--bg-alt); }

.ideas { display: grid; gap: 14px; margin-top: 26px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.idea { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.idea-emoji { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); font-size: 22px; margin-bottom: 12px; }
.idea h3 { font-size: 1.06rem; margin-bottom: 4px; }
.idea p { color: var(--ink-2); font-size: .94rem; }

.prose { max-width: 780px; }
.prose > p { margin-top: 14px; color: var(--ink-2); line-height: 1.75; }
.prose h3 { margin-top: 28px; font-size: 1.18rem; }
.prose strong { color: var(--ink); }

.faq { margin-top: 20px; border-top: 1px solid var(--line-2); }
.faq details { border-bottom: 1px solid var(--line-2); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 2px; font-weight: 600; font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); font-weight: 500; font-size: 1.1rem; color: var(--ink-2); transition: transform .2s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 2px 18px; color: var(--ink-2); max-width: 70ch; }

.cta-end { text-align: center; }
.cta-end .section-lead { margin-inline: auto; }
.cta-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 90px; font-size: .88rem; color: var(--ink-2); }
.footer-inner { display: grid; gap: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.footer-small { font-size: .8rem; color: var(--ink-3); }

/* Páginas legales */
.legal { padding: 36px 0 60px; }
.legal h1 { font-family: var(--display); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem); margin-bottom: 8px; }
.legal h2 { font-size: 1.2rem; margin-top: 28px; }
.legal p, .legal li { color: var(--ink-2); margin-top: 10px; }
.legal ul { padding-left: 1.2em; }
.todo { background: var(--warn-soft); border-radius: 4px; padding: 0 4px; color: #6B4400; }

/* =============================================================
   9. Responsive
   ============================================================= */
@media (max-width: 719px) {
  .site-nav a.hide-sm { display: none; }
}
@media (max-width: 539px) {
  /* móvil: la herramienta y la vista previa del QR a la vista nada más entrar */
  .header-inner { min-height: 54px; }
  .brand { font-size: 1.02rem; gap: 8px; }
  .brand-mark { width: 26px; height: 26px; }
  .site-nav a { padding: 6px 8px; font-size: .86rem; white-space: nowrap; }
  .hero { padding: 16px 0 14px; }
  .eyebrow { display: none; }
  .lead { margin-top: 8px; font-size: .96rem; line-height: 1.5; }
  .panel-title { margin-bottom: 12px; }
  .tabs { margin-bottom: 10px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 10px; padding: 0 16px 2px; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}
@media (max-width: 380px) {
  .pv-2d { grid-template-columns: minmax(0, 140px) minmax(0, 1fr); }
  .tabs [role="tab"] { padding: 8px 12px; }
}
@media (min-width: 540px) {
  .row-2 { grid-template-columns: 1fr 1fr; }
  .row-center { align-items: end; }
  .panel, .preview-card { padding: 22px 22px; }
  .filament-row { grid-template-columns: 110px 1fr auto; grid-template-areas: "name sw mini"; }
}
@media (min-width: 720px) {
  .hero { padding: 40px 0 24px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .section { padding: 72px 0; }
  .ad-toast { right: 20px; bottom: 20px; }
}
@media (min-width: 960px) {
  .tool-grid {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 410px);
    grid-template-areas: "content preview" "design preview" "object preview";
    grid-template-rows: auto auto 1fr;
    gap: 16px 20px;
  }
  .preview-col { align-self: start; }
}
@media (min-width: 960px) and (min-height: 820px) {
  .preview-col { position: sticky; top: 16px; }
}

/* =============================================================
   10. Movimiento reducido (solo lo intrusivo)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .viewer[data-busy]::after { animation-duration: 2.4s; }
}
