/* =============================================================
   TINTA PREVIA — hoja de estilo única
   1 Tokens · 2 Reset · 3 Utilidades · 4 Tipografía · 5 Componentes
   6 Secciones · 7 Efectos · 8 Responsive · 9 Reduced motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --ink:        #0d0c0f;   /* fondo tinta */
  --ink-2:      #141319;   /* superficie */
  --ink-3:      #1c1a22;   /* superficie elevada */
  --line:       #2c2933;
  --line-soft:  #232028;

  --cream:      #f3ece3;
  --cream-dim:  #cdc5bb;
  --muted:      #948d9c;

  --red:        #d6273b;   /* rojo tatuaje tradicional */
  --red-soft:   #ec5163;
  --red-deep:   #96101f;

  --green:      #3fa34d;
  --yellow:     #c9c02f;
  --orange:     #e08a1e;

  --display: "Cinzel", Georgia, "Times New Roman", serif;
  --sans:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --script:  "Great Vibes", cursive;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 9px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.7);
  --shadow-2: 0 2px 6px rgba(0,0,0,.45), 0 22px 50px -22px rgba(0,0,0,.9);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  color: var(--cream);
  background: var(--ink);
  background-image:
    radial-gradient(1100px 620px at 50% -10%, rgba(214,39,59,.10), transparent 62%),
    radial-gradient(760px 460px at 92% 8%, rgba(150,16,31,.09), transparent 66%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.12; letter-spacing: -0.015em; }
::selection { background: var(--red); color: #fff; }

:focus-visible {
  outline: 2px solid var(--red-soft);
  outline-offset: 3px;
  border-radius: 5px;
}

/* =============================================================
   3. Utilidades
   ============================================================= */
.wrap { width: min(1240px, 100% - (var(--gutter) * 2)); margin-inline: auto; }

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .65rem 1.1rem; border-radius: 8px;
  background: var(--cream); color: var(--ink); font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.nojs-note { color: var(--muted); font-size: .92rem; padding: 1.4rem 0; }

/* =============================================================
   4. Tipografía
   ============================================================= */
h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.85rem, 5.1vw, 3.15rem);
  letter-spacing: -0.02em;
}
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.42rem, 3.1vw, 2.05rem);
}
h3 { font-size: clamp(1.06rem, 2vw, 1.25rem); font-weight: 700; letter-spacing: -0.005em; }

.section-head { max-width: 62ch; margin-bottom: 1.9rem; }
.section-head h2 { margin-bottom: .55rem; }
.section-sub, .panel-sub { color: var(--cream-dim); font-size: .97rem; }
.panel-sub { font-size: .9rem; }

/* =============================================================
   5. Componentes
   ============================================================= */

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(13,12,15,.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 60px;
}
.logo { display: inline-flex; align-items: center; gap: .55rem; }
.logo-mark { color: var(--red); display: grid; place-items: center; }
.logo-text {
  font-family: var(--display); font-weight: 700; font-size: 1.08rem;
  letter-spacing: .01em;
}
.logo-text em { font-style: normal; color: var(--red); }

.header-nav { display: flex; gap: 1.25rem; font-size: .88rem; }
.header-nav a { color: var(--cream-dim); transition: color .2s var(--ease-out); }
.header-nav a:hover { color: var(--cream); }

/* ---------- botones ---------- */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.2rem; border-radius: 10px;
  font-weight: 600; font-size: .94rem; letter-spacing: .005em;
  transition: transform .18s var(--ease-out), background .2s var(--ease-out),
              border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
.btn-primary {
  background: var(--red); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,.14) inset, 0 10px 26px -14px var(--red);
}
.btn-primary:hover { background: var(--red-soft); transform: translateY(-1px); }
.btn-secondary {
  background: var(--ink-3); color: var(--cream);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: #4a4553; transform: translateY(-1px); }
.btn-primary:active, .btn-secondary:active { transform: translateY(0); }

.btn-ghost {
  padding: .6rem .95rem; border-radius: 9px;
  border: 1px solid var(--line); color: var(--cream-dim);
  font-size: .87rem; font-weight: 500;
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.btn-ghost:hover { border-color: #4a4553; color: var(--cream); }

.btn-mini {
  padding: .3rem .6rem; border-radius: 7px; font-size: .78rem; font-weight: 600;
  border: 1px solid var(--line); color: var(--cream-dim);
}
.btn-mini:hover { border-color: var(--red); color: var(--red-soft); }

/* =============================================================
   6. Secciones
   ============================================================= */

/* ---------- hero + tarjeta de entrada ---------- */
.hero { padding: clamp(2rem, 5.5vw, 3.4rem) 0 1.6rem; }
.hero h1 { margin-bottom: .8rem; }
.hero h1::after {
  content: ""; display: block; width: 62px; height: 3px; margin-top: .85rem;
  background: linear-gradient(90deg, var(--red), transparent);
  border-radius: 3px;
}
.hero-sub { max-width: 68ch; color: var(--cream-dim); font-size: clamp(.97rem, 1.5vw, 1.08rem); }
.hero-sub strong { color: var(--cream); font-weight: 600; }

.tool-card {
  margin-top: 1.7rem; padding: clamp(1.1rem, 2.6vw, 1.7rem);
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}
.input-label {
  display: block; font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin-bottom: .55rem;
}
.input-row { display: flex; gap: .6rem; align-items: stretch; }
#texto {
  flex: 1 1 auto; min-width: 0;
  padding: .95rem 1.05rem;
  background: var(--ink); border: 1px solid var(--line);
  border-radius: 11px;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem); font-weight: 500;
  transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
#texto::placeholder { color: #5f5869; font-weight: 400; }
#texto:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(214,39,59,.18); }

.input-help { margin-top: .5rem; font-size: .82rem; color: var(--muted); }

.ideas { margin-top: 1.15rem; display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.ideas-title { font-size: .82rem; color: var(--muted); font-weight: 600; }
.ideas-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
  display: inline-flex; align-items: baseline; gap: .38rem;
  padding: .4rem .78rem; border-radius: 999px;
  background: var(--ink); border: 1px solid var(--line);
  font-size: .85rem; color: var(--cream-dim);
  transition: border-color .2s var(--ease-out), color .2s var(--ease-out),
              background .2s var(--ease-out);
}
.chip small { color: var(--muted); font-size: .78em; }
button.chip:hover { border-color: var(--red); color: var(--cream); background: rgba(214,39,59,.10); }

.privacy-badge {
  margin-top: 1.15rem; padding-top: 1rem;
  border-top: 1px dashed var(--line);
  font-size: .86rem; color: var(--cream-dim);
}
.privacy-badge strong { color: var(--cream); }

/* ---------- workspace ---------- */
.workspace-section { padding: 1.4rem 0 2rem; }
.workspace { display: grid; gap: 1.2rem; }

.panel {
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1rem, 2.4vw, 1.5rem);
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.panel-head { margin-bottom: 1.1rem; }
.panel-head h2 { font-size: clamp(1.18rem, 2.4vw, 1.5rem); margin-bottom: .35rem; }

/* En móvil, la previsualización del cuerpo va primero */
.panel-body { order: -1; }

/* ---------- controles de tipografías ---------- */
.font-controls { margin-bottom: 1rem; }
.search-wrap { position: relative; }
.search-icon {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none;
}
#buscar-fuente {
  width: 100%; padding: .72rem .9rem .72rem 2.5rem;
  background: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; font-size: .94rem;
}
#buscar-fuente::placeholder { color: #5f5869; }
#buscar-fuente:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(214,39,59,.15); }
#buscar-fuente::-webkit-search-cancel-button { filter: invert(.6); }

.cat-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.cat-chip {
  padding: .36rem .72rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--ink);
  font-size: .8rem; color: var(--cream-dim); font-weight: 500;
  transition: all .2s var(--ease-out);
}
.cat-chip:hover { border-color: #4a4553; color: var(--cream); }
.cat-chip.is-active {
  background: var(--red); border-color: var(--red); color: #fff; font-weight: 600;
}
.font-count { margin-top: .7rem; font-size: .8rem; color: var(--muted); }

/* ---------- rejilla de tipografías ---------- */
.font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .6rem;
  max-height: 620px; overflow-y: auto;
  padding-right: .3rem;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.font-grid::-webkit-scrollbar { width: 8px; }
.font-grid::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

.font-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: .45rem;
  min-height: 104px; padding: .7rem .8rem; text-align: left;
  background: var(--ink); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out),
              transform .18s var(--ease-out);
}
.font-card:hover { border-color: #4a4553; background: var(--ink-3); transform: translateY(-2px); }
.font-card.is-active {
  border-color: var(--red);
  background: rgba(214,39,59,.10);
  box-shadow: 0 0 0 1px var(--red) inset;
}
.font-sample {
  font-size: 1.7rem; line-height: 1.25; color: var(--cream);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  /* Evita el salto brusco mientras carga la tipografía */
  transition: opacity .25s var(--ease-out);
}
.font-name {
  font-size: .72rem; color: var(--muted); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.font-card.is-active .font-name { color: var(--red-soft); font-weight: 600; }
.font-empty { color: var(--muted); font-size: .92rem; padding: 1.5rem 0; }

/* ---------- panel del cuerpo ---------- */
.zone-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.zone-tab {
  padding: .48rem .9rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--ink);
  font-size: .85rem; font-weight: 500; color: var(--cream-dim);
  transition: all .2s var(--ease-out);
}
.zone-tab:hover { border-color: #4a4553; color: var(--cream); }
.zone-tab.is-active { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }

.canvas-frame {
  position: relative;
  background: #100f13;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
#lienzo {
  width: 100%; height: auto;
  cursor: grab;
  /* superficie de manipulación: el arrastre del texto no debe desplazar la página */
  touch-action: none;
  -webkit-user-select: none; user-select: none;
}
#lienzo.is-dragging { cursor: grabbing; }

.drag-hint {
  display: flex; align-items: flex-start; gap: .55rem;
  margin-top: .8rem; padding: .6rem .75rem;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: .8rem; color: var(--muted); line-height: 1.5;
}
.drag-hint svg { flex: 0 0 auto; margin-top: .18rem; color: var(--red-soft); }
.drag-hint strong { color: var(--cream-dim); }

.btn-reset-pos { margin-top: .7rem; }

.slider-row + .slider-row { margin-top: .6rem; }
.slider-row output { min-width: 4ch; }

.rot-presets {
  display: flex; flex-wrap: wrap; align-items: center; gap: .35rem;
  margin-top: .8rem;
}
.rot-presets-label { font-size: .78rem; color: var(--muted); margin-right: .1rem; }
.canvas-caption {
  position: absolute; left: .7rem; bottom: .7rem;
  padding: .3rem .65rem; border-radius: 7px;
  background: rgba(13,12,15,.78);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: .74rem; color: var(--cream-dim); letter-spacing: .01em;
}

.body-controls { margin-top: 1rem; }
.slider-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem;
  font-size: .85rem; color: var(--cream-dim);
}
.slider-row output {
  min-width: 2.4ch; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--cream); font-weight: 600;
}
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 4px;
  background: var(--line); cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--ink-2);
  box-shadow: 0 2px 6px rgba(0,0,0,.5);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--ink-2);
}

.preview-source {
  margin-top: .85rem; padding: .55rem .7rem;
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem;
  background: rgba(214,39,59,.09); border: 1px solid rgba(214,39,59,.3);
  border-radius: 9px; font-size: .82rem;
}
.ps-label { color: var(--cream-dim); }
.preview-source strong { color: var(--red-soft); }

.body-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.body-actions .btn-primary, .body-actions .btn-secondary { flex: 1 1 160px; }
.action-note { margin-top: .6rem; font-size: .8rem; color: var(--muted); min-height: 1.2em; }
.action-note.is-ok { color: #6cc47a; }

/* ---------- símbolos ---------- */
.symbols-section { padding: 2rem 0; }
.symbol-grid {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.symbol-card {
  display: flex; flex-direction: column;
  padding: 1.05rem 1.1rem;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.sym-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; margin-bottom: .2rem; }
.sym-title { font-family: var(--display); font-size: 1.04rem; font-weight: 700; }
.sym-tag {
  font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; white-space: nowrap;
}
.sym-note { font-size: .8rem; color: var(--muted); margin-bottom: .8rem; }

.sym-out {
  padding: .85rem .9rem; margin-bottom: .75rem;
  background: var(--ink); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: 1.5rem; line-height: 1.55; color: var(--cream);
  word-break: break-word; min-height: 3.1em;
  display: flex; align-items: center;
}
.sym-out.is-empty { font-size: .88rem; color: var(--muted); font-style: italic; }
.sym-out[data-script="runic"]   { font-family: "Noto Sans Runic", "Segoe UI Historic", serif; letter-spacing: .06em; }
.sym-out[data-script="braille"] { font-family: "Noto Sans Symbols 2", "Segoe UI Symbol", serif; letter-spacing: .04em; }
.sym-out[data-script="kana"]    { font-family: "Noto Sans JP", "Yu Gothic", "Hiragino Kaku Gothic ProN", sans-serif; }
.sym-out[data-script="morse"]   { font-family: "Special Elite", ui-monospace, monospace; font-size: 1.16rem; letter-spacing: .02em; }
.sym-out[data-script="roman"]   { font-family: "Cinzel", serif; font-weight: 700; letter-spacing: .06em; }
.sym-out[data-script="greek"],
.sym-out[data-script="cyr"]     { font-family: "Marcellus", Georgia, serif; letter-spacing: .04em; }

.sym-back {
  padding: .6rem .75rem; margin-bottom: .8rem;
  background: rgba(255,255,255,.028);
  border-left: 3px solid var(--line);
  border-radius: 0 8px 8px 0;
  font-size: .84rem; color: var(--cream-dim);
}
.sym-back b { display: block; font-size: .69rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.sym-back.is-ok  { border-left-color: var(--green); }
.sym-back.is-warn { border-left-color: var(--orange); }
.sym-verdict { display: block; margin-top: .35rem; font-size: .78rem; }
.sym-verdict.ok   { color: #6cc47a; }
.sym-verdict.warn { color: #e9a94b; }
.sym-verdict.info { color: var(--cream-dim); }
.sym-back.is-info { border-left-color: #5a7fa8; }

.sym-meanings { margin-bottom: .85rem; }
.sym-meanings b { display: block; font-size: .69rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.rune-list { display: flex; flex-wrap: wrap; gap: .35rem; }
.rune-item {
  display: inline-flex; align-items: baseline; gap: .3rem;
  padding: .22rem .5rem; border-radius: 7px;
  background: var(--ink); border: 1px solid var(--line-soft);
  font-size: .74rem; color: var(--cream-dim);
}
.rune-item i {
  font-style: normal; font-size: 1.05rem; color: var(--cream);
  font-family: "Noto Sans Runic", "Segoe UI Historic", serif;
}
.rune-item em { font-style: normal; color: var(--muted); }

.sym-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: auto; }
.sym-actions button {
  padding: .46rem .78rem; border-radius: 8px;
  border: 1px solid var(--line); background: var(--ink);
  font-size: .8rem; font-weight: 600; color: var(--cream-dim);
  transition: all .2s var(--ease-out);
}
.sym-actions button:hover { border-color: var(--red); color: var(--red-soft); }
.sym-actions button.is-done { border-color: var(--green); color: #6cc47a; }

/* ---------- mapa de dolor ---------- */
.pain-section { padding: 2rem 0; }
.pain-layout { display: grid; gap: 1.4rem; align-items: start; }
.pain-figure {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem;
  box-shadow: var(--shadow-1);
}
.body-svg { width: 100%; max-width: 330px; height: auto; margin: 0 auto; }
.pain-zone { cursor: pointer; transition: opacity .18s var(--ease-out); }
.pain-zone:hover { opacity: .72; }
.pain-zone.is-active { opacity: .55; }
.zone-hit { fill: transparent; cursor: pointer; }
.zone-ring {
  fill: none; stroke: #fff; stroke-width: 3;
  opacity: 0; transition: opacity .2s var(--ease-out);
  pointer-events: none;
}
.zone-ring.is-active { opacity: .9; }
.body-outline { pointer-events: none; }

.pain-legend {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: center;
  list-style: none; padding: 0; margin-top: 1rem;
  font-size: .78rem; color: var(--cream-dim);
}
.pain-legend li { display: inline-flex; align-items: center; gap: .4rem; }
.pain-legend i { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }

.pain-info {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(1.1rem, 2.4vw, 1.6rem);
  box-shadow: var(--shadow-1);
  min-height: 220px;
}
.pain-hint { color: var(--muted); font-size: .95rem; }
.pain-name { font-family: var(--display); font-size: 1.45rem; font-weight: 700; margin-bottom: .1rem; }
.pain-level-line { display: flex; align-items: baseline; gap: .5rem; margin: .55rem 0 .7rem; }
.pain-level-num { font-size: 2.5rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.pain-level-max { color: var(--muted); font-size: .92rem; }
.pain-level-word { margin-left: auto; font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

.pain-scale { display: flex; gap: 4px; margin-bottom: .9rem; }
.pain-scale span {
  flex: 1; height: 9px; border-radius: 3px;
  background: var(--line-soft); transition: background .25s var(--ease-out);
}
.pain-desc { font-size: .95rem; color: var(--cream-dim); }
.pain-compare { margin-top: .9rem; padding-top: .8rem; border-top: 1px solid var(--line-soft); font-size: .84rem; color: var(--muted); }

.pain-disclaimer {
  margin-top: 1.3rem; padding: .95rem 1.1rem;
  background: rgba(255,255,255,.025); border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  font-size: .84rem; color: var(--muted);
}
.pain-disclaimer strong { color: var(--cream-dim); }

/* ---------- cómo funciona ---------- */
.how-section { padding: 2.2rem 0; }
.how-steps {
  list-style: none; padding: 0; display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.how-steps li {
  position: relative; padding: 1.5rem 1.2rem 1.3rem;
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius);
}
.how-num {
  position: absolute; top: -14px; left: 1.2rem;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--red); color: #fff;
  font-family: var(--display); font-weight: 700; font-size: .95rem;
}
.how-icon { width: 34px; height: 34px; color: var(--red-soft); margin-bottom: .7rem; }
.how-steps h3 { margin-bottom: .35rem; }
.how-steps p { font-size: .9rem; color: var(--cream-dim); }
.how-steps em { color: var(--cream); font-style: normal; }

/* ---------- texto SEO ---------- */
.prose-section { padding: 2rem 0; }
.prose { max-width: 74ch; }
.prose h2 { margin-bottom: 1.1rem; }
.prose h3 {
  margin: 1.9rem 0 .6rem; color: var(--cream);
  font-family: var(--display); font-size: 1.16rem;
}
.prose p { color: var(--cream-dim); margin-bottom: .9rem; font-size: .97rem; }
.prose strong { color: var(--cream); font-weight: 600; }
.prose em { color: var(--cream); font-style: italic; }

/* ---------- FAQ ---------- */
.faq-section { padding: 2rem 0 3rem; }
.faq-list { max-width: 82ch; display: grid; gap: .55rem; }
.faq-list details {
  background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden;
}
.faq-list summary {
  padding: .95rem 1.1rem; cursor: pointer; list-style: none;
  font-weight: 600; font-size: .96rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: color .2s var(--ease-out);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; flex: 0 0 auto;
  font-size: 1.35rem; line-height: 1; color: var(--red);
  transition: transform .25s var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:hover { color: var(--red-soft); }
.faq-list details p {
  padding: 0 1.1rem 1.05rem; font-size: .92rem; color: var(--cream-dim);
}

/* ---------- huecos de publicidad ---------- */
.ad-slot {
  position: relative;
  display: grid; place-items: center; gap: .3rem;
  margin: 1.9rem 0;
  border: 2px dashed #55506180; border-radius: var(--radius-sm);
  /* trama diagonal: deja claro que es un hueco reservado, no un fallo de diseño */
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,.030) 0 10px, rgba(255,255,255,0) 10px 20px),
    rgba(255,255,255,.028);
}
.ad-leaderboard { min-height: 110px; }
.ad-incontent   { min-height: 270px; }
.ad-label {
  font-size: .82rem; letter-spacing: .3em; text-transform: uppercase;
  color: #9a92a8; font-weight: 800;
}
.ad-format {
  font-size: .72rem; letter-spacing: .04em; color: #6f6880;
}
.ad-toast {
  position: fixed; right: 14px; bottom: 14px; z-index: 80;
  width: min(300px, calc(100vw - 28px)); min-height: 110px;
  display: grid; place-items: center; gap: .3rem;
  padding: 1.1rem;
  background:
    repeating-linear-gradient(45deg,
      rgba(255,255,255,.030) 0 10px, rgba(255,255,255,0) 10px 20px),
    var(--ink-3);
  border: 2px dashed #55506180;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2);
  animation: toastIn .45s var(--ease-out) both;
}
.ad-toast[hidden] { display: none; }
.ad-toast-close {
  position: absolute; top: 4px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 1.15rem; line-height: 1; color: var(--muted);
  transition: background .2s var(--ease-out), color .2s var(--ease-out);
}
.ad-toast-close:hover { background: rgba(255,255,255,.08); color: var(--cream); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 2rem 0 2.4rem; margin-top: 1rem; }
.footer-inner { display: grid; gap: .7rem; }
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 1.05rem; }
.footer-brand em { font-style: normal; color: var(--red); }
.footer-note { font-size: .84rem; color: var(--muted); max-width: 60ch; }
.footer-links { display: flex; gap: 1.1rem; font-size: .84rem; }
.footer-links a { color: var(--cream-dim); border-bottom: 1px solid transparent; }
.footer-links a:hover { color: var(--cream); border-bottom-color: var(--red); }

/* ---------- páginas legales ---------- */
.legal-page { padding: 2.4rem 0 3rem; }
.legal-page .prose h1 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 1rem; }
.legal-page .prose h2 { font-size: 1.2rem; margin: 1.8rem 0 .55rem; }
.legal-page .prose ul { color: var(--cream-dim); padding-left: 1.2rem; margin-bottom: .9rem; font-size: .95rem; }
.legal-page .prose li { margin-bottom: .35rem; }
.todo-owner {
  padding: .8rem 1rem; margin-bottom: 1.4rem;
  background: rgba(224,138,30,.09); border: 1px solid rgba(224,138,30,.34);
  border-radius: var(--radius-sm); font-size: .87rem; color: #e9a94b;
}

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .footer-note { grid-column: 1 / -1; order: 3; }
}

@media (max-width: 719px) {
  .header-nav { display: none; }
}

@media (min-width: 720px) {
  .pain-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .font-grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
}

@media (min-width: 960px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 452px); }
  .panel-body { order: 0; position: sticky; top: 74px; }
  .font-grid { max-height: 560px; }
}

@media (min-width: 1280px) {
  .workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); }
  .font-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); max-height: 620px; }
}

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