:root {
  --bg: #07090e;
  --card: rgba(18, 24, 38, 0.72);
  --card-solid: #121826;
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(74, 222, 128, 0.5);
  --text: #f1f5f9;
  --muted: #8b9bb4;
  --accent: #22c55e;
  --purple: #10b981;
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --card: rgba(255, 255, 255, 0.85);
  --card-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.12);
  --border-hover: rgba(22, 163, 74, 0.45);
  --text: #0f172a;
  --muted: #475569;
  --accent: #16a34a;
  --purple: #059669;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Figtree', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(760px 420px at 12% -10%, rgba(34, 197, 94, 0.24), transparent 60%),
    radial-gradient(820px 460px at 106% 0%, rgba(16, 185, 129, 0.22), transparent 62%),
    linear-gradient(160deg, #06170f 0%, #0b0f14 46%, #071018 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  padding: 22px 18px 50px;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 22px;
  transition: color 0.2s;
}
@media (hover: hover) and (pointer: fine) { .back-link:hover { color: var(--accent); } }

.hub-header { text-align: center; margin: 10px auto 34px; max-width: 720px; }
.hub-ball { width: clamp(78px, 18vw, 120px); height: auto; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.45)); animation: bob 3.6s ease-in-out infinite; margin-bottom: 10px; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hub-header h1 { font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.7rem, 6vw, 2.6rem); letter-spacing: 0.05em; text-transform: uppercase; }
.hub-title { display: flex; align-items: center; justify-content: center; gap: 10px; }
.hub-title img { height: 1.1em; width: auto; }
.hub-exit { padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-solid); color: var(--text); font-weight: 700; font-size: 0.9rem; cursor: pointer; font-family: inherit; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease; }
@media (hover: hover) and (pointer: fine) { .hub-exit:hover { border-color: var(--border-hover); transform: translateY(-1px); } }
.hub-userrow { text-align: center; margin: 6px auto 2px; }
.hub-user { display: inline-flex; align-items: center; gap: 8px; background: rgba(34, 197, 94, 0.14); border: 1px solid rgba(34, 197, 94, 0.4); border-radius: 999px; padding: 5px 14px 5px 5px; font-weight: 700; }
.hu-av { width: 32px; height: 32px; border-radius: 50%; background: #16a34a; color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 0.78rem; }
.hu-name { color: var(--text); font-size: 0.9rem; }
.grad { color: #22c55e; }
.hub-sub { color: var(--muted); font-size: 1rem; margin-top: 4px; }
.hub-welcome { max-width: 720px; margin: 0 auto 28px; padding: 14px 20px; text-align: center; border-radius: 16px; border: 1px solid var(--border); background: var(--card); color: var(--text); font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 1.05rem; }
.hub-welcome:empty { display: none; }
.hub-cta { text-align: center; margin: 0 auto 26px; }
.auth-loading .hub-cta { display: none !important; }
.hub-cta:empty { display: none; }
.hub-cta a { display: inline-block; padding: 12px 24px; border-radius: 99px; border: 1px solid var(--border); background: var(--card-solid); color: var(--text); text-decoration: none; font-weight: 700; font-size: 0.92rem; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease; }
@media (hover: hover) and (pointer: fine) { .hub-cta a:hover { border-color: var(--border-hover); transform: translateY(-1px); } }
.hub-warn { max-width: 620px; margin: 12px auto 0; font-size: 0.88rem; color: #f59e0b; font-weight: 600; }
.hub-warn b { color: #fbbf24; }

.hub-grid {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
@media (max-width: 640px) {
  .hub-grid { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
}

.hub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 18px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card-solid, #fff);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.hub-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-hover);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}
.hub-art { display: flex; align-items: flex-start; justify-content: flex-end; min-height: 60px; }
.hub-sect { text-align: center; font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--text); margin: 6px auto 14px; max-width: 760px; }
.hub-icon {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent, #16a34a);
  background: rgba(34, 197, 94, 0.15);
  padding: 9px 12px;
  border-radius: 13px;
}
.hub-emoji { font-size: clamp(2.6rem, 10vw, 3.4rem); line-height: 1; }
.hub-card h2 { font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.35rem; }
.hub-card p { color: var(--muted); font-size: 0.9rem; line-height: 1.5; flex: 1; }
.hub-go {
  display: block;
  text-align: center;
  margin-top: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #ffffff;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.hub-footer { text-align: center; margin-top: 46px; }
.hub-footer a { color: var(--muted); text-decoration: none; font-size: 0.85rem; }
@media (hover: hover) and (pointer: fine) { .hub-footer a:hover { color: var(--accent); } }

[data-theme="light"] body {
  background-image:
    radial-gradient(760px 420px at 18% -10%, rgba(34, 197, 94, 0.22), transparent 60%),
    radial-gradient(760px 460px at 100% 0%, rgba(16, 185, 129, 0.18), transparent 62%),
    linear-gradient(170deg, #e6fff0 0%, #eefaf3 45%, #eafaf7 100%);
}

@media (max-width: 640px) {
  body { padding: 14px 12px 32px; overflow-x: hidden; }
  .hub-top .user-name, .hub-top .user-caret { display: none; }
  .hub-top .user-chip { padding: 2px; border: none; background: transparent; }
  .hub-grid { width: 100%; }
  .hub-card { min-width: 0; overflow: hidden; }
  .hub-card p { overflow-wrap: anywhere; }
  .hub-header { margin: 4px auto 16px; }
  .hub-ball { width: clamp(56px, 15vw, 84px); margin-bottom: 6px; }
  .hub-header h1 { font-size: 1.6rem; }
  .hub-sub { font-size: 0.9rem; }
  .hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; }
  .hub-card { padding: 14px 12px 12px; gap: 6px; border-radius: 16px; }
  .hub-art { min-height: 48px; }
  .hub-emoji { font-size: 2.1rem; }
  .hub-card h2 { font-size: 1.08rem; }
  .hub-card p { font-size: 0.78rem; line-height: 1.4; }
  .hub-icon { font-size: 0.85rem; padding: 6px 9px; border-radius: 11px; }
  .hub-go { margin-top: 4px; font-size: 0.84rem; padding: 9px 12px; }
  .hub-welcome { font-size: 0.95rem; padding: 11px 14px; }
}

.hub-top { background: transparent; margin: 0 auto 10px; max-width: 940px; }
.hub-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0; min-height: 0; }
.hub-top-right { display: flex; align-items: center; gap: 10px; }
.hub-home { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-solid); color: var(--text); font-weight: 700; font-size: 0.88rem; text-decoration: none; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease; }
@media (hover: hover) and (pointer: fine) { .hub-home:hover { border-color: var(--border-hover); } }
.hub-top .theme-toggle { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.hub-top .user-wrap { position: relative; display: flex; align-items: center; }
.hub-top .user-chip { display: inline-flex; align-items: center; gap: 7px; background: rgba(34, 197, 94, 0.15); border: 1px solid rgba(34, 197, 94, 0.45); border-radius: 999px; padding: 3px 11px 3px 3px; cursor: pointer; font-family: inherit; }
.hub-top .user-avatar { width: 28px; height: 28px; border-radius: 50%; background: #16a34a; color: #fff; display: flex; align-items: center; justify-content: center; font-family: 'Bricolage Grotesque', sans-serif; font-weight: 700; font-size: 0.7rem; }
.hub-top .user-name { color: var(--text); font-weight: 700; font-size: 0.85rem; }
.hub-top .user-caret { color: var(--muted); font-size: 0.62rem; }
.hub-top .user-menu { position: absolute; right: 0; top: calc(100% + 8px); background: var(--card-solid); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25); min-width: 150px; padding: 6px; display: none; z-index: 80; }
.hub-top .user-menu.open { display: block; }
.hub-top .user-menu-exit { width: 100%; text-align: left; padding: 9px 12px; border: none; background: transparent; color: var(--text); font-weight: 700; font-size: 0.88rem; border-radius: 8px; cursor: pointer; font-family: inherit; }
@media (hover: hover) and (pointer: fine) { .hub-top .user-menu-exit:hover { background: rgba(239, 68, 68, 0.12); color: #ef4444; } }
.hub-home { display: inline-block; padding: 9px 20px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-solid); color: var(--text); text-decoration: none; font-weight: 700; font-size: 0.9rem; transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease; }
@media (hover: hover) and (pointer: fine) { .hub-home:hover { border-color: var(--border-hover); transform: translateY(-1px); } }

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-solid);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover { border-color: var(--accent); transform: scale(1.08); box-shadow: 0 0 16px rgba(34, 197, 94, 0.3); } }
.icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: block; }
/* ---------- Hub v3: lista agrupada, táctil y sobria ---------- */
:root { --ease-out: cubic-bezier(0.23, 1, 0.32, 1); }
.hub-header { margin-bottom: 14px; }
.hub-welcome { background: none; border: 0; padding: 0; margin: 0 auto 26px; max-width: 600px; font-family: inherit; font-weight: 600; font-size: 0.95rem; color: var(--muted); text-wrap: balance; }
.hub-main { max-width: 600px; margin: 0 auto; }
.hub-grp { margin: 0 0 8px; padding: 0 8px; font-family: inherit; font-size: 0.85rem; font-weight: 700; color: var(--muted); text-align: left; letter-spacing: 0; }
.hub-list { display: block; margin: 0 0 26px; border-radius: 22px; background: var(--card); border: 1px solid var(--border); overflow: hidden; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 16px 36px -18px rgba(0, 0, 0, 0.45); }
.hub-row { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; transition: background-color 0.18s var(--ease-out), transform 0.16s var(--ease-out); animation: hub-in 0.55s var(--ease-out) both; }
.hub-row + .hub-row::before { content: ""; position: absolute; top: 0; left: 76px; right: 0; height: 1px; background: var(--border); }
.hub-row:nth-child(2) { animation-delay: 50ms; }
.hub-row:nth-child(3) { animation-delay: 100ms; }
.hub-main .hub-list:nth-of-type(2) .hub-row { animation-delay: 150ms; }
.hub-row:active { transform: scale(0.985); background: rgba(34, 197, 94, 0.12); transition-duration: 0.08s; }
.hub-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 22px; }
.hub-tile { flex: none; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 13px; font-size: 1.5rem; line-height: 1; background: rgba(34, 197, 94, 0.12); box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.24); }
.hub-tx { flex: 1; min-width: 0; }
.hub-tx b { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em; color: var(--text); }
.hub-tx span { display: block; margin-top: 2px; font-size: 0.86rem; line-height: 1.35; color: var(--muted); text-wrap: pretty; }
.hub-chev { flex: none; color: var(--muted); opacity: 0.7; transition: transform 0.22s var(--ease-out), color 0.2s, opacity 0.2s; }
@media (hover: hover) and (pointer: fine) {
  .hub-row:hover { background: rgba(34, 197, 94, 0.07); }
  .hub-row:hover .hub-chev { transform: translateX(3px); color: var(--accent); opacity: 1; }
}
@keyframes hub-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hub-row { animation: none; transition: none; } .hub-chev { transition: none; } }
@media (max-width: 480px) { .hub-tx span { font-size: 0.82rem; } }

/* ---------- Hub v4: fondo de campo, iconos propios, cristal ---------- */
body.hub-page {
  background-color: #04070b;
  background-image:
    radial-gradient(70% 38% at 50% -8%, rgba(34, 197, 94, 0.34), transparent 72%),
    radial-gradient(42% 30% at 100% 28%, rgba(14, 165, 233, 0.14), transparent 70%),
    radial-gradient(40% 30% at 0% 62%, rgba(16, 185, 129, 0.14), transparent 70%),
    linear-gradient(#04070b, #060c12);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}
body.hub-page::before, body.hub-page::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 640px; pointer-events: none; z-index: 0; }
body.hub-page::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='520' viewBox='0 0 900 520' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Ccircle cx='450' cy='260' r='210'/%3E%3Ccircle cx='450' cy='260' r='6' fill='%23ffffff'/%3E%3Cpath d='M0 260h900'/%3E%3Crect x='300' y='-2' width='300' height='120'/%3E%3C/svg%3E") center 40px / min(900px, 150vw) no-repeat; opacity: 0.09; -webkit-mask-image: linear-gradient(#000 35%, transparent); mask-image: linear-gradient(#000 35%, transparent); }
body.hub-page::after { background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1.2px); background-size: 24px 24px; opacity: 0.35; -webkit-mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent 75%); mask-image: radial-gradient(70% 90% at 50% 0%, #000, transparent 75%); }
body.hub-page > * { position: relative; z-index: 1; }
[data-theme="light"] body.hub-page {
  background-color: #f3f7f4;
  background-image:
    radial-gradient(70% 38% at 50% -8%, rgba(34, 197, 94, 0.28), transparent 72%),
    radial-gradient(42% 30% at 100% 28%, rgba(14, 165, 233, 0.1), transparent 70%),
    radial-gradient(40% 30% at 0% 62%, rgba(16, 185, 129, 0.12), transparent 70%),
    linear-gradient(#f6faf7, #eef4f0);
}
[data-theme="light"] body.hub-page::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='520' viewBox='0 0 900 520' fill='none' stroke='%2316a34a' stroke-width='2'%3E%3Ccircle cx='450' cy='260' r='210'/%3E%3Ccircle cx='450' cy='260' r='6' fill='%2316a34a'/%3E%3Cpath d='M0 260h900'/%3E%3Crect x='300' y='-2' width='300' height='120'/%3E%3C/svg%3E"); opacity: 0.16; }
[data-theme="light"] body.hub-page::after { background-image: radial-gradient(rgba(15, 23, 42, 0.18) 1px, transparent 1.2px); opacity: 0.3; }

.hub-header h1.hub-title { font-size: clamp(2rem, 8vw, 2.9rem); text-transform: none; letter-spacing: -0.035em; font-weight: 700; }
.hub-title img { height: 1em; filter: drop-shadow(0 8px 18px rgba(34, 197, 94, 0.45)); }
.hub-sub { font-size: 0.98rem; }

.hub-list { border-radius: 26px; background: rgba(255, 255, 255, 0.045); border-color: rgba(255, 255, 255, 0.09); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 24px 48px -24px rgba(0, 0, 0, 0.7); }
[data-theme="light"] .hub-list { background: rgba(255, 255, 255, 0.72); border-color: rgba(15, 23, 42, 0.08); box-shadow: 0 1px 0 #fff inset, 0 20px 40px -22px rgba(15, 23, 42, 0.25); }
.hub-row { padding: 16px 18px; gap: 16px; }
.hub-row + .hub-row::before { left: 82px; }
.hub-tile { width: 50px; height: 50px; border-radius: 15px; color: #4ade80; background: linear-gradient(150deg, rgba(34, 197, 94, 0.28), rgba(16, 185, 129, 0.06)); box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.28), 0 6px 16px -6px rgba(34, 197, 94, 0.5); }
[data-theme="light"] .hub-tile { color: #15803d; }
.hub-tx b { font-size: 1.14rem; letter-spacing: -0.02em; }

/* ---------- Hub v5: iconos animados + Guía Fantasy destacada ---------- */
.hub-main { max-width: 640px; }
.hub-feature { position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "i t" "g g"; gap: 14px 16px; align-items: center; margin: 0 0 30px; padding: 22px 20px 20px; border-radius: 28px; color: inherit; text-decoration: none; overflow: hidden; background: linear-gradient(150deg, rgba(34, 197, 94, 0.32), rgba(16, 185, 129, 0.08) 60%, rgba(14, 165, 233, 0.08)); border: 1px solid rgba(74, 222, 128, 0.38); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 28px 56px -26px rgba(34, 197, 94, 0.55); -webkit-tap-highlight-color: transparent; transition: transform 0.16s var(--ease-out), box-shadow 0.25s var(--ease-out); animation: hub-in 0.55s var(--ease-out) both; }
.hub-feature::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, rgba(74, 222, 128, 0.35), transparent); pointer-events: none; }
.hf-icon { grid-area: i; width: 68px; height: 68px; display: grid; place-items: center; border-radius: 20px; color: #052e16; background: linear-gradient(145deg, #4ade80, #16a34a); box-shadow: 0 10px 24px -8px rgba(34, 197, 94, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
.hf-tx { grid-area: t; min-width: 0; position: relative; z-index: 1; }
.hf-tx b { display: block; font-family: 'Bricolage Grotesque', sans-serif; font-size: clamp(1.5rem, 6.4vw, 1.9rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: var(--text); }
.hf-tx span { display: block; margin-top: 6px; font-size: 0.92rem; line-height: 1.4; color: var(--muted); text-wrap: pretty; }
.hf-go { grid-area: g; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 50px; border-radius: 16px; font-weight: 800; font-size: 0.98rem; color: #052e16; background: linear-gradient(145deg, #4ade80, #22c55e); box-shadow: 0 10px 22px -10px rgba(34, 197, 94, 0.8); transition: transform 0.16s var(--ease-out); }
.hf-go .hub-chev { color: inherit; opacity: 1; }
.hub-feature:active { transform: scale(0.985); }
.hub-feature:active .hf-go { transform: scale(0.97); }
.hub-feature:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .hub-feature:hover .hf-go .hub-chev { transform: translateX(3px); } }

.hub-row { padding: 18px 18px; }
.hub-tile { width: 56px; height: 56px; border-radius: 17px; }
.hub-tile .ic { width: 28px; height: 28px; }
.hub-tx b { font-size: 1.2rem; }
.hub-tx span { font-size: 0.9rem; }
.hub-row + .hub-row::before { left: 90px; }
.hub-grp { font-size: 0.9rem; }

/* Iconos con vida */
.ic * { transform-box: fill-box; }
.ic-gavel { transform-box: view-box; transform-origin: 5px 19px; animation: ic-strike 3.2s var(--ease-out) infinite; }
.ic-base { transform-origin: 50% 50%; animation: ic-thud 3.2s var(--ease-out) infinite; }
@keyframes ic-strike { 0%, 62% { transform: rotate(0); } 72% { transform: rotate(-22deg); } 80% { transform: rotate(5deg); } 88% { transform: rotate(-2deg); } 100% { transform: rotate(0); } }
@keyframes ic-thud { 0%, 76% { transform: scaleX(1); opacity: 1; } 80% { transform: scaleX(1.25); opacity: 0.6; } 100% { transform: scaleX(1); opacity: 1; } }
.ic-ticket { transform-origin: 50% 50%; animation: ic-wobble 4s ease-in-out infinite; }
.ic-dash { animation: ic-march 1.1s linear infinite; }
@keyframes ic-wobble { 0%, 78%, 100% { transform: rotate(0); } 83% { transform: rotate(-8deg); } 89% { transform: rotate(6deg); } 95% { transform: rotate(-2deg); } }
@keyframes ic-march { to { stroke-dashoffset: -4.2; } }
.ic-ripple { transform-origin: 50% 50%; opacity: 0; animation: ic-ripple 2.4s var(--ease-out) infinite; }
.ic-mid { transform-origin: 50% 50%; animation: ic-breathe 2.4s ease-in-out infinite; }
.ic-dot { transform-origin: 50% 50%; animation: ic-beat 2.4s ease-in-out infinite; }
@keyframes ic-ripple { 0% { transform: scale(0.35); opacity: 0.9; } 100% { transform: scale(1.25); opacity: 0; } }
@keyframes ic-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.88); } }
@keyframes ic-beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.5); } }
.ic-big .b1, .ic-big .b2, .ic-big .b3 { transform-origin: 50% 100%; animation: ic-grow 2.6s var(--ease-out) infinite; }
.ic-big .b2 { animation-delay: 0.18s; }
.ic-big .b3 { animation-delay: 0.36s; }
.ic-big .trend { stroke-dasharray: 1; stroke-dashoffset: 1; animation: ic-draw 2.6s var(--ease-out) infinite; }
@keyframes ic-grow { 0% { transform: scaleY(0.25); } 35%, 85% { transform: scaleY(1); } 100% { transform: scaleY(0.25); } }
@keyframes ic-draw { 0%, 18% { stroke-dashoffset: 1; } 55%, 88% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hub-feature { animation: none; transition: none; }
  .ic *, .ic-gavel, .ic-ticket { animation: none !important; }
  .ic-ripple { opacity: 0; }
  .ic-big .trend { stroke-dashoffset: 0; }
}

/* ---------- Hub v6: fondo malla, iconos a color ---------- */
body.hub-page::before, body.hub-page::after { content: none; }
body.hub-page {
  background-color: #070a12;
  background-image:
    radial-gradient(48% 34% at 12% 6%, rgba(34, 197, 94, 0.34), transparent 70%),
    radial-gradient(46% 34% at 92% 14%, rgba(99, 102, 241, 0.30), transparent 70%),
    radial-gradient(46% 32% at 80% 80%, rgba(236, 72, 153, 0.16), transparent 70%),
    radial-gradient(46% 32% at 6% 92%, rgba(14, 165, 233, 0.2), transparent 70%);
  background-attachment: fixed;
}
[data-theme="light"] body.hub-page {
  background-color: #f6f7fb;
  background-image:
    radial-gradient(48% 34% at 12% 6%, rgba(34, 197, 94, 0.26), transparent 70%),
    radial-gradient(46% 34% at 92% 14%, rgba(99, 102, 241, 0.2), transparent 70%),
    radial-gradient(46% 32% at 80% 80%, rgba(236, 72, 153, 0.12), transparent 70%),
    radial-gradient(46% 32% at 6% 92%, rgba(14, 165, 233, 0.16), transparent 70%);
}
.hub-tile, .hub-tile .ic, .ic { overflow: visible; }
.hub-tile { color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 22px -8px var(--tg, rgba(34, 197, 94, 0.6)); }
.t-amber .hub-tile { --tg: rgba(245, 158, 11, 0.75); background: linear-gradient(145deg, #fbbf24, #ea580c); }
.t-rose .hub-tile { --tg: rgba(244, 63, 94, 0.7); background: linear-gradient(145deg, #fb7185, #be185d); }
.t-sky .hub-tile { --tg: rgba(56, 189, 248, 0.7); background: linear-gradient(145deg, #38bdf8, #4f46e5); }
[data-theme="light"] .hub-tile { color: #fff; }
.ic-gavel { animation-name: ic-strike2; }
@keyframes ic-strike2 { 0%, 62% { transform: rotate(0); } 72% { transform: rotate(-16deg); } 80% { transform: rotate(4deg); } 88% { transform: rotate(-1deg); } 100% { transform: rotate(0); } }

/* Guía Fantasy: lista de secciones */
.hub-feature { grid-template-areas: "i t" "l l" "g g"; }
.hf-list { grid-area: l; position: relative; z-index: 1; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 2px 0 2px; }
.hf-list li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 12px; border-radius: 14px; font-size: 0.86rem; font-weight: 700; line-height: 1.15; color: var(--text); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); animation: hub-in 0.5s var(--ease-out) both; }
.hf-list li:nth-child(1) { animation-delay: 120ms; } .hf-list li:nth-child(2) { animation-delay: 170ms; } .hf-list li:nth-child(3) { animation-delay: 220ms; } .hf-list li:nth-child(4) { animation-delay: 270ms; }
.hf-list li svg { flex: none; color: #4ade80; }
.hf-list li:nth-child(4) { grid-column: 1 / -1; }
[data-theme="light"] .hf-list li { background: rgba(255, 255, 255, 0.7); border-color: rgba(15, 23, 42, 0.08); }
[data-theme="light"] .hf-list li svg { color: #15803d; }
@media (prefers-reduced-motion: reduce) { .hf-list li { animation: none; } }

/* ---------- Hub v7: fondo plano con grano y un solo trazo ---------- */
body.hub-page { background-color: #0b0e0d; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); background-size: 160px 160px; background-attachment: scroll; position: relative; overflow-x: hidden; }
body.hub-page::after { content: none; }
body.hub-page::before { content: ""; position: absolute; top: -210px; right: -230px; width: 520px; height: 520px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.09); box-shadow: 0 0 0 70px rgba(0,0,0,0), inset 0 0 0 0 transparent; background: none; opacity: 1; -webkit-mask-image: none; mask-image: none; pointer-events: none; z-index: 0; height: 520px; left: auto; }
[data-theme="light"] body.hub-page { background-color: #ecefed; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); }
[data-theme="light"] body.hub-page::before { border-color: rgba(11, 14, 13, 0.1); background: none; opacity: 1; }
[data-theme="light"] body.hub-page { background-blend-mode: multiply; }
.hub-feature::after { content: none; }
.hub-feature { background: #0f2a1b; border-color: rgba(74, 222, 128, 0.35); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset; }
[data-theme="light"] .hub-feature { background: #dcf5e4; border-color: rgba(22, 163, 74, 0.35); }
.hub-list { background: rgba(255, 255, 255, 0.04); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
[data-theme="light"] .hub-list { background: #fff; box-shadow: none; }

.hub-feature { grid-template-areas: "i t" "g g"; }

/* Sin desplazamiento lateral en móvil */
html { overflow-x: hidden; max-width: 100%; }
body.hub-page { overflow-x: hidden; max-width: 100vw; }
@supports (overflow: clip) { html, body.hub-page { overflow-x: clip; } }
body.hub-page::before { position: fixed; }

/* Sin brillos de color: sombras neutras */
.hub-tile, .hf-icon { box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 14px -8px rgba(0,0,0,.55) !important; }
@media (hover: hover) and (pointer: fine) { .theme-toggle:hover { box-shadow: none; } }

/* Movimiento: pulsación inmediata en las filas del hub y respeto a "reducir movimiento" */
.hub-feature:active, .hub-row:active, .hub-game:active, .hub-main a:active { transform: scale(.98); transition-duration: 100ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Sin deslizamiento lateral en ninguna pantalla (Edu, 01/11/2026): la página solo se mueve hacia arriba y abajo.
   Las tiras con su propio scroll (escudos, filtros) siguen deslizándose dentro de su caja. */
html { overflow-x: hidden; overscroll-behavior-x: none; }
body { overflow-x: clip; overscroll-behavior-x: none; max-width: 100%; }
