:root { color-scheme: light dark; --canvas:#f7f5ef; --surface:#fffdfa; --surface-2:#e9eee9; --ink:#17251d; --muted:#5d6962; --line:#ced6cf; --accent:#a43d2d; --accent-ink:#fffaf6; --radius:14px; --max:1120px; }
@media (prefers-color-scheme: dark) { :root { --canvas:#121815; --surface:#1b2420; --surface-2:#26322c; --ink:#eef3ef; --muted:#b6c1ba; --line:#3a4941; --accent:#e26a4d; --accent-ink:#1c120f; } }
* { box-sizing:border-box; }
html { scroll-behavior:smooth; }
body { margin:0; background:var(--canvas); color:var(--ink); font-family:"Avenir Next",Avenir,"Segoe UI",sans-serif; line-height:1.6; }
a { color:inherit; }
:focus-visible { outline:3px solid #176f96; outline-offset:3px; }
.site-header { border-bottom:1px solid var(--line); background:color-mix(in srgb,var(--canvas) 94%,transparent); }
.nav { max-width:var(--max); min-height:68px; margin:auto; padding:12px 24px; display:flex; align-items:center; gap:22px; }
.brand { margin-right:auto; display:inline-flex; align-items:center; gap:9px; font:700 24px/1 Georgia,serif; text-decoration:none; letter-spacing:-.03em; }
.brand-mark { width:36px; height:36px; flex:0 0 36px; overflow:hidden; background:url("/assets/brand/entrelibros-logo.png") center top / 40px 40px no-repeat; }
.brand-name { white-space:nowrap; }
.brand span { color:var(--accent); }
.nav a:not(.brand) { font-weight:750; text-decoration:none; }
.nav a:hover { color:var(--accent); }
main { max-width:var(--max); margin:auto; padding:54px 24px 96px; }
.breadcrumbs { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:34px; color:var(--muted); font-size:14px; }
.breadcrumbs a { text-underline-offset:3px; }
.hero { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(260px,.65fr); gap:clamp(36px,8vw,90px); align-items:start; padding-bottom:52px; border-bottom:1px solid var(--line); }
.eyebrow { margin:0 0 12px; color:var(--accent); font-size:13px; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
h1,h2,h3 { text-wrap:balance; }
h1 { max-width:850px; margin:0; font:600 clamp(44px,7vw,76px)/1 Georgia,serif; letter-spacing:-.045em; }
.lead { max-width:700px; margin:22px 0 0; color:var(--muted); font-size:clamp(18px,2vw,22px); }
.facts { display:grid; gap:1px; overflow:hidden; border:1px solid var(--line); border-radius:var(--radius); background:var(--line); }
.page-cover { display:block; width:min(210px,72%); aspect-ratio:2/3; object-fit:contain; margin:0 auto 18px; padding:6px; border-radius:12px; background:var(--surface); box-shadow:0 22px 48px color-mix(in srgb,var(--ink) 18%,transparent); }
.cover-fallback { box-sizing:border-box; display:flex; flex-direction:column; justify-content:space-between; gap:18px; padding:24px; background:linear-gradient(145deg,var(--accent),#6d2d26); color:#fff9ee; }
.cover-fallback span { font-size:11px; font-weight:800; letter-spacing:.14em; text-transform:uppercase; opacity:.8; }
.cover-fallback strong { font:700 26px/1.05 Georgia,serif; }
.cover-fallback small { font-size:13px; opacity:.85; }
.bibliography-groups { display:grid; gap:12px; margin-top:20px; }
.bibliography-group { border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); overflow:hidden; }
.bibliography-group summary { display:flex; justify-content:space-between; align-items:center; gap:18px; padding:17px 19px; cursor:pointer; font-weight:800; }
.bibliography-group summary small { color:var(--muted); font-weight:600; }
.bibliography-group[open] summary { border-bottom:1px solid var(--line); }
.bibliography-group .link-list { padding:10px 18px 18px; }
.page-portrait { margin:0 0 18px; }
.page-portrait img { display:block; width:min(230px,80%); aspect-ratio:4/5; object-fit:cover; margin:auto; border-radius:var(--radius); box-shadow:0 22px 48px color-mix(in srgb,var(--ink) 18%,transparent); }
.page-portrait figcaption { margin:7px auto 0; max-width:230px; color:var(--muted); font-size:11px; text-align:center; }
.page-portrait a { color:inherit; text-underline-offset:2px; }
.portrait-fallback { width:min(230px,80%); aspect-ratio:4/5; display:grid; place-items:center; margin:0 auto; border:1px solid var(--line); border-radius:var(--radius); background:linear-gradient(145deg,var(--surface-2),var(--surface)); color:var(--accent); font:700 54px/1 Georgia,serif; box-shadow:0 22px 48px color-mix(in srgb,var(--ink) 12%,transparent); }
.fact { padding:16px; background:var(--surface); }
.fact small { display:block; color:var(--muted); }
.fact strong { display:block; margin-top:3px; }
.work-hero { display:grid; grid-template-columns:minmax(180px,230px) minmax(0,1fr) minmax(280px,330px); gap:clamp(28px,4vw,54px); align-items:start; padding-bottom:46px; }
.work-cover-column { margin:0; }
.work-cover { display:block; width:100%; aspect-ratio:2/3; object-fit:contain; border-radius:12px; background:var(--surface); box-shadow:0 24px 54px color-mix(in srgb,var(--ink) 18%,transparent); }
.work-cover-column figcaption { margin-top:12px; color:var(--muted); font-size:12px; line-height:1.45; text-align:center; }
.work-cover-column figcaption a { text-underline-offset:3px; }
.work-intro h1 { font-size:clamp(42px,6vw,72px); }
.work-byline { margin:15px 0 0; color:var(--muted); font-size:19px; }
.work-byline a { color:var(--ink); font-weight:800; text-underline-offset:4px; }
.work-tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:22px; }
.work-tags a,.work-tags span { padding:7px 11px; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--muted); font-size:13px; font-weight:750; text-decoration:none; }
.work-tags a:hover { border-color:var(--accent); color:var(--accent); }
.library-panel { display:grid; gap:15px; padding:22px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:0 18px 42px color-mix(in srgb,var(--ink) 8%,transparent); }
.library-panel h2 { margin:-7px 0 2px; font:650 25px/1.1 Georgia,serif; letter-spacing:-.025em; }
.library-panel label,.library-panel legend { display:block; margin-bottom:5px; font-size:13px; font-weight:800; }
.library-panel input,.library-panel select,.library-panel textarea { width:100%; padding:10px 11px; border:1px solid var(--line); border-radius:9px; background:var(--canvas); color:var(--ink); font:inherit; }
.library-panel textarea { resize:vertical; }
.library-panel fieldset { display:grid; gap:7px; margin:0; padding:0; border:0; }
.list-check { display:flex!important; align-items:center; gap:8px; margin:0!important; font-weight:650!important; }
.list-check input { width:auto; }
.form-hint,.save-status { margin:0; color:var(--muted); font-size:12px; }
.new-list-row > div { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.new-list-row .button { padding:9px 12px; }
.work-meta { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); margin:0; border-block:1px solid var(--line); }
.work-meta > div { min-width:0; padding:18px 16px; border-left:1px solid var(--line); }
.work-meta > div:first-child { border-left:0; padding-left:0; }
.work-meta dt { color:var(--muted); font-size:12px; }
.work-meta dd { margin:3px 0 0; font-weight:850; }
.work-content { padding-top:46px; }
.identity-block { padding:21px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.identity-block h2 { margin-top:0; }
.identity-block p:last-child { margin-bottom:0; }
.edition-grid { display:grid; gap:10px; margin-top:22px; }
.edition-card { display:grid; grid-template-columns:64px minmax(0,1fr); gap:14px; align-items:center; padding:12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.edition-card img { width:64px; height:96px; object-fit:contain; background:var(--canvas); border-radius:5px; }
.edition-card strong,.edition-card span,.edition-card a { display:block; }
.edition-card span { color:var(--muted); font-size:13px; }
.edition-card a { margin-top:5px; color:var(--accent); font-size:12px; font-weight:800; }
.cover-missing,.cover-unavailable { width:100%; aspect-ratio:2/3; display:flex; flex-direction:column; justify-content:center; gap:8px; padding:24px; border:1px dashed var(--line); border-radius:12px; background:var(--surface-2); color:var(--muted); text-align:center; }
.cover-missing strong,.cover-unavailable strong { color:var(--ink); }
.cover-missing span,.cover-unavailable small { font-size:12px; }
.page-toast { position:fixed; z-index:20; right:18px; bottom:18px; max-width:min(360px,calc(100vw - 36px)); padding:12px 16px; border-radius:12px; background:var(--ink); color:var(--canvas); font-weight:800; opacity:0; transform:translateY(14px); pointer-events:none; transition:.2s ease; }
.page-toast.is-visible { opacity:1; transform:translateY(0); }
.community-section { display:grid; grid-template-columns:minmax(220px,.7fr) minmax(280px,1.3fr); gap:26px 54px; margin-top:68px; padding-top:46px; border-top:1px solid var(--line); }
.community-section h2 { margin:0; font:600 clamp(30px,4vw,42px)/1.05 Georgia,serif; letter-spacing:-.035em; }
.community-section > div:first-child p:last-child { color:var(--muted); }
.community-section [data-comment-composer] { align-self:end; }
.community-section form { display:grid; gap:10px; padding:18px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); }
.community-section textarea { min-height:96px; padding:11px; border:1px solid var(--line); border-radius:9px; background:var(--canvas); color:var(--ink); font:inherit; resize:vertical; }
.spoiler-check { display:flex; align-items:center; gap:8px; font-size:13px; }
.comment-list { grid-column:2; display:grid; gap:10px; }
.comment { padding:17px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.comment > div { display:flex; justify-content:space-between; gap:14px; }
.comment time { color:var(--muted); font-size:12px; }
.comment p { margin:10px 0 0; }
.comment details { margin-top:10px; }
.comment summary { color:var(--accent); cursor:pointer; font-weight:800; }
.content { display:grid; grid-template-columns:minmax(0,1fr) 270px; gap:clamp(40px,8vw,90px); padding-top:52px; }
.prose { max-width:720px; }
.prose h2,.related h2 { margin:44px 0 12px; font:600 clamp(28px,4vw,40px)/1.1 Georgia,serif; letter-spacing:-.03em; }
.prose h2:first-child { margin-top:0; }
.idea-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:22px 0; }
.idea { padding:18px; border-radius:var(--radius); background:var(--surface-2); }
.idea strong { display:block; margin-bottom:5px; }
.source { margin-top:34px; padding:18px; border-left:3px solid var(--accent); background:var(--surface); }
.source a { color:var(--accent); font-weight:800; text-underline-offset:3px; }
.related { align-self:start; position:sticky; top:24px; }
.related h2 { margin-top:0; font-size:28px; }
.link-list { display:grid; gap:10px; }
.link-card { display:block; padding:14px; border:1px solid var(--line); border-radius:12px; background:var(--surface); text-decoration:none; }
.link-card:hover { border-color:var(--accent); transform:translateY(-2px); }
.link-card small { display:block; color:var(--muted); }
.cta-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:28px; }
.button { display:inline-flex; justify-content:center; padding:11px 16px; border:1px solid var(--accent); border-radius:999px; background:var(--accent); color:var(--accent-ink); font-weight:800; text-decoration:none; }
.button.secondary { border-color:var(--line); background:var(--surface); color:var(--ink); }
.index-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:34px; }
.index-card { min-height:180px; display:flex; flex-direction:column; padding:20px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); text-decoration:none; }
.index-card:hover { border-color:var(--accent); transform:translateY(-3px); }
.index-card h2,.index-card h3 { margin:0 0 8px; font-family:Georgia,serif; }
.index-card p { margin:0 0 18px; color:var(--muted); }
.index-card small { margin-top:auto; color:var(--accent); font-weight:800; }
.index-card.has-image { min-height:0; display:grid; grid-template-columns:96px minmax(0,1fr); gap:16px; align-items:stretch; }
.index-card.has-image > img { width:96px; height:144px; object-fit:cover; border-radius:10px; background:var(--soft); box-shadow:0 8px 22px rgba(25,48,38,.12); }
.index-card.has-image > div { min-width:0; display:flex; flex-direction:column; }
.author-index-card > img { width:84px; height:104px; border-radius:12px; object-position:center top; }
.author-index-card { grid-template-columns:84px minmax(0,1fr)!important; }
.author-index-card p { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.custom-edition-panel { grid-column:1/-1; border:1px solid var(--line); border-radius:12px; background:var(--soft); padding:13px 15px; }
.custom-edition-panel summary { cursor:pointer; font-weight:850; color:var(--accent); }
.custom-edition-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.custom-edition-fields > p,.custom-edition-fields > button { grid-column:1/-1; }
.custom-edition-fields label { display:grid; gap:6px; font-weight:800; font-size:13px; }
.custom-edition-fields input { width:100%; border:1px solid var(--line); border-radius:9px; padding:10px 11px; color:var(--ink); background:var(--surface); }
.guide-list { display:grid; gap:12px; margin-top:28px; }
.guide-entry { display:grid; grid-template-columns:42px minmax(0,1fr); gap:16px; padding:20px 0; border-top:1px solid var(--line); }
.guide-entry > span { width:36px; height:36px; display:grid; place-items:center; border-radius:50%; background:var(--surface-2); color:var(--accent); font-weight:900; }
.guide-entry h2 { margin:0 0 8px; font-size:28px; }
.guide-entry p { margin:0 0 10px; color:var(--muted); }
.guide-entry small { color:var(--muted); }
.guide-entry img { float:left; width:72px; height:108px; margin:0 14px 10px 0; border-radius:8px; object-fit:cover; background:var(--surface-2); box-shadow:var(--shadow); }
.guide-entry > div::after { display:block; clear:both; content:""; }
.topic-author { margin:52px 0 0; padding-top:30px; border-top:1px solid var(--line); }
.topic-author h2 { margin:0 0 10px; }
.topic-author h2 a { color:inherit; text-decoration-thickness:1px; text-underline-offset:5px; }
.topic-author > p { max-width:68ch; color:var(--muted); }
.collection-author { margin:52px 0 0; padding-top:30px; border-top:1px solid var(--line); }
.collection-author h2,.catalog-author h2,.alpha-section h2 { margin:0 0 12px; font:600 clamp(28px,4vw,40px)/1.1 Georgia,serif; letter-spacing:-.03em; }
.collection-author h2 a,.catalog-author h2 a { text-decoration-thickness:1px; text-underline-offset:5px; }
.collection-author > p { max-width:68ch; color:var(--muted); }
.alphabet-nav { display:flex; gap:8px; overflow-x:auto; margin:30px 0 48px; padding:4px 0 12px; scrollbar-width:thin; }
.alphabet-nav a { min-width:38px; height:38px; display:grid; place-items:center; border:1px solid var(--line); border-radius:999px; background:var(--surface); color:var(--ink); font-weight:850; text-decoration:none; }
.alphabet-nav a:hover { border-color:var(--accent); color:var(--accent); }
.alpha-section { margin-top:58px; scroll-margin-top:24px; }
.index-grid.compact { grid-template-columns:repeat(2,minmax(0,1fr)); }
.index-grid.compact .index-card { min-height:150px; }
.author-catalog { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:48px 28px; margin-top:54px; }
.catalog-author { min-width:0; }
.catalog-author .link-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
.guide-entry small a { color:var(--accent); font-weight:800; }
footer { max-width:var(--max); margin:auto; padding:28px 24px 52px; border-top:1px solid var(--line); color:var(--muted); }
@media (prefers-reduced-motion:no-preference) { .link-card,.index-card { transition:transform .2s ease,border-color .2s ease; } .hero { animation:enter .45s ease both; } @keyframes enter { from { opacity:0; transform:translateY(12px); } } }
@media (max-width:540px) { .custom-edition-fields { grid-template-columns:1fr; } }
@media (max-width:960px) { .work-hero { grid-template-columns:180px minmax(0,1fr); } .library-panel { grid-column:1/-1; grid-template-columns:repeat(2,minmax(0,1fr)); } .library-panel > .eyebrow,.library-panel > h2,.library-panel > button,.library-panel > .save-status { grid-column:1/-1; } .work-meta { grid-template-columns:repeat(3,minmax(0,1fr)); } .work-meta > div:nth-child(4) { border-left:0; } }
@media (max-width:800px) { .nav { flex-wrap:nowrap; overflow-x:auto; gap:16px; scrollbar-width:thin; } .nav .brand { position:sticky; left:0; padding-right:10px; background:var(--canvas); } .hero,.content,.community-section { grid-template-columns:1fr; } .comment-list { grid-column:auto; } .related { position:static; } .index-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .author-catalog { grid-template-columns:1fr; } }
@media (max-width:540px) { main { padding:34px 16px 64px; } .nav { padding:12px 16px; } .nav a:not(.brand) { font-size:14px; } .idea-grid,.index-grid,.index-grid.compact,.catalog-author .link-list { grid-template-columns:1fr; } h1 { font-size:44px; } .work-hero { grid-template-columns:1fr; } .work-cover-column { width:min(190px,62vw); margin:0 auto; } .library-panel { grid-column:auto; grid-template-columns:1fr; padding:18px; } .work-meta { grid-template-columns:repeat(2,minmax(0,1fr)); } .work-meta > div { border-left:0; border-top:1px solid var(--line); padding:14px 10px; } .work-meta > div:first-child { border-top:0; padding-left:10px; } }
