/* ================= Logo (recurso oficial, sin alteraciones) ================= */
.logo { display: inline-flex; align-items: center; flex-shrink: 0; border-radius: 12px; }
.logo img {
  width: var(--logo-size, 46px); height: var(--logo-size, 46px);
  border-radius: calc(var(--logo-size, 46px) * 0.22);
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10), 0 0 22px var(--accent-glow), 0 6px 16px rgba(0,0,0,0.5);
  transition: transform 0.3s var(--ease), box-shadow 0.4s var(--ease);
}
.logo:hover img { transform: translateY(-1px) scale(1.03); }

/* ================= Botones ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  font-weight: 700; font-size: 14px; letter-spacing: 0.01em; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s, color 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-primary {
  background: var(--accent-grad); color: var(--accent-ink);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12) inset, 0 8px 26px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 0 1px rgba(255,255,255,0.22) inset, 0 10px 34px var(--accent-glow); transform: translateY(-1px); }
.btn-light { background: var(--text); color: #111; }
.btn-light:hover { background: #fff; transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,0.07); border: 1px solid var(--line-strong); color: var(--text); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-ghost.is-active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 0 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  color: var(--text-2); transition: background 0.2s, color 0.2s;
  position: relative;
}
.icon-btn:hover { background: rgba(255,255,255,0.07); color: var(--text); }
.icon-btn svg { width: 21px; height: 21px; }
.icon-btn .dot { position: absolute; top: 9px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

.avatar {
  --s: 38px; width: var(--s); height: var(--s); border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-weight: 700; font-family: var(--font-display);
  font-size: calc(var(--s) * 0.38); color: #fff; overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}

/* ================= Buscador ================= */
.search-box { position: relative; }
.search-box input {
  width: 100%; height: 42px; border-radius: 999px; padding: 0 16px 0 42px;
  background: rgba(255,255,255,0.06); border: 1px solid var(--line); outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { border-color: var(--line-strong); background: rgba(255,255,255,0.09); box-shadow: 0 0 0 4px rgba(255,255,255,0.04); }
.search-box > svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 80;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: 6px; display: none; max-height: 70vh; overflow: auto;
}
.search-suggest.is-open { display: block; }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; }
.suggest-item:hover, .suggest-item.is-active { background: var(--surface-2); }
.suggest-item .mini-cover { width: 34px; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.suggest-item strong { display: block; font-size: 14px; }
.suggest-item span { font-size: 12px; color: var(--muted); }
.suggest-all { display: block; text-align: center; padding: 10px; font-size: 13px; font-weight: 600; color: var(--text-2); border-top: 1px solid var(--line); margin-top: 4px; }

/* ================= Drawer móvil ================= */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 90; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); z-index: 95;
  background: var(--bg-2); border-right: 1px solid var(--line); padding: 20px;
  transform: translateX(-102%); transition: transform 0.35s var(--ease); display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
.drawer.is-open { transform: none; }
.drawer.is-open + .drawer-backdrop, .drawer-backdrop.is-open { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.drawer a.drawer-link { display: flex; align-items: center; gap: 12px; padding: 13px 12px; border-radius: 12px; font-weight: 600; color: var(--text-2); }
.drawer a.drawer-link:hover, .drawer a.drawer-link[aria-current="page"] { background: var(--surface-2); color: var(--text); }
.drawer a.drawer-link svg { width: 20px; height: 20px; }
.drawer hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; width: 100%; }

/* ================= Tab bar ================= */
.tab-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); }
.tab-item svg { width: 22px; height: 22px; }
.tab-item[aria-current="page"] { color: var(--text); }
.tab-item[aria-current="page"] svg { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.tab-item.tab-novel[aria-current="page"] svg { color: var(--nv-500); filter: drop-shadow(0 0 6px var(--nv-glow)); }
.tab-item.tab-manga[aria-current="page"] svg { color: var(--mg-500); filter: drop-shadow(0 0 6px var(--mg-glow)); }

/* ================= Etiquetas ================= */
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  background: rgba(255,255,255,0.08); color: var(--text-2); border: 1px solid var(--line);
}
.tag-section { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 13%, rgba(0,0,0,0.35)); backdrop-filter: blur(6px); }
.tag-section::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 13.5px; color: var(--text-2);
  transition: all 0.2s; white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip[aria-pressed="true"], .chip.is-active { color: var(--accent-ink); background: var(--accent-grad); border-color: transparent; box-shadow: 0 4px 18px var(--accent-glow); }
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.chip-row::-webkit-scrollbar { display: none; }

/* ================= Portadas ================= */
.cover { position: relative; aspect-ratio: 2 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); isolation: isolate; }
.cover svg { width: 100%; height: 100%; }
.cover::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08); pointer-events: none; }

/* ================= Tarjetas ================= */
.card { position: relative; display: block; border-radius: var(--radius); outline-offset: 4px; }
.card .cover { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); box-shadow: var(--shadow-1); }
.card:hover .cover, .card:focus-visible .cover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(0,0,0,0.6), 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent), 0 0 30px var(--accent-glow); }
.card-badge { position: absolute; top: 9px; left: 9px; z-index: 2; height: 22px; padding: 0 8px; font-size: 10px; }
/* En manga el título va arriba: la etiqueta baja para no taparlo */
.card[data-section="manga"] .card-badge { top: auto; bottom: 9px; }
.card-fav { position: absolute; top: 6px; right: 6px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,0.45); backdrop-filter: blur(6px); color: #fff; opacity: 0; transition: opacity 0.2s, transform 0.2s; }
.card:hover .card-fav, .card-fav.is-on, .card-fav:focus-visible { opacity: 1; }
.card-fav svg { width: 17px; height: 17px; }
.card-fav.is-on { color: var(--accent); }
.card-fav.is-on svg { fill: currentColor; }
@media (hover: none) { .card-fav { opacity: 1; } }
.card-body { padding: 12px 2px 0; }
.card-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-author { font-size: 13px; color: var(--text-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; align-items: center; gap: 10px; margin-top: 7px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.card-meta .genre { color: var(--accent-strong); font-weight: 600; }
.stat { display: inline-flex; align-items: center; gap: 4px; }
.stat svg { width: 13px; height: 13px; }

/* ================= Carrusel horizontal (rail) ================= */
.rail { position: relative; }
.rail-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--card-w, 176px); gap: var(--rail-gap, 18px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 2px; padding: 6px 2px 14px;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }
.rail-btn {
  position: absolute; top: calc(50% - 40px); z-index: 5; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(20,20,26,0.9); border: 1px solid var(--line-strong);
  color: var(--text); box-shadow: var(--shadow-1); transition: opacity 0.2s, transform 0.2s;
}
.rail-btn:hover { transform: scale(1.06); border-color: var(--accent); }
.rail-btn svg { width: 20px; height: 20px; }
.rail-btn--prev { left: -18px; }
.rail-btn--next { right: -18px; }
.rail-btn[hidden] { display: grid; opacity: 0; pointer-events: none; }
@media (hover: none), (max-width: 760px) { .rail-btn { display: none !important; } }
@media (max-width: 760px) { .rail-track { --card-w: 132px; --rail-gap: 12px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding: 0 var(--gutter); } }

/* ================= Hero cinematográfico ================= */
.hero { position: relative; height: clamp(520px, 74vh, 760px); overflow: hidden; isolation: isolate; }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.9s var(--ease), visibility 0s linear 0.9s; }
.hero-slide.is-active { opacity: 1; visibility: visible; transition: opacity 0.9s var(--ease); }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art svg { width: 100%; height: 100%; }
.hero-slide.is-active .hero-art { animation: heroDrift 14s ease-out both; }
@keyframes heroDrift { from { transform: scale(1.08); } to { transform: scale(1); } }
/* Fusión de la imagen con el fondo: sin cortes rectos */
.hero-fade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(11,11,15,0.92) 26%, rgba(11,11,15,0.45) 55%, rgba(11,11,15,0.15) 75%, rgba(11,11,15,0.55) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(11,11,15,0.6) 22%, transparent 50%),
    linear-gradient(180deg, rgba(11,11,15,0.7) 0%, transparent 18%);
}
.hero-glow { position: absolute; z-index: -1; left: -10%; bottom: -30%; width: 70%; height: 80%; background: radial-gradient(ellipse, var(--accent-glow), transparent 65%); opacity: 0.55; filter: blur(10px); }
.hero-content {
  position: relative; height: 100%; max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter) 92px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 48px;
}
.hero-text { max-width: 600px; }
.hero-text .tag-section { margin-bottom: 18px; }
.hero-title { font-size: clamp(34px, 5.4vw, 68px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.02; text-shadow: 0 4px 30px rgba(0,0,0,0.5); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; color: var(--text-2); font-size: 14px; }
.hero-meta strong { color: var(--text); }
.hero-desc { margin-top: 16px; font-size: clamp(15px, 1.25vw, 17px); color: var(--text-2); max-width: 54ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-cover {
  width: clamp(190px, 18vw, 270px); transform: rotate(2deg);
  -webkit-mask-image: radial-gradient(ellipse 95% 92% at 50% 45%, #000 68%, transparent 100%);
  mask-image: radial-gradient(ellipse 95% 92% at 50% 45%, #000 68%, transparent 100%);
  filter: drop-shadow(0 30px 40px rgba(0,0,0,0.6));
}
.hero-cover .cover { border-radius: var(--radius-lg); }
.hero-slide.is-active .hero-cover { animation: coverIn 1.1s var(--ease) both; }
@keyframes coverIn { from { opacity: 0; transform: translateY(24px) rotate(4deg); } }
.hero-slide.is-active .hero-text > * { animation: textIn 0.9s var(--ease) both; }
.hero-slide.is-active .hero-text > *:nth-child(2) { animation-delay: 0.06s; }
.hero-slide.is-active .hero-text > *:nth-child(3) { animation-delay: 0.12s; }
.hero-slide.is-active .hero-text > *:nth-child(4) { animation-delay: 0.18s; }
.hero-slide.is-active .hero-text > *:nth-child(5) { animation-delay: 0.24s; }
@keyframes textIn { from { opacity: 0; transform: translateY(16px); } }

.hero-controls {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 30px;
  max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 14px;
}
.hero-dots { display: flex; gap: 8px; }
.hero-dot { position: relative; width: 34px; height: 30px; display: grid; align-items: center; }
.hero-dot::before { content: ""; height: 4px; border-radius: 4px; background: rgba(255,255,255,0.22); }
.hero-dot span { position: absolute; left: 0; top: 13px; height: 4px; width: 0; border-radius: 4px; background: var(--text); }
.hero-dot[aria-current="true"] span { animation: dotFill var(--hero-interval, 7s) linear forwards; }
.hero.is-paused .hero-dot[aria-current="true"] span { animation-play-state: paused; }
@keyframes dotFill { to { width: 100%; } }
.hero-arrows { margin-left: auto; display: flex; gap: 10px; }
.hero-arrow { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,0.35); border: 1px solid var(--line-strong); backdrop-filter: blur(8px); transition: background 0.2s, border-color 0.2s; }
.hero-arrow:hover { background: rgba(255,255,255,0.12); border-color: var(--text-2); }
.hero-arrow svg { width: 20px; height: 20px; }
.hero-counter { font-family: var(--font-display); font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.hero-counter { white-space: nowrap; }
@media (max-width: 860px) {
  /* Las diapositivas se apilan en la misma celda: el hero toma la altura de la más alta, sin recortes */
  .hero { height: auto; display: grid; }
  .hero-slide { position: relative; grid-area: 1 / 1; }
  .hero-content { grid-template-columns: 1fr; align-content: end; gap: 20px; padding-top: 28px; padding-bottom: 84px; height: auto; }
  .hero-cover { order: -1; width: 38vw; max-width: 180px; transform: none; justify-self: start; }
  .hero-fade { background: linear-gradient(0deg, var(--bg) 0%, rgba(11,11,15,0.88) 45%, rgba(11,11,15,0.35) 80%, rgba(11,11,15,0.6) 100%); }
  .hero-desc { -webkit-line-clamp: 2; }
  .hero-actions { gap: 10px; margin-top: 20px; }
  .hero-actions .btn-lg { min-height: 48px; padding: 0 16px; flex: 1 1 0; }
  .hero-actions .btn-primary { flex: 1 1 100%; }
  .hero-arrows { display: none; }
  .hero-controls { bottom: 28px; }
}

/* ================= Publicidad ================= */
.ad-slot {
  position: relative; display: grid; place-items: center; text-align: center;
  border: 1px dashed rgba(255,255,255,0.12); border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.015) 0 10px, transparent 10px 20px), rgba(255,255,255,0.015);
  color: var(--muted); font-size: 12px;
}
.ad-slot__label { position: absolute; top: 8px; left: 10px; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.7; }
.ad-slot__size { font-family: var(--font-display); font-size: 12px; opacity: 0.6; }
.ad-slot--skyscraper { width: 160px; height: 600px; }
.ad-slot--leaderboard { width: 100%; height: 100px; }
.ad-slot--mobile { width: 100%; height: 110px; }
.ad-inline { margin-top: clamp(36px, 5vw, 56px); }
@media (min-width: 761px) { .ad-inline .ad-slot--mobile { height: 96px; } }

/* ================= Categorías ================= */
.genre-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.genre-tile {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); min-height: 120px; padding: 18px;
  display: flex; flex-direction: column; justify-content: space-between; isolation: isolate;
  background: var(--surface); border: 1px solid var(--line); transition: transform 0.3s var(--ease), border-color 0.3s;
}
.genre-tile::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tile-bg); opacity: 0.85; transition: opacity 0.3s, transform 0.5s var(--ease); }
.genre-tile:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.genre-tile:hover::before { opacity: 1; transform: scale(1.06); }
.genre-tile svg.genre-icon { width: 30px; height: 30px; color: #fff; opacity: 0.9; }
.genre-tile strong { font-family: var(--font-display); font-size: 18px; }
.genre-tile small { display: block; color: rgba(255,255,255,0.7); font-size: 12.5px; margin-top: 2px; }
@media (max-width: 960px) { .genre-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .genre-tile { min-height: 104px; padding: 14px; } .genre-tile strong { font-size: 16px; } }

/* ================= Top readers ================= */
.readers { display: grid; grid-template-columns: 1.1fr 1fr; gap: 20px; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 12px; padding: 28px 20px 0; border-radius: var(--radius-xl); background: radial-gradient(ellipse at 50% 120%, rgba(242,236,224,0.12), transparent 60%), var(--surface); border: 1px solid var(--line); overflow: hidden; }
.podium-col { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.podium-col .avatar { --s: 64px; }
.podium-col.is-1 .avatar { --s: 84px; box-shadow: 0 0 0 3px #f5d27a, 0 0 30px rgba(245,210,122,0.4); }
.podium-col.is-2 .avatar { box-shadow: 0 0 0 3px #cfd4dd; }
.podium-col.is-3 .avatar { box-shadow: 0 0 0 3px #d39a6a; }
.podium-name { font-weight: 700; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-pts { font-size: 12px; color: var(--muted); }
.podium-step { width: 100%; border-radius: 14px 14px 0 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: 28px; color: rgba(255,255,255,0.85); background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.02)); border: 1px solid var(--line); border-bottom: 0; }
.is-1 .podium-step { height: 120px; background: linear-gradient(180deg, rgba(245,210,122,0.35), rgba(245,210,122,0.03)); }
.is-2 .podium-step { height: 88px; }
.is-3 .podium-step { height: 64px; }
.reader-list { border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--line); padding: 8px; }
.reader-row { display: grid; grid-template-columns: 28px auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.reader-row:hover { background: var(--surface-2); }
.reader-row .rank { font-family: var(--font-display); font-weight: 700; color: var(--muted); text-align: center; }
.reader-row .name { font-weight: 600; font-size: 14px; }
.reader-row .sub { font-size: 12px; color: var(--muted); }
.reader-row .pts { font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.mini-split { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.mini-split i { display: inline-block; height: 6px; border-radius: 3px; }
.mini-split .n { background: var(--nv-500); }
.mini-split .m { background: var(--mg-500); }
@media (max-width: 960px) { .readers { grid-template-columns: 1fr; } }

/* ================= Banner comunidad ================= */
.community {
  position: relative; overflow: hidden; border-radius: var(--radius-xl); padding: clamp(28px, 5vw, 64px);
  background: linear-gradient(120deg, #121218 0%, #18171f 100%); border: 1px solid var(--line-strong);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; isolation: isolate;
}
.community::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; left: -160px; top: -260px; background: radial-gradient(circle, rgba(64,253,20,0.16), transparent 65%); }
.community::after { content: ""; position: absolute; z-index: -1; width: 560px; height: 560px; right: -160px; bottom: -300px; background: radial-gradient(circle, rgba(250,0,138,0.2), transparent 65%); }
.community h2 { font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; letter-spacing: -0.02em; }
.community p { color: var(--text-2); margin-top: 14px; max-width: 52ch; font-size: 16px; }
.community-points { display: grid; gap: 12px; }
.community-point { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); background: rgba(255,255,255,0.04); border: 1px solid var(--line); }
.community-point svg { width: 22px; height: 22px; flex-shrink: 0; margin-top: 2px; }
.community-point strong { display: block; font-size: 15px; }
.community-point span { font-size: 13px; color: var(--muted); }
@media (max-width: 860px) { .community { grid-template-columns: 1fr; } }

/* ================= Toast ================= */
#toast-root { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100vw - 32px)); pointer-events: none; }
@media (max-width: 760px) { #toast-root { bottom: calc(var(--tabbar-h) + 14px); } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 14px; background: #1f1f28; border: 1px solid var(--line-strong); box-shadow: var(--shadow-2); font-size: 14px; animation: toastIn 0.35s var(--ease) both; }
.toast.is-leaving { animation: toastOut 0.3s var(--ease) both; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }

/* ================= Modal ================= */
.modal-backdrop { position: fixed; inset: 0; z-index: 150; background: rgba(5,5,8,0.78); backdrop-filter: blur(8px); display: grid; place-items: center; padding: 16px; animation: fadeIn 0.3s both; }
.modal { width: min(480px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-2); animation: toastIn 0.4s var(--ease) both; }
.modal h2 { font-size: 24px; margin-top: 18px; }
.modal p { color: var(--text-2); margin-top: 10px; }
.modal .btn-row { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } }

/* ================= Formularios ================= */
.field { display: grid; gap: 7px; }
.field + .field { margin-top: 16px; }
.field label, .field .label { font-size: 13px; font-weight: 600; color: var(--text-2); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: 12px; background: var(--bg-2);
  border: 1px solid var(--line-strong); outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { padding: 12px 14px; min-height: 140px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.input[aria-invalid="true"] { border-color: #ff5d5d; }
.field-hint { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12.5px; color: #ff7a7a; min-height: 0; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--accent); flex-shrink: 0; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; } }
.strength { height: 5px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.strength i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s, background 0.3s; }

/* ================= Aviso de integración pendiente ================= */
.pending-note {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius);
  background: rgba(255, 196, 0, 0.07); border: 1px solid rgba(255, 196, 0, 0.28); color: #f3dd9c; font-size: 13px;
}
.pending-note svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.pending-note strong { color: #ffe7a6; }

/* ================= Pestañas ================= */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 14px 16px; font-weight: 600; color: var(--muted); white-space: nowrap; min-height: 48px; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); border-radius: 2px; }

/* ================= Autor ================= */
.author-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 24px 16px 18px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.3s, transform 0.3s var(--ease); }
.author-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); transform: translateY(-3px); }
.author-card .avatar { --s: 72px; }
.author-card strong { font-family: var(--font-display); font-size: 15px; }
.author-card small { color: var(--muted); font-size: 12.5px; }

/* ================= Ranking & listas ================= */
.rank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px 24px; counter-reset: rank; }
.rank-item { display: grid; grid-template-columns: 52px 64px 1fr; align-items: center; gap: 14px; padding: 10px 8px; border-radius: var(--radius); transition: background 0.2s; }
.rank-item:hover { background: var(--surface); }
.rank-num { font-family: var(--font-display); font-weight: 800; font-size: 44px; line-height: 1; text-align: center; background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 12px var(--accent-glow)); }
.rank-item .cover { border-radius: 10px; }
.rank-item strong { font-family: var(--font-display); font-size: 15px; display: block; }
.rank-item small { color: var(--muted); font-size: 12.5px; }

.update-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
@media (max-width: 420px) { .update-list { grid-template-columns: 1fr; } }
.update-item { display: grid; grid-template-columns: 62px 1fr auto; gap: 14px; align-items: center; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: border-color 0.2s; }
.update-item:hover { border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.update-item .cover { border-radius: 9px; }
.update-item strong { font-family: var(--font-display); font-size: 14.5px; display: block; line-height: 1.25; }
.update-item small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.update-item .new { font-size: 10.5px; font-weight: 800; letter-spacing: 0.08em; padding: 3px 8px; border-radius: 999px; background: var(--accent-grad); color: var(--accent-ink); }
.update-item time { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Grid de portadas */
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 26px 18px; }
@media (max-width: 760px) { .cover-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 20px 12px; } }
@media (max-width: 360px) { .cover-grid { grid-template-columns: 1fr 1fr; } }

.empty { text-align: center; padding: 48px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); color: var(--muted); }
.empty strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 18px; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; }
