/* SONELIORA 10.13.24 — Enciclopédia Cósmica Premium: escopo ec-* */
:root{--ec-gold:#f7d79b;--ec-ice:#a9eaff;--ec-ink:#06162b;--ec-stroke:rgba(149,207,238,.28)}
.ec-page{background:radial-gradient(circle at 90% 4%,rgba(42,95,169,.24),transparent 29%),radial-gradient(circle at 7% 62%,rgba(25,112,163,.19),transparent 25%),#040d1d;color:#e3eefb}
.ec-library-hero{position:relative;isolation:isolate;overflow:hidden}
.ec-library-hero::after{content:"";pointer-events:none;position:absolute;inset:0;z-index:-1;background-image:radial-gradient(circle at 30% 15%,#fff0cf 1px,transparent 2px),radial-gradient(circle at 65% 42%,#b2e9ff 1px,transparent 2px),radial-gradient(circle at 80% 80%,#f7d39f 1px,transparent 2px);background-size:170px 190px,210px 190px,245px 216px;opacity:.22;animation:ecStarDrift 18s ease-in-out infinite alternate}
.ec-library-hero h1 em{font-style:normal;background:linear-gradient(110deg,#ffefc9,#e6b76f);background-clip:text;-webkit-background-clip:text;color:transparent}
.ec-hero-metrics{display:flex;gap:12px;flex-wrap:wrap;margin:24px 0 16px}
.ec-hero-metrics span{display:grid;min-width:110px;gap:2px;padding:13px 17px;border:1px solid rgba(255,226,178,.22);border-radius:16px;background:rgba(7,24,45,.72);font-size:13px;color:#bcd5e7}
.ec-hero-metrics strong{font-size:25px;color:var(--ec-gold);line-height:1.15}
.ec-library-section{margin:28px 0;padding:clamp(18px,3vw,32px);border:1px solid var(--ec-stroke);border-radius:24px;background:linear-gradient(140deg,#0b2442,#07182d);box-shadow:0 16px 40px #0005}
.ec-section-top{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}
.ec-section-top h2{margin:8px 0 18px;color:var(--ec-gold)}
.ec-page .ec-outline-link{padding:9px 13px;border-radius:12px;text-decoration:none;border:1px solid rgba(150,214,244,.38);background:#0c304d;color:#d3efff;font-weight:700}
.ec-search-label{display:block;margin:14px 0 8px;font-size:14px;color:#c7e0ed}
.ec-search{width:100%;min-height:49px;padding:13px 16px;color:#fff;border-radius:13px;border:1px solid #739db8;background:#081a32;font:inherit;outline-offset:3px}
.ec-filterbar{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
.ec-filterbar button,.ec-card-actions button,.ec-reader-tools button{font:inherit;cursor:pointer}
.ec-filterbar button{border:1px solid rgba(146,196,221,.34);padding:8px 14px;color:#d5eaf9;border-radius:999px;background:#0c2947;min-height:38px;font-size:13px}
.ec-filterbar button[aria-pressed=true]{background:linear-gradient(110deg,#f8e5b9,#e0b673);color:#102034;border-color:#f2c57b;font-weight:800}
.ec-muted{font-size:13px;color:#afc8dc}
.ec-catalog-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px;margin-top:12px}
.ec-card{display:flex;flex-direction:column;gap:11px;min-width:0;padding:22px;border:1px solid rgba(150,206,235,.3);border-radius:19px;background:radial-gradient(circle at 95% 4%,rgba(57,113,185,.20),transparent 43%),linear-gradient(150deg,#102d4b,#081c35);box-shadow:0 9px 26px #0003;transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease}
.ec-card:hover{transform:translateY(-2px);border-color:#a7dffe;box-shadow:0 12px 30px #0007,0 0 21px #2a78aa33}
.ec-card-meta{font-size:11px;letter-spacing:.12em;text-transform:uppercase;font-weight:800;color:#95dbf6}
.ec-card h3{margin:0;color:#ffdfa8;font:500 clamp(1.18rem,2vw,1.43rem)/1.25 Georgia,serif}
.ec-card p{margin:0;color:#cee2ef;line-height:1.65;font-size:.93rem}
.ec-ref{color:#f4d79a;font-size:12px}
.ec-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}
.ec-card-actions a,.ec-card-actions button{display:inline-flex;justify-content:center;align-items:center;min-height:40px;padding:8px 11px;border-radius:10px;border:1px solid rgba(151,210,237,.35);text-decoration:none;background:#0d3251;color:#e8f8ff;font:700 12px/1.3 system-ui,sans-serif}
.ec-card-actions a:first-child{background:linear-gradient(110deg,#f9e2b1,#ddb264);color:#15233a;border-color:#edc37f}
.ec-card-actions button[aria-pressed=true]{background:#275a55;border-color:#87d3b9;color:#e5fff6}
.ec-empty{padding:24px;border:1px dashed #6896ba;border-radius:14px;color:#d1e2f3}
/* Shared reading controls: attach to article pages only; no global restyling of functional UI */
.ec-reader-active{scroll-padding-top:100px}
.ec-reader-tools{position:sticky;top:8px;z-index:8;display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:12px auto 22px;padding:10px;border-radius:17px;border:1px solid rgba(146,203,234,.45);background:rgba(7,26,48,.93);color:#e2f4ff;font:13px/1.4 system-ui,sans-serif;box-shadow:0 14px 38px #0007;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
.ec-reader-tools button,.ec-reader-tools a{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 10px;background:#123650;border:1px solid rgba(173,221,241,.30);border-radius:10px;color:#f0faff;text-decoration:none;white-space:nowrap;font:700 12px/1.1 system-ui,sans-serif}
.ec-reader-tools button:hover,.ec-reader-tools a:hover{border-color:#b9eaff;background:#174465}
.ec-reader-tools button:focus-visible,.ec-reader-tools a:focus-visible,.ec-page button:focus-visible,.ec-page a:focus-visible,.ec-page input:focus-visible{outline:3px solid #f6cf8c;outline-offset:3px}
.ec-reader-tools button[disabled]{opacity:.5;cursor:not-allowed}
.ec-reader-tools .ec-gold{border-color:#f1cc8b;color:#ffe4b1}
.ec-reader-tools .ec-reader-label{font-weight:800;letter-spacing:.04em;color:#ffe6b6;white-space:nowrap;padding:0 6px}
.ec-reader-progress{position:fixed;top:0;left:0;right:0;height:4px;z-index:999;background:#09152933;pointer-events:none}
.ec-reader-progress span{display:block;width:0;height:100%;background:linear-gradient(90deg,#81d4ff,#f3cf8a);box-shadow:0 0 14px #f6d38b55;transition:width .18s ease-out}
.ec-reader-toc{width:100%;border-top:1px solid #9acbe333;padding-top:7px}
.ec-reader-toc summary{cursor:pointer;font-weight:700;color:#d7f0ff;padding:4px 6px}
.ec-reader-toc-list{display:flex;flex-wrap:wrap;gap:7px;max-height:180px;overflow:auto;padding:10px 3px}
.ec-reader-toc-list a{white-space:normal;font-size:12px;text-align:left}
.ec-reader-status{min-height:18px;flex:1 0 100%;color:#b8d8ed;font-size:12px;padding-left:7px}
.ec-reader-active .ec-reading-content{font-size:calc(1em * var(--ec-text-scale,1))}
.ec-reader-active h2[id],.ec-reader-active h3[id]{scroll-margin-top:125px}
.ec-tool-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
@keyframes ecStarDrift{to{transform:translate3d(8px,-9px,0);opacity:.4}}
@media(max-width:850px){.ec-catalog-grid{grid-template-columns:1fr}}
@media(max-width:650px){.ec-library-section{padding:17px;border-radius:19px}.ec-card{padding:18px}.ec-card-actions a,.ec-card-actions button{flex:1 1 auto}.ec-reader-tools{top:4px;border-radius:14px;padding:9px 7px;gap:6px}.ec-reader-tools .ec-reader-label{flex-basis:100%;text-align:center}.ec-reader-tools button,.ec-reader-tools a{flex:1 1 auto;min-height:39px}.ec-hero-metrics span{flex:1;min-width:0}.ec-reader-status{font-size:11px}}
@media(prefers-reduced-motion:reduce){.ec-library-hero::after,.ec-card{animation:none;transition:none}}
