:root {
  --ink:#1a1813;
  --near:#251f16;
  --paper:#f7f3ea;
  --white:#fffdf8;
  --gold:#d8ba7e;
  --bronze:#795c27;
  --soft:#645c4e;
  --line:#d9ceb9;
  --serif:"Palatino Linotype","Book Antiqua",Palatino,Georgia,serif;
  --sans:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --anim:180ms ease;
}
* { box-sizing:border-box }
[hidden] { display:none !important }
html { scroll-behavior:smooth; scroll-padding-top:84px; }
body { background:var(--paper);color:var(--ink);font:1rem/1.65 var(--sans);margin:0; }
a { color:inherit }
:focus-visible { outline:2px solid #a87b30; outline-offset:4px }
img { display:block; max-width:100%; }
input,select,textarea,button { font:inherit }
button,summary,select { cursor:pointer }
svg { width:1.35rem;height:1.35rem;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round; }
h1,h2,h3 { font-family:var(--serif);font-weight:400;line-height:1.03;letter-spacing:-.045em;margin:0;text-wrap:balance; }
h1 { font-size:clamp(3.15rem,7vw,7.25rem) }
h2 { font-size:clamp(2.5rem,5.1vw,5rem) }
h3 { font-size:clamp(1.75rem,3vw,2.8rem) }
p { margin:0 }
h2 em { color:var(--bronze);font-weight:400 }
.prose { white-space:pre-line;overflow-wrap:anywhere }
.shell { width:min(1240px,calc(100% - 112px));margin-inline:auto; }
.section { padding-block:clamp(64px,8vw,115px); }
.skip { position:fixed;top:1rem;left:1rem;z-index:20;padding:.85rem;background:var(--white);transform:translateY(-150%); }
.skip:focus { transform:none }
.sr-only,.trap { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0; }
.header { position:sticky;top:0;z-index:10;background:#171612;color:var(--white);border-bottom:1px solid #665434; }
.header-inner,.footer-grid { min-height:84px;display:flex;align-items:center;justify-content:space-between;gap:1.4rem; }
.brand { display:inline-flex;align-items:center;gap:.73rem;text-decoration:none;flex:none; }
.brand img { width:48px;height:48px }
.brand b,.brand small { display:block }
.brand b { font:1.6rem/.95 var(--serif);letter-spacing:-.04em }
.brand small { margin-top:.4rem;color:var(--gold);font-size:.7rem;line-height:1;text-transform:uppercase;letter-spacing:.29em; }
.header nav { display:flex;align-items:center;gap:clamp(.7rem,2.4vw,2rem); }
.header nav a { text-decoration:none;font-size:.9rem;white-space:nowrap; }
.header nav a:not(.button) { padding-block:.65rem;color:#ede6d8; }
.header nav a:not(.button):hover,.footer-links a:hover { color:var(--gold) }
.menu-toggle { display:none;min-height:44px;border:1px solid #8e7750;background:none;color:var(--white);padding:.4rem .8rem; }
.menu-toggle span { margin-left:.35rem }
.button { min-height:49px;display:inline-flex;align-items:center;justify-content:center;gap:.65em;text-align:center;padding:.63rem 1.23rem;text-decoration:none;font-size:.9rem;font-weight:680;border:1px solid transparent;transition:background var(--anim),color var(--anim),border-color var(--anim),transform var(--anim); }
.button:not(:disabled):hover { transform:translateY(-2px) }
.button:disabled { opacity:.72;cursor:wait }
.gold { color:#20180e;background:var(--gold);border-color:var(--gold); }
.gold:hover { background:#f0d59a;border-color:#f0d59a; }
.dark { color:#fff9ed;background:var(--ink);border-color:var(--ink); }
.dark:hover { background:#4a3a25; }
.gold-outline { color:#f0d8a5;border-color:#937c4b; }
.gold-outline:hover { background:#493a24 }
.light-outline { color:#fff8e7;border-color:#d7c6a2; }
.light-outline:hover { background:#ffffff1c; }
.hero { position:relative;display:grid;align-content:center;min-height:clamp(535px,calc(82svh - 55px),780px);background-color:#19140e;background-image:linear-gradient(90deg,#15120eef 0%,#15120ebf 32%,#15120e36 71%),linear-gradient(0deg,#15120eac 0%,transparent 30%),url("/assets/biblioteca.webp");background-size:cover;background-position:center,center,center 55%;color:var(--white); }
.hero-content { padding-block:70px 112px;position:relative;animation:arrive .65s ease both; }
@keyframes arrive { from { opacity:0;transform:translateY(11px) } to { opacity:1;transform:none } }
.hero h1 { max-width:13ch;color:#fffaf0;font-size:clamp(3.5rem,7.4vw,7.3rem);line-height:.99; }
.hero h1 em { color:#e4c78e }
.hero p { margin:1.5rem 0 1.9rem;color:#f3e9d8;max-width:43ch;font-size:clamp(1rem,1.65vw,1.23rem); }
.actions { display:flex;flex-wrap:wrap;gap:.8rem }
.section-head { margin-bottom:clamp(1.6rem,4vw,2.65rem); }
.section-head>p:not(.eyebrow) { max-width:49ch;color:var(--soft);margin-top:1.35rem; }
.eyebrow { display:flex;gap:.85rem;align-items:center;margin:0 0 1rem;color:var(--bronze);letter-spacing:.19em;text-transform:uppercase;font-size:.83rem;font-weight:700; }
.eyebrow span { width:32px;height:1px;background:currentColor }
.filters { display:grid;grid-template-columns:minmax(0,1fr) minmax(155px,.38fr) auto;gap:.65rem;align-items:start;margin-bottom:1.45rem; }
.filters input,.filters select { width:100%;height:49px;border:1px solid var(--line);border-radius:0;background:var(--white);color:var(--ink);padding:.55rem .85rem; }
.filters select { padding-right:2.3rem;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 20 20' fill='none' stroke='%23795c27' stroke-width='1.8'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .85rem center; }
.search-field { position:relative }
.search-field svg { position:absolute;top:.85rem;left:.9rem;color:var(--bronze);pointer-events:none }
.search-field input { padding-left:2.85rem }
.results-count { grid-column:1/-1;color:var(--soft);font-size:.9rem; }
.catalog-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,255px),1fr));gap:1.25rem; }
.book-card,.news-card { display:grid;align-content:start;background:var(--white);border:1px solid var(--line);min-width:0;transition:box-shadow var(--anim),border-color var(--anim); }
.book-card:hover,.news-card:hover { border-color:#b29565;box-shadow:0 14px 35px #32241413; }
.cover { position:relative;display:grid;place-items:center;min-height:280px;overflow:hidden;background:radial-gradient(ellipse at 50% 30%,#4c3924,#1e1810 82%); }
.cover img { width:auto;height:235px;object-fit:contain;box-shadow:0 14px 26px #0009;transition:transform 300ms ease; }
.cover:hover img { transform:scale(1.045) }
.cover>span { position:absolute;right:.75rem;bottom:.5rem;color:#e6cb96 }
.no-image { display:grid;place-items:center;background:#352c20;color:var(--gold);min-height:150px;width:100%; }
.no-image svg { width:3.5rem;height:3.5rem }
.book-card-copy,.news-card>div:not(.no-image) { padding:1.25rem }
.category { color:var(--bronze);font-size:.78rem;letter-spacing:.12em;font-weight:680;text-transform:uppercase;margin-bottom:.55rem; }
.book-card h3 { font-size:1.95rem }
.book-card h3 a { text-decoration:none }
.book-card h3 a:hover { text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.18em }
.byline { color:var(--bronze);margin:.42rem 0 .65rem }
.book-card-copy>p:last-of-type,.news-card .prose { color:var(--soft); }
.book-card-copy>p:last-of-type { display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden }
.book-meta { border-top:1px solid var(--line);margin-top:1rem;padding-top:.65rem;display:flex;justify-content:space-between;align-items:center;gap:.6rem;flex-wrap:wrap;font-size:.88rem;font-weight:650; }
.text-link { display:inline-flex;gap:.45rem;align-items:center;min-height:39px;color:var(--bronze);font-weight:680;text-decoration-thickness:1px;text-underline-offset:.25em; }
.text-link:hover { color:var(--ink) }
.empty { padding:1rem 0;color:var(--soft) }
.about { background:#ede4d4;border-block:1px solid var(--line) }
.split { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(2rem,7vw,7rem);align-items:center; }
.about .section-head,.submission .section-head,.contact .section-head { margin:0 }
.about-visual { min-height:440px;height:100%;background:#30261a url("/assets/biblioteca-detalle.webp") center/cover;position:relative; }
.about-visual::after { content:"";position:absolute;inset:13px;border:1px solid #e9ca895e;pointer-events:none }
.values { margin:1.5rem 0 0;border-top:1px solid #cdbd9e }
.values div { display:grid;grid-template-columns:110px 1fr;gap:.7rem;padding:.7rem 0;border-bottom:1px solid #cdbd9e }
.values dt { font-weight:700 }
.values dd { margin:0;color:var(--soft); }
.authors { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr));gap:1.2rem; }
.author-card { display:grid;grid-template-columns:minmax(110px,.47fr) 1fr;align-items:center;gap:clamp(1rem,4vw,3.6rem);max-width:760px; }
.author-image { width:100%;aspect-ratio:1 / 1.12;object-fit:cover;object-position:top; }
.author-card p,.news-card .prose { margin:.75rem 0;color:var(--soft) }
.author-book-links { display:flex;flex-wrap:wrap;gap:.15rem 1rem;margin:.5rem 0 0;padding:0;list-style:none; }
.author-profile--featured { grid-column:1/-1; }
.author-works { margin-top:clamp(2rem,5vw,4rem);padding-top:clamp(1.35rem,3vw,2rem);border-top:1px solid var(--line); }
.author-works h4 { margin:0 0 1.1rem;font:400 clamp(1.7rem,3.5vw,2.55rem)/1.12 var(--serif);letter-spacing:-.03em; }
.author-works-grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,215px),1fr));gap:clamp(.8rem,2vw,1.4rem);max-width:1040px; }
.author-work { min-width:0;margin:0;background:var(--white);border:1px solid var(--line); }
.author-work a { display:block;background:#ede4d4;transition:background var(--anim); }
.author-work a:hover { background:#ddceb1; }
.author-work img { width:100%;height:auto;aspect-ratio:2/3;object-fit:contain; }
.author-work figcaption { display:grid;gap:.22rem;padding:.85rem 1rem;color:var(--soft);font-size:.92rem; }
.author-work figcaption strong { color:var(--ink);font-size:1rem; }
.author-work ul { margin:.25rem 0 0;padding-left:1.2rem; }
.submission { background:#221d16;color:var(--white); }
.submission h2 em,.submission .eyebrow { color:var(--gold) }
.submission .section-head>p:not(.eyebrow) { color:#efdfc8 }
.site-form { display:grid;gap:.85rem;position:relative; }
.site-form label { font-size:.91rem;font-weight:650 }
.site-form label input,.site-form textarea,.site-form select { display:block;width:100%;min-width:0;border:1px solid #c7b99f;border-radius:0;margin-top:.3rem;padding:.62rem .75rem;background:var(--white);color:var(--ink);font-weight:400; }
.site-form textarea { resize:vertical }
.site-form input[type=file] { padding:.52rem .55rem; }
.file-label span { color:#f0d9aa;font-size:.85rem;font-weight:400;margin-left:.35rem; }
.form-row { display:grid;grid-template-columns:1fr 1fr;gap:.75rem; }
.site-form .button { justify-self:start }
.form-note { color:var(--soft);font-size:.84rem; }
.submission .form-note { color:#ead9be }
.form-status:empty { display:none }
.success,.error { padding:.65rem .9rem;line-height:1.5;border-left:3px solid; }
.success { color:#26543e;background:#e2efe5 }
.error { color:#782f2c;background:#f4e3df }
.news-grid { display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,305px),1fr));gap:1.15rem; }
.news-image { width:100%;aspect-ratio:16 / 10;object-fit:cover;object-position:center 35%; }
.news-card h3 { font-size:1.9rem }
.contact { background:#eee6d9;border-top:1px solid var(--line); }
.socials { display:grid;margin-top:1.4rem;max-width:440px;border-top:1px solid #cdbd9e; }
.socials a { min-height:50px;border-bottom:1px solid #cdbd9e;display:flex;align-items:center;gap:.7rem;text-decoration:none;font-weight:650; }
.socials a:hover { color:var(--bronze) }
.socials a span { margin-left:auto;font-weight:400;color:var(--bronze); }
.footer { background:#171612;color:#f0e9da; }
.footer-grid { min-height:116px }
.footer-links { display:flex;flex-wrap:wrap;gap:1rem; }
.footer-links a,.footer p { font-size:.87rem;text-underline-offset:.3em; }
.footer p { color:#decda9 }
.floating { position:fixed;right:clamp(14px,2.2vw,34px);bottom:clamp(14px,2.2vw,34px);z-index:5;display:grid;place-items:center;width:55px;height:55px;border-radius:50%;background:#204b38;color:#fffdf6;box-shadow:0 5px 19px #1116;transition:background var(--anim),transform var(--anim); }
.floating:hover { transform:translateY(-3px);background:#2c644c }
.floating svg { width:27px;height:27px }
.book-detail .back { margin-bottom:1.65rem }
.book-detail h1,.info h1,.administration h1 { font-size:clamp(2.8rem,6vw,5.9rem) }
.detail-photo { display:grid;place-items:center;background:#251d12;padding:clamp(.8rem,3vw,2.1rem) }
.detail-photo img { max-height:520px;width:auto;object-fit:contain }
.book-detail p,.info p { margin-top:1rem }
.subtitle { font:italic 1.4rem var(--serif);color:var(--bronze) }
.detail-price { font-weight:700;margin-bottom:1rem; }
.info a { margin-top:1.2rem; }
.administration { max-width:920px; }
.administration>p { margin:.7rem 0 1rem; }
.admin-tabs { display:flex;flex-wrap:wrap;gap:.5rem;margin:1.3rem 0; }
.admin-tabs a { padding:.58rem .9rem;border:1px solid var(--line);text-decoration:none; }
.admin-tabs a[aria-current] { background:var(--ink);color:var(--white) }
.admin-item { border:1px solid var(--line);background:var(--white);margin:.65rem 0; }
.admin-item summary { padding:.85rem 1rem;font-weight:700; }
.admin-item summary span + span { margin-left:1rem;color:var(--bronze);font-size:.85rem; }
.admin-form,.delete-form,.inbox-detail { padding:.5rem 1rem 1rem; }
.admin-form { grid-template-columns:1fr 1fr; }
.admin-form label:has(textarea) { grid-column:1/-1 }
.danger { background:#f4e3df;color:#782f2c }
.danger:hover { background:#ecd0c9 }
@media(max-width:1050px) {
  .shell { width:calc(100% - 76px) }
  .header nav { gap:1rem }
  .header .button { padding-inline:.7rem }
}
@media(max-width:860px) {
  .shell { width:calc(100% - 52px) }
  .header-inner { min-height:72px;flex-wrap:wrap;gap:0; }
  html { scroll-padding-top:72px; }
  .has-menu .menu-toggle { display:inline-flex;align-items:center }
  .header nav { width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start;gap:.5rem 1.15rem;padding-block:.4rem 1rem; }
  .has-menu .menu-toggle[aria-expanded="false"]+nav { display:none }
  .hero { min-height:565px; }
  .footer-grid { flex-wrap:wrap;padding-block:1rem;justify-content:flex-start; }
}
@media(max-width:610px) {
  .shell { width:calc(100% - 36px) }
  .split { grid-template-columns:1fr }
  .hero { min-height:540px;background-position:center,center,59% 50%;background-image:linear-gradient(90deg,#14110ed9,#14110e55),linear-gradient(0deg,#14110ede 0%,transparent 79%),url("/assets/biblioteca.webp"); }
  .hero-content { padding-block:65px 95px; }
  .hero p { max-width:30ch }
  .hero h1 { font-size:clamp(3.35rem,12vw,5.25rem) }
  .about-visual { order:2;min-height:255px; }
  .filters { grid-template-columns:minmax(0,1fr) auto }
  .search-field { grid-column:1/-1 }
  .catalog-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr)) }
  .author-card { grid-template-columns:1fr;max-width:410px }
  .author-image { aspect-ratio:1.2 }
  .form-row,.admin-form { grid-template-columns:1fr }
  .footer-grid { gap:1rem 1.5rem }
  .footer p { width:100% }
  .values div { grid-template-columns:90px 1fr }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto }
  *,*::before,*::after { animation:none !important;transition:none !important }
}
