/* ═══════════════════════════════════════════════════════════════
   GabrielDesigns — Design system v2
   Dirección: "Y2K Playground × Soft Brutalism × Glass Bento"
   Vibe: BeReal × Figma × Spotify Wrapped. Cada elemento es un
   sticker pegado al feed: borde chunky, doble sombra apilada,
   micro-tilt, tipografía display oversized.
   ═══════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────────────────────────
   1. TOKENS — variables CSS
   ────────────────────────────────────────────────────────────── */
:root {
  /* Color primitives — paleta sin rosa: azul, lila, violeta, verde, naranja */
  --c-hot:        #7C3AED;   /* (legacy alias) ahora violeta — brand principal */
  --c-hot-dk:     #5B21B6;
  --c-hot-soft:   #E9DDFD;
  --c-violet:     #7C3AED;   /* electric violet */
  --c-violet-dk:  #5B21B6;
  --c-violet-soft:#E9DDFD;
  --c-lila:       #A78BFA;   /* lila claro */
  --c-azul:       #3B82F6;   /* azul vibrante */
  --c-azul-dk:    #1E40AF;
  --c-cyber:      #00D9FF;   /* cyan eléctrico */
  --c-verde:      #22C55E;   /* verde principal */
  --c-mint:       #4ADE80;   /* verde menta */
  --c-lime:       #C4FF3D;   /* acid lime — acento */
  --c-sun:        #FFD93D;   /* amarillo sol */
  --c-naranja:    #FB923C;   /* naranja cálido */
  --c-naranja-dk: #EA580C;
  --c-coral:      #FB923C;   /* alias legacy → ahora naranja */
  --c-ink:        #14142B;   /* deep navy ink — no negro puro */
  --c-paper:      #FAF7F2;   /* paper warm */

  /* Aliases retro-compatibles (HTML inline + bg-1..8 los usan) */
  --pink:     var(--c-violet);   /* legacy: el "pink" ahora es violeta */
  --pink-2:   var(--c-lila);
  --violet:   var(--c-violet);
  --violet-2: var(--c-lila);
  --cyan:     var(--c-cyber);
  --cyan-2:   #4FE5FF;
  --lime:     var(--c-lime);
  --yellow:   var(--c-sun);
  --orange:   var(--c-naranja);
  --mint:     var(--c-mint);
  --azul:     var(--c-azul);
  --verde:    var(--c-verde);

  /* Gradients firmados — sin rosa, basados en azul · lila · violeta · verde · naranja */
  --grad-hot:     linear-gradient(135deg, #3B82F6 0%, #7C3AED 55%, #FB923C 100%);   /* azul → violeta → naranja */
  --grad-sunset:  linear-gradient(135deg, #FB923C, #7C3AED);                        /* naranja → violeta */
  --grad-lime:    linear-gradient(135deg, #C4FF3D, #00D9FF);                        /* lima → cyan */
  --grad-violet:  linear-gradient(135deg, #7C3AED, #3B82F6);                        /* violeta → azul */
  --grad-aurora:  linear-gradient(135deg, #22C55E 0%, #A78BFA 50%, #FB923C 100%);   /* verde → lila → naranja */
  --grad-cream:   linear-gradient(135deg, #FFD93D, #FB923C);                        /* sol → naranja */

  /* Surfaces — LIGHT */
  --bg:           #FAF7F2;
  --bg-soft:      #F2EFE7;
  --surface:      #FFFFFF;
  --surface-2:    #F6F3EC;
  --surface-3:    #ECE7DC;
  --ink:          #14142B;
  --ink-soft:     #4A4A6A;
  --ink-mute:     #8B8BA8;
  --border:       #14142B;            /* sólido para el efecto sticker */
  --border-soft:  rgba(20, 20, 43, 0.10);
  --border-strong:rgba(124, 58, 237, 0.35);

  /* SOMBRAS — el alma del sistema "sticker" */
  --stick-color:  rgba(20, 20, 43, 0.95);   /* sombra hard pegada */
  --shadow-xs:    0 1px 2px rgba(20, 20, 43, 0.06);
  --shadow-sm:    0 6px 16px -6px rgba(20, 20, 43, 0.18);
  --shadow-md:    0 14px 32px -12px rgba(20, 20, 43, 0.22);
  --shadow-lg:    0 28px 60px -18px rgba(20, 20, 43, 0.30);
  --shadow-glow:  0 0 0 4px rgba(124, 58, 237, 0.22);

  /* Sombras sticker: hard offset + soft drop, capas apiladas */
  --stick-1:      4px 4px 0 var(--stick-color), 0 8px 20px -8px rgba(20, 20, 43, 0.20);
  --stick-2:      6px 6px 0 var(--stick-color), 0 14px 30px -10px rgba(20, 20, 43, 0.25);
  --stick-3:      8px 8px 0 var(--stick-color), 0 24px 50px -14px rgba(20, 20, 43, 0.30);
  --stick-hot:    6px 6px 0 #14142B, 0 20px 40px -12px rgba(124, 58, 237, 0.55);
  --stick-violet: 6px 6px 0 #14142B, 0 20px 40px -12px rgba(124, 58, 237, 0.55);
  --stick-lime:   5px 5px 0 #14142B, 0 16px 36px -10px rgba(196, 255, 61, 0.50);

  /* Radius */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-2xl: 40px;
  --r-pill: 999px;
  /* Aliases viejos */
  --radius-sm: var(--r-md);
  --radius:    var(--r-lg);
  --radius-lg: var(--r-xl);
  --radius-xl: var(--r-2xl);

  /* Type scale (modular 1.25) */
  --fs-xs:   12px;
  --fs-sm:   13.5px;
  --fs-base: 15.5px;
  --fs-md:   18px;
  --fs-lg:   22px;
  --fs-xl:   28px;
  --fs-2xl:  36px;
  --fs-3xl:  clamp(40px, 5vw, 64px);
  --fs-4xl:  clamp(54px, 8.5vw, 112px);

  /* Spacing (escala 4) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* Motion */
  --ease:     cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-med:  250ms;
  --dur-slow: 400ms;
}

/* DARK MODE — sólo redefine semánticos, no primitives */
[data-theme="dark"] {
  --bg:           #0A0A1A;
  --bg-soft:      #11112B;
  --surface:      #181834;
  --surface-2:    #1F1F40;
  --surface-3:    #2A2A55;
  --ink:          #F4F2FF;
  --ink-soft:     #B5B1D8;
  --ink-mute:     #7A75A6;
  --border:       #F4F2FF;            /* borde claro sobre fondo oscuro */
  --border-soft:  rgba(244, 242, 255, 0.10);
  --border-strong:rgba(167, 139, 250, 0.45);

  --stick-color:  rgba(244, 242, 255, 0.95);
  --shadow-xs:    0 1px 2px rgba(0, 0, 0, 0.40);
  --shadow-sm:    0 6px 16px -6px rgba(0, 0, 0, 0.55);
  --shadow-md:    0 14px 32px -10px rgba(0, 0, 0, 0.60);
  --shadow-lg:    0 28px 60px -16px rgba(0, 0, 0, 0.70);

  --stick-1:      4px 4px 0 var(--stick-color), 0 0 24px rgba(124, 58, 237, 0.25);
  --stick-2:      6px 6px 0 var(--stick-color), 0 0 36px rgba(124, 58, 237, 0.30);
  --stick-3:      8px 8px 0 var(--stick-color), 0 0 50px rgba(124, 58, 237, 0.35);
  --stick-hot:    6px 6px 0 #F4F2FF, 0 0 50px rgba(124, 58, 237, 0.55);
  --stick-violet: 6px 6px 0 #F4F2FF, 0 0 50px rgba(124, 58, 237, 0.55);
  --stick-lime:   5px 5px 0 #F4F2FF, 0 0 40px rgba(196, 255, 61, 0.50);
}

/* ──────────────────────────────────────────────────────────────
   2. RESET + GLOBALS
   ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--dur-slow) var(--ease), color var(--dur-slow) var(--ease);
}

/* Fondo con grain + gradient mesh */
body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 700px 500px at 10% -5%,  rgba(124, 58, 237, 0.12), transparent 60%),
    radial-gradient(ellipse 800px 600px at 95% 5%,   rgba(124, 58, 237, 0.14), transparent 60%),
    radial-gradient(ellipse 700px 500px at 50% 100%, rgba(0, 217, 255, 0.10),  transparent 60%),
    var(--bg);
}

/* Grain noise overlay — SVG inline para no requerir asset */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.07 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}
[data-theme="dark"] body::before {
  opacity: 0.5;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.06 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 800px 600px at 0% -10%,  rgba(124, 58, 237, 0.20), transparent 55%),
    radial-gradient(ellipse 900px 700px at 100% 0%,  rgba(124, 58, 237, 0.28), transparent 55%),
    radial-gradient(ellipse 800px 600px at 50% 100%, rgba(0, 217, 255, 0.18),  transparent 55%),
    var(--bg);
}

/* Cursor follow blob (creado dinámicamente por JS — opcional) */
#cursorBlob {
  position: fixed;
  top: 0;
  left: 0;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.30), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%) translate3d(var(--mx, 50vw), var(--my, 30vh), 0);
  transition: transform 0.18s var(--ease-out-expo), opacity var(--dur-med) var(--ease);
  filter: blur(20px);
  mix-blend-mode: screen;
  opacity: 0;
}
body.cursor-active #cursorBlob { opacity: 1; }
[data-theme="dark"] #cursorBlob { mix-blend-mode: lighten; }

main.container { position: relative; z-index: 2; }

h1, h2, h3, h4, h5 {
  font-family: 'Bricolage Grotesque', 'Fredoka', sans-serif;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.02;
}
h1 { font-size: var(--fs-4xl); font-weight: 900; letter-spacing: -0.045em; }
h2 { font-size: var(--fs-3xl); letter-spacing: -0.035em; }
h3 { font-size: var(--fs-xl); letter-spacing: -0.02em; }
h4 { font-size: var(--fs-lg); }

p { line-height: 1.6; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }

input, textarea, select, button {
  font-family: inherit;
  color: var(--ink);
}

::selection { background: var(--c-lime); color: var(--c-ink); }

/* ──────────────────────────────────────────────────────────────
   3. LAYOUT
   ────────────────────────────────────────────────────────────── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ──────────────────────────────────────────────────────────────
   4. NAVBAR — glassmorphism reforzado, brand con personalidad
   ────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(24px) saturate(200%);
  -webkit-backdrop-filter: blur(24px) saturate(200%);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1.5px solid var(--border-soft);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.035em;
  color: var(--ink);
  transition: transform var(--dur-med) var(--ease-spring);
}
.brand:hover { transform: translateY(-1px) rotate(-1deg); }

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  position: relative;
  transform: rotate(-4deg);
  transition: transform var(--dur-med) var(--ease-spring);
  background: var(--surface);
  overflow: hidden;
  padding: 2px;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
}
.brand:hover .brand-mark { transform: rotate(4deg) scale(1.08); box-shadow: 6px 6px 0 var(--ink); }
[data-theme="dark"] .brand-mark { background: var(--surface-2); }
.brand { font-size: 22px; }

/* Logo gigante del hero (decorativo) — top:20 para no quedar tapado por el navbar sticky */
.hero-logo {
  position: absolute;
  top: 20px;
  right: 4%;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(8px 8px 0 var(--ink)) drop-shadow(0 20px 40px rgba(124, 58, 237, 0.35));
  animation: heroLogoFloat 8s ease-in-out infinite;
}
.hero-logo img { display: block; }
@keyframes heroLogoFloat {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}
@media (max-width: 900px) {
  .hero-logo { position: static; margin: 0 0 12px; filter: drop-shadow(5px 5px 0 var(--ink)); }
  .hero-logo img { width: 96px; height: 96px; }
}

/* Logo del footer */
.footer-logo {
  display: inline-block;
  margin: 0 auto 12px;
  filter: drop-shadow(4px 4px 0 var(--ink));
  transform: rotate(-4deg);
  transition: transform var(--dur-med) var(--ease-spring);
}
.footer-logo:hover { transform: rotate(4deg) scale(1.08); }

@keyframes gradShift {
  0%,100% { background-position: 0% 50%; }
  50%     { background-position: 100% 50%; }
}

.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-link {
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  transition: all var(--dur-fast) var(--ease);
  position: relative;
}
.nav-link:hover {
  background: var(--surface-2);
  color: var(--ink);
  transform: translateY(-1px);
}
.nav-link.active {
  background: var(--ink);
  color: var(--c-paper);
  font-weight: 700;
}
[data-theme="dark"] .nav-link.active { background: var(--c-lime); color: var(--c-ink); }

.nav-tools { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  cursor: pointer;
  font-size: 17px;
  transition: all var(--dur-fast) var(--ease);
  box-shadow: 2px 2px 0 var(--ink);
}
.icon-btn:hover {
  background: var(--c-lime);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.icon-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}
[data-theme="dark"] .icon-btn { background: var(--surface-2); border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
[data-theme="dark"] .icon-btn:hover { background: var(--c-violet); color: white; }

.lang-select {
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  transition: all var(--dur-fast) var(--ease);
}
.lang-select:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
[data-theme="dark"] .lang-select { background: var(--surface-2); }

.nav-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad-sunset);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  color: white;
  font-size: 15px;
  cursor: pointer;
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform var(--dur-med) var(--ease-spring);
  overflow: hidden;
  flex-shrink: 0;
}
.nav-avatar:hover { transform: rotate(-8deg) scale(1.08); }

/* ──────────────────────────────────────────────────────────────
   5. BOTONES — sticker style con efecto push
   ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.01em;
  cursor: pointer;
  border: 2px solid var(--ink);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background-position var(--dur-med) var(--ease);
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  position: relative;
  user-select: none;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 4px 4px 0 var(--ink), 0 0 0 4px var(--c-lime);
}

.btn-sm { padding: 9px 16px; font-size: 13px; border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); }
.btn-sm:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn-sm:active { box-shadow: 1px 1px 0 var(--ink); }

.btn-lg { padding: 18px 36px; font-size: 17px; border-radius: 18px; box-shadow: 6px 6px 0 var(--ink); }
.btn-lg:hover { box-shadow: 8px 8px 0 var(--ink); }
.btn-lg:active { box-shadow: 2px 2px 0 var(--ink); }

.btn-primary {
  background: var(--grad-hot);
  background-size: 200% 200%;
  color: white;
  animation: gradShift 8s ease infinite;
}
.btn-primary:hover { background-position: 100% 50%; }

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--c-lime); color: var(--c-ink); }
[data-theme="dark"] .btn-ghost { background: var(--surface-2); color: var(--ink); }
[data-theme="dark"] .btn-ghost:hover { background: var(--c-lime); color: var(--c-ink); }

.btn-danger {
  background: linear-gradient(135deg, #EA580C, #7C3AED);
  color: white;
}
.btn-glass {
  background: color-mix(in srgb, var(--surface) 65%, transparent);
  backdrop-filter: blur(12px);
  color: var(--ink);
}

/* ──────────────────────────────────────────────────────────────
   6. HERO — oversized type + marquee + blobs
   ────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 80px 0 48px;
  overflow: visible;
}
.hero h1 {
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
}
.hero p.subtitle {
  font-size: clamp(17px, 1.4vw, 22px);
  color: var(--ink-soft);
  max-width: 640px;
  line-height: 1.5;
  margin: 0 0 36px;
  font-weight: 500;
  position: relative;
  z-index: 2;
}
.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  position: relative;
  z-index: 2;
}

.grad-text {
  background: var(--grad-hot);
  background-size: 200% 200%;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  animation: gradShift 6s ease infinite;
  display: inline-block;
}

/* Floating decorative blobs — más grandes y vivos */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.65;
  pointer-events: none;
  animation: float 14s ease-in-out infinite;
  z-index: 0;
}
.hero-blob.b1 { width: 320px; height: 320px; background: var(--c-hot);    top: -20px; right: 5%; }
.hero-blob.b2 { width: 240px; height: 240px; background: var(--c-cyber);  top: 45%;   right: 30%; animation-delay: -4s; }
.hero-blob.b3 { width: 280px; height: 280px; background: var(--c-violet); top: -10%;  right: 40%; animation-delay: -8s; }
[data-theme="dark"] .hero-blob { opacity: 0.45; filter: blur(60px); }

@keyframes float {
  0%,100% { transform: translateY(0)    translateX(0)   scale(1); }
  33%     { transform: translateY(-30px) translateX(20px) scale(1.05); }
  66%     { transform: translateY(20px)  translateX(-20px) scale(0.97); }
}

/* Marquee — strip animado horizontal */
.hero-marquee {
  margin: 8px 0 32px;
  padding: 14px 0;
  background: var(--c-lime);
  border-top: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  overflow: hidden;
  position: relative;
  transform: rotate(-1.2deg);
  margin-left: -8px;
  margin-right: -8px;
  box-shadow: 0 8px 0 -4px rgba(20, 20, 43, 0.10);
}
[data-theme="dark"] .hero-marquee { background: var(--c-lime); color: var(--c-ink); }

.hero-marquee-track {
  display: flex;
  gap: 36px;
  animation: marquee 28s linear infinite;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 900;
  font-size: 22px;
  color: var(--c-ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.hero-marquee-track > span { display: inline-flex; align-items: center; gap: 36px; }
.hero-marquee-track > span::after {
  content: '✦';
  display: inline-block;
  color: var(--c-hot);
  font-size: 18px;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Hero stats — bento style, no rejilla aburrida */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 48px;
  padding: 0;
  background: transparent;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  position: relative;
  z-index: 2;
}
.hero-stat {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  padding: 22px 20px;
  text-align: left;
  box-shadow: var(--stick-1);
  transition: transform var(--dur-med) var(--ease-spring), box-shadow var(--dur-med) var(--ease);
  position: relative;
  overflow: hidden;
}
.hero-stat:nth-child(1) { background: var(--c-hot-soft); transform: rotate(-1deg); }
.hero-stat:nth-child(2) { background: var(--c-violet-soft); transform: rotate(0.8deg); }
.hero-stat:nth-child(3) { background: var(--c-lime); transform: rotate(-0.5deg); }
.hero-stat:nth-child(4) { background: var(--c-sun); transform: rotate(1.2deg); }
.hero-stat:hover {
  transform: translate(-2px, -3px) rotate(0deg);
  box-shadow: var(--stick-2);
}
[data-theme="dark"] .hero-stat:nth-child(1) { background: rgba(124, 58, 237, 0.25); }
[data-theme="dark"] .hero-stat:nth-child(2) { background: rgba(124, 58, 237, 0.30); }
[data-theme="dark"] .hero-stat:nth-child(3) { background: rgba(196, 255, 61, 0.25); }
[data-theme="dark"] .hero-stat:nth-child(4) { background: rgba(255, 217, 61, 0.25); }

.hero-stat strong {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 38px;
  font-weight: 900;
  color: var(--c-ink);
  letter-spacing: -0.04em;
  line-height: 1;
  background: none;
  -webkit-text-fill-color: var(--c-ink);
}
.hero-stat span {
  font-size: 13px;
  color: var(--c-ink);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 8px;
  display: block;
  opacity: 0.75;
}
[data-theme="dark"] .hero-stat strong { color: var(--ink); -webkit-text-fill-color: var(--ink); }
[data-theme="dark"] .hero-stat span { color: var(--ink); }

@media (max-width: 700px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ──────────────────────────────────────────────────────────────
   7. SECTION HEADINGS
   ────────────────────────────────────────────────────────────── */
.section { padding: 56px 0; position: relative; z-index: 2; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}
.section-head .title { display: flex; flex-direction: column; gap: 8px; }
.section-head .eyebrow {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--c-ink);
  background: var(--c-lime);
  padding: 6px 12px;
  border: 1.5px solid var(--ink);
  border-radius: var(--r-pill);
  display: inline-block;
  width: fit-content;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-1.5deg);
}
[data-theme="dark"] .section-head .eyebrow { background: var(--c-lime); color: var(--c-ink); }

.section-head h2 { margin: 0; }
.section-head .more {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: all var(--dur-fast) var(--ease);
}
.section-head .more:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
  background: var(--c-lime);
}

/* ──────────────────────────────────────────────────────────────
   8. CHIPS — sticker pegado
   ────────────────────────────────────────────────────────────── */
.chips {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.chip {
  padding: 10px 18px;
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.01em;
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 3px 3px 0 var(--ink);
}
.chip:hover {
  transform: translate(-1px, -2px) rotate(-1deg);
  box-shadow: 4px 5px 0 var(--ink);
  background: var(--c-violet-soft);
}
.chip.active {
  background: var(--c-ink);
  color: var(--c-paper);
  border-color: var(--c-ink);
  transform: rotate(-1deg);
}
[data-theme="dark"] .chip { background: var(--surface-2); }
[data-theme="dark"] .chip:hover { background: var(--c-violet); color: white; }
[data-theme="dark"] .chip.active { background: var(--c-lime); color: var(--c-ink); border-color: var(--ink); }

/* ──────────────────────────────────────────────────────────────
   9. BANNER (CTA grande)
   ────────────────────────────────────────────────────────────── */
.banner {
  background: var(--grad-hot);
  background-size: 200% 200%;
  border-radius: var(--r-xl);
  padding: 40px 44px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 32px 0;
  flex-wrap: wrap;
  border: 2.5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink), 0 30px 60px -20px rgba(124, 58, 237, 0.45);
  animation: gradShift 10s ease infinite;
  position: relative;
  overflow: hidden;
}
.banner::before {
  content: '';
  position: absolute;
  top: -60%; right: -10%;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(255,255,255,0.30), transparent 65%);
  pointer-events: none;
}
.banner::after {
  content: '✦ ✧ ✦';
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 6px;
  font-family: 'Bricolage Grotesque', sans-serif;
}
.banner > div { position: relative; z-index: 1; }
.banner h2 { color: white; margin-bottom: 8px; }
.banner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 16px;
  max-width: 540px;
  font-weight: 500;
}
.banner .btn {
  background: white;
  color: var(--c-hot);
  border-color: var(--ink);
  position: relative;
  z-index: 1;
}
.banner .btn:hover { color: var(--c-violet); }

/* ──────────────────────────────────────────────────────────────
   10. TEMPLATES ROW
   ────────────────────────────────────────────────────────────── */
.tpl-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}
.tpl-card {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: white;
  text-align: center;
  padding: 20px;
  cursor: pointer;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  box-shadow: var(--stick-2);
  background-size: 200% 200%;
  transition: transform var(--dur-med) var(--ease-spring), box-shadow var(--dur-med) var(--ease);
  animation: gradShift 14s ease infinite;
}
.tpl-card:nth-child(odd)  { transform: rotate(-1.5deg); }
.tpl-card:nth-child(even) { transform: rotate(1deg); }
.tpl-card:hover {
  transform: rotate(0deg) translate(-3px, -5px) scale(1.04);
  box-shadow: var(--stick-3);
}
.tpl-card .tpl-label {
  position: absolute;
  bottom: 16px;
  left: 16px;
  font-size: 13px;
  font-weight: 700;
  background: var(--c-ink);
  color: var(--c-paper);
  padding: 7px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ink);
  letter-spacing: -0.01em;
}
.tpl-card .tpl-emoji {
  font-size: 64px;
  line-height: 1;
  filter: drop-shadow(3px 3px 0 rgba(20, 20, 43, 0.25));
  margin-bottom: 8px;
  transition: transform var(--dur-slow) var(--ease-spring);
}
.tpl-card:hover .tpl-emoji { transform: rotate(15deg) scale(1.15); }

/* ──────────────────────────────────────────────────────────────
   11. MASONRY / GRID DE CARDS
   ────────────────────────────────────────────────────────────── */
.masonry {
  column-count: 4;
  column-gap: 22px;
}
@media (max-width: 1100px) { .masonry { column-count: 3; } }
@media (max-width: 800px)  { .masonry { column-count: 2; } }
@media (max-width: 500px)  { .masonry { column-count: 1; } }
.masonry .card { break-inside: avoid; margin-bottom: 22px; display: block; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 2px solid var(--ink);
  box-shadow: var(--stick-1);
  transition: transform var(--dur-med) var(--ease-spring),
              box-shadow var(--dur-med) var(--ease);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  position: relative;
  will-change: transform;
}
/* Sutil rotación inicial alternada para sentir feed orgánico */
.masonry .card:nth-child(3n)   { transform: rotate(-0.6deg); }
.masonry .card:nth-child(3n+1) { transform: rotate(0.4deg); }
.masonry .card:nth-child(3n+2) { transform: rotate(-0.2deg); }
.card:hover {
  transform: translate(-4px, -6px) rotate(0deg) !important;
  box-shadow: var(--stick-3);
  z-index: 3;
}
.card:focus-visible {
  outline: none;
  box-shadow: var(--stick-1), 0 0 0 4px var(--c-lime);
}

.card-image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: white;
  font-size: 28px;
  font-weight: 800;
  text-align: center;
  padding: 20px;
  background-size: 200% 200%;
  animation: gradShift 14s ease infinite;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}
.masonry .card-image { aspect-ratio: auto; min-height: 200px; }
.grid .card-image, .grid-fixed .card-image { aspect-ratio: 4 / 3; }
.card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Badge tipo sticker pegado torcido */
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--c-paper);
  color: var(--c-ink);
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  z-index: 2;
  transform: rotate(-4deg);
  letter-spacing: -0.01em;
  font-family: 'Bricolage Grotesque', sans-serif;
  text-transform: uppercase;
}

.card-body { padding: 18px 20px 20px; background: var(--surface); }
.card-title {
  font-size: 17px;
  margin-bottom: 6px;
  color: var(--ink);
  font-weight: 800;
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.card-author {
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
}
.card-author-dot {
  position: relative;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--grad-lime);
  color: var(--c-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  border: 1.5px solid var(--ink);
  overflow: hidden;
  flex-shrink: 0;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
}
.card-stars {
  color: var(--c-sun);
  letter-spacing: 1.5px;
  text-shadow: 1px 1px 0 var(--ink);
  font-size: 15px;
}

/* Card image gradients (mantienen nombres bg-1..8) */
.bg-1 { background: linear-gradient(135deg, #3B82F6, #7C3AED); }
.bg-2 { background: linear-gradient(135deg, #FB923C, #7C3AED); }
.bg-3 { background: linear-gradient(135deg, #00D9FF, #7C3AED); }
.bg-4 { background: linear-gradient(135deg, #C4FF3D, #00D9FF); color: var(--c-ink) !important; }
.bg-5 { background: linear-gradient(135deg, #FFD93D, #FB923C); color: var(--c-ink) !important; }
.bg-6 { background: linear-gradient(135deg, #7C3AED, #3B82F6); }
.bg-7 { background: linear-gradient(135deg, #00D9FF, #C4FF3D); color: var(--c-ink) !important; }
.bg-8 { background: linear-gradient(135deg, #22C55E, #FB923C); }

/* ──────────────────────────────────────────────────────────────
   11b. FAB MINI — botón flotante discreto "Crear diseño"
   Aparece solo cuando el botón del hero deja de ser visible.
   ────────────────────────────────────────────────────────────── */
.fab-mini {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 30;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--grad-hot);
  background-size: 200% 200%;
  color: white;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 900;
  font-size: 32px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 2.5px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(0.92);
  transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease-spring);
  animation: gradShift 10s ease infinite;
}
.fab-mini.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.fab-mini:hover { transform: translate(-2px, -3px) scale(1.06); box-shadow: 6px 6px 0 var(--ink); }
.fab-mini:active { transform: translate(2px, 2px) scale(1); box-shadow: 2px 2px 0 var(--ink); }

/* En móvil, ocultar el link "Crear diseño" del nav-links — accesible vía FAB */
@media (max-width: 768px) {
  .nav-create-link { display: none !important; }
  .fab-mini { bottom: 18px; right: 18px; width: 52px; height: 52px; font-size: 28px; }
}

/* ──────────────────────────────────────────────────────────────
   12. FAB — más sticker, menos genérico
   ────────────────────────────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: var(--r-pill);
  background: var(--grad-hot);
  background-size: 200% 200%;
  color: white;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 2.5px solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink), 0 20px 40px -10px rgba(124, 58, 237, 0.55);
  animation: gradShift 8s ease infinite, fabBob 3.5s ease-in-out infinite;
  transition: transform var(--dur-med) var(--ease-spring), box-shadow var(--dur-med) var(--ease);
}
.fab:hover {
  transform: translate(-3px, -5px) rotate(-3deg);
  box-shadow: 8px 9px 0 var(--ink), 0 28px 50px -10px rgba(124, 58, 237, 0.70);
}
.fab:active {
  transform: translate(2px, 2px) rotate(-1deg);
  box-shadow: 2px 2px 0 var(--ink), 0 10px 20px -10px rgba(124, 58, 237, 0.50);
}
@keyframes fabBob {
  0%,100% { animation-timing-function: var(--ease); }
  50%     { transform: translateY(-6px) rotate(-2deg); }
}

/* ──────────────────────────────────────────────────────────────
   13. FORMS
   ────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 44px;
  border: 2.5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  max-width: 480px;
  margin: 56px auto;
  position: relative;
}
.form-card::before {
  content: '✦';
  position: absolute;
  top: -18px;
  right: 24px;
  font-size: 36px;
  color: var(--c-hot);
  text-shadow: 2px 2px 0 var(--ink);
  transform: rotate(15deg);
}
.form-card h1 { font-size: 36px; margin-bottom: 10px; letter-spacing: -0.04em; }
.form-card .subtitle { color: var(--ink-soft); margin-bottom: 32px; font-size: 15px; font-weight: 500; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 2px solid var(--ink);
  background: var(--surface-2);
  font-size: 15px;
  font-weight: 500;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  font-family: inherit;
}
.field input:hover,
.field textarea:hover,
.field select:hover { background: var(--surface); }
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--c-violet);
  background: var(--surface);
  box-shadow: 4px 4px 0 var(--c-violet), 0 0 0 4px rgba(124, 58, 237, 0.15);
}
[data-theme="dark"] .field input:focus,
[data-theme="dark"] .field textarea:focus,
[data-theme="dark"] .field select:focus {
  box-shadow: 4px 4px 0 var(--c-lime), 0 0 0 4px rgba(196, 255, 61, 0.20);
  border-color: var(--c-lime);
}
.field .hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; font-weight: 500; }

/* Wrapper de input con botón "ojo" para mostrar/ocultar contraseña */
.input-wrap { position: relative; }
.input-wrap input { padding-right: 50px; }
.eye-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 18px;
  opacity: 0.55;
  transition: opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  padding: 0;
  color: var(--ink);
}
.eye-btn:hover { opacity: 1; background: var(--surface); }
.eye-btn:focus-visible {
  outline: none;
  opacity: 1;
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

/* Avatar como imagen real (cuando es path subido) — se aplica dentro de los círculos */
.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

/* Editar perfil */
.form-card.form-card-wide { max-width: 560px; }
.pedit-photo-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.pedit-photo-current {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--grad-sunset);
  color: #FFFFFF;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.pedit-photo-current .avatar-img,
.nav-avatar .avatar-img,
.card-author-dot .avatar-img,
.detail-author-avatar .avatar-img,
.comment-avatar .avatar-img,
.contact-avatar .avatar-img,
.profile-avatar-big .avatar-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pedit-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  flex: 1;
  min-width: 180px;
}
.pedit-photo-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pedit-remove-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  font-weight: 600;
}
.pedit-remove-toggle input { accent-color: var(--c-violet); cursor: pointer; }
.pedit-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  justify-content: flex-end;
}
.pedit-actions .btn { min-width: 140px; }
@media (max-width: 600px) {
  .pedit-actions { flex-direction: column-reverse; }
  .pedit-actions .btn { width: 100%; }
}

.alert {
  padding: 14px 18px;
  border-radius: var(--r-md);
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.alert-error  { background: #FFE4D6; color: var(--c-naranja-dk); }
.alert-ok     { background: var(--c-lime); color: var(--c-ink); }
.alert-info   { background: #D4F3FF; color: #006B85; }
[data-theme="dark"] .alert-error { background: rgba(251, 146, 60, 0.20); color: #FFD4B0; }
[data-theme="dark"] .alert-ok    { background: var(--c-lime); color: var(--c-ink); }
[data-theme="dark"] .alert-info  { background: rgba(0, 217, 255, 0.20); color: #8AECFF; }

/* ──────────────────────────────────────────────────────────────
   14a. INVITE CTA — bloque antes del footer
   ────────────────────────────────────────────────────────────── */
.invite-cta {
  margin: 80px 0 0;
  padding: 56px 24px;
  position: relative;
  z-index: 2;
}
.invite-cta-inner {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-2xl);
  padding: 48px 40px;
  text-align: center;
  box-shadow: 10px 10px 0 var(--ink);
  position: relative;
  overflow: hidden;
  transform: rotate(-0.6deg);
  transition: transform var(--dur-med) var(--ease-spring);
}
.invite-cta-inner:hover { transform: rotate(0deg); }

/* Confetti decorativo */
.invite-cta-inner::before {
  content: '✦';
  position: absolute;
  top: 14px;
  left: 22px;
  font-size: 32px;
  color: var(--c-hot);
  transform: rotate(-15deg);
  font-family: 'Bricolage Grotesque', sans-serif;
}
.invite-cta-inner::after {
  content: '✧';
  position: absolute;
  bottom: 18px;
  right: 28px;
  font-size: 40px;
  color: var(--c-violet);
  transform: rotate(20deg);
  font-family: 'Bricolage Grotesque', sans-serif;
}
.invite-cta h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 14px;
  letter-spacing: -0.035em;
}
.invite-cta p {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.55;
  font-weight: 500;
}
.invite-cta-btn {
  display: inline-flex;
  margin: 0 auto;
  max-width: 100%;
  white-space: normal;        /* permite wrap del texto largo en móvil */
  text-align: center;
  box-sizing: border-box;
}
/* Wrapper que garantiza centrado horizontal del botón incluso si algún padre rompe text-align */
.invite-cta-inner > .btn { margin-left: auto; margin-right: auto; }
.invite-cta-inner { box-sizing: border-box; }

@media (max-width: 768px) {
  .invite-cta { margin-top: 56px; padding: 28px 12px; }
  .invite-cta-inner {
    padding: 26px 18px;
    box-shadow: 6px 6px 0 var(--ink);
    transform: rotate(-1deg);
  }
  .invite-cta h2 { font-size: clamp(22px, 6vw, 30px); }
  .invite-cta p  { font-size: 14.5px; }
  /* Botón a ancho completo + texto wrapeable + tamaños reducidos */
  .invite-cta-btn {
    display: flex;
    width: 100%;
    padding: 14px 16px;
    font-size: 14.5px;
    box-shadow: 5px 5px 0 var(--ink);
  }
}

/* ──────────────────────────────────────────────────────────────
   14b. PENDING BANNER (design.php cuando status='pending')
   ────────────────────────────────────────────────────────────── */
.pending-banner {
  margin: 20px 0 0;
  padding: 16px 22px;
  background: var(--c-sun);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 4px 4px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--c-ink);
  transform: rotate(-0.4deg);
}
.pending-banner-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.02em;
}
.pending-banner-text {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
}
[data-theme="dark"] .pending-banner { background: var(--c-sun); color: var(--c-ink); }

/* ──────────────────────────────────────────────────────────────
   14. FOOTER
   ────────────────────────────────────────────────────────────── */
.footer {
  margin-top: 56px;
  padding: 48px 24px 40px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
  border-top: 2px solid var(--ink);
  background: var(--c-lime);
  position: relative;
  z-index: 2;
}
[data-theme="dark"] .footer { background: var(--bg-soft); color: var(--ink-soft); }
.footer::before {
  content: '✦  ·  ✧  ·  ✦  ·  ✧';
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  color: var(--c-ink);
  letter-spacing: 8px;
  margin-bottom: 14px;
}
[data-theme="dark"] .footer::before { color: var(--c-lime); }
.footer p { margin: 4px 0; color: var(--c-ink); }
[data-theme="dark"] .footer p { color: var(--ink-soft); }
.footer-signature {
  font-size: 12px;
  font-weight: 600;
  margin-top: 10px !important;
  opacity: 0.75;
}
.footer-link {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  color: var(--c-ink);
  border-bottom: 2px solid var(--c-ink);
  padding-bottom: 1px;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.footer-link:hover { color: var(--c-hot); border-color: var(--c-hot); }
[data-theme="dark"] .footer-link { color: var(--c-lime); border-color: var(--c-lime); }
[data-theme="dark"] .footer-link:hover { color: var(--c-hot); border-color: var(--c-hot); }

/* ──────────────────────────────────────────────────────────────
   15. DETAIL PAGE
   ────────────────────────────────────────────────────────────── */
.detail-wrap {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 44px;
  padding: 40px 0;
}
@media (max-width: 900px) {
  .detail-wrap { grid-template-columns: 1fr; }
}
.detail-image {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: white;
  font-size: 64px;
  font-weight: 800;
  text-align: center;
  padding: 40px;
  border: 2.5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink), 0 30px 60px -20px rgba(20, 20, 43, 0.30);
  overflow: hidden;
  position: relative;
}
.detail-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-info {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 30px;
  border: 2.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  height: fit-content;
  position: relative;
}
.detail-info h1 { font-size: 30px; margin-bottom: 8px; letter-spacing: -0.03em; }
.detail-author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 2px dashed var(--border-soft);
  margin-bottom: 20px;
}
.detail-author-avatar {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--grad-hot);
  color: white;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  overflow: hidden;
  flex-shrink: 0;
}
.detail-author-name { font-weight: 700; font-family: 'Bricolage Grotesque', sans-serif; }
.detail-author-sub { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
/* Sección de puntuación — destacada con bloque "sticker" */
.rating-section {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--c-lima, var(--c-lime));
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
.rating-section-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-ink);
  margin-bottom: 12px;
  display: block;
}
.rating-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
}
.rating-row .label {
  color: var(--c-ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.01em;
}
.rating-row .stars {
  color: #B45309;
  letter-spacing: 3px;
  text-shadow: 1px 1px 0 var(--ink);
  font-size: 18px;
  font-weight: 800;
}
.rating-row.rating-avg {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 2px dashed rgba(20, 20, 43, 0.25);
  font-size: 16px;
}
.rating-row.rating-avg .label {
  font-size: 15px;
}
.rating-row.rating-avg .stars {
  font-size: 22px;
  color: var(--c-naranja-dk);
}
[data-theme="dark"] .rating-section { background: var(--c-lime); }
[data-theme="dark"] .rating-row .label { color: var(--c-ink); }
.actions { display: grid; gap: 12px; margin-top: 22px; }
.actions .btn { width: 100%; }

/* Sección "Tu diseño" — acciones del autor / admin */
.design-actions {
  margin-top: 18px;
  padding: 16px;
  border: 2px dashed var(--border-soft);
  border-radius: var(--r-lg);
  background: var(--surface-2);
}
.design-actions-title {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.design-actions-status {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 2px 2px 0 var(--ink);
}
.design-action-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.design-action-form .btn { width: 100%; }

/* Mini-toolbar de acciones en card (profile.php cuando es perfil propio) */
.card-with-actions {
  display: flex;
  flex-direction: column;
}
.card-with-actions .card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}
.card-quick-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px 12px;
  border-top: 1.5px dashed var(--border-soft);
  margin: 0;
}
.card-quick-btn {
  flex: 1;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
  font-size: 15px;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  box-shadow: 2px 2px 0 var(--ink);
  font-family: inherit;
  line-height: 1;
}
.card-quick-btn:hover {
  background: var(--c-violet-soft);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
}
.card-quick-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--ink);
}
.card-quick-btn.card-quick-danger:hover {
  background: var(--c-naranja);
  color: white;
}

/* Badges adicionales sobre la card (pendiente / personal) */
.card-badge-pending { background: var(--c-sun); color: var(--c-ink); }
.card-badge-private { background: var(--c-violet-soft); color: var(--c-violet-dk); }
[data-theme="dark"] .card-badge-private { background: var(--c-violet); color: white; }

.comments {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 30px;
  margin-top: 24px;
  border: 2.5px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
}
.comments h3 { font-size: 22px; margin-bottom: 16px; letter-spacing: -0.02em; }
.comment {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 2px dashed var(--border-soft);
}
.comment:last-child { border-bottom: none; }
.comment-avatar {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--grad-sunset);
  color: white;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  border: 2px solid var(--ink);
  overflow: hidden;
}
.comment-body { font-size: 14.5px; color: var(--ink); font-weight: 500; }
.comment-author { font-weight: 800; margin-right: 6px; font-family: 'Bricolage Grotesque', sans-serif; }
.comment-time { color: var(--ink-soft); font-size: 12.5px; }

/* ──────────────────────────────────────────────────────────────
   16. PROFILE
   ────────────────────────────────────────────────────────────── */
.profile-header {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 64px 0 32px;
  flex-wrap: wrap;
  position: relative;
}
.profile-avatar-big {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--grad-hot);
  background-size: 200% 200%;
  color: white;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 56px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink);
  animation: gradShift 8s ease infinite;
  flex-shrink: 0;
  transform: rotate(-3deg);
  transition: transform var(--dur-med) var(--ease-spring);
  overflow: hidden;
}
.profile-avatar-big:hover { transform: rotate(3deg) scale(1.04); }

.profile-meta h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -0.04em; }
.profile-handle {
  color: var(--ink-soft);
  margin-top: 8px;
  font-size: 15px;
  font-weight: 600;
}
.profile-stats {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.profile-stat {
  font-size: 12px;
  color: var(--ink-soft);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface);
  padding: 12px 18px;
  border-radius: var(--r-lg);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform var(--dur-fast) var(--ease);
}
.profile-stat:hover { transform: translate(-1px, -2px); }
.profile-stat strong {
  color: var(--ink);
  font-size: 26px;
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge {
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 800;
  background: var(--c-lime);
  color: var(--c-ink);
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-2deg);
}
.badge:nth-child(even) { transform: rotate(2deg); background: var(--c-sun); }

/* ──────────────────────────────────────────────────────────────
   17. ADMIN PANEL
   ────────────────────────────────────────────────────────────── */
.admin-grid { display: grid; gap: 16px; }
.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  gap: 16px;
  flex-wrap: wrap;
  transition: transform var(--dur-fast) var(--ease);
}
.admin-row:hover { transform: translate(-1px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.admin-row .info { font-size: 14.5px; flex: 1; min-width: 200px; }
.admin-row .info strong { color: var(--ink); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 800; }
.admin-row .info small { color: var(--ink-soft); display: block; margin-top: 4px; font-weight: 500; }
.admin-actions { display: flex; gap: 10px; }
.admin-actions .btn { padding: 10px 18px; font-size: 13.5px; box-shadow: 3px 3px 0 var(--ink); }
.admin-tabs { display: flex; gap: 10px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--r-md);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}
@media (max-width: 600px) {
  .admin-row { padding: 14px 16px; }
  .admin-row .info { min-width: 0; width: 100%; }
  .admin-actions { width: 100%; }
  .admin-actions .btn { flex: 1; }
  .admin-thumb { width: 64px; height: 64px; }
  .admin-tabs .chip { font-size: 13px; padding: 9px 14px; }
}

/* ──────────────────────────────────────────────────────────────
   18. MODAL
   ────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 26, 0.55);
  backdrop-filter: blur(10px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open {
  display: flex;
  animation: overlayIn var(--dur-med) var(--ease) both;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal {
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  border: 2.5px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink), 0 30px 60px -20px rgba(0, 0, 0, 0.40);
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn var(--dur-slow) var(--ease-spring) both;
}
@keyframes modalIn {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to   { transform: translateY(0)    scale(1);    opacity: 1; }
}
.modal h3 { font-size: 24px; margin-bottom: 6px; letter-spacing: -0.03em; }
.modal .modal-subtitle { color: var(--ink-soft); font-size: 14.5px; margin-bottom: 22px; font-weight: 500; }
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  border: 2px solid var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  transition: all var(--dur-fast) var(--ease);
  box-shadow: 2px 2px 0 var(--ink);
}
.modal-close:hover {
  background: var(--c-hot);
  color: white;
  transform: rotate(90deg);
}
.modal-header { position: relative; }

/* Feedback — categorías como chips seleccionables */
.feedback-cats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.feedback-cat {
  position: relative;
  display: block;
  cursor: pointer;
}
.feedback-cat input { position: absolute; opacity: 0; pointer-events: none; }
.feedback-cat span {
  display: block;
  text-align: center;
  padding: 12px 6px;
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  background: var(--surface-2);
  font-weight: 700;
  font-size: 13px;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.feedback-cat:hover span {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--c-violet-soft);
}
.feedback-cat input:checked + span {
  background: var(--c-ink);
  color: var(--c-lime);
}
[data-theme="dark"] .feedback-cat input:checked + span {
  background: var(--c-lime); color: var(--c-ink);
}
.feedback-modal .feedback-cats { margin-bottom: 6px; }

.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}
.share-tile {
  background: var(--surface-2);
  border-radius: var(--r-md);
  padding: 18px 8px;
  text-align: center;
  cursor: pointer;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  text-decoration: none;
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
}
.share-tile:hover {
  transform: translate(-1px, -2px);
  box-shadow: 4px 5px 0 var(--ink);
  background: var(--c-lime);
}
.share-tile .ico { font-size: 30px; display: block; margin-bottom: 6px; }

.contact-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease);
}
.contact-row:hover {
  transform: translateX(4px);
  background: var(--c-violet-soft);
}
[data-theme="dark"] .contact-row:hover { background: var(--surface-3); }
.contact-avatar {
  position: relative;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--grad-lime);
  color: var(--c-ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  border: 1.5px solid var(--ink);
  overflow: hidden;
}
.contact-meta { flex: 1; }
.contact-name { font-weight: 700; font-size: 14px; }
.contact-sub  { font-size: 12px; color: var(--ink-soft); font-weight: 500; }

/* ──────────────────────────────────────────────────────────────
   19. EDITOR — Canva-inspired (mantener funcional)
   ────────────────────────────────────────────────────────────── */
.editor {
  display: grid;
  grid-template-columns: 80px 280px 1fr 280px;
  grid-template-rows: 56px 1fr;
  height: calc(100vh - 70px);
  background: var(--bg-soft);
  position: relative;
  z-index: 2;
}
.editor-rail {
  grid-row: 1 / 3;
  background: var(--surface);
  border-right: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 4px;
}
.editor-rail-btn {
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  transition: all var(--dur-fast) var(--ease);
  font-family: 'Bricolage Grotesque', sans-serif;
}
.editor-rail-btn .ico { font-size: 22px; }
.editor-rail-btn:hover { background: var(--surface-2); color: var(--ink); }
.editor-rail-btn.active {
  background: var(--c-ink);
  color: var(--c-lime);
}
[data-theme="dark"] .editor-rail-btn.active { background: var(--c-lime); color: var(--c-ink); }

.editor-panel {
  grid-row: 1 / 3;
  background: var(--surface);
  border-right: 2px solid var(--ink);
  padding: 20px;
  overflow-y: auto;
}
.editor-panel h4 {
  font-size: 16px;
  margin-bottom: 14px;
  font-family: 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.02em;
}
.editor-panel .panel-section { display: none; }
.editor-panel .panel-section.active { display: block; }

.editor-topbar {
  grid-column: 3 / 5;
  background: var(--surface);
  border-bottom: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 10px;
}
.editor-topbar .file-name {
  font-weight: 700;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  background: transparent;
  min-width: 120px;
  font-family: inherit;
  color: var(--ink);
}
.editor-topbar .file-name:focus {
  outline: none;
  border-color: var(--ink);
  background: var(--surface-2);
}
.editor-topbar-actions { display: flex; gap: 8px; align-items: center; }

.editor-stage {
  grid-column: 3 / 4;
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: auto;
}
.canvas-wrap {
  background: white;
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 var(--ink), 0 30px 60px -20px rgba(20, 20, 43, 0.30);
  border-radius: 10px;
  overflow: hidden;
}
[data-theme="dark"] .canvas-wrap { box-shadow: 8px 8px 0 var(--ink), 0 30px 60px -20px rgba(0,0,0,0.7); }

.editor-props {
  grid-column: 4 / 5;
  grid-row: 2 / 3;
  background: var(--surface);
  border-left: 2px solid var(--ink);
  padding: 20px;
  overflow-y: auto;
}
.editor-props h4 {
  font-size: 13px;
  margin-bottom: 14px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  font-family: 'Bricolage Grotesque', sans-serif;
}

.tpl-thumb {
  cursor: pointer;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 10.5px;
  line-height: 1.1;
  color: white;
  text-align: center;
  padding: 6px 4px;
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast) var(--ease);
  background-size: cover;
  background-position: center;
  letter-spacing: -0.01em;
  text-shadow: 1px 1px 0 rgba(20, 20, 43, 0.45);
  overflow: hidden;
}
.tpl-thumb .tpl-thumb-emoji {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 4px;
  filter: drop-shadow(1.5px 1.5px 0 rgba(20, 20, 43, 0.35));
}
.tpl-thumb:hover {
  transform: translate(-1px, -1px) rotate(-1.5deg);
  box-shadow: 3px 3px 0 var(--ink);
}

.tpl-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
@media (max-width: 900px) {
  /* En el editor móvil el panel es estrecho — 4 columnas compactas */
  .tpl-thumbs { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .tpl-thumb { font-size: 9.5px; padding: 4px 3px; }
  .tpl-thumb .tpl-thumb-emoji { font-size: 22px; margin-bottom: 2px; }
}
@media (max-width: 380px) {
  .tpl-thumbs { grid-template-columns: repeat(3, 1fr); }
  .tpl-thumb .tpl-thumb-emoji { font-size: 20px; }
}

.sticker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.sticker {
  aspect-ratio: 1/1;
  font-size: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-spring);
}
.sticker:hover { transform: scale(1.15) rotate(-8deg); background: var(--c-lime); }

.color-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.color-swatch {
  aspect-ratio: 1/1;
  border-radius: var(--r-md);
  cursor: pointer;
  border: 2px solid var(--ink);
  transition: transform var(--dur-fast) var(--ease-spring);
  box-shadow: 1px 1px 0 var(--ink);
}
.color-swatch:hover { transform: scale(1.1) rotate(-4deg); box-shadow: 2px 2px 0 var(--ink); }
.color-swatch.active {
  border-color: var(--c-violet);
  box-shadow: 0 0 0 3px var(--c-violet-soft);
}

.prop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
  gap: 10px;
}
.prop-row label { color: var(--ink-soft); font-weight: 600; }
.prop-row input[type="text"],
.prop-row input[type="number"],
.prop-row select {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--ink);
  background: var(--surface-2);
  font-size: 13px;
  font-family: inherit;
}
.prop-row input[type="color"] {
  width: 40px; height: 30px; padding: 0;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--ink);
  cursor: pointer;
}
.prop-row .btn-sm { padding: 7px 12px; }

/* Botón "Inicio" del topbar */
.editor-back {
  flex-shrink: 0;
  margin-right: 8px;
}
.editor-back-arrow { font-size: 16px; line-height: 1; }
@media (max-width: 700px) {
  .editor-back { padding: 7px 10px; box-shadow: 2px 2px 0 var(--ink); }
  .editor-back-text { display: none; }
}

/* Panel Draw — pinceles */
.brush-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.brush-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 6px;
  background: var(--surface-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 700;
  font-family: 'Bricolage Grotesque', sans-serif;
  color: var(--ink);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  box-shadow: 2px 2px 0 var(--ink);
}
.brush-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--ink);
  background: var(--c-violet-soft);
}
.brush-btn.active {
  background: var(--c-ink);
  color: var(--c-lime);
}
[data-theme="dark"] .brush-btn.active { background: var(--c-lime); color: var(--c-ink); }
.brush-ico { font-size: 22px; line-height: 1; }

/* Slider de grosor */
.brush-range {
  width: 100%;
  margin: 8px 0;
  accent-color: var(--c-violet);
}

/* Presets de tamaño */
.brush-sizes {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}
.brush-sizes button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  background: var(--surface-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.brush-sizes button:hover { background: var(--c-violet-soft); transform: translateY(-1px); }
.brush-sizes button.active { background: var(--c-lime); }
.brush-dot {
  display: block;
  border-radius: 50%;
  background: var(--ink);
}

/* Paleta de colores del pincel */
.brush-palette {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-top: 10px;
}
.brush-palette .swatch {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-spring);
  box-shadow: 1px 1px 0 var(--ink);
  padding: 0;
}
.brush-palette .swatch:hover { transform: scale(1.12) rotate(-4deg); box-shadow: 2px 2px 0 var(--ink); }
.brush-palette .swatch.active {
  outline: 3px solid var(--c-violet);
  outline-offset: 2px;
}

/* Capas mejoradas */
.layer-empty {
  font-size: 13px;
  color: var(--ink-mute);
  padding: 18px 6px;
  text-align: center;
  font-weight: 500;
}
.layer-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 8px 10px;
  background: var(--surface-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.layer-item:hover { background: var(--surface-3); }
.layer-item.active {
  background: var(--c-violet-soft);
  outline: 2px solid var(--c-violet);
}
[data-theme="dark"] .layer-item.active { background: var(--surface-3); outline-color: var(--c-lime); }
.layer-label {
  flex: 1;
  text-align: left;
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  padding: 4px 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.layer-actions { display: flex; gap: 2px; flex-shrink: 0; }
.layer-act {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--ink);
  transition: background var(--dur-fast) var(--ease);
  padding: 0;
}
.layer-act:hover { background: var(--surface); border-color: var(--ink); }

@media (max-width: 1100px) {
  .editor { grid-template-columns: 64px 240px 1fr 240px; }
}
@media (max-width: 900px) {
  .editor {
    grid-template-columns: 56px 1fr;
    grid-template-rows: 50px auto 1fr;
    height: calc(100dvh - 70px);
  }
  .editor-rail { padding: 8px 0; gap: 2px; }
  .editor-rail-btn { width: 52px; padding: 8px 0; font-size: 10.5px; }
  .editor-rail-btn .ico { font-size: 20px; }
  /* Draw NO funciona bien con touch — lo ocultamos en móvil */
  .editor-rail-btn[data-tool="draw"] { display: none; }
  .editor-panel  { grid-column: 2; grid-row: 2; max-height: 230px; padding: 14px; }
  .editor-topbar { grid-column: 2; grid-row: 1; padding: 0 12px; gap: 6px; }
  .editor-stage  { grid-column: 1 / 3; grid-row: 3; padding: 14px; }
  .editor-props  { display: none; }
  .editor-topbar-actions { gap: 4px; }
  .editor-topbar-actions .btn-sm { padding: 6px 10px; font-size: 12px; }
  .editor-topbar-actions .icon-btn { width: 32px; height: 32px; font-size: 14px; }
  .editor-topbar .file-name { font-size: 13px; min-width: 0; flex: 1; padding: 6px 10px; }
  .tpl-thumbs { grid-template-columns: 1fr 1fr; }
  .sticker-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .sticker { font-size: 22px; }
  .canvas-wrap { max-width: 100%; }
}
@media (max-width: 560px) {
  .editor { grid-template-columns: 50px 1fr; }
  .editor-rail-btn { width: 46px; padding: 7px 0; font-size: 10px; }
  .editor-rail-btn .ico { font-size: 18px; }
  .editor-topbar .file-name { display: none; }
}

/* En el canvas, dejamos a Fabric.js manejar el touch sin que el navegador
   robe el evento para scroll/zoom. Crítico para que el editor funcione bien
   con dedo en móvil. */
.canvas-wrap, .canvas-wrap canvas, .upper-canvas, .lower-canvas {
  touch-action: none;
}

/* ──────────────────────────────────────────────────────────────
   19a. MOBILE DRAWER — menú hamburguesa en móvil
   ────────────────────────────────────────────────────────────── */
.mobile-drawer {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 43, 0.55);
  backdrop-filter: blur(8px);
  z-index: 120;
  display: none;
}
.mobile-drawer.open { display: block; }
.mobile-drawer-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 86vw);
  background: var(--surface);
  border-left: 2.5px solid var(--ink);
  box-shadow: -8px 0 0 var(--ink);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--dur-med) var(--ease);
}
.mobile-drawer.open .mobile-drawer-panel { transform: translateX(0); }
.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px dashed var(--border-soft);
  margin-bottom: 6px;
}
.drawer-header-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.drawer-close {
  width: 38px;
  height: 38px;
  background: var(--surface-2);
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.drawer-section-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 11px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 6px;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  width: 100%;
  text-align: left;
}
.drawer-item:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); background: var(--c-violet-soft); }
.drawer-item:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.drawer-item .drawer-ico { font-size: 20px; line-height: 1; width: 24px; text-align: center; }
.drawer-item.is-primary {
  background: var(--grad-hot);
  color: white;
  background-size: 200% 200%;
  animation: gradShift 8s ease infinite;
}
.drawer-langs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.drawer-lang {
  padding: 10px 6px;
  background: var(--surface-2);
  border: 1.5px solid var(--ink);
  border-radius: var(--r-sm);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
  font-family: inherit;
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.drawer-lang.active { background: var(--c-ink); color: var(--c-lime); }
[data-theme="dark"] .drawer-lang.active { background: var(--c-lime); color: var(--c-ink); }

/* ──────────────────────────────────────────────────────────────
   19b. GLOBO AEROSTÁTICO — decoración flotante (desaparece al scroll)
   ────────────────────────────────────────────────────────────── */
.balloon-decor {
  position: fixed;
  top: 0;
  left: 0;
  width: 130px;
  height: auto;
  z-index: 3;
  pointer-events: none;
  filter: drop-shadow(5px 7px 0 rgba(20, 20, 43, 0.30)) drop-shadow(0 18px 28px rgba(124, 58, 237, 0.30));
  opacity: 0;
  transform: translate(-50%, -50%) translate(var(--bp-x, 80vw), var(--bp-y, 30vh));
  transition: opacity var(--dur-slow) var(--ease), transform 12s ease-in-out;
  animation: balloonBob 5s ease-in-out infinite;
  will-change: transform, opacity;
}
.balloon-decor.is-visible { opacity: 0.92; }
.balloon-decor.is-scrolling { opacity: 0; transition: opacity 200ms var(--ease); }
@keyframes balloonBob {
  0%, 100% { filter: drop-shadow(5px 7px 0 rgba(20, 20, 43, 0.30)) drop-shadow(0 18px 28px rgba(124, 58, 237, 0.30)); }
  50%      { filter: drop-shadow(5px 4px 0 rgba(20, 20, 43, 0.30)) drop-shadow(0 22px 32px rgba(124, 58, 237, 0.35)); }
}
@media (max-width: 768px) {
  .balloon-decor { width: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  .balloon-decor { display: none; }
}

/* ──────────────────────────────────────────────────────────────
   19c. GAMES HUB
   ────────────────────────────────────────────────────────────── */
.games-hero { padding: 48px 0 8px; position: relative; z-index: 2; }
.games-hero h1 { font-size: clamp(40px, 6vw, 72px); margin: 14px 0 16px; }
.games-hero .subtitle { font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-soft); max-width: 620px; font-weight: 500; }

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
}
@media (max-width: 640px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .game-thumb { aspect-ratio: 1 / 1; }
  .game-emoji { font-size: 50px; }
  .game-svg   { width: 60px; height: 60px; }
  .game-soon-badge { font-size: 9.5px; padding: 3px 7px; top: 8px; right: 8px; }
  .game-info { padding: 10px 12px; }
  .game-info strong { font-size: 14.5px; }
  .game-info small { font-size: 11.5px; line-height: 1.35; }
}
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: var(--stick-1);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur-med) var(--ease-spring), box-shadow var(--dur-med) var(--ease);
}
.game-card.is-ready { cursor: pointer; }
.game-card.is-ready:hover {
  transform: translate(-4px, -6px);
  box-shadow: var(--stick-3);
}
.game-card.is-soon { cursor: not-allowed; opacity: 0.7; }
.game-thumb {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 2px solid var(--ink);
}
.game-emoji {
  font-size: 80px;
  line-height: 1;
  filter: drop-shadow(3px 3px 0 rgba(20, 20, 43, 0.4));
  transition: transform var(--dur-slow) var(--ease-spring);
}
.game-card.is-ready:hover .game-emoji { transform: rotate(-8deg) scale(1.12); }

/* SVG icon (alternativa al emoji — e.g. Tetris) */
.game-svg {
  width: 96px;
  height: 96px;
  filter: drop-shadow(3px 3px 0 rgba(20, 20, 43, 0.45));
  transition: transform var(--dur-slow) var(--ease-spring);
}
.game-card.is-ready:hover .game-svg { transform: rotate(-6deg) scale(1.10); }
.game-soon-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--c-ink);
  color: var(--c-paper);
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--ink);
  transform: rotate(-3deg);
}
.game-info { padding: 16px 18px; }
.game-info strong {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.game-info small {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 500;
}

/* Layout interno de cada juego — canvas centrado, sticker-style */
.game-wrap {
  max-width: 720px;
  margin: 32px auto;
  padding: 24px;
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-xl);
  box-shadow: 8px 8px 0 var(--ink);
  text-align: center;
}
.game-wrap h1 { font-size: clamp(32px, 4vw, 48px); margin-bottom: 6px; }
.game-stats {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin: 14px 0;
  font-family: 'Bricolage Grotesque', sans-serif;
  flex-wrap: wrap;
}
.game-stat {
  font-size: 13px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.game-stat strong {
  display: block;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-top: 2px;
}
.game-canvas-wrap {
  display: inline-block;
  border: 2.5px solid var(--ink);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--c-ink);
  margin: 16px 0;
  position: relative;
  max-width: 100%;
}
.game-canvas-wrap canvas { display: block; max-width: 100%; height: auto; touch-action: none; }
.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 43, 0.85);
  backdrop-filter: blur(6px);
  color: white;
  font-family: 'Bricolage Grotesque', sans-serif;
  z-index: 2;
  padding: 16px;
}
.game-overlay h2 { font-size: clamp(28px, 4vw, 44px); margin-bottom: 18px; color: white; }
.game-overlay p { color: rgba(255,255,255,0.85); font-size: 16px; margin: 0 0 16px; }
.game-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}
.game-back {
  display: inline-block;
  margin-bottom: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}
.game-back:hover { color: var(--c-violet); }

/* ──────────────────────────────────────────────────────────────
   AJUSTES MÓVILES COMUNES PARA TODOS LOS JUEGOS
   Garantiza que: (1) el HUD/título/tablero caben arriba, (2) los
   controles abajo quedan dentro del viewport sin scroll. La regla
   clave: max-height del stage = altura disponible MENOS el espacio
   reservado para topbar + hud + controles.
   ────────────────────────────────────────────────────────────── */
@media (max-width: 620px) {
  /* Reduce top-bar / hud / tips paddings para ganar espacio vertical */
  .snake-wrap, .tetris-wrap, .pong-wrap, .brk-wrap, .ast-wrap, .pac-wrap, .chess-wrap {
    margin: 12px auto 24px;
    padding: 0 10px;
  }
  .snake-topbar, .tetris-topbar, .pong-topbar, .brk-topbar, .ast-topbar, .pac-topbar, .chess-topbar {
    margin-bottom: 10px;
    gap: 8px;
  }
  .snake-hud, .pong-hud, .brk-hud, .ast-hud, .pac-hud, .chess-hud {
    margin-bottom: 8px;
    gap: 6px;
  }

  /* Stages — limitar altura para que los controles queden visibles.
     100dvh - (topbar + hud + controles + tips/margenes ≈ 320px).
     min-height evita que sea demasiado pequeño en pantallas grandes
     en orientación landscape. */
  .snake-stage,
  .tetris-stage,
  .pong-stage,
  .brk-stage,
  .ast-stage,
  .pac-stage,
  .chess-stage {
    max-height: calc(100dvh - 280px);
    min-height: 220px;
  }

  /* Pads / D-pads más compactos */
  .snake-dpad, .pac-dpad {
    grid-template-columns: repeat(3, 48px);
    grid-template-rows: repeat(3, 48px);
    gap: 5px;
    margin-top: 10px;
  }
  .snake-dpad .dpad-btn, .pac-dpad .dpad-btn { font-size: 18px; }

  .brk-controls, .ast-controls, .tetris-controls, .pong-controls {
    margin-top: 10px;
    gap: 6px;
  }
  .brk-pad { width: 54px; height: 54px; font-size: 19px; }
  .brk-pad.brk-launch { width: 76px; }
  .ast-pad { width: 50px; height: 50px; font-size: 18px; }
  .ast-pad.ast-fire { width: 68px; }

  /* HUD cells más bajos */
  .snake-hud-cell, .pong-hud-cell, .brk-hud-cell, .ast-hud-cell, .pac-hud-cell, .chess-hud-cell {
    padding: 7px 6px;
  }
  .snake-hud-value, .pong-hud-value, .brk-hud-value, .ast-hud-value, .pac-hud-value, .chess-hud-value {
    font-size: 17px;
  }
  .snake-hud-label, .pong-hud-label, .brk-hud-label, .ast-hud-label, .pac-hud-label, .chess-hud-label {
    font-size: 9.5px;
    margin-bottom: 1px;
  }
}

/* Modal de ayuda — usado por TODOS los juegos vía .game-help-modal/.game-help-btn */
.game-help-btn {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  font-family: inherit;
  flex-shrink: 0;
}
.game-help-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.game-help-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 26, 0.86);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.game-help-modal.is-open { display: flex; }
.game-help-card {
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 8px 8px 0 var(--ink);
  padding: 26px 22px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}
.game-help-card h3 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  padding-right: 40px;
}
.game-help-card ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.game-help-card li { margin: 5px 0; }
.game-help-card em { color: var(--ink); font-style: normal; font-weight: 700; }
.game-help-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px solid var(--ink);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.game-help-close:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

/* Mando d-pad táctil para móvil */
.game-dpad {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows:    repeat(3, 56px);
  gap: 6px;
  margin: 18px auto 0;
  justify-content: center;
}
.dpad-btn {
  background: var(--surface-2);
  border: 2px solid var(--ink);
  border-radius: var(--r-md);
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--ink);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dpad-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.dpad-up    { grid-column: 2; grid-row: 1; }
.dpad-left  { grid-column: 1; grid-row: 2; }
.dpad-right { grid-column: 3; grid-row: 2; }
.dpad-down  { grid-column: 2; grid-row: 3; }
@media (min-width: 800px) { .game-dpad { display: none; } }

/* ──────────────────────────────────────────────────────────────
   20. STICKERS DECORATIVOS (floating background)
   ────────────────────────────────────────────────────────────── */
.deco-sticker {
  position: fixed;
  font-size: 56px;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  filter: drop-shadow(2px 2px 0 rgba(20, 20, 43, 0.20));
  animation: deco-float 18s ease-in-out infinite;
  user-select: none;
}
[data-theme="dark"] .deco-sticker { opacity: 0.18; }
@keyframes deco-float {
  0%,100% { transform: translateY(0) rotate(var(--deco-rot, 0deg)); }
  50%     { transform: translateY(-24px) rotate(calc(var(--deco-rot, 0deg) + 10deg)); }
}

/* ──────────────────────────────────────────────────────────────
   21. RESPONSIVE
   ────────────────────────────────────────────────────────────── */
/* Botón hamburguesa — solo visible en móvil */
.mobile-menu-btn { display: none; }

@media (max-width: 768px) {
  .navbar-inner { padding: 10px 14px; gap: 8px; }
  /* Nav-links visible pero compacto y scrollable */
  .nav-links {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-link {
    padding: 7px 10px;
    font-size: 12.5px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .brand { font-size: 16px; gap: 8px; flex-shrink: 0; }
  .brand-mark { width: 34px; height: 34px; font-size: 18px; }
  .nav-tools { gap: 6px; flex-shrink: 0; }
  /* En móvil ocultamos TODO lo del nav-tools excepto el botón hamburguesa y el avatar (si logueado).
     Las opciones (idioma, tema, feedback, login/salir/crear-cuenta) viven en el drawer. */
  .nav-tools > *:not(.mobile-menu-btn):not(.nav-avatar) { display: none; }
  .mobile-menu-btn { display: inline-flex; }
  .icon-btn, .nav-avatar { width: 36px; height: 36px; font-size: 16px; }
  .container { padding: 0 16px; }
  .hero { padding: 48px 0 24px; }
  .hero-marquee { transform: rotate(-2deg); }
  .hero-marquee-track { font-size: 18px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .card-image { font-size: 22px; }
  .card-body { padding: 14px; }
  .card-title { font-size: 15px; }
  .form-card { padding: 28px; margin: 24px auto; box-shadow: 6px 6px 0 var(--ink); }
  .banner { padding: 28px; }
  .banner .btn { width: 100%; }
  .fab { bottom: 18px; right: 18px; padding: 14px 22px; font-size: 14px; }
  .profile-avatar-big { width: 100px; height: 100px; font-size: 40px; box-shadow: 6px 6px 0 var(--ink); }
  .detail-image, .detail-info, .comments { box-shadow: 5px 5px 0 var(--ink); }
  .deco-sticker { font-size: 36px; opacity: 0.20; }
}
@media (max-width: 700px) {
  .hero-blob { display: none; }
  #cursorBlob { display: none; }
}

/* ──────────────────────────────────────────────────────────────
   22. SCROLLBAR
   ────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--c-ink);
  border: 3px solid var(--bg);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--c-violet); }
[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--c-violet); border-color: var(--bg); }

/* ──────────────────────────────────────────────────────────────
   23. REDUCED MOTION
   ────────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .hero-marquee-track { animation: none; }
  .deco-sticker { display: none; }
  #cursorBlob { display: none; }
}
