:root{--navy:#092b43;--deep:#061f31;--teal:#138b89;--aqua:#31c8bd;--gold:#e8bd67;--ink:#18384b;--muted:#59717e;--bg:#f4f9fb;--line:#dbe7ec;--paper:#fffdf7}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.6}a{color:var(--teal);text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit}button{cursor:pointer}.wrap{width:min(1120px,calc(100% - 36px));margin:auto}.topbar{background:var(--deep);color:#fff;position:sticky;top:0;z-index:5;border-bottom:1px solid #ffffff22}.nav{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:74px}.logo{font-size:1.35rem;font-weight:800;letter-spacing:-.5px;color:#fff}.logo span{color:var(--aqua)}.navlinks{display:flex;flex-wrap:wrap;gap:18px}.navlinks a{color:#d9e9ed;font-size:.92rem}.hero{background:radial-gradient(circle at 80% 25%,#1d6372 0,transparent 35%),linear-gradient(135deg,#071d32,#0b3851 70%,#0c5b66);color:white;overflow:hidden}.hero-inner{display:grid;grid-template-columns:1.2fr .8fr;align-items:center;gap:32px;min-height:400px;padding:54px 0}.hero h1{font-size:clamp(2.2rem,5vw,4.1rem);line-height:1.12;letter-spacing:-1.8px;max-width:670px}.hero em{font-style:normal;color:#7be1d6}.hero p{color:#c9e1e8;max-width:600px;font-size:1.1rem}.eyebrow{font-size:.76rem;letter-spacing:.16em;font-weight:800;color:var(--teal)}.hero .eyebrow{color:#e6c87f}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:12px;padding:12px 20px;background:var(--teal);color:white;font-weight:700}.btn:hover{background:#096f70;color:#fff;text-decoration:none}.hero .btn{background:var(--aqua);color:#052f3d}.hero-art{position:relative;min-height:280px;display:grid;place-items:center}.orbit{position:absolute;border:1px solid #75d5d755;border-radius:50%;width:250px;height:250px;transform:rotate(-20deg) scaleX(1.25)}.orbit2{width:180px;height:180px;transform:rotate(30deg) scaleX(1.45)}.planet{width:132px;height:132px;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle at 30% 20%,#79e4da,#167e8c 70%,#063c5d);font-size:4rem;color:#ffe0a1;box-shadow:0 0 80px #36b6b466}.orbit-label{position:absolute;bottom:0;color:#9ed8d8;letter-spacing:.14em;font-size:.65rem}.library{padding:52px 0 90px}.sectionhead h2{font-size:clamp(1.6rem,3vw,2.4rem);margin:8px 0 24px}.filters{display:grid;grid-template-columns:2fr 1fr 1fr auto;gap:10px;margin-bottom:28px}.filters input,.filters select,input,select,textarea{border:1px solid #cbdce2;border-radius:10px;padding:12px;background:#fff;min-width:0;width:100%;color:var(--ink)}input:focus,textarea:focus,select:focus{outline:2px solid #5bcac4;outline-offset:1px}.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(225px,1fr));gap:22px}.card{background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 8px 24px #123c4b0b}.cover{height:245px;overflow:hidden;background:linear-gradient(135deg,#164960,#4ac2bd)}.cover img{width:100%;height:100%;object-fit:cover}.coverfallback{display:grid;place-items:center;height:100%;font-size:5rem;color:#f6d795}.cardbody{padding:18px}.tag{color:#137c7c;font-size:.76rem;font-weight:800}.card h3{font-size:1.15rem;line-height:1.3;margin:10px 0}.card h3 a{color:var(--ink)}.card p{color:var(--muted);font-size:.92rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.muted{color:var(--muted);font-size:.85rem}.empty{padding:45px;text-align:center;background:white;border-radius:14px}.footer{background:var(--deep);color:#e1edf1;padding:40px 0}.footer p{color:#9bb6c0}.footer a{color:#9ce1dc}.reader{padding:30px 0 70px}.back{display:inline-block;margin-bottom:20px}.reader-head{display:flex;justify-content:space-between;gap:25px;align-items:center;margin-bottom:25px}.reader-head h1{font-size:clamp(1.9rem,4vw,3rem);line-height:1.2;margin:8px 0}.reader-head p{color:var(--muted);max-width:700px}.reader-cover{height:160px;max-width:130px;object-fit:cover;border-radius:12px}.book{border:1px solid #dce5e4;background:var(--paper);border-radius:22px;overflow:hidden;box-shadow:0 15px 45px #16364a13}.bookbar,.bookfoot{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 20px;background:#eef6f5;flex-wrap:wrap}.toggle{display:flex;gap:6px}.toggle button,.arrows button{background:#fff;border:1px solid #c7d9dc;border-radius:10px;padding:9px 14px;color:var(--ink)}.toggle button[aria-pressed=true]{background:var(--navy);color:#fff}.arrows{display:flex;gap:8px}.arrows button:disabled{opacity:.45;cursor:not-allowed}.reading-pages{padding:25px;min-height:300px}.storypage{width:min(720px,100%);margin:auto;background:#fff;border-radius:18px;overflow:hidden;border:1px solid #eee7da;box-shadow:0 6px 30px #0a30400d}.pageart{background:linear-gradient(135deg,#e5f6f3,#d9e9f7);min-height:150px}.pageart img{display:block;width:100%;height:auto;max-height:520px;object-fit:contain}.placeholder{height:230px;display:grid;place-items:center;font-size:5rem;color:#289a97}.pagetext{padding:24px clamp(20px,5vw,45px) 32px;text-align:center}.pagetext h2{font-size:1.55rem;margin:0 0 12px}.pagetext p{white-space:pre-line;line-height:1.75;margin:0}.reading-pages.continuous{display:grid;gap:24px}.progress{flex:1;min-width:100px;height:7px;background:#d4e3e2;border-radius:10px;overflow:hidden}.progress>div{height:100%;width:0;background:var(--teal);transition:width .2s}.admin{padding:45px 0 90px;min-height:65vh}.adminbar{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}.panel{background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px;margin:18px 0;box-shadow:0 8px 25px #123c4b0b}.narrow{max-width:460px;margin:30px auto}.panel form label{display:block;margin:12px 0;font-weight:600}.panel form label input,.panel form label select,.panel form label textarea{display:block;margin-top:6px;font-weight:400}.panel form .check{display:flex;align-items:center;gap:8px}.check input{width:auto!important}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.stats .panel{display:grid;gap:6px}.stats strong{font-size:2rem;color:var(--teal)}.stats span{color:var(--muted)}.tablewrap{overflow-x:auto}table{width:100%;border-collapse:collapse}td,th{text-align:left;padding:12px;border-bottom:1px solid var(--line)}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:12px 20px}.formgrid .wide{grid-column:1/-1}.thumb{max-width:160px;max-height:180px;object-fit:contain}.editlayout{display:grid;grid-template-columns:1fr 1fr;gap:18px}.pageitem{display:flex;justify-content:space-between;gap:15px;border-bottom:1px solid var(--line);padding:15px 0}.pageitem p{color:var(--muted);font-size:.9rem}.linkbtn{border:0;background:none;color:var(--teal);padding:5px}.danger,.error{color:#b22f37}.error{padding:12px;background:#fff0f0;border-radius:8px}@media(max-width:750px){.nav{align-items:flex-start;flex-direction:column;padding:14px 0}.navlinks{gap:12px}.hero-inner{grid-template-columns:1fr;padding:45px 0}.hero-art{display:none}.filters{grid-template-columns:1fr 1fr}.filters input{grid-column:1/-1}.filters button{grid-column:1/-1}.reader-head{align-items:flex-start}.reader-cover{height:100px}.reading-pages{padding:12px}.editlayout,.stats{grid-template-columns:1fr}.formgrid{grid-template-columns:1fr}.formgrid .wide{grid-column:auto}}@media(max-width:440px){.wrap{width:min(100% - 22px,1120px)}.navlinks{font-size:.8rem}.reader-cover{display:none}.bookbar,.bookfoot{padding:12px}.arrows{width:100%}.arrows button{flex:1}.cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.cover{height:170px}.cardbody{padding:12px}.card h3{font-size:1rem}.card p{font-size:.8rem}}

/* Logo EternaPacha sin subrayado */
.logo,
.logo:hover,
.logo:focus,
.logo:active {
    text-decoration: none !important;
}

/* Navegación moderna sin subrayados */
.navlinks a,
.navlinks a:hover,
.navlinks a:focus,
.navlinks a:active {
    text-decoration: none !important;
    border-bottom: none;
}

/* Efecto elegante al pasar el cursor */
.navlinks a {
    transition: color 0.25s ease;
}

.navlinks a:hover {
    color: var(--aqua);
}


/* EternaPacha - Aviso de privacidad */

.ep-privacy-banner {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: min(720px, calc(100% - 28px));
    background: #ffffff;
    color: #18384b;
    border: 1px solid #dbe7ec;
    border-radius: 18px;
    padding: 18px 22px;
    box-shadow: 0 12px 45px rgba(0,0,0,.22);
    z-index: 9999;
}

.ep-privacy-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ep-privacy-content strong {
    font-size: 1rem;
}

.ep-privacy-content p {
    margin: 6px 0 0;
    font-size: .85rem;
    line-height: 1.5;
    color: #59717e;
}

.ep-privacy-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 175px;
}

.ep-privacy-actions button {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

#ep-privacy-yes {
    background: #138b89;
    color: white;
    border: 1px solid #138b89;
}

#ep-privacy-no {
    background: white;
    color: #18384b;
    border: 1px solid #cbdce2;
}

.ep-privacy-settings {
    background: none;
    border: none;
    color: #9ce1dc;
    padding: 0;
    cursor: pointer;
    font-size: .85rem;
}

.ep-privacy-settings:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .ep-privacy-content {
        flex-direction: column;
        align-items: stretch;
    }

    .ep-privacy-actions {
        flex-direction: row;
    }

    .ep-privacy-actions button {
        flex: 1;
    }
}

/* Botón de configuración de privacidad */
.ep-privacy-settings {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(156,225,220,.35);
    border-radius: 9px;
    padding: 7px 13px;
    margin-left: 10px;
    color: #9ce1dc;
    font-size: .82rem;
    transition: background .2s, border-color .2s;
}

.ep-privacy-settings:hover {
    background: rgba(156,225,220,.1);
    border-color: #9ce1dc;
    text-decoration: none;
}


/* EternaPacha - Compartir cuentos */

.ep-share {
    margin: 28px 0 15px;
    padding: 26px;
    border: 1px solid #dbe7ec;
    border-radius: 20px;
    background: linear-gradient(135deg, #ffffff, #edf9f7);
    box-shadow: 0 10px 35px rgba(9,43,67,.06);
}

.ep-share-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.ep-share-symbol {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    height: 48px;
    border-radius: 15px;
    background: #092b43;
    color: #e8bd67;
    font-size: 1.5rem;
}

.ep-share-heading h2 {
    margin: 0;
    color: #092b43;
    font-size: 1.3rem;
}

.ep-share-heading p {
    margin: 5px 0 0;
    color: #59717e;
    font-size: .9rem;
}

.ep-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ep-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-weight: 700;
    font-size: .87rem;
    color: white;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
}

.ep-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,.12);
    color: white;
    text-decoration: none;
}

.ep-share-whatsapp { background: #168c52; }
.ep-share-facebook { background: #1877f2; }
.ep-share-telegram { background: #238cba; }
.ep-share-copy { background: #092b43; }
.ep-share-native { background: #138b89; }

.ep-share-btn[hidden] {
    display: none !important;
}

.ep-share-message {
    margin: 12px 0 0;
    color: #138b89;
    font-size: .85rem;
}

.ep-share-message:empty {
    display: none;
}

@media (max-width: 600px) {
    .ep-share {
        padding: 18px;
    }

    .ep-share-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ep-share-btn {
        padding: 10px 8px;
    }
}

.navlinks {
    align-items: center;
}

.navlinks .nav-support {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border-radius: 11px;
    background: #138b89;
    color: #fff;
    font-weight: 700;
    text-decoration: none !important;
    transition: background .2s;
}

.navlinks .nav-support:hover {
    background: #31a9a3;
    color: #fff;
}
/* ==========================================
   LECTURA CONTINUA - SEO Y ACCESIBILIDAD
========================================== */

.ep-story-content {
    max-width: 820px;
    margin: 45px auto 60px;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e1e9ed;
    border-radius: 20px;
}

.ep-story-content h2 {
    color: #061f31;
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    line-height: 1.35;
    margin-bottom: 28px;
}

.ep-story-chapter {
    margin-bottom: 30px;
}

.ep-story-chapter h3 {
    color: #138b89;
    font-size: 1.15rem;
    margin-bottom: 14px;
}

.ep-story-text {
    color: #304758;
    font-size: 1.05rem;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .ep-story-content {
        margin: 30px auto 45px;
        padding: 20px;
    }

    .ep-story-text {
        font-size: 1rem;
        line-height: 1.8;
    }
}


/* ==========================================
   ETERNAPACHA - HISTORIAS RELACIONADAS
========================================== */

.ep-related {
    margin: 55px 0 70px;
}

.ep-related-heading {
    margin-bottom: 24px;
}

.ep-related-heading h2 {
    color: var(--deep);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 8px;
}

.ep-related-heading p {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.ep-related-cards {
    margin-top: 20px;
}

@media (max-width: 600px) {
    .ep-related {
        margin: 35px 0 45px;
    }

    .ep-related-cards {
        gap: 12px;
    }
}