/* RedactaIA Lectores · portal */
:root {
  --bg: #141414; --bg2: #1c1c1c; --bg3: #262626; --line: rgba(255,255,255,.12);
  --fg: #e5e5e5; --fg-strong: #fff; --mute: #a3a3a3; --ac: #e11d2a; --ac-dk: #b8121d;
  --radius: 6px; --gutter: clamp(16px, 4vw, 56px);
  --card-w: clamp(118px, 13.2vw, 210px);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; min-height: 100vh; }
a { color: inherit; }
button { font: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 300; background: #fff; color: #000; padding: 8px 12px; border-radius: 4px; }
.skip:focus { left: 8px; }
.muted { color: var(--mute); }

/* ---------- Barra ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: 68px; display: flex; align-items: center; gap: 28px;
  padding: 0 var(--gutter); background: linear-gradient(180deg, rgba(0,0,0,.78) 0%, rgba(0,0,0,0) 100%);
  transition: background-color .35s ease;
}
.nav.solid { background-color: var(--bg); }
.brand { font: 800 22px/1 var(--sans); letter-spacing: -.02em; color: var(--fg-strong); text-decoration: none; white-space: nowrap; }
.brand b { color: var(--ac); font-weight: 800; }
.brand.small { font-size: 16px; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { text-decoration: none; font-size: 14px; color: #d6d6d6; transition: color .2s; white-space: nowrap; }
.nav-links a:hover { color: #b3b3b3; }
.nav-links a.on { color: #fff; font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.search { position: relative; display: flex; align-items: center; height: 38px; border: 1px solid transparent; transition: border-color .25s, background .25s; }
.search-btn { width: 38px; height: 36px; border: 0; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; flex: none; }
.search input {
  width: 0; padding: 0; border: 0; background: transparent; color: #fff; font-size: 14px; outline: none;
  transition: width .3s ease, padding .3s ease;
}
.search input::-webkit-search-cancel-button { display: none; }
.search.open { border-color: rgba(255,255,255,.85); background: rgba(0,0,0,.75); }
.search.open input { width: 240px; padding-right: 30px; }
.search-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border: 0; background: transparent; color: #fff; font-size: 20px; cursor: pointer; }
.user { position: relative; }
.btn-enter { height: 34px; padding: 0 16px; border-radius: 4px; border: 0; background: var(--ac); color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; }
.btn-enter:hover { background: var(--ac-dk); }
.avatar { width: 34px; height: 34px; border-radius: 5px; border: 0; cursor: pointer; background: linear-gradient(135deg, #e11d2a, #7a0f16); color: #fff; font-weight: 700; font-size: 15px; }
.menu {
  position: absolute; right: 0; top: 46px; min-width: 220px; background: rgba(12,12,12,.97); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 0; box-shadow: 0 16px 40px rgba(0,0,0,.6);
}
.menu .who { padding: 8px 16px 10px; font-size: 13px; color: var(--mute); border-bottom: 1px solid var(--line); margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 16px; font-size: 14px; color: #e5e5e5; background: none; border: 0; cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(86vh, 820px); display: flex; align-items: flex-end; padding: 0 var(--gutter) clamp(90px, 13vh, 150px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img, .hero-bg picture { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(77deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.55) 38%, rgba(0,0,0,0) 72%),
    linear-gradient(180deg, rgba(20,20,20,0) 55%, rgba(20,20,20,.75) 85%, var(--bg) 100%);
}
.hero-in { position: relative; z-index: 1; max-width: 620px; animation: rise .8s ease both; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.hero-kicker i { width: 18px; height: 26px; background: var(--ac); display: inline-block; clip-path: polygon(0 0,100% 0,100% 100%,50% 80%,0 100%); }
.hero h1 { font: 700 clamp(34px, 5.6vw, 72px)/1.02 var(--serif); letter-spacing: -.02em; color: #fff; margin: 0 0 16px; text-shadow: 0 2px 24px rgba(0,0,0,.5); text-wrap: balance; }
.hero .by { font-size: 15px; color: #d4d4d4; margin: -6px 0 14px; }
.hero p.syn { font-size: clamp(15px, 1.35vw, 19px); line-height: 1.45; color: #ececec; margin: 0 0 22px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.acts { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; height: 46px; padding: 0 24px; border-radius: 5px; border: 0;
  font-size: 16px; font-weight: 700; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, transform .15s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn-play { background: #fff; color: #000; }
.btn-play:hover { background: rgba(255,255,255,.78); }
.btn-info { background: rgba(109,109,110,.7); color: #fff; }
.btn-info:hover { background: rgba(109,109,110,.45); }
.btn-red { background: var(--ac); color: #fff; }
.btn-red:hover { background: var(--ac-dk); }
.btn-line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- Filas ---------- */
.rows { position: relative; z-index: 2; margin-top: clamp(-110px, -9vh, -60px); padding-bottom: 40px; }
.row { margin: 0 0 12px; }
.row-h { display: flex; align-items: baseline; gap: 12px; padding: 0 var(--gutter); margin: 0 0 -32px; position: relative; z-index: 3; }
.row-h h2 { font: 700 clamp(17px, 1.5vw, 22px)/1.2 var(--sans); color: #e5e5e5; margin: 0; }
.row-h .see { font-size: 13px; color: #54b9c5; text-decoration: none; opacity: 0; transition: opacity .2s; }
.row:hover .row-h .see { opacity: 1; }
.row-wrap { position: relative; }
.scroller {
  display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: 48px var(--gutter) 56px; scroll-padding-left: var(--gutter); scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.arrow {
  position: absolute; top: 48px; bottom: 56px; width: calc(var(--gutter) - 4px); min-width: 36px; z-index: 20; border: 0; cursor: pointer;
  background: rgba(20,20,20,.55); color: #fff; font-size: 34px; display: grid; place-items: center; opacity: 0; transition: opacity .2s, background .2s;
}
.arrow svg { width: 26px; height: 26px; transition: transform .15s; }
.arrow:hover { background: rgba(20,20,20,.8); }
.arrow:hover svg { transform: scale(1.25); }
.arrow.l { left: 0; border-radius: 0 4px 4px 0; }
.arrow.r { right: 0; border-radius: 4px 0 0 4px; }
.row-wrap:hover .arrow:not([disabled]) { opacity: 1; }
.arrow[disabled] { pointer-events: none; }
@media (hover: none) { .arrow { display: none; } }

/* ---------- Tarjeta ---------- */
.card {
  position: relative; flex: 0 0 var(--card-w); aspect-ratio: 2 / 3; scroll-snap-align: start; border-radius: var(--radius);
  background: var(--bg3); cursor: pointer; transition: transform .28s cubic-bezier(.2,.8,.2,1) .12s, box-shadow .28s ease .12s, z-index 0s .12s;
  border: 0; padding: 0; color: inherit; text-align: left; transform-origin: center center; z-index: 1; outline-offset: 3px;
}
.card .cv { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .badge { position: absolute; top: 7px; left: 7px; z-index: 2; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; padding: 3px 7px; border-radius: 3px; background: rgba(0,0,0,.72); color: #fff; backdrop-filter: blur(4px); }
.card .badge.paid { background: var(--ac); }
.card .badge.code { background: #f5c451; color: #1a1300; }
.card .info {
  position: absolute; inset: auto 0 0 0; padding: 36px 10px 10px; border-radius: 0 0 var(--radius) var(--radius); z-index: 2;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.92) 42%); opacity: 0; transform: translateY(8px); transition: opacity .25s ease .12s, transform .25s ease .12s;
}
.card .info .ttl { font-size: 12.5px; font-weight: 700; color: #fff; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .info .au { font-size: 11px; color: #bdbdbd; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .info .ops { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.card .circ { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #fff; color: #000; }
.card .circ.o { background: rgba(42,42,42,.6); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.card .circ svg { width: 13px; height: 13px; }
.card .meta { font-size: 10.5px; color: #46d369; font-weight: 700; margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) and (min-width: 801px) {
  .card:hover, .card:focus-visible { transform: scale(1.3); z-index: 10; box-shadow: 0 14px 34px rgba(0,0,0,.75); }
  .card:hover .info, .card:focus-visible .info { opacity: 1; transform: none; }
  .card.edge-l { transform-origin: left center; }
  .card.edge-r { transform-origin: right center; }
}
@media (hover: none), (max-width: 800px) {
  .card .info { display: none; }
}

/* Portada tipográfica (fallback cliente) */
.tcover { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 30% 10% 10%; color: #fff; }
.tcover .t { font: 700 clamp(14px, 1.35vw, 21px)/1.08 var(--serif); letter-spacing: -.01em; text-wrap: balance; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; }
.tcover .rule { width: 28%; height: 2px; background: currentColor; opacity: .7; margin: 10px 0; }
.tcover .a { font-size: clamp(9px, .75vw, 12px); letter-spacing: .14em; text-transform: uppercase; opacity: .85; }
.tcover .c { margin-top: 4px; font-size: 9px; letter-spacing: .2em; text-transform: uppercase; opacity: .6; }

/* ---------- Rejilla (búsqueda / biblioteca / categorías) ---------- */
.page { padding: 100px var(--gutter) 40px; min-height: 70vh; }
.page h1 { font: 700 clamp(24px, 2.6vw, 36px)/1.15 var(--sans); color: #fff; margin: 0 0 6px; }
.page .sub { color: var(--mute); margin: 0 0 22px; }
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 44px 10px; padding-top: 10px; }
.grid .card { flex: none; width: 100%; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 800px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; } }
@media (max-width: 500px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.chip { height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--line); background: var(--bg2); color: #e5e5e5; font-size: 13.5px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.chip:hover { border-color: rgba(255,255,255,.4); }
.chip.on { background: #fff; color: #000; border-color: #fff; font-weight: 600; }
.skel { background: linear-gradient(90deg, #1f1f1f 0%, #2a2a2a 50%, #1f1f1f 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Estado vacío ---------- */
.empty { position: relative; z-index: 2; text-align: center; padding: 20px var(--gutter) 80px; margin-top: -40px; }
.shelf { display: flex; justify-content: center; align-items: flex-end; gap: 6px; height: 120px; margin: 0 auto 26px; }
.shelf span { width: 26px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, #3a3a3a, #232323); box-shadow: inset -3px 0 0 rgba(0,0,0,.25); animation: bob 3.4s ease-in-out infinite; }
.shelf span:nth-child(1) { height: 84px; } .shelf span:nth-child(2) { height: 106px; background: linear-gradient(180deg, #e11d2a, #7a0f16); animation-delay: .3s; }
.shelf span:nth-child(3) { height: 72px; animation-delay: .6s; } .shelf span:nth-child(4) { height: 96px; animation-delay: .9s; transform: rotate(8deg); transform-origin: bottom left; }
.shelf::after { content: ""; position: absolute; }
.shelf-base { width: 220px; height: 4px; margin: -26px auto 26px; background: #333; border-radius: 2px; }
@keyframes bob { 50% { translate: 0 -5px; } }
.empty h2 { font: 700 clamp(22px, 2.4vw, 32px)/1.2 var(--serif); color: #fff; margin: 0 0 10px; }
.empty p { color: var(--mute); max-width: 460px; margin: 0 auto 22px; }
.nores { padding: 40px 0; color: var(--mute); }
.nores b { color: #fff; }

/* ---------- Modal ---------- */
.mback { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.72); overflow-y: auto; padding: 32px 16px; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.modal {
  position: relative; margin: 0 auto; max-width: 860px; background: #181818; border-radius: 8px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.7); animation: pop .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.modal.sm { max-width: 460px; padding: 34px 32px 30px; margin-top: 6vh; }
.mclose { position: absolute; top: 14px; right: 14px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #181818; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.mclose:hover { background: #2a2a2a; }
.mhead { position: relative; aspect-ratio: 16 / 8; min-height: 260px; overflow: hidden; background: #000; }
.mhead .blur { position: absolute; inset: -30px; background-size: cover; background-position: center; filter: blur(28px) brightness(.55) saturate(1.2); transform: scale(1.1); }
.mhead::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(24,24,24,0) 45%, #181818 100%); pointer-events: none; }
.mhead .vid { position: absolute; inset: 0; z-index: 1; }
.mhead .vid iframe, .mhead .vid video { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.mhead.has-video::after { background: linear-gradient(180deg, rgba(24,24,24,0) 78%, #181818 100%); }
.mhead-in { position: absolute; left: 40px; right: 40px; bottom: 30px; z-index: 2; display: flex; gap: 26px; align-items: flex-end; }
.mhead .mcover { width: 128px; flex: none; aspect-ratio: 2/3; border-radius: 5px; overflow: hidden; position: relative; box-shadow: 0 12px 30px rgba(0,0,0,.6); background: var(--bg3); }
.mhead .mcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mhead h2 { font: 700 clamp(24px, 3.3vw, 40px)/1.05 var(--serif); color: #fff; margin: 0 0 14px; text-shadow: 0 2px 16px rgba(0,0,0,.6); text-wrap: balance; }
.mhead.has-video .mhead-in { position: relative; left: auto; right: auto; bottom: auto; }
.mvidbar { padding: 18px 40px 0; }
.mvidbar h2 { font: 700 clamp(24px, 3.3vw, 36px)/1.1 var(--serif); color: #fff; margin: 0 0 14px; }
.mbody { padding: 18px 40px 36px; }
.mgrid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 30px; }
.mmeta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 14px; color: #bcbcbc; margin-bottom: 12px; }
.mmeta .hl { color: #46d369; font-weight: 700; }
.pill { border: 1px solid rgba(255,255,255,.4); padding: 0 6px; border-radius: 3px; font-size: 12px; line-height: 20px; }
.syn { white-space: pre-wrap; line-height: 1.6; color: #e5e5e5; margin: 0; }
.side-k { font-size: 13.5px; color: #777; margin: 0 0 10px; line-height: 1.5; }
.side-k span { color: #ddd; }
.buybox { margin-top: 22px; padding: 18px 20px; border-radius: 8px; background: #232323; border: 1px solid var(--line); }
.buybox .price { font: 800 28px/1.1 var(--sans); color: #fff; margin: 0 0 4px; }
.buybox h4 { margin: 14px 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.buybox .methods { white-space: pre-wrap; font-size: 14px; line-height: 1.55; color: #ddd; margin: 0; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; padding: 8px 12px; border-radius: 6px; background: #2a2a2a; margin-top: 10px; }
.status.ok { background: rgba(70,211,105,.14); color: #7ee29a; }
.status.wait { background: rgba(245,196,81,.14); color: #f5c451; }
.status.no { background: rgba(225,29,42,.14); color: #ff7b84; }
.codebox { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.codebox input { flex: 1; min-width: 160px; }

.eps-h { display: flex; justify-content: space-between; align-items: baseline; margin: 34px 0 10px; }
.eps-h h3 { font-size: 22px; font-weight: 700; color: #fff; margin: 0; }
.eps-h span { color: var(--mute); font-size: 14px; }
.eps { list-style: none; margin: 0; padding: 0; }
.ep {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px 18px;
  border-bottom: 1px solid #404040; border-radius: 6px; cursor: pointer; background: transparent; width: 100%; text-align: left; color: inherit; border-left: 0; border-right: 0; border-top: 0;
}
.ep:first-child { background: #333; border-radius: 6px; }
.ep:hover { background: #2a2a2a; }
.ep .num { font-size: 26px; color: #d2d2d2; text-align: center; font-variant-numeric: tabular-nums; }
.ep .et { font-size: 16px; font-weight: 700; color: #fff; margin: 0 0 4px; }
.ep .es { font-size: 14px; color: #d2d2d2; line-height: 1.45; margin: 0; }
.ep .es.pend { color: #777; font-style: italic; }
.ep .ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }
.ep .ico svg { width: 14px; height: 14px; }
.ep.locked { cursor: default; }
.ep.locked .et, .ep.locked .num { color: #8c8c8c; }
.ep.locked:hover { background: transparent; }
.ep.locked:first-child:hover { background: #333; }
.more-eps { display: block; margin: 14px auto 0; }
.dlbox { margin-top: 30px; padding: 20px; border-radius: 8px; border: 1px solid var(--line); background: #1f1f1f; }
.dlbox h3 { margin: 0 0 6px; color: #fff; font-size: 17px; }
.dlbox p { margin: 0 0 14px; color: var(--mute); font-size: 14px; }

/* ---------- Formularios ---------- */
.form h2 { font: 700 26px/1.2 var(--sans); color: #fff; margin: 0 0 6px; }
.form .lead { color: var(--mute); margin: 0 0 20px; font-size: 14.5px; }
.fld { display: block; margin: 0 0 14px; }
.fld > span { display: block; font-size: 13px; color: #b3b3b3; margin: 0 0 6px; }
.inp {
  width: 100%; height: 48px; border-radius: 5px; border: 1px solid #5a5a5a; background: #333; color: #fff; padding: 0 14px; font-size: 16px; outline: none;
}
textarea.inp { height: 90px; padding: 12px 14px; resize: vertical; line-height: 1.45; font-family: inherit; }
.inp:focus { border-color: #fff; background: #3a3a3a; }
.inp[readonly] { color: #a8a8a8; background: #262626; }
.form .btn { width: 100%; margin-top: 6px; }
.form .alt { margin: 18px 0 0; color: #8c8c8c; font-size: 14.5px; }
.linkbtn { background: none; border: 0; color: #fff; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.err { color: #ff8a8f; font-size: 14px; min-height: 20px; margin: 4px 0 6px; }
.note { font-size: 13px; color: #8c8c8c; line-height: 1.5; margin: 14px 0 0; }
.okmsg { text-align: center; }
.okmsg .big { font-size: 44px; margin-bottom: 6px; }

/* ---------- Pie y avisos ---------- */
.foot { padding: 34px var(--gutter) 46px; color: #808080; font-size: 13px; border-top: 1px solid #1f1f1f; }
.foot p { margin: 0 0 8px; }
.foot a { color: #b3b3b3; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1200; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: #fff; color: #111; padding: 11px 16px; border-radius: 6px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: rise .25s ease; }
.toast.bad { background: #e11d2a; color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links { gap: 14px; }
  .mgrid { grid-template-columns: 1fr; gap: 6px; }
  .mhead-in { left: 24px; right: 24px; bottom: 22px; }
  .mbody, .mvidbar { padding-left: 24px; padding-right: 24px; }
}
@media (max-width: 800px) {
  .nav { height: 58px; gap: 12px; }
  .brand { font-size: 18px; }
  .nav-links { display: none; }
  .search.open { position: absolute; left: 12px; right: 12px; top: 10px; background: #000; z-index: 5; }
  .search.open input { width: 100%; flex: 1; }
  .hero { min-height: 74vh; padding-bottom: 96px; align-items: flex-end; }
  .hero-bg::after { background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.2) 35%, rgba(20,20,20,.85) 72%, var(--bg) 100%); }
  .hero-in { max-width: none; text-align: center; margin: 0 auto; }
  .hero .acts { justify-content: center; }
  .hero-kicker { justify-content: center; }
  .rows { margin-top: -60px; }
  .row-h { margin-bottom: -38px; }
  .row-h .see { opacity: 1; }
  .scroller { padding: 46px var(--gutter) 30px; gap: 7px; }
  :root { --card-w: 30vw; }
  .page { padding-top: 80px; }
  .mback { padding: 0; }
  .modal { border-radius: 0; min-height: 100%; max-width: none; }
  .modal.sm { min-height: 0; margin: 60px 12px; border-radius: 8px; padding: 28px 20px 24px; }
  .mhead { aspect-ratio: auto; min-height: 0; height: auto; padding-top: 70px; }
  .mhead-in { position: relative; left: auto; right: auto; bottom: auto; flex-direction: column; align-items: center; text-align: center; padding: 0 20px 18px; gap: 16px; }
  .mhead .mcover { width: 132px; }
  .mhead .acts { justify-content: center; }
  .mhead.has-video { padding-top: 0; }
  .mhead.has-video .vid { position: relative; aspect-ratio: 16/9; }
  .mbody { padding: 10px 18px 30px; }
  .mvidbar { padding: 16px 18px 0; text-align: center; }
  .mvidbar .acts { justify-content: center; }
  .ep { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 16px 10px; }
  .ep .num { font-size: 20px; }
  .ep .et { font-size: 15px; }
  .ep .es { font-size: 13.5px; }
}
@media (max-width: 500px) {
  :root { --card-w: 31vw; }
  .btn { height: 42px; padding: 0 18px; font-size: 15px; }
  .hero h1 { font-size: 34px; }
  .acts .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ================= Tanda demo 13-sep: video del hero, destacados, top 10, +18 ================= */
.hero-bg { background: #0b0708 url('/lectores/hero-poster.jpg') center / cover no-repeat; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 1.2s ease; }
.hero-bg.vid-on .hero-video { opacity: 1; }
.hero-bg.vid-on picture { opacity: 0; transition: opacity 1.2s ease; }
.hero-bg picture { position: absolute; inset: 0; }
.hero-bg::after {
  background:
    radial-gradient(ellipse at 70% 40%, rgba(120,10,20,.0) 0%, rgba(0,0,0,.35) 70%),
    linear-gradient(77deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 40%, rgba(0,0,0,.1) 75%),
    linear-gradient(180deg, rgba(20,20,20,0) 55%, rgba(20,20,20,.8) 86%, var(--bg) 100%);
}
.hero-slides { max-width: 980px; width: 100%; }
.hero-slide { display: flex; gap: clamp(22px, 3vw, 44px); align-items: flex-end; }
.hero-slide.swap { animation: heroin .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes heroin { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
.hero-cover {
  flex: none; width: clamp(150px, 15vw, 230px); aspect-ratio: 2/3; border-radius: 6px; overflow: hidden; position: relative; padding: 0; border: 0; cursor: pointer;
  background: var(--bg3); box-shadow: 0 24px 60px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.08); transform: rotate(-2deg); transition: transform .35s ease;
}
.hero-cover:hover { transform: rotate(0) scale(1.03); }
.hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-txt { min-width: 0; max-width: 620px; }
.hero .hmeta { margin: -4px 0 12px; font-size: 14px; font-weight: 600; color: #46d369; }
.hero-dots { display: flex; gap: 8px; margin-top: 26px; }
.hdot { width: 26px; height: 4px; border-radius: 2px; border: 0; padding: 0; background: rgba(255,255,255,.3); cursor: pointer; transition: background .3s, width .3s; }
.hdot.on { background: #fff; width: 44px; }
.hdot::before { content: ""; display: block; margin: -10px 0; height: 24px; }

.age { display: inline-grid; place-items: center; font: 800 10.5px/1 var(--sans); letter-spacing: .02em; padding: 3px 6px; border-radius: 3px; background: #111; color: #fff; box-shadow: inset 0 0 0 1.5px #ff4d5a; }
.card .age { position: absolute; top: 7px; right: 7px; z-index: 2; }
.card .vbadge { position: absolute; right: 7px; bottom: 7px; z-index: 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.7); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); }
.card .vbadge svg { width: 11px; height: 11px; margin-left: 1px; }
.card:hover .vbadge { opacity: 0; }
.mmeta .age { font-size: 12px; padding: 4px 7px; }
.agegate { text-align: center; padding: 70px 30px 60px !important; }
.agegate .age.big { font-size: 26px; padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; }
.agegate h2 { color: #fff; font: 700 28px/1.2 var(--serif); margin: 0 0 8px; }
.agegate .acts { justify-content: center; margin-top: 22px; }

/* Top 10 con números grandes */
.top10 { list-style: none; margin: 0; gap: 0; counter-reset: none; }
.tslot { position: relative; flex: 0 0 calc(var(--card-w) * 1.58); display: flex; align-items: stretch; justify-content: flex-end; scroll-snap-align: start; }
.tnum {
  position: absolute; left: 0; bottom: -0.12em; z-index: 0; font: 900 calc(var(--card-w) * 1.12)/.8 var(--sans); letter-spacing: -.08em;
  color: #141414; -webkit-text-stroke: 3px rgba(255,255,255,.55); paint-order: stroke; user-select: none; pointer-events: none;
}
.tslot:nth-child(10) .tnum { font-size: calc(var(--card-w) * 1.0); letter-spacing: -.12em; }
.tslot .card { flex: 0 0 var(--card-w); width: var(--card-w); margin-right: 6px; }
.row-top .row-h { margin-bottom: -22px; }
@media (max-width: 800px) {
  .hero-slide { flex-direction: column; align-items: center; text-align: center; gap: 18px; }
  .hero-cover { width: 132px; transform: none; }
  .hero-dots { justify-content: center; margin-top: 18px; }
  .hero .syn { -webkit-line-clamp: 2; }
  .tslot { flex-basis: calc(var(--card-w) * 1.55); }
  .tnum { -webkit-text-stroke-width: 2px; }
}
@media (prefers-reduced-motion: reduce) { .hero-video { display: none !important; } }
@media (max-width: 800px) {
  .hero { min-height: 0; padding-top: 84px; }
}

/* ================= Comunidad, cuenta, géneros, idiomas, biblioteca (13-sep noche) ================= */
/* ---- Barra ---- */
.gen-wrap { position: relative; display: flex; }
.gen-btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 0; color: #d6d6d6; font-size: 14px; cursor: pointer; white-space: nowrap; }
.gen-btn svg { transition: transform .2s; }
.gen-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.gen-btn:hover, .gen-btn.on { color: #fff; }
.gen-btn.on { font-weight: 600; }
.gen-panel {
  position: absolute; top: 60px; left: var(--gutter); z-index: 120; width: min(760px, calc(100vw - 2 * var(--gutter)));
  background: rgba(10,10,10,.97); border: 1px solid var(--line); border-top: 2px solid var(--ac); border-radius: 4px 4px 8px 8px;
  box-shadow: 0 30px 70px rgba(0,0,0,.7); animation: genIn .2s ease;
}
@keyframes genIn { from { opacity: 0; transform: translateY(-6px); } }
.gen-in { padding: 18px 22px 20px; }
.gen-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.gen-h b { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.gen-h a { font-size: 13px; color: #fff; text-decoration: none; }
.gen-h a:hover { text-decoration: underline; }
.gen-cols { columns: 3; column-gap: 26px; list-style: none; margin: 0; padding: 0; }
.gen-cols li { break-inside: avoid; }
.gen-cols a { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 14.5px; color: #e5e5e5; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.05); }
.gen-cols a:hover span { text-decoration: underline; color: #fff; }
.gen-cols a small { color: #777; font-variant-numeric: tabular-nums; }
.gen-cols a.vacio span { color: #8a8a8a; }
.nav-ic { position: relative; display: flex; }
.icbtn { position: relative; width: 38px; height: 38px; border-radius: 50%; border: 0; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; text-decoration: none; }
.icbtn svg { width: 23px; height: 23px; }
.icbtn:hover, .icbtn[aria-expanded="true"] { background: rgba(255,255,255,.1); }
.icbtn.sm { width: 34px; height: 34px; font-size: 20px; }
.icbtn.sm svg { width: 19px; height: 19px; }
.nbadge { position: absolute; top: 2px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--ac); color: #fff; font: 700 10.5px/17px var(--sans); text-align: center; box-shadow: 0 0 0 2px #141414; animation: pop .25s ease; }
.nbadge.dot { min-width: 9px; width: 9px; height: 9px; padding: 0; top: 4px; right: calc(50% - 16px); }
.avatar { position: relative; overflow: hidden; padding: 0; display: grid; place-items: center; }
.avatar .av { width: 100%; height: 100%; display: grid; place-items: center; }
.av { position: relative; overflow: hidden; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.menu .who { display: flex; gap: 10px; align-items: center; white-space: normal; }
.menu .who .av.sm { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, #e11d2a, #7a0f16); color: #fff; font-weight: 700; }
.menu .who b { display: block; color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .who span { display: block; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabbar { display: none; }
@media (max-width: 1180px) { .nav-links { gap: 14px; } .nav-links a, .gen-btn { font-size: 13.5px; } .search.open input { width: 170px; } }
@media (max-width: 1000px) { .nav-links a[data-nav="idiomas"] { display: none; } }
@media (max-width: 800px) {
  .nav-right { gap: 4px; }
  .nav-ic .icbtn { width: 36px; height: 36px; }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 110; display: grid; grid-template-columns: repeat(5, 1fr);
    background: rgba(12,12,12,.96); border-top: 1px solid #262626; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #9a9a9a; text-decoration: none; font-size: 10.5px; font-weight: 600; padding: 3px 0; }
  .tabbar a svg { width: 23px; height: 23px; }
  .tabbar a.on { color: #fff; }
  .tabbar a.on::before { content: ""; position: absolute; top: -6px; width: 22px; height: 2px; border-radius: 2px; background: var(--ac); }
  body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .gen-panel { position: fixed; inset: 58px 0 calc(64px + env(safe-area-inset-bottom)) 0; width: auto; border-radius: 0; overflow-y: auto; }
  .gen-cols { columns: 2; }
  .btn-enter { padding: 0 12px; }
}
@media (max-width: 420px) { .brand { font-size: 16px; } .brand b { display: none; } }

/* ---- Esqueletos ---- */
.sk { background: linear-gradient(90deg, #1f1f1f 0%, #2c2c2c 50%, #1f1f1f 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: 6px; }
.sk-card { flex: 0 0 var(--card-w); aspect-ratio: 2/3; border-radius: var(--radius); }
.grid .sk-card { width: 100%; }
.sk-scroller { pointer-events: none; }
.sk-line { height: 12px; margin: 0 0 10px; border-radius: 5px; }
.sk-title { width: 180px; height: 18px; }
.sk-h2 { height: 34px; width: 70%; margin-bottom: 18px; }
.sk-hero-t { height: 56px; width: min(520px, 80vw); margin-bottom: 18px; }
.sk-btn { width: 130px; height: 42px; border-radius: 5px; }
.sk-cover { background-color: #262626; }
.sk-circle { width: 34px; height: 34px; border-radius: 50%; flex: none; }
.sk-avatar { width: 48px; height: 48px; border-radius: 50%; flex: none; margin: 0 auto; }
.sk-avatar.xl { width: 132px; height: 132px; margin: 0; border: 4px solid #141414; }
.sk-chip { width: 90px; height: 34px; border-radius: 17px; }
.sk-stat { height: 86px; border-radius: 12px; }
.sk-chart { height: 240px; border-radius: 12px; margin-top: 18px; }
.sk-banner { height: 180px; border-radius: 12px; margin: 16px 0; }
.sk-head { background: #1a1a1a; }
.sk-head .mhead-in { align-items: flex-end; }
.sk-eps { display: flex; flex-direction: column; gap: 4px; }
.sk-ep { display: flex; gap: 18px; align-items: center; padding: 18px; border-bottom: 1px solid #2a2a2a; }
.sk-num { width: 30px; height: 26px; }
.sk-lines .sk-line:last-child { margin-bottom: 0; }
.sk-msgs { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.sk-bub { width: 58%; height: 44px; border-radius: 16px; }
.sk-bub.me { align-self: flex-end; width: 44%; }
.sk-bub.short { width: 28%; }
.sk-conv { pointer-events: none; }
.sk-p { pointer-events: none; }

/* ---- Ver más ---- */
.clamp { position: relative; max-height: calc(var(--clamp-lines) * 1.6em); overflow: hidden; transition: max-height .45s ease; }
.clamp.is-clamped:not(.open) { -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
.clamp.open { max-height: 4000px; }
.clamp-btn { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; padding: 6px 12px 6px 0; border: 0; background: none; color: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
.clamp-btn svg { width: 16px; height: 16px; transition: transform .25s; }
.clamp-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.clamp-btn:hover span { text-decoration: underline; }

/* ---- Ilustraciones ---- */
.ilu-box { width: min(300px, 70vw); margin: 0 auto 10px; }
.ilu-box.sm { width: 120px; }
.ilu-box.xs { width: 96px; }
.ilu-box svg { width: 100%; height: auto; display: block; overflow: visible; }
.ilu-glow { animation: iluGlow 3s ease-in-out infinite; transform-origin: center; }
@keyframes iluGlow { 50% { opacity: .5; } }
.ilu-book { animation: iluFloat 4s ease-in-out infinite; }
@keyframes iluFloat { 50% { transform: translateY(-5px); } }
.ilu-flip { transform-origin: 130px 110px; animation: iluFlip 3.2s cubic-bezier(.45,.05,.3,1) infinite; }
@keyframes iluFlip { 0%, 20% { transform: scaleX(1); opacity: 1; } 55% { transform: scaleX(-.02); opacity: .9; } 80%, 100% { transform: scaleX(-1); opacity: 0; } }
.ilu-lupa { transform-origin: 186px 118px; animation: iluLupa 3.2s ease-in-out infinite; }
@keyframes iluLupa { 0% { transform: translate(0,0) rotate(0); } 25% { transform: translate(-60px,-24px) rotate(-8deg); } 50% { transform: translate(-100px,4px) rotate(4deg); } 75% { transform: translate(-30px,-10px) rotate(-4deg); } 100% { transform: translate(0,0) rotate(0); } }
.ilu-dots circle { animation: iluTw 2.4s ease-in-out infinite; }
.ilu-dots circle:nth-child(2) { animation-delay: .6s; } .ilu-dots circle:nth-child(3) { animation-delay: 1.2s; } .ilu-dots circle:nth-child(4) { animation-delay: 1.8s; }
@keyframes iluTw { 50% { opacity: .15; } }
.ilu-cae { transform-origin: 150px 140px; animation: iluCae 3.6s ease-in-out infinite; }
@keyframes iluCae { 0%, 30% { transform: rotate(0); } 55%, 100% { transform: rotate(-16deg); } }
.ilu-plus { animation: iluFloat 3s ease-in-out infinite; }
.ilu-bell { transform-origin: 60px 18px; animation: iluBell 3s ease-in-out infinite; }
@keyframes iluBell { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(10deg); } 84% { transform: rotate(-8deg); } 92% { transform: rotate(4deg); } }
.ilu-z text { animation: iluZ 2.6s ease-in-out infinite; }
.ilu-z text:nth-child(2) { animation-delay: .5s; }
@keyframes iluZ { 0% { opacity: 0; transform: translateY(6px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-6px); } }
.ilu-burbuja { animation: iluFloat 2.6s ease-in-out infinite; }
.ilu-burbuja circle { animation: iluTw 1.2s ease-in-out infinite; }
.ilu-burbuja circle:nth-child(3) { animation-delay: .2s; } .ilu-burbuja circle:nth-child(4) { animation-delay: .4s; }
.ilu-lock { transform-origin: 60px 116px; animation: iluShakeL 3.4s ease-in-out infinite; }
@keyframes iluShakeL { 0%, 78%, 100% { transform: rotate(0); } 82% { transform: rotate(-6deg); } 88% { transform: rotate(5deg); } 94% { transform: rotate(-2deg); } }
.ilu-brillo { animation: iluTw 1.8s ease-in-out infinite; }
.ilu-p1 { animation: iluFloat 3.4s ease-in-out infinite; }
.ilu-p2, .ilu-libro-p { animation: iluFloat 3.4s ease-in-out .8s infinite; }
.codecard.unlocked .ilu-arco { transform: translateY(-14px) rotate(-18deg); transform-origin: 84px 58px; transition: transform .4s ease; }

/* ---- Búsqueda vacía ---- */
.nores-wrap { padding-top: 10px; }
.nores-hero { text-align: center; max-width: 640px; margin: 0 auto; padding: 10px 0 12px; }
.nores-hero h1 { font: 700 clamp(22px, 2.6vw, 34px)/1.2 var(--serif) !important; margin: 6px 0 8px !important; text-wrap: balance; }
.nores-hero h1 .q { color: var(--ac); }
.nores-chips { justify-content: center; margin: 18px 0 6px; }
.nores-alt { color: var(--mute); font-size: 14px; }
.nores-alt a { color: #fff; }
.nores-pop { margin: 20px calc(-1 * var(--gutter)) 0; }
.nores-pop .row-h { margin-bottom: -32px; }

/* ---- Estados vacíos ---- */
.empty-st { text-align: center; padding: 30px 16px 40px; max-width: 520px; margin: 0 auto; animation: rise .5s ease both; }
.empty-st h2 { font: 700 clamp(20px, 2.2vw, 28px)/1.25 var(--serif); color: #fff; margin: 4px 0 8px; text-wrap: balance; }
.empty-st p { color: var(--mute); margin: 0 auto 20px; }
.empty .ilu-box { margin-top: 10px; }

/* ---- Mi lista (botones) ---- */
.btn-list { background: rgba(42,42,42,.72); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.45); }
.btn-list:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.btn-list .ic { display: contents; }
.btn-list.on { background: rgba(70,211,105,.14); box-shadow: inset 0 0 0 1.5px #46d369; }
.btn-list.on svg { color: #46d369; }
.card .circ.lst { cursor: pointer; }
.card .circ.lst .ic { display: contents; }
.card .circ.lst:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.card .circ.lst.on { background: #46d369; color: #062; box-shadow: none; }
.cprog { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.25); z-index: 2; overflow: hidden; }
.cprog i { display: block; height: 100%; background: var(--ac); }
.card:hover .cprog { opacity: 0; }
.lang-badge { position: absolute; left: 7px; bottom: 7px; z-index: 2; font: 800 10px/1 var(--sans); letter-spacing: .06em; padding: 4px 6px; border-radius: 3px; background: #fff; color: #000; }

/* ---- Segmentados y chips ---- */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 22px; background: #232323; border: 1px solid var(--line); margin: 0 0 18px; flex-wrap: wrap; }
.seg-b { border: 0; background: transparent; color: #cfcfcf; height: 34px; padding: 0 16px; border-radius: 17px; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; white-space: nowrap; }
.seg-b:hover { color: #fff; }
.seg-b.on { background: #fff; color: #000; }
.seg.sm .seg-b { height: 28px; padding: 0 12px; font-size: 12.5px; }
.chip small { color: inherit; opacity: .6; margin-left: 4px; }
.chip.sm { height: 28px; padding: 0 11px; font-size: 12.5px; }
.chips.sm { gap: 6px; margin: 10px 0; }
.chips.pick .chip { cursor: pointer; }
.h1ic { display: inline-grid; width: 30px; height: 30px; margin-right: 10px; vertical-align: -5px; color: var(--ac); }
.h1ic svg { width: 100%; height: 100%; }

/* ---- Géneros ---- */
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin-top: 8px; }
.gen-tile { position: relative; height: 118px; border-radius: 10px; overflow: hidden; padding: 14px 16px; display: flex; flex-direction: column; justify-content: flex-end; text-decoration: none; color: #fff; transition: transform .2s, box-shadow .2s; isolation: isolate; }
.gen-tile img { position: absolute; right: -10px; top: 10px; width: 74px; aspect-ratio: 2/3; object-fit: cover; border-radius: 4px; transform: rotate(14deg); box-shadow: 0 10px 24px rgba(0,0,0,.5); z-index: -1; opacity: .9; transition: transform .3s; }
.gen-tile b { font-size: 17px; line-height: 1.15; max-width: 75%; text-shadow: 0 1px 8px rgba(0,0,0,.5); }
.gen-tile span { font-size: 12.5px; opacity: .8; margin-top: 4px; }
.gen-tile:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.5); }
.gen-tile:hover img { transform: rotate(8deg) scale(1.05); }
.gen-tile.vacio { filter: saturate(.35) brightness(.8); }
div.gen-tile.sk { height: 118px; }
.catpage { min-height: 70vh; }
.cat-hero { position: relative; min-height: min(62vh, 560px); display: flex; align-items: flex-end; padding: 110px var(--gutter) 70px; overflow: hidden; background: #0e0e0e; }
.cat-hero-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(30px) brightness(.45) saturate(1.3); transform: scale(1.1); }
.cat-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(77deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 60%, rgba(0,0,0,.2) 100%), linear-gradient(180deg, rgba(20,20,20,0) 60%, var(--bg) 100%); }
.cat-hero-in { position: relative; z-index: 1; width: 100%; max-width: 1100px; animation: rise .7s ease both; }
.cat-hero h1 { font: 700 clamp(38px, 6vw, 80px)/1 var(--serif); color: #fff; margin: 0 0 10px; letter-spacing: -.02em; }
.cat-hero .syn { color: #ddd; margin: 0 0 22px; }
.cat-feat { display: flex; gap: 22px; align-items: flex-end; }
.cat-feat .hero-cover { width: clamp(110px, 11vw, 160px); }
.cat-feat h2 { font: 700 clamp(20px, 2.2vw, 30px)/1.15 var(--serif); color: #fff; margin: 0 0 6px; }
.cat-feat .by { color: var(--ac); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 4px; }
.cat-feat .hmeta { color: #46d369; font-weight: 600; font-size: 14px; margin: 0 0 14px; }
.rows-flat { margin-top: 0; padding-top: 10px; }
.page-grid { padding: 10px var(--gutter) 40px; }
.grid-t { font: 700 clamp(17px, 1.5vw, 22px)/1.2 var(--sans); color: #e5e5e5; margin: 20px 0 12px; }
.sk-hero .cat-hero-in { padding-top: 40px; }
.page-tight { padding-top: 20px; min-height: 0; }

/* ---- Biblioteca ---- */
.lib-head { margin-bottom: 18px; }
.lib-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 720px; margin: 0 0 26px; }
.lib-stats .lib-stat { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.lib-stats .lib-stat:hover { border-color: #444; }
.lib-stats div, .lib-stats .lib-stat { background: linear-gradient(180deg, #1f1f1f, #191919); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.lib-stats b { display: block; font: 800 26px/1 var(--sans); color: #fff; }
.lib-stats span { font-size: 12.5px; color: var(--mute); }
.lib-sec { margin: 0 calc(-1 * var(--gutter)) 18px; }
.lib-h { padding: 0 var(--gutter); }
.lib-h h2 { display: flex; align-items: center; gap: 10px; font: 700 clamp(18px, 1.6vw, 23px)/1.2 var(--sans); color: #fff; margin: 0; }
.lib-h h2 small { font-size: 12px; font-weight: 700; color: #bbb; background: #2a2a2a; border-radius: 10px; padding: 2px 8px; }
.lib-h p { margin: 2px 0 0; color: var(--mute); font-size: 13.5px; }
.lib-scroller { padding-top: 16px; padding-bottom: 20px; gap: 12px; }
.lib-item { flex: 0 0 var(--card-w); scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; }
.lib-item .card { flex: none; width: 100%; }
.lib-meta { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: #bdbdbd; }
.lib-bar { height: 4px; border-radius: 3px; background: #333; overflow: hidden; }
.lib-bar i { display: block; height: 100%; background: var(--ac); border-radius: 3px; }
.lib-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.lib-go { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px 0 7px; border-radius: 13px; border: 0; background: #fff; color: #000; font-size: 12px; font-weight: 700; cursor: pointer; }
.lib-go svg { width: 12px; height: 12px; }
.lib-done, .lib-via { display: inline-flex; align-items: center; gap: 5px; color: #7ee29a; font-weight: 600; }
.lib-via { color: #bdbdbd; }
.lib-done svg { width: 14px; height: 14px; }
.lib-empty-line { padding: 6px var(--gutter) 0; }
.lib .arrow { top: 16px; bottom: 60px; }
@media (max-width: 600px) { .lib-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Detalle ---- */
.msub { font-weight: 600; color: #fff; margin: 0 0 8px; }
.mmeta a.pill { color: inherit; text-decoration: none; }
.mmeta a.pill:hover { border-color: #fff; color: #fff; }
.trs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; }
.trs-k { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--mute); margin-right: 4px; }
.trs-k svg { width: 16px; height: 16px; }
.side-k a { color: #fff; }
.side-prog { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--mute); margin-top: 6px; max-width: 220px; }
.ep-prog { height: 3px; border-radius: 2px; background: #3a3a3a; overflow: hidden; margin-top: 8px; max-width: 260px; }
.ep-prog i { display: block; height: 100%; background: var(--ac); }
.ep.cur { box-shadow: inset 3px 0 0 var(--ac); }
.ep.locked { cursor: pointer; }
.ep.locked:hover { background: #262626; }
.mshell { min-height: 60vh; }
.acts .btn-list { order: 3; }
.codecard { display: flex; gap: 22px; align-items: center; margin-top: 26px; padding: 22px 24px; border-radius: 14px; background: radial-gradient(ellipse at 0% 50%, rgba(225,29,42,.2), transparent 60%), #1f1f1f; border: 1px solid rgba(225,29,42,.35); }
.codecard .ilu-box { margin: 0; flex: none; }
.codecard-t { flex: 1; min-width: 0; }
.codecard .k { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--ac); }
.codecard h3 { margin: 4px 0 6px; font: 700 22px/1.2 var(--serif); color: #fff; }
.codecard .muted { margin: 0; font-size: 14px; }
.code-inp { height: 52px; font-size: 20px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; text-align: center; }
.codecard .btn { height: 52px; }
.codecard.shake, .lw-shake { animation: shake .45s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.dlbox .dl-h { display: flex; gap: 14px; align-items: flex-start; }
.dl-ic { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; background: rgba(255,255,255,.08); color: #fff; }
.dl-ic svg { width: 22px; height: 22px; }
.dlbox.libre { border-color: rgba(70,211,105,.35); background: linear-gradient(180deg, rgba(70,211,105,.07), #1f1f1f); }
.dlbox.libre .dl-ic { background: rgba(70,211,105,.16); color: #7ee29a; }
.dl-tag { display: inline-flex; align-items: center; gap: 6px; margin: 12px 0 0 !important; font-size: 12.5px !important; color: #f5c451 !important; }
.dl-tag svg { width: 14px; height: 14px; }
.dl-tag.ok { color: #7ee29a !important; }
.dl-pw { margin-top: 12px; }
.dl-wait { display: flex; align-items: center; gap: 10px; color: #ddd; font-size: 14px; margin-top: 12px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spinr .8s linear infinite; flex: none; }
@keyframes spinr { to { transform: rotate(360deg); } }
.buy-sum { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 18px !important; }
.buy-sum-c { position: relative; width: 70px; aspect-ratio: 2/3; flex: none; border-radius: 4px; overflow: hidden; background: #333; }
.buy-sum-c img { width: 100%; height: 100%; object-fit: cover; }
.buy-sum-t { margin: 0 0 2px; color: #fff; font-weight: 700; }
.priv { font-style: normal; font-size: 11px; font-weight: 700; color: #f5c451; background: rgba(245,196,81,.12); border-radius: 4px; padding: 1px 6px; margin-left: 4px; }
.modal.md { max-width: 720px; padding: 30px; }
@media (max-width: 800px) {
  .codecard { flex-direction: column; text-align: center; padding: 20px 16px; }
  .codecard .codebox { flex-direction: column; }
  .modal.md { margin: 40px 10px; min-height: 0; border-radius: 8px; padding: 22px 16px; }
}

/* ---- Personas ---- */
.pav { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; color: #fff; font: 700 15px/1 var(--sans); flex: none; }
.pav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pav.sm { width: 36px; height: 36px; font-size: 13px; }
.pav.lg { width: 76px; height: 76px; font-size: 26px; }
.pav.xl { width: clamp(96px, 11vw, 148px); height: clamp(96px, 11vw, 148px); font-size: 44px; border: 4px solid var(--bg); box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.com-hero { position: relative; padding: 120px var(--gutter) 34px; overflow: hidden; }
.com-hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at 80% 0%, rgba(225,29,42,.35), transparent 55%), radial-gradient(ellipse at 10% 100%, rgba(108,63,199,.22), transparent 55%), #101010; }
.com-hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, var(--bg)); }
.com-hero-in { position: relative; max-width: 760px; }
.com-hero h1 { font: 700 clamp(28px, 4vw, 52px)/1.05 var(--serif); color: #fff; margin: 0 0 22px; text-wrap: balance; }
.csearch-f { position: relative; margin-bottom: 14px; }
.csearch-ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: #999; pointer-events: none; }
.csearch-ic svg { width: 100%; height: 100%; }
.inp.csearch { height: 56px; padding-left: 50px; font-size: 17px; border-radius: 10px; background: rgba(0,0,0,.55); border-color: #444; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pcard { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 16px 18px; border-radius: 14px; background: #1b1b1b; border: 1px solid var(--line); text-decoration: none; color: inherit; overflow: hidden; transition: transform .2s, border-color .2s; }
.pcard:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.28); }
.pcard-bg { align-self: stretch; height: 64px; margin: 0 -16px -38px; opacity: .55; }
.pcard .pav { box-shadow: 0 0 0 4px #1b1b1b; }
.pname { color: #fff; font-size: 15.5px; margin-top: 10px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phandle { color: var(--mute); font-size: 13px; }
.ptag { display: inline-block; margin-top: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--ac); border-radius: 4px; padding: 3px 7px; }
.ptag.soft { background: rgba(255,255,255,.12); margin: 0; align-self: center; }
.pbio { font-size: 13px; color: #cfcfcf; line-height: 1.4; margin: 8px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.pfol { font-size: 12px; color: var(--mute); margin-bottom: 12px; }
.pcard .btn { margin-top: auto; }
.pad { padding: 16px; }

/* ---- Perfil público ---- */
.prof-hero { position: relative; padding: 0 var(--gutter); }
.prof-banner { position: relative; height: clamp(220px, 34vw, 400px); margin: 0 calc(-1 * var(--gutter)); background-size: cover; background-position: center; }
.prof-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(20,20,20,0) 35%, rgba(20,20,20,.55) 70%, var(--bg) 100%); }
.prof-in { position: relative; z-index: 2; display: flex; gap: clamp(18px, 3vw, 34px); align-items: center; margin-top: clamp(-110px, -9vw, -70px); }
.prof-id { min-width: 0; flex: 1; padding-bottom: 6px; animation: rise .6s ease both; }
.prof-id h1 { font: 700 clamp(28px, 4vw, 54px)/1.05 var(--serif); color: #fff; margin: 0 0 4px; text-shadow: 0 2px 20px rgba(0,0,0,.5); overflow-wrap: anywhere; }
.prof-id .hero-kicker { margin-bottom: 8px; }
.prof-id .phandle { font-size: 15px; margin: 0 0 10px; }
.prof-bio { color: #e5e5e5; max-width: 680px; margin: 0 0 8px; white-space: pre-wrap; line-height: 1.5; }
.prof-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 6px 0 4px; }
.prof-links a { color: #fff; font-size: 13.5px; text-underline-offset: 3px; }
.prof-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.btn-ic { width: 38px; padding: 0; font-size: 20px; }
.more-wrap { position: relative; }
.more-wrap .menu { top: 44px; }
.pstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 8px 0 10px; }
.pstat { display: block; padding: 14px 16px; border-radius: 12px; background: #1b1b1b; border: 1px solid var(--line); text-decoration: none; color: inherit; }
a.pstat:hover { border-color: rgba(255,255,255,.3); }
.pstat b { display: block; font: 800 24px/1.1 var(--sans); color: #fff; }
.pstat span { font-size: 12.5px; color: var(--mute); }
.pstat.streak b::after { content: " 🔥"; font-size: 18px; }
.ptabs { display: flex; gap: 22px; border-bottom: 1px solid #2a2a2a; margin: 14px 0 18px; overflow-x: auto; scrollbar-width: none; }
.ptabs button { position: relative; background: none; border: 0; color: #aaa; font-size: 15px; font-weight: 700; padding: 12px 0; cursor: pointer; white-space: nowrap; }
.ptabs button.on { color: #fff; }
.ptabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 2px; background: var(--ac); }
.aff-grid { gap: 20px 10px; }
.aff-item { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.aff-item .card { width: 100%; flex: none; }
.aff { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #ccc; min-width: 0; }
.aff-ring { --c: #46d369; position: relative; width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), #333 0); }
.aff-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg); }
.aff-ring b { position: relative; font-size: 10.5px; color: #fff; }
.aff.mid .aff-ring { --c: #f5c451; }
.aff.lo .aff-ring { --c: #8a8a8a; }
.aff-t { display: flex; flex-direction: column; min-width: 0; }
.aff-t b { color: #fff; font-size: 12px; }
.aff-t small { color: var(--mute); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aff.read { color: #7ee29a; }
.aff.read svg { width: 14px; height: 14px; }
.aff-pill { position: absolute; left: 7px; bottom: 7px; z-index: 3; font: 800 11px/1 var(--sans); padding: 4px 7px; border-radius: 10px; background: #46d369; color: #032; }
.aff-pill.mid { background: #f5c451; color: #3a2a00; }
.aff-pill.lo { background: #bdbdbd; color: #111; }
.fin-badge { position: absolute; right: 7px; bottom: 7px; z-index: 3; font: 700 10px/1 var(--sans); padding: 4px 6px; border-radius: 3px; background: rgba(0,0,0,.75); color: #7ee29a; }
.fin-badge.role { color: #fff; background: var(--ac); }
.row-flat { margin-top: 10px; }
.row-flat .row-h { margin-bottom: -32px; }
.priv-note { display: inline-flex; align-items: center; gap: 8px; color: var(--mute); }
.priv-note svg { width: 16px; height: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); text-decoration: none; margin-bottom: 8px; }
.back svg { width: 18px; height: 18px; }
@media (max-width: 700px) {
  .prof-in { flex-direction: column; align-items: flex-start; margin-top: -60px; }
  .prof-acts .btn { flex: none; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pcard { padding: 0 10px 14px; }
  .pcard .btn { padding: 0 12px; }
  .com-hero { padding-top: 84px; }
  .aff-t small { display: none; }
}

/* ---- Notificaciones ---- */
.notif-pop { position: absolute; top: 48px; right: -60px; z-index: 130; width: min(380px, calc(100vw - 24px)); max-height: min(560px, 76vh); display: flex; flex-direction: column; background: rgba(14,14,14,.98); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 30px 70px rgba(0,0,0,.7); animation: genIn .2s ease; overflow: hidden; }
.notif-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #242424; }
.notif-h b { color: #fff; font-size: 15px; }
.linkbtn.sm { font-size: 12.5px; color: #bbb; }
.notif-list { overflow-y: auto; overscroll-behavior: contain; }
.notif-it { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; text-decoration: none; color: inherit; border-bottom: 1px solid #1d1d1d; }
.notif-it:hover { background: #1b1b1b; }
.notif-it.unread { background: rgba(225,29,42,.07); }
.notif-ic { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: #262626; color: #fff; }
.notif-ic svg { width: 18px; height: 18px; }
.notif-ic.t-access_granted, .notif-ic.t-book_published, .notif-ic.t-coauthor_accepted { background: rgba(70,211,105,.16); color: #7ee29a; }
.notif-ic.t-request_rejected { background: rgba(225,29,42,.16); color: #ff7b84; }
.notif-ic.t-purchase_request { background: rgba(245,196,81,.14); color: #f5c451; }
.notif-tx { min-width: 0; flex: 1; }
.notif-tx .nt { margin: 0; font-size: 13.5px; color: #eee; line-height: 1.35; }
.notif-it.unread .nt { font-weight: 700; color: #fff; }
.notif-tx .nb { margin: 2px 0 0; font-size: 12.5px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-tx .nw { font-size: 11.5px; color: #777; }
.udot { width: 8px; height: 8px; border-radius: 50%; background: var(--ac); flex: none; margin-top: 6px; }
.notif-empty { text-align: center; padding: 26px 20px 30px; }
.notif-empty p { color: #fff; font-weight: 700; margin: 6px 0 4px; }
.notif-empty small { color: var(--mute); }
@media (max-width: 800px) { .notif-pop { position: fixed; top: 58px; right: 8px; left: 8px; width: auto; } }

/* ---- Mensajes ---- */
.msgs-page { padding-bottom: 20px; }
.msgs { display: grid; grid-template-columns: 340px minmax(0, 1fr); height: calc(100vh - 130px); min-height: 460px; border: 1px solid #262626; border-radius: 14px; overflow: hidden; background: #171717; }
.inbox { display: flex; flex-direction: column; border-right: 1px solid #262626; min-height: 0; }
.inbox-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 12px; }
.inbox-h h1 { margin: 0 !important; font-size: 22px !important; }
.inbox-h .icbtn { background: #262626; }
.inbox-list { overflow-y: auto; flex: 1; }
.inbox-empty { text-align: center; padding: 30px 16px; color: var(--mute); }
.conv { position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 16px; text-decoration: none; color: inherit; }
.conv:hover { background: #1f1f1f; }
.conv.on { background: #242424; box-shadow: inset 3px 0 0 var(--ac); }
.conv-tx { flex: 1; min-width: 0; }
.conv-top { display: flex; justify-content: space-between; gap: 8px; }
.conv-top b { font-size: 14.5px; color: #eee; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-t { font-size: 11.5px; color: #777; flex: none; }
.conv-last { margin: 2px 0 0; font-size: 13px; color: var(--mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .conv-top b { color: #fff; font-weight: 800; }
.conv.unread .conv-last { color: #e5e5e5; font-weight: 600; }
.conv .nbadge { position: static; box-shadow: none; }
.thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.thread > .empty-st { margin: auto; }
.thread-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #262626; background: #1a1a1a; }
.thread-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-decoration: none; color: inherit; }
.thread-who div > b { display: block; color: #fff; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-who div > span { display: block; font-size: 12.5px; color: var(--mute); }
.back-m { display: none !important; }
.thread-body { flex: 1; overflow-y: auto; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 4px; background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.03), transparent 60%); }
.day-sep { text-align: center; margin: 12px 0 8px; }
.day-sep span { font-size: 11.5px; color: #999; background: #222; border-radius: 10px; padding: 3px 10px; text-transform: capitalize; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: min(78%, 560px); animation: rise .2s ease both; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.bubble { position: relative; padding: 8px 12px 6px; border-radius: 16px 16px 16px 4px; background: #2a2a2a; color: #eee; }
.msg.me .bubble { border-radius: 16px 16px 4px 16px; background: var(--ac); color: #fff; }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.4; -webkit-user-select: text; user-select: text; }
.bubble .mt { display: block; text-align: right; font-size: 10.5px; opacity: .65; margin-top: 2px; }
.mstat { font-size: 11px; color: #999; margin: 2px 4px 0; }
.mstat.pend { font-style: italic; }
.msg.failed .bubble { background: #5a1a1f; }
.retry { border: 0; background: none; color: #ff7b84; font-size: 12px; cursor: pointer; padding: 2px 4px; }
.thread-empty { margin: auto; text-align: center; color: var(--mute); }
.thread-block { margin: 0; padding: 14px; text-align: center; color: var(--mute); border-top: 1px solid #262626; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #262626; background: #1a1a1a; }
.composer-in { flex: 1; min-height: 44px; max-height: 140px; resize: none; border-radius: 22px; border: 1px solid #3a3a3a; background: #262626; color: #fff; padding: 11px 16px; font: 15px/1.4 var(--sans); outline: none; }
.composer-in:focus { border-color: #777; }
.composer-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ac); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
.composer-send svg { width: 20px; height: 20px; }
.composer-send:hover { background: var(--ac-dk); }
@media (max-width: 800px) {
  .msgs-page { padding: 64px 0 0 !important; }
  .msgs { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 58px - 64px - env(safe-area-inset-bottom)); border-radius: 0; border-left: 0; border-right: 0; min-height: 0; }
  .msgs .thread { display: none; }
  .msgs.has-conv .inbox { display: none; }
  .msgs.has-conv .thread { display: flex; }
  .back-m { display: grid !important; }
  .msg { max-width: 86%; }
}

/* ---- Cuenta ---- */
.acc-head { margin-bottom: 18px; }
.acc-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 26px; align-items: start; }
.acc-tabs { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.acc-tabs a { padding: 11px 14px; border-radius: 8px; color: #bbb; text-decoration: none; font-weight: 600; font-size: 14.5px; }
.acc-tabs a:hover { background: #1c1c1c; color: #fff; }
.acc-tabs a.on { background: #232323; color: #fff; box-shadow: inset 3px 0 0 var(--ac); }
.acc-card { background: #1a1a1a; border: 1px solid #262626; border-radius: 16px; padding: 24px; min-width: 0; }
.acc-sec { font: 700 20px/1.2 var(--sans); color: #fff; margin: 22px 0 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acc-card > .acc-sec:first-child, .acc-card > h2:first-child { margin-top: 0; }
.acc-sub { font-size: 15px; color: #fff; margin: 20px 0 8px; }
.acc-hero { position: relative; margin: -24px -24px 56px; }
.acc-banner { height: clamp(140px, 22vw, 240px); background-size: cover; background-position: center; border-radius: 16px 16px 0 0; }
.acc-banner-acts { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; }
.acc-av { position: absolute; left: 24px; bottom: -50px; display: flex; align-items: flex-end; gap: 14px; }
.acc-av .pav.xl { width: 112px; height: 112px; border-color: #1a1a1a; }
.acc-av-acts { display: flex; gap: 12px; padding-bottom: 8px; }
.acc-hint { font-size: 12.5px; color: #777; margin: 0 0 6px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.fld-full { position: relative; }
.fld-full .count { position: absolute; right: 2px; top: 0; font-size: 12px; color: #777; }
.fld .hint { font-style: normal; color: #f5c451; font-size: 11.5px; margin-left: 6px; }
.fld .ferr { display: block; color: #ff8a8f; font-size: 12.5px; min-height: 0; margin-top: 4px; }
.fld .ferr:empty { display: none; }
.fld.bad .inp, .fld.bad .at-inp { border-color: #ff5a64; }
.at-inp { display: flex; align-items: center; height: 48px; border-radius: 5px; border: 1px solid #5a5a5a; background: #333; }
.at-inp span { padding: 0 2px 0 14px; color: #999; font-size: 16px; }
.at-inp .inp { border: 0; background: transparent; height: 46px; padding-left: 2px; }
.at-inp:focus-within { border-color: #fff; }
.hstat { display: block; font-size: 12.5px; color: var(--mute); margin: -8px 0 10px; min-height: 16px; }
.hstat.ok { color: #7ee29a; } .hstat.bad { color: #ff8a8f; }
.priv-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; color: #f5c451; background: rgba(245,196,81,.12); border-radius: 6px; padding: 3px 8px; }
.priv-tag svg { width: 12px; height: 12px; }
.acc-save { position: sticky; bottom: 12px; display: flex; justify-content: flex-end; margin-top: 18px; }
.acc-save .btn { width: auto; min-width: 200px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.acc-form .btn:not(.acc-save .btn) { width: auto; }
.small { font-size: 13px; }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid #262626; }
.prow b { color: #fff; font-size: 15px; }
.prow p { margin: 3px 0 0; color: var(--mute); font-size: 13px; }
.prow .seg { margin: 0; flex: none; }
.prow.sw { cursor: pointer; }
.prow.danger b { color: #ff8a8f; }
.switch { position: relative; width: 44px; height: 26px; flex: none; display: inline-block; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 13px; background: #3a3a3a; transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + i { background: var(--ac); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid #fff; outline-offset: 2px; }
.ntable { border: 1px solid #262626; border-radius: 12px; overflow: hidden; margin: 10px 0 8px; transition: opacity .2s; }
.ntable.off { opacity: .45; }
.nrow { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px; gap: 8px; align-items: center; padding: 11px 14px; border-top: 1px solid #222; font-size: 14px; color: #ddd; }
.nrow .switch { justify-self: center; }
.nrow.nhead { border-top: 0; background: #202020; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #999; }
.nrow.nhead span:not(:first-child) { text-align: center; }
.note svg { width: 14px; height: 14px; vertical-align: -2px; }
.scards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 22px; }
.scard { padding: 16px; border-radius: 14px; background: linear-gradient(180deg, #222, #1c1c1c); border: 1px solid #2a2a2a; display: flex; flex-direction: column; gap: 4px; }
.scard span { font-size: 12.5px; color: var(--mute); }
.scard b { font: 800 clamp(20px, 2vw, 28px)/1.1 var(--sans); color: #fff; }
.scard small { color: #777; font-size: 12px; }
.scard.fire { background: radial-gradient(ellipse at 100% 0%, rgba(225,29,42,.35), transparent 60%), #1f1f1f; }
.chart-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.chart-h h3 { margin: 0; color: #fff; font-size: 15px; }
.chart-h .seg { margin: 0; }
.chart-wrap { overflow-x: auto; margin-top: 10px; }
.chart { width: 100%; min-width: 520px; height: auto; display: block; }
.chart .grid-l { stroke: #2c2c2c; stroke-width: 1; }
.chart .ax { fill: #888; font: 11px var(--sans); text-transform: capitalize; }
.chart .bar { fill: #5a1a1f; transition: fill .2s; }
.chart .bar.cur { fill: var(--ac); }
.chart .bar:hover { fill: #ff4d5a; }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hist a { display: flex; gap: 14px; align-items: center; padding: 10px; border-radius: 12px; text-decoration: none; color: inherit; background: #1f1f1f; }
.hist a:hover { background: #262626; }
.hist-c { position: relative; width: 44px; aspect-ratio: 2/3; border-radius: 4px; overflow: hidden; flex: none; background: #333; }
.hist-c img { width: 100%; height: 100%; object-fit: cover; }
.hist-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.hist-t b { color: #fff; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-t small { color: var(--mute); font-size: 12px; }
@media (max-width: 900px) {
  .acc-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .acc-tabs { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .acc-tabs a { white-space: nowrap; }
  .acc-tabs a.on { box-shadow: inset 0 -3px 0 var(--ac); }
  .scards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .acc-card { padding: 16px; border-radius: 12px; }
  .acc-hero { margin: -16px -16px 56px; }
  .acc-banner { border-radius: 12px 12px 0 0; }
  .acc-av { left: 16px; }
  .acc-av .pav.xl { width: 92px; height: 92px; }
  .fgrid { grid-template-columns: 1fr; }
  .prow { flex-direction: column; align-items: flex-start; }
  .prow.sw { flex-direction: row; align-items: center; }
  .nrow { grid-template-columns: minmax(0, 1fr) 62px 62px; padding: 10px; font-size: 13px; }
  .acc-save .btn { width: 100%; }
  .acc-banner-acts .btn { height: 34px; padding: 0 10px; font-size: 12.5px; }
}

/* ---- Recorte ---- */
.crop-stage { display: grid; place-items: center; margin: 6px 0 12px; }
.crop-cv { touch-action: none; cursor: grab; border-radius: 8px; max-width: 100%; background: #111; }
.crop-cv.round { border-radius: 50%; }
.crop-cv:active { cursor: grabbing; }
.crop-zoom { display: flex; align-items: center; gap: 10px; color: #bbb; margin-bottom: 8px; }
.crop-zoom input { flex: 1; accent-color: var(--ac); }

/* ---- Invitación ---- */
.inv-card { display: flex; gap: 30px; align-items: flex-start; max-width: 860px; margin: 20px auto; padding: 28px; border-radius: 18px; background: #1a1a1a; border: 1px solid #262626; }
.inv-cover { position: relative; width: 170px; aspect-ratio: 2/3; flex: none; border-radius: 6px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.6); background: #333; }
.inv-cover img { width: 100%; height: 100%; object-fit: cover; }
.inv h1 { font: 700 clamp(24px, 3vw, 38px)/1.1 var(--serif) !important; }
.inv-list { color: #ccc; line-height: 1.8; padding-left: 20px; }
@media (max-width: 700px) { .inv-card { flex-direction: column; align-items: center; text-align: center; padding: 20px; } .inv-list { text-align: left; } }

@media (max-width: 600px) {
  .gen-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gen-tile { height: 96px; padding: 10px 12px; }
  .gen-tile b { font-size: 14.5px; max-width: 80%; }
  .gen-tile img { width: 52px; right: -8px; }
  .gen-tile span { font-size: 11.5px; }
}
@media (max-width: 600px) {
  .lib-item { flex-basis: 42vw; }
  .lib-row { flex-wrap: wrap; }
  .lib-row span { white-space: nowrap; }
}

/* 14-sep: resumen sin spoiler, notificaciones descartables, acceso Admin/Panel */
.syn-k { margin: 14px 0 4px; font: 700 11.5px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.notif-h { display: flex; align-items: center; gap: 10px; }
.notif-h b { margin-right: auto; }
.notif-row { position: relative; }
.notif-row .notif-x { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 50%; border: 0; background: transparent; color: var(--mute); display: grid; place-items: center; cursor: pointer; opacity: .75; }
.notif-row .notif-x:hover, .notif-row .notif-x:focus-visible { background: rgba(255,255,255,.08); color: #fff; opacity: 1; }
.notif-row .notif-x svg { width: 14px; height: 14px; }
.notif-row .notif-it { padding-right: 44px; }
.notif-row.fuera { opacity: 0; transform: translateX(24px); transition: opacity .18s, transform .18s; }
.nav-staff { display: inline-flex; gap: 6px; align-items: center; }
.nav-staff a { font: 700 12px/1 var(--sans); padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line); color: #e5e5e5; text-decoration: none; white-space: nowrap; }
.nav-staff a:hover { border-color: #777; color: #fff; }
.nav-staff a.adm { border-color: rgba(225,29,42,.6); color: #fff; background: rgba(225,29,42,.14); }
@media (max-width: 720px) { .nav-staff a.pnl { display: none; } }
.menu a.mi-admin { color: #fff; font-weight: 700; }
.notif-confirm { margin: 6px 12px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg3); }
.notif-confirm p { margin: 0 0 10px; font-size: 13.5px; color: var(--fg); }
.notif-confirm .acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* 15-sep: presencia (en línea / última vez) */
.pav-wrap { position: relative; display: inline-block; flex: none; line-height: 0; }
.pres-dot { position: absolute; right: 1px; bottom: 1px; width: 11px; height: 11px; border-radius: 50%; background: #6b6b6b; box-shadow: 0 0 0 2px var(--bg); z-index: 2; }
.pres-dot.on { background: #22c55e; }
.pav-wrap.sm .pres-dot { width: 10px; height: 10px; right: 0; bottom: 0; }
.pav-wrap.lg .pres-dot { width: 15px; height: 15px; right: 4px; bottom: 4px; box-shadow: 0 0 0 3px #1b1b1b; }
.pav-wrap.xl .pres-dot { width: 22px; height: 22px; right: 10%; bottom: 8%; box-shadow: 0 0 0 4px var(--bg); }
.pav-wrap:not(.sm):not(.lg):not(.xl) .pres-dot { right: 0; bottom: 0; }
.prof-pres { position: relative; display: flex; align-items: center; gap: 8px; margin: 2px 0 6px; font-size: 13.5px; }
.prof-pres .pres-dot { position: static; box-shadow: none; width: 9px; height: 9px; }
.pres-txt { color: var(--mute); font-size: 12.5px; }
.pres-txt.on { color: #4ade80; }
.pres-txt.center { display: block; margin-top: 2px; }
.thread-sub { display: block; font-size: 12.5px; color: var(--mute); }

/* 15-sep: autocompletado del buscador (Libros / Personas) */
.sugg { position: absolute; top: calc(100% + 6px); right: -1px; width: min(400px, calc(100vw - 24px)); max-height: min(70vh, 520px); overflow-y: auto; overscroll-behavior: contain; background: #181818; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.6); padding: 6px 0; z-index: 60; }
.sugg-h { padding: 10px 14px 4px; font: 700 11px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.sugg-it { display: flex; align-items: center; gap: 12px; padding: 8px 14px; text-decoration: none; color: var(--fg); min-height: 48px; }
.sugg-it:hover, .sugg-it.on { background: rgba(255,255,255,.08); }
.sugg-it.on { box-shadow: inset 3px 0 0 var(--ac); }
.sugg-cov { flex: none; width: 32px; height: 48px; border-radius: 3px; overflow: hidden; background: var(--bg3); display: block; }
.sugg-cov img, .sugg-cov > * { width: 100%; height: 100%; object-fit: cover; font-size: 6px; }
.sugg-tx { min-width: 0; display: flex; flex-direction: column; }
.sugg-tx b { color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg-tx small { color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sugg-all { flex: none; width: 32px; height: 32px; display: grid; place-items: center; color: var(--mute); }
.sugg-all svg { width: 18px; height: 18px; }
.sugg-empty { padding: 12px 14px; color: var(--mute); font-size: 13.5px; }
.srch-people { margin: 4px 0 22px; }
.srch-prow { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.srch-p { flex: none; width: 138px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 8px; border-radius: 12px; background: #1b1b1b; border: 1px solid var(--line); text-decoration: none; color: inherit; }
.srch-p:hover { border-color: #555; }
.srch-p b { color: #fff; font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srch-p small { color: var(--mute); font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 800px) {
  .sugg { position: fixed; top: 58px; left: 12px; right: 12px; width: auto; max-height: calc(100vh - 140px); }
}

/* 15-sep: portada (banner) 16:5 igual al recorte en móvil y escritorio */
.acc-banner { height: auto; aspect-ratio: 16 / 5; }
@media (max-width: 800px) {
  .prof-banner { height: max(150px, 31.25vw); margin-top: 58px; }
  .prof-banner::after { background: linear-gradient(180deg, rgba(20,20,20,0) 45%, rgba(20,20,20,.6) 80%, var(--bg) 100%); }
  .prof-in { margin-top: -48px; }
}
.crop-cv { height: auto; }
