/* =========================================================
   KumoToon · Estilos principales
   Estética: cielo nocturno + neón sakura, tinta y nubes
   ========================================================= */

:root {
    --bg: #0b0a1f;
    --bg-2: #110f2a;
    --bg-3: #181539;
    --surface: rgba(255, 255, 255, .045);
    --surface-2: rgba(255, 255, 255, .075);
    --surface-solid: #16133a;
    --border: rgba(255, 255, 255, .09);
    --border-strong: rgba(255, 255, 255, .16);
    --text: #efeeff;
    --text-2: #c9c6ee;
    --muted: #9591c3;
    --pink: #ff5fa2;
    --violet: #9b5cff;
    --cyan: #3ee0ff;
    --gold: #ffc94d;
    --green: #4ade80;
    --red: #ff5c7a;
    --grad: linear-gradient(120deg, var(--pink) 0%, var(--violet) 55%, var(--cyan) 100%);
    --grad-soft: linear-gradient(120deg, rgba(255,95,162,.18), rgba(155,92,255,.18) 55%, rgba(62,224,255,.14));
    --c-manhwa: #ff5fa2;
    --c-manhua: #ff8a3d;
    --c-manga: #3ee0ff;
    --c-novela: #ffc94d;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow: 0 18px 50px -18px rgba(0, 0, 0, .7);
    --glow: 0 0 0 1px rgba(155, 92, 255, .35), 0 10px 40px -10px rgba(155, 92, 255, .55);
    --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Dela Gothic One', 'Outfit', system-ui, sans-serif;
    --header-h: 68px;
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.55;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(155, 92, 255, .22), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(255, 95, 162, .14), transparent 60%),
        radial-gradient(800px 600px at 50% 120%, rgba(62, 224, 255, .08), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
body::before { /* estrellas */
    content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
    background-image:
        radial-gradient(1px 1px at 12% 18%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 72% 8%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 38% 62%, #cfc6ff 50%, transparent 51%),
        radial-gradient(1px 1px at 88% 44%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 22% 82%, #ffd6ea 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 62% 92%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 52% 28%, #bff6ff 50%, transparent 51%);
    background-size: 600px 600px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: #fff; }
.prose a, .muted a, p a, .alert a, .auth-switch a { color: var(--pink); }
.prose a:hover, p a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
p { margin: 0 0 .75em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(255, 95, 162, .45); }
[hidden] { display: none !important; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--pink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { left: 8px; }

.container { width: min(1280px, 100% - 32px); margin-inline: auto; position: relative; z-index: 1; }
.container.narrow { width: min(760px, 100% - 32px); }
.site-main { flex: 1; position: relative; z-index: 1; padding-bottom: 64px; }

/* utilidades */
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.pad { padding: 14px; }
.center { text-align: center; display: flex; justify-content: center; margin-top: 18px; }
.row { display: flex; align-items: center; }
.row.wrap, .wrap { flex-wrap: wrap; }
.gap { gap: 12px; }
.gap-sm { gap: 8px; }
.between { justify-content: space-between; }
.right { text-align: right; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
kbd { font-family: inherit; font-size: .75rem; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--border-strong); background: var(--surface); }

/* ---------- Botones ---------- */
.btn {
    --h: 44px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: var(--h); padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
    font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap;
    transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s;
    background: var(--surface-2); color: var(--text);
}
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-sm { --h: 38px; padding: 0 16px; font-size: .9rem; }
.btn-xs { --h: 30px; padding: 0 12px; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-glow {
    background: var(--grad); color: #fff; border: 0;
    box-shadow: 0 8px 26px -8px rgba(255, 95, 162, .65), inset 0 1px 0 rgba(255,255,255,.25);
    background-size: 160% 100%; background-position: 0 0;
}
.btn-glow:hover { color: #fff; background-position: 100% 0; box-shadow: 0 10px 34px -6px rgba(155, 92, 255, .8), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-ghost { background: rgba(255,255,255,.05); border-color: var(--border-strong); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); }
.btn-danger { background: linear-gradient(120deg, #ff5c7a, #d6336c); color: #fff; }
.btn-icon { --h: 44px; width: 44px; padding: 0; background: var(--surface-2); border: 1px solid var(--border-strong); }
.btn.is-disabled { opacity: .4; pointer-events: none; }
.danger { color: var(--red) !important; }
.link-btn { background: none; border: 0; padding: 0; color: var(--pink); cursor: pointer; font-size: .85rem; }
.link-btn:hover { text-decoration: underline; }
.icon-btn {
    position: relative; width: 40px; height: 40px; border-radius: 12px; display: inline-grid; place-items: center;
    background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: background .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* ---------- Encabezado ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    background: rgba(11, 10, 31, .72); backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--border);
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -15px rgba(0,0,0,.8); }
.header-inner { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark svg { width: 38px; height: 38px; filter: drop-shadow(0 4px 14px rgba(155,92,255,.6)); transition: transform .3s; }
.brand:hover .brand-mark svg { transform: rotate(-8deg) scale(1.06); }
.brand-name {
    font-family: var(--font-display); font-size: 1.35rem; letter-spacing: .5px;
    background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.main-nav { display: flex; gap: 2px; }
.nav-link { padding: 8px 12px; border-radius: 10px; font-weight: 500; color: var(--text-2); font-size: .95rem; position: relative; }
.nav-link:hover { background: var(--surface); color: #fff; }
.nav-link.is-active { color: #fff; }
.nav-link.is-active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: var(--grad); }

.search { position: relative; flex: 1; max-width: 340px; margin-left: auto; }
.search input, .search input[type=search] {
    width: 100%; height: 40px; padding: 0 14px 0 40px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border); outline: none; transition: border-color .2s, background .2s;
}
.search input:focus { border-color: rgba(155,92,255,.6); background: var(--surface-2); }
.search-icon { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: var(--muted); }
.search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 300px;
    background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 6px; z-index: 60;
}
.search-results a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; }
.search-results a:hover, .search-results a.is-focus { background: var(--surface-2); }
.search-results img { width: 38px; height: 54px; object-fit: cover; border-radius: 6px; }
.search-results b { display: block; font-size: .92rem; }
.search-results span { font-size: .8rem; color: var(--muted); }
.search-results .sr-all { justify-content: center; color: var(--pink); font-size: .85rem; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }
.badge-dot {
    position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px;
    background: var(--pink); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center;
    box-shadow: 0 0 0 3px var(--bg); animation: pop .35s ease;
}
@keyframes pop { from { transform: scale(.4); } to { transform: scale(1); } }
.avatar-btn { padding: 0; border: 2px solid transparent; border-radius: 50%; background: var(--grad) border-box; cursor: pointer; }
.avatar-btn img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--bg); }

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 240px; z-index: 70;
    background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}
.dropdown.is-open .dropdown-menu { opacity: 1; visibility: visible; transform: none; }
.user-menu a, .user-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; background: none; border: 0; cursor: pointer; font-size: .93rem; }
.user-menu a:hover, .user-menu button:hover { background: var(--surface-2); }
.user-menu .accent { color: var(--gold); }
.user-menu-head { display: flex; gap: 10px; align-items: center; padding: 8px 10px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.user-menu-head img { border-radius: 50%; }
.user-menu-head span { display: block; }
.notif-menu { width: 360px; max-width: calc(100vw - 24px); padding: 0; overflow: hidden; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.notif-list { max-height: 380px; overflow: auto; }
.notif-list a { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.notif-list a:hover { background: var(--surface); }
.notif-list a.is-unread { background: rgba(155, 92, 255, .1); }
.notif-list a.is-unread::before { content: ''; flex: 0 0 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--pink); }
.notif-list small { display: block; color: var(--muted); }
.notif-all { display: block; text-align: center; padding: 11px; color: var(--pink); font-size: .9rem; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 36px)); }
.toast {
    padding: 13px 16px 13px 44px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--border-strong);
    box-shadow: var(--shadow); position: relative; animation: toastIn .35s cubic-bezier(.2,.9,.3,1.3); font-size: .93rem;
}
.toast::before { position: absolute; left: 15px; top: 12px; font-weight: 700; }
.toast-success { border-color: rgba(74, 222, 128, .45); } .toast-success::before { content: '✓'; color: var(--green); }
.toast-error { border-color: rgba(255, 92, 122, .5); } .toast-error::before { content: '!'; color: var(--red); }
.toast-info { border-color: rgba(62, 224, 255, .4); } .toast-info::before { content: 'i'; color: var(--cyan); }
.toast-warning { border-color: rgba(255, 201, 77, .5); } .toast-warning::before { content: '⚠'; color: var(--gold); }
.toast.is-leaving { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ---------- Hero / carrusel ---------- */
.hero { position: relative; min-height: 520px; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--border); }
.hero-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .8s ease, visibility .8s; }
.hero-slide.is-active { opacity: 1; visibility: visible; position: relative; }
.hero-bg {
    position: absolute; inset: -40px; background-size: cover; background-position: center 30%;
    filter: blur(38px) saturate(1.4) brightness(.55); transform: scale(1.1); z-index: -2;
}
.hero-slide::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, rgba(11,10,31,.96) 0%, rgba(11,10,31,.75) 45%, rgba(11,10,31,.25) 100%),
                linear-gradient(0deg, var(--bg) 0%, transparent 35%);
}
.hero-inner { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: center; padding: 56px 0 84px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; color: var(--gold); margin-bottom: 14px; }
.spark { animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.8) rotate(20deg); } }
.hero-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.05; margin-bottom: 16px; text-shadow: 0 6px 40px rgba(155,92,255,.45); max-width: 16ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--text-2); font-size: .92rem; margin-bottom: 14px; align-items: center; }
.hero-meta > span + span::before { content: '•'; margin-right: 16px; color: var(--muted); }
@media (max-width: 760px) { .hero-meta > span + span::before { content: none; } }
.hero-rating { display: inline-flex; align-items: center; gap: 6px; }
.hero-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.hero-synopsis { color: var(--text-2); max-width: 60ch; font-size: 1.02rem; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-cover { position: relative; transform: perspective(900px) rotateY(-10deg) rotateX(3deg); transition: transform .5s ease; }
.hero-cover:hover { transform: perspective(900px) rotateY(-2deg); }
.hero-cover img { width: 300px; height: auto; aspect-ratio: 300/425; object-fit: cover; border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.15), 0 0 80px -10px rgba(255,95,162,.45); }
.hero-cover::after { content: ''; position: absolute; inset: 0; border-radius: 18px; background: linear-gradient(115deg, rgba(255,255,255,.25), transparent 40%); pointer-events: none; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 28px; display: flex; gap: 8px; z-index: 3; }
.hero-dot { width: 10px; height: 10px; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,.3); cursor: pointer; transition: width .3s, background .3s; }
.hero-dot.is-active { width: 34px; background: var(--grad); }

/* pétalos de sakura */
.petals { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
.petal {
    position: absolute; top: -20px; width: 12px; height: 10px; border-radius: 12px 1px 12px 1px;
    background: linear-gradient(135deg, #ffd1e6, #ff8fc2); opacity: .75;
    animation: fall linear infinite; filter: drop-shadow(0 0 4px rgba(255,143,194,.6));
}
.petal:nth-child(1) { left: 5%;  animation-duration: 11s; animation-delay: -2s; }
.petal:nth-child(2) { left: 14%; animation-duration: 14s; animation-delay: -7s; transform: scale(.7); }
.petal:nth-child(3) { left: 23%; animation-duration: 12s; animation-delay: -4s; }
.petal:nth-child(4) { left: 31%; animation-duration: 16s; animation-delay: -11s; }
.petal:nth-child(5) { left: 42%; animation-duration: 13s; animation-delay: -1s; }
.petal:nth-child(6) { left: 51%; animation-duration: 15s; animation-delay: -9s; }
.petal:nth-child(7) { left: 60%; animation-duration: 12s; animation-delay: -6s; }
.petal:nth-child(8) { left: 68%; animation-duration: 17s; animation-delay: -3s; }
.petal:nth-child(9) { left: 76%; animation-duration: 11s; animation-delay: -8s; }
.petal:nth-child(10) { left: 84%; animation-duration: 14s; animation-delay: -5s; }
.petal:nth-child(11) { left: 91%; animation-duration: 13s; animation-delay: -12s; }
.petal:nth-child(12) { left: 97%; animation-duration: 16s; animation-delay: -2s; }
.petal:nth-child(13) { left: 37%; animation-duration: 19s; animation-delay: -14s; }
.petal:nth-child(14) { left: 88%; animation-duration: 18s; animation-delay: -10s; }
@keyframes fall {
    0% { transform: translate(0, -20px) rotate(0); }
    50% { transform: translate(60px, 300px) rotate(220deg); }
    100% { transform: translate(-20px, 620px) rotate(420deg); opacity: 0; }
}

/* ---------- Estrellas (solo lectura) ---------- */
.stars { position: relative; display: inline-block; font-size: 1rem; line-height: 1; letter-spacing: 1px; vertical-align: -1px; }
.stars.sm { font-size: .82rem; }
.stars-bg { color: rgba(255,255,255,.18); }
.stars-fill { position: absolute; inset: 0 auto 0 0; overflow: hidden; white-space: nowrap; color: var(--gold); text-shadow: 0 0 10px rgba(255,201,77,.5); }

/* ---------- Secciones ---------- */
.home { padding-top: 28px; }
.block { margin-bottom: 40px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.section-title { display: flex; align-items: center; gap: 12px; font-size: 1.35rem; margin: 0; }
.title-kanji {
    display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; font-size: 1.05rem;
    background: var(--grad-soft); border: 1px solid rgba(255,95,162,.35); color: #ffd1e6; font-weight: 800;
    box-shadow: 0 0 22px -6px rgba(255,95,162,.6);
}
.see-all { color: var(--pink); font-weight: 600; font-size: .92rem; }
.count-pill { font-size: .8rem; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); flex-wrap: wrap; }
.seg-btn { padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.seg-btn:hover { color: #fff; }
.seg-btn.is-active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px -4px rgba(255,95,162,.6); }

.announcement {
    display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 18px; border-radius: var(--radius);
    background: linear-gradient(120deg, rgba(255,201,77,.12), rgba(255,95,162,.08)); border: 1px solid rgba(255,201,77,.3);
}
.announcement p { margin: 2px 0 0; color: var(--text-2); }
.announcement > .muted { margin-left: auto; white-space: nowrap; }
.announcement-icon { font-size: 1.4rem; }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.home-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-h) + 16px); }

.card, .side-card {
    background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.03));
    border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; backdrop-filter: blur(6px);
}
.side-card { padding: 18px; }
.card-title, .side-title { font-size: 1.1rem; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }

/* ---------- Tarjetas de obra ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 22px 16px; }
.work-grid.wide { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.work-card { position: relative; animation: rise .5s ease both; }
.work-card:nth-child(n+7) { animation-delay: .05s; }
.work-card:nth-child(n+13) { animation-delay: .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.work-card-cover {
    position: relative; display: block; aspect-ratio: 300/425; border-radius: var(--radius); overflow: hidden;
    background: var(--bg-3); box-shadow: 0 10px 30px -12px rgba(0,0,0,.8); transition: transform .3s ease, box-shadow .3s ease;
}
.work-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.work-card-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(11,10,31,.85), transparent 45%); }
.work-card:hover .work-card-cover { transform: translateY(-6px); box-shadow: 0 0 0 2px var(--accent, var(--violet)), 0 20px 40px -14px var(--accent, var(--violet)); }
.work-card:hover .work-card-cover img { transform: scale(1.07); }
.work-card-shine { position: absolute; inset: 0; z-index: 2; background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.28) 48%, transparent 62%); transform: translateX(-120%); transition: transform .8s ease; }
.work-card:hover .work-card-shine { transform: translateX(120%); }
.type-manhwa { --accent: var(--c-manhwa); }
.type-manhua { --accent: var(--c-manhua); }
.type-manga { --accent: var(--c-manga); }
.type-novela { --accent: var(--c-novela); }
.type-badge {
    position: absolute; top: 10px; left: 10px; z-index: 3; font-size: .68rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase;
    padding: 4px 9px; border-radius: 8px; background: var(--accent, var(--violet)); color: #12102b;
    box-shadow: 0 4px 14px -4px var(--accent, var(--violet));
}
.type-badge.big { position: static; display: inline-block; margin-top: 14px; font-size: .75rem; }
.rank-badge { position: absolute; top: 8px; right: 10px; z-index: 3; font-family: var(--font-display); font-size: 1.6rem; color: #fff; -webkit-text-stroke: 1px var(--accent); text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.mature-badge { position: absolute; top: 10px; right: 10px; z-index: 3; font-size: .68rem; font-weight: 800; padding: 3px 7px; border-radius: 7px; background: var(--red); color: #fff; }
.rating-chip { position: absolute; left: 10px; bottom: 10px; z-index: 3; font-size: .8rem; font-weight: 700; color: var(--gold); background: rgba(11,10,31,.75); padding: 3px 8px; border-radius: 8px; backdrop-filter: blur(4px); }
.work-card-body { padding: 10px 2px 0; }
.work-card-title { font-size: .95rem; font-weight: 600; margin: 0 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.work-card-title a:hover { color: var(--accent); }
.work-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip-chapter { font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.chip-chapter:hover { border-color: var(--accent); color: #fff; }

.genre-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .82rem; font-weight: 500;
    background: var(--surface); border: 1px solid var(--border); color: var(--text-2); transition: all .2s; white-space: nowrap;
}
.genre-chip span { font-size: .72rem; color: var(--muted); }
.genre-chip:hover, .genre-chip.is-active { border-color: var(--pink); color: #fff; background: rgba(255,95,162,.12); }
.genre-cloud { display: flex; flex-wrap: wrap; gap: 8px; }

.scroller { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 16px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.scroller > * { scroll-snap-align: start; }
.genre-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 22px; scrollbar-width: none; }

.continue-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.continue-card { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .2s, transform .2s; }
.continue-card:hover { border-color: rgba(255,95,162,.5); transform: translateY(-2px); }
.continue-card img { width: 56px; height: 80px; object-fit: cover; border-radius: 10px; }
.continue-card strong { display: block; font-size: .93rem; margin-bottom: 2px; }
.continue-card > div { min-width: 0; flex: 1; }
.progress { display: block; height: 5px; border-radius: 9px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--grad); border-radius: 9px; }

.side-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface); margin-bottom: 12px; }
.side-tab { border: 0; background: none; padding: 8px; border-radius: 9px; font-weight: 600; font-size: .85rem; color: var(--muted); cursor: pointer; }
.side-tab.is-active { background: var(--surface-2); color: #fff; }
.rank-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rank-list a { display: flex; align-items: center; gap: 12px; padding: 7px; border-radius: 12px; transition: background .2s; }
.rank-list a:hover { background: var(--surface); }
.rank-list img { width: 44px; height: 62px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.rank-list.big img { width: 56px; height: 79px; }
.rank-n { font-family: var(--font-display); font-size: 1.3rem; width: 28px; text-align: center; color: var(--muted); flex-shrink: 0; }
.rank-1 { color: var(--gold); text-shadow: 0 0 16px rgba(255,201,77,.6); }
.rank-2 { color: #d9dcf5; }
.rank-3 { color: #ff9f6b; }
.rank-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rank-info strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fresh-list, .creator-list, .buzz-list, .mini-list, .rated-list { list-style: none; margin: 0; padding: 0; }
.fresh-list a { display: grid; grid-template-columns: 10px 1fr auto; gap: 2px 10px; align-items: center; padding: 8px 6px; border-radius: 10px; }
.fresh-list a:hover { background: var(--surface); }
.fresh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); grid-row: span 2; }
.fresh-title { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fresh-ch { font-size: .78rem; color: var(--pink); font-weight: 600; }
.fresh-list .muted { grid-column: 2 / 4; font-size: .75rem; }
.creator-list a, .mini-list a, .rated-list a { display: flex; align-items: center; gap: 12px; padding: 7px; border-radius: 12px; }
.creator-list a:hover, .mini-list a:hover, .rated-list a:hover { background: var(--surface); }
.creator-list img { border-radius: 50%; }
.creator-list span, .mini-list span, .rated-list span { display: flex; flex-direction: column; min-width: 0; }
.mini-list img, .rated-list img { width: 48px; height: 68px; object-fit: cover; border-radius: 8px; }
.buzz-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.buzz-list li:last-child { border: 0; }
.buzz-list img { border-radius: 50%; flex-shrink: 0; width: 32px; height: 32px; }
.buzz-list p { margin: 0; }
.buzz-list a { color: var(--pink); }
.buzz-text { font-size: .85rem; color: var(--text-2); }
.is-spoiler-inline { font-style: italic; color: var(--muted); }

.creator-cta {
    display: grid; grid-template-columns: 160px 1fr; gap: 28px; align-items: center; padding: 30px; border-radius: var(--radius-lg);
    background: radial-gradient(400px 200px at 0% 0%, rgba(255,95,162,.25), transparent), radial-gradient(400px 200px at 100% 100%, rgba(62,224,255,.18), transparent), var(--bg-2);
    border: 1px solid rgba(255,95,162,.25);
}
.creator-cta h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; }
.creator-cta p { color: var(--text-2); }
.creator-cta-art { aspect-ratio: 1; border-radius: 28px; display: grid; place-items: center; background: var(--grad); box-shadow: var(--glow); transform: rotate(-6deg); }
.creator-cta-art span { font-size: 4.5rem; font-weight: 900; color: #fff; text-shadow: 0 6px 20px rgba(0,0,0,.4); }

/* ---------- Página genérica ---------- */
.page-hero { padding: 44px 0 28px; position: relative; }
.page-hero.slim { padding: 34px 0 22px; }
.page-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 6px; }
.page-hero .muted { max-width: 70ch; }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-art { font-size: 4.5rem; font-weight: 900; line-height: 1; margin-bottom: 14px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .85; }
.empty-note { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--border-strong); border-radius: var(--radius); }

/* ---------- Formularios ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
.field > span:first-child, .field legend, .field-label { font-size: .85rem; font-weight: 600; color: var(--text-2); }
.field.grow, .grow { flex: 1; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=date], input:not([type]), select, textarea, .input-sm {
    width: 100%; padding: 11px 14px; border-radius: 12px; background: rgba(0,0,0,.25); border: 1px solid var(--border-strong);
    outline: none; transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 3px rgba(155,92,255,.25); background: rgba(0,0,0,.35); }
input:disabled { opacity: .55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
select option { background: var(--surface-solid); }
textarea { resize: vertical; min-height: 44px; }
.input-sm { padding: 7px 12px; width: 170px; font-size: .88rem; border-radius: 999px; }
.field-error { color: var(--red); font-size: .83rem; margin: 2px 0 0; }
.field-error::before { content: '⚠ '; }
.check, .radio { display: inline-flex; align-items: flex-start; gap: 9px; cursor: pointer; font-size: .92rem; }
.check input, .radio input { width: 18px; height: 18px; accent-color: var(--pink); margin-top: 2px; flex-shrink: 0; }
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row .field:first-child:not(.grow) { width: 140px; }
.alert { padding: 12px 16px; border-radius: 12px; border: 1px solid; font-size: .92rem; margin-bottom: 14px; }
.alert-error { background: rgba(255,92,122,.1); border-color: rgba(255,92,122,.4); }
.alert-warning { background: rgba(255,201,77,.1); border-color: rgba(255,201,77,.4); }
.pw-wrap { position: relative; display: block; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; opacity: .6; font-size: 1rem; }
.pw-meter { display: block; height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }

/* ---------- Catálogo ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 18px; padding: 18px; }
.filters .field { min-width: 140px; }
.filters .field.grow { min-width: 220px; }
.filters-actions { display: flex; gap: 8px; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 34px; flex-wrap: wrap; }
.page-link, .page-gap { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; }
.page-link:hover { border-color: var(--pink); }
.page-link.is-active { background: var(--grad); border-color: transparent; color: #fff; }
.page-link.is-disabled { opacity: .35; }
.page-gap { background: none; border: 0; }
.ranking-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

/* ---------- Ficha de obra ---------- */
.work-hero { position: relative; overflow: hidden; isolation: isolate; padding: 48px 0 36px; border-bottom: 1px solid var(--border); }
.work-hero-bg { position: absolute; inset: -60px; z-index: -2; background-size: cover; background-position: center; filter: blur(50px) saturate(1.5) brightness(.45); }
.work-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, var(--bg), rgba(11,10,31,.4) 60%, rgba(11,10,31,.6)); }
.work-hero-inner { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.work-cover-wrap { text-align: center; }
.work-cover { width: 100%; height: auto; aspect-ratio: 300/425; object-fit: cover; border-radius: 20px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(255,255,255,.15), 0 0 70px -15px var(--pink); }
.work-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.9rem, 4.5vw, 3rem); line-height: 1.08; margin-bottom: 6px; }
.work-alt { margin-bottom: 14px; }
.work-badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.pill-red { background: rgba(255,92,122,.16); border-color: rgba(255,92,122,.45); color: #ffb3c2; }
.pill-gold { background: rgba(255,201,77,.14); border-color: rgba(255,201,77,.45); color: #ffe199; }
.pill-green { background: rgba(74,222,128,.14); border-color: rgba(74,222,128,.45); color: #b7f5cd; }
.status-en_curso { background: rgba(74,222,128,.14); border-color: rgba(74,222,128,.45); color: #b7f5cd; }
.status-finalizado { background: rgba(62,224,255,.12); border-color: rgba(62,224,255,.4); color: #b5f2ff; }
.status-pausado { background: rgba(255,201,77,.14); border-color: rgba(255,201,77,.45); color: #ffe199; }
.approval-pendiente { background: rgba(255,201,77,.14); border-color: rgba(255,201,77,.45); color: #ffe199; }
.approval-aprobado { background: rgba(74,222,128,.14); border-color: rgba(74,222,128,.45); color: #b7f5cd; }
.approval-rechazado { background: rgba(255,92,122,.14); border-color: rgba(255,92,122,.45); color: #ffb3c2; }
.author-link { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: .92rem; }
.author-link img { border-radius: 50%; }
.author-link:hover { color: var(--pink); }
.work-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.stat { padding: 10px 16px; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--border); display: flex; flex-direction: column; min-width: 96px; }
.stat b { font-size: 1.35rem; line-height: 1.1; }
.stat span { font-size: .78rem; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.work-genres { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.work-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.follow-btn .when-on { display: none; }
.follow-btn.is-on { border-color: var(--green); color: #b7f5cd; background: rgba(74,222,128,.1); }
.follow-btn.is-on .when-on { display: inline; }
.follow-btn.is-on .when-off { display: none; }

.work-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; padding-top: 28px; align-items: start; }
.work-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.work-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(var(--header-h) + 16px); }
.prose { color: var(--text-2); }
.prose p:last-child { margin: 0; }
.prose h2 { font-size: 1.2rem; color: var(--text); margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .45em; }
[data-clamp].is-clamped { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.clamp-toggle { margin-top: 8px; }

.chapter-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; max-height: 560px; overflow: auto; padding-right: 4px; }
.chapter-item {
    position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 2px 10px;
    padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); transition: all .2s;
}
.chapter-item:hover { border-color: var(--pink); background: rgba(255,95,162,.07); transform: translateX(3px); }
.chapter-item.is-read { opacity: .58; }
.chapter-item.is-read .ch-num::after { content: ' ✓'; color: var(--green); }
.ch-num { font-weight: 700; font-size: .93rem; }
.ch-title { font-size: .85rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-meta { grid-column: 1 / -1; }
.new-tag { position: absolute; top: -7px; right: 10px; font-size: .62rem; font-weight: 800; letter-spacing: 1px; padding: 2px 7px; border-radius: 6px; background: var(--grad); color: #fff; animation: pulse 2s infinite; }
.library-card .new-tag { position: static; display: inline-block; margin-bottom: 8px; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(255,95,162,0); } 0% { box-shadow: 0 0 0 0 rgba(255,95,162,.6); } }

.rating-summary { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin-bottom: 18px; }
.rating-big b { font-family: var(--font-display); font-size: 3rem; line-height: 1; background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rating-bars { display: flex; flex-direction: column; gap: 5px; }
.bar-row { display: grid; grid-template-columns: 26px 1fr 26px; gap: 8px; align-items: center; font-size: .78rem; }
.bar { display: block; height: 7px; border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, var(--gold), #ff9f43); transition: width .6s cubic-bezier(.2,.9,.3,1); }
.star-input { text-align: center; padding: 16px; border-radius: 16px; background: rgba(0,0,0,.25); border: 1px solid var(--border); }
.star-label { font-weight: 600; margin-bottom: 4px; }
.star-buttons { display: inline-flex; gap: 2px; flex-direction: row-reverse; }
.star-btn { font-size: 2.2rem; line-height: 1; background: none; border: 0; padding: 2px 4px; cursor: pointer; color: rgba(255,255,255,.2); transition: transform .15s, color .15s, text-shadow .15s; }
.star-btn.is-on, .star-btn:hover, .star-btn:hover ~ .star-btn { color: var(--gold); text-shadow: 0 0 16px rgba(255,201,77,.7); }
.star-btn:hover { transform: scale(1.25) rotate(-8deg); }
.star-buttons:hover .star-btn.is-on:not(:hover):not(:hover ~ .star-btn) { color: rgba(255,255,255,.2); text-shadow: none; }
.star-input.is-saved .star-btn.is-on { animation: starPop .5s ease; }
@keyframes starPop { 40% { transform: scale(1.4) rotate(12deg); } }
.star-hint { margin: 6px 0 0; }

/* ---------- Comentarios ---------- */
.comments-section { display: flex; flex-direction: column; gap: 16px; }
.comment-form { display: flex; gap: 14px; padding: 16px; }
.comment-form-avatar { border-radius: 50%; width: 40px; height: 40px; flex-shrink: 0; }
.comment-form-main { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.comment-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.replying-to { font-size: .85rem; color: var(--text-2); padding: 6px 10px; border-radius: 9px; background: rgba(155,92,255,.12); }
.cta-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
.cta-card p { margin: 0; }
.comment-list { display: flex; flex-direction: column; gap: 4px; }
.comment { display: flex; gap: 12px; padding: 14px; border-radius: 16px; transition: background .3s; }
.comment:target, .comment.is-new { background: rgba(255,95,162,.08); box-shadow: inset 3px 0 0 var(--pink); }
.comment.is-reply { padding: 10px 0 0; }
.comment-avatar img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.is-reply .comment-avatar img { width: 32px; height: 32px; }
.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
.comment-user { font-weight: 700; font-size: .92rem; }
.comment-user:hover { color: var(--pink); }
.tag { font-size: .66rem; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; }
.tag-author { background: var(--grad); color: #fff; }
.tag-admin { background: var(--gold); color: #2a1f00; }
.tag-score { background: rgba(255,201,77,.15); color: var(--gold); }
.tag-banned { background: var(--red); color: #fff; }
.comment-body { color: var(--text-2); font-size: .95rem; overflow-wrap: anywhere; }
.comment-body.is-spoiler { filter: blur(6px); cursor: pointer; user-select: none; position: relative; transition: filter .3s; }
.comment-body.is-spoiler::after { content: 'SPOILER · pulsa para ver'; position: absolute; inset: 0; display: grid; place-items: center; filter: blur(0); }
.comment-body.is-spoiler.is-revealed { filter: none; user-select: auto; cursor: auto; }
.comment-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.act-btn { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: none; border: 0; color: var(--muted); font-size: .8rem; font-weight: 600; cursor: pointer; }
.act-btn:hover { background: var(--surface); color: #fff; }
.act-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }
.act-btn.is-on { color: var(--pink); }
.act-btn.is-on svg { fill: var(--pink); stroke: var(--pink); animation: heart .4s ease; }
@keyframes heart { 50% { transform: scale(1.4); } }
.replies { border-left: 2px solid var(--border); padding-left: 14px; margin-top: 4px; }
.replies:empty { display: none; }

/* ---------- Modal ---------- */
.modal { border: 0; padding: 0; background: transparent; color: var(--text); max-width: 460px; width: calc(100% - 32px); }
.modal::backdrop { background: rgba(5,4,15,.7); backdrop-filter: blur(4px); }
.modal-card { background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.modal-card h3 { margin: 0; }
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Lector ---------- */
body.is-reader .site-header { position: relative; }
.reader-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 90; }
.reader-progress span { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 12px var(--pink); }
.reader-bar { position: sticky; top: 0; z-index: 40; background: rgba(11,10,31,.85); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); transition: transform .3s; }
.reader-bar.is-hidden { transform: translateY(-100%); }
.reader-bar-inner { display: flex; align-items: center; gap: 14px; height: 60px; }
.reader-back { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; font-weight: 600; }
.reader-work { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-nav { display: flex; gap: 8px; align-items: center; }
.chapter-select { width: auto; padding: 7px 34px 7px 12px; border-radius: 999px; font-size: .88rem; }
.reader-tools { display: flex; gap: 6px; flex: 1; justify-content: flex-end; }
.reader-head { text-align: center; padding: 30px 0 22px; }
.reader-title { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.4rem, 3.4vw, 2.1rem); }
.reader-title span { display: block; font-family: var(--font); font-weight: 700; font-size: .55em; margin-top: 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reader-subtitle { color: var(--text-2); font-style: italic; }
.reader-pages { width: min(820px, 100%); margin: 0 auto; display: flex; flex-direction: column; background: #000; box-shadow: 0 0 80px -20px rgba(155,92,255,.4); }
.reader-pages.is-narrow { width: min(560px, 100%); }
.reader-page { width: 100%; height: auto; min-height: 200px; background: #111 linear-gradient(90deg, #111, #1a1830, #111) 0 0 / 200% 100%; animation: shimmer 1.5s infinite linear; }
.reader-page.is-loaded { animation: none; min-height: 0; background: none; }
/* Lector de novelas: columna de texto cómoda */
.reader-pages.reader-text { width: min(720px, 100%); padding: clamp(24px, 5vw, 56px); background: var(--surface-solid); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: none; font-family: Georgia, "Iowan Old Style", "Palatino Linotype", serif; font-size: 1.13rem; line-height: 1.85; color: var(--text); }
.reader-pages.reader-text.is-narrow { width: min(560px, 100%); }
.reader-text p { margin: 0 0 1.15em; text-wrap: pretty; }
.reader-text p:last-child { margin-bottom: 0; }
@keyframes shimmer { to { background-position: -200% 0; } }
.reader-end { padding-top: 34px; display: flex; flex-direction: column; gap: 30px; width: min(820px, 100% - 32px); }
.reader-end-card { text-align: center; }

/* ---------- Autenticación ---------- */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h) - 140px); width: min(1100px, 100% - 32px); margin: 40px auto; border-radius: 28px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-2); box-shadow: var(--shadow); }
.auth-art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 40px; background: radial-gradient(circle at 70% 25%, rgba(255,95,162,.4), transparent 50%), radial-gradient(circle at 20% 80%, rgba(62,224,255,.25), transparent 50%), linear-gradient(160deg, #241a5c, #0e0b2a); }
.auth-moon { position: absolute; top: 50px; right: 60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff4fa, #ffc2dc 45%, #ff76b1); box-shadow: 0 0 90px 10px rgba(255,118,177,.55); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px); } }
.auth-kanji { font-size: 9rem; font-weight: 900; line-height: 1; color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.55); position: relative; }
.auth-quote { font-size: 1.25rem; font-weight: 600; margin-top: 10px; position: relative; }
.auth-card { border: 0; border-radius: 0; padding: 48px; display: flex; flex-direction: column; justify-content: center; background: transparent; }
.auth-title { font-family: var(--font-display); font-weight: 400; font-size: 2rem; }
.auth-switch { margin-top: 18px; text-align: center; color: var(--muted); }
body.is-auth .site-footer { display: none; }

/* ---------- Perfil ---------- */
.profile-hero { padding: 48px 0 30px; background: linear-gradient(180deg, rgba(155,92,255,.18), transparent); border-bottom: 1px solid var(--border); }
.profile-inner { display: flex; gap: 30px; align-items: center; flex-wrap: wrap; }
.profile-avatar { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 4px solid var(--bg); box-shadow: 0 0 0 3px var(--pink), 0 0 50px -6px var(--pink); }
.profile-info { flex: 1; min-width: 260px; }
.profile-name { font-family: var(--font-display); font-weight: 400; font-size: 2rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-bio { color: var(--text-2); max-width: 60ch; }
.profile-stats { display: flex; gap: 22px; flex-wrap: wrap; margin: 12px 0 16px; color: var(--muted); }
.profile-stats b { color: var(--text); font-size: 1.15rem; }
.profile-layout { padding-top: 30px; }
.rated-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }

/* ---------- Cuenta / estudio ---------- */
.avatar-edit { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.avatar-edit img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--violet); }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat-card { padding: 18px; border-radius: var(--radius); background: var(--grad-soft); border: 1px solid var(--border); }
.stat-card b { display: block; font-family: var(--font-display); font-size: 1.8rem; font-weight: 400; }
.stat-card span { color: var(--text-2); font-size: .88rem; }
.studio-list { display: flex; flex-direction: column; gap: 14px; }
.studio-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 18px; align-items: center; padding: 14px; }
.studio-item img { width: 84px; height: 119px; object-fit: cover; border-radius: 12px; }
.studio-info h3 { margin-bottom: 8px; }
.studio-info p { margin: 8px 0 0; }
.studio-actions { display: flex; flex-direction: column; gap: 8px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.form-cols { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.cover-picker { position: relative; display: block; aspect-ratio: 300/425; border-radius: 18px; overflow: hidden; border: 2px dashed var(--border-strong); cursor: pointer; margin-top: 6px; transition: border-color .2s; }
.cover-picker:hover, .is-dragover { border-color: var(--pink) !important; }
.cover-picker img { width: 100%; height: 100%; object-fit: cover; }
.cover-picker input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cover-picker-hint { position: absolute; inset: auto 0 0 0; padding: 30px 12px 12px; text-align: center; font-size: .82rem; font-weight: 600; background: linear-gradient(0deg, rgba(11,10,31,.95), transparent); }
.type-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.type-option { position: relative; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; }
.type-option span { display: flex; flex-direction: column; align-items: center; padding: 12px; border-radius: 14px; border: 2px solid var(--border-strong); background: var(--surface); transition: all .2s; }
.type-option small { color: var(--muted); font-size: .75rem; }
.type-option input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); box-shadow: 0 0 22px -6px var(--accent); }
.type-option input:focus-visible + span { outline: 2px solid var(--cyan); }
.genre-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.genre-check { cursor: pointer; }
.genre-check input { position: absolute; opacity: 0; }
.genre-check span { display: inline-block; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: .85rem; transition: all .2s; }
.genre-check input:checked + span { background: var(--grad); border-color: transparent; color: #fff; }
.genre-check input:focus-visible + span { outline: 2px solid var(--cyan); }
.studio-chapters { list-style: none; margin: 0 0 14px; padding: 0; max-height: 360px; overflow: auto; }
.studio-chapters li { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.studio-chapters a { flex: 1; display: flex; flex-direction: column; font-size: .9rem; min-width: 0; }
.studio-chapters a.icon-btn { flex: none; flex-direction: row; }
.danger-zone { border-color: rgba(255,92,122,.3); }
.tips .tick-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.tick-list li { padding-left: 26px; position: relative; color: var(--text-2); font-size: .92rem; }
.tick-list li::before { content: '✦'; position: absolute; left: 0; color: var(--pink); }
.page-drop { position: relative; display: block; padding: 34px 20px; text-align: center; border-radius: 18px; border: 2px dashed var(--border-strong); background: var(--surface); cursor: pointer; transition: border-color .2s, background .2s; }
.page-drop:hover { border-color: var(--violet); background: rgba(155,92,255,.08); }
.page-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.page-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; margin-top: 12px; }
.page-preview figure { margin: 0; position: relative; }
.page-preview img { width: 100%; aspect-ratio: 2/3; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.page-preview figcaption { position: absolute; top: 4px; left: 4px; font-size: .7rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(11,10,31,.8); }
.page-preview .pp-summary { grid-column: 1 / -1; font-size: .85rem; color: var(--text-2); }
.upload-progress { position: relative; height: 34px; border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.upload-progress span { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); transition: width .2s; }
.upload-progress b { position: relative; display: grid; place-items: center; height: 100%; font-size: .85rem; }

/* ---------- Biblioteca / notificaciones ---------- */
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.library-card { display: flex; gap: 14px; padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.library-card img { width: 90px; height: 128px; object-fit: cover; border-radius: 10px; }
.library-info { min-width: 0; flex: 1; }
.library-info h3 { font-size: 1rem; margin-bottom: 4px; }
.library-info p { margin-bottom: 6px; }
.notif-page { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notif-page a { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.notif-page a:hover { border-color: var(--violet); }
.notif-page .is-unread a { background: rgba(155,92,255,.1); border-color: rgba(155,92,255,.35); }
.notif-ico { width: 36px; height: 36px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; background: var(--grad-soft); }
.notif-text { display: flex; flex-direction: column; gap: 2px; }

/* ---------- Sugerencias ---------- */
.roadmap { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 22px; }
.roadmap-step { padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); text-align: center; transition: all .2s; position: relative; }
.roadmap-step b { display: block; font-family: var(--font-display); font-size: 1.5rem; font-weight: 400; }
.roadmap-step span { font-size: .82rem; color: var(--text-2); }
.roadmap-step:hover, .roadmap-step.is-active { border-color: var(--st, var(--violet)); box-shadow: 0 0 24px -8px var(--st, var(--violet)); }
.st-nueva { --st: var(--cyan); } .st-en_revision { --st: var(--violet); } .st-planeada { --st: var(--gold); } .st-implementada { --st: var(--green); } .st-descartada { --st: #8a87b3; }
.pill.st-nueva, .pill.st-en_revision, .pill.st-planeada, .pill.st-implementada, .pill.st-descartada { border-color: var(--st); color: var(--st); background: color-mix(in srgb, var(--st) 12%, transparent); }
.sugg-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.sugg { display: flex; gap: 18px; margin-bottom: 14px; padding: 18px; }
.sugg h3 { margin: 10px 0 6px; font-size: 1.1rem; }
.sugg-main { flex: 1; min-width: 0; }
.vote-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; height: 68px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; transition: all .2s; color: var(--muted); }
.vote-btn b { font-size: 1.15rem; color: var(--text); }
.vote-btn:hover { border-color: var(--pink); color: var(--pink); }
.vote-btn.is-on { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 24px -8px var(--pink); }
.vote-btn.is-on b { color: #fff; }
.admin-reply { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(255,201,77,.08); border-left: 3px solid var(--gold); }
.admin-reply p { margin: 6px 0 0; color: var(--text-2); }
.sticky { position: sticky; top: calc(var(--header-h) + 16px); }

/* ---------- Errores ---------- */
.error-page { text-align: center; padding: 80px 0; }
.error-code { font-family: var(--font-display); font-size: clamp(6rem, 18vw, 11rem); line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 10px 40px rgba(155,92,255,.5)); }

/* ---------- Pie ---------- */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--border); background: rgba(8,7,22,.7); padding: 44px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); }
.footer-grid a:not(.brand) { display: block; padding: 4px 0; color: var(--text-2); font-size: .93rem; }
.footer-grid a:not(.brand):hover { color: var(--pink); }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1360px) {
    .nav-link { padding: 8px 9px; font-size: .9rem; }
}
@media (max-width: 1180px) {
    .main-nav .nav-link:nth-child(n+6) { display: none; }
}
@media (max-width: 1024px) {
    .home-grid, .work-layout, .sugg-layout, .form-layout { grid-template-columns: 1fr; }
    .home-side, .work-side, .sticky { position: static; }
    .nav-toggle { display: inline-grid; }
    .main-nav {
        position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; padding: 12px 16px 20px;
        background: rgba(11,10,31,.97); border-bottom: 1px solid var(--border); transform: translateY(-120%); transition: transform .3s; z-index: 45;
    }
    .main-nav.is-open { transform: none; }
    .main-nav .nav-link { display: block !important; padding: 12px; font-size: 1.05rem; }
    .roadmap { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    :root { --header-h: 62px; }
    .search { max-width: none; }
    .hide-sm { display: none !important; }
    .type-picker { grid-template-columns: repeat(2, 1fr); }
    .brand-name { display: none; }
    .hero-inner { grid-template-columns: 1fr; padding: 34px 0 70px; }
    .hero-cover { display: none; }
    .hero { min-height: 0; }
    .work-hero-inner { grid-template-columns: 1fr; gap: 20px; }
    .work-cover-wrap { width: 190px; margin: 0 auto; }
    .work-info { text-align: center; }
    .work-badges, .work-stats, .work-genres, .work-actions { justify-content: center; }
    .chapter-list { grid-template-columns: 1fr; }
    .ranking-grid, .auth-wrap, .form-cols { grid-template-columns: 1fr; }
    .auth-art { min-height: 200px; padding: 24px; }
    .auth-kanji { font-size: 5rem; }
    .auth-moon { width: 100px; height: 100px; top: 24px; right: 24px; }
    .auth-card { padding: 28px 22px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .studio-item { grid-template-columns: 70px 1fr; }
    .studio-item img { width: 70px; height: 99px; }
    .studio-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
    .creator-cta { grid-template-columns: 1fr; text-align: center; }
    .creator-cta-art { width: 110px; margin: 0 auto; }
    .reader-bar-inner { gap: 8px; }
    .reader-work { display: none; }
    .reader-tools { flex: 0; }
    .work-grid, .work-grid.wide { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 12px; }
    .roadmap { grid-template-columns: repeat(2, 1fr); }
    .announcement { flex-wrap: wrap; }
    .announcement > .muted { margin-left: 0; }
    .card { padding: 18px; }
    .filters .field { min-width: calc(50% - 6px); flex: 1; }
}
@media (max-width: 420px) {
    .hide-xs { display: none !important; }
    .work-grid, .work-grid.wide { grid-template-columns: repeat(2, 1fr); }
    .scroller { grid-auto-columns: 140px; }
    .chapter-select { max-width: 130px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .petals { display: none; }
}

/* ---------- Chat de la comunidad (panel flotante) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.chat { position: fixed; right: 18px; bottom: 18px; z-index: 150; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat[hidden] { display: none; }
body.has-chat .toasts { bottom: 90px; }
.chat-launcher { position: relative; width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; color: #fff; background: var(--grad); box-shadow: var(--glow); transition: transform .2s; }
.chat-launcher:hover { transform: translateY(-2px) scale(1.04); }
.chat-launcher svg { width: 26px; height: 26px; fill: currentColor; }
.chat.is-open .chat-launcher { transform: scale(.88); opacity: .85; }
.chat-dot { position: absolute; top: 4px; right: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--gold); border: 2px solid var(--bg); }
.chat-panel { order: -1; width: min(370px, calc(100vw - 32px)); height: min(540px, calc(100vh - 120px)); display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--surface-solid); border: 1px solid var(--border-strong); box-shadow: var(--shadow); overflow: hidden; animation: chat-in .22s ease-out; }
.chat-panel[hidden] { display: none; }
@keyframes chat-in { from { transform: translateY(10px); } }
.chat-head { display: flex; align-items: center; gap: 4px; padding: 12px 10px 12px 16px; border-bottom: 1px solid var(--border); background: var(--grad-soft); }
.chat-head > div { flex: 1; min-width: 0; }
.chat-head strong, .chat-head span { display: block; }
.chat-head .icon-btn { width: 34px; height: 34px; font-size: 1.05rem; }
.chat-rules { padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(255, 201, 77, .08); font-size: .85rem; color: var(--text-2); }
.chat-rules p { margin: 0 0 8px; }
.chat-rules[hidden] { display: none; }
.chat-list { list-style: none; margin: 0; padding: 10px 12px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; overscroll-behavior: contain; }
.chat-empty { text-align: center; margin: auto; }
.chat-msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0 9px; padding: 6px 6px; border-radius: 12px; position: relative; }
.chat-msg:hover { background: var(--surface); }
.chat-msg.is-cont { padding-top: 0; }
.chat-msg.is-cont .chat-avatar, .chat-msg.is-cont .chat-meta { display: none; }
.chat-msg.is-cont .chat-body { grid-column: 2; }
.chat-avatar { width: 32px; height: 32px; border-radius: 50%; grid-row: span 2; }
.chat-meta { display: flex; align-items: baseline; gap: 6px; font-size: .8rem; }
.chat-meta a { font-weight: 600; color: var(--text); }
.chat-meta time { color: var(--muted); font-size: .72rem; }
.chat-msg.is-mine .chat-meta a { color: var(--cyan); }
.chat-role { font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: rgba(255, 201, 77, .16); color: var(--gold); }
.chat-body { margin: 0; font-size: .9rem; color: var(--text-2); overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-body .mention { color: var(--pink); font-weight: 600; }
.chat-body .mention.is-me { background: rgba(255, 95, 162, .16); border-radius: 4px; padding: 0 3px; }
.chat-day { align-self: center; margin: 8px 0 4px; font-size: .72rem; color: var(--muted); padding: 2px 10px; border-radius: 999px; background: var(--surface); }
.chat-tools { position: absolute; top: 2px; right: 4px; display: none; gap: 2px; background: var(--surface-solid); border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.chat-msg:hover .chat-tools, .chat-msg:focus-within .chat-tools { display: flex; }
.chat-tools button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: .8rem; padding: 3px 6px; border-radius: 6px; }
.chat-tools button:hover { background: var(--surface-2); color: var(--text); }
.chat-pop { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 2px; }
.chat-pop small { width: 100%; color: var(--muted); }
.chat-blocked { margin: 0; padding: 10px 16px; border-top: 1px solid var(--border); color: var(--gold); background: rgba(255, 201, 77, .07); }
.chat-blocked[hidden] { display: none; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); }
.chat-form input { flex: 1; min-width: 0; }
.chat-form.is-disabled { opacity: .5; pointer-events: none; }
@media (max-width: 520px) {
    .chat { right: 12px; bottom: 12px; }
    .chat-panel { width: calc(100vw - 24px); height: calc(100vh - var(--header-h) - 96px); height: calc(100dvh - var(--header-h) - 96px); }
}
@media (hover: none) { .chat-tools { display: flex; background: none; border: 0; opacity: .6; } .chat-msg.is-cont .chat-tools { top: -2px; } }
body.is-reader .chat-launcher { opacity: .7; }

/* ---------- Mecenas ---------- */
.tag-supporter { background: linear-gradient(120deg, rgba(155,92,255,.35), rgba(62,224,255,.3)); color: #e9e4ff; border: 1px solid rgba(155,92,255,.5); text-transform: none; letter-spacing: 0; }
.pill-violet { background: rgba(155,92,255,.16); border-color: rgba(155,92,255,.5); color: #d9c6ff; }
.is-supporter { font-weight: 700; }
.name-rosa    { color: #ff7db4 !important; }
.name-violeta { color: #c4a2ff !important; }
.name-cian    { color: #6be8ff !important; }
.name-dorado  { color: #ffd36e !important; }
.name-verde   { color: #6ee7a0 !important; }
.name-naranja { color: #ffa064 !important; }
.chat-role.is-supporter-tag { background: rgba(155,92,255,.2); color: #d9c6ff; }
.swatch-picker, .theme-picker { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch, .theme-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.swatch input, .theme-option input { position: absolute; opacity: 0; }
.swatch small, .theme-option small { color: var(--muted); font-size: .72rem; }
.swatch-dot { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--border-strong); transition: transform .15s; }
.swatch input:checked + .swatch-dot, .theme-option input:checked + .theme-prev { outline: 2px solid #fff; outline-offset: 3px; }
.swatch input:focus-visible + .swatch-dot, .theme-option input:focus-visible + .theme-prev { outline: 2px solid var(--cyan); outline-offset: 3px; }
.name-none { background: var(--text); }
.dot-rosa { background: #ff7db4; } .dot-violeta { background: #c4a2ff; } .dot-cian { background: #6be8ff; }
.dot-dorado { background: #ffd36e; } .dot-verde { background: #6ee7a0; } .dot-naranja { background: #ffa064; }
.theme-prev { width: 86px; height: 48px; border-radius: 12px; border: 1px solid var(--border-strong); background: linear-gradient(180deg, rgba(155,92,255,.35), var(--bg-2)); }
/* Temas de perfil (también se usan en las vistas previas) */
.theme-aurora    { background: radial-gradient(120% 140% at 10% 0%, rgba(62,224,255,.35), transparent 55%), radial-gradient(120% 140% at 90% 10%, rgba(155,92,255,.45), transparent 60%), var(--bg-2); }
.theme-sakura    { background: radial-gradient(120% 140% at 15% 0%, rgba(255,95,162,.45), transparent 55%), radial-gradient(100% 120% at 85% 20%, rgba(255,201,224,.22), transparent 60%), var(--bg-2); }
.theme-oceano    { background: linear-gradient(160deg, rgba(30,120,255,.45), rgba(62,224,255,.18) 55%, transparent), var(--bg-2); }
.theme-bosque    { background: linear-gradient(160deg, rgba(74,222,128,.32), rgba(20,90,70,.35) 55%, transparent), var(--bg-2); }
.theme-atardecer { background: linear-gradient(160deg, rgba(255,138,61,.45), rgba(255,95,162,.3) 50%, transparent), var(--bg-2); }
.profile-hero[class*="theme-"] { border-bottom-color: var(--border-strong); }
.support-hero .hero-kicker { display: inline-flex; gap: 6px; color: var(--gold); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: .8rem; margin-bottom: 6px; }
.support-cta { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: center; background: var(--grad-soft); }
.support-action { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.support-action .btn { justify-content: center; }
.support-uses, .steps { margin: 0; padding-left: 1.2em; color: var(--text-2); }
.support-uses li, .steps li { margin-bottom: .5em; }
.perk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }
.perk { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.perk-ico { font-size: 1.4rem; }
.supporter-wall { display: flex; flex-wrap: wrap; gap: 8px; }
.supporter-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .9rem; }
.supporter-chip img { border-radius: 50%; }
.support-mini { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.support-mini p { margin: 0; }
@media (max-width: 760px) { .support-cta { grid-template-columns: 1fr; } }
.support-action { gap: 10px; }
.pay-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; }
.alias-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.alias { font-size: 1.35rem; font-weight: 700; letter-spacing: 1px; padding: 6px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.pay-qr { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; max-width: 240px; }
.pay-qr img { width: 220px; height: 220px; object-fit: contain; background: #fff; padding: 10px; border-radius: 16px; }
@media (max-width: 760px) { .pay-grid { grid-template-columns: 1fr; } .pay-qr { margin: 0 auto; } }

/* ---------- Importación de obras ---------- */
.cover-choices { display: flex; gap: 12px; flex-wrap: wrap; }
.cover-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; }
.cover-choice input { position: absolute; opacity: 0; }
.cover-choice img { width: 110px; height: 156px; object-fit: cover; border-radius: 10px; border: 2px solid var(--border-strong); background: #111; transition: transform .15s; }
.cover-choice input:checked + img { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255,95,162,.35); transform: translateY(-2px); }
.cover-choice input:focus-visible + img { outline: 2px solid var(--cyan); outline-offset: 2px; }
.cover-choice small { color: var(--muted); font-size: .75rem; }
.import-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; }
.import-page { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 12px; border: 1px solid transparent; }
.import-page.is-break { border-color: var(--gold); background: rgba(255,201,77,.06); }
.import-page input[type=text] { font-size: .8rem; padding: 6px 8px; }
.import-page-img { position: relative; display: block; cursor: pointer; }
.import-page-img input { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; z-index: 1; accent-color: var(--pink); }
.import-page-img img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; border-radius: 8px; background: #111; border: 1px solid var(--border); transition: opacity .15s, filter .15s; }
.import-page-img input:not(:checked) ~ img { opacity: .3; filter: grayscale(1); }
.import-page-num { position: absolute; right: 6px; bottom: 6px; font-size: .72rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(0,0,0,.65); }
.import-chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: ch; }
.import-ch { padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.import-ch.is-front { border-style: dashed; }
.import-ch-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.import-ch-head input[type=text] { flex: 1; min-width: 200px; }
.import-excerpt { margin: 8px 0 0; }
