/* styles.css · Logo Maker Vectorial Gratis · 1000HW
 * Cache-bust: ?v=4
 * Vanilla CSS · mobile-first · paleta 1000HW (void/acid/concrete/structure)
 * WCAG 2.1 AA compliant · prefers-reduced-motion respetado
 *
 * Diseño: wizard de 3 pasos (estilo → plantilla → editor) + preview live + export PNG/SVG/PDF.
 */

/* ============================================================
 * 0. CUSTOM PROPERTIES (design tokens)
 * ============================================================ */
:root {
  /* Paleta canónica 1000HW */
  --void:        #050505;
  --concrete:    #1A1A1E;
  --structure:   #2A2A30;
  --acid:        #CCFF00;
  --acid-dim:    #A8CC00;
  --softgray:    #9CA3AF;
  --text-light:  #E5E7EB;
  --text-mid:    #B5B7C0;
  --text-dim:    #6B6E78;
  --danger:      #FF6B6B;
  --warn:        #FFB74D;
  --success:     #4ADE80;
  --info:        #60A5FA;

  /* Tipografía */
  --font-display: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Monaco, Consolas, monospace;
  --font-body:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Espaciado */
  --space-1:  4px;
  --space-2:  8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Otros */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 14px;
  --shadow-md: 0 6px 22px rgba(0,0,0,0.45);
  --shadow-lg: 0 14px 50px rgba(0,0,0,0.55);

  /* Transiciones */
  --t-fast: 150ms cubic-bezier(.4,0,.2,1);
  --t-mid:  300ms cubic-bezier(.4,0,.2,1);
  --t-slow: 600ms cubic-bezier(.4,0,.2,1);
}

/* ============================================================
 * 1. RESET + BASE
 * ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background-color: var(--void);
  color: var(--text-light);
  line-height: 1.55;
  font-size: 16px;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(204, 255, 0, 0.05) 0%, transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(204, 255, 0, 0.03) 0%, transparent 40%);
  min-height: 100vh;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  line-height: 1.2;
}

p { margin: 0 0 var(--space-4); }

a {
  color: var(--acid);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--t-fast);
}
a:hover { color: var(--text-light); }
a:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  border-radius: 2px;
}

code {
  font-family: var(--font-mono);
  background: rgba(255,255,255,0.04);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ============================================================
 * 2. UTILIDADES + ACCESIBILIDAD
 * ============================================================ */
.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: absolute;
  left: -9999px;
  top: 0;
  background: var(--acid);
  color: var(--void);
  padding: var(--space-3) var(--space-4);
  z-index: 100;
  font-family: var(--font-mono);
  font-size: 13px;
  text-decoration: none;
}
.skip-link:focus {
  left: var(--space-3);
  top: var(--space-3);
}

::selection { background: var(--acid); color: var(--void); }

/* ============================================================
 * 3. LAYOUT (container)
 * ============================================================ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--space-5); }
}

/* ============================================================
 * 4. NAV
 * ============================================================ */
.nav {
  border-bottom: 1px solid var(--structure);
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: var(--space-3) var(--space-4);
  position: sticky;
  top: 0;
  z-index: 40;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.nav-back {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.nav-back:hover { color: var(--acid); }
.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.04em;
  color: var(--text-light);
}
.nav-brand .brand-acid { color: var(--acid); }

/* ============================================================
 * 5. HERO
 * ============================================================ */
.hero {
  padding: var(--space-7) 0 var(--space-5);
  border-bottom: 1px solid var(--structure);
}
.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 4px 10px;
  border: 1px solid var(--structure);
  color: var(--text-mid);
  background: var(--concrete);
  border-radius: var(--radius-sm);
}
.tag-acid {
  border-color: var(--acid);
  color: var(--acid);
  background: rgba(204, 255, 0, 0.08);
}
.tag-priv {
  border-color: var(--success);
  color: var(--success);
  background: rgba(74, 222, 128, 0.08);
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: var(--space-4);
}
.hero .accent { color: var(--acid); }
.hero-lede {
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--text-mid);
  max-width: 65ch;
  margin-bottom: var(--space-5);
}

.hero-disclaimer {
  background: rgba(204, 255, 0, 0.06);
  border-left: 3px solid var(--acid);
  padding: var(--space-4);
  border-radius: var(--radius);
  color: var(--text-light);
  max-width: 70ch;
  margin: 0;
  font-size: 14px;
}
.hero-disclaimer strong { color: var(--acid); }

/* ============================================================
 * 6. TOOL — Wizard de 3 pasos
 * ============================================================ */
.tool-section {
  padding: var(--space-6) 0;
}
.tool-card {
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}

/* Wizard progress */
.wizard-progress {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--structure);
}
.wizard-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: var(--void);
  border: 1px solid var(--structure);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.wizard-step.active {
  border-color: var(--acid);
  color: var(--acid);
  background: rgba(204, 255, 0, 0.06);
}
.wizard-step.done {
  border-color: var(--success);
  color: var(--success);
}
.wizard-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--structure);
  color: var(--text-mid);
  font-size: 10px;
  font-weight: 700;
}
.wizard-step.active .wizard-step-num {
  background: var(--acid);
  color: var(--void);
}
.wizard-step.done .wizard-step-num {
  background: var(--success);
  color: var(--void);
}

/* Wizard panels */
.wizard-panel {
  display: none;
}
.wizard-panel.active {
  display: block;
  animation: fadeIn 250ms ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .wizard-panel.active { animation: none; }
}

.panel-title {
  font-size: 22px;
  margin-bottom: var(--space-2);
  color: var(--text-light);
}
.panel-hint {
  color: var(--text-mid);
  font-size: 14px;
  margin-bottom: var(--space-5);
}

/* ============================================================
 * 6.1 PANEL 1 — Selector de estilo
 * ============================================================ */
.style-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 600px) {
  .style-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .style-grid { grid-template-columns: repeat(5, 1fr); }
}
.style-card {
  background: var(--void);
  border: 2px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--t-fast);
  text-align: left;
  font-family: inherit;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-height: 110px;
}
.style-card:hover {
  border-color: var(--text-mid);
}
.style-card:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.style-card.selected {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.04);
}
.style-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--text-light);
}
.style-card-desc {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.4;
}
.style-card-preview {
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--acid);
  letter-spacing: -0.05em;
  margin-bottom: var(--space-1);
}

/* ============================================================
 * 6.2 PANEL 2 — Catálogo de plantillas
 * ============================================================ */
.template-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 600px) {
  .template-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .template-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.template-card {
  background: white;
  border: 2px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
  aspect-ratio: 2 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.template-card svg {
  max-width: 100%;
  max-height: 100%;
  display: block;
}
.template-card:hover {
  border-color: var(--acid);
  transform: translateY(-2px);
}
.template-card:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.template-card.selected {
  border-color: var(--acid);
  box-shadow: 0 0 0 2px var(--acid);
}
.template-card-label {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: #999;
  background: rgba(255,255,255,0.85);
  padding: 1px 4px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ============================================================
 * 6.3 PANEL 3 — Editor + preview grande
 * ============================================================ */
.editor-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 900px) {
  .editor-layout {
    grid-template-columns: 1fr 320px;
  }
}

/* Preview grande */
.editor-preview {
  background: white;
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  position: relative;
  overflow: hidden;
}
.editor-preview svg {
  max-width: 100%;
  height: auto;
  display: block;
}
.editor-preview-meta {
  position: absolute;
  bottom: var(--space-2);
  left: var(--space-3);
  font-family: var(--font-mono);
  font-size: 10px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Sidebar de controles */
.editor-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.editor-section {
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-4);
}
.editor-section-title {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  margin: 0 0 var(--space-3);
}

/* Inputs */
.editor-input,
.editor-select {
  width: 100%;
  background: var(--concrete);
  color: var(--text-light);
  border: 1px solid var(--structure);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  min-height: 44px;
  transition: border-color var(--t-fast);
}
.editor-input:focus,
.editor-select:focus {
  border-color: var(--acid);
  outline: 2px solid var(--acid);
  outline-offset: 0;
}
.editor-label {
  display: block;
  font-size: 12px;
  color: var(--text-mid);
  margin-bottom: var(--space-2);
}

/* Color presets grid */
.color-presets {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-2);
}
.color-preset {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--t-fast);
  position: relative;
  padding: 0;
  min-height: 0;
}
.color-preset:hover {
  transform: scale(1.08);
}
.color-preset.selected {
  border-color: var(--text-light);
  transform: scale(1.08);
}
.color-preset.selected::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  text-shadow: 0 0 4px black;
  font-size: 18px;
}
.color-preset:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* Icon picker */
.icon-picker {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
}
@media (min-width: 380px) {
  .icon-picker {
    grid-template-columns: repeat(5, 1fr);
  }
}
.icon-btn {
  aspect-ratio: 1;
  background: var(--concrete);
  border: 2px solid var(--structure);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  transition: all var(--t-fast);
  min-height: 0;
}
.icon-btn svg {
  width: 100%;
  height: 100%;
  color: var(--text-mid);
}
.icon-btn:hover {
  border-color: var(--text-mid);
}
.icon-btn.selected {
  border-color: var(--acid);
  background: rgba(204, 255, 0, 0.06);
}
.icon-btn.selected svg {
  color: var(--acid);
}
.icon-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* Background toggle (white / transparent) */
.bg-options {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-2);
}
.bg-option {
  background: var(--concrete);
  border: 2px solid var(--structure);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-2);
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-mid);
  transition: all var(--t-fast);
  text-align: center;
  min-height: 44px;
}
.bg-option.selected {
  border-color: var(--acid);
  color: var(--acid);
  background: rgba(204, 255, 0, 0.06);
}
.bg-option:hover:not(.selected) {
  border-color: var(--text-mid);
  color: var(--text-light);
}
.bg-option-swatch {
  width: 24px;
  height: 24px;
  border: 1px solid var(--structure);
  margin: 0 auto var(--space-2);
  border-radius: 3px;
}
.bg-option-swatch.bg-white { background: white; }
.bg-option-swatch.bg-transparent {
  background: repeating-conic-gradient(#888 0% 25%, #444 0% 50%) 0/8px 8px;
}
.bg-option-swatch.bg-black { background: black; }

/* ============================================================
 * 7. EXPORT BAR
 * ============================================================ */
.export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--void);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
}
.export-btn {
  flex: 1;
  min-width: 110px;
  background: var(--concrete);
  color: var(--text-light);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}
.export-btn:hover {
  border-color: var(--acid);
  color: var(--acid);
}
.export-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.export-btn.export-primary {
  background: var(--acid);
  color: var(--void);
  border-color: var(--acid);
}
.export-btn.export-primary:hover {
  background: var(--acid-dim);
  border-color: var(--acid-dim);
}

/* Wizard nav buttons */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--structure);
}

.btn {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--t-fast);
  border: 1px solid transparent;
  min-height: 44px;
  min-width: 44px;
}
.btn-primary {
  background: var(--acid);
  color: var(--void);
  border-color: var(--acid);
}
.btn-primary:hover:not(:disabled) {
  background: var(--acid-dim);
  border-color: var(--acid-dim);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-ghost {
  background: transparent;
  color: var(--text-mid);
  border-color: var(--structure);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--text-mid);
  color: var(--text-light);
}

/* ============================================================
 * 8. CALLOUT (limitaciones)
 * ============================================================ */
.callout {
  background: rgba(255, 183, 77, 0.06);
  border: 1px solid rgba(255, 183, 77, 0.25);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-6) 0;
}
.callout h3 {
  margin: 0 0 var(--space-2);
  color: var(--warn);
  font-size: 17px;
}
.callout p {
  color: var(--text-mid);
  font-size: 14px;
  margin: 0;
}
.callout ul {
  color: var(--text-mid);
  font-size: 14px;
  padding-left: var(--space-5);
  margin: var(--space-2) 0 0 0;
}

/* ============================================================
 * 9. SECCIONES DE CONTENIDO
 * ============================================================ */
.content-section {
  margin: var(--space-7) 0;
}
.content-section h2 {
  font-size: clamp(20px, 2.5vw, 28px);
  margin-top: var(--space-6);
  margin-bottom: var(--space-3);
  color: var(--text-light);
}
.content-section h2:first-child { margin-top: 0; }
.content-section h3 {
  font-size: clamp(17px, 2vw, 22px);
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  color: var(--text-light);
}
.content-section p {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.6;
}
.content-section ul,
.content-section ol {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.65;
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}
.content-section li { margin-bottom: var(--space-2); }
.content-section strong { color: var(--text-light); }
.content-section a { color: var(--acid); }

.nota {
  border-left: 3px solid var(--acid);
  padding: var(--space-3) var(--space-4);
  background: rgba(204, 255, 0, 0.05);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-light);
}

/* FAQ */
.faq details {
  border-bottom: 1px solid var(--structure);
  padding: var(--space-3) 0;
}
.faq details:first-of-type {
  border-top: 1px solid var(--structure);
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text-light);
  font-size: 15px;
  list-style: none;
  padding: var(--space-3) var(--space-5) var(--space-3) 0;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--acid);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  transition: transform var(--t-fast);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  margin: var(--space-3) 0 0 0;
  font-size: 14px;
  color: var(--text-mid);
}
.faq summary:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Glosario */
.glossary {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-top: var(--space-3);
}
@media (min-width: 600px) {
  .glossary { grid-template-columns: 1fr 1fr; }
}
.glossary div {
  padding: var(--space-3) var(--space-4);
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
}
.glossary dt {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--acid);
  margin-bottom: var(--space-1);
}
.glossary dd {
  margin: 0;
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.5;
}

/* ============================================================
 * 10. FOOTER
 * ============================================================ */
footer {
  border-top: 1px solid var(--structure);
  padding: var(--space-5) var(--space-4);
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
footer .footer-disclaimer {
  margin-top: var(--space-2);
  text-transform: none;
  letter-spacing: 0.02em;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-mid);
}

/* ============================================================
 * 11. OFFLINE-READY BANNER (top, NO modal)
 * ============================================================ */
.offline-banner {
  position: fixed;
  top: var(--space-3);
  left: 50%;
  transform: translateX(-50%) translateY(-200%);
  background: var(--success);
  color: var(--void);
  padding: var(--space-3) var(--space-4) var(--space-3) var(--space-5);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: transform var(--t-mid);
  max-width: calc(100% - 32px);
}
.offline-banner.visible {
  transform: translateX(-50%) translateY(0);
}
.offline-banner-icon {
  font-size: 18px;
  font-weight: 700;
}
.offline-banner-text { white-space: nowrap; }
@media (max-width: 480px) {
  .offline-banner-text { white-space: normal; }
}
.offline-banner-close {
  background: transparent;
  border: 1px solid var(--void);
  color: var(--void);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  margin-left: var(--space-2);
  transition: background var(--t-fast);
}
.offline-banner-close:hover {
  background: var(--void);
  color: var(--success);
}
.offline-banner-close:focus-visible {
  outline: 2px solid var(--text-light);
  outline-offset: 2px;
}

/* ============================================================
 * 12. DONATION TOAST (bottom-right)
 * ============================================================ */
.donation-toast {
  position: fixed;
  bottom: var(--space-5);
  right: var(--space-5);
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  box-shadow: var(--shadow-lg);
  z-index: 45;
  max-width: calc(100% - 32px);
  transform: translateY(200%);
  opacity: 0;
  transition: transform var(--t-mid), opacity var(--t-mid);
}
.donation-toast.visible {
  transform: translateY(0);
  opacity: 1;
}
.donation-toast-icon {
  font-size: 28px;
  line-height: 1;
}
.donation-toast-body { flex: 1; }
.donation-toast-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-light);
}
.donation-toast-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.4;
  max-width: 320px;
}
.donation-toast-btn {
  display: inline-block;
  background: var(--acid);
  color: var(--void);
  text-decoration: none;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  transition: background var(--t-fast);
}
.donation-toast-btn:hover { background: var(--acid-dim); }
.donation-toast-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}
.donation-toast-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-left: var(--space-1);
}
.donation-toast-close:hover { color: var(--text-light); }
.donation-toast-close:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

@media (max-width: 480px) {
  .donation-toast {
    bottom: var(--space-3);
    right: var(--space-3);
    left: var(--space-3);
    max-width: none;
  }
  .donation-toast-icon { font-size: 22px; }
  .donation-toast-subtitle { max-width: none; }
  .offline-banner {
    left: var(--space-3);
    right: var(--space-3);
    transform: translateX(0) translateY(-200%);
    max-width: none;
    width: auto;
    padding: var(--space-3) var(--space-4);
    font-size: 13px;
    line-height: 1.3;
  }
  .offline-banner.visible {
    transform: translateX(0) translateY(0);
  }
  .offline-banner-text {
    white-space: normal;
    flex: 1;
  }
}

/* ============================================================
 * 13. A11Y + FOCUS
 * ============================================================ */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* ============================================================
 * 14. PREFERS-REDUCED-MOTION
 * ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .offline-banner,
  .donation-toast {
    transition: none !important;
  }
}

/* ============================================================
 * 15. LANG SWITCH (ES/EN)
 * ============================================================ */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  align-items: center;
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-radius: var(--radius);
  padding: 2px;
}
.lang-btn {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 10px;
  min-height: 28px;
  min-width: 36px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--t-fast);
}
.lang-btn:hover { color: var(--text-light); }
.lang-btn[aria-pressed="true"] {
  background: var(--acid);
  color: var(--void);
}
.lang-btn:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 2px;
}

/* ============================================================
 * 16. MOBILE TWEAKS
 * ============================================================ */
@media (max-width: 600px) {
  .wizard-progress {
    flex-direction: column;
    gap: var(--space-1);
  }
  .wizard-step {
    font-size: 9px;
  }
  .style-grid {
    grid-template-columns: 1fr 1fr;
  }
  .style-card {
    min-height: 90px;
  }
  .wizard-nav {
    flex-direction: column-reverse;
  }
  .wizard-nav .btn { width: 100%; }
  .editor-preview {
    min-height: 180px;
    padding: var(--space-3);
  }
  .export-bar {
    flex-direction: column;
  }
  .export-btn { width: 100%; }
}

/* ============================================================
 * 17. PRINT (cuando se imprime la página)
 * NO confundir con exportar PDF del logo, que se hace por window.print()
 * con un iframe y un SVG especialmente diseñado.
 * ============================================================ */
@media print {
  body { background: white; color: black; }
  .nav, .hero-disclaimer, .tool-section, .callout, .offline-banner, .donation-toast,
  footer, .wizard-nav, .wizard-progress, .export-bar, .editor-sidebar { display: none; }
  .content-section { color: black; }
  .content-section h2, .content-section h3, .content-section p, .content-section li { color: black; }
}

/* ============================================================
 * 18. TOAST de mensaje (info/success/error durante uso)
 * ============================================================ */
.toast-msg {
  position: fixed;
  bottom: calc(var(--space-5) + 130px);
  right: var(--space-4);
  left: auto;
  transform: translateX(120%);
  background: var(--concrete);
  border: 1px solid var(--structure);
  border-left: 3px solid var(--info);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  color: var(--text-light);
  font-size: 14px;
  z-index: 44;
  box-shadow: var(--shadow-md);
  max-width: 320px;
  transition: transform var(--t-mid);
}
.toast-msg.visible {
  transform: translateX(0);
}
@media (max-width: 480px) {
  .toast-msg {
    left: var(--space-3);
    right: var(--space-3);
    max-width: none;
    /* Bottom se mantiene alto para no chocar con donation-toast (que va pegado abajo) */
    bottom: calc(var(--space-3) + 130px);
  }
}
.toast-msg.success { border-left-color: var(--success); }
.toast-msg.error { border-left-color: var(--danger); }
.toast-msg.warn { border-left-color: var(--warn); }