:root{--forest:#203f36;--mast:#1d3832;--ink:#28382e;--muted:#626b60;--gold:#aa794d;--line:#dcded3;--paper:#fcfbf6;--soft:#f3f2e9;--serif:'Baskervville',Georgia,'Times New Roman',serif;--sans:'DM Sans',Arial,sans-serif}
*{box-sizing:border-box}html,body{margin:0;height:100%;overflow:hidden}body{font:16px/1.46 var(--sans);color:var(--ink);background:var(--paper)}button,input,select{font:inherit;color:inherit}button,select{cursor:pointer}button{background:transparent;border:0}button:focus-visible,input:focus-visible,select:focus-visible,[tabindex]:focus-visible,a:focus-visible{outline:3px solid #bd843e;outline-offset:2px}button:disabled{opacity:.38;cursor:default}button:focus:not(:focus-visible){outline:none}button,a{-webkit-tap-highlight-color:transparent}[hidden]{display:none!important}i[data-icon]{display:inline-grid;place-items:center;width:18px;height:18px;flex:none}i svg{display:block;width:100%;height:100%}
.mast{height:68px;background:var(--mast);display:flex;align-items:center;padding:0 29px 0 24px;color:#fbf8eb;gap:21px;border-bottom:1px solid #ab9877;position:relative;z-index:3}.brand{display:flex;align-items:center;gap:13px;font:500 26px/1 var(--serif);white-space:nowrap;letter-spacing:-.8px}.brand img{width:40px;height:40px}.mast-divider{height:21px;width:1px;background:#52665c}.author{font-size:14px;color:#d9dfd1}.mast-actions{margin-left:auto;display:flex;gap:14px}.header-link{display:flex;align-items:center;gap:8px;color:#e9ebdf;padding:7px 9px;border-radius:5px;font-size:14px}.header-link:hover{background:#344c42}.header-link i{color:#d9c4a0}
#workspace{height:calc(100% - 68px);display:grid;grid-template-columns:clamp(338px,28.6vw,425px) minmax(0,1fr)}.side{position:relative;z-index:2;background:var(--paper);border-right:1px solid #bfc4b4;min-height:0;box-shadow:2px 0 10px #494b2c10;min-width:0;display:flex;flex-direction:column}.side-page{min-height:0;flex:1;display:flex;flex-direction:column}.hero{background:#eee9d8;position:relative;isolation:isolate;overflow:hidden;min-height:162px;display:flex;align-items:center;border-bottom:1px solid #d9d5c4}.etching{position:absolute;inset:0 6px 0 auto;width:clamp(80px,8vw,118px);z-index:-1;background-image:url('./assets/empecinado.webp');background-repeat:no-repeat;background-size:auto 150%;background-position:left 60%;mix-blend-mode:multiply;opacity:.95;mask-image:linear-gradient(to right,transparent,#000 12%)}.hero-inner{padding:25px 0 24px 25px}.person,.life,.label,.period-label,.section-label{font-weight:600;letter-spacing:.13em;text-transform:uppercase;font-size:12px}.person{color:#5b6251}.hero h1{font:500 clamp(38px,3.35vw,53px)/1.04 var(--serif);letter-spacing:-2.1px;margin:7px 0 14px;white-space:nowrap;color:#263d32;text-shadow:0 0 8px #efebd8}.life{display:flex;align-items:center;gap:9px;color:#675740;letter-spacing:.14em}.life span{height:1px;width:25px;background:#ac8657}.index-top{padding:21px 23px 16px;border-bottom:1px solid var(--line)}.row-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:14px}h2{font:500 27px/1.15 var(--serif);margin:0;letter-spacing:-.6px}#count{font-size:13px;color:#647061}.search{border:1px solid #ccd1c4;background:#fffefa;height:40px;border-radius:6px;display:flex;gap:9px;align-items:center;padding:0 12px}.search:focus-within{outline:2px solid #829c86}.search i{color:#657765}.search input{width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:14px}.search input:focus-visible{outline:0}.filters{display:flex;gap:8px;margin-top:9px}.filters label{max-width:calc(52% - 4px);flex:1;min-width:0;border:1px solid #d4d8cb;background:#f6f6ee;border-radius:5px;display:flex;align-items:center;position:relative;padding:0 7px;gap:5px}.filters label>i{width:14px;height:14px;color:#596652;pointer-events:none}.filters label>i:last-child{position:absolute;right:6px;width:12px}.filters select{width:100%;min-width:0;appearance:none;font-size:13px;line-height:1.3;padding:8px 14px 8px 0;border:0;outline:0;background:transparent;text-overflow:ellipsis}.filters label:focus-within{outline:2px solid #829c86}
.scroll,.detail-scroll{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#bec4b6 transparent}.period-head{display:flex;align-items:baseline;justify-content:space-between;gap:7px;padding:12px 24px 10px;background:#f1f1e7;border-bottom:1px solid #e0e1d5;border-top:1px solid #e0e1d5}.period-head:first-child{border-top:0}.period-label{font-size:11px;letter-spacing:.11em;color:#4a614f}.period-years{white-space:nowrap;font-size:12px;color:#68735f}.event{display:flex;gap:11px;width:100%;text-align:left;align-items:flex-start;padding:14px 22px 14px 24px;position:relative;border-bottom:1px solid #e8e9de;background:var(--paper)}.event:hover,.event:focus-visible{background:#f0f2e8}.event:hover .item-arrow{transform:translateX(2px);color:#466952}.event .details{display:flex;flex-direction:column;min-width:0;flex:1}.event .meta{font-size:12px;color:#646c60;line-height:1.3;white-space:normal}.event .name{font:500 19px/1.25 var(--serif);margin:3px 0 0;letter-spacing:-.4px}.event .item-arrow{align-self:center;color:#899383;width:13px;height:13px}.ink{color:var(--event-color);background:var(--tint);width:30px;height:30px;display:grid;place-items:center;flex:none;border-radius:50%;margin-top:3px}.ink i{width:15px;height:15px}.personal{--event-color:#a46236;--tint:#f4e9da}.action{--event-color:#973f34;--tint:#f2e2da}.travel{--event-color:#386b61;--tint:#e0ebe2}.public{--event-color:#536680;--tint:#e5e9ec}.empty{padding:25px;color:var(--muted)}.empty p{margin:0 0 15px}
.map-pane{position:relative;isolation:isolate;background:#cbd6cb;min-width:0;min-height:0}.map-pane #map{position:absolute;inset:0;touch-action:none}#map:focus-visible{outline-offset:-3px}.map-top{position:absolute;inset:17px 18px auto 17px;display:flex;align-items:flex-start;justify-content:space-between;gap:10px;pointer-events:none;z-index:3}.map-status,.layers,.map-tools>*,.legend-wrap{background:#fdfcf5f7;border:1px solid #bfc4b4;border-radius:7px;box-shadow:0 2px 8px #33473420}.map-status{display:flex;align-items:center;gap:7px;line-height:1.2;padding:10px 12px;color:#3e5242;font-size:13px;font-weight:600;max-width:45%}.map-status i{width:16px;height:16px;color:#637f64}.layers{display:flex;pointer-events:auto;padding:3px;align-items:stretch;gap:2px}.layers button{display:flex;align-items:center;border-radius:4px;gap:6px;padding:8px 10px;font-size:13px;line-height:1.2}.layers button[aria-pressed=true]{background:var(--forest);color:#f9f9ee}.layers button:hover:not([aria-pressed=true]){background:var(--soft)}.layers button i{width:15px;height:15px}.map-tools{position:absolute;right:18px;top:78px;display:flex;flex-direction:column;gap:9px;z-index:2}.map-tools>div{display:grid;overflow:hidden}.map-tools button,.icon-button{height:37px;width:37px;display:grid;place-items:center}.map-tools>button{height:39px;width:39px}.map-tools button+button{border-top:1px solid #d0d5c9}.map-tools button:hover,.legend-toggle:hover,.icon-button:hover{background:#eaede2}.map-tools i{width:18px;height:18px}.legend-wrap{position:absolute;bottom:32px;left:17px;z-index:2;overflow:hidden}.legend-toggle{width:100%;display:flex;align-items:center;gap:8px;padding:8px 12px;font-size:13px;font-weight:600;text-align:left;color:var(--forest)}.legend-toggle i{width:15px;height:15px}.legend-toggle i:last-child{margin-left:auto}.legend-toggle[aria-expanded=false] i:last-child{transform:rotate(180deg)}.legend-grid{display:grid;grid-template-columns:1fr 1fr;gap:5px 13px;padding:0 12px 12px;font-size:12px}.legend-grid span{display:flex;align-items:center;gap:7px;white-space:nowrap}.dot{width:8px;height:8px;border-radius:50%;display:inline-block;background:var(--event-color);flex:none}
.detail-head{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:12px 17px;background:#f2f3e9}.back,.plain,.small-btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:14px;line-height:1.35;padding:6px 7px;color:var(--forest)}.back:hover,.plain:hover{text-decoration:underline}.detail-head .serial{color:var(--muted);font-size:12px;letter-spacing:.05em}.detail-scroll{padding:25px 25px 18px}.detail-scroll h2{font-size:32px;line-height:1.12;overflow-wrap:anywhere;margin:10px 0 12px;letter-spacing:-1px}.category{font-size:12px;display:inline-flex;gap:7px;align-items:center;color:var(--event-color);border-radius:4px;background:var(--tint);padding:4px 8px;font-weight:600}.category i{width:14px;height:14px}.detail-date{display:flex;align-items:center;gap:8px;color:var(--muted);line-height:1.4;font-size:14px;margin:8px 0}.detail-date i{width:15px;height:15px}.detail-scroll .intro{font:400 20px/1.48 var(--serif);color:#28352a;margin:19px 0}.detail-scroll p{font-size:15px;line-height:1.55}.detail-block{border-top:1px solid var(--line);padding:16px 0 0;margin-top:17px}.detail-block h3,.section-label{font-size:12px;text-transform:uppercase;letter-spacing:.10em;font-weight:700;color:#52654f;margin:0 0 9px}.anchor-list{display:flex;flex-wrap:wrap;gap:6px;margin:7px 0}.anchor-list button,.small-btn{border:1px solid #c5cebf;border-radius:5px;padding:6px 9px;background:#f2f4e9;font-size:13px;text-align:left}.anchor-list button[aria-pressed=true]{border-color:#758d73;background:#e3ebdc;color:#29492e}.detail-scroll .note,.detail-scroll .source{font-size:13px;line-height:1.48;color:#626c62;margin:7px 0}.source a,.note a,#info a{color:#315e4c;text-underline-offset:2px}.terrain-open{width:100%;padding:10px 12px;display:flex;align-items:center;justify-content:center;gap:8px;border-radius:5px;background:var(--forest);color:#f4f4e7;font-weight:600;font-size:14px;margin:12px 0 5px}.terrain-open:hover{background:#345b48}.detail-nav{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding:8px 15px;background:var(--paper)}.detail-nav button{color:var(--forest);display:flex;align-items:center;gap:6px;padding:7px 9px;font-size:14px}.detail-nav button:hover:enabled{background:var(--soft);border-radius:5px}.group-intro{padding:16px 24px;border-bottom:1px solid var(--line)}.group-intro p{font-size:14px;margin:8px 0 0;color:var(--muted)}
dialog{max-width:min(480px,calc(100vw - 28px));width:480px;border:1px solid #9aa893;border-radius:12px;padding:0;color:var(--ink);background:#fcfbf4;box-shadow:0 16px 90px #15291f50}dialog::backdrop{background:#1c30285c}#infoBody{padding:0 25px 22px}#infoBody h2{font-size:31px;margin-top:3px}#infoBody h3{font-size:15px;margin:19px 0 4px}#infoBody p{font-size:15px;margin:7px 0 11px}#infoBody ul{padding-left:20px;font-size:15px}#infoBody li{margin:7px 0}.dialog-top{padding:13px 16px 0;display:flex;align-items:center;justify-content:space-between}.dialog-top img{background:var(--forest);border-radius:50%;padding:3px}.icon-button{border-radius:50%}.mobile-sheet{display:none}
@media(max-width:900px) and (min-width:701px){#workspace{grid-template-columns:316px 1fr}.hero-inner,.event,.period-head{padding-left:19px}.index-top{padding-left:18px;padding-right:18px}.map-status{display:none}.map-top{justify-content:flex-end}.legend-grid{grid-template-columns:1fr;gap:3px}}
@media(max-height:720px) and (min-width:701px){.mast{height:56px}#workspace{height:calc(100% - 56px)}.hero{min-height:127px}.hero-inner{padding-block:15px}.index-top{padding-top:15px;padding-bottom:12px}.legend-grid{gap:3px}.legend-wrap{bottom:23px}}
@media(max-width:700px){
.mast{height:52px;padding:0 11px;gap:10px}.brand{gap:6px;font-size:22px}.brand img{width:31px;height:31px}.author,.mast-divider{display:none}.mast-actions{gap:0}.header-link{padding:7px}.header-link span{display:none}.header-link i{width:20px;height:20px}
#workspace{height:calc(100% - 52px);display:flex;flex-direction:column}.map-pane{order:0;flex:1;min-height:155px}.side{order:1;border-right:0;border-top:1px solid #bac3b1;height:49%;transition:height .2s;box-shadow:0 -3px 12px #33473412}.side.data-open{height:52%}.side.collapsed{height:39px}.side.collapsed .side-page{display:none}.mobile-sheet{height:36px;min-height:36px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;font-weight:600;letter-spacing:.05em;color:#536151;position:relative;border-bottom:1px solid #dce0d2;padding:8px 10px 3px}.mobile-sheet i{width:12px;height:12px}.side.collapsed .mobile-sheet i{transform:rotate(180deg)}.grip{position:absolute;top:3px;width:26px;height:3px;background:#c3c8b8;border-radius:99px}
.hero{min-height:56px;height:56px}.hero-inner{display:flex;align-items:baseline;gap:10px;padding:0 14px}.hero h1{font-size:28px;letter-spacing:-1.2px;margin:0}.hero .person{display:none}.hero .life{order:2;font-size:10px;letter-spacing:.04em}.hero .life span{display:none}.etching{width:50px;right:9px}.index-top{padding:7px 12px}.row-title{display:none}.filters{margin-top:5px;gap:5px}.filters label{max-width:none}.filters select{padding:5px 12px 5px 0}.search{height:31px}.period-head{padding:6px 13px}.event{padding:9px 13px;gap:9px}.ink{width:25px;height:25px}.event .name{font-size:18px}.event .meta{font-size:12px}.map-top{inset:8px 8px auto}.map-status{max-width:38%;padding:7px 8px;gap:4px;font-size:11px}.map-status i{width:13px}.layers button{padding:5px 7px;font-size:12px;gap:4px}.layers button i{width:13px;height:13px}.map-tools{right:8px;top:47px;gap:5px}.map-tools>button{width:33px;height:33px}.map-tools button{width:31px;height:31px}.legend-wrap{left:8px;bottom:23px}.legend-toggle{padding:5px 7px;font-size:12px;gap:4px}.legend-grid{font-size:11px;padding:0 7px 7px;gap:2px 6px}.detail-head{padding:3px 9px}.detail-scroll{padding:12px 16px}.detail-scroll h2{font-size:26px;margin:5px 0}.detail-scroll .intro{font-size:19px;margin:10px 0}.detail-nav{padding:3px 10px}.group-intro{padding:8px 14px}.group-intro h2{font-size:22px}
}
@media(max-width:390px){.map-status{display:none}.map-top{justify-content:flex-end}.legend-grid{grid-template-columns:1fr}.layers button{padding:5px 6px}}
@media(max-height:570px) and (max-width:700px){.hero{display:none}.side{height:48%}.map-pane{min-height:108px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation-duration:.001ms!important}}
.event .teaser{font-size:13px;line-height:1.45;color:#626a5e;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px}.detail-scroll h2:focus:not(:focus-visible){outline:0}
@media(max-width:700px){.event .teaser{display:none}}
@media(min-width:701px){.hero h1{font-size:clamp(34px,2.85vw,44px)}}
body{display:flex;flex-direction:column;height:100vh;height:100dvh}.mast{flex:none;gap:20px}.mast .brand{font-size:clamp(20px,1.8vw,28px);letter-spacing:-.035em}.mast .brand img{width:38px;height:38px}#workspace{height:auto;flex:1;min-height:0}.signature,.dialog-signature,.terrain-signature{font:500 14px/1.4 var(--sans);letter-spacing:.025em;text-align:center}.signature{flex:none;background:#213c33;color:#f3eddd;border-top:1px solid #ad9978;padding:4px 12px max(4px,env(safe-area-inset-bottom));position:relative;z-index:3}.dialog-signature{padding:6px 8px;background:var(--forest);color:#f5f1e5;position:sticky;bottom:0}.terrain-signature{flex-basis:100%;color:#f5f1e5}.atlas-tabs{display:flex;align-items:center;gap:3px}.atlas-tabs :is(button,a){text-decoration:none;color:#e5e8da;font-size:14px;line-height:1.25;padding:9px 10px;border-radius:5px}.atlas-tabs :is(button,a):hover{background:#385347}.atlas-tabs button[aria-current=page]{color:#fff3db;background:#3c574b;box-shadow:inset 0 -2px #c9a677}.book-ref{display:inline-flex;gap:7px;align-items:center;border:1px solid #c7cdbd;background:#eef0e4;color:#324c37;border-radius:5px;padding:5px 9px;margin:5px 0 0;font-size:14px}.book-ref i{width:15px;height:15px}.detail-scroll .detail-narrative{margin:10px 0 17px;font:400 17px/1.55 var(--serif)}.author-note{background:#f2eddf;border-inline-start:3px solid #b5925d;padding:9px 12px;margin:12px 0}.author-note h3{font:600 12px/1.3 var(--sans);color:#655437;letter-spacing:.04em;margin:0}.author-note p{margin:5px 0}.detail-scroll .intro{margin:14px 0 10px}
#directory{flex:1;min-height:0;overflow:auto;background:#f5f5ec;scrollbar-gutter:stable}.directory-shell{max-width:1150px;margin:0 auto;padding:30px clamp(16px,4vw,55px) 45px}.directory-intro{display:flex;align-items:center;justify-content:space-between;gap:16px}.directory-intro h1{font:500 clamp(30px,3vw,44px)/1.15 var(--serif);letter-spacing:-.04em;margin:0 0 4px}.directory-intro p{font-size:14px;color:#52604f;margin:0}.directory-search{width:clamp(190px,28vw,340px);margin:0;background:#fffef8}.alphabet{display:flex;flex-wrap:wrap;gap:3px;margin:19px 0 12px}.alphabet button{min-width:29px;border-radius:4px;color:var(--forest);font-size:14px;padding:4px 7px}.alphabet button:hover,.alphabet [aria-pressed=true]{background:var(--forest);color:#faf8ed}.directory-content{margin-top:16px}.directory-group{border:1px solid #d6d8c8;background:#fcfbf5;border-radius:7px;margin:0 0 17px;overflow:hidden}.letter-head,.year-head{font:500 20px/1.3 var(--serif);color:var(--forest);padding:7px 15px;margin:0;background:#e8ebdd;border-bottom:1px solid #d5d9c9}.place-grid{display:grid;grid-template-columns:1fr 1fr;column-gap:18px;padding:0 12px}.place-index-row{width:100%;display:flex;align-items:baseline;justify-content:space-between;gap:12px;border-bottom:1px solid #e2e5d7;padding:10px 3px;text-align:left}.place-index-row:hover,.linked-episode:hover{background:#eef2e7}.place-index-row strong,.person-index-row strong{font-weight:500}.place-index-row span{color:#596653;font-size:13px;text-align:right;flex:none}.person-index-row{display:grid;grid-template-columns:minmax(145px,30%) 1fr;gap:16px;padding:10px 15px;border-bottom:1px solid #e2e5d7}.person-index-row p{font-size:14px;font-variant-numeric:tabular-nums;line-height:1.53;margin:0;color:#51604f;overflow-wrap:anywhere}.person-index-row small{display:block;color:#626b61;font-size:13px}.year-head{width:100%;border-bottom:0;display:flex;align-items:center;text-align:left;gap:12px;cursor:pointer}.year-head small{margin-left:auto;font:400 13px var(--sans);color:#596850}.year-head::after{content:'+';font:19px var(--sans)}details[open]>.year-head::after{content:'−'}.year-group{margin-bottom:7px}.year-head::-webkit-details-marker{display:none}.linked-episode{width:100%;display:flex;align-items:baseline;gap:16px;padding:10px 16px;border-top:1px solid #e3e6d8;text-align:left}.linked-episode time{color:#66735d;min-width:8rem;font-size:13px}.linked-episode span{display:flex;flex-direction:column;gap:2px}.linked-episode em{font-size:13px;color:#60695b;font-style:normal}.dir-back{display:inline-block;padding:6px 0;color:var(--forest);text-decoration:underline;text-underline-offset:3px;margin-bottom:10px}.index-empty{padding:20px;background:#fcfbf5}
@media(max-width:1110px){.mast{gap:9px;padding-inline:14px}.mast-actions{gap:1px}.header-link{padding:6px}.atlas-tabs :is(button,a){padding:8px;font-size:13px}.brand{gap:8px}}
@media(max-width:1100px){.mast{height:auto;min-height:58px;flex-wrap:wrap;padding-top:5px;gap:4px 12px}.atlas-tabs{order:3;width:100%;justify-content:flex-start;margin:0 -2px 4px}.mast .brand img{width:30px;height:30px}.mast .brand{font-size:22px}.atlas-tabs :is(button,a){padding:6px 10px}.mast-actions{margin-left:auto}.place-grid{column-gap:10px}}
@media(max-width:700px){.mast .brand{font-size:clamp(16px,4.9vw,22px)}.mast{padding:4px 9px 0;gap:1px 6px}.atlas-tabs{justify-content:space-between;gap:1px;margin:0 -1px 4px}.atlas-tabs :is(button,a){font-size:clamp(11px,3.2vw,14px);padding:6px}.mast .brand img{width:28px;height:28px}.signature{font-size:13px;padding-top:3px}.directory-shell{padding:16px 12px 25px}.directory-intro{align-items:flex-start;flex-direction:column;gap:9px}.directory-search{width:100%;height:36px}.directory-search input{height:100%}.alphabet{gap:1px;margin:10px 0 7px}.alphabet button{min-width:25px;font-size:12px;padding:3px 5px}.place-grid{grid-template-columns:1fr}.person-index-row{grid-template-columns:1fr;gap:2px;padding:8px 12px}.linked-episode{padding:8px 12px;gap:8px;flex-direction:column}.linked-episode time{min-width:unset}.directory-intro h1{font-size:28px}.year-group{margin-bottom:5px}.directory-intro p{font-size:13px}.directory-content{margin-top:10px}}

/* La portada mantiene sus proporciones en las cabeceras y las ventanas. */
.cover-icon,
.mast .brand .cover-icon,
.dialog-top .cover-icon {
  width: 31px;
  height: 44px;
  flex: none;
  padding: 0;
  object-fit: contain;
  border-radius: 3px;
  background: transparent;
}
.mast .brand {
  min-width: 0;
  white-space: normal;
  line-height: 1.12;
}
.mast .book-title { text-wrap: balance; }
.mast-actions, .atlas-tabs { flex-shrink: 0; }
.dialog-top {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: 9px;
  background: var(--paper);
}
@media (min-width:1101px) and (max-width:1280px) {
  .mast .book-title > span { display: block; }
}
@media (max-width:1100px) {
  .mast .brand { flex: 1 1 0; }
  .mast .brand .cover-icon { width: 26px; height: 37px; }
}
@media (max-width:700px) {
  .mast .brand { font-size: clamp(16px, 3.9vw, 21px); }
  .mast .brand .cover-icon { width: 23px; height: 33px; }
  .atlas-tabs { max-width: 100%; }
}
@media (max-width:440px) {
  .mast .book-title > span { display: block; }
}

/* En la vista general, el mapa ocupa el espacio libre entre los filtros y la firma. */
#browse .search input { min-width: 0; }
.search-action {
  flex: none;
  padding: 3px 5px;
  color: var(--forest);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (min-width: 701px) {
  #workspace:has(.side:not(.data-open)) {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .side:not(.data-open) { border-right: 0; border-bottom: 1px solid var(--line); }
  #browse {
    display: grid;
    grid-template-columns: clamp(305px, 29vw, 380px) minmax(0, 1fr);
  }
  #browse .hero { min-height: 100px; border-bottom: 0; }
  #browse .hero-inner { padding-block: 9px; }
  #browse .index-top {
    display: grid;
    align-content: center;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px 14px;
    padding: 12px clamp(14px, 2vw, 28px);
    border-bottom: 0;
  }
  #browse .row-title { grid-column: 1 / -1; margin: 0; }
  #browse .filters { margin: 0; }
  #browse .filters label { max-width: none; }
}
@media (min-width: 701px) and (max-width: 980px) {
  #browse .index-top { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .side:not(.data-open):not(.collapsed) { flex: none; height: auto; }
  .side:not(.data-open) #browse { flex: none; }
}

@media (max-width: 700px) {
  .atlas-tabs {
    display: grid;
    grid-template-columns: auto auto auto minmax(0, 1.45fr) minmax(0, 1fr);
    align-items: stretch;
  }
  .atlas-tabs :is(button,a) {
    display: grid;
    align-content: center;
    padding-inline: 4px;
    min-width: 0;
    text-align: center;
    line-height: 1.2;
  }
}

/* Las dos páginas preliminares comparten el pie de firma con el visor. */
.at-opening > :is(.mast, #workspace, #directory) { display: none !important; }
#opening {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: radial-gradient(ellipse at 50% 39%, #38534a 0%, #213d35 50%, #162d28 100%);
  color: #f6f0df;
}
.opening-sheet {
  box-sizing: border-box;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.8vh, 22px);
  padding: clamp(18px, 3vh, 36px) clamp(14px, 4vw, 60px);
  text-align: center;
  cursor: pointer;
}
.opening-sheet h1, .opening-sheet h2, .opening-sheet p, .opening-jacket { margin: 0; }
.title-sheet h1 {
  font: 400 clamp(29px, 4.4vw, 65px)/1.07 var(--serif);
  letter-spacing: .025em;
  text-wrap: balance;
  color: #fbf5e6;
}
.opening-front {
  display: block;
  width: auto;
  height: clamp(210px, 50dvh, 680px);
  max-width: 86%;
  object-fit: contain;
  box-shadow: 0 7px 26px #091d196b, 0 0 0 1px #d2bb844f;
}
.opening-reference { max-width: 58rem; }
.guide-label { color: #e1d5b7; font: 500 14px/1.45 var(--sans); }
.guide-name { font: 500 clamp(18px, 2.1vw, 29px)/1.3 var(--serif); letter-spacing: .025em; }
.opening-reference .imprint { margin: 6px auto 0; font: 400 clamp(13px, 1.05vw, 16px)/1.45 var(--sans); color: #ede9dd; }
.opening-isbn { display: flex; justify-content: center; flex-wrap: wrap; column-gap: 1.5rem; row-gap: 2px; }
.opening-reference .opening-isbn { margin-top: 4px; color: #ebddbd; font: 500 clamp(12px, 1.05vw, 15px)/1.4 var(--sans); }
.opening-isbn span { white-space: nowrap; }
.opening-next {
  display: inline-block;
  border: 1px solid #dfca9c;
  border-radius: 5px;
  background: #f2e8ce;
  color: #203a32;
  padding: 8px 24px;
  min-height: 42px;
  font: 600 15px/1.3 var(--sans);
}
.opening-next:hover { background: #fff7e7; }
.reading-sheet {
  background: #f4f0e5;
  color: #213c32;
  gap: clamp(10px, 1.9vh, 23px);
}
.reading-sheet h2 { font: 500 clamp(32px, 4.1vw, 60px)/1.1 var(--serif); }
.reading-intro { max-width: 53rem; font: 400 clamp(18px, 1.9vw, 25px)/1.38 var(--serif); text-wrap: balance; }
.reading-intro strong { font-weight: 600; }
.opening-jacket {
  width: min(100%, 1150px, 109dvh);
  box-shadow: 0 4px 16px #28382928, 0 0 0 1px #b2aa93;
  background: white;
}
.opening-jacket img { width: 100%; height: auto; display: block; }
.reading-detail { max-width: 50rem; font: 400 clamp(16px, 1.55vw, 21px)/1.45 var(--serif); text-wrap: balance; }
.opening-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 22px; }
.reading-sheet .opening-next { color: #fff9e7; background: #29493e; border-color: #29493e; }
.reading-sheet .opening-next:hover { background: #365b4d; }
@media (max-width: 600px) {
  .opening-sheet { padding-inline: 14px; }
  .opening-front { height: clamp(190px, 43dvh, 440px); }
  .opening-reference .imprint br { display: none; }
  .opening-jacket { width: 100%; }
}
@media (max-height: 540px) and (min-aspect-ratio: 6/5) {
  .opening-sheet { gap: 6px; padding-block: 8px; }
  .title-sheet h1, .reading-sheet h2 { font-size: 28px; }
  .opening-front { height: clamp(105px, 36dvh, 190px); }
  .guide-name { font-size: 18px; }
  .opening-isbn, .opening-reference .imprint { font-size: 12px; }
  .opening-jacket { width: min(85%, 90dvh); }
  .opening-actions, .reading-intro, .reading-detail { max-width: 60rem; }
}

.jacket-link { padding:7px 2px; color:#365544; font:500 14px/1.4 var(--sans); text-decoration:underline; text-underline-offset:.22em; background:none; border:0; }
#jacketDialog { width:min(96vw,1480px); height:min(91dvh,1100px); max-width:none; max-height:none; margin:auto; overscroll-behavior:contain; }
#jacketDialog[open] { display:flex; flex-direction:column; }
#jacketDialog::backdrop { background:#172c24b8; }
.jacket-heading, .jacket-controls { display:flex; align-items:center; gap:8px; padding:10px 16px; }
.jacket-heading { justify-content:space-between; color:#f5f0e2; background:var(--forest); }
.jacket-heading h2 { margin:0; color:inherit; font:500 clamp(20px,3vw,30px)/1.2 var(--serif); }
.jacket-controls { flex-wrap:wrap; background:#f3f0e5; border-bottom:1px solid #b4b9a8; }
.jacket-controls button,.jacket-heading button { min-height:35px; padding:5px 10px; border:1px solid #9ca795; border-radius:5px; background:#faf8ef; color:#273e32; font:600 13px/1.2 var(--sans); }
.jacket-controls button:disabled { opacity:.46; cursor:default; }
.jacket-zoom { display:flex; align-items:center; gap:6px; margin-inline-start:auto; }
.jacket-zoom button { min-width:35px; font-size:18px; }
#jacketScale { min-width:47px; text-align:center; font:500 13px var(--sans); color:#334936; }
.jacket-view { flex:1 1 0; min-height:0; min-width:0; position:relative; overflow:auto; overscroll-behavior:contain; background:#d9d9cc; }
.jacket-view:focus-visible { outline:2px solid #946729; outline-offset:-3px; }
.jacket-view.has-zoom { cursor:grab; }
.jacket-view.is-dragging { cursor:grabbing; }
.jacket-canvas { width:max-content; height:max-content; min-width:100%; min-height:100%; display:grid; place-items:center; }
#jacketImage { display:block; max-width:none; max-height:none; height:auto; margin:0; user-select:none; }
#jacketDialog .dialog-signature { position:static; flex:none; }
@media (max-width:650px) {
  #jacketDialog { width:100%; height:100dvh; border-radius:0; border:0; }
  .jacket-heading,.jacket-controls { padding:8px; gap:5px; }
  .jacket-controls button { font-size:12px; padding-inline:7px; }
  .jacket-zoom { margin-inline-start:0; }
}
.absent-tag{display:inline-block;margin-left:7px;padding:3px 8px;border-radius:4px;background:#ece9dd;border:1px solid #d3cdb8;color:#5d5543;font-size:12px;font-weight:600;letter-spacing:.02em;vertical-align:middle}
